I have been updating my configuration to use the native LSP setup in Neovim 0.11 but have ran into an issue with the LTeX/LTeX+ language servers, which are used for spellchecking. Both are essentially identical, with LTeX+ being an actively maintained fork that is a drop-in replacement for LTeX.
For both markdown and bib files, the configuration works as expected for both LSPs and I get correct spellchecking. For tex files however, the LSP attaches to the buffer just as with markdown and bib, but no diagnostics are shown whatsoever. The output of checkhealth vim.lsp reads:
vim.lsp: Active Clients ~ - ltex (id: 1) - Version: ? (no serverInfo.version response) - Root directory: nil - Command: { "ltex-ls" } - Settings: {} - Attached buffers: 1 In the case of LTeX:
I was able to replicate this issue with no other plugins loaded whatsoever by opening the different filetypes with nvim -u minimal.lua <file.filetype>, where the contents of minimal.lua is:
vim.lsp.config("ltex", { cmd = { "ltex-ls" }, filetypes = { "bib", "tex", "markdown" }, root_markers = { { ".git" } }, }) vim.lsp.enable({ "ltex" }) vim.opt.rtp:prepend(vim.fn.stdpath("data") .. "/lazy/lazy.nvim") require("lazy").setup({ "mason-org/mason.nvim", opts = {}, }) This assumes the use of the lazy.nvim package manager and mason to install the LSPs.
With this I can be sure that no other plugins are messing with the LSP somehow.
To do the same test with LTeX+, ltex becomes ltex_plus and ltex-ls become ltex-ls-plus in the minimal.lua.