lib/plugins/mk{Neovim,Vim}Plugin: add dependencies parameter

This commit is contained in:
Gaetan Lepage 2025-04-27 09:13:33 +02:00
parent 89c94d9ea7
commit b66559d8ef
4 changed files with 24 additions and 0 deletions

View file

@ -27,6 +27,8 @@
# - An option will be used as-is, but should be built using `lib.mkPackageOption`
# Defaults to `name`, i.e. `pkgs.vimPlugins.${name}`
package ? name,
# Which dependencies to enable by default
dependencies ? [ ],
settingsOptions ? { },
settingsExample ? null,
settingsDescription ? "Options provided to the `require('${moduleName}')${setup}` function.",
@ -105,6 +107,8 @@ let
}
))
(lib.nixvim.plugins.utils.enableDependencies dependencies)
# When lazy loading is enabled for this plugin, route its configuration to the enabled provider
(lib.mkIf cfg.lazyLoad.enable {
assertions = [