chore(nvim): install custom elixir-ls with the same repo

Use only one repo to install all elixir-ls versions.
This commit is contained in:
Joao P Dubas 2024-01-14 18:53:00 +00:00
parent 9f29ac3713
commit 00da94a19f

View File

@ -125,9 +125,9 @@ index 1ff16af..2ef9591 100644
+ local match_version_111 = string.match(version, '^1.11')
+ local match_version_112 = string.match(version, '^1.12')
+ if match_version_111 ~= nil then
+ opts = vim.tbl_extend('keep', opts, { cmd = { vim.fn.expand('$LOCAL_SRC_HOME') .. '/elixir-ls/v0.12.0/release/language_server.sh' } })
+ opts = vim.tbl_extend('keep', opts, { cmd = { vim.fn.expand('$LOCAL_SRC_HOME') .. '/elixir-ls/release/v0.12.0/language_server.sh' } })
+ elseif match_version_112 ~= nil then
+ opts = vim.tbl_extend('keep', opts, { cmd = { vim.fn.expand('$LOCAL_SRC_HOME') .. '/elixir-ls/v0.14.6/release/language_server.sh' } })
+ opts = vim.tbl_extend('keep', opts, { cmd = { vim.fn.expand('$LOCAL_SRC_HOME') .. '/elixir-ls/release/v0.14.6/language_server.sh' } })
+ end
+ end
+ require('lspconfig')[server_name].setup(opts)