I've just had to start from a fresh setup thanks to equipment failure, and this means configuring VSCode from scratch again. On my old set-up, Jupyter Notebooks (over SSH) would feature rich syntax highlighting identical to that used in raw .py files (photo 1):
Raw .py syntax highlighting
However, in Jupyter notebooks, Pylance and intellisense work (I can mouseover and complete variables), but the rich syntax highlighting never does (photo 2): ipynb lack of syntax highlighting
This worked perfectly fine on my old system, and I was using the Dark+ theme as I am here. Any ideas as to what could be the cause of this? Many thanks all.
Things I have tried:
VSCode 1.60.0 (but the issue was also there in 1.59.x)
Installing the Jupyter Extension First, launch your VS Code and type “jupyter notebook” in the extension search box. Select the first result (Jupyter) and click on the Install button displayed in the middle of the screen: That's it! Once the installation is done, you already have Jupyter Notebook on your VS Code.
To change the text and syntax colors in visual studio code follow the steps given below: Open VS Code editor to change the syntax colors. Go to Settings, which is on the bottom left corner of the VS Code window. In the search field type JSON, and click on the 'Edit in settings.
Upon launching the notebook, there is syntax highlighting (I am guessing default syntax highlighting for Python). As soon as it connects to the Julia kernel, there is no syntax highlighting at all.
Jupyter Notebooks in VS Code. Jupyter (formerly IPython Notebook) is an open-source project that lets you easily combine Markdown text and executable Python source code on one canvas called a notebook. Visual Studio Code supports working with Jupyter Notebooks natively, and through Python code files.
Visual Studio Code supports working with Jupyter Notebooks natively, and through Python code files. This topic covers the native support available for Jupyter Notebooks and demonstrates how to:
Once exported as a Python file, the VS Code debugger lets you step through your code, set breakpoints, examine state, and analyze problems. Using the debugger is a helpful way to find and correct issues in notebook code. To debug your Python file: In VS Code, if you haven't already, activate a Python environment in which Jupyter is installed.
After selecting a kernel, the language picker located in the bottom right of each code cell will automatically update to the language supported by the kernel. If you have an existing Jupyter Notebook, you can open it by right-clicking on the file and opening with VS Code, or through the VS Code File Explorer.
Within a Python Notebook, it's possible to view, inspect, sort, and filter the variables within your current Jupyter session. By selecting the Variables icon in the main toolbar after running code and cells, you'll see a list of the current variables, which will automatically update as variables are used in code.
It can happen because there is conflict with Dependency Analytics extension with jupyter. Try to disable Dependency Analytics extension
I had the same problem and I solved it by switching from "Dark" theme to "Dark+".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With