feat: single-plugin keys in the lazy view in visual mode (#1476)

Applies to all plugins contained in the range
This commit is contained in:
Anshuman Medhi 2024-05-26 16:40:08 +08:00 committed by GitHub
commit 7667a73dee
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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,