-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
indentation bug with YASStyle (?) #387
Comments
this is due to kind of odd parsing where EDIT: actually complete mind lapse this is how call is normally parsed lol, it's just that for YAS style specifically since it relies on the first |
Handles the edge case where the first argument of a Call node is nestable. For example: ``` new{T1,T2}(arg1,arg2) ``` In this case if the indent is set to the offset of the first argument after `(` and `new{T1,T2}` is nested, the indentation will be incorrect. before (aligned to after the initial position of `(`): ``` new{T1, T2}(arg1, arg2) ``` after (aligned to after new position of `(`): ``` new{T1, T2}(arg1, arg2) ```
@ericphanson can you verify #394? |
Yes, looks much much better! JuliaDSP/DSP.jl@e476fef#diff-42b63c32cfe9564f97f2b1c492af2a473460ca00579a8c2ae854db0741ad7f82R42-R47 Bug looks fixed to me! It seems like there's an unusual tradeoff to make between how many type parameters to put on a line vs how many arguments, since more type parameters mean less room per line for the arugments. I think in this case it might be worth making one more line for the type parameters so that the arguments aren't so squished up together, but I understand it might be hard to find the best balance in general. |
#359 may help with that but it's all subjective so it's tricky to figure out what's "best" |
JuliaDSP/DSP.jl@dee38ad#diff-7eb8d556545d1576a135ef609daf44651b1cf2cd46735cb90991b0ffac1b91deR39-R50
this looks strange; I formatted with JuliaFormatter v0.13.5 (Tokenize.jl v0.5.13 to avoid #386) via
format("src/multitaper_spectrogram.jl", style=YASStyle())
. I don't think it should suddenly put all these arguments way indented!The text was updated successfully, but these errors were encountered: