From f5c5ea921199094be3fcf24dfe4ac39b4ffbaf1f Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Tue, 6 Jan 2026 14:47:42 +0300 Subject: [PATCH 1/4] wrapper/build: force installQueries for all grammars Signed-off-by: NotAShelf Change-Id: I73ca575e1ede9972d3658eb89242023a6a6a6964 --- modules/wrapper/build/config.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/wrapper/build/config.nix b/modules/wrapper/build/config.nix index 68b2c00d..75ae60eb 100644 --- a/modules/wrapper/build/config.nix +++ b/modules/wrapper/build/config.nix @@ -35,7 +35,11 @@ ); # Build a given Treesitter grammar. - buildTreesitterPlug = grammars: vimPlugins.nvim-treesitter.withPlugins (_: grammars); + buildTreesitterPlug = grammars: + vimPlugins.nvim-treesitter.withPlugins (_: grammars) + // { + installQueries = true; + }; pluginBuilders = { nvim-treesitter = buildTreesitterPlug config.vim.treesitter.grammars; From 4604bcd984384c92d761a9f813f8396e37c8bd78 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Tue, 6 Jan 2026 14:50:53 +0300 Subject: [PATCH 2/4] plugins/treesitter: clean up module comments Signed-off-by: NotAShelf Change-Id: I6c229cfb1bd1157a8130d456679e69fa6a6a6964 --- modules/plugins/treesitter/config.nix | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/modules/plugins/treesitter/config.nix b/modules/plugins/treesitter/config.nix index d10e1e89..dd7888b6 100644 --- a/modules/plugins/treesitter/config.nix +++ b/modules/plugins/treesitter/config.nix @@ -39,7 +39,8 @@ in { ]; }; - # For some reason treesitter highlighting does not work on start if this is set before syntax on + # For some reason treesitter highlighting does not work on start if this + # is set before 'syntax on' or similar. pluginRC.treesitter-fold = mkIf cfg.fold (entryBefore ["basic"] '' -- This is required by treesitter-context to handle folds vim.o.foldmethod = "expr" @@ -54,8 +55,8 @@ in { pluginRC.treesitter = entryAfter ["basic"] '' require('nvim-treesitter.config').setup { -- Disable imperative treesitter options that would attempt to fetch - -- grammars into the read-only Nix store. To add additional grammars here - -- you must use the `config.vim.treesitter.grammars` option. + -- grammars into the read-only Nix store. To add additional grammars + -- here, you must use the `config.vim.treesitter.grammars` option. auto_install = false, sync_install = false, ensure_installed = {}, @@ -74,9 +75,8 @@ in { }, -- Indentation module for Treesitter - -- Keymaps are set to false here as they are - -- handled by `vim.maps` entries calling lua - -- functions achieving the same functionality. + -- Keymaps are set to false here as they are handled by `vim.maps` + -- entries calling Lua functions achieving the same functionality. incremental_selection = { enable = ${toLuaObject cfg.incrementalSelection.enable}, disable = ${toLuaObject cfg.incrementalSelection.disable}, @@ -85,7 +85,6 @@ in { node_incremental = false, scope_incremental = false, node_decremental = false, - }, }, } From b75bd3b8a8f4eddb64f711be9e75ed18eaa9e499 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Tue, 6 Jan 2026 15:10:18 +0300 Subject: [PATCH 3/4] pins: switch to main branch for nvim-treesitter-textobjects Signed-off-by: NotAShelf Change-Id: Idfe208e4a09113b215fd263234e1dc686a6a6964 --- npins/sources.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/npins/sources.json b/npins/sources.json index a9df47b7..f7009ef6 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -2062,11 +2062,11 @@ "owner": "nvim-treesitter", "repo": "nvim-treesitter-textobjects" }, - "branch": "master", + "branch": "main", "submodules": false, - "revision": "71385f191ec06ffc60e80e6b0c9a9d5daed4824c", - "url": "https://github.com/nvim-treesitter/nvim-treesitter-textobjects/archive/71385f191ec06ffc60e80e6b0c9a9d5daed4824c.tar.gz", - "hash": "0pp8s0wljwhc93jp47ad4pigqm8q7v173374c1vpydhx09qwl4ga" + "revision": "28a3494c075ef0f353314f627546537e43c09592", + "url": "https://github.com/nvim-treesitter/nvim-treesitter-textobjects/archive/28a3494c075ef0f353314f627546537e43c09592.tar.gz", + "hash": "1ky29nw4ayzpvbh4y0jp7apdfwj6pd8wvnx5gsw2z6rxdl0qhmz5" }, "nvim-ts-autotag": { "type": "Git", From 8692d195c4f7866b7552b38fc9bcb413fc348445 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Tue, 6 Jan 2026 15:13:11 +0300 Subject: [PATCH 4/4] treewide: revert back to builtGrammars from grammarPlugins Signed-off-by: NotAShelf Change-Id: I5c24036a40ec6f2cc8bd85a1cc8e2db06a6a6964 --- lib/types/languages.nix | 2 +- modules/plugins/languages/python.nix | 2 +- modules/plugins/languages/sql.nix | 2 +- modules/plugins/treesitter/treesitter.nix | 6 +++--- modules/plugins/ui/noice/config.nix | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/types/languages.nix b/lib/types/languages.nix index 45515f55..b1865c41 100644 --- a/lib/types/languages.nix +++ b/lib/types/languages.nix @@ -30,7 +30,7 @@ mkGrammarOption = pkgs: grammar: mkPackageOption pkgs ["${grammar} treesitter"] { - default = ["vimPlugins" "nvim-treesitter" "grammarPlugins" grammar]; + default = ["vimPlugins" "nvim-treesitter" "builtGrammars" grammar]; }; in { inherit diagnostics diagnosticSubmodule mkGrammarOption; diff --git a/modules/plugins/languages/python.nix b/modules/plugins/languages/python.nix index 9cfb82f6..b1cbe224 100644 --- a/modules/plugins/languages/python.nix +++ b/modules/plugins/languages/python.nix @@ -228,7 +228,7 @@ in { package = mkOption { description = "Python treesitter grammar to use"; type = package; - default = pkgs.vimPlugins.nvim-treesitter.grammarPlugins.python; + default = pkgs.vimPlugins.nvim-treesitter.builtGrammars.python; }; }; diff --git a/modules/plugins/languages/sql.nix b/modules/plugins/languages/sql.nix index e5787e43..e3e686ec 100644 --- a/modules/plugins/languages/sql.nix +++ b/modules/plugins/languages/sql.nix @@ -66,7 +66,7 @@ in { package = mkOption { type = package; - default = pkgs.vimPlugins.nvim-treesitter.grammarPlugins.sql; + default = pkgs.vimPlugins.nvim-treesitter.builtGrammars.sql; description = "SQL treesitter grammar to use"; }; }; diff --git a/modules/plugins/treesitter/treesitter.nix b/modules/plugins/treesitter/treesitter.nix index cf1c5375..d761d6b3 100644 --- a/modules/plugins/treesitter/treesitter.nix +++ b/modules/plugins/treesitter/treesitter.nix @@ -25,14 +25,14 @@ in { type = listOf package; default = []; example = literalExpression '' - with pkgs.vimPlugins.nvim-treesitter.grammarPlugins; [ + with pkgs.vimPlugins.nvim-treesitter.builtGrammars; [ regex kdl ]; ''; description = '' List of treesitter grammars to install. For grammars to be installed properly, - you must use grammars from `pkgs.vimPlugins.nvim-treesitter.grammarPlugins`. + you must use grammars from `pkgs.vimPlugins.nvim-treesitter.builtGrammars`. You can use `pkgs.vimPlugins.nvim-treesitter.allGrammars` to install all grammars. For languages already supported by nvf, you may use @@ -56,7 +56,7 @@ in { internal = true; readOnly = true; type = listOf package; - default = with pkgs.vimPlugins.nvim-treesitter.grammarPlugins; [c lua vim vimdoc query]; + default = with pkgs.vimPlugins.nvim-treesitter.builtGrammars; [c lua vim vimdoc query]; description = '' A list of treesitter grammars that will be installed by default if treesitter has been enabled and {option}`vim.treeesitter.addDefaultGrammars` diff --git a/modules/plugins/ui/noice/config.nix b/modules/plugins/ui/noice/config.nix index 1f81f4a9..fe82f588 100644 --- a/modules/plugins/ui/noice/config.nix +++ b/modules/plugins/ui/noice/config.nix @@ -12,7 +12,7 @@ cfg = config.vim.ui.noice; tscfg = config.vim.treesitter; - defaultGrammars = with pkgs.vimPlugins.nvim-treesitter.grammarPlugins; [vim regex lua bash markdown]; + defaultGrammars = with pkgs.vimPlugins.nvim-treesitter.builtGrammars; [vim regex lua bash markdown]; in { config = mkIf cfg.enable { vim = {