microsoft / monaco-editor

A browser based code editor
https://microsoft.github.io/monaco-editor/
MIT License
40.24k stars 3.58k forks source link

Please help me to build new language syntax highlights #856

Closed Serhioromano closed 6 years ago

Serhioromano commented 6 years ago

I am trying to add highlight support for Structured Text (IEC 61131-3 standard) language for PLC. I understand how to register and create my tokenizer file. This is not the problem.

What I cannot understand how to test it flowerless. How to have editor opened in the browser, and after changing my files, refresh it and see how highlights works. If I run npm run watch I do not see any server to be created or any note where can I see an output.

I try to do in in monaco-languages repository.

I am sorry I know it is not an issue as you expect but it is an issue for me. I asked question on stackoverflow, but I was not able to get desired answer. I have other place to turn in.

alexdima commented 6 years ago

@Serhioromano if you use Monarch, you can use https://microsoft.github.io/monaco-editor/monarch.html . If you use a manual written tokenizer, then you need to build your own interactive playground. It should not be too difficult.

Serhioromano commented 6 years ago

@alexandrudima if you use Monarch, you can use https://microsoft.github.io/monaco-editor/monarch.html.

So, I start building in Monarch, and when I finish, simply copy\paste to monaco-languages repository. Right?

alexdima commented 6 years ago

Yes, that is my workflow.

Serhioromano commented 6 years ago

Thank you. Works fine for me too.