This commit is contained in:
Isaac Shiells Thomas 2026-01-08 16:47:34 +08:00 committed by GitHub
commit 19ba36ec3c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 920 additions and 7 deletions

View file

@ -9,6 +9,6 @@
in {
inherit (typesDag) dagOf;
inherit (typesPlugin) pluginsOpt extraPluginType mkPluginSetupOption luaInline pluginType borderType;
inherit (typesLanguage) diagnostics mkGrammarOption;
inherit (typesLanguage) diagnostics mkGrammarOption mkEnableTreesitterOption;
inherit (customTypes) char hexColor mergelessListOf deprecatedSingleOrListOf;
}

View file

@ -1,7 +1,7 @@
{lib}: let
inherit (lib.options) mkOption mkPackageOption;
inherit (lib.attrsets) attrNames;
inherit (lib.types) listOf either enum submodule package;
inherit (lib.types) listOf either enum submodule package bool;
diagnosticSubmodule = _: {
options = {
@ -32,6 +32,13 @@
mkPackageOption pkgs ["${grammar} treesitter"] {
default = ["vimPlugins" "nvim-treesitter" "grammarPlugins" grammar];
};
mkEnableTreesitterOption = defaultCondition: language:
mkOption {
type = bool;
default = defaultCondition;
description = "Whether to enable ${language} treesitter";
};
in {
inherit diagnostics diagnosticSubmodule mkGrammarOption;
inherit diagnostics diagnosticSubmodule mkGrammarOption mkEnableTreesitterOption;
}