bitburner-official / bitburner-src

Bitburner source code.
Other
846 stars 274 forks source link

Custom code editor theme doesn't have a different color for primitives + builtin theme keyword quirk #75

Open TheMas3212 opened 2 years ago

TheMas3212 commented 2 years ago

[Snarling] Monokai: Certain keywords are different colors than other keywords, e.g. export async function has different colors for export async and function. Not sure if this is intended. Also true for most of the other builtin themes.

Custom theme: The issue? above is not present (both are colored based on syntax.keyword color), but number and boolean primitives are colored the same way as variable names. IMO it works way better giving these their own color. Because of this issue, instead of using the builtin custom theme feature I've been just injecting css to change the colors on monokai.

Since monokai is the default and custom is what people will want to use if they want to control how their code editor looks, I think these two are really the main ones that matter. e.g. the "light" theme is terrible as far as color separation - but if someone wants a light theme with distinct colors for different stuff, they can just use custom (as long as it has options that allow distinct colors).

image

Edit: To avoid confusion, here's what default monokai looks like for the same code. Color separation between the primitives and variable names, but again two different keyword colors:

image

Snarling commented 1 year ago

"custom theme" still needs a lot of work to give it all the right token types as used by the builtin themes