Fork me on GitHub
#cursive
<
2021-11-17
>
cfleming02:11:02

Definitely a good question.

simongray09:11:22

Hmmm… I do not seem to be allowed to change the indentation for defonce or other Clojure core forms inline any longer…?

cfleming21:11:18

Is the problem only with those forms, or with all forms? If it’s all forms, what can happen is that the intention gets disabled. Check Editor | Intentions | Clojure.

simongray09:11:48

I haven’t been consistently able to edit them inline for maybe half a year. Sometimes it’s possible, sometime it isn’t, and I have no idea why it changes. That issue seems to be present with all Clojure core forms, but not other forms. The defonce problem is the fact that it is does not seem to be included in the list of indentation rules in preferences, only cljs.core.defonce is.

simongray09:11:25

(the screenshot is BTW the intentions - none seem to be disabled)

simongray09:11:26

It’s now working on my work machine (an Intel Macbook pro), but not working on my ARM Macbook Air. It’s entirely possible that it’s just something weird in my setup.

simongray09:11:22

I sync settings between different machines a settings repository, so maybe that can screw things up? It does seem a bit wonky sometimes.

simongray09:11:40

it used to be the case the case that you could right click and configure indentation for Clojure core forms, but that is not possible any longer. Instead, there is a panel in settings where all of the built-in forms are listed (and I guess this is where you’re supposed to change it now), but defonce is not a part of it, only cljs.core.defonce. I guess it was omitted by mistake? It would make sense to just default it to the same indentation behaviour as def (which is what I usually change it to anyway).

cjsauer16:11:39

@simongray that sounds similar to what I was seeing above. Are you by chance editing a cljc file?

cjsauer16:11:03

I had to create a stub clj file, write the form I wanted to manually indent, and then access the inline menu that way.