summaryrefslogtreecommitdiff
path: root/lua/lv-which-key/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/lv-which-key/init.lua')
-rw-r--r--lua/lv-which-key/init.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/lua/lv-which-key/init.lua b/lua/lv-which-key/init.lua
index 02401ff0..cb756e55 100644
--- a/lua/lv-which-key/init.lua
+++ b/lua/lv-which-key/init.lua
@@ -34,6 +34,15 @@ require("which-key").setup {
show_help = true -- show help message on the command line when the popup is visible
}
+-- Set leader
+if O.leader_key == ' ' or O.leader_key == 'space' then
+ vim.api.nvim_set_keymap('n', '<Space>', '<NOP>', {noremap = true, silent = true})
+ vim.g.mapleader = ' '
+else
+ vim.api.nvim_set_keymap('n', O.leader_key, '<NOP>', {noremap = true, silent = true})
+ vim.g.mapleader = O.leader_key
+end
+
local opts = {
mode = "n", -- NORMAL mode
prefix = "<leader>",