Open ocoka opened 5 years ago
Should be kinda-fixed in v0.4.2.
This is due to tree-sitter grammars having a completely different interface. And actually lacking the interface to parse text directly. The "proper" fix would've been to detect the type of grammar and then either use tree-sitter or text-mate for highlighting, depending on the type of grammar. But in practice, highlighting using tree-sitter grammars is a mess: one ought to create a text editor, let it tokenize (and bear in mind tokenization is asynchronous), and then rip the underlying HTML representation using undocumented low-level API. While not impossible, I'm a bit reluctant to actually do that here, since it's actually rather brittle.
So, for now, tree-sitter grammars are simply ignored in favour of text-mate ones.
Let's keep this issue open, this might be worth revisiting at some point.
Thank's a lot
Related to TypeStrong/atom-typescript#1503