vscode手动安装以下插件(自动安装失败的情况下):
gocode
outline
symbols
guru
gorename
gocode(安装好之后发现代码提示好慢,其他地方还有点问题,所以最后我还是用回goland了~~)
goreturns
golint
步骤:
找到你的gopath目录
在下面的src下,新建golang.org/x目录
在x下,运行:
git clone https://github.com/golang/tools.git
git clone https://github.com/golang/lint.git
因为之前在vscode中点击提示的install all,输出部分安装失败(但是其实都是下载成功了的,只是安装失败了而已,都在bin下)
所以,切换到gopath目录下,运行:
go install github.com/mdempsky/gocode
go install github.com/ramya-rao-a/go-outline
go install github.com/acroca/go-symbols
go install golang.org/x/tools/cmd/guru
go install golang.org/x/tools/cmd/gorename
go install github.com/stamblerre/gocode
go install github.com/sqs/goreturns
go install golang.org/x/lint/golint
就可以了~