1
0
Fork 0
mirror of https://github.com/nix-community/nixvim.git synced 2025-11-08 19:46:06 +01:00

modules/lsp: select relevant fields in keymaps table

We only use `mode`, `key`, `action`, and `options`; so explicitly
inherit those.

This means we don't serialise attrs that aren't needed at runtime,
such as `lspBufAction`.
This commit is contained in:
Matt Sturgeon 2025-09-30 14:19:18 +01:00
parent f421af99fe
commit cb3653a1a8
2 changed files with 14 additions and 6 deletions

View file

@ -105,10 +105,20 @@ in
callback = lib.nixvim.mkRaw ''
function(args)
local __keymaps = ${
lib.nixvim.lua.toLua' {
multiline = true;
indent = " ";
} cfg.keymaps
lib.pipe cfg.keymaps [
(map (keymap: {
inherit (keymap)
mode
key
action
options
;
}))
(lib.nixvim.lua.toLua' {
multiline = true;
indent = " ";
})
]
}
for _, keymap in ipairs(__keymaps) do