mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-30 00:26:45 +00:00
lz.n: process key maps
This commit is contained in:
parent
f683cd36e0
commit
5eadc2937d
1 changed files with 17 additions and 1 deletions
|
@ -12,8 +12,23 @@
|
||||||
inherit (lib.nvim.dag) entryAnywhere;
|
inherit (lib.nvim.dag) entryAnywhere;
|
||||||
cfg = config.vim.lazy;
|
cfg = config.vim.lazy;
|
||||||
|
|
||||||
|
toLuzLznKeySpec = {
|
||||||
|
desc,
|
||||||
|
noremap,
|
||||||
|
expr,
|
||||||
|
nowait,
|
||||||
|
ft,
|
||||||
|
lhs,
|
||||||
|
rhs,
|
||||||
|
mode,
|
||||||
|
}: {
|
||||||
|
"@1" = lhs;
|
||||||
|
"@2" = rhs;
|
||||||
|
inherit desc noremap expr nowait ft mode;
|
||||||
|
};
|
||||||
|
|
||||||
toLuaLznSpec = name: spec:
|
toLuaLznSpec = name: spec:
|
||||||
(removeAttrs spec ["package" "setupModule" "setupOpts"])
|
(removeAttrs spec ["package" "setupModule" "setupOpts" "keys"])
|
||||||
// {
|
// {
|
||||||
"@1" = name;
|
"@1" = name;
|
||||||
after = mkLuaInline ''
|
after = mkLuaInline ''
|
||||||
|
@ -25,6 +40,7 @@
|
||||||
${optionalString (spec.after != null) spec.after}
|
${optionalString (spec.after != null) spec.after}
|
||||||
end
|
end
|
||||||
'';
|
'';
|
||||||
|
keys = map toLuzLznKeySpec spec.keys;
|
||||||
};
|
};
|
||||||
lznSpecs = mapAttrsToList toLuaLznSpec cfg.plugins;
|
lznSpecs = mapAttrsToList toLuaLznSpec cfg.plugins;
|
||||||
in {
|
in {
|
||||||
|
|
Loading…
Reference in a new issue