Juno keybindings stopped working in VSCode

Had another go at switching to VSCode yesterday, and somehow managed to make the experience worse: I’m using the Juno keybindings from here in my keybindings.json, but for some reason they’ve stopped working.

WIth an empty keybindings.json, I can select a line of code and evaluate it with Ctrl+Enter, however this seems to send the line to the REPL and evaluate there, despite me having set result mode to “inline”.

Once I add either of the two Ctrl+Enter keybindings to my settings:

   {
        "key": "ctrl+enter",
        "command": "language-julia.executeCodeBlockOrSelection",
        "when": "editorTextFocus && editorLangId == 'julia'"
    }

or

    {
        "key": "ctrl+enter",
        "command": "-language-julia.executeJuliaCodeInREPL",
        "when": "editorTextFocus && editorLangId == 'julia'"
    }

Ctrl+Enter stops to work entirely, i.e. selecting a line an pressing it doesn’t do anything. I uninstalled VSCode and nuked every related folder, but after reinstalling from scratch the problem persists. I’m on:

julia> versioninfo()
Julia Version 1.7.0-beta3.0
Commit e76c9dad42 (2021-07-07 08:12 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.0 (ORCJIT, skylake)
Environment:
  JULIA_EDITOR = code
  JULIA_NUM_THREADS 

Has anybody seen this? Any ideas where I’m going wrong here?

I doubt this is related to keybindings. Can you check whether Alt+Enter works with unmodified keybindings?

Nope, doesn’t do anything, neither with code selected nor with the cursor in some code block. I should also have mentioned that I am stuck at Starting Julia Language Server..., but I thought this would be unrelated as I can use Ctrl+Enter to evaluate, but maybe not?

No, we need the LS running to figure out which code block to run. Can you check Outputs > Julia Language Server for errors?

Not 100% sure what that means - is it just the terminal window at the bottom, going to the “Output” tab and then selecting Julia Language Server trace in the dropdown?

That seems to be emtpy…

You’re looking at the wrong one:
image

Hm, I don’t seem to have that:

image

Ah. That’s bad. Can you double check that you have the Julia path set correctly?

I have no path set:

image

which I suppose means it picks up whatever is on PATH for julia? In a normal terminal I get

image

Ah, you’re on 1.7. The extension doesn’t support that yet, unfortunately. Could’ve just read your versioninfo() above…

1 Like

Again, Juno is ahead of the curve :slight_smile:

Is this a general rule that VSCode doesn’t support beta/nightly releases or is there something special about 1.7?

We don’t officially support betas/nightlies, but are usually pretty good about at least not failing quite as drastically on them. The required fix should already be merged, so the insiders build should work.

1 Like