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 #4356

Open
3 tasks done
maikol-solis opened this issue Mar 4, 2024 · 1 comment
Labels

Comments

@maikol-solis
Copy link

maikol-solis commented Mar 4, 2024

Thank you for the bug report

  • I am using the latest version of lsp-mode related packages.
  • I checked FAQ and Troubleshooting sections
  • You may also try reproduce the issue using clean environment using the following command: M-x lsp-start-plain

Bug description

For a latex file, lsp-mode shows problems with the packages loaded by using usepackage or their dependencies.

This overloads the lsp calls and slows the whole process, making editing the source file nearly impossible.

More detailed debug reports are here (#2417 (comment))

Steps to reproduce

  • Open a new latex file with TinyTex installed (I don't know if it happens with other latex distributions). For example, something simple like this
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath,amssymb}

\begin{document}
\(\alpha+\beta =1\)

\begin{equation*}
\gamma + \delta = (\beta + 1)^2
\end{equation*}

\end{document}
[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 lsp diagnostics is populated with all the errors on internal packages

image

  • Slowdowns to edit the file because the massive information sent to the server.
  • It happens even if lsp-log-io is nil

Expected behavior

The expected behavior is that the server reports the errors only in the current project. I had a similar issue with eglot, and it could be solved directly on the server side (latex-lsp/texlab#986), but I don't understand why it is still happening on lsp-mode.

Which Language Server did you use?

texlab

OS

MacOS

Error callstack

No response

Anything else?

No response

@yyoncho
Copy link
Member

yyoncho commented Mar 4, 2024

Expected behavior
The expected behavior is that the server reports the errors only in the current project. I had a similar issue with eglot, and it could be solved directly on the server side (latex-lsp/texlab#986), but I don't understand why it is still happening on lsp-mode.

Can someone from the serverside help us with that? As you have mentioned it is up to the server to decide what to report.

@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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants