cljfmt icon indicating copy to clipboard operation
cljfmt copied to clipboard

Indenting defrecord like CIDER

Open bsless opened this issue 4 years ago • 2 comments

Hello, Is there a way to mimic CIDER's indentation of defrecord's arg vector using the existing configuration mechanism? I read the documentation and I'm not sure it's possible. For comparison:

;;; Emacs
(defrecord Foo
    [a b])

;;; cljfmt
(defrecord Foo
           [a b])

Thanks, Ben

bsless avatar Apr 06 '21 14:04 bsless

@bsless I don't currently have an answer for you but I think there is some related discussion in this old issue.

lread avatar Apr 06 '21 15:04 lread

@lread Looks like it is indeed related. The "weird" behavior is specified here clojure-mode lets the user tell the indentation mechanism some forms have N special form arguments. Special forms then have a predefined indentation level. Think something similar could be added as a feature?

bsless avatar Apr 06 '21 15:04 bsless