Hacker News new | ask | show | jobs
by knubie 534 days ago
This is possible already with tools like difftastic.

https://github.com/Wilfred/difftastic

1 comments

Difftastic would not solve the issue described by madeofpalk because it still highlights the added comma. You need a diff tool that can distinguish between optional and required syntax. So far I am not aware of any tool that supports this, except the one I am working on (SemanticDiff).
I'm pretty sure this counts. https://github.com/afnanenayet/diffsitter

Certainly the idea has been suggested many times. I think people end up formatting both before/after and doing a diff on formatted before against formatted after. I've done that.