From 676582e593aad73050a3702fd8e4727896498a07 Mon Sep 17 00:00:00 2001 From: Vladislav Grechannik <52157081+VlaDexa@users.noreply.github.com> Date: Tue, 16 Jul 2024 18:05:40 +0200 Subject: [PATCH] which-key v3 update (#1022) * which-key v3 update * remove unneeded brackets from which-key registration --- init.lua | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/init.lua b/init.lua index 12d372f8bcf..c0f72b4e6a5 100644 --- a/init.lua +++ b/init.lua @@ -277,26 +277,15 @@ require('lazy').setup({ require('which-key').setup() -- Document existing key chains - require('which-key').register { + require('which-key').add { { 'c', group = '[C]ode' }, - { 'c_', hidden = true }, { 'd', group = '[D]ocument' }, - { 'd_', hidden = true }, - { 'h', group = 'Git [H]unk' }, - { 'h_', hidden = true }, { 'r', group = '[R]ename' }, - { 'r_', hidden = true }, { 's', group = '[S]earch' }, - { 's_', hidden = true }, - { 't', group = '[T]oggle' }, - { 't_', hidden = true }, { 'w', group = '[W]orkspace' }, - { 'w_', hidden = true }, + { 't', group = '[T]oggle' }, + { 'h', group = 'Git [H]unk', mode = { 'n', 'v' } }, } - -- visual mode - require('which-key').register({ - { 'h', desc = 'Git [H]unk', mode = 'v' }, - }, { mode = 'v' }) end, },