This seems inconsistent with how attrsets are treated, which are always split accross multiple lines, regardless of line length
input 5
{ a, b, c }: { a = 1; b = 2; c = 3; }
output 5
{
a,
b,
c,
}: {
a = 1;
b = 2;
c = 3;
}
Also, note that in the case of operator chains and lists, developer can nudge the formatter to split into multiple lines by inserting at least on newline in between the elements of the expression:
input 6
a: b: c: [
a b c]
output 6
a: b: c: [
a
b
c
]
input 7
a: b: c: a
+ b + c
output 7
a: b: c:
a
+ b
+ c
I understand this as giving the developer an option to choose between keeping things on one line vs multiple. I believe that this is good as long as the expression doesn't violate max acceptable line length. However this optionality is not given to the developer in case ow function arguments (which are always collapsed onto a single line) and attrsets with more than 1 element (which are always expanded into multiple lines).
function args and operator chains
input 1
output 1
expected output 1
input 2
output 2: same as 1
expected output 2: same as 1
NOTE: replacing
+
with any other operator (at least the few that I tried) yields the same resultslists
input 3
output 3
expected output 3
input 4
output 4: same as 3
expected output 4: same as 3
Additional thoughts
This seems inconsistent with how attrsets are treated, which are always split accross multiple lines, regardless of line length
input 5
output 5
Also, note that in the case of operator chains and lists, developer can nudge the formatter to split into multiple lines by inserting at least on newline in between the elements of the expression:
input 6
output 6
input 7
output 7
I understand this as giving the developer an option to choose between keeping things on one line vs multiple. I believe that this is good as long as the expression doesn't violate max acceptable line length. However this optionality is not given to the developer in case ow function arguments (which are always collapsed onto a single line) and attrsets with more than 1 element (which are always expanded into multiple lines).