We just released a first beta v0.12.0.beta.1 for the Julia extension for VS code here. We’d much appreciate it if we could get some testers to try it out and give feedback on bugs before we release it to the marketplace.
This release brings a number of new features and fixes along:
- We added a grid viewer for tabular data. You can use it by calling the
vscodedisplay
function from the integrated REPL. You can pass pretty much any tabular data structure to that function, and then a grid view will open inside VS Code. You can also pipe tabular data into that functiondata |> vscodedisplay()
. If a type either implements the TableTraits.jl interface, or has ashow
method for theapplication/vnd.dataresource+json
MIME type, things will work with this display. The combination of these two should cover pretty much everything, so go ahead and try things like
using Queryverse
load("foo.csv") |> vscodedisplay()
load("foo.feather") |> DataFrame |> vscodedisplay()
load("foo.parquet") |> @filter(_.a>3) |> @mutate(d=_.a+_.b) |> vscodedisplay()
- We finished our support for julia Julia environments. Every window has an active environment, and that will now be used for all IntelliSense that is provided by the language server, all tasks will pick up that enviornment, and of course the REPL as well. When you open a folder, the extension will auto-detect if there is an environment in that folder, and if so, activate that. There is UI provided to change the active environment, and such a change will be saved in the workspace settings, so that when you open the same folder again, the choice of active environment is remembered. Feedback on the particular UI choices, defaults etc. in this space would be really valuable.
- When you run code with Alt-Enter, we no longer just paste that code into the REPL, but instead use a more sophisticated execution model. With that new model, things like
@__DIR__
are properly resolved, function definitions retain accurate line numbers and the code won’t be echoed back to the REPL when you run it. This mode of code execution should also work much better with a lot of code. Ctrl-Enter is unchanged and will just copy-paste code into the REPL. - The Weave preview was broken lately because VS Code deprecated the API we had been using for that. We migrated the Weave support to the current API, so Weave preview should work again.
- We added a test run task that outputs code coverage. If Coverage.jl is installed (ideally in your global v1.1 environment), we also write a
lcov.info
file into the root folder of your workspace. This is especially useful in combination with the excellent Coverage Gutters
VS Code extension: it can show code coverage based onlcov.info
inside VS Code. - We added experimental support for custom sysimages. This support has two parts: First, we added a new build task that will compile a custom sysimage for the current active environment that includes all the packages from that environment. Such a compiled sysimage is automatically stored as
JuliaSysimage.dll
(with platform specific extensions) alongside theProject.toml
for the active environment. Second, if theuseCustomSysimage
configuration is set totrue
(the default isfalse
), such a custom sysimage (if it exists and is newer than theManifest.toml
) will automatically be used for a new REPL session you start in VS Code. Overall this makes for a pretty smooth workflow: you can easily, with one command, compile a custom sysimage for a julia environment, and then any REPLs you start with that active environment will automatically use that sysimage. For some scenarios this can really solve a lot of the latency issues we have these days, but of course this is not perfect: building the sysimage is slow, there is no automatic rebuilding, the caching story for custom sysimages is very basic and I’m sure there are some other problems we haven’t discovered yet. So, keep in mind, this is an experimental feature! Oh, and you need to have PackageCompiler.jl installed for this to work, ideally in the defaultv1.1
environment. - A new command enables you to delete all plots in the plot pane.
- We now preserve the REPL focus when a figure is displayed.
- After you run the doc build task, we now open a web browser with the newly built documentation.
- We now simultaneously support vega 3,4 and 5 and vega-lite 2 and 3.
- One can now use
~
in the setting for the Julia binary. - We fixed the
JULIA_EDITOR
functionality on Mac. - @ZacLN fixed a very large number of issues in the language server. He might also have introduced new features that I am not aware of right now, I’ll let him mention any of those, if they exist :).
If you can, please opt into the crash reporting of the extension! It makes finding and fixing bugs a lot easier for us.
To try the beta download the VSIX file from https://github.com/julia-vscode/julia-vscode/releases/download/v0.12.0-beta.1/language-julia-0.12.0-beta.1.vsix and install using the Extensions: Install from VSIX…
command.
Thanks,
David and Zac