akamud / vscode-theme-onedark

VSCode Theme based on Atom's One Dark theme
MIT License
293 stars 200 forks source link

LaTeX color inconsistency #129

Closed newton108 closed 4 years ago

newton108 commented 4 years ago

Colour inside math mode is different.

Sample code

\documentclass[12pt]{article}
\begin{document}

\(x=1\)
\[
    1 + 1 = 2
\]
\begin{equation}
    1 + 2 = 3
\end{equation}
\end{document}

Filename and Language selected

LaTeX .tex file,

Atom Original theme Screenshot

Screenshot 2020-08-31 at 16 13 57

VSCode theme Screenshot

Screenshot 2020-08-31 at 16 16 57

Versions used

Extra information

The only other extension I use is: LaTeX-Workshop 8.11.1 https://marketplace.visualstudio.com/items?itemName=James-Yu.latex-workshop

akamud commented 4 years ago

Hi, thanks for opening this issue.

LaTeX support is only available through plugins, which I don't plan on officially supporting at the moment due to time constraints.

You can customize the theme for your VSCode, though, as explained here. In order to get the same behavior as the Atom you can just add these customizations:

  "editor.tokenColorCustomizations": {
    "[Atom One Dark]": {
      "textMateRules": [
        {
          "scope": [
            "support.class.math.latex",
            "constant.numeric.math.tex",
            "support.class.math.block.environment.latex"
          ],
          "settings": {
            "foreground": "#98C379",
          }
        }
      ],
    },
  }

You should get the same coloring as Atom: image