Fork me on GitHub
#calva
<
2021-07-08
>
pez12:07:34

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. ❤️

👍 6
Stuart13:07:09

Nice, works for me. cool 👍

❤️ 3
🙏 3
pez15:07:36

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)
  |

  )

pez16:07:12

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.

seancorfield17:07:28

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).

pez17:07:43

And it’s your birthday as well, if I understood the announcement correctly? 😃 Congratulations!

seancorfield17:07:51

Yesterday, yeah, so I took a whole week off work to chill...

🎉 6
Stuart17:07:41

Happy (belated) birthday!

3