Closed kyepskee closed 4 years ago
It sounds like you are running into this issue: https://github.com/golang/go/issues/22418#issuecomment-338997709. If you rebuild guru on this system does that fix your issue?
Have you tried using gopls instead of guru? Guru isn't being actively worked on by the go team anymore but gopls has engineers on the go team that work on it full time. Here are some setup instructions for emacs: https://github.com/golang/tools/blob/master/gopls/doc/emacs.md
I left
$GOROOT
unset in my.profile
file, because I wanted to leave it at a default, which is also mirrored bygo env
's outputting the default$GOROOT
value -/usr/lib/go/
. However, in its current statego-guru.el
doesn't check for defaults. For that reason I couldn't by default get the definition ofhttp.Dir
(from the standard librarynet/http
), until I added:(setenv "GOROOT" "/usr/lib/go/")
.The solution is obvious: if in the Emacs env, the value doesn't exist, get it from
go env
. It seems pretty simple, but I don't know Emacs Lisp well enough to submit a pull request, so I hope someone experienced can fix this one :)