This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-11-26
Channels
- # adventofcode (2)
- # announcements (9)
- # bangalore-clj (1)
- # beginners (158)
- # calva (32)
- # cider (2)
- # clara (4)
- # cljdoc (40)
- # cljs-dev (3)
- # cljsrn (6)
- # clojure (45)
- # clojure-brasil (2)
- # clojure-dev (35)
- # clojure-europe (9)
- # clojure-italy (7)
- # clojure-nl (2)
- # clojure-uk (29)
- # clojurescript (144)
- # code-reviews (3)
- # core-logic (9)
- # cursive (11)
- # datascript (8)
- # datomic (9)
- # duct (1)
- # figwheel (6)
- # fulcro (11)
- # hyperfiddle (27)
- # kaocha (23)
- # luminus (1)
- # off-topic (7)
- # onyx (2)
- # pathom (3)
- # re-frame (61)
- # reagent (12)
- # remote-jobs (10)
- # shadow-cljs (40)
- # spacemacs (4)
- # sql (27)
- # tools-deps (6)
- # unrepl (3)
- # vim (47)
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! https://clojureverse.org/t/clj-commons-building-a-standard-code-formatter/3240

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
@U45T93RA6 have you had any experience with prettier
in JS?
(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.
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 clojure.zip
https://lambdaisland.com/blog/2018-11-26-art-tree-shaping-clojure-zip
