Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 399
Cris Avatar asked Sep 30 '20 19:09

Cris


1 Answers

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

like image 106
Jill Cheng Avatar answered Oct 28 '22 00:10

Jill Cheng