reason
reason copied to clipboard
[refmt] Refmt favors multiple lines for short tuples and lists
In general, I find this:
[123, 456789, 0]
easier to read than this:
[
123,
456789,
0
]
In the case where this list is defined after a very long pattern match, for example, refmt prefers the multi-line approach, instead of having the full list definition on a single new line:
/* ideal, in my opinion */
| Some(VeryVeryVery(Loooooong(PatternMatch(_)))) =>
[123, 456789, 0]
/* what refmt currently does */
| Some(VeryVeryVery(Loooooong(PatternMatch(_)))) => [
123,
456789,
0
]
The same also applies to tuples (and probably arrays).