I want to have a TreeView in my VS Code extension, and I want to be able to right-click on items in the view and have a context menu with actions in it. The official way to do this is to add it to the menus object of the manifest:
"view/item/context": [
{
"command": "myExtension.myAction",
"when": "view == myExtension",
"group": "inline"
}
]
The command myExtension.myAction now (as far as I can tell) has to be added to the commands section of the manifest. This causes it to show up in the command palette. This is very inconvenient. My contextual action is meaningless outside of the context of right-clicking on an item, it would just clutter up the command palette.
Is there any way of hooking view actions up with commands without having them show up in the command palette?