You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 17, 2021. It is now read-only.
Create a directory outside GOPATH and initialize it as a module with go mod init github.com/cskr/foo.
Use VIM with vim-go installed and create main.go with following content.
package main
funcmain() {
varvMyStruct
}
typeMyStructstruct {
Fieldint
}
Hit C-x C-o after typing if v. immediately after the variable declaration as shown below,
funcmain() {
varvMyStructifv.
}
Pattern not found was displayed as error. However, if I add braces at the end of if as shown below or and then try C-x C-o or define MyStruct before main, it works.
funcmain() {
varvMyStructifv. {}
}
What version of Go are you using (go version)?
go version go1.11.4 linux/amd64
What operating system and processor architecture are you using (go env)?
GOARCH="amd64"
GOOS="linux"
What is the debug output of gocode?
2019/01/04 21:38:00 Got autocompletion request for '/home/cskr/foo/main.go'
2019/01/04 21:38:00 Cursor at: 50
2019/01/04 21:38:00 -------------------------------------------------------
package main
func main() {
var v MyStruct
if v.#
}
type MyStruct struct {
Field int
}
2019/01/04 21:38:00 -------------------------------------------------------
2019/01/04 21:38:00 error in package github.com/cskr/foo: /home/cskr/foo/main.go:4:8:undeclared name: MyStruct
2019/01/04 21:38:00 error in package github.com/cskr/foo: /home/cskr/foo/main.go:8:6:undeclared name: MyStruct
2019/01/04 21:38:00 Elapsed duration: 69.581082ms
2019/01/04 21:38:00 Offset: 0
2019/01/04 21:38:00 Number of candidates found: 0
2019/01/04 21:38:00 Candidates are:
2019/01/04 21:38:00 =======================================================
What (client-side) flags are you passing into gocode?
I pass -unimported-packages.
What editor are using?
VIM 8.0
The text was updated successfully, but these errors were encountered:
Sorry for not getting back to you earlier. This repository is currently in maintenance mode, so I will close this issue. The current recommendation for autocompletion is to use gopls.
Steps to reproduce
GOPATH
and initialize it as a module withgo mod init github.com/cskr/foo
.main.go
with following content.C-x C-o
after typingif v.
immediately after the variable declaration as shown below,Pattern not found
was displayed as error. However, if I add braces at the end ofif
as shown below or and then tryC-x C-o
or defineMyStruct
beforemain
, it works.What version of Go are you using (
go version
)?go version go1.11.4 linux/amd64
What operating system and processor architecture are you using (
go env
)?What is the debug output of
gocode
?What (client-side) flags are you passing into
gocode
?I pass
-unimported-packages
.What editor are using?
VIM 8.0
The text was updated successfully, but these errors were encountered: