Closed ashvin777 closed 4 years ago
Please create a minimal codesandbox repro rig for me to inspect the situation. Thank you.
Looks like I have fixed it by invoking the await wireTmGrammars(monaco, registry, grammars);
everytime when I switch to a particular grammer. Closing this.
First I would like to thank you for developing this plugin. This is really helping me out to apply better syntax highlight in Monaco editor.
I had an issue where syntax highlight was not applying when I was switching the language of the same editor using
monaco.editor.setModelLanguage
option.My grammar load file looks like below, I am setting grammer for required languages
In Monaco editor component, I am instantiating like below (default language:css)
It works for the default language properly
However when I switch the language of same editor using
It turns off the syntax highlight
I thought earlier that it could be scss grammer loading issue, however it was not because instantiating editor with default "scss" language does load properly
Please let me know if I am missing anything.