Created
December 12, 2019 14:17
-
-
Save amazzalel-habib/de976bac0296819517b61a7c99938992 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as monaco from "monaco-editor-core"; | |
import { languageExtensionPoint, languageID } from "./config"; | |
import { monarchLanguage } from "./TodoLang"; | |
export function setupLanguage() { | |
(window as any).MonacoEnvironment = { | |
getWorkerUrl: function (moduleId, label) { | |
return './editor.worker.js'; | |
} | |
} | |
monaco.languages.register(languageExtensionPoint); | |
monaco.languages.onLanguage(languageID, () => { | |
monaco.languages.setMonarchTokensProvider(languageID, monarchLanguage); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment