Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change an icon of the folder in VS code?

I use this plugin https://github.com/robertohuertasm/vscode-icons

It changes the icon of the files which is nice. I want to give an icon to a specific folder. Like a different icon to the folder which has all CSS files. I know icon of .css and CSS folder should not be the same so I want to have different icons for file and folder. The same I would like to have for javascript folder.

Not sure it's possible or not, though.

like image 610
Jitendra Vyas Avatar asked Oct 30 '16 16:10

Jitendra Vyas


1 Answers

I just installed the vscode-extensions icon from the extension management panel in vscode and it already DOES have different icons for folders called CSS and .css files.

enter image description here

If you want to add your custom icons, there is currently no easy way to do this. Writing about per-rule theme overrides, @aeschli wrote that the team "currently has no plans to do this"

You can, however, fork whichever theme you like and add the custom mappings yourself and/or make a pull request against the original theme. The api describes in detail what to do, but in summary you would associate a folder name with an icon name and that icon name with an actual icon by modifying icons.json:

"iconDefinitions": {
    "_my_folder": {
        "iconPath": "./images/My_Folder_16x_.svg"
    }
},
"folderNames": {
    ".vscode": "_my_folder",
},
like image 108
Llewey Avatar answered Sep 25 '22 10:09

Llewey