aboutsummaryrefslogtreecommitdiffstats
path: root/lua/nvim-lsp-installer/servers
diff options
context:
space:
mode:
authorWilliam Boman <william@redwill.se>2022-04-11 01:04:06 +0200
committerGitHub <noreply@github.com>2022-04-11 01:04:06 +0200
commit89abfcd2fbd56c3246772726a85ed0e548d77d3b (patch)
tree5a90c3277ee853fe6c1c04be09982b94472f45ab /lua/nvim-lsp-installer/servers
parentsumneko_lua: support Linux arm64 (#391) (diff)
downloadmason-89abfcd2fbd56c3246772726a85ed0e548d77d3b.tar
mason-89abfcd2fbd56c3246772726a85ed0e548d77d3b.tar.gz
mason-89abfcd2fbd56c3246772726a85ed0e548d77d3b.tar.bz2
mason-89abfcd2fbd56c3246772726a85ed0e548d77d3b.tar.lz
mason-89abfcd2fbd56c3246772726a85ed0e548d77d3b.tar.xz
mason-89abfcd2fbd56c3246772726a85ed0e548d77d3b.tar.zst
mason-89abfcd2fbd56c3246772726a85ed0e548d77d3b.zip
make install context available via coroutine context (#586)
Diffstat (limited to 'lua/nvim-lsp-installer/servers')
-rw-r--r--lua/nvim-lsp-installer/servers/ansiblels/init.lua11
-rw-r--r--lua/nvim-lsp-installer/servers/nickel_ls/init.lua24
-rw-r--r--lua/nvim-lsp-installer/servers/phpactor/init.lua13
-rw-r--r--lua/nvim-lsp-installer/servers/psalm/init.lua2
-rw-r--r--lua/nvim-lsp-installer/servers/rome/init.lua17
5 files changed, 28 insertions, 39 deletions
diff --git a/lua/nvim-lsp-installer/servers/ansiblels/init.lua b/lua/nvim-lsp-installer/servers/ansiblels/init.lua
index 92541e56..3c3c753d 100644
--- a/lua/nvim-lsp-installer/servers/ansiblels/init.lua
+++ b/lua/nvim-lsp-installer/servers/ansiblels/init.lua
@@ -2,7 +2,6 @@ local server = require "nvim-lsp-installer.server"
local path = require "nvim-lsp-installer.path"
local npm = require "nvim-lsp-installer.core.managers.npm"
local git = require "nvim-lsp-installer.core.managers.git"
-local installer = require "nvim-lsp-installer.core.installer"
return function(name, root_dir)
return server.Server:new {
@@ -11,13 +10,13 @@ return function(name, root_dir)
languages = { "ansible" },
homepage = "https://github.com/ansible/ansible-language-server",
async = true,
- installer = installer.serial {
- git.clone { "https://github.com/ansible/ansible-language-server" },
+ installer = function()
+ git.clone({ "https://github.com/ansible/ansible-language-server" }).with_receipt()
-- ansiblels has quite a strict npm version requirement.
-- Install dependencies using the the latest npm version.
- npm.exec { "npm@latest", "install" },
- npm.run { "compile" },
- },
+ npm.exec { "npm@latest", "install" }
+ npm.run { "compile" }
+ end,
default_options = {
cmd = { "node", path.concat { root_dir, "out", "server", "src", "server.js" }, "--stdio" },
},
diff --git a/lua/nvim-lsp-installer/servers/nickel_ls/init.lua b/lua/nvim-lsp-installer/servers/nickel_ls/init.lua
index bf87cd21..01bf1004 100644
--- a/lua/nvim-lsp-installer/servers/nickel_ls/init.lua
+++ b/lua/nvim-lsp-installer/servers/nickel_ls/init.lua
@@ -1,6 +1,5 @@
local path = require "nvim-lsp-installer.path"
local server = require "nvim-lsp-installer.server"
-local installer = require "nvim-lsp-installer.core.installer"
local cargo = require "nvim-lsp-installer.core.managers.cargo"
local git = require "nvim-lsp-installer.core.managers.git"
@@ -11,19 +10,16 @@ return function(name, root_dir)
homepage = "https://nickel-lang.org/",
languages = { "nickel" },
async = true,
- installer = installer.serial {
- git.clone { "https://github.com/tweag/nickel" },
- ---@param ctx InstallContext
- function(ctx)
- ctx.spawn.cargo {
- "install",
- "--root",
- ".",
- "--path",
- path.concat { "lsp", "nls" },
- }
- end,
- },
+ installer = function(ctx)
+ git.clone({ "https://github.com/tweag/nickel" }).with_receipt()
+ ctx.spawn.cargo {
+ "install",
+ "--root",
+ ".",
+ "--path",
+ path.concat { "lsp", "nls" },
+ }
+ end,
default_options = {
cmd_env = cargo.env(root_dir),
},
diff --git a/lua/nvim-lsp-installer/servers/phpactor/init.lua b/lua/nvim-lsp-installer/servers/phpactor/init.lua
index af5d863c..1425ae2e 100644
--- a/lua/nvim-lsp-installer/servers/phpactor/init.lua
+++ b/lua/nvim-lsp-installer/servers/phpactor/init.lua
@@ -2,7 +2,6 @@ local path = require "nvim-lsp-installer.path"
local server = require "nvim-lsp-installer.server"
local composer = require "nvim-lsp-installer.core.managers.composer"
local git = require "nvim-lsp-installer.core.managers.git"
-local installer = require "nvim-lsp-installer.core.installer"
local process = require "nvim-lsp-installer.process"
local platform = require "nvim-lsp-installer.platform"
@@ -13,13 +12,11 @@ return function(name, root_dir)
homepage = "https://phpactor.readthedocs.io/en/master/",
languages = { "php" },
async = true,
- installer = installer.serial {
- function()
- assert(platform.is_unix, "Phpactor only supports UNIX environments.")
- end,
- git.clone { "https://github.com/phpactor/phpactor.git" },
- composer.install(),
- },
+ installer = function()
+ assert(platform.is_unix, "Phpactor only supports UNIX environments.")
+ git.clone({ "https://github.com/phpactor/phpactor.git" }).with_receipt()
+ composer.install()
+ end,
default_options = {
cmd_env = {
PATH = process.extend_path { path.concat { root_dir, "bin" } },
diff --git a/lua/nvim-lsp-installer/servers/psalm/init.lua b/lua/nvim-lsp-installer/servers/psalm/init.lua
index 8c8b9be3..b6f63064 100644
--- a/lua/nvim-lsp-installer/servers/psalm/init.lua
+++ b/lua/nvim-lsp-installer/servers/psalm/init.lua
@@ -8,7 +8,7 @@ return function(name, root_dir)
homepage = "https://psalm.dev/",
languages = { "php" },
async = true,
- installer = composer.require { "vimeo/psalm" },
+ installer = composer.packages { "vimeo/psalm" },
default_options = {
cmd_env = composer.env(root_dir),
},
diff --git a/lua/nvim-lsp-installer/servers/rome/init.lua b/lua/nvim-lsp-installer/servers/rome/init.lua
index 7a20384c..aa0613a0 100644
--- a/lua/nvim-lsp-installer/servers/rome/init.lua
+++ b/lua/nvim-lsp-installer/servers/rome/init.lua
@@ -1,6 +1,5 @@
local server = require "nvim-lsp-installer.server"
local npm = require "nvim-lsp-installer.core.managers.npm"
-local installer = require "nvim-lsp-installer.core.installer"
local Optional = require "nvim-lsp-installer.core.optional"
return function(name, root_dir)
@@ -9,15 +8,13 @@ return function(name, root_dir)
root_dir = root_dir,
languages = { "typescript", "javascript" },
homepage = "https://rome.tools",
- installer = installer.serial {
- ---@param ctx InstallContext
- function(ctx)
- ctx.requested_version = ctx.requested_version:or_(function()
- return Optional.of "10.0.7-nightly.2021.7.27"
- end)
- end,
- npm.packages { "rome" },
- },
+ ---@param ctx InstallContext
+ installer = function(ctx)
+ ctx.requested_version = ctx.requested_version:or_(function()
+ return Optional.of "10.0.7-nightly.2021.7.27"
+ end)
+ npm.install({ "rome" }).with_receipt()
+ end,
async = true,
default_options = {
cmd_env = npm.env(root_dir),