Merge pull request #1446 from NotAShelf/notashelf/push-pkmkotukopkx
Some checks failed
Set up binary cache / cachix (default) (push) Has been cancelled
Set up binary cache / cachix (maximal) (push) Has been cancelled
Set up binary cache / cachix (nix) (push) Has been cancelled
Treewide Checks / Validate flake (push) Has been cancelled
Treewide Checks / Check formatting (push) Has been cancelled
Treewide Checks / Check source tree for typos (push) Has been cancelled
Treewide Checks / Validate documentation builds (push) Has been cancelled
Treewide Checks / Validate documentation builds-1 (push) Has been cancelled
Treewide Checks / Validate documentation builds-2 (push) Has been cancelled
Treewide Checks / Validate documentation builds-3 (push) Has been cancelled
Treewide Checks / Validate hyperlinks in documentation sources (push) Has been cancelled
Treewide Checks / Validate Editorconfig conformance (push) Has been cancelled
Build and deploy documentation / Check latest commit (push) Has been cancelled
Build and deploy documentation / publish (push) Has been cancelled

various: make `mkPackageOption` nullable for Treesitter grammars;  filter null grammars
This commit is contained in:
raf 2026-03-15 15:51:16 +03:00 committed by GitHub
commit baf207654c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 8 additions and 1 deletions

View file

@ -6,6 +6,7 @@
`vimPlugins.nvim-treesitter`. Namely, it changes from the frozen `master` `vimPlugins.nvim-treesitter`. Namely, it changes from the frozen `master`
branch to the new main branch. This change removes incremental selections, so branch to the new main branch. This change removes incremental selections, so
it is no longer available. it is no longer available.
- [obsidian.nvim] now uses a maintained fork which has removed the `dir` - [obsidian.nvim] now uses a maintained fork which has removed the `dir`
setting. Use `workspaces` instead: setting. Use `workspaces` instead:
@ -78,6 +79,8 @@
[NotAShelf](https://github.com/notashelf): [NotAShelf](https://github.com/notashelf):
- Lazyload noice.nvim and nvim-web-devicons on `DeferredUIEnter` - 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): [jfeo](https://github.com/jfeo):

View file

@ -31,6 +31,7 @@
mkGrammarOption = pkgs: grammar: mkGrammarOption = pkgs: grammar:
mkPackageOption pkgs ["${grammar} treesitter"] { mkPackageOption pkgs ["${grammar} treesitter"] {
default = ["vimPlugins" "nvim-treesitter" "grammarPlugins" grammar]; default = ["vimPlugins" "nvim-treesitter" "grammarPlugins" grammar];
nullable = true;
}; };
in { in {
inherit diagnostics diagnosticSubmodule mkGrammarOption; inherit diagnostics diagnosticSubmodule mkGrammarOption;

View file

@ -24,7 +24,10 @@
); );
# Build a given Treesitter grammar. # 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 = { pluginBuilders = {
nvim-treesitter = buildTreesitterPlug config.vim.treesitter.grammars; nvim-treesitter = buildTreesitterPlug config.vim.treesitter.grammars;