mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-26 15:06:45 +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;};
|
||||
in {
|
||||
inherit (typesDag) dagOf;
|
||||
inherit (typesPlugin) pluginsOpt;
|
||||
inherit (typesPlugin) pluginsOpt extraPluginType;
|
||||
inherit (typesLanguage) diagnostics mkGrammarOption;
|
||||
}
|
||||
|
|
|
@ -97,7 +97,26 @@ with lib; let
|
|||
package
|
||||
)
|
||||
);
|
||||
|
||||
extraPluginType = with types;
|
||||
submodule {
|
||||
options = {
|
||||
package = mkOption {
|
||||
type = pluginsType;
|
||||
};
|
||||
dependencies = mkOption {
|
||||
type = listOf str;
|
||||
default = [];
|
||||
};
|
||||
setup = mkOption {
|
||||
type = lines;
|
||||
default = "";
|
||||
};
|
||||
};
|
||||
};
|
||||
in {
|
||||
inherit extraPluginType;
|
||||
|
||||
pluginsOpt = {
|
||||
description,
|
||||
default ? [],
|
||||
|
|
|
@ -158,6 +158,11 @@ in {
|
|||
description = "List of plugins to optionally load";
|
||||
};
|
||||
|
||||
extraPlugins = mkOption {
|
||||
type = types.attrsOf nvim.types.extraPluginType;
|
||||
default = {};
|
||||
};
|
||||
|
||||
globals = mkOption {
|
||||
default = {};
|
||||
description = "Set containing global variable values";
|
||||
|
|
Loading…
Reference in a new issue