13 ms·
Tooting my own horn, Emacs’ csharp-mode[1] is undergoing a rewrite to be 100% based on tree-sitter rather than regexps. The new code runs way faster and is so
by josteink 6y ago
Tooting my own horn, Emacs’ csharp-mode[1] is undergoing a rewrite to be 100% based on tree-sitter rather than regexps.
The new code runs way faster and is so much nicer to work with.
Once all the kinks are gone, I can’t imagine going back.
[1] https://github.com/emacs-csharp/csharp-mode/blob/master/csharp-tree-sitter.el https://github.com/emacs-csharp/csharp-mode/blob/master/csha...
- ywei3410 6y agoThis looks awesome! Do you mind elaborating on any kinks which you found?
- josteink 6y agoA few: - indentation may be fine for a final doc, but not always while editing. Especially for new lines starting new code-blocks. - adding new syntax not already known by tree-sitter requires up streaming to at least 2 repos before we can use it in a released version of our package. This can feel less hands on and slow than working in a single repo where you have full control. No super-biggies yet though.
- ubolonton_ 6y agoWhen tree-sitter reaches 1.0 [0], it may be possible to eliminate the tree-sitter-langs upstream, or both. [0]: https://github.com/tree-sitter/tree-sitter/issues/930 https://github.com/tree-sitter/tree-sitter/issues/930