Issue
I'm using VS Code for Python on a Mac. The syntax highlighting is very buggy for me. With the dark modern theme, I see:
While class names, built-in functions and function names (when defining the functions are colored, most of the other code is simply white. I expected function calls to be of a different color than variables.
Other themes have the same problem. What is wrong, and how do I fix it?
Solution
If you already have the Python extension installed, and are using the Default Modern theme (which supports this colorization), then perhaps you've disabled "semantic token color customizations" (editor.semanticTokenColorCustomizations
).
When my settings.json
contains this:
"editor.semanticTokenColorCustomizations": {
"enabled": false
},
My code looks like this:
When I remove this setting from my settings.json
, the colors are returned to normal:
Some other settings to check are:
- Token color customizations (
editor.tokenColorCustomizations
) - Color customizations (
workbench.colorCustomizations
) - Your color theme -
Dark (Visual Studio)
looks almost identical, but doesn't have semantic token color customizations.
Answered By - Miguel Guthridge
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.