lsp-latex
lsp-latex copied to clipboard
Question : difference between lsp-latex and lsp-mode/lsp-tex
Hello,
Just a simple question, I noticed that there is already a support in lsp-mode for latex with lsp-tex which relies on either texlab or digestif servers.
What are the differences between this repository and the lsp-tex embedded package ?
Also, which server, texlab or digestif would oy recommend (on windows 10) ?
Regards
lsp-latex supports all features of texlab, while lsp-tex does not. In contrast, lsp-latex does not support digestif, while lsp-tex does.
| client | texlab | digestif |
|---|---|---|
| lsp-tex | basically supported | supported |
| lsp-latex | fully supported | not supported |
I don't know which server is recommended, and I have never used digestif, but texlab sometimes heavy, even though I don't know whether digestif is heavier than texlab or not. See also other issue in lsp-latex and texlab.
Thanks for your answeer.
It actually starts, but make emacs hang
Withe texlab, do I still need auctex ?
It seems a known problem that texlab freezes emacs. I downgraded texlab to version 1.10 and it works well.
However, if I intentionally introduces an error, the server does not seem to notice it.
When I want to build the pdf with lsp-latex-build , I get :
Rc files read:
C:\Users\edebry/.latexmkrc
Latexmk: This is Latexmk, John Collins, 29 September 2020, version: 4.70b.
Latexmk: Filename '%f' contains character not allowed for TeX file.
Latexmk: Stopping because of bad filename(s).
But it works well with auctex ?
lsp-latex does NOT need AUCTeX at all.
Sorry, I don't have any idea about emacs hanging.
I think %f error occurs because %f feature is not supported by texlab v1.10.
Try the function below, instead:
(defun lsp-latex-build-old (&optional sync)
"Same as `lsp-latex-build', except `%f` is replaced by Emacs.
Older texlab cannot replace `%f`, so use this function instead in that case.
Build synchronously if SYNC is non-nil."
(interactive "P")
(let ((lsp-latex-build-args
(mapcar
(lambda (arg)
(if (string= arg "%f")
(buffer-file-name)
arg))
lsp-latex-build-args)))
(lsp-latex-build sync)))
This function is not tested, so I'd like you to try it and tell me whether it works or not, on your older texlab.
I will add this function to lsp-latex if it works.