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:
- Download VS Code v1.62.2 on a Mac.
- Create an file in the path
pages/index.js
. - Create a simple functional component like:
function HomePage(props) {
return (
<div>
<title>NextJS Events</title>
</div>
);
}
- Type
div.test
in thediv
and press Tab. - Observe that nothing happens.
- Disable all extensions.
- Restart VS Code.
- 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)
I found a fix!
I could solve this by enabling
emmet.triggerExpansionOnTab
:I don’t know why this setting has to be enabled for it to work, but it works!
@shiraz @rickyalmeidadev
@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.