This is a superset of VSCode add parentheses when autompleting functions
There is a setting in VSCode javascript: plete function calls
that automatically adds in the parentheses and signature when you accept the autoplete suggestion for a javascript function. (The equivalent setting exists for Typescript.)
For example, if you have the function function test(a,b) {return a+b;},
and you type tes
and accept the suggestion, you'll get the full test(a,b)
pleted, not just test
.
However (see gif at bottom for demos),
- it appears not to work in
<script>
tags - it appears not to work for methods, e.g.
document.getElementById()
- it appears not to work for built-ins, like
new Date()
thus restricting its usefulness.
I'm wondering if anyone is aware of a way to extend the autoplete functionality to include these scenarios.
I've opened a Github issue, in case this is a bug, but it's also possible I'm just misunderstand something.
Finally, here's a gif to demo the cases above:
This is all running latest VSCode with no extensions.
This is a superset of VSCode add parentheses when autompleting functions
There is a setting in VSCode javascript: plete function calls
that automatically adds in the parentheses and signature when you accept the autoplete suggestion for a javascript function. (The equivalent setting exists for Typescript.)
For example, if you have the function function test(a,b) {return a+b;},
and you type tes
and accept the suggestion, you'll get the full test(a,b)
pleted, not just test
.
However (see gif at bottom for demos),
- it appears not to work in
<script>
tags - it appears not to work for methods, e.g.
document.getElementById()
- it appears not to work for built-ins, like
new Date()
thus restricting its usefulness.
I'm wondering if anyone is aware of a way to extend the autoplete functionality to include these scenarios.
I've opened a Github issue, in case this is a bug, but it's also possible I'm just misunderstand something. https://github./microsoft/vscode/issues/119035
Finally, here's a gif to demo the cases above: https://gfycat./carefulvibrantblackbuck
This is all running latest VSCode with no extensions.
Share Improve this question edited Mar 17, 2021 at 17:02 ultraGentle asked Mar 17, 2021 at 16:13 ultraGentleultraGentle 6,3472 gold badges26 silver badges58 bronze badges2 Answers
Reset to default 6Ctrl + Shift + P => Settings.json:
"typescript.suggest.pleteFunctionCalls": true,
"javascript.suggest.pleteFunctionCalls": true,
I added these to .vscode/settings.json
and it worked for me:
{
// ...
"typescript.suggest.pleteFunctionCalls": true,
"javascript.suggest.pleteFunctionCalls": true
// ...
}
Type this: await page.getByText('Form Layouts')
. And then press Enter at the hint. DO NOT CLICK on the hints.