In my case, it was just the theme issue. After the latest update, VSCode changed the theme to Dark Modern which is fine, but I wanted to use my existing one so I selected the Dark Theme (but my previous one was actually Dark+).

The difference between the two is the syntax highlighting feature so switching to the Dark+ Theme fixed the syntax highlighting not being enabled.

Answer from Irfan wani on Stack Overflow
🌐
Reddit
reddit.com › r/vscode › how to fix/configure python syntax highlighting?
r/vscode on Reddit: How to fix/configure Python syntax highlighting?
August 27, 2024 -

Python syntax highlighting has recently stopped working correctly, even without any extensions enabled.

Is there a way to configure this? I cannot find any good resources on this, other than extensions providing custom syntax highlighting. This is something that is shipped with VSCode out of the box, so I would assume that it can be configured somehow?

A few things I checked:

  1. I'm on the latest VSCode version (8/14)

  2. No Python extensions are installed (no pylance etc.).

  3. Changing color theme does not do anything. I don't even have custom themes.

Here is one example: It thinks that UPDATE (inside a comment) is the start of a new syntax node, and the entire highlighting in the file from there is wrong:

🌐
GitHub
github.com › microsoft › pylance-release › issues › 4429
Python Syntax highlighting broken in VSCode - Insiders · Issue #4429 · microsoft/pylance-release
May 22, 2023 - As you can see in the following images, Insiders syntax highlighting isn't working properly. Both programs are using the same theme "Dark modern" although I've already tried all the themes and disabling/enabling all extensions with no lu...
Author   microsoft
🌐
Arch Linux Forums
bbs.archlinux.org › viewtopic.php
VS Code Python Syntax Highlighting Not Working / Applications & Desktop Environments / Arch Linux Forums
April 7, 2026 - VS code , code-marketplace and code-features, installed via pacman or from AUR, does not have proper intellisense or syntax highlighting behavior. Below is the issue: Firstly, there is no highlighting of the imports, call to the Node() object, or method call on the Node() object. I would expect highlights for all of these. Secondly, intellisense did not do any auto-completions when writing the initializer, which it always does when I’m working on my mac. ... - Installing/reinstalling python extension, which includes pylance - Installing magic python - Changing my python.languageserver to pylance.
🌐
GitHub
github.com › microsoft › vscode-python › issues › 21401
Syntax highlighting not working after VSCode update · Issue #4490 · microsoft/pylance-release
June 10, 2023 - Type: Bug Python extension for VSCode, v2023.10.0, after update today most of the syntax highlighting does not work. Docstrings are the same color as comments, and functions, classes, and variables do not highlight. This is making writin...
Author   microsoft
🌐
Manjaro Linux
forum.manjaro.org › support › aur
VS Code Syntax Highlighting Not Working - AUR - Manjaro Linux Forum
December 1, 2023 - VS code and Vscodium on Manjaro, installed via pacman or from AUR, does not have proper intellisense or syntax highlighting behavior. Below is the issue: Firstly, there is no highlighting of the imports, call to the N…
🌐
Reddit
reddit.com › r/vscode › vs code python syntax highlighting only half working
r/vscode on Reddit: VS Code Python Syntax Highlighting Only Half Working
March 30, 2020 -

I've been using both VS Code and Sublime for a while now. I mostly do my python coding in Sublime and I have recently decided to try out VS Code. One issue though.

The syntax highlighting for python is not functioning in the manner I would expect. Here is a .py file opened in both VS Code and Sublime for comparison:

Sublime Text:

https://i.stack.imgur.com/biDjC.png

VS Code:

https://i.stack.imgur.com/r3JVQ.jpg

When comparing the VS Code syntax highlighting to that of Sublime, it appears to only function half correctly.

Tons of stuff that I would expect to receive some form of colored formatting such as function calls, function parameters etc all just appear as white text.

After looking at loads of VS Code python tutorials online, it would definitely seem something is wrong with my setup as everyone else seems to receive function calls/function paramters/etc syntax highlighting.

Troubleshooting progress so far:

  • I have the VS Code python extension installed.

  • I've tried uninstalling and reinstalling VS Code.

  • I've tried uninstalling and reinstalling Python extension.

  • I've tried installing the magicPython extension.

  • Ensuring I have both python2 and python3 installed on my machine

  • Color theme is currently Dark+, however this behavior occurs with all color themes.

  • Made sure the file ends in .py

