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

Monaco actions didn't works with keybinding service override #244

Closed
BusinessDuck opened this issue Nov 14, 2023 · 15 comments · Fixed by #246
Closed

Monaco actions didn't works with keybinding service override #244

BusinessDuck opened this issue Nov 14, 2023 · 15 comments · Fixed by #246

Comments

@BusinessDuck
Copy link

Hi Team!

I have a lot of custom actions for monaco-editor, they all registered after initialisation process via createConfiguredEditor call.
And after that al actions didn't works, just ignoring by editor. What i do wrong?

@BusinessDuck
Copy link
Author

init services looks like this:

await monacoLsp.initServices({
	userServices: {
		...modelService.default(),
		...keybindingService.default(),
		...configurationService.default(workspaceUri),
	},
});

@CGNonofr
Copy link
Contributor

can you provide a minimal reproduction code ?

@BusinessDuck
Copy link
Author

Do you have a ready demo stand with basic configuration which can help me start working on it?

@CGNonofr
Copy link
Contributor

isn't the demo here enough?

@BusinessDuck
Copy link
Author

import getKeybindingsServiceOverride, { initUserKeybindings } from '@codingame/monaco-vscode-keybindings-service-override'
image

I am looking at the demo, and didn't see initUserKeybindings method in published npm of monaco-vscode-keybindings-service-override

@BusinessDuck
Copy link
Author

I am using editor.addAction to register custom actions, and i see my actions in command palette and context menu, but it isnt called by keyboard shorcuts.

@CGNonofr
Copy link
Contributor

initUserKeybindings is a brand new method that should be available in the very last version

@BusinessDuck
Copy link
Author

Should i use updateUserKeybindings to pass action calls? Like you do with initUserKeybindings

@CGNonofr
Copy link
Contributor

Those 2 methods only allows to update the user keybinding configuration file, like you can do in vscode, it can add new commands

@BusinessDuck
Copy link
Author

BusinessDuck commented Nov 14, 2023

But why it didnt works out of the box? I mean via editor.addAction

@CGNonofr
Copy link
Contributor

It seems to be a regression, the fix is in #246

@CGNonofr
Copy link
Contributor

Do you confirm the fix?

@BusinessDuck
Copy link
Author

Not able to build project, packages issues, i am waiting until language client will be released, i let you know

@kaisalmen
Copy link
Collaborator

Not able to build project, packages issues, i am waiting until language client will be released, i let you know

7.0.2 is available

@BusinessDuck
Copy link
Author

Thanks for the notification about release. Looks much better, working well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants