aboutsummaryrefslogtreecommitdiffstats
path: root/neovim/.config/nvim/lua/plugins/toggleterm.lua
diff options
context:
space:
mode:
authorGravatar Tom van der Lee <t0m.vd.l33@gmail.com>2026-09-16 08:47:13 +0200
committerGravatar Tom van der Lee <t0m.vd.l33@gmail.com>2026-09-16 08:47:13 +0200
commita5e8bbeb9d79d905a193e95a39acd29bc37e6c66 (patch)
tree5b42d54e6b91d454bcbac89f7aac42b0863a869d /neovim/.config/nvim/lua/plugins/toggleterm.lua
parent6906a9d55928c6250ff106d041b73fdd1ac8aae6 (diff)
downloaddotfiles-a5e8bbeb9d79d905a193e95a39acd29bc37e6c66.tar.gz
dotfiles-a5e8bbeb9d79d905a193e95a39acd29bc37e6c66.tar.bz2
dotfiles-a5e8bbeb9d79d905a193e95a39acd29bc37e6c66.zip
Updated dotfiles
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}