vigoux / ltex-ls.nvim

Enhanced integration of ltex-ls for neovim
BSD 2-Clause "Simplified" License
53 stars 7 forks source link

spellfile integration appears broken #8

Open holmanb opened 1 month ago

holmanb commented 1 month ago

Summary

Setting use_spellfile = true doesn't use neovim's spellfile.

In neovim I see:

I Test cloud-init for stuff.     ■ 'cloud-init': Possible spelling mistake found.
I Test Cloud-init for stuff.     ■ 'Cloud-init': Possible spelling mistake found.

Despite:

$ cat ~/.config/nvim/spell/en.utf-8.add
cloud-init
Cloud-init

With this lsp disabled, I can :set spell and see no errors. If I remove my en.utf-8.add.spl and en.utf-8.add, I can :set spell and see the spelling highlighted, so neovim itself is finding the file.

my configuration

lspconfig.ltex.setup {
    capabilities = capabilities,
    use_spellfile = true,
    filetypes = { "bib", "gitcommit", "markdown", "org", "plaintex", "rnoweb", "tex", "pandoc", " quarto", "rmd", "context", "html", "xhtml", "mail", "text" },
    language = "auto"
}

version 0.9.5-6ubuntu2

nvim --version
NVIM v0.9.5
Build type: Release
LuaJIT 2.1.1703358377

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"

Run :checkhealth for more info

It looks like this post might have a workaround, however I'd prefer to just use the builtin option if possible.

Maybe I'm assuming something incorrectly or have an incorrect configuration?

holmanb commented 1 month ago

Log:

[START][2024-05-30 11:41:46] LSP logging initiated
[ERROR][2024-05-30 11:41:46] .../vim/lsp/rpc.lua:734    "rpc"   "ltex-ls"   "stderr"    'SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".\n'
[ERROR][2024-05-30 11:41:46] .../vim/lsp/rpc.lua:734    "rpc"   "ltex-ls"   "stderr"    "SLF4J: Defaulting to no-operation (NOP) logger implementation\nSLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.\n"
[ERROR][2024-05-30 11:41:51] .../vim/lsp/rpc.lua:734    "rpc"   "ltex-ls"   "stderr"    "May 30, 2024 11:41:51 AM org.bsplines.ltexls.server.LtexLanguageServer initialize\nINFO: ltex-ls 16.0.0 - initializing...\n"
[ERROR][2024-05-30 11:41:51] .../vim/lsp/rpc.lua:734    "rpc"   "ltex-ls"   "stderr"    "May 30, 2024 11:41:51 AM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked\nFINE: Checking the following text in language 'en-US' via LanguageTool: \"Test cloud-init for stuff.\\nTest Cloud-init for stuff.\\n\\n\"\n"
[ERROR][2024-05-30 11:41:53] .../vim/lsp/rpc.lua:734    "rpc"   "ltex-ls"   "stderr"    "May 30, 2024 11:41:53 AM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment\nFINE: Obtained 2 rule matches\n"
[ERROR][2024-05-30 11:41:55] .../vim/lsp/rpc.lua:734    "rpc"   "ltex-ls"   "stderr"    "May 30, 2024 11:41:55 AM org.bsplines.ltexls.server.LtexLanguageServer shutdown\nINFO: Shutting down ltex-ls...\n"