VSCode must install the following plug ins Go language details
- 2020-11-03 22:12:38
- OfStack
VSCode must have the following plug-ins installed:
First you must install the Golang plug-in and then install the Go kit.
In VS Code, use the shortcut keys:
command+shift+P
, then type:
go:install/update tools
, check all 16 plug-ins and click OK to start the installation.
Installing 16 tools at /Users/maiyang/develop/goworkspace//bin
gocode
gopkgs
go-outline
go-symbols
guru
gorename
dlv
godef
godoc
goreturns
golint
gotests
gomodifytags
impl
fillstruct
goplay
Installing github.com/mdempsky/gocode SUCCEEDED
Installing github.com/uudashr/gopkgs/cmd/gopkgs SUCCEEDED
Installing github.com/ramya-rao-a/go-outline SUCCEEDED
Installing github.com/acroca/go-symbols SUCCEEDED
Installing golang.org/x/tools/cmd/guru SUCCEEDED
Installing golang.org/x/tools/cmd/gorename SUCCEEDED
Installing github.com/derekparker/delve/cmd/dlv SUCCEEDED
Installing github.com/rogpeppe/godef SUCCEEDED
Installing golang.org/x/tools/cmd/godoc SUCCEEDED
Installing github.com/sqs/goreturns SUCCEEDED
Installing github.com/golang/lint/golint SUCCEEDED
Installing github.com/cweill/gotests/... SUCCEEDED
Installing github.com/fatih/gomodifytags SUCCEEDED
Installing github.com/josharian/impl SUCCEEDED
Installing github.com/davidrjenni/reftools/cmd/fillstruct SUCCEEDED
Installing github.com/haya14busa/goplay/cmd/goplay SUCCEEDED
All tools successfully installed. You're ready to Go :).
How to modify the default configuration:
in
Preferences -> Setting
Then type go and select
setting.json
, fill in the configuration you want to modify
Automatic completion of unimported packages.
["go.autocompleteUnimportedPackages": true,
]Some of the VSCode plug-ins need to be configured with agents to install properly. (Use with VPN1)
["http.proxy": "192.168.0.100:1087",
]If you encounter code prompts that appear when using standard packages, but do not appear when using your own package or third party libraries, you can look at your configuration items below.
["go.inferGopath": true,
]If the referenced package USES (. "aa. com/text"), then the function under the text package cannot jump in. Why?
Modify the
"go.docsTool
"Is gogetdoc, default is godoc.
"go.docsTool": "gogetdoc",
]other
When we are using the import feature, automatic import will not be performed if we cannot pass the lint check. If you want to automate import, the premise is that you must complete the functions of the package you want to import.
With my
settings.json
{
"go.goroot": "",
"go.gopath": "",
"go.inferGopath": true,
"go.autocompleteUnimportedPackages": true,
"go.gocodePackageLookupMode": "go",
"go.gotoSymbol.includeImports": true,
"go.useCodeSnippetsOnFunctionSuggest": true,
"go.useCodeSnippetsOnFunctionSuggestWithoutType": true,
"go.docsTool": "gogetdoc",
}
Refer to the article: https: / / maiyang me/post / 2018-09-14 - tips - vscode /
conclusion