Syntax validation of a custom language in Monaco editor

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-03 11:31:34

问题


I'm trying to integrate a custom language to monaco editor and I went through https://microsoft.github.io/monaco-editor/monarch.html to get an idea on syntax highlighting.

But I couldn't find any doc on how we can add error/warning validations through syntax validation for this. In Ace editor we did this by writing a worker and performing validation function within it. Appreciate any links/help on this.


回答1:


I recently done this successfully i just used monaco-css as boiler-plate and the only thing that i have to do now is write a parser for my language and other features that I want in in it. and here is my code.

Add your parser and other language services in lang_services folder in root dir of project.

I think it would be helpful.



来源:https://stackoverflow.com/questions/39957140/syntax-validation-of-a-custom-language-in-monaco-editor

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!