greglook / cljstyle

A tool for formatting Clojure code
Eclipse Public License 1.0
293 stars 39 forks source link

Indentation of second or later fnspecs in letfn will be broken #54

Closed liquidz closed 3 years ago

liquidz commented 4 years ago

Expected

(letfn [(foo []
          (fn [] ::foo))
        (bar []
          ::bar)]
  ::baz)

Actual

::bar's indentation is broken.

(letfn [(foo []
          (fn [] ::foo))
        (bar []
             ::bar)]
  ::baz)
liquidz commented 4 years ago

Oh, fn had no connection with breaking indentation. It seems second or later fnspecs indentation will be broken always.

Expected

(letfn [(foo []
          ::foo)
        (bar []
          ::bar)
        (baz []
          ::baz)]
  ::ret)

Actual

(letfn [(foo []
          ::foo)
        (bar []
             ::bar)
        (baz []
             ::baz)]
  ::ret)
greglook commented 4 years ago

Hmm, curious. Thanks for providing the example cases, those will help a lot!

liquidz commented 3 years ago

Great! It works perfectlly!