emacs

Consider also joining #cider, #lsp and #inf-clojure, where most of the tool-specific discussions are happening.
nick 2020-09-11T21:12:49.054300Z

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

practicalli-john 2020-09-11T21:21:33.055800Z

@nfedyashev align forms should do the trick https://practicalli.github.io/spacemacs/improving-code/formatting/aligning-forms-expressions.html

🔥 1
🦜 1
🙏 1
nick 2020-09-11T21:40:28.058800Z

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

nick 2020-09-11T21:42:40.059400Z

oh, seems like it is known issue https://github.com/clojure-emacs/clojure-mode/issues/548