问题描述
我安装了材质图标,它完美地显示了 JS 图标,但最近 VS 代码由于某种原因正在加载 JS 文件的反应图标,我不知道为什么。
Settings.json:
{
"workbench.startupEditor": "newUntitledFile","workbench.iconTheme": "material-icon-theme","workbench.preferredLightColorTheme": "Monokai++","window.menuBarVisibility": "toggle","editor.minimap.enabled": false,"javascript.updateImportsOnFileMove.enabled": "always","[dart]": {
"editor.formatOnSave": true,"editor.formatOnType": true,"editor.rulers": [
80
],"editor.selectionHighlight": false,"editor.suggest.snippetsPreventQuickSuggestions": false,"editor.suggestSelection": "first","editor.tabCompletion": "onlySnippets","editor.wordBasedSuggestions": false
},"dart.previewLsp": true,"dart.debugExternalLibraries": true,"dart.debugSdkLibraries": false,"[javascriptreact]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
},"liveServer.settings.donotShowInfoMsg": true,"editor.formatOnSave": true,"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},"[css]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},"workbench.colorTheme": "Monokai++","editor.fontWeight": "normal","material-icon-theme.activeIconPack": "none","material-icon-theme.folders.associations": {
},"material-icon-theme.files.associations": {
}
}
解决方法
尝试将以下设置添加到您的配置中:
"material-icon-theme.files.associations": {
"**.js": "javascript",}
通过此设置,您可以将每个 .js 文件的图标设置为 javascript 图标