This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-07-08
Channels
- # announcements (22)
- # aws (4)
- # babashka (25)
- # beginners (78)
- # calva (9)
- # cider (22)
- # cljdoc (2)
- # cljsrn (2)
- # clojure (27)
- # clojure-australia (7)
- # clojure-europe (22)
- # clojure-nl (15)
- # clojure-uk (26)
- # clojurescript (20)
- # datahike (3)
- # datomic (15)
- # events (1)
- # helix (5)
- # honeysql (4)
- # kaocha (1)
- # malli (1)
- # meander (1)
- # off-topic (84)
- # pathom (14)
- # re-frame (3)
- # reagent (28)
- # reitit (6)
- # sci (1)
- # shadow-cljs (78)
- # tools-deps (30)
Dear Calva friends. Can I get your help with testing https://14106-125431277-gh.circle-artifacts.com/0/tmp/artifacts/calva-2.0.204-1224-comment-trail-bracket-24a11b86.vsix containing a change to the formatter such that for comment
forms the closing bracket is kept on a line of its own? This is mainly for people coming from Emacs and other envs where it can be a bit tricky to evaluate the top level form, but I think it also can be just very inviting to experimentation and fiddling in Rich Comments. The expected behaviour is like so with the cursor somewhere directly inside the comment form (denoted with a |
):
(comment
(def foo
:foo)|)
tab
(comment
(def foo
:foo)
|)
And with the cursor immediately outside the form:
(comment
(def foo
:foo))|
tab
(comment
(def foo
:foo))|
Please give it a spin and let me know how you think this feels. ❤️More expected behaviour. If you “open” up some empty lines in a comment form:
(comment
(def foo
:foo)
|
)
tab
The formatter will now leave those empty lines, since it is not folding the trailing paren:
(comment
(def foo
:foo)
|
)
Please note that range and document formatting will keep folding the trailing paren of comment forms. so this behaviour with a “hanging” end paren only applies as you are formatting the comment form from within it.
I'm very pleased to see this (but I'm on vacation for a week so I won't get around to testing it for a while).