J.spenc
J.spenc

Reputation: 359

VSCode is coloring python code strangely?

For some reason VSCode is coloring my Python code strangely. See screenshots below

enter image description here

here

Normally, variables were white. Now they are light blue and hurt to look at. Is there a setting or extension that changes the formatting to these colors? Did the default settings change? How do I make the variables white again?

Here's a screenshot of my whole screen.

enter image description here

VSCode seems to be having trouble importing libraries. Even common ones like Pandas. The error says:

Import "numpy" could not be resolvedPylancereportMissingImports

Upvotes: 0

Views: 350

Answers (1)

kinshukdua
kinshukdua

Reputation: 2004

Posting this as an answer so that it's easier to find in the future.

As @rioV8 suggested this is caused by semantic highlighting

For example, this is VSCode without Semantic Highlighting

enter image description here

And this is with Semantic Highlighting

enter image description here

To disable it, in your settings.json file

set

"editor.tokenColorCustomizations": {
    "semanticHighlighting": false
}

Upvotes: 1

Related Questions