# Problems with environments in TeXStudio

This document

\documentclass{article}
\usepackage{amsthm}
\newtheorem{lemma}{Lemma}
\newcommand{\mycommand}{Here is the command}
\begin{document}
\begin{lemma}
Here is the lemma
\end{lemma}
\mycommand
\end{document}


is perfectly compiled but the problem is that TeXStudio says that \begin{lemma} \end{lemma} are unrecognized commands when I put the pointer on them and they have an horrible orange background (I know how to disable this but I don't want to because that feature is useful). The same happens when I define another environments. I often define a couple of theorem environments.

But the strange thing is that when I define a new command, TeXStudio does recognize it and the autocompletion feature works with both the new command and the new theorem environments (when I write \begin{lem} a box is shown with my new environment which is cool).

I'd like that TeXStudio recognize my environments.

-
possible duplicate of TeXStudio doesn't recognize some commands –  egreg Apr 12 '12 at 22:58

According to the SourceForge TeXstudio forum entry
http://sourceforge.net/projects/texstudio/forums/forum/907839/topic/5111488
this is solved when using the SVN version of TeXstudio and is fixed.

The proposed solution is to

1. Use the SVN version; or
2. Wait for the updated release (possibly 2.4).
-