feat!(terminal): unify terminal window behavior and centralize sizing config (#102)

- add terminal.window.type support (hsplit, vsplit, floating, tab)
- add terminal.window.split_size for split-based layouts
- rename floating size options to terminal.window.floating_width/floating_height
- validate terminal window ratios during setup
- make terminal.run/run_floating merge default keymaps internally
- remove cmd.split width/height sizing in favor of terminal.window config
- improve floating/log buffer state handling and refresh behavior
- update README examples and configuration docs

BREAKING CHANGE: terminal sizing/config moved to terminal.window.*.
Removed cmd.split.width/cmd.split.height.
Renamed terminal.window.width/height to terminal.window.floating_width/floating_height
This commit is contained in:
Jonas Elhs
2026-04-07 10:31:12 +02:00
committed by GitHub
parent 578c5f15df
commit 46141a282e
8 changed files with 132 additions and 67 deletions
+2
View File
@@ -39,6 +39,7 @@ local M = {}
--- @field on_exit? fun(buf: number) Callback when buffer is closed
--- @field keymaps? jj.core.buffer.keymap[] Keymaps to set on the buffer
--- @field win_options? table Window-specific options to set
--- @field zindex? number Stacking order (default: 50)
--- Create and configure a new buffer
--- @param opts jj.core.buffer.opts Buffer configuration options
@@ -153,6 +154,7 @@ function M.create_float(opts)
height = height,
row = row,
col = col,
zindex = opts.zindex,
style = opts.style or "minimal",
border = opts.border or "rounded",
}