Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add InvokeRegisteredEditorCommand to package.json #2145

Closed
SeeminglyScience opened this issue Aug 20, 2019 · 1 comment · Fixed by #2225
Closed

Add InvokeRegisteredEditorCommand to package.json #2145

SeeminglyScience opened this issue Aug 20, 2019 · 1 comment · Fixed by #2225
Labels
Area-Configuration Issue-Enhancement A feature request (enhancement). Up for Grabs Will shepherd PRs.

Comments

@SeeminglyScience
Copy link
Collaborator

You used to be able to (or at least I could have sworn you could) set a key binding to a specific editor command like this:

{
    "key": "alt+shift+s",
    "command": "PowerShell.InvokeRegisteredEditorCommand",
    "args": { "commandName": "ConvertTo-SplatExpression" },
    "when": "editorLangId == 'powershell'"
},

I think they added validation to the keybindings.json so that it would no longer work with "non-public" commands.

We should add the following to package.json > contributes > commands

{
  "command": "PowerShell.InvokeRegisteredEditorCommand",
  "title": "Invoke Registered Editor Command",
  "category": "PowerShell"
},

And also the under package.json > contributes > menus > commandPalette

{
  "command": "PowerShell.InvokeRegisteredEditorCommand",
  "when": "false"
},

After adding these to my local copy it works as expected.

@ghost ghost added the Needs: Triage Maintainer attention needed! label Aug 20, 2019
@SydneyhSmith SydneyhSmith added Area-Configuration Issue-Enhancement A feature request (enhancement). labels Aug 20, 2019
@SydneyhSmith
Copy link
Collaborator

@SeeminglyScience seems like a good suggestion, thanks for providing some steps to get started in case someone has time to do this work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Configuration Issue-Enhancement A feature request (enhancement). Up for Grabs Will shepherd PRs.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants