ormolu
ormolu copied to clipboard
Basic support for line lengths
Is your feature request related to a problem? Please describe.
We use both Ormolu and a line-length linter at work. Sometimes I end up in situations where running Ormolu makes some lines cross the length boundary. Then on the run after fixing Ormolu, I get long-line failures, which I then fix by adding a few newlines to convince Ormolu to reformat the expressions in multi-line style instead of single-line.
This involves a few manual passes to get everything clean.
Describe the solution you'd like
I was thinking that Ormolu may be able to take an optional "max line length" parameter and use it as a hint to force multi-line formatting if a formatted line is longer than the max. I'm not looking for any kind of guarantee, just something that'll reduce the number of cases I have to touch up manually.