This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-03-15
Channels
- # announcements (8)
- # asami (10)
- # babashka (16)
- # beginners (86)
- # calva (22)
- # chlorine-clover (9)
- # circleci (20)
- # clj-kondo (13)
- # cljs-dev (20)
- # cljsrn (3)
- # clojure (144)
- # clojure-australia (10)
- # clojure-europe (126)
- # clojure-italy (5)
- # clojure-nl (8)
- # clojure-norway (4)
- # clojure-serbia (9)
- # clojure-uk (7)
- # clojurescript (14)
- # cursive (20)
- # data-science (1)
- # datomic (20)
- # figwheel-main (5)
- # fulcro (23)
- # graalvm (7)
- # graphql (25)
- # honeysql (15)
- # hugsql (3)
- # jobs (2)
- # lambdaisland (2)
- # leiningen (4)
- # lsp (102)
- # malli (3)
- # off-topic (51)
- # overtone (5)
- # pathom (27)
- # portal (11)
- # quil (1)
- # re-frame (19)
- # reagent (31)
- # remote-jobs (1)
- # reveal (3)
- # rewrite-clj (56)
- # shadow-cljs (45)
- # startup-in-a-month (1)
- # tools-deps (9)
In the past, there used to be lightbulb that appeared when had the caret close to the beginning of a function/macro head, e.g. (|match [....] ....)
. This allowed me to pick a custom indentation level for e.g. the core.match/match macro. I think I was able to select it from the “context actions” menu when right-clicking too. Doesn’t seem to be around anymore?
@U4P4NREBY check (macOS?): Preferences > Editor > Intentions > Search for “Clojure” > Enable all checkboxes
gonna try that in a moment and see if it has any effect. Thanks for taking your time to help, btw.
Of course! 🙂 Hope it helps… I accidentally disabled the Intentions once and it took me probably 15 min to find it in the Preferences. But I’m not sure why it’s not working for you in this case.
ok, now I figured out the issue. It works with my own functions/macros, but not the ones in Clojure core - and apparently core.match/match is considered part of Clojure core despite being a library and the default indentation is not implemented correctly (it vertically aligns every form) and can’t be changed.
I need it to match the official indentation: https://github.com/clojure/core.match#example-usage
I've found that for symbols which cannot be resolved, you won't get the lightbulb. If you stick a (declare match)
or something before it, you can get the lightbulb, then you can delete the declare
may not be your issue, but i often get caught out by things that don't resolve for some reason
@U4P4NREBY That’s definitely not the case, Cursive doesn’t treat core forms as special in any way. My money is on conan’s suggestion - can you navigate from a usage of match
to the declaration of it?