[ANN] Julia for VS Code 1.5 released

The answer seems to be provided in post above.

1 Like

I’ve added a link to the definitions, but YMMV on whether that’s gonna be helpful.

1 Like

You are right, thank you.

2 Likes

I’m testing out the new key bindings to see if I can get used to them, but I’ll probably go back to the old Ctrl + Enter. Old habits die hard. And I prefer the simple conceptual model of sending code directly to the REPL, which I first encountered in RStudio. And of course moving the cursor is essential.

2 Likes

Looks great! Is there a VS Code version requirement somewhere that I’m missing? Working on a remote server with an old VS Code version (1.56.2) and can’t find any more recent version than 1.28.8, and wondering if it’s the firewall, the VS Code, or something else that’s wrong…

Yeah, this version of the extension needs VS Code 1.60.1 at least.

1 Like

I am on Linux, and I cannot figure out how to zoom etc the plots. alt moves the whole windows, “Option” (is it the “windows key”?) opens the main menu.

That’s something you’ll have to tell your window manager to stop doing, I think.

1 Like

Yes, that works :slight_smile: .

I started having this error now, when using the “Tag new version” option:

ERROR: type `VersionNumber` is not a valid TOML type, pass a conversion function to `TOML.print`
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:33
  [2] _print(f::Nothing, io::IOStream, a::Dict{String, Any}, ks::Vector{String}; indent::Int64, first_block::Bool, sorted::Bool, by::Function)
    @ TOML.Internals.Printer /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/TOML/src/print.jl:112
  [3] #print#13
    @ /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/TOML/src/print.jl:170 [inlined]
  [4] print(io::IOStream, a::Dict{String, Any})
    @ TOML.Internals.Printer /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/TOML/src/print.jl:170
  [5] (::PkgDev.var"#6#13")(f::IOStream)
    @ PkgDev ~/.julia/packages/PkgDev/jqw0f/src/tag.jl:158
  [6] open(::PkgDev.var"#6#13", ::String, ::Vararg{String, N} where N; kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Base ./io.jl:330
  [7] open
    @ ./io.jl:328 [inlined]
  [8] tag_internal(package_name::String, pkg_uuid::String, pkg_path::String, version::Symbol; registry::Nothing, release_notes::Nothing, credentials::String, github_username::String)
    @ PkgDev ~/.julia/packages/PkgDev/jqw0f/src/tag.jl:157
  [9] tag(package_path::FilePathsBase.PosixPath, version::Symbol; kwargs::Base.Iterators.Pairs{Symbol, String, Tuple{Symbol, Symbol}, NamedTuple{(:credentials, :github_username), Tuple{String, String}}})
    @ PkgDev ~/.julia/packages/PkgDev/jqw0f/src/tag.jl:32
 [10] top-level scope
    @ ~/.vscode/extensions/julialang.language-julia-1.5.5/scripts/packagedev/tagnewpackageversion.jl:29
FINISHED

Does it may have anything to do with some extension upgrade?

Maybe, although I’m not aware of any relevant code having changed. Might also be related to you upgrading your Julia version. Please open an issue.

1 Like

Thanks @pfitzseb . This still took me a while to figure out. The file you need is keybindings.json, but VS Code doesn’t make this so easy to get to. In case it’s not obvious for others, this is ctrl-p then “keyboard shortcuts (JSON)”.

I don’t think it’s even really necessary to open the JSON file and edit there. I’ve been able to configure it back to my preference by editing the list under the keyboard shortcuts in the menu as advised in the other post linked here (gear icon in the lower left → keyboard shortcuts).

1 Like

Hmm, yeah and I just realized editing the JSON breaks other uses of ctrl-enter, like finalizing a git commit. I’ll try your suggestion, maybe that’s better

1 Like

True. Just add "when": "editorTextFocus && activeEditor != workbench.editor.notebook && editorLangId == julia || editorLangId == juliamarkdown"to the new keybinding to fix that.

4 Likes

Ctrl + Enter stopped working for me. Before it was executing the code at the cursor line (+ sending to the REPL) and then moving to the next line. I am no longer able to retrieve this behavior. Any clues?

I’ve been using the default Shift + Enter these days. It seems to work fine. The only downside is that the code doesn’t get colorized by OhMyREPL. I seem to recall that with the old Ctrl + Enter the code did get colorized by OhMyREPL.

2 Likes

@CameronBieganek, thanks.

I’ve been fooled again by the bad habit of keeping very long catch-all scripts, where I test things and don’t clean them up. After a few thousand lines there must be some stuff that confuses the Julia extension (and me for that matter).

Starting on a blank page fixed it.