Vim-go: to folder /home/deniz/go/bin/

Created on 19 Jun 2019  路  3Comments  路  Source: fatih/vim-go

What did you do? (required: The issue will be closed when not provided)

Actually ,I'm beginner for vim .I installed vimrc configuration from this system (https://vim-bootstrap.com/ ).Everything is working clearly but 谋 get a few errors.Note:谋 read al issues about this problem

What did you expect to happen?

What happened instead?

vim-go: could not find 'gopls'. Run :GoInstallBinaries to fix it
Error detected while processing function 82_register[9]..go#lsp#DidOpen:
line 19:
E117: Unknown function: sendMessage
E15: Invalid expression: l:lsp.sendMessage(l:msg, l:state)
vim-go: gopls not found. Installing golang.org/x/tools/cmd/gopls to folder /home
/deniz/go/bin/ (but this folder has gopls package)

Configuration (MUST fill this out):

vim-go version:

vimrc you used to reproduce (use a minimal vimrc with other plugins disabled; do not link to a 2,000 line vimrc):

vimrc

Vim version (first three lines from :version):


8.0.1453

Go version (go version):


go version go1.12.6 linux/amd64

Go environment

go env Output:


GOARCH="amd64"
GOBIN=""
GOCACHE="/home/deniz/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/deniz/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/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-build209670749=/tmp/go-build -gno-record-gcc-switches"

Most helpful comment

A null module is a module that's outside of GOPATH and that is missing a go.mod file. gopls requires that Go files that it deals with are either in GOPATH or else in a defined module. If you want to work with null modules, then I'd suggest setting g:go_null_module_warning=0 in your vimrc to disable the warning.

All 3 comments

谋 solved my problem,I have updated my golang version 1.10 to 1.12 {gopls package not portable for 1.10 golang version} and i removed gopls package in /go/bin/ and Run :GoInstallBinaries .This error dissapeared from command line .Now it gave "vim-go: Features that rely on gopls will not work correctly outside of GOPATH or a module. " this problem or warning .

A null module is a module that's outside of GOPATH and that is missing a go.mod file. gopls requires that Go files that it deals with are either in GOPATH or else in a defined module. If you want to work with null modules, then I'd suggest setting g:go_null_module_warning=0 in your vimrc to disable the warning.

thanks for helping :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cassiobotaro picture cassiobotaro  路  3Comments

danielmanesku picture danielmanesku  路  4Comments

preslavmihaylov picture preslavmihaylov  路  3Comments

MattFlower picture MattFlower  路  4Comments

joeblubaugh picture joeblubaugh  路  3Comments