Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use suggested method parameters in Visual Studio Code

Visual Studio Code suggests the right parameters for well defined methods as you type them. Is there a way to take them over / insert them straight away? Doesn't feel right to write the parameters with their types by hand...

enter image description here

like image 767
Maximilian Friedmann Avatar asked Apr 03 '16 22:04

Maximilian Friedmann


People also ask

How do I enable suggestions in Visual Studio code?

You can trigger IntelliSense in any editor window by typing Ctrl+Space or by typing a trigger character (such as the dot character (.) in JavaScript). Tip: The suggestions widget supports CamelCase filtering, meaning you can type the letters which are upper cased in a method name to limit the suggestions.

How do I show suggestions in Visual Studio?

The suggestion list of Basic completion appears when you press the default Visual Studio IntelliSense shortcut Ctrl+Space . If necessary, you can always return to the Visual Studio's native's IntelliSense.

How do you add parameters to VS Code?

Select the down arrow on the Quick Actions menu, and then select Add parameter to [method]. You can also access the Quick Actions menu by placing your cursor on the line of the method call, and then either pressing Ctrl+. (period) or selecting the light bulb icon in the file margin.


1 Answers

Something like that exists for javascript & typescript files:

settings.json Ctrl+,

"typescript.suggest.completeFunctionCalls": true,
"javascript.suggest.completeFunctionCalls": true,
like image 66
Alex Avatar answered Oct 13 '22 23:10

Alex