I'm trying to integrate a new language (built from ANtlr4) into Monaco editor. I was able to try out registering onComplete, hoverHandler etc and I also get the idea on creating a tokenizer. But how can I do syntax validation for this language? I saw sample https://microsoft.github.io/monaco-editor/playground.html#extending-language-services-configure-javascript-defaults where you can set diagnostic options. How can I do the same to a custom language?
You can use monaco.editor.setModelMarkers . e.g. https://github.com/Microsoft/monaco-typescript/blob/master/src/languageFeatures.ts#L123
Most helpful comment
You can use
monaco.editor.setModelMarkers. e.g. https://github.com/Microsoft/monaco-typescript/blob/master/src/languageFeatures.ts#L123