VSCode add parentheses when automcompleting functions

Rokas Lakštauskas picture Rokas Lakštauskas · Apr 5, 2019 · Viewed 10.5k times · Source

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.

Answer

snr picture snr · Feb 8, 2020

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>