Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only working when source file opened? #16

Open
wangxingge opened this issue Jan 22, 2016 · 5 comments
Open

Only working when source file opened? #16

wangxingge opened this issue Jan 22, 2016 · 5 comments

Comments

@wangxingge
Copy link

Use GoDef just working when source file opened.

Can not go to definition when xxx.go not opened.
Ok when XXX.go opened.

Platform windows, install GoSublime and GoDef.

@buaazp
Copy link
Owner

buaazp commented Jan 22, 2016

Do you set goroot and gopath in user-setting? Like these:

{
    "goroot": "/usr/local/Cellar/go/1.5.3/libexec",
    "gopath": "/Users/zippo/develop/GO",
}

If done, press [ ctrl+` ] to open console and show me the log.

@wangxingge
Copy link
Author

My default setting and user-setting was the same.
{
"goroot": "C:\Go",
"gopath": "D:\Github;E:\svn\golang"
}

And there is no log in sublime console.
when I press F12, it's just list some API which has the same name in other packages.

Does gosublime impacted go-def?

@wangxingge
Copy link
Author

after I change short-key, sublime log displayed.

=================[Godef]Begin=================
[Godef]INFO: using godef: D:\Github\bin\godef.exe
[Godef]INFO: selcet_begin: 467 offset: 467
[Godef]INFO: spawning: D:\Github\bin\godef.exe -f E:\svn\golang\src\xxxxx.com\aaaaa\bbbbb\main.go -o 467
[Godef]ERROR: no definition found: b'godef: no identifier found\n'
=================[Godef] End =================

@buaazp
Copy link
Owner

buaazp commented Jan 25, 2016

Use single GOPATH for a test.

I guess if your multi gopaths conflict.

@wangxingge
Copy link
Author

Sometimes working, sometime not. 🎱

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants