stamblerre / gocode

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

no results for unimported packages when using Go modules #3

Closed stamblerre closed 5 years ago

stamblerre commented 6 years ago

In the below case we dont get any completions.

import (
        "rsc.io/quote"
        "fmt"
)

func main() {
        fmt.Println("hello")
        quote.
}

Update the quote. above to quote.Hello(), save the file. The next time auto-completions work

import (
        "rsc.io/quote"
        "fmt"
)

func main() {
        fmt.Println("hello")
        quote.Hello();
        quote.
}
uudashr commented 6 years ago

Do we have progress? Had same issue on vscode-go. Please tell me if there is anything that I can help

stamblerre commented 6 years ago

This is going to require some underlying changes to the go/packages API, so it probably won't be fixed very soon. The current approach is just to save the file and then the completions will work.

ramya-rao-a commented 5 years ago

@stamblerre I believe this can be closed, correct?

stamblerre commented 5 years ago

@ramya-rao-a: I don't believe this has been resolved yet.

stamblerre commented 5 years ago

This should be fixed as of https://github.com/stamblerre/gocode/commit/2f9d39d8f31d7c82b3cd12961d77d9ea3fdad69b.

nezorflame commented 5 years ago

Works, thanks a lot!