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) --- README.md | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 903a2c23..b68174b9 100644 --- a/README.md +++ b/README.md @@ -78,8 +78,26 @@ lvim.colorscheme = "spacegray" lvim.builtin.compe.autocomplete = true --- keymappings +-- keymappings [view all the defaults by pressing Lk] lvim.leader = "space" +-- 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" }, +-- } -- After changing plugin config exit and reopen LunarVim, Run :PackerInstall :PackerCompile lvim.builtin.dashboard.active = true @@ -123,17 +141,6 @@ lvim.plugins = { -- { "BufWinEnter", "*.lua", "setlocal ts=8 sw=8" }, -- } --- Additional Leader bindings for WhichKey --- 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" }, --- } ``` -- cgit v1.2.3