Closed Chandra-Sekhar-Bala closed 2 years ago
Hello @Chandra-Sekhar-Bala,
Thanks for your suggestion, but there are some reasons that I didn't add patterns by default for example
What pattern should be included by default?
If we add patterns for numbers by default for example [0-9]{1,}
this pattern will convert regular integers but in most languages, integer tokens are not just digits you may include the type formal such as 100i32
or 100l
so if you want to config CodeView for java, for example, should remove our default pattern then add a new one, or add a new one with the same color of default one
What color (theme) will we use for the default patterns? Everyone has his own theme depending on his UI colors, what color should we use? and the user will again try to remove old patterns and then add new patterns with the color he wants
The easy solution If you want to have a predefined pattern you can create a default config in your app that declares them, and then you can add/remove extra patterns, also in the sample app you can find many different patterns and can easily inspire from them
You are right, there will be many issues giving so many things out of the box. Also if a developer gonna use this, we might assume that he/she is able to do this much setup work for themselves. Thanks :)
Is your feature request related to a problem? Please describe. Just like any code editor, having some predefined code and colors would be great.
Describe the solution you'd like As we can't know in which language user will write, we can save some common keywords and leave the rest (keyword he/she wants to add for highlighting) to the user to implement.