ltex fails to update configuration #209
Comments
Hey that code was actually copied from the lspconfig PR (neovim/nvim-lspconfig#863), I took a look again and it seems like it's since been removed. Will update the ltex entry in this plugin to reflect upstream changes |
It was removed in preparation of new code, but it appears to never have been finished. It was inteded to go into https://github.com/brymer-meneses/grammar-guard.nvim (brymer-meneses/grammar-guard.nvim#4) and @mjlbach indicated that is the best path forward: neovim/nvim-lspconfig#863 (comment) and brymer-meneses/grammar-guard.nvim#5 (comment) @lbiaggi was working on backing porting the local command handlers to the new 5.1 API. This handles things like marking false positives, etc. (the code that was removed from the lspconfig PR). He may have run out of time to work on it (and maybe is using the coc plugin). The code in this repo works with a small change diff --git a/lua/nvim-lsp-installer/servers/ltex/configure.lua b/lua/nvim-lsp-installer/servers/ltex/configure.lua
@@ -126,9 +126,9 @@ configs.ltex = {
root_dir = function(filename)
return util.path.dirname(filename)
end,
- dictionary_files = { ["en"] = { vim.fn.getcwd() .. "dictionary.ltex" } },
- disabledrules_files = { ["en"] = { vim.fn.getcwd() .. "disable.ltex" } },
- falsepositive_files = { ["en"] = { vim.fn.getcwd() .. "false.ltex" } },
+ dictionary_files = { ["en"] = { vim.fn.getcwd() .. "/dictionary.ltex" } },
+ disabledrules_files = { ["en"] = { vim.fn.getcwd() .. "/disable.ltex" } },
+ falsepositive_files = { ["en"] = { vim.fn.getcwd() .. "/false.ltex" } },
settings = {
ltex = {
enabled = { "latex", "tex", "bib", "markdown" }, However, there seems to be some bugs around ltex actually respecting the files contents. In short, I think you can remove the handlers from this repo (go to what the lsp-config PR is now). That makes ltex work but does not handle it's local commands. Folks should use grammar-guard.nvim (after it is extended) to get the local commands. |
Thanks for the context @abalmos! Updated the server config to follow upstream changes. Once the lspconfig PR is merged we can remove the overrides and only provide |
When trying to add false positives or disable a rule in ltex, it returns the error:
E5108: Error executing lua ...taller/lua/nvim-lsp-installer/servers/ltex/configure.lua:14: attempt to index local 'f' (a nil value)
I'm using LunarVim, but I don't think it affects the configuration, I'm using
require'lvim.lsp.manager'.setup("ltex", {})
, that should just load the default config fromlspconfig
The text was updated successfully, but these errors were encountered: