CodinGame / monaco-vscode-api

VSCode public API plugged on the monaco editor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Monaco actions didn't works with keybinding service override

BusinessDuck opened this issue · comments

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?

init services looks like this:

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

can you provide a minimal reproduction code ?

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

isn't the demo here enough?

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

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.

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

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

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

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

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

Do you confirm the fix?

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

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

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