cursive

Issues at: https://git.io/cursive-issues
simongray 2021-03-15T08:48:29.181600Z

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?

helios 2021-03-15T09:11:09.181900Z

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

helios 2021-03-15T09:11:35.182100Z

(depends if you can open the context menu there)

simongray 2021-03-15T09:31:10.182300Z

Nope, like I said the capability is gone

raspasov 2021-03-15T09:54:42.182500Z

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

raspasov 2021-03-15T09:55:14.182700Z

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

raspasov 2021-03-15T09:55:53.182900Z

(actually Power Save Mode probably doesn’t matter)

raspasov 2021-03-15T09:56:00.183100Z

But first one does.

simongray 2021-03-15T09:57:00.183700Z

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

raspasov 2021-03-15T10:00:34.184400Z

Hmm

raspasov 2021-03-15T10:01:28.184600Z

Did you try: File > Invalidate Caches/Restart ?

simongray 2021-03-15T10:18:33.184900Z

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

raspasov 2021-03-15T11:46:19.186Z

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.

simongray 2021-03-15T12:22:15.186300Z

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

simongray 2021-03-15T12:24:53.186500Z

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.

simongray 2021-03-15T12:25:32.186700Z

I need it to match the official indentation: https://github.com/clojure/core.match#example-usage

simongray 2021-03-15T12:25:54.187100Z

but Cursive seems to disallow it

conan 2021-03-15T18:22:57.188100Z

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

conan 2021-03-15T18:34:08.188300Z

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

cfleming 2021-03-15T20:17:05.188500Z

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