Conversation
|
👋 @brandonchinn178 Reviewer: Please verify the following things have been done, if applicable.
|
cb825ee to
305033d
Compare
I'm gonna go out on a limb and guess that there are just as many people who like the current style, and haven't had reason to complain until now because it's the default (full disclosure, I'm one of them). More generally, I think we should start being pretty conservative about making changes to default formatting. There are a lot of people using Fourmolu these days and these small changes create a lot of churn. Anecdotally, I know my colleagues would be grateful to hear this. I am still happy to change defaults for things that are pretty inarguably currently far from ideal e.g. some of the ways in which commented-out code gets moved around, or haddocks with data constructor declarations. (This also means we should maybe change the option names (sorry!). It seems odd for "ormolu" to be the default.) |
109d51a to
dad3d08
Compare
dad3d08 to
93c6a1a
Compare
Resolves #202
Supercedes #77
Still definitely some kinks that could be worked out, especially around empty let blocks (ref: tweag/ormolu#917), let-blocks with multiple bindings on one line (e.g.
let a = 1; b = 2), etc. But I think this is a good initial implementation.Examples of each style can be found in the test directory. As mentioned in the issue (and in the changelog entry), I made
auto-newlinethe default, which changes default formatting. IMOauto-newlinehas the best compromise between Fourmolu's goal of being diff-friendly and compactness. Happy to hear suggestions for another default (I don't think we should useinline-ormolu, though, because people are usually confused whyinstarts off-indentation when initially using Fourmolu, e.g. #152).