mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-02 03:21:14 +00:00
dev: custom type for extraPlugin module
This commit is contained in:
parent
eaab87d151
commit
2319ee082c
3 changed files with 25 additions and 1 deletions
|
@ -4,6 +4,6 @@
|
||||||
typesLanguage = import ./languages.nix {inherit lib;};
|
typesLanguage = import ./languages.nix {inherit lib;};
|
||||||
in {
|
in {
|
||||||
inherit (typesDag) dagOf;
|
inherit (typesDag) dagOf;
|
||||||
inherit (typesPlugin) pluginsOpt;
|
inherit (typesPlugin) pluginsOpt extraPluginType;
|
||||||
inherit (typesLanguage) diagnostics mkGrammarOption;
|
inherit (typesLanguage) diagnostics mkGrammarOption;
|
||||||
}
|
}
|
||||||
|
|
|
@ -97,7 +97,26 @@ with lib; let
|
||||||
package
|
package
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
extraPluginType = with types;
|
||||||
|
submodule {
|
||||||
|
options = {
|
||||||
|
package = mkOption {
|
||||||
|
type = pluginsType;
|
||||||
|
};
|
||||||
|
dependencies = mkOption {
|
||||||
|
type = listOf str;
|
||||||
|
default = [];
|
||||||
|
};
|
||||||
|
setup = mkOption {
|
||||||
|
type = lines;
|
||||||
|
default = "";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
in {
|
in {
|
||||||
|
inherit extraPluginType;
|
||||||
|
|
||||||
pluginsOpt = {
|
pluginsOpt = {
|
||||||
description,
|
description,
|
||||||
default ? [],
|
default ? [],
|
||||||
|
|
|
@ -158,6 +158,11 @@ in {
|
||||||
description = "List of plugins to optionally load";
|
description = "List of plugins to optionally load";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extraPlugins = mkOption {
|
||||||
|
type = types.attrsOf nvim.types.extraPluginType;
|
||||||
|
default = {};
|
||||||
|
};
|
||||||
|
|
||||||
globals = mkOption {
|
globals = mkOption {
|
||||||
default = {};
|
default = {};
|
||||||
description = "Set containing global variable values";
|
description = "Set containing global variable values";
|
||||||
|
|
Loading…
Reference in a new issue