domluna / JuliaFormatter.jl

An opinionated code formatter for Julia. Plot twist - the opinion is your own.
https://domluna.github.io/JuliaFormatter.jl/dev/
MIT License
579 stars 69 forks source link

Long and cumbersome unfolding of arrays #787

Open vladdez opened 11 months ago

vladdez commented 11 months ago

This was marked as a problem: image This was a suggestion: image

Is it possible to avoid such long suggestions? Doesn't look like very stylish and useful. It is more a false alarm

domluna commented 11 months ago

https://domluna.github.io/JuliaFormatter.jl/dev/#join_lines_based_on_source and increasing the margin might be what you want. the default style breaks this up into 1 per line if it's over the margin.

vladdez commented 11 months ago

Thanks! That is really helpful. Do you know how to use smth like format_file("test_complexplots.jl", join_lines_based_on_source = true) in Julia Action? Any ways to specify arguments?