diff options
author | Damjan 9000 <damjan.9000@gmail.com> | 2024-07-17 10:47:54 +0200 |
---|---|---|
committer | Damjan 9000 <damjan.9000@gmail.com> | 2024-07-17 10:47:54 +0200 |
commit | 64597b0077e711f8ee4b9952d7b8a23b02e940e9 (patch) | |
tree | 9ad26bfcea9fc45f8ea0ddfa531d753ecfa13327 | |
parent | 01a18a193dfa1d5837faf0df669f1b06f4301f78 (diff) | |
parent | f5c919558b57afa7bdb921f4538c31ad9fcef9c2 (diff) |
Merge 'upstream' which-key v3 update
-rw-r--r-- | lua/kickstart/plugins/which-key.lua | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/lua/kickstart/plugins/which-key.lua b/lua/kickstart/plugins/which-key.lua index 54d7409..135dc62 100644 --- a/lua/kickstart/plugins/which-key.lua +++ b/lua/kickstart/plugins/which-key.lua @@ -21,19 +21,15 @@ return { require('which-key').setup() -- Document existing key chains - require('which-key').register { - ['<leader>c'] = { name = '[C]ode', _ = 'which_key_ignore' }, - ['<leader>d'] = { name = '[D]ocument', _ = 'which_key_ignore' }, - ['<leader>r'] = { name = '[R]ename', _ = 'which_key_ignore' }, - ['<leader>s'] = { name = '[S]earch', _ = 'which_key_ignore' }, - ['<leader>w'] = { name = '[W]orkspace', _ = 'which_key_ignore' }, - ['<leader>t'] = { name = '[T]oggle', _ = 'which_key_ignore' }, - ['<leader>h'] = { name = 'Git [H]unk', _ = 'which_key_ignore' }, + require('which-key').add { + { '<leader>c', group = '[C]ode' }, + { '<leader>d', group = '[D]ocument' }, + { '<leader>r', group = '[R]ename' }, + { '<leader>s', group = '[S]earch' }, + { '<leader>w', group = '[W]orkspace' }, + { '<leader>t', group = '[T]oggle' }, + { '<leader>h', group = 'Git [H]unk', mode = { 'n', 'v' } }, } - -- visual mode - require('which-key').register({ - ['<leader>h'] = { 'Git [H]unk' }, - }, { mode = 'v' }) end, }, } |