Skip to content

Commit cc74fb5

Browse files
committed
Upgrade to which-key spec v3
1 parent ef2a373 commit cc74fb5

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

init.lua

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -302,17 +302,23 @@ require('lazy').setup {
302302

303303
{ -- Useful plugin to show you pending keybinds.
304304
'folke/which-key.nvim',
305+
dependencies = { 'nvim-tree/nvim-web-devicons'},
305306
event = 'VimEnter', -- Sets the loading event to 'VimEnter'
306307
config = function() -- This is the function that runs, AFTER loading
307308
require('which-key').setup()
308309

309310
-- Document existing key chains
310-
require('which-key').register {
311-
['<leader>c'] = { name = '[C]ode', _ = 'which_key_ignore' },
312-
['<leader>d'] = { name = '[D]ocument', _ = 'which_key_ignore' },
313-
['<leader>r'] = { name = '[R]ename', _ = 'which_key_ignore' },
314-
['<leader>s'] = { name = '[S]earch', _ = 'which_key_ignore' },
315-
['<leader>w'] = { name = '[W]orkspace', _ = 'which_key_ignore' },
311+
require('which-key').add {
312+
{ '<leader>c', group = '[C]ode'},
313+
{ '<leader>c_', hidden = true },
314+
{ '<leader>d', group = '[D]ocument'},
315+
{ '<leader>d_', hidden = true },
316+
{ '<leader>r', group = '[R]ename'},
317+
{ '<leader>r_', hidden = true },
318+
{ '<leader>s', group = '[S]earch'},
319+
{ '<leader>s_', hidden = true },
320+
{ '<leader>w', group = '[W]orkspace'},
321+
{ '<leader>w_', hidden = true },
316322
}
317323
end,
318324
},

0 commit comments

Comments
 (0)