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 634 forks source link

[Feature request]: Wish it could remove a default setting for a specific file extension or program language #2612

Open PythonYunfei opened 2 months ago

PythonYunfei commented 2 months ago

Currently, it conflicts with the extension AutoHotkey v2 Language Support. image The extension of the picture can automatically distinguish the syntax for the same extension file *.ahk, and then apply a dedicated icon for AutoHotkeyV2 while another icon for AutoHotkeyV1 which is the old icon for old Autohotkey.

But with Material Icon Theme installed, all above will not work, but apply its own icon to all of the **.ahk instead.

I came up with a very simple and effective idea:
Just add an option or setting to remove its own default icon setting for .ahk. It's perhaps like that: image

I think this feature is very necessary, not only for AutoHotkey but also for any other language whose icon has got controled with its dedicated language extension. This feature could avoid Material Icon Theme interfering other extensions.

mallowigi commented 2 months ago

or just false.

PKief commented 2 months ago

It's a valid request. The logic of the extension already covers this by having a "disabled" flag at the icon associations but it's not exposed yet so that it can't be adjusted via settings. I think we can enhance the settings at this point to make that possible.

PythonYunfei commented 2 months ago

It's a valid request. The logic of the extension already covers this by having a "disabled" flag at the icon associations but it's not exposed yet so that it can be adjusted via settings. I think we can enhance the settings at this point to make that possible.

I tested it just now. But currently, it does not work. All the icons of *.ahk turn out to be blank. image Is there anything I missed? Wait for your good news. 👍

lucas-labs commented 2 months ago

Is there anything I missed? Wait for your good news. 👍

The disabled "flag" is implemented internally, but it's not exposed in the public API of the extension as a setting.

PKief commented 2 months ago

Yeah sorry for the misunderstanding, it's currently not possible to adjust it 🫣

lucas-labs commented 2 months ago

Although exposing the disabled option is a great idea, I was thinking that maybe we can also provide two different icons for this case. The extension probably defines two separated language ids for each version of the language (I haven't checked it though).

PKief commented 2 months ago

Although exposing the disabled option is a great idea, I was thinking that maybe we can also provide two different icons for this case. The extension probably defines two separated language ids for each version of the language (I haven't checked it though).

yeah that would be even better to make sure that these icons still fit to the other Material Design icons. @PythonYunfei Can you give an example how these icons look like - I mean the icons which are provided by the extension?

PythonYunfei commented 2 months ago

@PKief @lucas-labs Thank you for the clarification.👍

Although exposing the disabled option is a great idea, I was thinking that maybe we can also provide two different icons for this case.

yeah that would be even better to make sure that these icons still fit to the other Material Design icons. @PythonYunfei Can you give an example how these icons look like - I mean the icons which are provided by the extension?

This is the icon for the new AutoHotkey i.e. V2 version: ahk2 icon_filetype image

The extension probably defines two separated language ids for each version of the language (I haven't checked it though).

The language id of the new AutoHotkey is ahk2: e0afdd3f429467e421096efd101c8370 The language id of the old AutoHotkey is ahk.

When VSCode is starting, the extension AutoHotkey v2 Language Support will apply the new icon to all **.ahk files firstly. But when one of the **.ahk files is opened, the extension will distinguish the file's syntax and switch it to the old AutoHotkey icon, if the syntax is old AutoHotkey.

Material Icon Theme is a great extension👍, expecting it to be better.