Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VSCode add parentheses when autocompleting functions

Is is possible to tweak VSCode so that when function gets autocompleted, it is written with () instead of just plain function name?

For example when I type str and autocomplete to strlen I would like to get strlen(), it saves quite some time.

like image 379
Rokas Lakštauskas Avatar asked Apr 05 '19 10:04

Rokas Lakštauskas


2 Answers

It can be solved by ticking javascript.suggest.completeFunctionCalls property up. Run code snippet to see the gif.

<div style='position:relative; padding-bottom:calc(40.34% + 44px)'><iframe src='https://gfycat.com/ifr/CleverActualHornbill' frameborder='0' scrolling='no' width='100%' height='100%' style='position:absolute;top:0;left:0;' allowfullscreen></iframe></div>
like image 57
snr Avatar answered Oct 08 '22 06:10

snr


For Python when using the Python extension the relevant setting is:

python.autocomplete.addBrackets

like image 37
Eyal Levin Avatar answered Oct 08 '22 05:10

Eyal Levin