This commit is contained in:
Chandler 2025-06-13 03:02:04 +00:00 committed by GitHub
commit 532be946f4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 11 additions and 11 deletions

View file

@ -30,7 +30,7 @@
mkGrammarOption = pkgs: grammar:
mkPackageOption pkgs ["${grammar} treesitter"] {
default = ["vimPlugins" "nvim-treesitter" "builtGrammars" grammar];
default = ["tree-sitter-grammars" grammar];
};
in {
inherit diagnostics diagnosticSubmodule mkGrammarOption;

View file

@ -21,7 +21,7 @@
pluginType = nullOr (
either
package
(enum (pluginInputNames ++ ["nvim-treesitter" "flutter-tools-patched" "vim-repeat"]))
(enum (pluginInputNames ++ ["tree-sitter-grammars" "flutter-tools-patched" "vim-repeat"]))
);
pluginsType = listOf pluginType;

View file

@ -164,7 +164,7 @@ in {
package = mkOption {
description = "Python treesitter grammar to use";
type = package;
default = pkgs.vimPlugins.nvim-treesitter.builtGrammars.python;
default = pkgs.tree-sitter-grammars.tree-sitter-python;
};
};

View file

@ -74,7 +74,7 @@ in {
package = mkOption {
description = "SQL treesitter grammar to use";
type = package;
default = pkgs.vimPlugins.nvim-treesitter.builtGrammars.sql;
default = pkgs.tree-sitter-grammars.tree-sitter-sql;
};
};

View file

@ -44,7 +44,7 @@ in {
treesitter = {
enable = mkEnableOption "Neorg treesitter" // {default = config.vim.languages.enableTreesitter;};
norgPackage = mkGrammarOption pkgs "norg";
norgPackage = mkGrammarOption pkgs "tree-sitter-norg";
};
};
}

View file

@ -25,14 +25,14 @@ in {
type = listOf package;
default = [];
example = literalExpression ''
pkgs.vimPlugins.nvim-treesitter.builtGrammars; [
regex
kdl
pkgs.tree-sitter-grammars; [
tree-sitter-regex
tree-sitter-kdl
];
'';
description = ''
List of treesitter grammars to install. For grammars to be installed properly,
you must use grammars from `pkgs.vimPlugins.nvim-treesitter.builtGrammars`.
you must use grammars from `pkgs.tree-sitter-grammars`.
For languages already supported by nvf, you may use
{option}`vim.language.<lang>.treesitter` options, which will automatically add
@ -55,7 +55,7 @@ in {
internal = true;
readOnly = true;
type = listOf package;
default = with pkgs.vimPlugins.nvim-treesitter.builtGrammars; [c lua vim vimdoc query];
default = with pkgs.tree-sitter-grammars; [tree-sitter-c tree-sitter-lua tree-sitter-vim];
description = ''
A list of treesitter grammars that will be installed by default
if treesitter has been enabled and {option}`vim.treeesitter.addDefaultGrammars`

View file

@ -12,7 +12,7 @@
cfg = config.vim.ui.noice;
tscfg = config.vim.treesitter;
defaultGrammars = with pkgs.vimPlugins.nvim-treesitter.builtGrammars; [vim regex lua bash markdown];
defaultGrammars = with pkgs.tree-sitter-grammars; [tree-sitter-vim tree-sitter-regex tree-sitter-lua tree-sitter-bash tree-sitter-markdown];
in {
config = mkIf cfg.enable {
vim = {