blob: b8067a373fd3a158b4e76ccb2f56ecfe9380bab0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
-- Scratch terminal for running arbitrary shell commands, toggled like
-- claude-code.nvim's own <C-,> - open/close (not kill) a persistent split.
return {
"akinsho/toggleterm.nvim",
lazy = false, -- global <C-.> toggle must work from any window, not just after some trigger event
opts = {
open_mapping = [[<C-.>]], -- registers n, t (terminal_mappings) and i (insert_mappings) mode maps automatically
direction = "vertical",
-- toggleterm's vertical direction always opens via "botright vsplit" internally,
-- so this already matches claude-code.nvim's right-side placement without
-- touching 'splitright'.
size = function(term)
if term.direction == "vertical" then
return math.floor(vim.o.columns * 0.3) -- matches claude-code.nvim's window.position ratio
end
end,
},
}
|