switch to other hacky array-table syntax

This commit is contained in:
Pei Yang Ching 2024-07-10 13:00:41 +02:00
parent 7aef3392fd
commit dee9fa0d61

View file

@ -3,18 +3,16 @@
config,
...
}: let
inherit (builtins) toJSON;
inherit (lib.modules) mkIf;
inherit (lib.attrsets) mapAttrsToList;
inherit (lib.generators) mkLuaInline;
inherit (lib.nvim.lua) toLuaObject;
inherit (lib.nvim.dag) entryAnywhere;
cfg = config.vim.lazy;
toLznSpec = name: plugin:
toLuaLznSpec = name: plugin:
(removeAttrs plugin ["package"])
// {__HACK = mkLuaInline "nil, [1] = ${toJSON name}";};
lznSpecs = mapAttrsToList toLznSpec cfg.plugins;
// {"@1" = name;};
lznSpecs = mapAttrsToList toLuaLznSpec cfg.plugins;
in {
config.vim = mkIf cfg.enable {
startPlugins = ["lz-n"];