Skip to content

Commit 7dc2bb0

Browse files
tcldsfrick
authored andcommitted
Add documentation for custom which-key groups
1 parent d92a7ba commit 7dc2bb0

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

init.lua

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,17 @@ local on_attach = function(_, bufnr)
449449
end, { desc = 'Format current buffer with LSP' })
450450
end
451451

452+
-- document existing key chains
453+
require('which-key').register({
454+
['<leader>c'] = { name = '[C]ode', _ = 'which_key_ignore' },
455+
['<leader>d'] = { name = '[D]ocument', _ = 'which_key_ignore' },
456+
['<leader>g'] = { name = '[G]it', _ = 'which_key_ignore' },
457+
['<leader>h'] = { name = 'More git', _ = 'which_key_ignore' },
458+
['<leader>r'] = { name = '[R]ename', _ = 'which_key_ignore' },
459+
['<leader>s'] = { name = '[S]earch', _ = 'which_key_ignore' },
460+
['<leader>w'] = { name = '[W]orkspace', _ = 'which_key_ignore' },
461+
})
462+
452463
-- Enable the following language servers
453464
-- Feel free to add/remove any LSPs that you want here. They will automatically be installed.
454465
--

0 commit comments

Comments
 (0)