Fork me on GitHub
#emacs
<
2018-06-15
>
lilactown00:06:25

is there a way for me to hint to Clojure(Script)-mode (and pref also IntelliJ) the indentation of the body of a macro?

ag00:06:13

check documentation for put-clojure-indent

lilactown00:06:31

e.g. I have a macro that takes in a defrecord-like body:

(defcomponent
  (constructor [this]
    this))
but right now it auto-indents it like a list:
(defcomponent
  (constructor [this]
               this))

joost-diepenmaat11:06:44

Assuming you’re using CIDER with clojure-mode, take a look at https://cider.readthedocs.io/en/latest/indent_spec/

👍 4