How to best integrate zprint as pre-commit hook?

I’ve been meaning to open a thread about auto formatters for some time.

For our team differences in formatting in our editors have caused us quite a bit of pain over the months. People on our team are using Emacs (mainly Spacemacs), Cursive and Vim. Having done Elm previously, I really loved how you can sloppily write the code and it would format itself.

On zprint vs cljfmt: we’ve tried both and gone back and forth between them and are currently back with cljfmt. We couldn’t get ourselves to apply zprint to our whole project, as there were too many cases where it didn’t look right. The options zprint offers are more of a downside here. I believe a auto formatter should come without any configuration options.

If others are interested, I’d love to explore if we can move towards having an auto formatter without options work well. When this came up previously on slack, both @colinfleming and @alexmiller agreed this would be a nice thing to have. I think it would lower the barrier to entry for Clojure significantly. Looking at our attempts with zprint and how much work this was for other languages I’m also a bit scared.

Regarding how to run it: I think a native image with Graal VM is the way to go. We currently have the formatter be part of our system so we can use ciders format functions (cider-format-defun/region/buffer). Maybe offering both could be best from an integration perspective?