mirror of
https://github.com/ViViDboarder/vim-settings.git
synced 2024-11-01 10:16:28 +00:00
Force loading of which-key when trying to do a keymap
This commit is contained in:
parent
e6cdf2a0bf
commit
29e936904d
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user