aboutsummaryrefslogtreecommitdiffstats
path: root/lua/nvim-lsp-installer/installers/go.lua
diff options
context:
space:
mode:
authorWilliam Boman <william@redwill.se>2021-08-02 12:43:39 +0200
committerGitHub <noreply@github.com>2021-08-02 12:43:39 +0200
commit00ce6fea97d572b4c2bae204087dfdcceda8b796 (patch)
tree474dbaf4057db95fdd72142c8ccf2ba283d576ea /lua/nvim-lsp-installer/installers/go.lua
parentinstallers/pip3: actually add space in-between packages (diff)
downloadmason-00ce6fea97d572b4c2bae204087dfdcceda8b796.tar
mason-00ce6fea97d572b4c2bae204087dfdcceda8b796.tar.gz
mason-00ce6fea97d572b4c2bae204087dfdcceda8b796.tar.bz2
mason-00ce6fea97d572b4c2bae204087dfdcceda8b796.tar.lz
mason-00ce6fea97d572b4c2bae204087dfdcceda8b796.tar.xz
mason-00ce6fea97d572b4c2bae204087dfdcceda8b796.tar.zst
mason-00ce6fea97d572b4c2bae204087dfdcceda8b796.zip
add sql(l)s (#43)
Diffstat (limited to 'lua/nvim-lsp-installer/installers/go.lua')
-rw-r--r--lua/nvim-lsp-installer/installers/go.lua16
1 files changed, 16 insertions, 0 deletions
diff --git a/lua/nvim-lsp-installer/installers/go.lua b/lua/nvim-lsp-installer/installers/go.lua
new file mode 100644
index 00000000..f4c85248
--- /dev/null
+++ b/lua/nvim-lsp-installer/installers/go.lua
@@ -0,0 +1,16 @@
+local path = require("nvim-lsp-installer.path")
+local shell = require("nvim-lsp-installer.installers.shell")
+
+local M = {}
+
+function M.packages(packages)
+ return shell.raw(("go get %s"):format(table.concat(packages, " ")), {
+ prefix = [[set -euo pipefail; export GO111MODULE=on; export GOBIN="$PWD"; export GOPATH="$PWD";]]
+ })
+end
+
+function M.executable(root_dir, executable)
+ return path.concat { root_dir, executable }
+end
+
+return M