Reputation: 193
I have developed a DSL with ANLTR 4 and now I am developing a text editor for this DSL with Angular and CodeMirror and I would like to add syntax highlighting. My question is how to add syntax highlighting for a new language in codemirror.
Upvotes: 1
Views: 2062
Reputation: 30088
Your question has nothing at all to do with Angular, so I removed that tag.
To add syntax highlighting for a new language, you need to provide a custom "language mode" for codemirror. See their documentation at https://codemirror.net/doc/manual.html#modeapi
Upvotes: 1