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
+6 -4
View File
@@ -50,6 +50,10 @@ function M.handle_status_enter()
return
end
if require("jj").config.terminal.window.type == "floating" then
terminal.close_floating_buffer()
end
local filepath = file_info.new_path
local stat = vim.uv.fs_stat(filepath)
if not stat then
@@ -90,7 +94,7 @@ function M.status(opts)
return
end
local cmd_str = "jj st"
local cmd_str = "jj status"
if opts and opts.notify then
local output, success = runner.execute_command(cmd_str, "Failed to get status")
@@ -99,9 +103,7 @@ function M.status(opts)
end
else
-- Default behavior: show in buffer
local cmd = require("jj.cmd")
local keymaps = cmd.merge_keymaps(M.status_keymaps(), cmd.terminal_keymaps())
terminal.run(cmd_str, keymaps)
terminal.run(cmd_str, M.status_keymaps())
end
end