material-extensions / vscode-material-icon-theme

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

Wrong Angular routing module file icon association #305

Open ghost opened 6 years ago

ghost commented 6 years ago

The "angular" icon is associated with "somefilename.module.ts" files and "somefilename-routing.module.ts" files. Is it possible to associate the "routing" icon with "somefilename-routing.module.ts" files without breaking the association of the "angular" icon with "somefilename.module.ts" files? I tried {"-routing.module.ts": "routing"} but that doesn't work. And of course `{".module.ts":` "routing"} associates both "somefilename.module.ts" files and "somefilename-routing.module.ts" files with the "routing" icon, what I don't want. There must be a way though since the Angular Doc examples on Stackblitz manage to do the trick ...

PKief commented 6 years ago

@Huxon At the moment this is not feasible because of the API of VS Code. I'm not sure how StackBlitz was implemented but as far as I know it does not really rely on the API of VS Code. They can implement additional features that are still not available in VS Code itself.

The related issue of VS Code can be found here: https://github.com/Microsoft/vscode/issues/12493. Something similar was already requested in other issues like https://github.com/PKief/vscode-material-icon-theme/issues/196.

Sven-Moon commented 3 years ago

Can I +1 this? It makes sense that there would be a way for the routing icon to show up appropriately.

mrmokwa commented 3 years ago

VS code has changed a lot since 2018. Is it possible now to do it? A nice example is stackbliz (example)

PKief commented 3 years ago

Unfortunately, it's still not possible to implement this feature request. I always check the release notes of VS Code but it wasn't announced yet. Thanks for providing the example with stackblitz. Stackblitz is using its own way to implement the icons, most likely with a regular expression. But this is not the same way as the extension API of VS Code allows extensions to customize the icons right now.

mrmokwa commented 3 years ago

As a workaround, what I did, was renaming my routes. app-routing.module.ts -> app.routing.ts Looking awesome

snalesso commented 11 months ago

Still not working as of v4.32.0

PKief commented 11 months ago

Still not working as of v4.32.0

It's also still not possible to implement this feature, please read this comment, it's still up to date: https://github.com/PKief/vscode-material-icon-theme/issues/305#issuecomment-853370666