This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-05-01
Channels
- # announcements (1)
- # babashka (73)
- # bangalore-clj (7)
- # beginners (295)
- # calva (128)
- # chlorine-clover (3)
- # cider (9)
- # cljsrn (10)
- # clojure (63)
- # clojure-europe (11)
- # clojurescript (1)
- # clojureverse-ops (3)
- # conjure (3)
- # emacs (7)
- # fulcro (13)
- # graalvm (8)
- # honeysql (16)
- # jobs-discuss (14)
- # malli (21)
- # meander (8)
- # onyx (1)
- # pathom (7)
- # portkey (2)
- # quil (3)
- # re-frame (4)
- # reagent (31)
- # reitit (2)
- # rewrite-clj (40)
- # shadow-cljs (29)
- # sql (20)
- # xtdb (13)
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
(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)))