plugins/syntax: fix tree-sitter parsers

This commit is contained in:
Dmitriy Pleshevskiy 2022-12-12 23:28:26 +03:00
parent d576379760
commit 69355e6429
Signed by: pleshevskiy
GPG key ID: 1B59187B161C0215

View file

@ -21,14 +21,15 @@ let
};
tree-sitter = (inputs.tree-sitter.override { inherit extraGrammars; });
grammars = tree-sitter.withPlugins (g: tree-sitter.allGrammars);
grammars = tree-sitter.withPlugins (g: [ g.tree-sitter-d2 ]);
nvim-treesitter = inputs.nvim-treesitter.overrideAttrs (oldAttrs: {
nvim-treesitter = inputs.nvim-treesitter.withAllGrammars.overrideAttrs (oldAttrs: {
postPatch = ''
rm -r parser
ln -s ${grammars} parser
mkdir parser
ln -s ${grammars}/d2.so parser/d2.so
ln -s ${../.}/queries queries/d2
ln -s ${extraGrammars.tree-sitter-d2.src}/queries queries/d2
'';
});
in