mirror of https://github.com/folke/lazy.nvim.git
fix(keys): never lazy-load `<nop>` or empty rhs keymaps
This commit is contained in:
parent
0fc34a0cf5
commit
3e4c795cec
|
@ -109,6 +109,10 @@ function M:_add(keys)
|
||||||
|
|
||||||
---@param buf? number
|
---@param buf? number
|
||||||
local function add(buf)
|
local function add(buf)
|
||||||
|
if type(keys.rhs) == "string" and (keys.rhs == "" or keys.rhs:lower() == "<nop>") then
|
||||||
|
return self:_set(keys, buf)
|
||||||
|
end
|
||||||
|
|
||||||
vim.keymap.set(keys.mode, lhs, function()
|
vim.keymap.set(keys.mode, lhs, function()
|
||||||
local plugins = self.active[keys.id]
|
local plugins = self.active[keys.id]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue