Mohammed Faour
Mohammed Faour

Reputation: 948

VS Code Loading React file icon instead of JS file icon

I have material icons installed and it was working perfectly showing JS icon, but recently VS code is loading the react icon for JS files for some reason and I can't figure out why.

enter image description here

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": {
       
    }
}

Upvotes: 2

Views: 2848

Answers (1)

Gilles Heinesch
Gilles Heinesch

Reputation: 2990

Try adding the following setting to your config:

"material-icon-theme.files.associations": {
    "**.js": "javascript",
}

With this setting you set the icon for every .js file to the javascript icon

Upvotes: 5

Related Questions