diff options
author | kylo252 <[email protected]> | 2021-08-02 23:42:56 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2021-08-02 17:42:56 -0400 |
commit | 77e283bd9c33166937756250918b12e349caf050 (patch) | |
tree | 684cf70dbf4b95eda38fc1f5f0917f3df6c75195 /utils | |
parent | e0f0c81ea6f595139cd4f55fbdcf9e22d9a84727 (diff) |
[Refactor] Allow editing default keymaps (#1213)
Diffstat (limited to 'utils')
-rw-r--r-- | utils/installer/config.example-no-ts.lua | 30 | ||||
-rw-r--r-- | utils/installer/config.example.lua | 41 |
2 files changed, 37 insertions, 34 deletions
diff --git a/utils/installer/config.example-no-ts.lua b/utils/installer/config.example-no-ts.lua index c74548dc..4303d264 100644 --- a/utils/installer/config.example-no-ts.lua +++ b/utils/installer/config.example-no-ts.lua @@ -5,17 +5,25 @@ lvim.format_on_save = true lvim.lint_on_save = true lvim.colorscheme = "spacegray" --- keymappings +-- keymappings [view all the defaults by pressing <leader>Lk] lvim.leader = "space" --- 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"] = { "<PageUp>" }, --- ["]d"] = { "<PageDown>" }, --- --- -- Navigate buffers --- ["<Tab>"] = { ":bnext<CR>" }, --- ["<S-Tab>"] = { ":bprevious<CR>" }, +-- add your own keymapping +lvim.keys.normal_mode["<C-s>"] = ":w<cr>" +-- unmap a default keymapping +-- lvim.keys.normal_mode["<C-Up>"] = "" +-- edit a default keymapping +-- lvim.keys.normal_mode["<C-q>"] = ":q<cr>" + +-- Use which-key to add extra bindings with the leader-key prefix +-- lvim.builtin.which_key.mappings["P"] = { "<cmd>lua require'telescope'.extensions.project.project{}<CR>", "Projects" } +-- lvim.builtin.which_key.mappings["t"] = { +-- name = "+Trouble", +-- r = { "<cmd>Trouble lsp_references<cr>", "References" }, +-- f = { "<cmd>Trouble lsp_definitions<cr>", "Definitions" }, +-- d = { "<cmd>Trouble lsp_document_diagnostics<cr>", "Diagnosticss" }, +-- q = { "<cmd>Trouble quickfix<cr>", "QuickFix" }, +-- l = { "<cmd>Trouble loclist<cr>", "LocationList" }, +-- w = { "<cmd>Trouble lsp_workspace_diagnostics<cr>", "Diagnosticss" }, -- } -- TODO: User Config for predefined plugins @@ -69,5 +77,3 @@ lvim.builtin.treesitter.highlight.enabled = true -- lvim.autocommands.custom_groups = { -- { "BufWinEnter", "*.lua", "setlocal ts=8 sw=8" }, -- } - --- Additional Leader bindings for WhichKey diff --git a/utils/installer/config.example.lua b/utils/installer/config.example.lua index a7a55874..90bf6c92 100644 --- a/utils/installer/config.example.lua +++ b/utils/installer/config.example.lua @@ -13,17 +13,26 @@ an executable lvim.format_on_save = true lvim.lint_on_save = true lvim.colorscheme = "spacegray" --- keymappings + +-- keymappings [view all the defaults by pressing <leader>Lk] lvim.leader = "space" --- 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"] = { "<PageUp>" }, --- ["]d"] = { "<PageDown>" }, --- --- -- Navigate buffers --- ["<Tab>"] = { ":bnext<CR>" }, --- ["<S-Tab>"] = { ":bprevious<CR>" }, +-- add your own keymapping +lvim.keys.normal_mode["<C-s>"] = ":w<cr>" +-- unmap a default keymapping +-- lvim.keys.normal_mode["<C-Up>"] = "" +-- edit a default keymapping +-- lvim.keys.normal_mode["<C-q>"] = ":q<cr>" + +-- Use which-key to add extra bindings with the leader-key prefix +-- lvim.builtin.which_key.mappings["P"] = { "<cmd>lua require'telescope'.extensions.project.project{}<CR>", "Projects" } +-- lvim.builtin.which_key.mappings["t"] = { +-- name = "+Trouble", +-- r = { "<cmd>Trouble lsp_references<cr>", "References" }, +-- f = { "<cmd>Trouble lsp_definitions<cr>", "Definitions" }, +-- d = { "<cmd>Trouble lsp_document_diagnostics<cr>", "Diagnosticss" }, +-- q = { "<cmd>Trouble quickfix<cr>", "QuickFix" }, +-- l = { "<cmd>Trouble loclist<cr>", "LocationList" }, +-- w = { "<cmd>Trouble lsp_workspace_diagnostics<cr>", "Diagnosticss" }, -- } -- TODO: User Config for predefined plugins @@ -77,15 +86,3 @@ lvim.builtin.treesitter.highlight.enabled = true -- lvim.autocommands.custom_groups = { -- { "BufWinEnter", "*.lua", "setlocal ts=8 sw=8" }, -- } - --- Additional Leader bindings for WhichKey --- lvim.builtin.which_key.mappings["P"] = { "<cmd>lua require'telescope'.extensions.project.project{}<CR>", "Projects" } --- lvim.builtin.which_key.mappings["t"] = { --- name = "+Trouble", --- r = { "<cmd>Trouble lsp_references<cr>", "References" }, --- f = { "<cmd>Trouble lsp_definitions<cr>", "Definitions" }, --- d = { "<cmd>Trouble lsp_document_diagnostics<cr>", "Diagnosticss" }, --- q = { "<cmd>Trouble quickfix<cr>", "QuickFix" }, --- l = { "<cmd>Trouble loclist<cr>", "LocationList" }, --- w = { "<cmd>Trouble lsp_workspace_diagnostics<cr>", "Diagnosticss" }, --- } |