From be3637d94fc88c3a3b92f4bf2400ae7661df9907 Mon Sep 17 00:00:00 2001 From: Jint-lzxy <50296129+Jint-lzxy@users.noreply.github.com> Date: Fri, 19 Jul 2024 23:45:52 +0800 Subject: [PATCH] fix(which-key): config option `modes` has been deprecated MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is a follow-up fix for which-key's v3 rewrite. It simply restores the behaviors to match v2's default, so there shouldn't be any explicit changes. (Now the user can use which-key in visual/selection mode without the annoying box that distracts attention, which is superb 🥳) Signed-off-by: Jint-lzxy <50296129+Jint-lzxy@users.noreply.github.com> --- lua/modules/configs/tool/which-key.lua | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/lua/modules/configs/tool/which-key.lua b/lua/modules/configs/tool/which-key.lua index 721a5d6f3..e04e70117 100644 --- a/lua/modules/configs/tool/which-key.lua +++ b/lua/modules/configs/tool/which-key.lua @@ -9,14 +9,8 @@ return function() require("modules.utils").load_plugin("which-key", { preset = "classic", delay = vim.o.timeoutlen, - modes = { - n = true, - i = true, - x = false, - s = false, - o = false, - t = false, - c = false, + triggers = { + { "", mode = "nixso" }, }, plugins = { marks = true,