From 77e283bd9c33166937756250918b12e349caf050 Mon Sep 17 00:00:00 2001 From: kylo252 <59826753+kylo252@users.noreply.github.com> Date: Mon, 2 Aug 2021 23:42:56 +0200 Subject: [Refactor] Allow editing default keymaps (#1213) --- utils/installer/config.example-no-ts.lua | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) (limited to 'utils/installer/config.example-no-ts.lua') 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 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"] = { "" }, --- ["]d"] = { "" }, --- --- -- Navigate buffers --- [""] = { ":bnext" }, --- [""] = { ":bprevious" }, +-- add your own keymapping +lvim.keys.normal_mode[""] = ":w" +-- unmap a default keymapping +-- lvim.keys.normal_mode[""] = "" +-- edit a default keymapping +-- lvim.keys.normal_mode[""] = ":q" + +-- Use which-key to add extra bindings with the leader-key prefix +-- lvim.builtin.which_key.mappings["P"] = { "lua require'telescope'.extensions.project.project{}", "Projects" } +-- lvim.builtin.which_key.mappings["t"] = { +-- name = "+Trouble", +-- r = { "Trouble lsp_references", "References" }, +-- f = { "Trouble lsp_definitions", "Definitions" }, +-- d = { "Trouble lsp_document_diagnostics", "Diagnosticss" }, +-- q = { "Trouble quickfix", "QuickFix" }, +-- l = { "Trouble loclist", "LocationList" }, +-- w = { "Trouble lsp_workspace_diagnostics", "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 -- cgit v1.2.3