AtomMaterialUI / a-file-icon-idea

Atom Material Icons for JetBrains - Replace File and UI Icons for better visual grepping.
http://www.material-theme.com/docs/configuration/icons-settings/#atom-material-icons-plugin
MIT License
222 stars 28 forks source link

Custom associations for PSI icons #224

Open mallowigi opened 3 years ago

mallowigi commented 3 years ago

This would be harder to do but needs to be done nonetheless

stale[bot] commented 2 years ago

This PR has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 2 years ago

This PR has been automatically closed because it has not had recent activity. You can reopen it by clicking on Reopen pull request. Thank you for your contributions.

undermark5 commented 2 years ago

It would be awesome if there were an option to disable the PSI icons, but fallback to the the filetype association icons.

mallowigi commented 2 years ago

I think it's possible to do via a custom association, which will have the effect of overriding the .java/.php/.kotlin etc icons with your own

undermark5 commented 2 years ago

I don't believe that it is unless I'm doing something wrong, I've configured a "custom" file association (basically just a duplicate of the one of interest), and disabled the PSI icons and the custom type doesn't apply to the files in question (they show the default PSI icon). Also doesn't apply with the PSI icons enabled either.

My main reason for my request above is because I don't particularly care for the PSI icons, but disabling them leaves the icons a mismatched grouping. I believe it has something to do with the fact that the PSI system ends up treating those files differently, and there isn't a way to override the PSI icons used in which situation, however, I believe that the PSI is either aware of the Language association or the file extension because the default Kotlin PSI icons have a Kotlin logo in the lower right whereas the Java ones don't.

Custom PSI associations would solve the issue entirely as I could apply it to all Kotlin language files to show the kotlin icon rather than the associated PSI Class/Interface/Enum icons

mallowigi commented 2 years ago

I suspected it would be the case because of a historic issue where the file associations for php were overriding the psi icons, and a similar issue with Groovy and Kotlin, so I suspect these would work but I'm not sure.

mallowigi commented 2 years ago

Cross that. I remember that I added an exclusion for these associations. That might be why it didn't have an effect for you.

That demands more digging. I suppose you can try it by yourself if you're courageous enough to clone the project.