Skip to content

Commit 0277464

Browse files
committed
fix(config): proper checking for the keybinds configuration table correctness, see #306
1 parent ce8f64d commit 0277464

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lua/rest-nvim/config/check.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,10 @@ function check.get_unrecognized_keys(tbl, default_tbl)
9191
if type(default_tbl[k]) == "table" and tbl[k] then
9292
for _, subk in pairs(check.get_unrecognized_keys(tbl[k], default_tbl[k])) do
9393
local key = k .. "." .. subk
94-
ret[key] = key
94+
-- Keybinds configuration table requires a special treatment as it does not have a "static" syntax
95+
if k ~= "keybinds" or k == "keybinds" and type(subk) ~= "number" then
96+
ret[key] = key
97+
end
9598
end
9699
end
97100
end

0 commit comments

Comments
 (0)