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

[api] finalize icon property of the language contribution point #140047

Closed
aeschli opened this issue Jan 3, 2022 · 2 comments
Closed

[api] finalize icon property of the language contribution point #140047

aeschli opened this issue Jan 3, 2022 · 2 comments
Assignees
Labels
api-finalization insiders-released Patch has been released in VS Code Insiders themes Color theme issues
Milestone

Comments

@aeschli
Copy link
Contributor

aeschli commented Jan 3, 2022

As implemented by #14662 and #118846 (PR)

Language contributors can define an icon for the language.

{
  "contributes": {
    "languages": [
      {
        "id": "latex",
        // ...
        "icon": {
          "light": "./icons/latex-light.png",
          "dark": "./icons/latex-dark.png"
        }
      }
  ]

The icon is used by file icon themes as fallback if they don't have an icon for the language.

  • the file icon theme defines at least one file icon (not just a generic icon for all files such as the Minimal theme)
    -> default language icons do not show in file icon themes like Minimal or None
  • the file icon theme does not define a specific icon for the language
  • icons defined for file extensions or file names always win against the language icon (no change)
  • file icon themes can override this default behavior by defining showLanguageModeIcons: true|false in the theme file.
    • showLanguageModeIcons: true shows the default language icons even if the theme does not specify a file icon
    • showLanguageModeIcons: false prevents that default language icons are used.
@LadyCailin
Copy link
Contributor

My language supports multiple types of file extensions, and it would be nice to have a different icon for each. Is that possible?

@aeschli
Copy link
Contributor Author

aeschli commented Feb 21, 2022

@LadyCailin No, we just allow to set a single language icon.

@github-actions github-actions bot locked and limited conversation to collaborators Feb 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api-finalization insiders-released Patch has been released in VS Code Insiders themes Color theme issues
Projects
None yet
Development

No branches or pull requests

3 participants
@LadyCailin @aeschli and others