fatih / vim-go

Go development plugin for Vim
https://www.patreon.com/bhcleek
Other
15.9k stars 1.45k forks source link

Call: GoReferrers error #3653

Closed scrawld closed 3 months ago

scrawld commented 3 months ago

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

package main

import (
        "fmt"
        "os"
)

func main() {
        printHost()
}

func printHost() {
        s, _ := os.Hostname()
        fmt.Println(s)
}

Place the cursor in the printHost method where you want to view the reference and execute :GoReferrers

What did you expect to happen?

List all calls

What happened instead?

vim-go: [referrers] SUCCESS Error detected while processing function 4[13]..6[37]..function 4[13]..6[26]..43_handleReferences[1]..43_handleLocations: line 24: E118: Too many arguments for function: 49_parse_output Error detected while processing function 4: line 13: E171: Missing :endif

image

Configuration (MUST fill this out):

call plug#begin() Plug 'fatih/vim-go', {'do': ':GoUpdateBinaries'} call plug#end()

vim-go version: master branch, the last commit is e39d7eec6eea5e3a642fe91460f43b4f8607cfcf

vimrc you used to reproduce:

vimrc ```vim call plug#begin() Plug 'fatih/vim-go', {'do': ':GoUpdateBinaries'} call plug#end() ```

Vim version (first three lines from :version):

VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Jun 22 2023 04:08:04) Included patches: 1-3995, 4563, 4646, 4774, 4895, 4899, 4901, 4919 Modified by team+vim@tracker.debian.org

Go version (go version):

go version go1.21.3 linux/amd64

Go environment

go env Output:

GO111MODULE='auto'
GOARCH='amd64'
GOBIN='/root/etc/go/bin'
GOCACHE='/root/.cache/go-build'
GOENV='/root/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/root/etc/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/root/etc/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/local/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/local/go/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.21.3'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/root/work/example/test_func/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build3219477141=/tmp/go-build -gno-record-gcc-switches'

gopls version

gopls version Output:

golang.org/x/tools/gopls v0.15.2

vim-go configuration:

vim-go configuration
g:go_loaded_install = 1
g:go_jump_to_error = 1
g:go_loaded_gosnippets = 1

filetype detection configuration:

filetype detection
filetype detection:ON  plugin:ON  indent:ON