Fork me on GitHub
#cursive
<
2022-01-30
>
genekim22:01:30

Somewhere along the line, I picked up a habit of doing comment blocks like this:

(comment
  {:a 1}
  
  ,)  ; <--- note comma before closing paren
Someone noted that the comma would keep the closing paren from from being put right after the last form. I loved doing this because it made adding more forms inside the comment blocks super easy — no need to find that last closing paren, and insert a couple of newlines. Cursive used to protect that last ,) during code auto-format. But I’m noticing that this is no longer the case? Is there a way to revert to the old behavior when formatting code? Many thanks!!

cfleming22:01:23

Hmm, I’m not sure about that, I’ll take a look. One similar thing I do for parinfer is #_nil), which is uglier but should still work, I think.

imre09:01:31

I never had to use any of those tricks, if I put the closing paren on its own line, Cursive leaves it alone... FWIW I use paredit, not parinfer

genekim16:01:07

Thank you @U0567Q30W and @U9E8C7QRJ — I’ll try to start using that! 🙏

cfleming19:01:21

@U6VPZS1EK Do you use parinfer? As imre states, I suspect (but haven’t tested) that with paredit this wouldn’t be a problem. Is it possible that this started to affect you when you switched to parinfer?

genekim19:01:22

Ah, yes. I’ve used parinfer from the very beginning — in fact, to my knowledge, I never used anything else. (I needed all that extra help when I first started Clojure! 🙂

genekim19:01:09

So, to answer your question: I’m pretty sure the behavior changed. Perhaps when I upgraded Cursive versions? (I upgrade seldomly, so I could have jumped 1.5 years or more.)

genekim19:01:07

Holy cow. I’m running 1.12.1-2021.2 — I thought I was a bit more current than that! Will upgrade very soon.

cfleming19:01:58

Hmm, I don’t think I’ve touched that code in forever, but I may be forgetting something - the older I get, the more it happens.

genekim19:01:16

(Hmm. I guess I’m current, given my IntelliJ version: 2021-2.)

cfleming19:01:38

Yeah, 1.12.1 is current for Cursive, unless you’re taking EAPs.