You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can you please add file icons support in the tree view?
I know that access from extension to the DOM is restricted. But it will be good to add some language-id attribute to the tree-view element. For example in the render function. So it will be easy to modify view of files with different types with CSS, without modifying DOM.
And also It will be nice to add possibility to add/modify directly CSS from extension.
Reacted by Dominik Moritz, Daniel Imms, Jeferson Koslowski, Mr Hexagon, Richard Sentino, Charles Chan, Nicolás Parada, Ivo Gabe de Wolff, Zulfikar, Antoine Gersant and 119 more
Reacted by Giampaolo Bellavite and bybram
Reacted by Jorge L. Fatta, Evren Ceyhan, Gavin Owen, Manu Evans, nevada_scout, Josh Addington, Sequoia McDowell, Ladislav M., Filipe Oliveira, Diullei Gomes and 3 more
I agree. Here is a screenshot of what I have in sublime.
Reacted by Bruno Lemos, Ahmed Şeref, Jorge L. Fatta, Marvin Hagemeister, Evren Ceyhan, Gavin Owen, Vo Thanh Dat, Dmitrii Kokorev, Erasin Wang, Kazuki Yamada and 8 more
Reacted by Bruno Lemos, Ahmed Şeref, Jorge L. Fatta, Evren Ceyhan, Mitchell Nemitz, Filipe Oliveira, Asad Sahi, Leonardo Nascimento Cintra and Js
Reacted by Bruno Lemos, mnsr, Islam Sayed, Evren Ceyhan, danielcrk-cn, Andžej Maciusovič, Anh Tran, Vo Thanh Dat, Yukai Huang, MARTIN LEOPOLD GROEDL and 9 more
As seen above, vscode currently adds a folder-icon css class to all folders but a style is not defined for it. So if you want to see folder icon in explorer, all you have to do is add the below styles to /resources/app/out/vs/workbench/workbench.main.css
and copy the below icon images to /resources/app/out/vs/workbench/parts/files/browser/media Folder.png Folder_opened.png Textfile.png
Here is a preview of it in action:
In it's simplest form, implementing the file icon feature would require modifying the above iconClass method to return 'text-file-' + getFileExtension(element.name) and adding corresponding icon svg/font to each css classes (i.e., text-file-js, text-file-md, etc.)
Reacted by YongMa, Filipe Oliveira, Sudhanshu Aggarwal and Simon Lin
Reacted by Dan Mace, Jeferson Koslowski, Philip Giuliani, Diullei Gomes, Lars Kreisz, Bruno Lemos, Skol, Vincent, Georgi Serev, Enrico and 21 more
Nice find Snpai. It would be very easy if they could add another class like text-file text-file-md. So extensions could use it to just add another CSS with all the icons.
One thing though: some files should be themed based off of more than extension. package.json, gulpfile.js, etc should be themed based off of name. I suppose adding built-in support for specific filename classes would be better (faster/less cluttering to the DOM) than adding a class for the entirety of every file's name.
While we wait, does anyone have a comprehensive, "good" looking grayscale icon pack? The icon pack I used doesn't mesh very well with the dark theme and is a little distracting.
Nelson LaQuet (@nelsonlaquet) you made a good point about the gulp, grunt and package.json files and thanks for linking the icons too.
I've updated my PR which puts the filename in to attributes allowing special icons for specific files.
I've also added support for css theming because I feel that this is the cleanest and simplest way to deliver this feature.
Check out my comments here for more info #3200 (comment)
Reacted by JR Halchak, Jeferson Koslowski, Takeo Asai and Marvin Hagemeister
Any progress on this? I want to replace sublime with vscode but it's hard to find file types without icons. I can't believe something so essential is missing...
George S (@gsaadeh) yeah I just found it, thanks! it takes some trial and error to get it installed and working at first though. It'd be a good idea to merge the extension in VSCode's core though 👍
Activity
samueleaton commentedon Nov 21, 2015
I agree. Here is a screenshot of what I have in sublime.
roddolf commentedon Jan 26, 2016
+1
philipgiuliani commentedon Jan 27, 2016
+1 I can find files much faster with the icons!
zippoxer commentedon Jan 30, 2016
Any progress on this?
pflannery commentedon Jan 31, 2016
+1
Maybe its possible to add a language and\or file-ext attributes here for themes to render icons?
TheColorRed commentedon Feb 6, 2016
+1
I mostly have issues trying to distinguish the difference between a file and a folder quickly. There isn't even a text color difference.
san8pai commentedon Feb 18, 2016
What is interesting is that there is logic in place to add icon classes:
https://github.com/Microsoft/vscode/blob/master/src/vs/workbench/parts/files/browser/views/explorerViewer.ts
As seen above, vscode currently adds a folder-icon css class to all folders but a style is not defined for it. So if you want to see folder icon in explorer, all you have to do is add the below styles to /resources/app/out/vs/workbench/workbench.main.css
and copy the below icon images to /resources/app/out/vs/workbench/parts/files/browser/media
Folder.png
Folder_opened.png
Textfile.png
Here is a preview of it in action:

