I would like to customize the settings for text highlighting on TexStudio.
I'm working with lot of big and small equations and using the breqn package. Here is some sample code:
\documentclass{article}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{mathpazo}
\usepackage[mathpazo]{flexisym}
\usepackage{breqn}
\newcommand{\eq}[1]{\begin{dmath}#1\end{dmath}}
\begin{document}
A small inline equation: $small$\\
A regular non-inlined equation:
\begin{equation}
Regular = \omega \times \delta
\end{equation}
A big equation that might need line breaks:
\begin{dmath}
Big = \omega \times \delta + bla + bla + bla + bla + bla + bla + bla + bla + bla + bla + bla + bla + bla + bla + bla
\end{dmath}
The way I'd like to deal with this:
\eq{something = \omega + \delta}
\end{document}
And the result is fine:
However, when working on the text editor of TexStudio, the code looks like this:

My question: Is there a way to get TeXstudio to understand that the dmath environment is an equation environment so that it does not highlights the math symbols in red but use the formatting used in the equation environment? Would it be possible to do the same with the custum command as well?

.cwlfile I think, see e.g. https://tex.stackexchange.com/questions/102272/texstudio-how-to-add-custom-highlighting-for-custom-environment – Torbjørn T. Jan 29 '18 at 08:19.cwl. Reading the documentation on cwl classification format will also be useful – Troy Jan 29 '18 at 10:08