How to find the parameters for a VSCode command in executeCommands()

左心房为你撑大大i 提交于 2020-01-25 10:20:29

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!