diff --git a/lua/lsp.lua b/lua/lsp.lua index 2ba1996..08390b8 100644 --- a/lua/lsp.lua +++ b/lua/lsp.lua @@ -100,39 +100,6 @@ local servers = { eslint = {}, -- html = { filetypes = { 'html', 'twig', 'hbs'} }, texlab = {}, - ltex = { - filetypes = { - 'markdown', - 'latex', - 'norg', - 'gitcommit', - 'jj', - 'rst', - 'typst' - }, - ltex = { - language = "auto", - diagnosticSeverity = "information", - sentenceCacheSize = 2000, - additionalRules = { - enablePickyRules = true, - motherTongue = "fr", - }, - enabledRules = { - en = { "EN_CONSISTENT_APOS" }, - }, - disabledRules = { - fr = { "APOS_TYP", "FRENCH_WHITESPACE", "CHANGE", "ISSUE" }, - en = { "DASH_RULE", "TWO_HYPHENS", "CHANGE", "ISSUE" }, - }, - dictionary = { - fr = { "CryptPad", "Chouhartem", - -- field names - "authors", "categories", "created", "updated", "title", "meta" }, - en = { "CryptPad", }, - } - } - }, lua_ls = { Lua = { workspace = { checkThirdParty = false }, @@ -187,6 +154,40 @@ servers = { } }, gdscript = {}, + ltex_plus = { + filetypes = { + 'markdown', + 'latex', + 'norg', + 'gitcommit', + 'jj', + 'rst', + 'typst' + }, + ltex = { + language = "auto", + diagnosticSeverity = "information", + sentenceCacheSize = 2000, + additionalRules = { + enablePickyRules = true, + motherTongue = "fr", + }, + enabledRules = { + en = { "EN_CONSISTENT_APOS" }, + }, + disabledRules = { + fr = { "APOS_TYP", "FRENCH_WHITESPACE", "CHANGE", "ISSUE" }, + en = { "DASH_RULE", "TWO_HYPHENS", "CHANGE", "ISSUE", "CHECK", + "ACTUALLY", "CONSISTENT" }, + }, + dictionary = { + fr = { "CryptPad", "Chouhartem", + -- field names + "authors", "categories", "created", "updated", "title", "meta" }, + en = { "CryptPad", }, + } + } + }, } for server_name, server_settings in pairs(servers) do @@ -194,6 +195,7 @@ for server_name, server_settings in pairs(servers) do capabilities = capabilities, on_attach = on_attach, settings = server_settings, + filetypes = (servers[server_name] or {}).filetypes, } end diff --git a/readme.md b/readme.md index bec02e9..44df5eb 100644 --- a/readme.md +++ b/readme.md @@ -22,3 +22,11 @@ For instance, you can create clone this repository inside ```sh export NVIM_APPNAME="$HOME/.config/kicknvim" ``` + +## LSP dependencies + +This configuration requires some LSP servers to be installed on your machine +(usually because they are unavailable in `mason`). These packages are: + +- `rust-analyzer` +- `ltex-ls-plus`