pythonvisual-studio-codepylance

Visual Studio Code - Intellisense not working on SSH server even though it's installed


So for some reason my intellisense is not working.

I tried the solutions suggested here Visual Studio Code: Intellisense not working.

The solution that seems to help most people is adding "python.autoComplete.extraPaths": [ "${workspaceFolder}/customModule" ], didn't work. Also VS Code says it doesn't recognize python.pythonPath when I add it.

Auto-complete not working, screen capture didn't capture my cursor, but it's right after argparse., which should give the option to auto-complete with a list that includes: ArgumentParser:

Remote server installed extensions:
enter image description here

Settings.json This is settings.json on remote server

{
    "remote.autoForwardPortsSource": "output",
    "python.languageServer": "None",
    "python.analysis.completeFunctionParens": true,
    "python.analysis.diagnosticMode": "workspace",
}

Setup:

Note: Something else off is my "find declaration of function or class" is also not working.


Solution

  • the first solutions are kind of obvious, but ill add them anyway,

    1. Removing reinstalling it both locally and remotely
    2. Make sure VS code is updated to its last version
    3. In settings.json, set a language server in "python.languageServer". The Language Server includes: Jedi(build-in Python extension ), Microsoft, Pylance, since you have already installed Pylance, let's start with that one (if that doesnt work, try the others).
    4. set your python.pythonPath to the path returned in your terminal for which python3