From d7271ab4ef213eada5c7ba443bd7f8b8e86bebab Mon Sep 17 00:00:00 2001 From: christianchiarulli Date: Sat, 26 Jun 2021 14:34:59 -0400 Subject: move whichkey config to whichkey config file --- lua/lv-which-key/init.lua | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lua/lv-which-key/init.lua') 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', '', '', {noremap = true, silent = true}) + vim.g.mapleader = ' ' +else + vim.api.nvim_set_keymap('n', O.leader_key, '', {noremap = true, silent = true}) + vim.g.mapleader = O.leader_key +end + local opts = { mode = "n", -- NORMAL mode prefix = "", -- cgit v1.2.3