I defined this macro:
\newcommand\afigure[4][]{%
\begin{figure}%
\centering%
\includegraphics[#1]{#2}%
\caption{#3}%
\label{#4}%
\end{figure}%
}
TeXstudio has an auto-complete feature for labels, which is quite handy. However, when I use the above macro, the label I give isn't recognised by the editor, and so it does not appear on the list of auto-completable (sic) labels. Is there a way of telling TeXstudio to take the fourth argument there and consider it as being given inside a \label macro? Thanks!

\afigurein the autocomplete list of macros, but not the fourth argument of this command added to the list of labels of my document. – mathbekunkus Mar 01 '21 at 23:19.cwlis active by checking the respective box inConfigure TeXstudio>Completion>Permanently active completion files:– schoekling Mar 01 '21 at 23:41