treesitter: allow null in grammar options

This commit is contained in:
Snoweuph 2026-04-10 21:32:29 +02:00
commit 2656538a84
No known key found for this signature in database
GPG key ID: BEFC41DA223CEC55
2 changed files with 5 additions and 2 deletions

View file

@ -4,7 +4,7 @@
...
}: let
inherit (lib.options) mkOption mkEnableOption literalExpression;
inherit (lib.types) listOf package bool;
inherit (lib.types) listOf nullOr package bool;
in {
options.vim.treesitter = {
enable = mkEnableOption "treesitter, also enabled automatically through language options";
@ -13,7 +13,7 @@ in {
autotagHtml = mkEnableOption "autoclose and rename html tag";
grammars = mkOption {
type = listOf package;
type = listOf (nullOr package);
default = [];
example = literalExpression ''
with pkgs.vimPlugins.nvim-treesitter.grammarPlugins; [