Since VSCode doesn't seem to feature autocompletion for if, elseif, etc for javascript, php and maybe even more, I wanted to create myself snippets to get around that.
The snippet:
{
"If": {
"scope": "javascript,typescript,php",
"prefix": "if",
"body": [
"if ( ${1:true} ) {",
"\t${2:/// code}",
"}"
],
"description": "generic if statement"
}
}
Tab completion in php works as expected in javascript however it doesn't work at all.
Why is that?
UPDATE:
I have already figured out that there are default snippets for "if" and "ifelse".

The very top one is my snippet.
The build-in ones I have hidden from IntelliSense, so that they are not in the way. But as I said, this is just working for php, not javascript.
Removing my snippet and unhiding the build-in ones just causes that no if-snippet works anymore, not even php. That is the reason why I assumed that vscode has no if-completion support in the first place.
No matter how I put it, it never works :shrug:
ctrl+shift+p>Snippets: Configure User Snippets>New Global Snippets file...> I enter a name > enter > fill in the automatically opened snippets template. The content is as I have posted above. The scope is set for javascript and php but only php works.