'How to add an icon to files with certain extensions with a VS Code extension
Right now, I am creating a VS Code extension for a language that doesn't exist yet. I don't want to create a whole file icon theme because this isn't my goal. How can I set an icon to a file with a certain extension?
I have already started creating an extension. It is a really simple one, just syntax highlighting. But I also want to add icons to certain files (with extension .abc, for example) because Visual Studio Code doesn't yet have an icon for this file format in it's icon theme.
Solution 1:[1]
As of v1.64, to set icons for languages from your extension you can use this in your package.json:
"contributes": {
"languages": [
{
"id": "latex",
// ...
"icon": {
"light": "./icons/latex-light.png",
"dark": "./icons/latex-dark.png"
}
}
]
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Mark |
