diff options
author | opalmay <[email protected]> | 2023-02-13 11:02:25 +0200 |
---|---|---|
committer | opalmay <[email protected]> | 2023-04-12 13:56:59 +0300 |
commit | 81a9a92d104f0eb06fc785d04e98e68a24cbd328 (patch) | |
tree | 2e5de4d4c06223582facf2f5e181ef7639ecdc24 /lua/lvim/core/terminal.lua | |
parent | 37fb60f755504b78fce6f47c7aac2a9e1a6ce09c (diff) |
fix: don't bind terminal mode for <leader> keys
Diffstat (limited to 'lua/lvim/core/terminal.lua')
-rw-r--r-- | lua/lvim/core/terminal.lua | 6 |
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 |