vscode: Emmet does not work in js/jsx files for VS Code 1.62.2(Universal)

Does this issue occur when all extensions are disabled?: Yes/No

  • VS Code Version: 1.62.2
  • OS Version: macOS 10.15.7

Steps to Reproduce:

  1. Download VS Code v1.62.2 on a Mac.
  2. Create an file in the path pages/index.js.
  3. Create a simple functional component like:
function HomePage(props) {
  return (
    <div>       
        <title>NextJS Events</title>
    </div>
  );
}
  1. Type div.test in the div and press Tab.
  2. Observe that nothing happens.
  3. Disable all extensions.
  4. Restart VS Code.
  5. Observe that the same issue occurs.

Notes: I added the following code in settings.json and then restarted VS Code. The same issue occurs when I try to use Emmet.

{
   "emmet.includeLanguages": {
      "javascript": "javascriptreact"
    }
}

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 3
  • Comments: 19 (8 by maintainers)

Most upvoted comments

I found a fix!

I could solve this by enabling emmet.triggerExpansionOnTab:

"emmet.triggerExpansionOnTab": true

I don’t know why this setting has to be enabled for it to work, but it works!

@shiraz @rickyalmeidadev

I am experiencing this issue after updating to version: 1.62.3

@preIdiot the fix by @rzhao271 is in 1.63, so either use Insiders or wait for the next release, due in early December.

This regression is from the extension not activating in time for those file types. For example, if you manually expand an abbreviation with the command in the command palette, then the extension activates, and suggestions show up again.