Is there some option in emacs/clojure-mode/evil-indent/anywhere-else that allows the automatic formatting that looks like this(preferred code style in the project):
(are [expected for-key] (= expected (get-something))
100001 "key1"
1000001 "key2")
automatic (evil-indent)
(re)formats it like:
(are [expected for-key] (= expected (get-something))
100001 "key1"
1000001 "key2")
Sorry, I have never configured formatting options in emacs in the past@nfedyashev align forms should do the trick https://practicalli.github.io/spacemacs/improving-code/formatting/aligning-forms-expressions.html
@jr0cket Thanks John!
It almost fixed the issue. What's left is one strange behavior
(are)
forms(from clojure.test) are not formatted properly:
(are [expected for-key]
(= expected (get-something))
100001 "key1"
1000001 "key2")
And any other function/macro name instead of "are" works as expected(even is
):
(is [expected for-key]
(= expected (get-something))
100001 "key1"
1000001 "key2")
(for [expected for-key]
(= expected (get-something))
100001 "key1"
1000001 "key2")
oh, seems like it is known issue https://github.com/clojure-emacs/clojure-mode/issues/548