Skip to content

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

@aeschli

Description

@aeschli

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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions