I'm using VS Code with the Python and Pylance extensions. I'm having a problem with the Pylance extension not doing syntax highlight for things like modules and my dataframe. I would expect the modules at the top to be colored green and the df variable to be colored blue.
I am using the default Dark+ Color Theme.
Here's a screenshot of my VS Code with Python and Pylance installed an enabled.
- I have tried changing my python.pythonpath setting.
- I've added a sys.path where my packages are installed.
- I made sure to enable editor.semanticHighlighting.enabled in the settings.
- Pylance is in my settings.json as the language server.
- Also tried the most recent Pylance version.
- Tried switching to various Dark/Light themes. No change in behavior.
Here is my settings.json
{
"[python]": {"editor.semanticHighlighting.enabled": true
},
"editor.semanticHighlighting.enabled": true,
"editor.semanticTokenColorCustomizations": {},
"python.condaPath": "C:\\Anaconda3\\Scripts\\conda-script.py",
"python.defaultInterpreterPath": "C:\\Anaconda3\\python.exe",
"python.pythonPath": "C:\\Anaconda3\\python.exe",
"python.languageServer": "Pylance",
"python.terminal.activateEnvironment": true
}
This was working last month so I'm not quite sure what's going on. I'm on Windows 10, VS Code 1.47.1, with the newest extensions. Any thoughts as to why this is happening?