Which clojure emacs tool can align EDN files like this: https://gist.github.com/mikeananev/c87c1596aed50b7bb095a816f6921737 So the vals on the right are aligned on the same column?
I thought it was just setting options in clojure-mode, one or both of these?
clojure-indent-style 'align-arguments
clojure-align-forms-automatically t
I think the command to manually format like that is clojure-align
(Bound to C-c SPC
by default)
I have tried that but it doesn't seem to align all the keys and values in one map at the same column.
I expect the vals from :enter
and :leave
to go more to the right because of the following key/val
Am I misunderstanding how it should work?
I think the line breaks introduce new alignments. So that if you have long keys you can put a line break so that other keys don’t get crazy indentation
It might be configurable
(defcustom clojure-align-separator clojure--align-separator-newline-regexp
"The separator that will be passed to `align-region' when performing vertical alignment."
:package-version '(clojure-mode . "5.10")
:type `(choice (const :tag "Make blank lines prevent vertical alignment from happening."
,clojure--align-separator-newline-regexp)
(other :tag "Allow blank lines to happen within a vertically-aligned expression."
'entire)))