From bb18340944d109004c801a20c06f2a558836fd89 Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Mon, 12 Feb 2024 17:44:42 +0800 Subject: [PATCH] users/foo-dogsquared/programs/nixvim: add more tree-sitter grammars for note-taking --- .../modules/programs/nixvim/note-taking.nix | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/configs/home-manager/foo-dogsquared/modules/programs/nixvim/note-taking.nix b/configs/home-manager/foo-dogsquared/modules/programs/nixvim/note-taking.nix index 1d7c9a7d..5d4984e4 100644 --- a/configs/home-manager/foo-dogsquared/modules/programs/nixvim/note-taking.nix +++ b/configs/home-manager/foo-dogsquared/modules/programs/nixvim/note-taking.nix @@ -34,13 +34,18 @@ }; }; + # Install the common text markup tree-sitter grammars. + plugins.treesitter.grammarPackages = with pkgs.tree-sitter-grammars; [ + tree-sitter-cooklang + tree-sitter-markdown + tree-sitter-org + tree-sitter-latex + ] # Install the tree-sitter parsers required for the core.defaults Neorg # module. - plugins.treesitter.grammarPackages = - lib.mkIf - (config.plugins.neorg.extraOptions ? load."core.defaults") - (with pkgs.tree-sitter-grammars; [ - tree-sitter-norg - tree-sitter-norg-meta - ]); + ++ lib.optionals (config.plugins.neorg.extraOptions ? load."core.defaults") + (with pkgs.tree-sitter-grammars; [ + tree-sitter-norg + tree-sitter-norg-meta + ]); }