admin管理员组文章数量:1188999
I'm using VS Code to code a React project. When I'm typing my HTML tags, the suggestion box pops up and correctly suggests that I'm typing a <div>
tag, for exmpale. However, hitting Tab key or Enter key do nothing. Not even using my mouse to click on the autosuggest does anything. I've looked it up and adjusted my user settings with no success. In the bottom right corner, I changed it from JavaScript to JavaScript React". I added these to my settings:
{
"emmet.includeLanguages": {
"javascript": "javascriptreact",
"javascript": "html"
},
"emmet.triggerExpansionOnTab": true,
}
These didn't really do anything different. What can do I? It's annoying enough that I'm thiking of going back to Atom. Having to not only type each tag seperately but then having to position the closing tag afterwards is destroying any productivity.
I'm using VS Code to code a React project. When I'm typing my HTML tags, the suggestion box pops up and correctly suggests that I'm typing a <div>
tag, for exmpale. However, hitting Tab key or Enter key do nothing. Not even using my mouse to click on the autosuggest does anything. I've looked it up and adjusted my user settings with no success. In the bottom right corner, I changed it from JavaScript to JavaScript React". I added these to my settings:
{
"emmet.includeLanguages": {
"javascript": "javascriptreact",
"javascript": "html"
},
"emmet.triggerExpansionOnTab": true,
}
These didn't really do anything different. What can do I? It's annoying enough that I'm thiking of going back to Atom. Having to not only type each tag seperately but then having to position the closing tag afterwards is destroying any productivity.
Share Improve this question asked May 24, 2018 at 18:12 A. CamA. Cam 1492 silver badges10 bronze badges4 Answers
Reset to default 24Try the following steps:
- From the bottom right click on Language Mode (which might be showing html)
- In the search section (at the top) of the box that pops up, search for "react".
- Two React options might appear: javascript react and typescript react.
- Choose the "Javascript React".
Try adding this to your settings:
"files.associations": {
"*.js": "javascriptreact"
}
click on the setting -> click on the (open JSON setting) at the top right of vs code then paste this line of code "emmet.includeLanguages": {"javascript": "javascriptreact"},
- Go to settings
- Search For "emmet"
- Find Emmet: Include Languages
- Add Item: "javascript": "javascriptreact"
本文标签: javascriptAutocomplete of HTML tags in React aren39t working in VS CodeStack Overflow
版权声明:本文标题:javascript - Autocomplete of HTML tags in React aren't working in VS Code - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1738401446a2084801.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论