vscode Vue文件代码显示不高亮问题

试了很多方法都不行,以下方法可以解决:

把底下这段代码粘贴到 vscode的 setting.json 文件的后面中

"files.associations":{
        "*.vue": "html"
}

粘贴之后:

{
  "cSpell.customDictionaries": {
    "custom-dictionary-user": {
      "name": "custom-dictionary-user",
      "path": "~/.cspell/custom-dictionary-user.txt",
      "addWords": true,
      "scope": "user"
    }
  },
  "editor.formatOnSave": true,
  "liveServer.settings.donotVerifyTags": true,
  "liveServer.settings.donotShowInfoMsg": true,
  "files.autoSave": "afterDelay",
  "editor.mouseWheelZoom": true,
  "[html]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "editor.formatOnPaste": true,
  "editor.formatOnType": true,
  "cssrem.rootFontSize": 75,
  "vetur.ignoreProjectWarning": true,
  "editor.codeActionsOnSave": {
  },
  "files.associations":{
        "*.vue": "html"
    }
}

之后重新打开就可以了

你可能感兴趣的:(问题,vue.js,vscode,javascript)