Using Spacemacs and its go layer.
Using Tramp
in Emacs ssh to remote server to edit go file. After saving the file, it will check the syntax with gofmt
. But every time it shows the error below:
I have tried install these packages at localhost as official guide:
go get -u -v github.com/nsf/gocode
go get -u -v github.com/rogpeppe/godef
go get -u -v golang.org/x/tools/cmd/guru
go get -u -v golang.org/x/tools/cmd/gorename
go get -u -v golang.org/x/tools/cmd/goimports
go get -u -v github.com/alecthomas/gometalinter
gometalinter --install --update
https://github.com/syl20bnr/spacemacs/tree/master/layers/%2Blang/go
Also set (go :variables go-use-gometalinter t)
(or (setq gofmt-command "goimports")
) in the ~/.spacemacs
file. But not work. Indeed, there aren't go runtime at remote server where go source exist.
So where it looking for and went a alert? How to avoid it?