Yesterday I’ve found out about ZPrint and after following this thread I decided to build Node CLI around the library to use it in editors like Atom, VS Code, etc.
zprint-clj is Node-based CLI that provides public API for editor integration
Here’s some results for formatting time on files of different size
LOC
~Time (s)
100
0.07
700
0.45
1500
1.45
11000
8.2
As author of ZPrint noted, the time spent on formatting actually depends on how deep the code is and usage of complex construct like destructuring syntax, etc.
I want to get a feedback on these. Try it or build an integration for your editor
For context, zprint is a tool to reformat Clojure(Script) tool. Compared to the lighter cljfmt, it takes a more aggressive approach, including the introduction (or I think removal) of newlines when necessary.
Personally I think it’s a pretty amazing piece of software. It includes presets for lots of common functions and macros, and it can also be configured if those defaults don’t match your taste. If you select “community style”, it tries to adhere closely to the highly regarded Clojure Style Guide.