aboutsummaryrefslogtreecommitdiffstats
path: root/lua/nvim-lsp-installer/servers/gopls/init.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/servers/gopls/init.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/servers/gopls/init.lua')
-rw-r--r--lua/nvim-lsp-installer/servers/gopls/init.lua16
1 files changed, 3 insertions, 13 deletions
diff --git a/lua/nvim-lsp-installer/servers/gopls/init.lua b/lua/nvim-lsp-installer/servers/gopls/init.lua
index fe0ebea9..71127327 100644
--- a/lua/nvim-lsp-installer/servers/gopls/init.lua
+++ b/lua/nvim-lsp-installer/servers/gopls/init.lua
@@ -1,24 +1,14 @@
local server = require("nvim-lsp-installer.server")
local path = require("nvim-lsp-installer.path")
-local shell = require("nvim-lsp-installer.installers.shell")
+local go = require("nvim-lsp-installer.installers.go")
local root_dir = server.get_server_root_path("go")
-local install_cmd = [=[
-GO111MODULE=on GOBIN="$PWD" GOPATH="$PWD" go get golang.org/x/tools/gopls@latest;
-command -v ./gopls &> /dev/null;
-]=]
-
return server.Server:new {
name = "gopls",
root_dir = root_dir,
- pre_install_check = function ()
- if vim.fn.executable("go") ~= 1 then
- error("Please install the Go CLI before installing gopls (https://golang.org/doc/install).")
- end
- end,
- installer = shell.raw(install_cmd),
+ installer = go.packages { "golang.org/x/tools/gopls@latest" },
default_options = {
- cmd = { path.concat { root_dir, "gopls" } },
+ cmd = { go.executable(root_dir, "gopls") },
}
}