You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
where each of the chapter directories has the structure
├── chapter1│ └── problems│ ├── problem1│ │ problem1.tex│ ├── problem2│ │ problem2.tex| [many more problem directories]│ └── chapter1.tex
When working on a subfile, like chapter1.tex or problem1.tex, texlab has a long delay (10 seconds or more) before it is able to provide completion suggestions.
I'm guessing this is because my directory structure is very challenging, with many nested \inputs, etc, and many large files.
So I don't really have any expectation that I should be getting project-wide completion quickly.
Consistent with this, the texlab process is taking about 1.4GB of memory.
However, two things that I do find perplexing:
When the completion does come up, it finds some things, but not everything from the project. The keys in the current file seem to always be there, and then there are some from other files in the project, but definitely not all. I can't discern any pattern other than that.
The speed of completion (and suggesting some keys from other files) is not affected by whether I put an empty .texlabroot or texlabroot file in the subdirectory of the subfile (e.g. chapter1 above). From my reading of the Wiki on root directory, I thought that putting such a file in the subfile directory would tell texlab not to search farther up the tree, and so speed up completion. Am I misunderstanding how the root detection works?
This is on texlabv.5.13.0 being used with Neovim, however I have also tried in VS-code and find the same behavior. I don't have any issues with texlab when working on other, smaller projects.
The text was updated successfully, but these errors were encountered:
When the completion does come up, it finds some things, but not everything from the project. The keys in the current file seem to always be there, and then there are some from other files in the project, but definitely not all. I can't discern any pattern other than that.
Have you scanned the initial list returned by the completion list or have you typed a few characters and then checked the list? The server initially only returns at most 50 items to keep the completion fast. Once you type a character, the server starts filtering the results.
I thought that putting such a file in the subfile directory would tell texlab not to search farther up the tree, and so speed up completion.
It depends on which files are already open. If you have opened the main.tex file before, then the server will search the entire dependency graph starting from main.tex. .texlabroot only affects the search if it has not found a parent document yet.
Things you can try out:
You can use the texlab.showDependencyGraph command to check, if the files are actually missing in the dependency graph. For VSCode, you can install this extension to visualize the graph.
Have you scanned the initial list returned by the completion list or have you typed a few characters and then checked the list? The server initially only returns at most 50 items to keep the completion fast. Once you type a character, the server starts filtering the results.
Ok that might be what I am seeing then. (It's a bit hard to tell at current because of the slow completion. Sometimes nothing seems to be returned.)
I created the dependency graph, and it indeed shows a giant one that starts back at main.tex and includes everything in the whole project. I am not opening main.tex in the same instance of either VS-Code or Neovim. Not quite sure how to specify the particular branch to use for an LSP in either VS-Code or Neovim, so I guess I will wait to try that until it is merged into main.
I have a large and complex project that makes extensive use of the
subfiles
package.The structure is basically:
where each of the chapter directories has the structure
When working on a subfile, like
chapter1.tex
orproblem1.tex
,texlab
has a long delay (10 seconds or more) before it is able to provide completion suggestions.I'm guessing this is because my directory structure is very challenging, with many nested
\inputs
, etc, and many large files.So I don't really have any expectation that I should be getting project-wide completion quickly.
Consistent with this, the
texlab
process is taking about 1.4GB of memory.However, two things that I do find perplexing:
.texlabroot
ortexlabroot
file in the subdirectory of the subfile (e.g.chapter1
above). From my reading of the Wiki on root directory, I thought that putting such a file in the subfile directory would telltexlab
not to search farther up the tree, and so speed up completion. Am I misunderstanding how the root detection works?This is on
texlab
v.5.13.0
being used with Neovim, however I have also tried in VS-code and find the same behavior. I don't have any issues withtexlab
when working on other, smaller projects.The text was updated successfully, but these errors were encountered: