From 6c6003453aac4819d339e0517d145d63bcfef838 Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Wed, 1 Jul 2026 15:10:58 -0500 Subject: [PATCH 1/5] set rename keybinding --- init.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index 18b1f11d..25c52ddc 100644 --- a/init.lua +++ b/init.lua @@ -379,6 +379,7 @@ do { 'gr', group = 'LSP Actions', mode = { 'n' } }, { 'g', group = '[G]it' }, { 'n', group = '[N]otepad' }, + { 'r', group = '[R]e[N]ame' }, }, } @@ -650,9 +651,9 @@ do -- Rename the variable under your cursor. -- Most Language Servers support renaming across files, etc. - map('grn', vim.lsp.buf.rename, '[R]e[n]ame') - + map('rn', vim.lsp.buf.rename, '[R]e[n]ame') -- Execute a code action, usually your cursor needs to be on top of an error + -- or a suggestion from your LSP for this to activate. map('gra', vim.lsp.buf.code_action, '[G]oto Code [A]ction', { 'n', 'x' }) From 10b75f8e09e818a4dadb41d1f4c127b9dce517ca Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Wed, 1 Jul 2026 15:17:50 -0500 Subject: [PATCH 2/5] define lsp code group --- init.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/init.lua b/init.lua index 25c52ddc..9e49f3d6 100644 --- a/init.lua +++ b/init.lua @@ -379,7 +379,9 @@ do { 'gr', group = 'LSP Actions', mode = { 'n' } }, { 'g', group = '[G]it' }, { 'n', group = '[N]otepad' }, - { 'r', group = '[R]e[N]ame' }, + { 'r', group = '[R]e[N]ame', mode = { 'n' } }, + { 'c', group = 'LSP: [C]ode', mode = { 'n' } }, + { 'cg', group = 'LSP: [G]oto', mode = { 'n' } }, }, } @@ -655,11 +657,11 @@ do -- Execute a code action, usually your cursor needs to be on top of an error -- or a suggestion from your LSP for this to activate. - map('gra', vim.lsp.buf.code_action, '[G]oto Code [A]ction', { 'n', 'x' }) + map('ca', vim.lsp.buf.code_action, '[C]ode [A]ction', { 'n', 'x' }) -- WARN: This is not Goto Definition, this is Goto Declaration. -- For example, in C this would take you to the header. - map('grD', vim.lsp.buf.declaration, '[G]oto [D]eclaration') + map('cgD', vim.lsp.buf.declaration, '[G]oto [D]eclaration') -- The following two autocommands are used to highlight references of the -- word under your cursor when your cursor rests there for a little while. From 3726a1656bc2020379df89997cc8c430af08b3f8 Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Wed, 1 Jul 2026 15:23:01 -0500 Subject: [PATCH 3/5] assign general lsp commands to correct group --- init.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/init.lua b/init.lua index 9e49f3d6..a9206357 100644 --- a/init.lua +++ b/init.lua @@ -546,29 +546,29 @@ do local buf = event.buf -- Find references for the word under your cursor. - vim.keymap.set('n', 'grr', builtin.lsp_references, { buffer = buf, desc = '[G]oto [R]eferences' }) + vim.keymap.set('n', 'cgr', builtin.lsp_references, { buffer = buf, desc = '[G]oto [R]eferences' }) -- Jump to the implementation of the word under your cursor. -- Useful when your language has ways of declaring types without an actual implementation. - vim.keymap.set('n', 'gri', builtin.lsp_implementations, { buffer = buf, desc = '[G]oto [I]mplementation' }) + vim.keymap.set('n', 'cgi', builtin.lsp_implementations, { buffer = buf, desc = '[G]oto [I]mplementation' }) -- Jump to the definition of the word under your cursor. -- This is where a variable was first declared, or where a function is defined, etc. -- To jump back, press . - vim.keymap.set('n', 'grd', builtin.lsp_definitions, { buffer = buf, desc = '[G]oto [D]efinition' }) + vim.keymap.set('n', 'cgd', builtin.lsp_definitions, { buffer = buf, desc = '[G]oto [D]efinition' }) -- Fuzzy find all the symbols in your current document. -- Symbols are things like variables, functions, types, etc. - vim.keymap.set('n', 'gO', builtin.lsp_document_symbols, { buffer = buf, desc = 'Open Document Symbols' }) + vim.keymap.set('n', 'cgO', builtin.lsp_document_symbols, { buffer = buf, desc = 'Open Document Symbols' }) -- Fuzzy find all the symbols in your current workspace. -- Similar to document symbols, except searches over your entire project. - vim.keymap.set('n', 'gW', builtin.lsp_dynamic_workspace_symbols, { buffer = buf, desc = 'Open Workspace Symbols' }) + vim.keymap.set('n', 'cgW', builtin.lsp_dynamic_workspace_symbols, { buffer = buf, desc = 'Open Workspace Symbols' }) -- Jump to the type of the word under your cursor. -- Useful when you're not sure what type a variable is and you want to see -- the definition of its *type*, not where it was *defined*. - vim.keymap.set('n', 'grt', builtin.lsp_type_definitions, { buffer = buf, desc = '[G]oto [T]ype Definition' }) + vim.keymap.set('n', 'cgt', builtin.lsp_type_definitions, { buffer = buf, desc = '[G]oto [T]ype Definition' }) end, }) From 280c611a6aa8ab4e5c417b3b45b5f509e97a6d39 Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Wed, 1 Jul 2026 15:26:14 -0500 Subject: [PATCH 4/5] remove the old lsp group --- init.lua | 2 -- 1 file changed, 2 deletions(-) diff --git a/init.lua b/init.lua index a9206357..419eb22b 100644 --- a/init.lua +++ b/init.lua @@ -375,8 +375,6 @@ do { 's', group = '[S]earch', mode = { 'n', 'v' } }, { 't', group = '[T]oggle' }, { 'h', group = 'Git [H]unk', mode = { 'n', 'v' } }, -- Enable gitsigns recommended keymaps first - -- TODO: LSP actions (anything with `gr`) should be with the leader key - { 'gr', group = 'LSP Actions', mode = { 'n' } }, { 'g', group = '[G]it' }, { 'n', group = '[N]otepad' }, { 'r', group = '[R]e[N]ame', mode = { 'n' } }, From 553b4c709927b85b78a717717bf5d04d1795e53d Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Wed, 1 Jul 2026 15:27:47 -0500 Subject: [PATCH 5/5] update the lsp code group in the smoketest --- doc/smoketest.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/smoketest.md b/doc/smoketest.md index d2ec964b..d78975ba 100644 --- a/doc/smoketest.md +++ b/doc/smoketest.md @@ -4,9 +4,11 @@ A manual smoketest checklist to ensure features are working: ## Plugins ### Default -- [ ] Whichkey should have accurate keybindings +- [ ] Whichkey groups should have accurate keybindings + - c -> LSP: [C]ode - g -> [G]it - n -> [N]otepad + - r -> [R]e[N]ame - s -> [S]earch - t -> [T]oggle