Conversation
cc0507a to
2f67380
Compare
|
As a better alternative to this, I think we should finally implement input-aware formatting of lists/sets. Specifically to never contract lists/sets that are expanded onto multiple lines already. We previously added this to the standard to make that possible: Line 67 in f09ce41 |
|
The part of the standard you quote is taken out of context, this is a deliberate special case for bindings. IMO this sweeping approach of always expanding attributes is a net negative to the output layout, especially when attribute sets are non-last arguments to function calls. Moreover, this misses several other similar inconsistencies which happen with lists. The current rules have already been tweaked a lot, and I would strongly prefer an approach which refines them a bit more:
|
|
Implemented the above alternative here: #224 |
|
Closing in favor of the above alternative |
Note
Closed in favor of #224
This implements this part of the standard:
nixfmt/standard.md
Lines 1259 to 1267 in f09ce41
This inconsistency was noticed in NixOS/nixpkgs#326430 (comment)
Edit: Though there's also this here:
nixfmt/standard.md
Line 1149 in f09ce41