Closed brunotvs closed 1 month ago
Actually, I found two behaviors that I consider undesirable:
import
or subimport
, TexLab appears to be unable to build the document tree.\newcommand{\structure}[1]{
\subimport{#1/}{document.tex}
}
subimport
file1.tex
and, in file1.tex
, I input file2.tex
, TexLab does not seem to consider file2.tex
as part of the same project as file1.tex
.Created this repo showing the errors: https://github.com/brunotvs/texlab_issue
@brunotvs Currently, this is to be expected because the server does not implement the same logic as the TeX engine so in this case, it does not know that \structure{foo}
resolves to \subimport{foo}{document.tex}
. There two ways to solve this issue:
texlab.experimental.labelDefinitionCommands
(difficult to draw the line here on what is useful enough to be hard-coded into the server)@pfoerster Okay, but what about nested subimports?
@pfoerster, in addition, can the .fls file be utilized?
@pfoerster Okay, but what about nested subimports?
If they just use the plain \subimport
command, they should work.
@pfoerster, in addition, can the .fls file be utilized?
Sure, #1160 adds a the .fls
as an additional source for the project detection. With this changeset, your example will work now after compiling the document once.
Sure, https://github.com/latex-lsp/texlab/pull/1160 adds a the .fls as an additional source for the project detection.
Awesome, sounds great.
If they just use the plain
\subimport
command, they should work.
@pfoerster I found that if I add a latexmkrc file, citation and refs from nested submimports stop working as per this repo
The LSP displays an ‘undefined reference’ error in files imported with the import package.