Open VukanJ opened 1 year ago
Same issue. nvim v0.7.2 ltex-ls 16.0.0 JAVA binary and paths correctly set by the ltex-ls script to the release directory
This does not happen with: vim 9.0 coc.nvim ltex-ls
I also see the error about the java logging class
Solved by setting filetype from plaintex to tex.
Also solved by writing let g:tex_flavor = "latex"
in ftplugin/tex.vim
I can confirm that setting the tex flavor in ftplugin seems to solve the problem of missing diagnostics. Thanks a lot, @cipollone . In my lua settings I added
vim.api.nvim_create_autocmd(
{
"BufNewFile",
"BufRead",
},
{
pattern = "*.tex",
callback = function()
vim.opt.filetype = "tex"
end
}
)
and under "after/ftplugin/tex.vim" the line you suggested
Describe the bug ltex-ls refuses to check grammar in some latex documents (and reports unexpected errors) while it works fine in main.tex and some other random files which are not the main.tex file.
Steps to reproduce start neovim Install ltex-ls with mason.nvim Create main.tex with minimal setup:
A spelling diagnostic appears for "documenet", this is expected. Then create a file introduction.tex and write
No diagnostic appears despite the typo and the LspLog contains the following errors:
Expected behavior
Sample document I use the default setup, no further configuration.
LTeX configuration I do not configure ltex-ls, at all. I just installed it with mason.nvim
LTeX LS log see error messages above
Version information nvim 0.9.4 ltex-ls 16.0.0
Additional context/information