From 1027e6d58f8c863937a7a41f441674d974b904bc Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Mon, 6 Feb 2023 01:08:57 +0300 Subject: [PATCH] feat: conditionally add org ts grammar if orgmode is enabled --- modules/treesitter/treesitter.nix | 38 ++++++++++++++++--------------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/modules/treesitter/treesitter.nix b/modules/treesitter/treesitter.nix index 8ed5154..d6acd2d 100644 --- a/modules/treesitter/treesitter.nix +++ b/modules/treesitter/treesitter.nix @@ -29,24 +29,26 @@ in { grammars = mkOption { type = with types; listOf package; - default = with (pkgs.vimPlugins.nvim-treesitter.builtGrammars); [ - c - cpp - nix - python - rust - markdown - comment - toml - make - tsx - html - javascript - css - graphql - json - zig - ]; + default = with (pkgs.vimPlugins.nvim-treesitter.builtGrammars); + [ + c + cpp + nix + python + rust + markdown + comment + toml + make + tsx + html + javascript + css + graphql + json + zig + ] + ++ (optional config.vim.notes.orgmode.enable org); # add orgmode grammar if enabled description = '' List of treesitter grammars to install. When enabling a language, its treesitter grammar is added for you.