From 11933c553863a19739f6249447aac136cd206698 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Thu, 12 Mar 2026 10:15:13 +0300 Subject: [PATCH 1/2] lib/languages: set `nullable` inside `mkGrammarOption` Signed-off-by: NotAShelf Change-Id: I4df9d1d28b342efa02198ebd1ea2114d6a6a6964 --- lib/types/languages.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/types/languages.nix b/lib/types/languages.nix index 45515f55..23a08890 100644 --- a/lib/types/languages.nix +++ b/lib/types/languages.nix @@ -31,6 +31,7 @@ mkGrammarOption = pkgs: grammar: mkPackageOption pkgs ["${grammar} treesitter"] { default = ["vimPlugins" "nvim-treesitter" "grammarPlugins" grammar]; + nullable = true; }; in { inherit diagnostics diagnosticSubmodule mkGrammarOption; From f298adc1933a7c59475a27f0c5685ad206624e91 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Thu, 12 Mar 2026 10:49:19 +0300 Subject: [PATCH 2/2] wrapper/build: allow nulling treesitter grammars Signed-off-by: NotAShelf Change-Id: Iafdfb65fbaf24b7fa95c99a6bc4fa9176a6a6964 --- docs/manual/release-notes/rl-0.9.md | 3 +++ modules/wrapper/build/config.nix | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/manual/release-notes/rl-0.9.md b/docs/manual/release-notes/rl-0.9.md index a7d44024..03f98e64 100644 --- a/docs/manual/release-notes/rl-0.9.md +++ b/docs/manual/release-notes/rl-0.9.md @@ -6,6 +6,7 @@ `vimPlugins.nvim-treesitter`. Namely, it changes from the frozen `master` branch to the new main branch. This change removes incremental selections, so it is no longer available. + - [obsidian.nvim] now uses a maintained fork which has removed the `dir` setting. Use `workspaces` instead: @@ -78,6 +79,8 @@ [NotAShelf](https://github.com/notashelf): - Lazyload noice.nvim and nvim-web-devicons on `DeferredUIEnter` +- Allow nulling treesitter packages for various language modules, filter `null` + values in `vim.treesitter.grammars`. [jfeo](https://github.com/jfeo): diff --git a/modules/wrapper/build/config.nix b/modules/wrapper/build/config.nix index dc4bebe5..ba25552c 100644 --- a/modules/wrapper/build/config.nix +++ b/modules/wrapper/build/config.nix @@ -24,7 +24,10 @@ ); # Build a given Treesitter grammar. - buildTreesitterPlug = grammars: vimPlugins.nvim-treesitter.withPlugins (_: grammars); + buildTreesitterPlug = grammars: + vimPlugins.nvim-treesitter.withPlugins ( + _: builtins.filter (g: g != null) grammars + ); pluginBuilders = { nvim-treesitter = buildTreesitterPlug config.vim.treesitter.grammars;