Closed buksy90 closed 10 months ago
I found it, here is what I've done
function setupMyLang() {
// Make sure to use this `useMonaco` over `import * as Monaco from 'monaco-editor';`
const monaco = useMonaco();
if(!monaco) return;
monaco.languages.register({
id: 'myLang',
});
monaco.languages.setMonarchTokensProvider('myLang', {
defaultToken: 'invalid',
tokenizer: { ... },
});
}
// Call this on clientSide once before creating editor
setupMyLang();
// Last thing to do is to use language when creating monaco editor
<MonacoEditor v-model="codeInternal" lang="myLang" />
Hi, I have defined custom language syntax using https://microsoft.github.io/monaco-editor/monarch.html
How do I configure my monaco to use it please?