I have written a CodeMirror extension to JupyterLab for syntax highlighting, it works well for my target kernel/language, but it changes the highlighting for other kernels/languages to this language. Any clue why this would happen? The relevant code are:
When you register an extension using the IEditorExtensionRegistry token then it applies to all editors. What you want to do instead is to register a language using the IEditorLanguageRegistry token. It has addLanguage() method which accepts IEditorLanguage interface.
Feel free to ask any follow-up questions if you are stuck, it seems that (oddly) there is no example extension for this one.