mirror of
https://github.com/jimeh/dotfiles.git
synced 2026-02-19 04:46:41 +00:00
feat(golang): remove use of goenv
It's simpler to just have a single version of Go available, with goenv lots of different modules/packages which have `.go-version` files, the LSP server doesn't work correctly unless the specific version of Go is installed.
This commit is contained in:
@@ -2,20 +2,6 @@
|
||||
# Go (golang) environment setup.
|
||||
#
|
||||
|
||||
# ==============================================================================
|
||||
# goenv
|
||||
# ==============================================================================
|
||||
|
||||
# install goenv
|
||||
zinit ice wait lucid as'program' pick'bin/goenv' from'gh' \
|
||||
atclone'src/configure && make -C src; libexec/goenv init - > .zinitrc.zsh' \
|
||||
atpull'%atclone' src'.zinitrc.zsh' nocompile'!'
|
||||
zinit light syndbg/goenv
|
||||
|
||||
zinit ice wait lucid as'program' pick'plugins/go-build/bin/go-build' from'gh' \
|
||||
id-as'syndbg/go-build'
|
||||
zinit light syndbg/goenv
|
||||
|
||||
# ==============================================================================
|
||||
# global golang packages
|
||||
# ==============================================================================
|
||||
@@ -42,7 +28,7 @@ install_go_global_packages() {
|
||||
|
||||
for package in "${packages[@]}"; do
|
||||
echo "installing/updating \"$package\""
|
||||
go get -u "$package"
|
||||
GO111MODULE=on go get -u "$package"
|
||||
done
|
||||
|
||||
if command-exists goenv && [ "$(goenv version-name)" != "system" ]; then
|
||||
|
||||
4
zshenv
4
zshenv
@@ -150,8 +150,8 @@ path_prepend "/opt/emacs/bin"
|
||||
path_prepend "/opt/tmux/bin"
|
||||
|
||||
# Go setup for golang (./zsh/golang.zsh)
|
||||
path_prepend "$HOME/.goenv/shims"
|
||||
export GOENV_GOPATH_PREFIX="$HOME/.goenv/go"
|
||||
export GOPATH="$HOME/.go"
|
||||
path_prepend "$GOPATH/bin"
|
||||
|
||||
# Ruby setup for rbenv (./zsh/ruby.zsh)
|
||||
path_prepend "$HOME/.rbenv/shims"
|
||||
|
||||
Reference in New Issue
Block a user