Skip to content
Advertisement

Visual Studio Code syntax highlighting not working

I am using Visual Studio Code (VSC) as my IDE. My computer just updated to Catalina 10.15.2 (19C57) and since the update, now VSC is not highlighting syntax errors. The extensions I have seem to be working and it recognizes my miniconda python environment.

Is there a solution for this yet? I was avoiding Catalina as I know it has caused lots of errors, but now that I was forced to install it I need a solution as I love VSC.

code with errors

enter image description here

Advertisement

Answer

In my case, the Catalina installation didn’t remove my Python installation.

After checking as suggested by @Brett Cannon in his comment, the update to Catalina uninstalled some extensions from VS Code. These are not available in the VS Code extension Marketplace anymore, so there must be an issue regarding compatibility. I fixed it after I opened my command palette (Command + Shift + p) and typed python: select linter. Then selected pylint, selected the install with conda option, Close/Open VS Code and now it’s working(though it’s still not shown in my extensions section in VS Code). It’s necessary to point out that you will have to install pylint in every Python environment you are using. In my case I have multiple Conda environments.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement