material-extensions / vscode-material-icon-theme

Available on the VSCode Marketplace
https://marketplace.visualstudio.com/items?itemName=PKief.material-icon-theme
MIT License
2.06k stars 631 forks source link

select sub-folder for icon association | specify an icon based on the parent directory #631

Open MrZyr0 opened 4 years ago

MrZyr0 commented 4 years ago

Hi 👋 I have an folder architecture like this:

📦_src ┣- 📂assets ┃ ┣- 📂matrix ┃ ┃ ┣- 📂icons ┃ ┃ ┃ ┗- 📜searchMagnifier_icon_black.png ┃ ┃ ┣- 📂illustrations ┃ ┃ ┗- 📂photos ┃ ┗- 📂vector ┃ ┃ ┣- 📂icons ┃ ┃ ┃ ┗- 📜searchMagnifier_icon_black.svg ┃ ┃ ┗- 📂illustrations ┣- 📂js ┣- 📂php ┣- 📂sass ┣ 📜.gitignore ┣ 📜gulpfile.js ┣ 📜LICENSE.md ┣ 📜NOTICE.md ┣ 📜package-lock.json ┣ 📜package.json ┗ 📜README.md

I've already map _src on src icon but I want to specify a different icon for the matrix/icons and vector/icons folders.

How can I specify an icon based on the parent directory ?

PKief commented 4 years ago

Hey @MrZyr0, this is currently not possible due to a missing extension API support for this.

The only thing you can do is to set custom folder icon associations in your settings.json like this:

"material-icon-theme.folders.associations": {
    "matrix": "images",
    "vector": "svg"
}

This feature is also described here: https://github.com/PKief/vscode-material-icon-theme/blob/master/README.md#folder-associations

MrZyr0 commented 4 years ago

Ok 😥 I'll leave the outcome notifications active if the API changes in the meantime. 😄 Thanks for you help