Texlab LaTeX LSP weird behaviour

Hi everyone,

I’m using Texlab as LaTeX LSP. For those wondering, I have already tried to open a discussion at their repo, but got no answer in a long time.

That’s why I post here, to see if someone had/has the same “issue”.

Basically, LSP works fine, except with user defined commands (\newcommand{}).

I’ll make a concrete example. I have defined some commands for “automating” the formatting of some references:

There are two issues there:

  1. One is pretty clear, that the LSP does not understand the context, and signals an error of “undefined reference”.

  2. With such commands, functionalities as goto_definition do not work, while they do work within built-in commands (i.e. \eqref{}).

The same issues didn’t exist in VSCode. But, I see there is a separate implementation for it. Though I guess it only makes the bridge between Rust and JS/TS. So, I wonder why it does not work here…

Thanks!