问题
I'd like to reuse the "play" button icon used in the debugger toolbar for a new menu item I'm adding from an extension.
Is there a way to set up the icon information in "package.json" to use that existing svg already in VSCode or do I have to supply my own for extensions?
回答1:
Yes you can use built-in icons, they are called Codicons.
Here is a list of them: https://code.visualstudio.com/api/references/icons-in-labels
To use them in your package.json, you will put "icon": "$(iconIdentifier)"
.
Notice they will not work like this:
"icon":
{
"light": "$(iconIdentifier)",
"dark": "$(iconIdentifier)"
}
来源:https://stackoverflow.com/questions/42403009/using-built-in-icons-for-extension-menus