This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-06-24
Channels
- # announcements (6)
- # beginners (89)
- # calva (75)
- # cider (37)
- # clj-kondo (1)
- # cljs-dev (19)
- # cljsjs (8)
- # clojars (1)
- # clojure (122)
- # clojure-europe (6)
- # clojure-italy (41)
- # clojure-nl (18)
- # clojure-uk (24)
- # clojurescript (26)
- # cursive (6)
- # data-science (5)
- # datomic (51)
- # emacs (28)
- # fulcro (8)
- # graalvm (13)
- # hoplon (1)
- # immutant (1)
- # jobs (3)
- # joker (1)
- # keechma (43)
- # lambdaisland (1)
- # leiningen (37)
- # midje (1)
- # nrepl (2)
- # off-topic (32)
- # re-frame (3)
- # reagent (24)
- # reitit (5)
- # remote-jobs (1)
- # shadow-cljs (33)
- # sql (7)
- # tools-deps (11)
I've the weirdest issue with indentation. Here's what happens when I'm setting an alias to a multiline :keys
destructuring (I'm using clojure-align-forms-automatically
): https://asciinema.org/a/gsudrvzoiwlZu8em2KjDIRrW7
I think you are experiencing a variation of https://github.com/clojure-emacs/clojure-mode/issues/525
I'd avoid the newline after three
. Instead, I'd place it before :as
See how with one option you are placing a newline in an 'arbitrary' place, and with the other not?
Same for https://github.com/clojure-emacs/clojure-mode/issues/525 , there should be a newline after 789]
From what I know, clojure-mode delegates alignment to Emacs so there's a chance that there will be no other solution
thing is, that screencast is more of an example, I have a fairly big map destructuring in my real code that involves about 25 names, meaning the line would become unbearably long without newlines
From my side, I haven't experienced this issue unless intentionally trying to reproduce it. And I do align all my hashmaps automatically I think that by following a strict/homogeneous recipe (newlines after k-v pairs, and optionally use homegeneous newlines in values) you'd avoid the issue. If my wording isn't clear I'd be happy to try correcting a big map example 🙂
;; homogeneous newlines across k-v pairs: 1 newline after each k-v value (as opposed to having multiple k-v's in the same line)
{:aaa [1 ;; homogeneous newlines in values: 1 newline after each value (as opposed to just 1 newline in an arbitrary position)
2
3]
:b [1]}
alright, that might be a viable workaround, although it would be much, much preferable to cluster names arbitrarily (YMMV of course)
e.g.:
(let [{:keys [one two three
four five six
seven eight nine] :as woot} big-stuff])
but since my brain seems to not be permeable to most of the concepts around align-region
, would you think of any downside of such a change @U45T93RA6?