Cris
Cris

Reputation: 796

Function arguments suggestion/autocomplete in VSCode for Python

In RStudio, function variables, parameters or arguments are displayed by pressing tab.

While VSCode has a lot of features, I cannot find a similar one for Python.

I found a way for VSCode to show me the definition of the function while hovering in the function itself, but there are no autocompletion for the actual variables of that function (nor suggestions while writing). Besides, the tooltips close itself as soon as I start typing the variables.

enter image description here

Is there a way to get something more similar regarding autocompletion and suggestion of function variables in VSCode while using Python?

Thanks.

Upvotes: 12

Views: 17300

Answers (1)

Jill Cheng
Jill Cheng

Reputation: 10372

According to your description, it is recommended that you use the extension "Pylance", which provides outstanding language service functions.

Its 'Docstrings' and 'auto-completion' functions show us the function parameters and will not close the prompt when inputting:

Part of its function introduction:

enter image description here

Upvotes: 7

Related Questions