This talk: https://www.thestrangeloop.com/2018/tree-sitter---a-new-pars... by the author is quite instructive as well.
This talk: https://www.thestrangeloop.com/2018/tree-sitter---a-new-pars... by the author is quite instructive as well.
The new implementation has been authored by Yuan Fu in close collaboration with the core Emacs maintainers and the rest of the community. It has been an ongoing effort for many, many months.
This is great news, and means that also core Emacs language-binding provided as part of Emacs itself will now be able to make use of tree-sitter based parsers as well, something which wouldn't have been happening if they would have to depend on a third-party package to get those bindings.
I've been somewhat involved in the process, although not a major player, but needless to say I'm very excited about these news and can't wait to see what sort of improvements this enables across the line once people start using it.
It also includes some new language-modes which has never been part of Emacs before (like typescript).
I'd love to see C# on the list, but that might depend on me having the time to land production-grade major-mode, so that might end up happening later rather than sooner.
Anyway, from what I understand what has been merged so far should all be available as part of Emacs 29 once released.
That doesn't really bother me. The line of code you're currently typing is generally so invalid that there's not much point trying to color it.
But what does bother me is the code below where you're typing changing its color as the IDE tries to make your partial line fit.
Slow parsing is why emacs used regexps for syntax highlighting instead of parsers in the first place.
Granted, maybe the projects weren’t using tree-sitter correctly. But regex parsing is surprisingly practical, so despite being really amazing at its goals, tree-sitter may not have a definitive advantage