-
Notifications
You must be signed in to change notification settings - Fork 128
Auto-complete & other issues with modules #872
Comments
I've noticed this as well. I've found that running atom with go mod disabled helps. GO111MODULE=off {atom-executable} on mac: GO111MODULE=off /Applications/Atom.app/Contents/MacOS/Atom |
@dmowcomber that didn't work for me. Auto-complete only seems to work with stdlib and not modules/deps |
It seems to work with packages that are installed in your GOPATH, afaik. |
I tried to go install all my packages and it was still not working so I gave up and just bought goland. |
I managed to fix the auto-completion problems as follows:
^^ this fixed the auto-completion issues for me. Though, for every update to go-plus, I had to repeat these steps. |
@malkhamis how do you find where to click for I am experiencing very similar slow downs on Linux using Go modules. The whole OS becomes unavailable because the amount of RAM keeps growing until (I think) it starts swapping with the disk and everything is freezed. I have to wait minutes before being able to open a new terminal (with Ctrl+Alt+F2) and kill all the instances of |
@malkhamis delete the original gocode and |
Is there a fix to this ? |
All prerequisites to submit issues have been completed.
Description
I was the happiest developer in the world when go-plus brought an amazing Go environment to Atom. However, it has turned into somewhat of a nightmare since our switch to Go modules. There are a number of recurring issues that cost me a lot of time and nerves. I'm putting them in the same issue because I'm reasonably certain they are related.
Output from
atom -v && apm -v
Output From
go env
Issues
I have not been able to reproduce most of these consistently.
When I type a variable name, I expect to see the functions and fields available for its type. Instead, I get either nothing or an
invalid type
message. This seems to happen only for variables defined in packages of the module. This is usually accompanied by the CPU fan running at top speed, so I am speculating some process is doing busy work.When I type a package name of the module or a variable name of a types defined in a package of the module, I expect to get the list auto-complete for the available functions, types and variables as defined in the code. Instead, I get an outdated list of available functions, types and variables from a much older version.
I think this issue has previously been adequately described. I mention it for the sake of completeness and because I think it plays with the next issue.
When I have imported a package from the module into a source file, I expect to get the auto-complete for that package. Instead, I get the auto-complete for an external package of the same name. For instance, we have our own
cli
package that is explicitly imported in a file; the auto-complete still shows the auto-complete for theurfave/cli
package.This one is minor, yet still annoying. When I use
godef
, I can right-click to go to the definition of a type, for instance. Withguru
, it displays the definition/signature on hover, but it does not allow me to right-click to go directly to the source.I have also tried manually switching to
stamblerre/gocode
, as mentioned in #761, which did not seem to fix any of the issues described. Rebooting only seems to fix the first issue, of everything not working at all.The text was updated successfully, but these errors were encountered: