mirror of
https://github.com/nix-community/nixvim.git
synced 2025-08-07 03:15:18 +02:00
lib/plugins/mk{Neovim,Vim}Plugin: add dependencies parameter
This commit is contained in:
parent
89c94d9ea7
commit
b66559d8ef
4 changed files with 24 additions and 0 deletions
|
@ -111,4 +111,18 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
|
||||
enableDependencies = depsToEnable: {
|
||||
dependencies =
|
||||
let
|
||||
enableDepConditionally = dep: {
|
||||
name = dep.name or dep;
|
||||
value.enable = lib.mkIf (dep.enable or true) (lib.mkDefault true);
|
||||
};
|
||||
in
|
||||
lib.pipe depsToEnable [
|
||||
(builtins.map enableDepConditionally)
|
||||
lib.listToAttrs
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue