Warning: VSCode formatter shredders code!


#1

I used Visual Studio Code 1.13.1 on Windows10 and
Julia v0.6 to shredder my code.

And this is how you do it: Right click, format document.

Before:

function f(len::Int)
    R = Array{Int}(len)
    a = c+d
R end

After:

function f(len::Int)
    R = Array{Int}(len)
    a = c + d
    end

#2

Thanks for reporting that, I can replicate it. We’ll try to get a bugfix release out ASAP.

Issue on github tracking this: https://github.com/JuliaEditorSupport/LanguageServer.jl/issues/106


#3

We have a release candidate that fixes this here:

It would be great if some folks want to try that and report back. If we don’t hear negative feedback, we’ll probably publish this later tonight to the marketplace.


#4

We just pushed v0.6.2 of the extension to the marketplace and this issue should be fixed in the update.