Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] support for user defined sytanx highlighting #86

Open
NamelessAshone opened this issue Jan 3, 2020 · 3 comments
Open
Labels
enhancement New feature or request

Comments

@NamelessAshone
Copy link

It would be nice to add support for user defined sytanx highlighting.

@LucienShui
Copy link
Owner

LucienShui commented Jan 5, 2020

Thanks for suggestion. It's a little hard but we would consider this.

@LucienShui LucienShui added the enhancement New feature or request label Jan 5, 2020
@ryanlee2014
Copy link

Do you mean a new feature which is similar to this?
https://microsoft.github.io/monaco-editor/playground.html#extending-language-services-custom-languages

@NamelessAshone
Copy link
Author

NamelessAshone commented Feb 6, 2020

Thanks for the reply :D

Simply use a file to specify the color of one token which is identified by regexp.
This file contains pattern/color_code pairs.
Like this

/regexp parttern/  <color code>|<named color>

/\[error.*/                #FF0000
/\[notice.*/               info
/\[info.*/                 info
/\[[a-zA-Z 0-9:]+\]/       #00FF00

By the way, Monaco Editor is too powerful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants