summaryrefslogtreecommitdiff
path: root/lua/lvim
diff options
context:
space:
mode:
authoropalmay <[email protected]>2023-02-13 11:02:25 +0200
committeropalmay <[email protected]>2023-04-12 13:56:59 +0300
commit81a9a92d104f0eb06fc785d04e98e68a24cbd328 (patch)
tree2e5de4d4c06223582facf2f5e181ef7639ecdc24 /lua/lvim
parent37fb60f755504b78fce6f47c7aac2a9e1a6ce09c (diff)
fix: don't bind terminal mode for <leader> keys
Diffstat (limited to 'lua/lvim')
-rw-r--r--lua/lvim/core/terminal.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/lua/lvim/core/terminal.lua b/lua/lvim/core/terminal.lua
index 885fabd4..5b3b89c0 100644
--- a/lua/lvim/core/terminal.lua
+++ b/lua/lvim/core/terminal.lua
@@ -91,7 +91,11 @@ local function add_keybind_keymap(keybind)
return
end
- vim.keymap.set({ "n", "t" }, keybind.keymap, function()
+ local modes = { "n" }
+ if not keybind.keymap:find "<leader>" then
+ table.insert(modes, "t")
+ end
+ vim.keymap.set(modes, keybind.keymap, function()
keybind_toggle(keybind)
end, { desc = keybind.desc, noremap = true, silent = true })
end