From 072f7599ae68bd3c75eb36f8f23da79829f660b9 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Fri, 4 Apr 2025 16:45:05 +0300 Subject: [PATCH] treesitter: mention builtGrammars in grammars option --- modules/plugins/treesitter/treesitter.nix | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/modules/plugins/treesitter/treesitter.nix b/modules/plugins/treesitter/treesitter.nix index 322d2eb0..d88cc1a9 100644 --- a/modules/plugins/treesitter/treesitter.nix +++ b/modules/plugins/treesitter/treesitter.nix @@ -24,12 +24,19 @@ in { grammars = mkOption { type = listOf package; default = []; + example = literalExpression '' + pkgs.vimPlugins.nvim-treesitter.builtGrammars; [ + regex + kdl + ]; + ''; description = '' - List of treesitter grammars to install. + List of treesitter grammars to install. For grammars to be installed properly, + you must use grammars from `pkgs.vimPlugins.nvim-treesitter.builtGrammars`. - For languages already supported by nvf, you may - use the {option}`vim.language..treesitter` options, which - will automatically add the required grammars to this. + For languages already supported by nvf, you may use + {option}`vim.language..treesitter` options, which will automatically add + the required grammars to this. ''; };