From e75c0077b691327fb8d4aab45201e93489f20338 Mon Sep 17 00:00:00 2001 From: Thomas Ruoff Date: Thu, 1 Aug 2024 15:37:11 +0200 Subject: [PATCH] update which-key config --- lua/plugins/common.lua | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/lua/plugins/common.lua b/lua/plugins/common.lua index 1f9f0db..b8863e1 100644 --- a/lua/plugins/common.lua +++ b/lua/plugins/common.lua @@ -33,17 +33,16 @@ return { }, { 'folke/which-key.nvim', - event = 'VimEnter', - config = function() - require('which-key').setup() - - require('which-key').register { - ['c'] = { name = '[C]ode', _ = 'which_key_ignore' }, - ['d'] = { name = '[D]ocument', _ = 'which_key_ignore' }, - ['r'] = { name = '[R]ename', _ = 'which_key_ignore' }, - ['f'] = { name = '[F]ind', _ = 'which_key_ignore' }, - ['w'] = { name = '[W]orkspace', _ = 'which_key_ignore' }, - } - end, + event = 'VeryLazy', + opts = {}, + keys = { + { + '?', + function() + require('which-key').show { global = false } + end, + desc = 'Buffer Local Keymaps (which-key)', + }, + }, }, }