Configure Emmet for JSX in VSCode

前端 未结 2 976
温柔的废话
温柔的废话 2021-02-07 08:27

I use css like this:

const styles = {
  foo: {
    color: \'red\'
  }
}

and I want emmet to expand

2条回答
  •  抹茶落季
    2021-02-07 08:58

    Press Ctrl + , or Cmd + , or File > Preferences > Settings. This will open Settings window. Go to Workspace tab > Extensions > Emmet.

    For new vs code version, you'll see a menu called Included Languages. similar to this:

    After enter javascript in the item box and after type javascriptreact in the value field and finally press Add item. Your final output must look like the image below:

提交回复
热议问题