Closed kirito41dd closed 1 year ago
Please provide the information requested in the issue template that's used when creating a new issue.
However, assuming that you're using a relatively modern version of Go, here are some things for you to know and to check:
:GoUpdateBinaries
either with no arguments or with a single argument, impl
? It's possible that your impl
binary was compiled before go.work
support was added.i use :GoImpl in a go.work project
impl the interface
has error unrecognized interface: package2.xxInterface
return {
"fatih/vim-go",
build = ':GoInstallBinaries' -- if you need to install/update all binaries
}
● vim-go 2.01ms start
e3008d9 update CHANGELOG.md for #3538 (13 days ago)
vimrc
you used to reproduce::version
):nvim 0.9.1
go version
):GOVERSION="go1.19.1"
go env
Output:GO111MODULE="auto" GOARCH="amd64" GOBIN="" GOCACHE="/Users/x/Library/Caches/go-build" GOENV="/Users/x/Library/Application Support/go/env" GOEXE="" GOEXPERIMENT="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GOINSECURE="" GOMODCACHE="/Users/x/go/pkg/mod" GOOS="darwin" GOPATH="/Users/x/go" GOMOD="/Users/x/work/go.mod" GOWORK="/Users/x/work/xxx/go.work"
gopls version
Output:golang.org/x/tools/gopls v0.12.1 golang.org/x/tools/gopls@v0.12.2 h1:s4mznBqCHVHeuTYjxGYJhsW3Wp4FYon8YAqiJlwlpTY=
when i run:
➜ impl -dir package1/ 'es *package1.xxx' package2.Interface
there are nothing output and nothing change
maybe not support yet
This all works for me. I'm able to generate the implementation using vim-go and using impl
on the commandline.
Perhaps you need to upgrade impl
with :GoUpdateBinaries impl
?
after :GoUpdateBinaries impl
, it's ok
tree:
:GoImpl p xx(package1) package2.xxInterface
unrecognized interface: package2.xxInterface