Skip to content

feat: add floating terminal window option for flix commands#3

Open
Blackmorse wants to merge 1 commit into
flix:masterfrom
Blackmorse:master
Open

feat: add floating terminal window option for flix commands#3
Blackmorse wants to merge 1 commit into
flix:masterfrom
Blackmorse:master

Conversation

@Blackmorse

Copy link
Copy Markdown

Summary

My usual flow for running Flix commands is to pop them into a floating terminal, read the output, then close it — rather than keeping a persistent split around. Until now flix_cmd always opened a belowright split with no way to change that.

This PR makes the terminal behavior configurable via a new terminal option, so the split can be replaced with a floating window.

Changes

  • terminal.window"split" (default, keeps the existing belowright split) or "float" (opens a floating window).
  • width / height — accept a fraction of the editor size (e.g. 0.5) or an exact column/row count (integer).
  • pos_x / pos_y — accept a number or "center".
  • close_binding — Normal-mode key that closes the floating window (default q).

Example

require("flix").setup({                                                                                                                                                                                                                        
  terminal = {                                                                                                                                                                                                                                 
    window = "float",                                                                                                                                                                                                                          
    width = 0.60,                                                                                                                                                                                                                              
    height = 0.5,                                                                                                                                                                                                                              
    pos_x = "center",                                                                                                                                                                                                                          
    pos_y = "center",                                                                                                                                                                                                                          
    close_binding = "q",                                                                                                                                                                                                                       
  },                                                                                                                                                                                                                                           
})                                                                                                                                                                                                                                             

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant