lib/neovim-plugin: allow disabling installPackage

Some plugins may wish to handle package installation themselves.
This commit is contained in:
Matt Sturgeon 2024-07-06 12:32:54 +01:00
parent 04a255ed7e
commit 843fb302eb
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299

View file

@ -47,6 +47,7 @@ with lib;
extraPlugins ? [ ], extraPlugins ? [ ],
extraPackages ? [ ], extraPackages ? [ ],
callSetup ? true, callSetup ? true,
installPackage ? true,
}: }:
let let
namespace = if isColorscheme then "colorschemes" else "plugins"; namespace = if isColorscheme then "colorschemes" else "plugins";
@ -107,7 +108,7 @@ with lib;
in in
mkIf cfg.enable (mkMerge [ mkIf cfg.enable (mkMerge [
{ {
extraPlugins = [ cfg.package ] ++ extraPlugins; extraPlugins = (optional installPackage cfg.package) ++ extraPlugins;
inherit extraPackages; inherit extraPackages;
${extraConfigNamespace} = optionalString callSetup '' ${extraConfigNamespace} = optionalString callSetup ''