From 29e936904de0a1c8ff607244ab9dcfc6e4ca490c Mon Sep 17 00:00:00 2001 From: ViViDboarder Date: Mon, 28 Oct 2024 15:44:02 -0700 Subject: [PATCH] Force loading of which-key when trying to do a keymap --- neovim/lua/utils.lua | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/neovim/lua/utils.lua b/neovim/lua/utils.lua index 4630c1f..2f5f0ff 100644 --- a/neovim/lua/utils.lua +++ b/neovim/lua/utils.lua @@ -165,13 +165,11 @@ function M.curry_keymap(mode, prefix, default_opts) default_opts = vim.tbl_extend("keep", default_opts or {}, { noremap = true, silent = true }) local group_desc = M.tbl_pop(default_opts, "group_desc") if group_desc ~= nil then - if M.is_plugin_loaded("which-key") then - M.try_require("which-key", function(wk) - wk.register({ - [prefix] = "+" .. group_desc, - }, default_opts) - end) - end + M.try_require("which-key", function(wk) + wk.register({ + [prefix] = "+" .. group_desc, + }, default_opts) + end) end return function(lhs, rhs, opts)