latex-lsp / texlab

An implementation of the Language Server Protocol for LaTeX
GNU General Public License v3.0
1.56k stars 52 forks source link

How to show Build Error message in `neovim` to show what was wrong? #836

Open amalgame21 opened 1 year ago

amalgame21 commented 1 year ago

I am using the https://github.com/nvim-lua/kickstart.nvim init.lua script and configure it to use texlab lsp.

When I type :TexlabBuild to build the tex file, when all things in the .tex file is correct, the bottom left corner display Build Success

However when the .tex file have something wrong, like I comment out the `% \end{document}

type :TexlabBuild to build the tex file, bottom left corner display Build Error, but nothing more.

In vimtex, the Error message will pop up to show what was messed up in the file.

In texlab, how can I see the error message to see which part causing build error?

pfoerster commented 1 year ago

@amalgame21 I am not familiar with kickstart.nvim but texlab reports build errors using the LSP diagnostics (textDocument/publishDiagnostics) so there should be a way to see them from the client (either through an error list somewhere or they are shown inline)

Unpredictability commented 1 year ago

Hi, I have the same problem. The chktex diagnostics works well and I can see a sign wherever there's an error. But when I write something bad and the chetex couldn't recognize, I build it and only get a Build Error message. I am confused where the error is. but texlab compiles much faster than vimtex, so I still want to use texlab to compile.

pfoerster commented 1 year ago

@amalgame21 @Unpredictability Can you try the same thing with texlab 4.3.2? ChkTeX diagnostics are published through the same channel as the build errors but the project resolution might be wrong so the build errors are not picked up properly.

krisfans commented 1 year ago

Hi, I have the same problem. I use sublime text 4 with sublimelsp/LSP-TexLab. If I compile my .tex file successfully, I can get waring message. But if I fail to compile my .tex file , the lsp client will only show Build error and there is no LSP diagnostics message .

anwaralameddin commented 2 weeks ago

Hello, there are a couple of things that may be relevant here: