Fork me on GitHub
#cursive
<
2021-03-15
>
simongray08:03:29

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?

helios09:03:09

Press Alt+Enter to open the context menu, regardless of the light bulb

helios09:03:35

(depends if you can open the context menu there)

simongray09:03:10

Nope, like I said the capability is gone

raspasov09:03:42

@U4P4NREBY check (macOS?): Preferences > Editor > Intentions > Search for “Clojure” > Enable all checkboxes

raspasov09:03:14

Also check File > Power Save Mode (make sure it’s not enabled)

raspasov09:03:53

(actually Power Save Mode probably doesn’t matter)

raspasov09:03:00

But first one does.

simongray09:03:00

they were all enabled and power save mode wasn’t on 😞

raspasov10:03:28

Did you try: File > Invalidate Caches/Restart ?

simongray10:03:33

gonna try that in a moment and see if it has any effect. Thanks for taking your time to help, btw.

raspasov11:03:19

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.

simongray12:03:15

still not working after invalidating caches and restarting… this is so strange

simongray12:03:53

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.

simongray12:03:54

but Cursive seems to disallow it

conan18:03:57

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

conan18:03:08

may not be your issue, but i often get caught out by things that don't resolve for some reason

cfleming20:03:05

@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?