Godef icon indicating copy to clipboard operation
Godef copied to clipboard

Only working when source file opened?

Open wangxingge opened this issue 9 years ago • 5 comments

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.

wangxingge avatar Jan 22 '16 02:01 wangxingge

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.

buaazp avatar Jan 22 '16 11:01 buaazp

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 avatar Jan 25 '16 06:01 wangxingge

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 =================

wangxingge avatar Jan 25 '16 06:01 wangxingge

Use single GOPATH for a test.

I guess if your multi gopaths conflict.

buaazp avatar Jan 25 '16 07:01 buaazp

Sometimes working, sometime not. :8ball:

wangxingge avatar Feb 14 '16 00:02 wangxingge