Fork me on GitHub
#emacs
<
2020-09-11
>
nick21:09:49

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

nick21:09:28

@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")