When I use the mathpartir package, Tex Studio does not seem to identify that mathpar is a math environment, and highlights all my math mode commands in red. When I hover the mouse over them, it says "math command outside math env"
The document still compiles just fine, without producing any errors. But all those red backgrounds make it harder to read the rules. Is there some way for me to tell Tex Studio that mathpar is a math environment, so those warnings can go away?
I tried checking the "mathpartir.cwl" checkbox inside Configure TexStudio -> Completion, as suggested in this other answer but it made no difference.
By the way, here is the test file I used, in a format that can be copy and pasted:
\documentclass{article}
\usepackage{mathpartir}
\begin{document}
\begin{mathpar}
\inferrule
{\Gamma \vdash e_1 : A \rightarrow B \\
\Gamma \vdash e_2 : A }
{\Gamma \vdash (e_1 \; e_2) : B }
\end{mathpar}
\end{document}



\mathwhile editing my own.styfiles and creating their respectives.cwlfiles. I just couldn't imagine it would be the case for this package. – FHZ Mar 03 '20 at 01:05