Configurable newlines between declarations#48
Conversation
|
@georgefst @parsonsmatt What do you think? |
|
Also, all tests pass. |
|
I'm happy to support a style that you like! |
The number of newlines between declarations can now be configured with 'newlines-between-decls' configuration option.
georgefst
left a comment
There was a problem hiding this comment.
This is great, and simpler than I expected. Just a few minor things.
|
Obviously there are no tests for what this option actually does (only that it has no effect when disabled), but that's really an issue with our test suite: #49 |
- Don't change upstream stuff in `newlineRaw` - Don't need `declBreakpoint` because there will never be horizontal spaces between decls.
|
Okay @georgefst, I responded to all comments and pushed your requested changes 👍 |
|
Ok @wraithm, I'll merge if you're happy with my new changes. |
|
@georgefst I'm very happy. Go ahead! |
|
🎉 Thanks! |
|
@georgefst Would you mind making a hackage publish at some point soon? We're gonna convert to fourmolu at @bitnomial asap. |
|
I suppose we could make a release with this and #44, which I'll hopefully get merged today. I think PVP forces this to be a major release since it adds a record field (although I'd be surprised if Fourmolu were actually being used as a library anywhere other than in HLS, which I know wont be broken by this). |
|
You the best. Thanks! |
The number of newlines between declarations can now be configured with 'newlines-between-decls' configuration option.
Closes #47
This does exactly what I want! It's idempotent as well. It defaults to exactly ormolu behavior. I tested it on our large industrial codebase. I don't see anything unexpected from my initial skim. If we merge this, I think we'd start using this at @bitnomial.