buaazp / Godef

Plugin of sublime to use godef to go to definitions accurately.
BSD 3-Clause "New" or "Revised" License
82 stars 24 forks source link

don't work when env GOPATH has more than one path #2

Closed zhuah closed 9 years ago

zhuah commented 9 years ago

If there is multiple path in env GOPATH, such as /opt/golang:/home/my/Go, the plugin source code can't find the correct path of godef bin

godef_bin = os.path.join(self.gopath, "bin", "godef")

I suggest setup godef path in the settings file Godef.sublime-settings explicitly, self.godefpath = settings.get("godef")

or use the first path of GOPATH, self.gopath.split(":")[0]

I have test first, and it work well.

buaazp commented 9 years ago

Thanks for mention this issue. Now supported. Please reinstall and have a try.