logoalt Hacker News

fredrikaverpiltoday at 1:06 PM1 replyview on HN

Managing the parsers yourself is fairly easy and could rely on running the tree-sitter CLI in each parser repo to build them. Other options exists like installing via Nix.

And in a similar vein, if queries (.scm files) were hosted in each parser repo, it would also be fairly easy to handle.

I think it’s the latter part with the query files that is the challenge here.


Replies

ivanjermakovtoday at 1:21 PM

Queries are a part of tree-sitter, but unfortunately neovim extended those with more predicates and operators, making most nvim-sitter incompatible with tree-sitter API.

For my text editor I had to yank nvim-treesitter queries and rewrite them.

https://github.com/ivanjermakov/hat-tree-sitter