diff options
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/nvim-lsp-installer/installers/gem.lua | 9 | ||||
| -rw-r--r-- | lua/nvim-lsp-installer/installers/go.lua | 10 | ||||
| -rw-r--r-- | lua/nvim-lsp-installer/installers/pip3.lua | 10 |
3 files changed, 15 insertions, 14 deletions
diff --git a/lua/nvim-lsp-installer/installers/gem.lua b/lua/nvim-lsp-installer/installers/gem.lua index 56d7977f..c01f1449 100644 --- a/lua/nvim-lsp-installer/installers/gem.lua +++ b/lua/nvim-lsp-installer/installers/gem.lua @@ -19,16 +19,17 @@ function M.packages(packages) ---@type ServerInstallerFunction function(_, callback, ctx) local pkgs = Data.list_copy(packages or {}) - if ctx.requested_server_version then - -- The "head" package is the recipient for the requested version. It's.. by design... don't ask. - pkgs[1] = ("%s:%s"):format(pkgs[1], ctx.requested_server_version) - end ctx.receipt:with_primary_source(ctx.receipt.gem(pkgs[1])) for i = 2, #pkgs do ctx.receipt:with_secondary_source(ctx.receipt.gem(pkgs[i])) end + if ctx.requested_server_version then + -- The "head" package is the recipient for the requested version. It's.. by design... don't ask. + pkgs[1] = ("%s:%s"):format(pkgs[1], ctx.requested_server_version) + end + process.spawn(M.gem_cmd, { args = { "install", diff --git a/lua/nvim-lsp-installer/installers/go.lua b/lua/nvim-lsp-installer/installers/go.lua index 4a979c5d..a3b21176 100644 --- a/lua/nvim-lsp-installer/installers/go.lua +++ b/lua/nvim-lsp-installer/installers/go.lua @@ -22,16 +22,16 @@ function M.packages(packages) stdio_sink = ctx.stdio_sink, } - if ctx.requested_server_version then - -- The "head" package is the recipient for the requested version. It's.. by design... don't ask. - pkgs[1] = ("%s@%s"):format(pkgs[1], ctx.requested_server_version) - end - ctx.receipt:with_primary_source(ctx.receipt.go(pkgs[1])) for i = 2, #pkgs do ctx.receipt:with_secondary_source(ctx.receipt.go(pkgs[i])) end + if ctx.requested_server_version then + -- The "head" package is the recipient for the requested version. It's.. by design... don't ask. + pkgs[1] = ("%s@%s"):format(pkgs[1], ctx.requested_server_version) + end + c.run("go", vim.list_extend({ "get", "-v" }, pkgs)) c.run("go", { "clean", "-modcache" }) diff --git a/lua/nvim-lsp-installer/installers/pip3.lua b/lua/nvim-lsp-installer/installers/pip3.lua index 3ef6f4eb..b4dc4f5a 100644 --- a/lua/nvim-lsp-installer/installers/pip3.lua +++ b/lua/nvim-lsp-installer/installers/pip3.lua @@ -31,17 +31,17 @@ local function create_installer(python_executable, packages) env = process.graft_env(M.env(ctx.install_dir)), } + ctx.receipt:with_primary_source(ctx.receipt.pip3(pkgs[1])) + for i = 2, #pkgs do + ctx.receipt:with_secondary_source(ctx.receipt.pip3(pkgs[i])) + end + c.run(python_executable, { "-m", "venv", REL_INSTALL_DIR }) if ctx.requested_server_version then -- The "head" package is the recipient for the requested version. It's.. by design... don't ask. pkgs[1] = ("%s==%s"):format(pkgs[1], ctx.requested_server_version) end - ctx.receipt:with_primary_source(ctx.receipt.pip3(pkgs[1])) - for i = 2, #pkgs do - ctx.receipt:with_secondary_source(ctx.receipt.pip3(pkgs[i])) - end - local install_command = { "-m", "pip", "install", "-U" } vim.list_extend(install_command, settings.current.pip.install_args) c.run("python", vim.list_extend(install_command, pkgs)) |
