LanguageServer.jl icon indicating copy to clipboard operation
LanguageServer.jl copied to clipboard

default_juliaformatter_config not same as JuliaFormatter default?

Open xgdgsc opened this issue 2 years ago • 3 comments

https://github.com/julia-vscode/LanguageServer.jl/blob/48ea5bf6d207c8698fb563b5403eadbbd4335561/src/requests/features.jl#L143 from my understanding it is different than JuliaFormatter.jl default . Is it the reason I have to create a .JuliaFormatter.toml file for every project? Especially the margin setting.

xgdgsc avatar Oct 31 '23 12:10 xgdgsc

Yes, the defaults are different. In general the defaults in VS Code are meant to be very minimal, i.e. a lot less opiniated than the current defaults for JuliaFormatter. We at some point had a plan how to unify this, but we somehow got stuck in the middle... Probably worth revisiting this, as it is pretty annoying...

davidanthoff avatar Oct 31 '23 21:10 davidanthoff

Other options might not make a huge difference in view. Would you mind me changing margin to 92 before a unified solution is available ?

I' m surprised when I heard some one use https://marketplace.visualstudio.com/items?itemName=0h7z.vscode-julia-format&ssr=false#overview for formatting.

xgdgsc avatar Nov 01 '23 03:11 xgdgsc

Would you mind me changing margin to 92 before a unified solution is available?

I think we actually agreed that JuliaFormatter would change its default to be less opinionated. One key thing is that by default we don't want any line breaks added or removed, so I don't think we should change the VS Code default right now, just to change it back again once we unify.

davidanthoff avatar Nov 02 '23 00:11 davidanthoff