mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-30 12:24:28 +02:00
helpers/vim-plugin/mkVimPlugin: add extraConfig option
This commit is contained in:
parent
4edd01d614
commit
6dd2eed613
1 changed files with 14 additions and 6 deletions
|
@ -18,6 +18,7 @@ with lib; {
|
||||||
addExtraConfigRenameWarning ? false,
|
addExtraConfigRenameWarning ? false,
|
||||||
extraOptions ? {},
|
extraOptions ? {},
|
||||||
# config
|
# config
|
||||||
|
extraConfig ? cfg: {},
|
||||||
extraPlugins ? [],
|
extraPlugins ? [],
|
||||||
extraPackages ? [],
|
extraPackages ? [],
|
||||||
}: let
|
}: let
|
||||||
|
@ -98,12 +99,19 @@ with lib; {
|
||||||
["plugins" name "settings"]
|
["plugins" name "settings"]
|
||||||
);
|
);
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config =
|
||||||
inherit extraPackages;
|
mkIf cfg.enable
|
||||||
globals = mapAttrs' (n: nameValuePair (globalPrefix + n)) globals;
|
(
|
||||||
# does this evaluate package? it would not be desired to evaluate pacakge if we use another package.
|
mkMerge [
|
||||||
extraPlugins = extraPlugins ++ optional (package != null) cfg.package;
|
{
|
||||||
};
|
inherit extraPackages;
|
||||||
|
globals = mapAttrs' (n: nameValuePair (globalPrefix + n)) globals;
|
||||||
|
# does this evaluate package? it would not be desired to evaluate pacakge if we use another package.
|
||||||
|
extraPlugins = extraPlugins ++ optional (package != null) cfg.package;
|
||||||
|
}
|
||||||
|
(extraConfig cfg)
|
||||||
|
]
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
mkDefaultOpt = {
|
mkDefaultOpt = {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue