【发布时间】:2022-01-14 23:59:43
【问题描述】:
如何将其他扩展图标添加到Activity Bar?
我想在源代码管理和调试图标旁边添加新的自定义图标。
我读了this page,但不明白。
我去了路径C:\Users\Moh\AppData\Local\Programs\Microsoft VS Code\resources\app 并将这个配置添加到package.json:
// etc...
"author": {
"name": "Microsoft Corporation"
},
"license": "MIT",
"main": "./out/main",
//***************//
// I added following lines:
"contributes": {
"views": {
"code-runner": [
{
"id": "codeRunner",
"name": "Code Runner"
}
]
}
},
// etc...
但没有任何改变。
我选择的路径正确吗?
写的配置正确吗?
【问题讨论】:
-
你需要贡献一个ViewContainer(活动栏中的图标),然后向这个ViewContainer贡献一个View
-
很遗憾,我还是没听懂。 @rioV8
-
你看过 ViewContainer 和 View 的示例扩展
标签: visual-studio-code vscode-settings vscode-extensions