stamblerre / gocode

An autocompletion daemon for the Go programming language
MIT License
394 stars 28 forks source link

No completions even local struct #16

Closed ilourt closed 5 years ago

ilourt commented 5 years ago

go 1.11 linux/amd64

There is no completions at all, neither external package nor local structure.

go.mod:

module apptest

main.go

package main

type myStruct struct{}

func (ms myStruct) yop() {}

func main() {
    ms := myStruct{}
    ms.#
}

Ouptut of gocode-gomod debug -s

2018/11/23 08:56:44 Cursor at: 103
2018/11/23 08:56:44 -------------------------------------------------------
package main

type myStruct struct{}

func (ms myStruct) yop() {}

func main() {
    ms := myStruct{}
    ms.#
}
2018/11/23 08:56:44 -------------------------------------------------------
2018/11/23 08:56:44 Elapsed duration: 18.953696ms
2018/11/23 08:56:44 Offset: 0
2018/11/23 08:56:44 Number of candidates found: 0
2018/11/23 08:56:44 Candidates are:
2018/11/23 08:56:44 =======================================================

Version commit of the repo : 7ab6cc

For information this is working with the commit (11 october) : 559144

stamblerre commented 5 years ago

Can you try:

$ go get -u golang.org/x/tools/go/packages/gopackages
$ gopackages apptest
ilourt commented 5 years ago

I'm happy to tell @stamblerre that it is working with revision: 22843d8

I just put the result of $ gopackages apptest for information.

Go command "apptest":
    package main
    has no exported type info
    file /home/irwin/work/perso/tests/gomod/main.go
    import "fmt"

Thanks stamblerre for your work.

stamblerre commented 5 years ago

Great to hear, thanks!