Having a setup with Rust and WASM, I do have the problem that I can't pass in the monaco parameter to the wireGrammar function. There is no type/instance for the namespace.
However, using an existing wrapper for the monco editor, I already have the API available for calling monaco.languages.setTokensProvider. If I would have an instance to set.
Unfortunately, this is hidden in the wireTmGrammars. It would be great if the API could be extended, to offer some createProvider function, which creates the provider instance, but not setting it.
Having a setup with Rust and WASM, I do have the problem that I can't pass in the
monaco
parameter to thewireGrammar
function. There is no type/instance for the namespace.However, using an existing wrapper for the monco editor, I already have the API available for calling
monaco.languages.setTokensProvider
. If I would have an instance to set.Unfortunately, this is hidden in the
wireTmGrammars
. It would be great if the API could be extended, to offer somecreateProvider
function, which creates the provider instance, but not setting it.Something like:
This would allow one to re-use as much code as possible, but performing the task of setting the tokens provider manually.