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
I had two feature requests related to how Texlab populates the workspace with documents in the project.
I find quite frequently when editing projects (especially near a deadline) that Texlab is providing me large amounts of warning/error diagnostics (e.g., in Trouble's quickfix menu) for .tex files that are not being used in my active project. For example, this often occurs for me when an 'old' version of a section or appendix is replaced by a new one; the new file gets introduced to the \input{...} statements, and the old file is left around in case text/etc. is needed from it later (or perhaps simply by negligence), although it is no longer \input to the project anywhere. These spurious warnings/errors clutter the diagnostics menu, and they even tend to produce additional such errors when they are no longer used due to things like broken references (which multiply as the rest of the project changes).
It would be nice if there were a way to filter these -- for example, it seems that it could be possible to prune nodes from the workspace dependency graph built in crates/base-db/src/graph.rs (etc.) that have no connections to "triple octagon" files in the workspace. For my use case, it would also suffice if diagnostics for these disconnected nodes could be suppressed with a new option (not sure if this is possible).
Somewhat related to this, I noticed when inspecting dependency graphs for some of my projects that certain files are 'orphaned' (as above) when they are actually linked elsewhere in my project -- I found that this is because by default, an option follow_package_links in crates/base-db/src/graph.rs is presumably disabled. Could there be a way to expose this option, say via a workspace/executeCommand? Is this expected to hurt performance greatly?
Thanks for your work on Texlab!
The text was updated successfully, but these errors were encountered:
for example, it seems that it could be possible to prune nodes from the workspace dependency graph built in crates/base-db/src/graph.rs (etc.)
I would like to prune those nodes as well but at the moment, this would break in scenarios like these:
main1.tex
main2.tex
...
mainN.tex
some_file.tex
If you open some_file.tex in the editor and it does not have \begin{document}, the server will try to search a parent file by walking up the directory tree and loading all TeX files along the way. The server then loads main1.tex to mainN.tex, finds out that none of them reference some_file.tex and unload them right after because they are not open. Effectively, this would happen on every keystroke and severely degrade the performance.
For my use case, it would also suffice if diagnostics for these disconnected nodes could be suppressed with a new option
This would be possible without invasive changes. We could limit the reported diagnostics only to the currently opened projects.
If we want to actively prune unreferenced files, we need to avoid walking up the directory tree for TeX files and instead use something like %!TEX root magic comments.
I found that this is because by default, an option follow_package_links in crates/base-db/src/graph.rs is presumably disabled. Could there be a way to expose this option, say via a workspace/executeCommand?
This flag was introduced in order to avoid having to load the entire TeX distro if you reference a package and are using something like TinyTeX where the distro is part of your home directory.
Hi,
I had two feature requests related to how Texlab populates the workspace with documents in the project.
.tex
files that are not being used in my active project. For example, this often occurs for me when an 'old' version of a section or appendix is replaced by a new one; the new file gets introduced to the\input{...}
statements, and the old file is left around in case text/etc. is needed from it later (or perhaps simply by negligence), although it is no longer\input
to the project anywhere. These spurious warnings/errors clutter the diagnostics menu, and they even tend to produce additional such errors when they are no longer used due to things like broken references (which multiply as the rest of the project changes).It would be nice if there were a way to filter these -- for example, it seems that it could be possible to prune nodes from the workspace dependency graph built in crates/base-db/src/graph.rs (etc.) that have no connections to "triple octagon" files in the workspace. For my use case, it would also suffice if diagnostics for these disconnected nodes could be suppressed with a new option (not sure if this is possible).
follow_package_links
in crates/base-db/src/graph.rs is presumably disabled. Could there be a way to expose this option, say via a workspace/executeCommand? Is this expected to hurt performance greatly?Thanks for your work on Texlab!
The text was updated successfully, but these errors were encountered: