James-Yu / LaTeX-Workshop

Boost LaTeX typesetting efficiency with preview, compile, autocomplete, colorize, and more.
MIT License
10.68k stars 532 forks source link

Strange colorizing in equation environment #632

Closed Mrneet closed 6 years ago

Mrneet commented 6 years ago

Thanks for your excellent work on this extension.

I found the color is strange in the equation environment after some version. Most of the codes are green. But what I hope is coloring the keywords or commands. TexStudio works well but I prefer VS Code. image image

And, may I customize the code colorizing?

Thank you.

jlelong commented 6 years ago

Syntax is a two stage process : first, the extension defines scopes for different elements, and then, the theme associates colors to some of the scopes. Customizing colors has to be done on the theme side.

Which theme are you using? I can try to play a bit with the scopes to see if we can find a better look for the most commonly used themes but this is really delicate.

Here are a few examples using different themes

capture d ecran 2018-05-17 a 06 59 10 capture d ecran 2018-05-17 a 07 03 50 capture d ecran 2018-05-17 a 07 04 54

To find out which scope is used for a given element, you can use the function Developper: Inspect TM Scopes.

Mrneet commented 6 years ago

Thank you. I am using the default theme Dark+. I tried the themes in your examples and they work as your figures.