Here’s a cry for us helping each other to make Clojure programming even more joyful. I am a big fan of the Clojure Community Style Guide.
In order to contribute to this I have chosen to use cljfmt as the formatting engine for Calva Formatter, a Clojure formatter for VS Code.
However, most people use cljfmt
for postprocessing files, often hooking it in to a CI pipeline. So when I am trying to use it to get the code standard-formatted as it is typed, I stumble upon issues that have not bothered us (as a community) before. Here are two hurdles:
- cljfmt issue #141, closing bracket sometimes not indented
- cljfmt issue #142, whitespace-only lines trimmed when whitespace should be preserved
weavejester agrees that cljfmt
should handle this and welcomes PR:s fixing them. I think it looks like very fun problems to tackle, but I have so many things to deal with! Not just with Calva Formatter, but with Calva Paredit and Calva itself too. It is bit more than I can chew, really, but I am chewing at it anyway.
This is what my cry for help is about: Please jump in and try get cljfmt
handle those cases correctly. It will enable using it for as-you-type formatters to ensure code is adhering to community standards.
When you’re done I can point at some other things that would make cljfmt
even more awesome for as-you-type formatting.
Do we have any takers?