mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-05-19 13:30:17 +00:00
treesitter: support usage of pkgs.tree-sitter-grammars
This commit is contained in:
parent
ee3f6a2ff6
commit
53e89665ce
4 changed files with 23 additions and 4 deletions
|
|
@ -33,6 +33,17 @@
|
|||
default = ["vimPlugins" "nvim-treesitter" "grammarPlugins" grammar];
|
||||
nullable = true;
|
||||
};
|
||||
|
||||
# Prefer using `mkGrammarOption` and only use this, for grammars,
|
||||
# not in `vimPlugins.nvim-treesitter.grammarPlugins`.
|
||||
# Grammars from `tree-sitter-grammars.tree-sitter-<name>` should mostly
|
||||
# just work, but should be tested extra, as we currently only use them
|
||||
# for a small subset of language modules.
|
||||
mkTreesitterGrammarOption = pkgs: grammar:
|
||||
mkPackageOption pkgs ["${grammar} treesitter"] {
|
||||
default = ["tree-sitter-grammars" "tree-sitter-${grammar}"];
|
||||
nullable = true;
|
||||
};
|
||||
in {
|
||||
inherit diagnostics diagnosticSubmodule mkGrammarOption;
|
||||
inherit diagnostics diagnosticSubmodule mkGrammarOption mkTreesitterGrammarOption;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue