This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-01-30
Channels
- # babashka (19)
- # beginners (87)
- # calva (11)
- # cider (6)
- # cljdoc (30)
- # clojure (84)
- # clojure-china (1)
- # clojure-dev (13)
- # clojure-europe (4)
- # clojure-france (1)
- # clojure-gamedev (1)
- # clojurescript (12)
- # core-async (1)
- # cursive (12)
- # data-oriented-programming (1)
- # defnpodcast (1)
- # emacs (9)
- # events (1)
- # fulcro (8)
- # graalvm (1)
- # introduce-yourself (1)
- # missionary (6)
- # music (1)
- # nextjournal (14)
- # off-topic (26)
- # portal (2)
- # re-frame (1)
- # releases (2)
- # shadow-cljs (13)
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!!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.
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
Thank you @U0567Q30W and @U9E8C7QRJ — I’ll try to start using that! 🙏
@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?
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! 🙂
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.)
Holy cow. I’m running 1.12.1-2021.2 — I thought I was a bit more current than that! Will upgrade very soon.