Visual studio code user snippets not working for php. Have restarted VS code and the PC. Still does not work.
User snippet code:
No snippet shows up:
Visual studio code version:
Visual studio code user snippets not working for php. Have restarted VS code and the PC. Still does not work.
User snippet code:
No snippet shows up:
Visual studio code version:
As far as I know VSC won't pick up your php snippets even though your file might end in .php , what you have to do is insert manually <? php ... ?> and afterwards your snippets should start work.
If you don't want to enter <? php ... ?> manually every time you can create a global snippet "Preferences-->User Snippets-->New Global Snippets File. Save the new file to something like "global.code-snippets" and then add your php snippet.
Maybe something like that.
"php tag": {
"prefix": "php",
"body": [
"<?php",
" ${1:code}",
"?>"
],
"description": "php tag"}
Configuring Visual Studio Code for PHP development from here:
