plugins: use mk{Neovim,Vim}Plugin's dependencies parameter

This commit is contained in:
Gaetan Lepage 2025-04-27 09:53:12 +02:00
parent b66559d8ef
commit 1a64636839
49 changed files with 147 additions and 207 deletions

View file

@ -84,6 +84,14 @@ lib.nixvim.plugins.mkNeovimPlugin {
"mappings"
];
dependencies = [
"git"
{
name = "which";
enable = hasInfix "which" (config.plugins.neogit.settings.commit_view.verify_commit.__raw or "");
}
];
settingsOptions = import ./settings-options.nix { inherit lib helpers; };
settingsExample = {
@ -132,15 +140,5 @@ lib.nixvim.plugins.mkNeovimPlugin {
"fzf-lua"
]
);
dependencies = {
git.enable = lib.mkDefault true;
which.enable =
let
autoInstallWhich = hasInfix "which" (cfg.settings.commit_view.verify_commit.__raw or "");
in
lib.mkIf autoInstallWhich (lib.mkDefault true);
};
};
}