Closed efaulhaber closed 1 year ago
Since the non-configurable nesting rules came from YAS, you can get pretty close to the old behavior using YASStyle and changing some options to be like SciMLStyle. Perhaps others can get it closer, but these are the settings that should matter based on the docs:
style = "yas"
# use SciML options that are not in YAS
whitespace_typedefs = true
normalize_line_endings = "unix"
# change YAS options that differ from SciML
import_to_using = false
pipe_to_function_call = false
short_to_long_function_def = false
always_use_return = false
whitespace_in_kwargs = true
join_lines_based_on_source = false
separate_kwargs_with_semicolon = false
I understand that #729 is based on a decision to change the SciML style itself, but this has a major impact on everyone using JuliaFormatter with
SciMLStyle
. We useSciMLStyle
because it mostly fits our style, but we don't want to strictly follow the SciML style (especially not now).Code that was perfectly readable before
suddenly becomes much less readable, where it's not clear where the arguments end and the body begins:
For many users, this means a hard breaking change, as it's not configurable.
I'm not asking to undo this decision, I'm just asking to make this optional to allow users to stay with the old, well-known style.