FollieHiyuki-dotfiles/home/.config/nvim/scripts/lsp/gopls

13 lines
351 B
Plaintext
Raw Normal View History

#!/bin/sh -e
current_path="$PWD"
server_path="${XDG_DATA_HOME:-$HOME/.local/share}/nvim/lsp/gopls"
[ ! -d "${server_path}" ] && mkdir -p "${server_path}"
cd ${server_path}
GOPATH="${server_path}" GOBIN="${server_path}" go install golang.org/x/tools/gopls@latest
GOPATH="${server_path}" GOBIN="${server_path}" go clean -modcache
cd ${current_path}