6

I just installed Pylance on VisualStudioCode, my theme is OneDarkPro.

I can manually set the text color with editor.semanticTokenColorCustomizations in settings.json but I wonder if there is a way to simply keep my previous text color.

This is how my code looked like before installing Pylance:

enter image description here

This is how it looks like now:

enter image description here

Furin
  • 532
  • 10
  • 31

1 Answers1

9

This is caused by "Editor semantic highlighting". Please add the following settings to the settings file "settings.json" to turn off semantic highlighting:

"[python]": {
        "editor.semanticHighlighting.enabled": false,
    },

OneDarkPro and Pylance:

enter image description here

Reference: Semantic highlighting colors every variable with same color.

Jill Cheng
  • 9,179
  • 1
  • 20
  • 25