From 6d14d7b5da54fffabfec18b2b09a488d3661d7f9 Mon Sep 17 00:00:00 2001 From: Luc Sinet Date: Mon, 2 Aug 2021 17:19:44 +0200 Subject: [Refactor] Adopt which key mapping style (#1210) * Refactor keymappings to match which-key style * Update confif example + remove redundant way of registering mappings --- utils/installer/config.example.lua | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) (limited to 'utils/installer/config.example.lua') diff --git a/utils/installer/config.example.lua b/utils/installer/config.example.lua index 843917a7..a7a55874 100644 --- a/utils/installer/config.example.lua +++ b/utils/installer/config.example.lua @@ -15,23 +15,16 @@ lvim.lint_on_save = true lvim.colorscheme = "spacegray" -- keymappings lvim.leader = "space" --- overwrite the key-mappings provided by LunarVim for any mode, or leave it empty to keep them +-- overwrite/augment the key-mappings provided by LunarVim for any mode, or leave empty to keep the defaults. -- lvim.keys.normal_mode = { --- Page down/up --- {'[d', ''}, --- {']d', ''}, +-- -- Page down/up +-- ["[d"] = { "" }, +-- ["]d"] = { "" }, -- --- Navigate buffers --- {'', ':bnext'}, --- {'', ':bprevious'}, +-- -- Navigate buffers +-- [""] = { ":bnext" }, +-- [""] = { ":bprevious" }, -- } --- if you just want to augment the existing ones then use the utility function --- require("utils").add_keymap_insert_mode({ silent = true }, { --- { "", ":w" }, --- { "", "" }, --- }) --- you can also use the native vim way directly --- vim.api.nvim_set_keymap("i", "", "compe#complete()", { noremap = true, silent = true, expr = true }) -- TODO: User Config for predefined plugins -- After changing plugin config exit and reopen LunarVim, Run :PackerInstall :PackerCompile -- cgit v1.2.3