← Back to home

node-cljfmt

When I was introduced to ClojureScript, my team mates recommended me switching to Atom. I’m open to learn how to be effective with cljs in vim or emacs, but learning how to use an advanced editor in parallel with a new language is a recipe for a failure. I’m playing with my vim setup a lot though.

I’ve heard that Clojure community is talking about having a standard formatter for the language. I’d love to have something like that to completely automate such a bikeshedding.

I’ve been using lein-cljfmt for a while, and it works, but the approach is very, very slow. I’ve tried building zprint with GraalVM, and it works, but something put me off in regards to it, and unfortunately I don’t remember the details.

Yesterday I found the node-cljfmt npm module. After installing it, additionally to atom-beautify, I now have automatic formatting on every save of a file! It’s still quite slow but not annoyingly so.

Last edited on Feb 9, 2019