Home > OS >  How to get Intellisense on Visual Studio (VS) Code to work on Python
How to get Intellisense on Visual Studio (VS) Code to work on Python

Time:01-20

I have Visual Studio Code on my laptop and setting it up for the first time and am having trouble making Intellisense work. I downloaded the python extension. When I tried to type a syntax, I don't see a drop down of the available methods.

What I did so far was press F1> type 'open settings'> and see that the option is turned on. It looks like the setting is on, screenshot below line 18. I'm not sure if there is something I'm missing. Would anyone happen to have an idea of how I can have the auto complete functionality to work?

enter image description here

CodePudding user response:

Have you tried Ctrl Space or hovering some code?
Also do you have "Visual Studio IntelliCode" extension installed?

If neither Ctrl Space nor hovering work, it is recommended to restart VS Code (https://code.visualstudio.com/docs/editor/intellisense#_troubleshooting)

CodePudding user response:

Intellisense was provided by the Language Server, The default value of it is Default.

Default: Automatically select a language server: Pylance if installed and available, otherwise fallback to Jedi.

So, it's a little weird of your problem, could you try to install the Pylance and set it as the Language Server? Add this in the settings.json file:

"python.languageServer": "Pylance",
  •  Tags:  
  • Related