Reputation: 2572
I am using Visual Studio Code and creating a React App. I understand that Vsc comes with Emmet but it does not work with my React App. I have tried putting the following code in settings.
"emmet.includeLanguages": {
"javascript": "javascriptreact",
"xml": {
"attr_quotes": "single"
}
},
"emmet.triggerExpansionOnTab": true,
Upvotes: 30
Views: 36441
Reputation: 2531
To enable Emmet, we need to include the language setting in settings.json
.
For both JavaScript .jsx
and TypeScript .tsx
, add the following config in VS Code user settings:
"emmet.includeLanguages": {
"javascript": "javascriptreact",
"typescript": "typescriptreact"
}
Upvotes: 0
Reputation: 574
Go to setting or press Ctrl + ,
then setting.json then add this:
"emmet.includeLanguages": {
"javascript": "javascriptreact",
"typescript": "typescriptreact"
},
Upvotes: 1
Reputation: 2933
In case the marked answer dont work!
In VS Code open settings using command:
On PC: Ctrl + ,
On Mac: Command + ,
Be sure workspace
is selected
Search Emmet, scroll down to Emmet Include Language
and open settings.JSON
file
Paste the following code and save the file. Reload VS CODE
and it will work!:
{
"emmet.includeLanguages": {
"javascript": "javascriptreact"
}
}
Add item and and its value like this:
Upvotes: 42
Reputation: 351
On PC: Ctrl + ,
On Mac: Command + ,
Make Sure you have added item and value like shown in screenshot below -
Upvotes: 7
Reputation: 51
Go into your settings.json
file and inside the "configuration" object paste this:
"emmet.includeLanguages": {
"javascript": "javascriptreact",
}
Upvotes: 4
Reputation: 1269
install Extension Emmet
go to setting.json then add this:
"emmet.includeLanguages": {
"javascript": "javascriptreact",
}
Upvotes: 5
Reputation: 466
{
"emmet.excludeLanguages": ["markdown"],
"emmet.includeLanguages": {
"javascript": "javascriptreact"
}
}
Add this to your JSON.
Upvotes: 4
Reputation: 34113
Add this to settings JSON:
"emmet.includeLanguages": {
"javascript": "javascriptreact"
}
Upvotes: 81