aboutsummaryrefslogtreecommitdiffstats
path: root/lua/nvim-lsp-installer/installers
diff options
context:
space:
mode:
Diffstat (limited to 'lua/nvim-lsp-installer/installers')
-rw-r--r--lua/nvim-lsp-installer/installers/pip3.lua13
-rw-r--r--lua/nvim-lsp-installer/installers/shell.lua2
2 files changed, 14 insertions, 1 deletions
diff --git a/lua/nvim-lsp-installer/installers/pip3.lua b/lua/nvim-lsp-installer/installers/pip3.lua
new file mode 100644
index 00000000..83b7e43a
--- /dev/null
+++ b/lua/nvim-lsp-installer/installers/pip3.lua
@@ -0,0 +1,13 @@
+local shell = require("nvim-lsp-installer.installers.shell")
+
+local M = {}
+
+M.REL_INSTALL_DIR = "venv"
+
+function M.packages(packages)
+ return shell.raw(("./%s/bin/pip3 install -U %s"):format(M.REL_INSTALL_DIR, table.concat(packages, "")), {
+ prefix = ("set -euo pipefail; python3 -m venv %q;"):format(M.REL_INSTALL_DIR)
+ })
+end
+
+return M
diff --git a/lua/nvim-lsp-installer/installers/shell.lua b/lua/nvim-lsp-installer/installers/shell.lua
index 7ffe007a..bda83549 100644
--- a/lua/nvim-lsp-installer/installers/shell.lua
+++ b/lua/nvim-lsp-installer/installers/shell.lua
@@ -11,7 +11,7 @@ function M.raw(raw_script, opts)
vim.o.shell = "/bin/bash"
vim.cmd [[new]]
vim.fn.termopen(
- opts.prefix or default_opts.prefix .. raw_script,
+ (opts.prefix or default_opts.prefix) .. raw_script,
{
cwd = server._root_dir,
on_exit = function (_, exit_code)