Re:Semantic Clojure Formatting
by fiddlerwoaroof on Tuesday December 08, 2020 @03:04AM
(#25343028)
I looked into using tree-sitter as a bar for this once: parse code into an AST of sorts and then use the ast to define the diff boundaries. Didn’t think through all the problems, though
But I think that's fine. The diff tool should use the most specific diff mode that it knows is safe, and fall back to the "free diff" of tree structured data when working on an unknown language.