Reputation: 97
How I can enable PHP syntax and PHP autocomplete in HTML files in vscode?
Default vscode can't see PHP in HTML files.
Upvotes: 1
Views: 22112
Reputation: 4006
The PHP Intelephense extension will forward requests to the vscode html language server when outside of <?php ?>
and provide php intellisense when inside <?php ?>
you must be in php
language mode.
*Disclaimer - I'm the author
Upvotes: 3
Reputation: 1385
There is an issue when you mix match with html, php and js. They might fix. Meanwhile, you have to look for other tools. issue - https://github.com/Microsoft/vscode/issues/6616
There are tools to do so. Search them on google.
One of that kind is
https://marketplace.visualstudio.com/items?itemName=HvyIndustries.crane
Upvotes: 0