Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I've been using a TreeSitter-powered colouriser in Vim, it's fantastic and, like with everything TreeSitter related, extremely fast.

https://github.com/p00f/nvim-ts-rainbow



Hah, I just wondered how easy it would be to implement it using treesitter, thanks for the link!


As far as I know though, tree sitter has problems with really long lists and even incremental parsing gets slower linearly when extending the list.

Also, to my knowledge, tree sitter cannot move nodes around (which is also very hard for languages that are not as simple as the Dyck language [1]).

For bracket pairs, you can easily reuse all (...)-pairs in the following example, even though their height in the AST changes significantly: old text: (...)[(...)] new text: {{(...)}(...)}

[1] https://en.wikipedia.org/wiki/Dyck_language




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: