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-no-ts.lua | 21 +++++++-------------- utils/installer/config.example.lua | 21 +++++++-------------- 2 files changed, 14 insertions(+), 28 deletions(-) (limited to 'utils/installer') diff --git a/utils/installer/config.example-no-ts.lua b/utils/installer/config.example-no-ts.lua index c0df5b8b..c74548dc 100644 --- a/utils/installer/config.example-no-ts.lua +++ b/utils/installer/config.example-no-ts.lua @@ -7,23 +7,16 @@ 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 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