Skip to content

Commit 0340f77

Browse files
committed
Add documentation for custom which-key groups
1 parent d891f4a commit 0340f77

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
@@ -438,6 +438,17 @@ local on_attach = function(_, bufnr)
438438
end, { desc = 'Format current buffer with LSP' })
439439
end
440440

441+
-- document existing key chains
442+
require('which-key').register({
443+
['<leader>c'] = { name = '[C]ode', _ = 'which_key_ignore' },
444+
['<leader>d'] = { name = '[D]ocument', _ = 'which_key_ignore' },
445+
['<leader>g'] = { name = '[G]it', _ = 'which_key_ignore' },
446+
['<leader>h'] = { name = 'More git', _ = 'which_key_ignore' },
447+
['<leader>r'] = { name = '[R]ename', _ = 'which_key_ignore' },
448+
['<leader>s'] = { name = '[S]earch', _ = 'which_key_ignore' },
449+
['<leader>w'] = { name = '[W]orkspace', _ = 'which_key_ignore' },
450+
})
451+
441452
-- Enable the following language servers
442453
-- Feel free to add/remove any LSPs that you want here. They will automatically be installed.
443454
--

0 commit comments

Comments
 (0)