Open
Description
Description
nixfmt currently uses heuristics to find sensible places to insert line breaks, once a line becomes too long.
In the case of multi-arg function calls this can be counter productive, and result in less-readable code than if a more simplistic "one arg per line" approach is taken.
Small example input
{
config_file_path = defaultNullOpts.mkNullable (with types; either str (listOf str)) [ ] "Custom config file path or list of custom config file paths.";
}
Expected output
{
config_file_path =
defaultNullOpts.mkNullable
(with types; either str (listOf str))
[ ]
"Custom config file path or list of custom config file paths.";
}
Actual output
{
config_file_path = defaultNullOpts.mkNullable (with types; either str (listOf str)) [
] "Custom config file path or list of custom config file paths.";
}
Note: there is also some strange line-breaking done within the empty list here. That is #268.
This was originally discussed here nix-community/nixvim#2209 (comment)
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Todo