pythonvisual-studio-codesyntax-highlightingmacos-catalina

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, VSCode is no longer 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 a lot of issues but now that I was forced to install it I need a solution.

code with errors

enter image description here


Solution

  • 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 by doing the following:

    1. Open the command palette (Command + Shift + P)
    2. Type Python: Select Linter and select pylint
    3. Select the Install with Conda option
    4. Restart VS Code

    Now it's working correctly, 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.