不得不说,对于刚接触VSCODE的人来说,微软搞的这个玩意就是一个垃圾。
设置页面各种毛病,一会儿是下拉选择,一会儿是在类似于代码文本中配置,真能恶心死人。今天就发现对于HTML他的智能提示没有问题,但是对于cshtml提示就是垃圾式的存在。通过各种折腾,终于解决。
先安装常用插件:
然后在settting.json中修改:
以下是我的 settting.json的配置
{
"editor.fontSize": 16,
"[javascript]": {
"editor.defaultFormatter": "HookyQR.beautify"
},
"editor.fontFamily": "Monaco,FiraCode-Regular",
"editor.formatOnType": true,
"editor.wordWrap": "on",
"html.format.indentInnerHtml": true,
"html.format.endWithNewline": true,
"editor.defaultFormatter": "HookyQR.beautify",
"editor.foldingStrategy": "indentation",
"editor.wrappingIndent": "indent",
"workbench.tree.indent": 4,
"files.associations": {
"*.vue":"html",
"*.cshtml":"html"
},
"eslint.autoFixOnSave": true,
"eslint.validate": [
"javascript",
"javascriptreact",
{
"language": "html",
"autoFix": true
},
{
"language": "vue",
"autoFix": true
}
],
"[html]": {
"editor.defaultFormatter": "HookyQR.beautify"
},
"search.followSymlinks": false,
"emmet.triggerExpansionOnTab": true,
"emmet.showSuggestionsAsSnippets": true,
"emmet.includeLanguages": {
"cshtml":"html"
}
}