Reputation: 51
I use Visual Studio Code both on my work Windows laptop, and on my Ubuntu PC at home.
There's a functionality that I can see from my Windows vscode that I'd like to have on my Ubuntu one as well, but can't find whether it's a setting, extension, or something else.
The functionality is this: python imports are highlighted in green, and if they are not used, they are dimmed.
Windows screenshot, how I want it to work:
Ubuntu screenshot, how it currently is:
Does anyone know where I should look? I'm using the same colour theme on both, Monokai.
Thanks!
Upvotes: 4
Views: 6535
Reputation: 223
For me the fix was running Developer: Restart Extension Host
from the command palette (ctrl+shift+p)
Upvotes: 0
Reputation: 1680
As @Łukasz Kwieciński mentions in his comment, the solution was Pylance. Installing Pylance and restarting the VSCode issue fixed the issue
Upvotes: -1
Reputation: 51
I fixed it by installing the extension Settings Sync and syncing settings and extensions of my two installations. If it was an extension indeed, it probably was fixed by removing the Python Extension Pack and installing Python for VSCode.
Upvotes: 1
Reputation: 4775
You will get the linting warnings by pip installing flake8.
You also need to add this setting to your settings.json file:
"python.linting.flake8Enabled": true
Upvotes: 0