mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-29 20:04: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,
|
||||
extraOptions ? {},
|
||||
# config
|
||||
extraConfig ? cfg: {},
|
||||
extraPlugins ? [],
|
||||
extraPackages ? [],
|
||||
}: let
|
||||
|
@ -98,12 +99,19 @@ with lib; {
|
|||
["plugins" name "settings"]
|
||||
);
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
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;
|
||||
};
|
||||
config =
|
||||
mkIf cfg.enable
|
||||
(
|
||||
mkMerge [
|
||||
{
|
||||
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 = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue