Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

html emmet in php files VS Code

Can I use html emmet in .php files? It works in .html files.

my settings:

{
"editor.insertSpaces": false,
"editor.tabSize": 2,
"editor.detectIndentation": false,
"editor.renderWhitespace": "none",
    "editor.renderControlCharacters": true,
    "php.validate.executablePath": "C:/xampp/php/php.exe",
    "emmet.includeLanguages": {
        "php": "html"
    },
    "emmet.showExpandedAbbreviation": "always",


}
like image 753
LukaszB Avatar asked Oct 20 '25 21:10

LukaszB


2 Answers

These are the settings that fixed my problem

    "emmet.includeLanguages": {
        "php": "html"
    },
    "emmet.showExpandedAbbreviation": "always",
    "html-css-class-completion.enableEmmetSupport": true,
    "emmet.syntaxProfiles": {
        "php": "html"
    },
like image 68
LukaszB Avatar answered Oct 22 '25 15:10

LukaszB


I actually think you just need to enable tab completion to your settings.json

"emmet.triggerExpansionOnTab": true,

like image 31
Aaron Avatar answered Oct 22 '25 16:10

Aaron



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!