feat: single-plugin keys in the lazy view in visual mode

Applies to all plugins contained in the range
This commit is contained in:
Anshuman 2024-05-25 22:54:48 +08:00
commit b568df3657
2 changed files with 17 additions and 6 deletions

View file

@ -251,8 +251,9 @@ end
---@param key string
---@param fn fun(self?)
---@param desc? string
function M:on_key(key, fn, desc)
vim.keymap.set("n", key, function()
---@param mode? string[]
function M:on_key(key, fn, desc,mode)
vim.keymap.set(mode or "n", key, function()
fn(self)
end, {
nowait = true,