Fork me on GitHub

I've been thinking for a long time and wishing for an opinionated Clojure code formatter. I've started a thread on ClojureVerse with my ideas on building such a tool with the community. I'm interested in other people's thoughts, particularly people involved in tooling. If you think this is a good idea or a bad idea, please let me know on the forums!

bananadance 24

IMO: A standard, automatedly-appliable config would be undoubtedly useful, but creating inflexible software is nothing to be proud about. Particularly given Lisp heritage gofmt is cool until you realise a few rules make no sense to you, and trying to fight them would be an uphill battle Rubocop is a better inspiration: has lots of rules, most of them auto-fixable, but nothing prevents you from deviating from them. And the defaults are still massively popular

Philip Hale14:11:32

@U45T93RA6 have you had any experience with prettier in JS?


only tangentially, it was a Prettier + TSLint combo


(I liked the latter, much similar to Rubocop. configurable, it can autofix things to be in styles A or B. e.g. always-semicolon, never-semicolon)


prettier is a time saver when sharing code with others. no more arguing about whitespaces and indentation. I think clojure would benefit from such a tool. Sometimes it’s hard to standardize across environments and different editors.

πŸ‘ 8

but you can also can skip arguing with a configurable tool. I specifically recall using Rubocop with a disagreed config in a larger team, but I was like "whatever, I'll code as usual and run the pre-commit hook autoformatter"


There is now #formatting for more discussion about this


Video+transcript of a talk I did last month for the Denver Clojure meetup about

parrot 20
🀐 4
πŸ‘ 24