I'm running on a Mac, if that's relevant.

Any help would be greatly appreciated. Thank you!

🌐
Reddit
reddit.com › r/vscode › highlighting in python doesn't work properly
r/vscode on Reddit: Highlighting in Python doesn't work properly
March 24, 2023 -

I have two files in directory: main.py and test.py

in test.py i have a function:

def test_function():
    print('test')

in main.py I'm trying to access said function by importing:

from test import test_function

when I'm running this code everything is working fine but highlighting doesn't work on test.py

Couple days ago everything was working fine. The only thing I changed in my system - uninstalled AnyDesk software from it. I reinstalled Python extension, vs code itself, even python and nothing fixes the issue.

SOLUTION:

Looks like it's a bug in newest version of Pylance extension. I rolled it back to version v2023.3.10 and problem is fixed.

Find elsewhere
🌐
GitHub
github.com › microsoft › vscode › issues › 190981
Syntax highlighting keeps breaking · Issue #190981 · microsoft/vscode
August 22, 2023 - Type: Bug my syntax highlighting for my python code randomly breaks (see the first variable is just "grey" in the first screenshot) it is seriously annoying. I have looked on many online ...
Author   microsoft
🌐
GitHub
github.com › microsoft › vscode › issues › 230070
Syntax highlighting and docs popup broken for python? · Issue #230070 · microsoft/vscode
September 29, 2024 - Open VScode · Open a python file · It seems to be that syntax highlighting is partially broken. Things that used to be highlighted before updating (such as variables and class names) are now missing colors. This is not a problem with any theme extension as I tried multiple different themes and the result is the same.
Author   microsoft
🌐
GitHub
github.com › Microsoft › vscode › issues › 65713
Python Syntax highlighting/colors are still broken? · Issue #65713 · microsoft/vscode
December 27, 2018 - VSCode's Python syntax highlighting still broken after all plugins are installed. Here is an example of Monokai themes on VSCode and Sublime: Is/Can this be fixed at all ? I see no way to modify JUST the syntax color scheme in VSCode. Sublime and Atom do not have that problem.
Author   microsoft
🌐
Reddit
reddit.com › r/vscode › vs code: no syntax highlighting -- what am i doing wrong?
r/vscode on Reddit: vs code: no syntax highlighting -- what am I doing wrong?
March 17, 2023 -

Hi all.

I'm a complete newb on VS Code.

Below is my hello.c program -- as you can see there is no syntax highlighting.

I have only one extension enabled: Microsoft's C/C++ IntelliSense, debugging, and code browsing. v1.14.4

What am I doing wrong?

(Also, F5 does not actually run anything, but I'd like to solve the syntax highlighting first.)

Thanks in advance!

-C

No syntax highlighting Microsoft's C/C++ IntelliSense, debugging, and code browsing. v1.14.4
🌐
GitHub
github.com › microsoft › vscode › issues › 190397
python syntax highlight, intellisense, and other feature stop working · Issue #190397 · microsoft/vscode
August 14, 2023 - Type: Bug when i open a file in jupyter notebook in vs code, sometimes the following state occurs: 1- the syntax coloring stops working, all text is white except strings and comments, (no colors fo...
Author   microsoft
🌐
SheCodes
shecodes.io › athena › 1850-troubleshooting-syntax-highlighting-in-visual-studio-code
[VS Code] - Troubleshooting Syntax Highlighting in Visual Studio Code
Learn how to solve the issue of multiple-line lists appearing united by a single underline in the code editor Visual Studio Code.
🌐
Developer Community
developercommunity.visualstudio.com › content › problem › 214946 › python-syntax-highlighting-randomly-breaks.html
Python syntax highlighting randomly breaks
March 14, 2018 - Skip to main content · Visual Studio · Guidelines Problems Suggestions Code of Conduct · Downloads · Visual Studio IDE Visual Studio Code Azure DevOps Team Foundation Server Accounts and Subscriptions · Subscriber Access · Microsoft Security Azure Dynamics 365 Microsoft 365 Microsoft ...