aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua')
-rw-r--r--lua/nvim-lsp-installer/installers/go.lua16
1 files changed, 11 insertions, 5 deletions
diff --git a/lua/nvim-lsp-installer/installers/go.lua b/lua/nvim-lsp-installer/installers/go.lua
index c67b9565..1f1b730f 100644
--- a/lua/nvim-lsp-installer/installers/go.lua
+++ b/lua/nvim-lsp-installer/installers/go.lua
@@ -4,11 +4,17 @@ local shell = require "nvim-lsp-installer.installers.shell"
local M = {}
function M.packages(packages)
- return shell.raw(('export GOBIN="$PWD"; export GOPATH="$PWD"; go get %s;'):format(table.concat(packages, " ")), {
- env = {
- GO111MODULE = "on",
- },
- })
+ return function(server, callback)
+ local shell_installer = shell.raw(("go get -v %s; go clean -modcache;"):format(table.concat(packages, " ")), {
+ env = {
+ GO111MODULE = "on",
+ GOBIN = server._root_dir,
+ GOPATH = server._root_dir,
+ },
+ })
+
+ shell_installer(server, callback)
+ end
end
function M.executable(root_dir, executable)