vscode golang 配置详解

go install github.com/nsf/gocode
最新使用:go install github.com/mdempsky/gocode

go install github.com/rogpeppe/godef
go install github.com/zmb3/gogetdoc
go install github.com/golang/lint/golint
go install github.com/lukehoban/go-outline
go install sourcegraph.com/sqs/goreturns
go install golang.org/x/tools/cmd/gorename
go install github.com/tpng/gopkgs
go install github.com/newhook/go-symbols
go install github.com/cweill/gotests/...
go install golang.org/x/tools/cmd/guru
//如果需要在vscode中调试go程序,需要下载安装dlv
go install github.com/derekparker/delve/cmd/dlv

vscode ctl+s 保存 自动格式化go代码

一、实现vs code中代码格式化快捷键:【Shift】+【Alt】+F

二、实现保存时自动代码格式化:

1)文件 ------.>【首选项】---------->【设置】;

2)搜索emmet.include;

3)在settings.json下的【工作区设置】中添加以下语句:

“editor.formatOnType”: true,
“editor.formatOnSave”: true

 

你可能感兴趣的:(go语言)