bobbylight / RSyntaxTextArea

A syntax highlighting, code folding text editor for Java Swing applications.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Foreground color for colon(:) and comma(,) in json syntax

VikasTiwari199915 opened this issue · comments

I am trying to color the : and , in a json string,
i have tried almost all Token Types but wasn't successful.
The background for the TextArea is very dark and the colon and comma are black, so they are barely visible.

How can i choose a custom color for these two symbols?

i have colored other parts of the json like this :

scheme.getStyle(Token.SEPARATOR).foreground = new Color(97, 221, 253);
//same code for other TOKENS like VARIABLE..

IMG_20240112_153856.jpg

View the wiki here

: in JSON is rendered as a TokenTypes.IDENTIFIER, so you should be able to update that style for JSON. I know that sounds a little odd, and it is, but I think it's because it's a token type not used elsewhere for JSON. Feel free to open a PR if you would like to be a different token type.