我正在尝试创建一个Visual Studio代码扩展,该扩展将向我的触摸栏添加有用的命令。我最多只能添加4个按钮,当它们消失时,它们就会消失。
我的package.json:
"contributes": {
"commands": [
{
"command": "extension.commentLine",
"title": "//"
},
{
"command": "extension.commentBlock",
"title": "/* */"
},
{
"command": "extension.jumpTo",
"title": "→ƒ"
},
{
"command": "extension.rename",
"title": "✎_"
}
],
"menus": {
"touchBar": [
{
"command": "extension.commentLine",
"group": "editing"
},
{
"command": "extension.commentBlock",
"group": "editing"
},
{
"command": "extension.jumpTo",
"group": "editing"
},
{
"command": "extension.rename",
"group": "editing"
}
]
}
}
如何添加更多按钮?也许使其可滚动?