fatih / vim-go

Go development plugin for Vim

Home Page:https://www.patreon.com/bhcleek

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Inconsistent :GoDoc behaviour

XSven opened this issue · comments

commented

What did you expect to happen?

Pressing the "K" key on a given word that refers to a package name like "suite"

import (
  "github.com/stretchr/testify/suite"
)

should output the same as

:GoDoc suite

What happened instead?

:GoDoc suite that calls the shell command go doc suite (g:go_debug configured accordingly) provides more(!) documentation

...
func Run(t *testing.T, suite TestingSuite)
type AfterTest interface{ ... }
type BeforeTest interface{ ... }
type SetupAllSuite interface{ ... }
type SetupTestSuite interface{ ... }
type Suite struct{ ... }
type SuiteInformation struct{ ... }
type TearDownAllSuite interface{ ... }
type TearDownTestSuite interface{ ... }
type TestInformation struct{ ... }
type TestingSuite interface{ ... }
type WithStats interface{ ... }

Configuration (MUST fill this out):

vim-go version:

a2e5998

Vim version (first three lines from :version):

VIM - Vi IMproved 8.1 (2018 May 18, compiled Jun 2 2020 02:10:57)
Included patches: 1-2424

Go version (go version):

go version go1.20.4 aix/ppc64

Go environment

GO111MODULE=""
GOARCH="ppc64"
GOBIN="/home/micsw/go/bin"
GOCACHE="/home/micsw/.cache/go-build"
GOENV="/home/micsw/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="ppc64"
GOHOSTOS="aix"
GOINSECURE=""
GOMODCACHE="/home/micsw/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="aix"
GOPATH="/home/micsw/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/opt/freeware/lib/golang"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/opt/freeware/lib/golang/pkg/tool/aix_ppc64"
GOVCS=""
GOVERSION="go1.20.4"
GCCGO="gccgo"
GOPPC64="power8"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/dev/null"
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 -maix64 -pthread -mcmodel=large -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build1764891132=/tmp/go-build -gno-record-gcc-switches"

gopls version

golang.org/x/tools/gopls v0.11.0
    golang.org/x/tools/gopls@v0.11.0 h1:/nvKHdTtePQmrv9XN3gIUN9MOdUrKzO/dcqgbG6x8EY=

:GoDoc with an argument delegates to go doc while K and :GoDoc without an argument delegates to gopls for speed. gopls returns slightly different information for some identifiers than go doc does.