DisposaBoy / GoSublime

A Golang plugin collection for SublimeText 3, providing code completion and other IDE-like features.
MIT License
3.42k stars 302 forks source link

Code Completion doesn't work #691

Closed kakysha closed 5 years ago

kakysha commented 8 years ago

OSX, clean install of GoSublime, no user settings, no project settings about gosublime, console shows no errors, ps ax | grep go shows gosublime.margo_r16.03.22-1_go1.6.exe -oom 1000 -poll 30 -tag r16.03.22-1 running. No autocompletion at all. When hitting ctrl+shift+space nothing happens but in console it outputs: no command for selector: noop:

Although 'list file declarations' and 'list package declarations' seems to be working, they list for example - func check but typing ch and pressing ctrl+shift+space gives nothing.

DisposaBoy commented 8 years ago

AFAIK GoSublime has no key binding for completion on OS X and the error suggests that that key binding doesn't do anything... it should however be triggered if you type something like fmt.Pr

naunga commented 8 years ago

I'm having the exact same problem after updating today.

The GoSublime process is running: gosublime.margo_r16.05.07-1_go1.6.2.exe -oom 1000 -poll 30 -tag r16.05.07-1

Typing something like fmt.Pr does not trigger the code completion.

It isn't even bringing up the "default" SublimeText completions for words that exist in the file.

In addition to the error mentioned by the op, I also saw this error: indexing [queue 15]: no files were indexed out of the 1 queued, abandoning crawl, which seems potentially relevant.

naunga commented 8 years ago

Okay...feeling kind of dumb now, but I'll post this, because folks might find it useful and there still might be a bug.

I restarted Sublime Text to just see if that would resolve things, and I saw an error to the effect of MarGo: GOPATH not set.

My GOPATH was set correctly in the terminal, so I'm not sure why MarGo was having issues with it, but meh...whatever. So I set it in my ST project and restarted.

No error, and code completion worked as desired.

Not sure if MarGo should be getting the GOPATH from the environment or not, but that's for someone else to examine. At present I've got my stuff working and can get some work done.