How to make TeXstudio recognize \DeclarePairedDelimiter declaration
After the help of @Torbjørn I came up with this workaround.
- Create a
mydefinition.cwl
file and place it in the%APPDATA%/texstudio
folder (I'm using Windows, don't know where it should go in other operative systems). - Add the
\DeclarePairedDelimiter{cmd}{left_delim}{right_delim}#md
line in the.cwl
file. - In TeXstudio Options -> Completion check the box of
mydefinition.cwl
that appeared in the list.
This fixed the problem for me: I get the correct autocompletion for my \abs
and \norma
commands!
Now a little explaination: as far as I could learn (but if anyone has further information please let me know!), the problem comes from TeXstudio .cwl
files, which are not yet complete. There are some packages with some commands which haven't been added to the autocompletion files of TeXstudio yet. The TeXstudio team is working for improving this.