latex-lsp / texlab

An implementation of the Language Server Protocol for LaTeX
GNU General Public License v3.0
1.49k stars 51 forks source link

texlab reports dublicate and unused label in macro definition #1119

Closed MajoranaOedipus closed 3 months ago

MajoranaOedipus commented 3 months ago

Issue

Consider defining some macros in the preamble:

\documentclass{article}
\newcommand\mylabel[1]{\label{#1}}          % (1)
\newcommand\myanotherlabel[1]{\label{#1}}   % (2)

\begin{document}
Hey! \mylabel{there}
\end{document}

Texlab reports both in (1) and (2) that the label #1 is unused and dublicate.

Expected Behaviours

Texlab should either

Maybe related links

1093

Version info

texlab 5.12.4

Confermed both in VS Code with texlab extension and Vim with coc-texlab