Arguments for Commands in VS Code

So, obviously, there are arguments for commands and registering a command like

vscode.commands.registerCommand("bla", (arg1: any, arg2: any) => {});

brings a arg1strange object containing only one key, and context; an object containing some information about - you guessed it - context.

The user also cannot specify arguments. Not through the command palette, not for key bindings.

That is, these arguments are only for internal things or should they be used by the extension developer?

+4
source share
1 answer

In keybindings, you can specify arguments as such:

{
    "command": "workbench.action.tasks.runTask",
    "key": "alt+d",
    "args": "docker"
}
0
source

Source: https://habr.com/ru/post/1624420/


All Articles