move whichkey config to whichkey config file

This commit is contained in:
christianchiarulli 2021-06-26 14:34:59 -04:00
parent 2cf8580eb7
commit d7271ab4ef
2 changed files with 9 additions and 8 deletions

View file

@ -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>",