This commit is contained in:
devxpain 2024-11-10 08:01:43 +01:00 committed by GitHub
commit 2a21b18779
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 13 additions and 2 deletions

View File

@ -24,7 +24,18 @@ local Util = require("lazy.core.util")
---@class LazyKeysHandler:LazyHandler
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 mode? string
@ -94,7 +105,7 @@ function M.opts(keys)
local opts = {} ---@type LazyKeysBase
---@diagnostic disable-next-line: no-unknown
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
opts[k] = v
end