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

Allow selective overriding of file explorer and workbench icon associations, instead of overriding all icons #139477

Closed
hamirmahal opened this issue Dec 19, 2021 · 2 comments
Assignees
Labels
info-needed Issue requires more information from poster

Comments

@hamirmahal
Copy link
Contributor

Problem Statement

I'd like to, for example, create a new programming language.

I'd like to change the icon file association for my programming language, so that a logo for my programming language appears instead of the default icon.

For simplicity, let's say I'm creating a fictitious GitHub programming language that has files that end in .gh and my language makes use of a github script, for which I am also updating the icon.

If I just do

        "iconThemes": [
            {
              "id": "override",
              "label": "Only override a few icons",
              "path": "./override-icon-theme.json"
            }
        ],

in the contributes section of package.json, and override-icon-theme.json is

{
	"iconDefinitions": {
		"_github_logo": {
			"iconPath": "./GitHub-Mark-120px-plus.png"
		}
	},
	"fileExtensions": {
		"gh": "_github_logo"
	},
	"fileNames": {
		"github": "_github_logo"
	}
}

then I end up with

Screen Shot 2021-12-19 at 12 11 50 PM

Notice how all icons are gone, except for the ones I specified.

How do I keep all icons, except for the specific ones I want to override?

Even if I were to just copy-and-paste extensions/theme-seti/icons/vs-seti-icon-theme.json, and merge

{
	"iconDefinitions": {
		"_github_logo": {
			"iconPath": "./GitHub-Mark-120px-plus.png"
		}
	},
	"fileExtensions": {
		"gh": "_github_logo"
	},
	"fileNames": {
		"github": "_github_logo"
	}
}

with that, that would be a hindrance to developers who use, say, extensions/theme-defaults/fileicons/vs_minimal-icon-theme.json, since now they have to use extensions/theme-seti/icons/vs-seti-icon-theme.json as their "fallback" icons to see updated icons for the fictitious "GitHub" programming language.

It would be really helpful if I could just selectively pick-and-choose which icon file associations to override, and let the remaining icon associations stay as-is, so as to not disturb developers' other icon preferences.

What are your thoughts on this?

@aeschli
Copy link
Contributor

aeschli commented Dec 31, 2021

There's PR #118846 in the works that allows languages extensions to define a default icon for their language.

Ok to close in favor of #118846?

@aeschli aeschli added the info-needed Issue requires more information from poster label Dec 31, 2021
@hamirmahal
Copy link
Contributor Author

Ah, I was not aware of this. That's fine with me. Thank you for the response!

Another issue I created, #138949, is also basically a duplicate of #118846.

@github-actions github-actions bot locked and limited conversation to collaborators Feb 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

4 participants
@aeschli @sandy081 @hamirmahal and others