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.
miniblog.
Related Posts
@skybert@emacs.ch Difftastic has very little unsafe, just the FFI to tree-sitter libraries.
That said, I've actually seen safe Rust segfault in the past!
The next version of difftastic will support parsing CSS and JS syntax inside HTML! This makes a huge difference to HTML files.
This support for tree-sitter sub-parsers was contributed by Sesse :)
Difftastic 0.31 is released:
* Two new languages: Hacklang and SQL
* Updates to: C#, Dart, Elm, Gleam, Haskell, HCL, Java, JSON, OCaml, PHP, Python, Ruby, Scala and TypeScript
The tree-sitter parser maintainers have been busy!




