mirror of https://github.com/folke/lazy.nvim.git
Compare commits
2 Commits
2a21b18779
...
5c7629ae1b
Author | SHA1 | Date |
---|---|---|
devxpain | 5c7629ae1b | |
devxpain | 7d08321ab4 |
|
@ -24,7 +24,18 @@ local Util = require("lazy.core.util")
|
||||||
---@class LazyKeysHandler:LazyHandler
|
---@class LazyKeysHandler:LazyHandler
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
local skip = { mode = true, id = true, ft = true, rhs = true, lhs = true }
|
local valid = {
|
||||||
|
remap = true,
|
||||||
|
noremap = true,
|
||||||
|
buffer = true,
|
||||||
|
silent = true,
|
||||||
|
nowait = true,
|
||||||
|
expr = true,
|
||||||
|
unique = true,
|
||||||
|
script = true,
|
||||||
|
desc = true,
|
||||||
|
replace_keycodes = true,
|
||||||
|
}
|
||||||
|
|
||||||
---@param value string|LazyKeysSpec
|
---@param value string|LazyKeysSpec
|
||||||
---@param mode? string
|
---@param mode? string
|
||||||
|
@ -94,7 +105,7 @@ function M.opts(keys)
|
||||||
local opts = {} ---@type LazyKeysBase
|
local opts = {} ---@type LazyKeysBase
|
||||||
---@diagnostic disable-next-line: no-unknown
|
---@diagnostic disable-next-line: no-unknown
|
||||||
for k, v in pairs(keys) do
|
for k, v in pairs(keys) do
|
||||||
if type(k) ~= "number" and not skip[k] then
|
if type(k) ~= "number" and valid[k] then
|
||||||
---@diagnostic disable-next-line: no-unknown
|
---@diagnostic disable-next-line: no-unknown
|
||||||
opts[k] = v
|
opts[k] = v
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue