feat: nvim update terminal keybindings

This commit is contained in:
2025-10-19 16:03:29 +02:00
parent 5648224062
commit 5a35cd04a6

View File

@@ -37,10 +37,13 @@ local config = {
-- lvim.builtin.terminal.execs[#lvim.builtin.terminal.execs+1] = {"gdb", "tg", "GNU Debugger"} -- lvim.builtin.terminal.execs[#lvim.builtin.terminal.execs+1] = {"gdb", "tg", "GNU Debugger"}
-- TODO: pls add mappings in which key and refactor this -- TODO: pls add mappings in which key and refactor this
execs = { execs = {
{ vim.o.shell, "<M-1>", "Horizontal Terminal", "horizontal", 0.3 }, -- { vim.o.shell, "<M-1>", "Horizontal Terminal", "horizontal", 0.3 },
{ vim.o.shell, "<M-2>", "Vertical Terminal", "vertical", 0.4 }, -- { vim.o.shell, "<M-2>", "Vertical Terminal", "vertical", 0.4 },
{ vim.o.shell, "<M-3>", "Float Terminal", "float", nil }, { vim.o.shell, "<M-1>", "Float Terminal 1", "float", nil },
{ vim.o.shell, "<C-a>", "AI Agent Terminal", "float", nil }, { vim.o.shell, "<M-2>", "Float Terminal 2", "float", nil },
{ vim.o.shell, "<M-3>", "Float Terminal 3", "float", nil },
{ vim.o.shell, "<M-4>", "Float Terminal 4", "float", nil },
{ vim.o.shell, "<M-5>", "Float Terminal 5", "float", nil },
}, },
} }
@@ -81,7 +84,7 @@ Add_exec = function(opts)
end end
vim.keymap.set({ "n", "t" }, opts.keymap, function() vim.keymap.set({ "n", "t" }, opts.keymap, function()
M._exec_toggle { cmd = opts.cmd, count = opts.count, direction = opts.direction, size = opts.size() } _exec_toggle { cmd = opts.cmd, count = opts.count, direction = opts.direction, size = opts.size() }
end, { desc = opts.label, noremap = true, silent = true }) end, { desc = opts.label, noremap = true, silent = true })
end end