You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, lists are formatted quite differently compared to attrsets. I think, that most of the arguments for why attrsets are formatted the way they are, apply equally well to lists. Therefore, lists should be formatted in a way similar to attrsets.
Small example input
{attrset={first=1;second=2;};list=["first = 1""second = 2"];longer_list_name=["this is""a list that""is barely longer""than one line"];}
Expected output
{attrset={first=1;second=2;};list=["first = 1""second = 2"];longer_list_name=["this is""a list that""is barely longer""than one line"];}
Actual output
{attrset={first=1;second=2;};list=["first = 1""second = 2"];longer_list_name=["this is""a list that""is barely longer""than one line"];}
P.S. The ugly line break after longer_list_name = is actually a slightly more general problem that doesn't only affect lists, but also other elements that nixfmt doesn't "want"/know how to split. I'll be opening a separate issue for that problem shortly.
The text was updated successfully, but these errors were encountered:
Description
Currently, lists are formatted quite differently compared to attrsets. I think, that most of the arguments for why attrsets are formatted the way they are, apply equally well to lists. Therefore, lists should be formatted in a way similar to attrsets.
Small example input
Expected output
Actual output
P.S. The ugly line break after
longer_list_name =
is actually a slightly more general problem that doesn't only affect lists, but also other elements thatnixfmt
doesn't "want"/know how to split. I'll be opening a separate issue for that problem shortly.The text was updated successfully, but these errors were encountered: