Emmet Not Working in VS Code – How I Fixed It

While using VS Code I had discovered that the Emmet code completion feature was not working to my dismay.

I had searched through some StackOverflow discussions but did not find the exact solution I was looking. I had to do a little more research and troubleshooting to come up with the solution below. See config file example below.

[Click]: File > Preferences > Settings > Extensions > Emmet

You can also use the keyboard shortcut of Ctrl+, (Control Key + Comma)

Look for “Include Languages” setting.  Click the “Edit in settings.json” link

Your needs may be different. In the example below, we use emmet.includeLanguages setting and set the type of file and emmet type of auto-complete you want it to use.

Example: For ASP pages, we’re telling VS Code config to use Emmet html auto-complete library. Hope this explanation makes sense.

I already had some editor settings in the settings file so this is how I added the emmet.includeLanguages to it without breaking it.

This solution worked for me. 🙂

{
"emmet.includeLanguages": {
"javascript": "javascriptreact",
"vue-html": "html",
"razor": "html",
"plaintext": "jade",
"asp": "html"
}
}

{
"editor.fontSize": 14,
"editor.lineHeight": 20,
"files.associations": {
"*.asp": "asp",
".vbs": "asp", // optional
".inc": "asp" // optional
}
}

Hope this post helps somebody! 🙂

~Cyber Abyss

Author: Rick Cable / AKA Cyber Abyss

A 16 year US Navy Veteran with 25+ years experience in various IT Roles in the US Navy, Startups and Healthcare. Founder of FinditClassifieds.com in 1997 to present and co-founder of Sports Card Collector Software startup, LK2 Software 1999-2002. For last 7 years working as a full-stack developer supporting multiple agile teams and products in a large healthcare organization. Part-time Cyber Researcher, Aspiring Hacker, Lock Picker and OSINT enthusiast.