Godef
Godef copied to clipboard
Only working when source file opened?
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.
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.
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?
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 =================
Use single GOPATH
for a test.
I guess if your multi gopaths conflict.
Sometimes working, sometime not. :8ball: