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

Preserve newlines between vals and their body #356

Closed
fthomas opened this Issue Jul 2, 2016 · 1 comment

Comments

Projects
None yet
3 participants
@fthomas
Contributor

fthomas commented Jul 2, 2016

Original:

val x: Int =
  1

Scalafmt:

val x: Int = 1

It would be nice if the input is not reformatted. This behaviour is already implemented for defs, i.e. if x is a def, the newline is kept. I think it is more regular if vals and defs are treated the same in this regard.

Using:

  • 0.2.10
  • --style default

@olafurpg olafurpg added this to the 0.2.13 milestone Aug 6, 2016

@olafurpg olafurpg closed this in 01ee3c0 Aug 6, 2016

mmatloka added a commit to mmatloka/scalafmt that referenced this issue Sep 17, 2016

olafurpg added a commit that referenced this issue Sep 18, 2016

Merge pull request #445 from mmatloka/365
#356 Code with windows line endings after formatting still has windows endings
@psttf

This comment has been minimized.

Show comment
Hide comment
@psttf

psttf Aug 13, 2018

Is it possible to apply the same behavior to <- and = in for expressions?

psttf commented Aug 13, 2018

Is it possible to apply the same behavior to <- and = in for expressions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment