What do you think about adding 2 empty lines between top level values/functions in roc format?
Not sure if it is the default setting, but elm-format always adds 2 empty line in my elm code - and I really like it!
It is very easy to visually partition the code into seperate blocks this way.
I like it too!
I think it is a good idea.
I was surprised that it doesn't
fine by me! I don't have strong feelings one way or the other
if anyone wants to make a PR to introduce it, go for it!
I've been adding two lines and was surprised when roc format converted it to one line.
However if I have a lot of top level expect lines I don't think they should have two lines between them.
Yeah, sometimes it is very nice to have lots of expects close together
Or even just a top level declaration and a related expect separated by a single line to show that they are grouped. It would be very nice if there is a reasonable way for the formatter to still allow this
hmm yeah I also like expects side by side, like no blank lines at all if they're one-liners
Same with constants for me.
Maybe we could have two spaces only before comments or annotations (both function and types) instead?
Like, sometimes I like having a bunch of related things and grouping them without spaces. But almost always these dont have an annotation.
that sounds like a reasonable heuristic to me!
I've been writing a lot of html recently and the current formatter can make some strange decisions, is it easy enough to tinker with it? I am thinking it would be nice to be able to tweak it as I find issues and make a PR with my reccomendations. I appreciate that there is a lot of personal preference here, but it's not easy to neatly describe specific issues.
yeah I think it's relatively straightforward to tinker with, but lmk if you have any specific questions!
Last updated: Jun 16 2026 at 16:19 UTC