question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Syntax Highlighting for Julia in VS Code not working at all and broken in VS Code Insider

See original GitHub issue

I reported this issue first on Julia discourse here: https://discourse.julialang.org/t/running-julia-jupyter-notebooks-inside-vscode/47421/13?u=manuel_bergmann I am copying this over here:

I am currently on the stable version 1.53.2 of VSCode with Julia 1.5.3 and I have the exact same issues with it as described previously in the thread: Code runs, but no syntax highlighting and also only old UI. Installed versions:

  • VSCode (stable) 1.53.2
  • Julia (on the system): 1.5.3
  • Julia VS extension: 1.1.32
  • Jupyter VS extension: v2021.2.603412351
  • Platform: Windows 10
  • Running: Locally
  • Python: 3.8.2

image

Again, with the current VS Code Insider version this works. Kinda. The syntax highlighting in many cases seems broken, especially string interpolations.

  • VSCode (insider) 1.55.0
  • Julia (on the system): 1.5.3
  • Julia VS extension: 1.1.37
  • Jupyter VS extension: v2021.4.641214696
  • Platform: Windows 10
  • Running: Locally
  • Python: 3.8.2

image

Note the 2pi marked red as well as the syntax highlighting for the string interpolation being broken. All those things work in regular .jl files in VS Code however:

image

Out of interest I tried the string interpolation in nteract as well and here it was completely broken too (but in a different way):

image

Am I missing something?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
rchiodocommented, Mar 23, 2021

I closed and saved the notebook after I set the syntax to Julia for every cell and after reopening it, every cell was set to Python again

This is actually a known issue. This bug here: https://github.com/microsoft/vscode-jupyter/issues/5148

0reactions
rchiodocommented, Mar 23, 2021

I’m going to enter a new issue for this part:

A notebook created with current stable VS Code will integrate the following metadata, regardless of what kernel was used:

 "metadata": {
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": 3
  },
  "orig_nbformat": 2,
  "kernelspec": {
   "name": "julia-1.5",
   "display_name": "Julia 1.5.3",
   "language": "julia"
  }
 },

I want to make sure our insiders version is not doing the same thing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Running Julia (Jupyter) Notebooks inside VSCode - VS Code
Syntax highlighting “out of the box” will require https://github.com/microsoft/vscode/issues/105229 but the workaround is that you can manually copy the files. ...
Read more >
Change Log · Julia in VS Code
Change Log. All notable changes to the Julia extension will be documented in this file. The format is based on Keep a Changelog....
Read more >
VS code, julia linter doesn't work (on mac) - Stack Overflow
im on the latest vs code + latest julia 1.07 extension + latest macosx. i did a clean installation of vs code, wiping...
Read more >
August 2021 (version 1.60) - Visual Studio Code
Update 1.60.1: The update addresses these issues. ... Settings editor syntax highlighting - Rich syntax highlighting for setting description code blocks.
Read more >
February 2021 (version 1.54) - Visual Studio Code
Update 1.54.2: The update addresses these issues. ... The default download of VS Code for macOS is now a Universal build that runs...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found