4 ms·
Tree-sitter[0] can provide semantic highlighting and I've been using it with all the languages I program in, including writing my own grammar[1] for a language
by siraben 4y ago
Tree-sitter[0] can provide semantic highlighting and I've been using it with all the languages I program in, including writing my own grammar[1] for a language that didn't have syntax highlighting. The improvement in readability is a quantum leap, because colors actually have semantic meaning rather than just being eye candy.
With the situations you describe, you can write tree-sitter queries to make unsafe code highlighted in a different color, for instance, or highlight specific anti-patterns.
[0] https://tree-sitter.github.io/tree-sitter https://tree-sitter.github.io/tree-sitter
[1] https://github.com/siraben/tree-sitter-formula https://github.com/siraben/tree-sitter-formula