-
-
Notifications
You must be signed in to change notification settings - Fork 66
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Description
When an empty list is within a long line, it is used as a "good place" to insert line breaks. Previously this was not the case, and parentheses would be used instead.
Note, this seems to affect lists but not attrsets.
Somewhat related to #265, originally spotted in the wild nix-community/nixvim#2209 (comment)
Small example input
{
config_file_path = defaultNullOpts.mkNullable (with types; either str (listOf str)) [] "Some example long text that causes the line to be too long.";
other_example = defaultNullOpts.mkNullable (with types; either str (listOf str)) {} "Some example long text that causes the line to be too long.";
}Expected output
(previous behavior)
{
config_file_path = defaultNullOpts.mkNullable (
with types; either str (listOf str)
) [ ] "Some example long text that causes the line to be too long.";
other_example = defaultNullOpts.mkNullable (
with types; either str (listOf str)
) { } "Some example long text that causes the line to be too long.";
}Actual output
{
config_file_path = defaultNullOpts.mkNullable (with types; either str (listOf str)) [
] "Some example long text that causes the line to be too long.";
other_example = defaultNullOpts.mkNullable (
with types; either str (listOf str)
) { } "Some example long text that causes the line to be too long.";
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Projects
Status
Done