Vim-go: Error from `go#lsp#DidOpen` function

Created on 9 Apr 2019  路  5Comments  路  Source: fatih/vim-go

An error occur on opening a go file.

errorgo

Configuration (MUST fill this out):

  • vim-go version:
commit 9a7cf4a68adcc9327af33cd1449e7859c0e32af8
  • Vim version (first three lines from :version):
NVIM v0.3.4
Build type: Release
LuaJIT 2.0.5
  • Go version (go version):
go version go1.12.3 linux/amd64
  • Go environment (go env):
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/usr/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/usr/.go"
GOPROXY=""
GORACE=""
GOROOT="/usr/lib/go"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build867612051=/tmp/go-build -gno-record-gcc-switches"

Most helpful comment

Same issue here and :GoInstallBinaries fix it

you should try :GoinstallBinaries and restart the neovim

All 5 comments

I'm unable to duplicate the problem you're seeing. Can you provide more details that might provide some insight on how to reproduce?

@yech1990 Try to reinstall Go binaries: :GoInstallBinaries

Same issue here and :GoInstallBinaries fix it

you should try :GoinstallBinaries and restart the neovim

I wonder can GoinstallBinaries be wrapped into a function, and vim plugin manager can install those packages on updating vim-go.

Some other vim plugin which are written in JavaScript, can be compliled by yarn/npm, right after plugin manager fetched a new version.

Got slightly different error after today vim-go update:

Error detected while processing function <SNR>54_register[9]..go#lsp#DidOpen:
line   19:
E117: Unknown function: sendMessage
E15: Invalid expression: l:lsp.sendMessage(l:msg, l:state)

But also successfully fix it with :GoinstallBinaries command.

Was this page helpful?
0 / 5 - 0 ratings