-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Investigate formatter adding newline between call to spec
and def
#17
Comments
It seems that a newline is only inserted when the spec is long enough to be spread across multiple lines. This is related to what is metioned in this section of the Code.format_string! docs:
|
That is true, but more often is the case where the function it is specifying is spread across multiple lines, which results in a newline above that function. It totally makes sense that it is doing it. I just wasn't sure if you had some sort of special formatting that made it operate differently. |
Hm. I've switched over quite a lot of code to using this now and the newlines and lack of syntax highlighting that I am used to with |
It is a bit of a matter of pick your poison: Overriding That said, I'll definitely give this more thought since the lack of proper highlighting and the fact that the formatter treats module-attributes fundamentally different from other expressions definitely are detrimental to the usability of this library. |
Eh, definitely a lot of tradeoffs to contend with. I appreciate the work you and the Norm people are doing to push these limits and add useful features. One last (probably, haha) harp on type-checking |
Currently the formatter seems to insert a newline after a call to
spec
before the nextdef
. If there is a way to override this, that would be beneficial to the readability of the code.The text was updated successfully, but these errors were encountered: