bursa / client / .cljfmt.edn
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
;; cljfmt configuration — pinned so every machine and the npm gate agree.
;;
;; :extra-indents, NEVER :indents. `:indents` REPLACES cljfmt's whole default
;; table (core `let`/`when`/`->` and the rest lose their block rules) and
;; rewrites thousands of lines into argument alignment. `:extra-indents` adds
;; to the defaults, which is the only sane thing to do to an existing tree.
;;
;; Three entries, all of them body-taking macros cljfmt cannot know about.
;; Without a rule cljfmt argument-aligns a body under the macro's first
;; argument, which is both unreadable and the opposite of how this tree is
;; written:
;;
;;   js-await  shadow.cljs.modern — (js-await [bindings] & body); block like
;;             `let`, so the body sits 2 spaces in, not under the binding vector.
;;   defclass  shadow.cljs.modern — (defclass Name (field …) (constructor […]
;;             & body) (method n […] & body) …). [:inner 0] blocks the class
;;             body; [:inner 1] blocks each member's body, exactly as cljfmt's
;;             own defaults do for deftype/defrecord, whose shape this is.
;;             Without [:inner 1] every constructor body aligns under `[this …]`
;;             — 291 rewritten lines in chat alone, all of them worse.
;;   this-as   cljs.core — (this-as name & body). One multi-line use in the
;;             suite today; the rule is here so the next one is not reindented
;;             under its binding symbol.
;;
;; Nothing else in this tree needs an entry: `grep -rn defmacro src` is empty
;; and shadow.cljs.modern is only ever :refer'd for these two macros.
{:extra-indents {js-await [[:block 1]]
                 defclass [[:inner 0] [:inner 1]]
                 this-as  [[:block 1]]}}

static mirror of HEAD · about · clone: git clone https://git.ardegazu.ro/bursa.git