I've added syntax highlighting to the prompt of my programming language!
It's not strictly necessary, but it's nice to have. It caught a bug with lexing incomplete string literals too.
The next version of difftastic will include YAML support, thanks to a pull request by @alexmanno_dev!
It's a nice feature, and difftastic itself even includes some YAML files. Note also the highlighting: you can distinguish strings from boolean literals here.
Difftastic does syntax highlighting based on tree-sitter's parse of the *whole file*. It's more accurate than most diffs are able to do.
In this hunk, the opening " of the string literal isn't included, but difftastic still knows that the first lines are from a string.
The literal 0xffu8 in Rust is pretty tricky to read without syntax highlighting. It looks like a plain hexadecimal value at first.
(Why not have syntax highlighting? Ironically I was debugging and improving VS Code's Rust highlighting.)
Wilfred Hughes
Shared words: highlighting, literals, syntax, not
Score: 104.6