Feature Request: Contribute commands with additional arguments
See original GitHub issueHello, I’m creating an extension to provide easily accessible documentation shortcuts from the command palette in the editor. Currently it does not seem possible to do something like this (where otherArg
would be an arbitrary argument in package.json):
"contributes": {
"commands": [
{
"command": "extension.doSomething",
"title": "Example Title",
"otherArg": "some other argument"
}
]
},
I see that a similar question has been asked here https://github.com/Microsoft/vscode/issues/26436 and also in a resulting (unanswered) SO post here https://stackoverflow.com/questions/43909741/can-i-pass-arguments-to-command-in-contributes-block.
Is this a feature that would be considered? If not, how might this type of thing be accomplished from the extension developer’s perspective? I see there is an args
parameter for command handler functions, but I’m not seeing a way to call executeCommand
from the package.json file.
For reference, here is a screenshot of how my equivalent package looks in the command palette in sublime text:
Thanks!
Issue Analytics
- State:
- Created 6 years ago
- Reactions:14
- Comments:9 (3 by maintainers)
Top GitHub Comments
This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.
Happy Coding!
I believe @bpasero has done that, right?