mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-11-10 15:35:30 +00:00
Created mkEnableTreesitterOption in the extendend library
This commit is contained in:
parent
fe84f0e56f
commit
0b85f56868
3 changed files with 17 additions and 8 deletions
|
|
@ -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" "builtGrammars" grammar];
|
||||
};
|
||||
|
||||
mkEnableTreesitterOption = config: language:
|
||||
mkOption {
|
||||
type = bool;
|
||||
default = config.vim.languages.enableTreesitter;
|
||||
description = "Whether to enable ${language} treesitter";
|
||||
};
|
||||
in {
|
||||
inherit diagnostics diagnosticSubmodule mkGrammarOption;
|
||||
inherit diagnostics diagnosticSubmodule mkGrammarOption mkEnableTreesitterOption;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue