here's a screenshot of a poc vscode extension (written in cljs) for doing rainbow parens via tree sitter. (the colors for other things are not done by this extension)
That's nice!
thanks - do you have any tips or resources on measuring performance?
I think parcera
might have some performance testing. But I could be remembering wrongly.
Something that chokes one of Calva's parsers is long input strings. So if you get a large/deep structure back as a result from evaluation and it is not pretty printed. It starts to get painful at 10K chars. The parser for Calva's rainbow parens deals with long strings much better.
thanks for the parecera hint -- may be this part? https://github.com/carocad/parcera/blob/master/test/parcera/benchmark.clj
it looks like (at least the c api of) tree sitter has the ability to work with timeouts: https://github.com/tree-sitter/tree-sitter/blob/master/lib/include/tree_sitter/api.h#L289_L296
i don't see that exposed for web-tree-sitter
though: https://github.com/tree-sitter/tree-sitter/blob/master/lib/binding_web/tree-sitter-web.d.ts