Skip to content

Commit

Permalink
which-key v3 update (nvim-lua#1022)
Browse files Browse the repository at this point in the history
* which-key v3 update

* remove unneeded brackets from which-key registration
  • Loading branch information
VlaDexa authored and andreiblt1304 committed Jul 17, 2024
1 parent 5ffef98 commit 676582e
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -277,26 +277,15 @@ require('lazy').setup({
require('which-key').setup()

-- Document existing key chains
require('which-key').register {
require('which-key').add {
{ '<leader>c', group = '[C]ode' },
{ '<leader>c_', hidden = true },
{ '<leader>d', group = '[D]ocument' },
{ '<leader>d_', hidden = true },
{ '<leader>h', group = 'Git [H]unk' },
{ '<leader>h_', hidden = true },
{ '<leader>r', group = '[R]ename' },
{ '<leader>r_', hidden = true },
{ '<leader>s', group = '[S]earch' },
{ '<leader>s_', hidden = true },
{ '<leader>t', group = '[T]oggle' },
{ '<leader>t_', hidden = true },
{ '<leader>w', group = '[W]orkspace' },
{ '<leader>w_', hidden = true },
{ '<leader>t', group = '[T]oggle' },
{ '<leader>h', group = 'Git [H]unk', mode = { 'n', 'v' } },
}
-- visual mode
require('which-key').register({
{ '<leader>h', desc = 'Git [H]unk', mode = 'v' },
}, { mode = 'v' })
end,
},

Expand Down

0 comments on commit 676582e

Please sign in to comment.