dev: custom type for extraPlugin module

This commit is contained in:
NotAShelf 2023-07-18 22:21:36 +03:00 committed by Ching Pei Yang
parent eaab87d151
commit 2319ee082c
3 changed files with 25 additions and 1 deletions

View file

@ -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;
}

View file

@ -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 ? [],

View file

@ -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";