diff options
| author | William Boman <william@redwill.se> | 2021-10-31 00:27:29 +0200 |
|---|---|---|
| committer | William Boman <william@redwill.se> | 2021-10-31 00:27:29 +0200 |
| commit | 85b9c5aca56b4b5c2b3164fde3a868c68606a2f3 (patch) | |
| tree | 7422176d068edd8369e57565eae7d372935d6d4a /lua | |
| parent | fix(server): only manually create final install dir on unix systems (diff) | |
| download | mason-85b9c5aca56b4b5c2b3164fde3a868c68606a2f3.tar mason-85b9c5aca56b4b5c2b3164fde3a868c68606a2f3.tar.gz mason-85b9c5aca56b4b5c2b3164fde3a868c68606a2f3.tar.bz2 mason-85b9c5aca56b4b5c2b3164fde3a868c68606a2f3.tar.lz mason-85b9c5aca56b4b5c2b3164fde3a868c68606a2f3.tar.xz mason-85b9c5aca56b4b5c2b3164fde3a868c68606a2f3.tar.zst mason-85b9c5aca56b4b5c2b3164fde3a868c68606a2f3.zip | |
fix(ltex): add lspconfig server entry
This was accidentally removed earlier, ltex has not
been merged upstream yet.
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/nvim-lsp-installer/servers/ltex/init.lua | 51 |
1 files changed, 31 insertions, 20 deletions
diff --git a/lua/nvim-lsp-installer/servers/ltex/init.lua b/lua/nvim-lsp-installer/servers/ltex/init.lua index 1c24ec4b..14680e0a 100644 --- a/lua/nvim-lsp-installer/servers/ltex/init.lua +++ b/lua/nvim-lsp-installer/servers/ltex/init.lua @@ -4,9 +4,6 @@ local std = require "nvim-lsp-installer.installers.std" local context = require "nvim-lsp-installer.installers.context" local Data = require "nvim-lsp-installer.data" local platform = require "nvim-lsp-installer.platform" -local installers = require "nvim-lsp-installer.installers" - -local uv = vim.loop local coalesce, when = Data.coalesce, Data.when @@ -48,25 +45,39 @@ return function(name, root_dir) end), std.chmod("+x", { "ltex-ls" }), }, - default_options = { - filetypes = { "tex", "bib", "markdown" }, - cmd = { path.concat { root_dir, script_name } }, - settings = { - ltex = { - enabled = { "latex", "tex", "bib", "markdown" }, - checkFrequency = "edit", - language = "en", - diagnosticSeverity = "information", - setenceCacheSize = 2000, - additionalRules = { - enablePickyRules = true, - motherTongue = "en", + pre_setup = function() + local configs = require "lspconfig/configs" + local util = require "lspconfig/util" + + if configs.ltex then + return + end + + configs.ltex = { + default_config = { + filetypes = { "tex", "bib", "markdown" }, + root_dir = util.find_git_ancestor, + settings = { + ltex = { + enabled = { "latex", "tex", "bib", "markdown" }, + checkFrequency = "edit", + language = "en", + diagnosticSeverity = "information", + setenceCacheSize = 2000, + additionalRules = { + enablePickyRules = true, + motherTongue = "en", + }, + dictionary = {}, + disabledRules = {}, + hiddenFalsePositives = {}, + }, }, - dictionary = {}, - disabledRules = {}, - hiddenFalsePositives = {}, }, - }, + } + end, + default_options = { + cmd = { path.concat { root_dir, script_name } }, }, } end |
