This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-09-20
Channels
- # announcements (3)
- # babashka (7)
- # beginners (43)
- # biff (19)
- # calva (39)
- # cider (16)
- # clerk (2)
- # clj-yaml (32)
- # cljs-dev (37)
- # clojure (129)
- # clojure-australia (1)
- # clojure-china (1)
- # clojure-europe (46)
- # clojure-filipino (1)
- # clojure-gamedev (25)
- # clojure-hk (1)
- # clojure-indonesia (1)
- # clojure-japan (2)
- # clojure-korea (1)
- # clojure-my (1)
- # clojure-nl (5)
- # clojure-norway (8)
- # clojure-sg (1)
- # clojure-sweden (12)
- # clojure-taiwan (1)
- # clojure-uk (9)
- # clojurescript (14)
- # core-typed (136)
- # cursive (18)
- # duct (9)
- # emacs (12)
- # etaoin (7)
- # events (1)
- # graalvm (3)
- # gratitude (2)
- # humbleui (7)
- # hyperfiddle (99)
- # introduce-yourself (5)
- # jobs (2)
- # leiningen (1)
- # missionary (14)
- # nrepl (2)
- # off-topic (12)
- # polylith (21)
- # rdf (29)
- # re-frame (8)
- # releases (1)
- # shadow-cljs (264)
- # spacemacs (21)
- # sql (7)
- # vscode (1)
myself and another user of #CRRJBCX7S have noticed with the latest CIDER that indentation after hitting a new line/making a structural update seems to have changed. Previous default indentation (expected, desired)
($ some-symbol
{:A 1 :B 2}
foo
bar)
Current default indentation (undesired):
($ some-symbol
{:A 1 :B 2}
foo
bar)
cider-nrepl probably inferred that it has a :style/indent
of 1 given that arglist
It a value of 0 (or :form, or :defn) would produce the desired indentation, please declare it, as usual
https://docs.cider.mx/cider/indent_spec.html#overview
(inference is new - see the last section)
Thanks, easy enough. Created https://github.com/lilactown/helix/issues/146 to track
Nice. Tbh, checking out https://github.com/lilactown/helix/blob/master/docs/creating-elements.md#-macro it seems that the produced indentation is exactly what is considered idiomatic (at least in these circles) In the example from that .md, these lines:
($ my-component ($ "div" "first")
($ "div" "second"
Seem badly indented to me, since it makes one believe that $ is a vanilla defn, while it is in fact a macro.it's only a macro for performance reasons; semantically it is a function that takes data and returns data
revisiting this, I am not finding that CIDER is picking up the right indentation even when I set the style/indent metadata. Please let me know if I'm doing something wrong https://github.com/lilactown/helix/pull/148/files
I'm using cider 1.8.0-snapshot from Sep 14, commit 09d72192a4734653ca0b1b4b227c38760880fc63