lsp-latex icon indicating copy to clipboard operation
lsp-latex copied to clipboard

Cannot use when open an exist file with texlab

Open OdinZhang opened this issue 4 years ago • 8 comments

When I create a new file, texlab will work correctly, but when I open an exist file with lsp, my cpu will at a full speed, Emacs won't operate anymore, Emacs costs more and more memory. Here is my config about lsp-latex:

(use-package company
  :init  (global-company-mode)
  :bind (:map company-active-map
	      ("C-n" . company-select-next)
	      ("C-p" . company-select-previous))
  )

(use-package lsp-mode
  :hook ((latex-mode . lsp-deferred)
(tex-mode . lsp-deferred))
  :commands (lsp lsp-deferred)
  :custom
   (gc-cons-threshold 100000000)
   (read-process-output-max (* 1024 1024))
  )

(use-package lsp-ui
  )

(use-package lsp-latex
  :custom (lsp-latex-texlab-executable "D:/Software/TexLab/texlab.exe")
  )

OdinZhang avatar Dec 16 '20 12:12 OdinZhang

I think it is the known unsolved problem of texlab on Windows (https://github.com/latex-lsp/texlab/issues/284). I'm sorry but I don't know any solution except turning lsp-mode off, yet.

ROCKTAKEY avatar Dec 16 '20 13:12 ROCKTAKEY

I think it is the known unsolved problem of texlab on Windows (latex-lsp/texlab#284). I'm sorry but I don't know any solution except turning lsp-mode off, yet.

it seems that texlab analyses other files after execute latexmk. i'm trying to execute clean automatically or you can add a function about which file (only current file) to analyse

OdinZhang avatar Dec 16 '20 13:12 OdinZhang

There are all the configurations on this page, but it seems to have any option about analysed files. So it might be difficult without modifying the source of texlab.exe. I will investigate more.

ROCKTAKEY avatar Dec 16 '20 13:12 ROCKTAKEY

I have added "latexmk -c" in my compile command. Maybe we can create a issue about this under texlab. Maybe we can read about the extension's code for vscode, it works well on it

OdinZhang avatar Dec 16 '20 13:12 OdinZhang

I added "latexmk -c" in my compile command.

If you build .tex files through lsp-latex-build, you can add "-c" to lsp-latex-build-args.

ROCKTAKEY avatar Dec 16 '20 13:12 ROCKTAKEY

I found texlab added .aux into it too, so just delete aux file is enough. Just like del *.aux, or we'll not use synctex after the build.

OdinZhang avatar Dec 17 '20 07:12 OdinZhang

@OdinZhang Sorry for my late reply. Texlab is updated to v3.0.0, and freezing problem seems to be resolved. How is it work on your environment?

ROCKTAKEY avatar Jun 07 '21 11:06 ROCKTAKEY

@OdinZhang Sorry for my late reply. Texlab is updated to v3.0.0, and freezing problem seems to be resolved. How is it work on your environment?

thanks for your reply, but I'm a little busy these days, maybe it works well on my environment, too. if there's any question, I will report you as soon as possible

OdinZhang avatar Jun 08 '21 03:06 OdinZhang