问题
I want to write a vscode extension and use vscode.commands.executeCommands()
, but I don't know what parameters the command I want to use takes.
For example, when I want to use the "actions.find"
command, how do I find out what parameters this specific API accepts?
回答1:
I don't think there's any comprehensive documentation on commands and their arguments at this time. This page does list some of the most important ones though.
For some commands, there's also args
auto-completion in keybindings.json
:

Note that a lot of the built-in commands aren't much of an "API" at all. Looking at its implementation, "actions.find"
in particular does not seem to support any arguments that would be useful to extensions. Compare this to the implementation of "workbench.action.findInFiles", which supports a well-defined set of arguments such as search query etc.
来源:https://stackoverflow.com/questions/59300624/how-to-find-the-parameters-for-a-vscode-command-in-executecommands