In it's simplest form, implementing the file icon feature would require modifying the above iconClass method to return 'text-file-' + getFileExtension(element.name) and adding corresponding icon svg/font to each css classes (i.e., text-file-js, text-file-md, etc.)
philipgiuliani commentedon Feb 18, 2016
Nice find Snpai. It would be very easy if they could add another class like
text-file text-file-md. So extensions could use it to just add another CSS with all the icons.nelsonlaquet commentedon Feb 26, 2016
This feature is sorely needed, and is trivial to implement. I was able to use Peter Flannery (@pflannery)'s fork and https://github.com/mrmartineau/SetiUI-Icons-Sublime to add in default icons right into the my own build.
One thing though: some files should be themed based off of more than extension. package.json, gulpfile.js, etc should be themed based off of name. I suppose adding built-in support for specific filename classes would be better (faster/less cluttering to the DOM) than adding a class for the entirety of every file's name.
While we wait, does anyone have a comprehensive, "good" looking grayscale icon pack? The icon pack I used doesn't mesh very well with the dark theme and is a little distracting.
pflannery commentedon Mar 10, 2016
Nelson LaQuet (@nelsonlaquet) you made a good point about the gulp, grunt and package.json files and thanks for linking the icons too.
I've updated my PR which puts the filename in to attributes allowing special icons for specific files.
I've also added support for css theming because I feel that this is the cleanest and simplest way to deliver this feature.
Check out my comments here for more info #3200 (comment)
nepaul commentedon Mar 24, 2016
+1
I can find files much faster with the icons!
64 remaining items
leaxoy commentedon Jul 10, 2016
+1
darkguy2008 commentedon Jul 21, 2016
Any progress on this? I want to replace sublime with vscode but it's hard to find file types without icons. I can't believe something so essential is missing...
gsaadeh commentedon Jul 21, 2016
Alemar (@darkguy2008) For now you can use https://marketplace.visualstudio.com/items?itemName=robertohuertasm.vscode-icons until the official support. It works well!
darkguy2008 commentedon Jul 21, 2016
George S (@gsaadeh) yeah I just found it, thanks! it takes some trial and error to get it installed and working at first though. It'd be a good idea to merge the extension in VSCode's core though 👍
MarkPieszak commentedon Jul 26, 2016
If anyone has issues on Windows7 with the icons not appearing:
Just figured it out. For some reason even when pushing "Enable" it doesn't fire the event. I had to do:
ctrl-shift-Pthen type:
Icons EnableThen they appeared. Just a note for anyone else who runs into it!
namoen0301 commentedon Aug 24, 2016
+1
Very useful feature.
aeschli commentedon Sep 2, 2016
Added support for file icon themes. See #10804 for documentation.