Skip to content

Commit

Permalink
switch to other hacky array-table syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
horriblename committed Jul 17, 2024
1 parent b5201df commit e9f2776
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions modules/wrapper/lazy/config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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"];
Expand Down

0 comments on commit e9f2776

Please sign in to comment.