-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Implementation of some editor.action commands needed for plugin API #5222
Conversation
Signed-off-by: Josh Pinkney <joshpinkney@gmail.com>
@@ -309,6 +309,22 @@ export class PluginVscodeCommandsContribution implements CommandContribution { | |||
* Show Opened File in New Window workbench.action.files.showOpenedFileInNewWindow | |||
* Compare Opened File With workbench.files.action.compareFileWith | |||
*/ | |||
|
|||
commands.registerCommand({ id: 'editor.action.rename' }, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hello, are these commands should be handled more globally https://github.com/theia-ide/theia/blob/33590a9a8fc9899fdd0f0ed57cb3ea4871adf6e1/packages/monaco/src/browser/monaco-command.ts ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@benoitf Fixed. I wasn't exactly sure where to define the commands so I defined them with the editor commands. If they should be somewhere else let me know!
We have a PR to expose monaco editor commands: https://github.com/theia-ide/theia/pull/4275/files#diff-50091b54c279f7fa9bf0acce18541c06R243 But decided against doing it in the editor extension: #4275 (comment) I would rather go with #4275 if we are fine with supporting only subset of commands. cc @svenefftinge |
@akosyakov That looks like a much better solution and gives us a lot more commands. For keybindings coming from VSCode keybinding plugins they all use something like 'editor.action.formatSelection' [1] rather than 'monaco.editor.action.formatSelection' which means almost all of the keybindings won't register. [1] - https://github.com/alphabotsec/vscode-eclipse-keybindings/blob/master/package.json#L178 |
Signed-off-by: Josh Pinkney joshpinkney@gmail.com
This PR makes 'editor.action.rename', 'editor.action.formatSelection', 'editor.action.formatDocument' available.
Related issue: eclipse-che/che#13007, #5215, #5216