Latex-workshop: a setting to disable automatic parsing of .tex files in the workspace.

Created on 3 Aug 2018  路  15Comments  路  Source: James-Yu/LaTeX-Workshop

Description

it appears that LeTeX-Workshop automatically searches for all *.tex files in the workspace and tries to parse them. I would like to be able to disable this feature. I usually have a mix-bag workspaces (C++/Python/LaTeX) and would prefer not to spend any resources to parse random *.tex files I never plan to compile but they happen to be in C++/Python projects' folders.

Log messages

[09:16:25] Parsing <path/to/something/.../some.tex>

How to reproduce

  1. add another project to workspace which happen to have *.tex file.
  2. call Build LaTeX from some other *.tex file in a different folder.

Expected behavior

LaTeX workshop should not parse each and every *.tex file it finds in the workspace.

Actual behavior

there appears to be a background process that looks for all *.tex files in the workspace folders and parse them.

Additional Information

nothing special.

feature-request

Most helpful comment

@davydden we have not had much time to work on this but I am feeling that this is the right time to handle this while working on PR #1199 .
Just to make things crystal clear, LaTeX-Workshop parses all .tex in the workspace to determine the root file and then all the included .tex files. When no root file can be determined, almost no LW feature works: in particular, no intellisense, no building, no outline.

Rather than a setting to completely disable parsing, I am considering adding an exclude directory mechanism to explicitly disable parsing .tex in these directories.

Any comment on that?

All 15 comments

Actually it only parses tex files in the latex project, which is imported/input in the root file.

It does not cost much to parse files at least.

Actually it only parses tex files in the latex project, which is imported/input in the root file.

no, that's not the case. I open and edit a several *.tex files and LaTeX-Workshop picks up some completely unrelated *.tex files from elsewhere, like installation prefixes of libraries.

Please provide a minimal working example.

Please provide a minimal working example.

see how to reproduce.

only parses tex files in the latex project

a bit off-topic, but AFAIK there is nothing like latex project in VSCode, you just have a workspace with folders added. At least I don't mark those folders as being C++, Python or LaTeX projects anyhow. That's also because sometimes they contain all of those inside a single project.

EDIT: I do configure tasks, though, for C++ code.

Why was this closed? I would also like to disable automatic parsing. This makes VSCode unusable for the particular project I'm working on (which can easily have tens to over a hundred .tex files, which are all auto-generated from templates). Any time I modify any of the templates, VSCode starts to parse all of the .tex files in my workspace. I'd prefer it not parse them at all, or perhaps having an option to exclude/include specific directories for parsing.

I also would like to disable automatic complying, because it is too boring while I am writing and saving many times

@gusbemacbe your point has nothing to do with the problem. Just set latex-workshop.latex.autoBuild.onSave.enabled to false.

Interestingly, I want quite the opposite.
https://github.com/James-Yu/LaTeX-Workshop/issues/1153

@davydden we have not had much time to work on this but I am feeling that this is the right time to handle this while working on PR #1199 .
Just to make things crystal clear, LaTeX-Workshop parses all .tex in the workspace to determine the root file and then all the included .tex files. When no root file can be determined, almost no LW feature works: in particular, no intellisense, no building, no outline.

Rather than a setting to completely disable parsing, I am considering adding an exclude directory mechanism to explicitly disable parsing .tex in these directories.

Any comment on that?

Rather than a setting to completely disable parsing, I am considering adding an exclude directory mechanism to explicitly disable parsing .tex in these directories.

That would work for me. Alternative is to limit parsing to certain folders in the workspace. If this is empty, complete workspace is parsed.

If you do this anyway, why can鈥檛 you also include #1153 ?
Not all workspaces have clear static root.
Let me define the folder/pattern of force parsing.

@dbogatov Let's talk about #1153 in #1153 to keep things clear.

@davydden I am hesitating between using an inclusion mechanism and an exclusion one. Not sure, which one is the easiest to use. Maybe, a list of directories or glob patterns to include is easier to define in practice.

a list of directories or glob patterns to include is easier to define in practice.

I would say so.

@jlelong

Finally! I waited for months! Thank you a lot ! :tada:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

domenicozambella picture domenicozambella  路  4Comments

drdebmath picture drdebmath  路  4Comments

BjoernDaase picture BjoernDaase  路  3Comments

LordScree picture LordScree  路  5Comments

sth4nth picture sth4nth  路  3Comments