Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slowdown in lsp-mode because the sever reports errors on TinyTex LaTeX distribution instead of only in the current project #1028

Closed
maikol-solis opened this issue Mar 4, 2024 · 2 comments · Fixed by #1030
Labels
enhancement New feature or request

Comments

@maikol-solis
Copy link

The whole description and logs about this issue are here (emacs-lsp/lsp-mode#4356).

The problem is that the server is sending a lot of calls for loaded packages and their TeX files, like

[Trace - 04:35:01 AM] Received notification 'textDocument/publishDiagnostics'.
Params: {
  "diagnostics": [],
  "uri": "file:///Users/maikol/Library/TinyTeX/texmf-dist/tex/latex/base/ltluatex.tex"
}

The issue was fixed by this commit (1a2ad9e), but my best guess is that this line also requires an additional filter for "tex" files.

let is_pkg = uri.ends_with(".sty") || uri.ends_with(".cls");

WDYT?

Best.

@maikol-solis maikol-solis changed the title Slowdown in lsp-mode because reports errors on TinyTex LaTeX distribution instead of only in the current project Slowdown in lsp-mode because the sever reports errors on TinyTex LaTeX distribution instead of only in the current project Mar 4, 2024
@pfoerster
Copy link
Member

@maikol-solis

but my best guess is that this line also requires an additional filter for "tex" files.

We cannot add this here because it would break discovering the project (e. g. \include{foo} would not find foo.tex).

I think the better solution is to never send diagnostics for files that are part of the TeX distro.

@pfoerster pfoerster added the enhancement New feature or request label Mar 7, 2024
@maikol-solis
Copy link
Author

I think the better solution is to never send diagnostics for files that are part of the TeX distro.

Yes, this will solve the issue completely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants