AREA44/vscode-LaTeX-support

Syntax highlight issues with math and lstlisting

Closed this issue · 1 comments

The syntax:

$\sin(x)$
$$\sin(x)$$
\[\sin(x)\]
\(\sin(x)\)

Actual behavior:
image

Expected behavior:
image

The syntax:

\documentclass{article}

\usepackage{listings}
\begin{document}
    \lstdefinelanguage{JavaScript}{
        morestring=[b]`
    }

  \lstset{language=JavaScript}
  \begin{lstlisting}
      let x = `this is a ${string}`
  \end{lstlisting}
  Everything is orange now, that is bad >:
\end{document}

Actualy behavior:
image

Expected behavior:
image

Images from James-Yu/LaTeX-Workshop#195