vscode go mainly to develop plug-ins

 • Colorization with color codes

• Completion Lists code completion (use gocode)

• Snippets snippet

• Quick Info Quick tips (use godef)

• Goto Definition jump to the definition (using godef)

• Find References Search references (using a go-find-references)

• File outline outline file (using the go-outline)

• Workspace symbol search job symbol search area (using a go-symbols)

• Rename Rename (use gorename)

• Build-on-save save the building (use go build and go test)

• Format code formatting (using goreturns or goimports or gofmt)

• Add Imports add a reference to (use gopkgs)

• Debugging debugging code (use delve)

vscode default will be prompted to install the missing plug-ins, but some plug-in needs over the wall, you need to install it manually.
Do not need to be directly over the wall go get, or need to manually download the corresponding plug-in package, put the system GOPATH / src,
and to create a corresponding directory structure, execution go install.

install github.com/nsf/gocode Go
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 sourcegraph.com/sqs/goreturns install
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
// If you need to debug programs in vscode go, you need to download and install DLV
go install github.com/derekparker/delve/cmd/dlv

1) mounted gocode
Go GET github.com/nsf/gocode -v -u
2) mounted godef
Go GET -v -u github.com/rogpeppe/godef
. 3) mounted golint
Go GET -v -u github.com/golang/ lint / golint? ? ? ?
4) Find-mounted-References Go
Go GET -v -u github.com/lukehoban/go-find-references
. 5) mounted Outline-Go
Go GET -v -u github.com/lukehoban/go-outline
. 6) mounted goreturns
go get -u -v sourcegraph.com/sqs/goreturns? ? ? ?
GET -u -v github.com/sqs/goreturns Go
7) installation gorename
Go GET -u -v golang.org/x/tools/cmd/gorename? ? ? ?
8) Installation gopkgs
Go GET -u -v github.com/tpng/gopkgs
9) Symbols-install Go
Go GET -u -v github.com/newhook/go-symbols? ? ? ?

集成安装:
go get -u -v github.com/nsf/gocode
go get -u -v github.com/rogpeppe/godef
go get -u -v github.com/golang/lint/golint
go get -u -v github.com/lukehoban/go-find-references
go get -u -v github.com/lukehoban/go-outline
go get -u -v sourcegraph.com/sqs/goreturns
go get -u -v golang.org/x/tools/cmd/gorename
go get -u -v github.com/tpng/gopkgs
go get -u -v github.com/newhook/go-symbols

•go-outline: go get -u -v github.com/ramya-rao-a/go-outline
•go-symbols: go get -u -v github.com/acroca/go-symbols
•gocode: go get -u -v github.com/nsf/gocode
•godef: go get -u -v github.com/rogpeppe/godef
•godoc: go get -u -v golang.org/x/tools/cmd/godoc
•gogetdoc: go get -u -v github.com/zmb3/gogetdoc
•golint: go get -u -v github.com/golang/lint/golint
•gomodifytags: go get -u -v github.com/fatih/gomodifytags
•gopkgs: go get -u -v github.com/uudashr/gopkgs/cmd/gopkgs
•gorename: go get -u -v golang.org/x/tools/cmd/gorename
•goreturns: go get -u -v sourcegraph.com/sqs/goreturns
•gotests: go get -u -v github.com/cweill/gotests/...
•guru: go get -u -v golang.org/x/tools/cmd/guru
•impl: go get -u -v github.com/josharian/impl

To install the tools manually in the current GOPATH, just paste and run:

go get -u -v 
github.com/ramya-rao-a/go-outline 
github.com/acroca/go-symbols 
github.com/nsf/gocode 
github.com/rogpeppe/godef 
golang.org/x/tools/cmd/godoc 
github.com/zmb3/gogetdoc 
github.com/golang/lint/golint 
github.com/fatih/gomodifytags 
github.com/uudashr/gopkgs/cmd/gopkgs 
golang.org/x/tools/cmd/gorename 
sourcegraph.com/sqs/goreturns 
github.com/cweill/gotests/... 
golang.org/x/tools/cmd/guru 
github.com/josharian/impl

 

Guess you like

Origin www.cnblogs.com/dfsxh/p/11577950.html