aboutsummaryrefslogtreecommitdiffstats
path: root/neovim/.config/nvim/lua/plugins/toggleterm.lua
diff options
context:
space:
mode:
Diffstat (limited to 'neovim/.config/nvim/lua/plugins/toggleterm.lua')
-rw-r--r--neovim/.config/nvim/lua/plugins/toggleterm.lua18
1 files changed, 18 insertions, 0 deletions
diff --git a/neovim/.config/nvim/lua/plugins/toggleterm.lua b/neovim/.config/nvim/lua/plugins/toggleterm.lua
new file mode 100644
index 0000000..b8067a3
--- /dev/null
+++ b/neovim/.config/nvim/lua/plugins/toggleterm.lua
@@ -0,0 +1,18 @@
1-- Scratch terminal for running arbitrary shell commands, toggled like
2-- claude-code.nvim's own <C-,> - open/close (not kill) a persistent split.
3return {
4 "akinsho/toggleterm.nvim",
5 lazy = false, -- global <C-.> toggle must work from any window, not just after some trigger event
6 opts = {
7 open_mapping = [[<C-.>]], -- registers n, t (terminal_mappings) and i (insert_mappings) mode maps automatically
8 direction = "vertical",
9 -- toggleterm's vertical direction always opens via "botright vsplit" internally,
10 -- so this already matches claude-code.nvim's right-side placement without
11 -- touching 'splitright'.
12 size = function(term)
13 if term.direction == "vertical" then
14 return math.floor(vim.o.columns * 0.3) -- matches claude-code.nvim's window.position ratio
15 end
16 end,
17 },
18}