Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
PythonYunfei opened this issue Sep 24, 2024 · 8 comments

Comments

@PythonYunfei
Copy link

PythonYunfei commented Sep 24, 2024

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.

@PythonYunfei PythonYunfei changed the title With it could remove a default settings for an specific file extension or program language. With it could remove a default settings for a specific file extension or program language. Sep 24, 2024
@PythonYunfei PythonYunfei changed the title With it could remove a default settings for a specific file extension or program language. With it could remove a default setting for a specific file extension or program language. Sep 24, 2024
@PythonYunfei PythonYunfei changed the title With it could remove a default setting for a specific file extension or program language. [Feature request:] With it could remove a default setting for a specific file extension or program language. Sep 24, 2024
@PythonYunfei PythonYunfei changed the title [Feature request:] With it could remove a default setting for a specific file extension or program language. [Feature request:] Wish it could remove a default setting for a specific file extension or program language. Sep 24, 2024
@PythonYunfei PythonYunfei changed the title [Feature request:] Wish it could remove a default setting for a specific file extension or program language. [Feature request]: Wish it could remove a default setting for a specific file extension or program language Sep 24, 2024
@mallowigi
Copy link

or just false.

@PKief
Copy link
Member

PKief commented Sep 24, 2024

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
Copy link
Author

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
Copy link
Member

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
Copy link
Member

PKief commented Sep 24, 2024

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

@lucas-labs
Copy link
Member

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
Copy link
Member

PKief commented Sep 24, 2024

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
Copy link
Author

PythonYunfei commented Sep 25, 2024

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants