What did you do? (required: The issue will be closed when not provided)
- Install
asdf through Homebrew on MacOS and added the golang extension to manage Go versions
brew install asdf
asdf plugin add golang
NOTE: I did not add . ${ASDF_DATA_DIR:-$HOME/.asdf}/plugins/golang/set-env.bash to my bashrc as directed, as I build with Golang in Docker or Podman almost exclusively and only install it for vim-go to work.
- Create a
.tool-versions in my $HOME that installs Golang 1.26.5 by default:
cat >$HOME/.tool-versions <<-EOF
golang 1.26.5
-
Run asdf install to install Golang.
-
Clone a Git project that has a .tool-versions file like the below, then cd'ed into that directory:
-
Open vim and installed :GoInstallBinaries as directed.
-
Confirmed that vim-go binaries install into $(go env GOBIN).
What did you expect to happen?
gopls loads when a .go file is opened.
What happened instead?
could not find 'gopls'. Run :GoInstallBinaries to fix it
Configuration (MUST fill this out):
vim-go version:
v1.29
vimrc you used to reproduce:
vimrc
execute pathogen#infect()
" Golang specific: Lint, test, and vet on save
let g:go_jump_to_error = 0
let g:go_metalinter_autosave = 1
let g:go_metalinter_autosave_enabled = ['bugs', 'error', 'complexity', 'metalinter', 'style']
let g:go_fmt_fail_silently = 0
let g:go_search_bin_path_first = 1
Vim version (first three lines from :version):
VIM - Vi IMproved 9.2 (2026 Feb 14, compiled Jun 28 2026 19:48:02)
macOS version - arm64
Included patches: 1-750
Go version (go version):
go version go1.26.5 darwin/arm64
Go environment
go env Output:
AR='ar'
CC='clang'
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_ENABLED='1'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
CXX='clang++'
GCCGO='gccgo'
GO111MODULE=''
GOARCH='arm64'
GOARM64='v8.0'
GOAUTH='netrc'
GOBIN='/Users/cn/.asdf/installs/golang/1.26.5/bin'
GOCACHE='/Users/cn/Library/Caches/go-build'
GOCACHEPROG=''
GODEBUG=''
GOENV='/Users/cn/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFIPS140='off'
GOFLAGS=''
GOGCCFLAGS='-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/40/fq2dtqdx3ks9s0x7z_zd0d9h0000gn/T/go-build902282508=/tmp/go-build -gno-record-gcc-switches -fno-common'
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMOD='/Users/cn/src/expenses-processor/go.mod'
GOMODCACHE='/Users/cn/.asdf/installs/golang/1.26.5/packages/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='darwin'
GOPATH='/Users/cn/.asdf/installs/golang/1.26.5/packages'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/Users/cn/.asdf/installs/golang/1.26.5/go'
GOSUMDB='sum.golang.org'
GOTELEMETRY='local'
GOTELEMETRYDIR='/Users/cn/Library/Application Support/go/telemetry'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/Users/cn/.asdf/installs/golang/1.26.5/go/pkg/tool/darwin_arm64'
GOVCS=''
GOVERSION='go1.26.5'
GOWORK=''
PKG_CONFIG='pkg-config'
gopls version
gopls version Output:
golang.org/x/tools/gopls v0.23.0
What did you do? (required: The issue will be closed when not provided)
asdfthrough Homebrew on MacOS and added thegolangextension to manage Go versions.tool-versionsin my$HOMEthat installs Golang 1.26.5 by default:Run
asdf installto install Golang.Clone a Git project that has a
.tool-versionsfile like the below, thencd'ed into that directory:Open
vimand installed:GoInstallBinariesas directed.Confirmed that
vim-gobinaries install into$(go env GOBIN).What did you expect to happen?
goplsloads when a.gofile is opened.What happened instead?
could not find 'gopls'. Run :GoInstallBinaries to fix itConfiguration (MUST fill this out):
vim-go version:
v1.29
vimrcyou used to reproduce:vimrc
Vim version (first three lines from
:version):VIM - Vi IMproved 9.2 (2026 Feb 14, compiled Jun 28 2026 19:48:02)
macOS version - arm64
Included patches: 1-750
Go version (
go version):go version go1.26.5 darwin/arm64Go environment
go envOutput:gopls version
gopls versionOutput: