Matthew Dempsky

Results 120 comments of Matthew Dempsky

Also erroneously reports main.main as unused.

You can try https://github.com/mdempsky/gocode if you don't need modules support, or https://github.com/stamblerre/gocode if you do. But long term, you should probably look into switching from company-mode to lsp-mode (with gopls),...

FYI, I just added a -source flag to mdempsky/gocode to make it generate suggestions from source, instead of from compiled package definitions. Caveat: the main branch of mdempsky/gocode doesn't implement...

@nsf Thank you for the link. I don't mind.

Why does gocode need to parse export data itself? Is there functionality missing from go/importer?

Sorry, I don't use gb so I don't understand the problem. gb still uses .a files like normal cmd/go builds, right? You can use importer.Default().Import("/path/to/goroot/pkg/linux_amd64/fmt") for example to load /path/to/goroot/pkg/linux_amd64/fmt.a.

BTW, I have a mostly working prototype that uses go/importer to directly create decls for imported objects, bypassing creating the go/ast intermediate form. I just need to fix two last...

FWIW, I uploaded my modified version of gocode as github.com/mdempsky/gocode. It's dramatically smaller (~1600, down from ~6500) mostly due to using go/types and go/importer. It also doesn't attempt any caching,...

@mattetti I do plan on maintaining my version. If you find any issues, feel free to report them under mdempsky/gocode (so we don't spam @nsf :)), and I'll take a...

Update: I've added gb support to mdempsky/gocode. It hopefully works automatically and without any configuration: if gocode notices that you're editing a file within DIR/src or DIR/vendor/src and DIR is...