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?
Press Alt+Enter to open the context menu, regardless of the light bulb
(depends if you can open the context menu there)
Nope, like I said the capability is gone
@simongray check (macOS?): Preferences > Editor > Intentions > Search for “Clojure” > Enable all checkboxes
Also check File > Power Save Mode (make sure it’s not enabled)
(actually Power Save Mode probably doesn’t matter)
But first one does.
they were all enabled and power save mode wasn’t on 😞
Hmm
Did you try: File > Invalidate Caches/Restart ?
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.
still not working after invalidating caches and restarting… this is so strange
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
but Cursive seems to disallow it
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
@simongray 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?