aboutsummaryrefslogtreecommitdiffstats
path: root/lua/nvim-lsp-installer/servers
diff options
context:
space:
mode:
authorWilliam Boman <william@redwill.se>2022-01-06 18:21:19 +0100
committerGitHub <noreply@github.com>2022-01-06 18:21:19 +0100
commit5cc73ef7360866c65169e0e7d55d3b59fb3b6eaa (patch)
treeb958f26ae3964e7ba8aa3572b81ece1e23b49df1 /lua/nvim-lsp-installer/servers
parentrerun autogen (diff)
downloadmason-5cc73ef7360866c65169e0e7d55d3b59fb3b6eaa.tar
mason-5cc73ef7360866c65169e0e7d55d3b59fb3b6eaa.tar.gz
mason-5cc73ef7360866c65169e0e7d55d3b59fb3b6eaa.tar.bz2
mason-5cc73ef7360866c65169e0e7d55d3b59fb3b6eaa.tar.lz
mason-5cc73ef7360866c65169e0e7d55d3b59fb3b6eaa.tar.xz
mason-5cc73ef7360866c65169e0e7d55d3b59fb3b6eaa.tar.zst
mason-5cc73ef7360866c65169e0e7d55d3b59fb3b6eaa.zip
feat(ui): display outdated servers (#395)
Diffstat (limited to 'lua/nvim-lsp-installer/servers')
-rw-r--r--lua/nvim-lsp-installer/servers/ansiblels/init.lua9
-rw-r--r--lua/nvim-lsp-installer/servers/arduino_language_server/init.lua5
-rw-r--r--lua/nvim-lsp-installer/servers/ccls/init.lua20
-rw-r--r--lua/nvim-lsp-installer/servers/groovyls/init.lua7
-rw-r--r--lua/nvim-lsp-installer/servers/jdtls/init.lua7
-rw-r--r--lua/nvim-lsp-installer/servers/phpactor/init.lua6
-rw-r--r--lua/nvim-lsp-installer/servers/spectral/init.lua4
7 files changed, 26 insertions, 32 deletions
diff --git a/lua/nvim-lsp-installer/servers/ansiblels/init.lua b/lua/nvim-lsp-installer/servers/ansiblels/init.lua
index 6c0c6c73..f5e0213e 100644
--- a/lua/nvim-lsp-installer/servers/ansiblels/init.lua
+++ b/lua/nvim-lsp-installer/servers/ansiblels/init.lua
@@ -16,13 +16,8 @@ return function(name, root_dir)
npm.exec("npm", { "install" }),
npm.run "compile",
npm.exec("npm", { "install", "--production" }),
- context.receipt(function(receipt, ctx)
- receipt:with_primary_source(
- receipt.git_remote(
- "https://github.com/ansible/ansible-language-server",
- ctx.requested_server_version
- )
- )
+ context.receipt(function(receipt)
+ receipt:with_primary_source(receipt.git_remote "https://github.com/ansible/ansible-language-server")
end),
},
default_options = {
diff --git a/lua/nvim-lsp-installer/servers/arduino_language_server/init.lua b/lua/nvim-lsp-installer/servers/arduino_language_server/init.lua
index 4007803f..49da467a 100644
--- a/lua/nvim-lsp-installer/servers/arduino_language_server/init.lua
+++ b/lua/nvim-lsp-installer/servers/arduino_language_server/init.lua
@@ -99,6 +99,11 @@ return function(name, root_dir)
clangd_installer,
arduino_cli_installer,
arduino_language_server_installer,
+ context.receipt(function(receipt)
+ -- We install 3 different components to 3 different subdirectories. This is currently not captured in
+ -- the receipt structure.
+ receipt:mark_invalid()
+ end),
},
default_options = {
cmd = {
diff --git a/lua/nvim-lsp-installer/servers/ccls/init.lua b/lua/nvim-lsp-installer/servers/ccls/init.lua
index e77ae80b..3da11377 100644
--- a/lua/nvim-lsp-installer/servers/ccls/init.lua
+++ b/lua/nvim-lsp-installer/servers/ccls/init.lua
@@ -98,9 +98,6 @@ return function(name, root_dir)
),
}
end),
- context.receipt(function(receipt, ctx)
- receipt:with_secondary_source(receipt.github_release_file(ctx))
- end),
}
end
@@ -134,11 +131,6 @@ return function(name, root_dir)
c.spawn(callback)
end,
std.rmrf "ccls-git",
- context.receipt(function(receipt, ctx)
- receipt:with_primary_source(
- receipt.git_remote("https://github.com/MaskRay/ccls", ctx.requested_server_version)
- )
- end),
}
local linux_ccls_installer = installers.pipe {
@@ -175,9 +167,15 @@ return function(name, root_dir)
root_dir = root_dir,
homepage = "https://github.com/MaskRay/ccls",
languages = { "c", "c++", "objective-c" },
- installer = installers.when {
- mac = mac_ccls_installer,
- linux = linux_ccls_installer,
+ installer = {
+ installers.when {
+ mac = mac_ccls_installer,
+ linux = linux_ccls_installer,
+ },
+ context.receipt(function(receipt)
+ -- The cloned ccls git repo gets deleted during installation, so we have no local copy.
+ receipt:mark_invalid()
+ end),
},
default_options = {
cmd_env = {
diff --git a/lua/nvim-lsp-installer/servers/groovyls/init.lua b/lua/nvim-lsp-installer/servers/groovyls/init.lua
index becc1dd7..8dbb1b5c 100644
--- a/lua/nvim-lsp-installer/servers/groovyls/init.lua
+++ b/lua/nvim-lsp-installer/servers/groovyls/init.lua
@@ -16,12 +16,9 @@ return function(name, root_dir)
std.gradlew {
args = { "build" },
},
- context.receipt(function(receipt, ctx)
+ context.receipt(function(receipt)
receipt:with_primary_source(
- receipt.git_remote(
- "https://github.com/GroovyLanguageServer/groovy-language-server",
- ctx.requested_server_version
- )
+ receipt.git_remote "https://github.com/GroovyLanguageServer/groovy-language-server"
)
end),
},
diff --git a/lua/nvim-lsp-installer/servers/jdtls/init.lua b/lua/nvim-lsp-installer/servers/jdtls/init.lua
index ddc00c26..600a1112 100644
--- a/lua/nvim-lsp-installer/servers/jdtls/init.lua
+++ b/lua/nvim-lsp-installer/servers/jdtls/init.lua
@@ -5,6 +5,7 @@ local context = require "nvim-lsp-installer.installers.context"
local platform = require "nvim-lsp-installer.platform"
local Data = require "nvim-lsp-installer.data"
local fetch = require "nvim-lsp-installer.core.fetch"
+local eclipse = require "nvim-lsp-installer.core.clients.eclipse"
return function(name, root_dir)
local function get_cmd(workspace_name)
@@ -56,14 +57,12 @@ return function(name, root_dir)
callback(true)
return
end
- fetch("https://download.eclipse.org/jdtls/snapshots/latest.txt", function(err, data)
+ eclipse.fetch_latest_jdtls_version(function(err, latest_version)
if err then
ctx.stdio_sink.stderr "Failed to fetch latest verison.\n"
callback(false)
else
- ctx.requested_server_version = vim.trim(data)
- :gsub("^jdt%-language%-server%-", "")
- :gsub("%.tar%.gz$", "")
+ ctx.requested_server_version = latest_version
callback(true)
end
end)
diff --git a/lua/nvim-lsp-installer/servers/phpactor/init.lua b/lua/nvim-lsp-installer/servers/phpactor/init.lua
index 42ef65f6..45ce5ccd 100644
--- a/lua/nvim-lsp-installer/servers/phpactor/init.lua
+++ b/lua/nvim-lsp-installer/servers/phpactor/init.lua
@@ -16,10 +16,8 @@ return function(name, root_dir)
unix = {
std.git_clone "https://github.com/phpactor/phpactor.git",
composer.install(),
- context.receipt(function(receipt, ctx)
- receipt:with_primary_source(
- receipt.git_remote("https://github.com/phpactor/phpactor.git", ctx.requested_server_version)
- )
+ context.receipt(function(receipt)
+ receipt:with_primary_source(receipt.git_remote "https://github.com/phpactor/phpactor.git")
end),
},
},
diff --git a/lua/nvim-lsp-installer/servers/spectral/init.lua b/lua/nvim-lsp-installer/servers/spectral/init.lua
index 28a09274..e308369c 100644
--- a/lua/nvim-lsp-installer/servers/spectral/init.lua
+++ b/lua/nvim-lsp-installer/servers/spectral/init.lua
@@ -21,7 +21,9 @@ return function(name, root_dir)
installers.always_succeed(npm.run "compile"),
context.set_working_dir "server",
context.receipt(function(receipt, ctx)
- receipt:with_primary_source(receipt.github_release_file(ctx))
+ receipt
+ :mark_invalid() -- Due to the `context.set_working_dir` after clone, we essentially erase any trace of the cloned git repo, so we mark this as invalid.
+ :with_primary_source(receipt.git_remote "https://github.com/stoplightio/vscode-spectral")
end),
},
default_options = {