@@ -21,7 +21,7 @@ extension fits your needs and enhances your development experience.
21
21
* ** Step 1.** If you haven't done so already, install [ Go] ( https://golang.org )
22
22
and the [ VS Code Go extension] .
23
23
* [ Go installation guide] . This extension works best with Go 1.14+.
24
- * [ Manage extensions in VS Code] .
24
+ * [ Managing extensions in VS Code] .
25
25
* ** Step 2.** To activate the extension, open any directory or workspace
26
26
containing Go code. Once activated, the [ Go status bar] ( docs/ui.md ) will
27
27
appear in the bottom left corner of the window and show the recognized Go
@@ -38,23 +38,23 @@ extension fits your needs and enhances your development experience.
38
38
39
39
You are ready to Go :-)   ;  ; 🎉🎉🎉
40
40
41
- Please be sure to learn more about many [ features] ( #features ) of this extension
42
- as well as how to [ customize] ( #customization ) them. Take a look at
41
+ Please be sure to learn more about the many [ features] ( #features ) of this
42
+ extension, as well as how to [ customize] ( #customization ) them. Take a look at
43
43
[ Troubleshooting] ( docs/troubleshooting.md ) and [ Help] ( #ask-for-help ) for further
44
44
guidance.
45
45
46
46
If you are new to Go, [ this article] ( https://golang.org/doc/code.html ) provides
47
- the overview on go code organization and basic ` go ` commands. The recent
48
- [ Go open source live video ] featured VS Code Go and demonstrated how other
49
- Gophers use the features to enhance their Go development workflow .
47
+ the overview on Go code organization and basic ` go ` commands. Watch [ this video
48
+ from the Go Open Source Live conference ] for an explanation of how to build
49
+ your first Go application using VS Code Go.
50
50
51
51
## Features
52
52
53
53
This extension provides many features, including [ IntelliSense] ,
54
- [ code navigation] , [ code editing] support. It also shows [ diagnostics] as you
55
- work and provides enhanced support for [ testing] and [ debugging] your programs.
56
- See the [ full feature breakdown] for more details and to learn how to tune the
57
- behavior.
54
+ [ code navigation] , and [ code editing] support. It also shows [ diagnostics] as
55
+ you work and provides enhanced support for [ testing] and [ debugging] your
56
+ programs. See the [ full feature breakdown] for more details and to learn how to
57
+ tune its behavior.
58
58
59
59
<p align =center >
60
60
<img src =" docs/images/completion-signature-help.gif " width =75% >
@@ -66,68 +66,75 @@ In addition to integrated editing features, the extension provides several
66
66
commands for working with Go files. You can access any of these by opening the
67
67
Command Palette (` Ctrl+Shift+P ` on Linux/Windows and ` Cmd+Shift+P ` on Mac), and
68
68
then typing in the command name. See the
69
- [ full list of commands] ( docs/commands.md#detailed-list ) provided by the
69
+ [ full list of commands] ( docs/commands.md#detailed-list ) provided by this
70
70
extension.
71
71
72
72
<p align =center >
73
73
<img src =" docs/images/toggletestfile.gif " width =75% >
74
74
<br /><em >(Toggle Test File)</em ></p >
75
75
76
- ** ⚠️ Note** : the default syntax highlighting for Go files is provided by the
76
+ ** ⚠️ Note** : the default syntax highlighting for Go files is provided by a
77
77
[ TextMate rule] ( https://github.com/jeff-hykin/better-go-syntax ) embedded in VS
78
78
Code, not by this extension.
79
79
80
80
## Tools
81
81
82
82
The extension uses a few command-line tools developed by the Go community. In
83
- particular, ` go ` , ` gopls ` , and ` dlv ` are used to implement build/test, language
84
- features, and debugging functionalities of this extension. See the
85
- [ tools documentation] ( docs/tools.md ) for a complete list of tools the extension
86
- depends on.
87
-
88
- In order to locate the command-line tools, the extension searches ` $GOPATH/bin `
89
- and directories specified in the ` PATH ` environment variable (or ` Path ` in
90
- Windows) with which the VS Code process has started. If the tools are not found,
91
- the extension will prompt you to install the missing tools and show the "⚠️
92
- Analysis Tools Missing" warning in the bottom right corner. Please install them
93
- by responding to the warning notification, or by manually running the `Go:
94
- Install/Update Go Tools` command. The extension will run the
95
- [ ` go get ` ] ( https://golang.org/cmd/go ) command to install them.
83
+ particular, ` go ` , ` gopls ` , and ` dlv ` ** must** be installed for this extension
84
+ to work correctly. See the [ tools documentation] ( docs/tools.md ) for a complete
85
+ list of tools the extension depends on.
86
+
87
+ In order to locate these command-line tools, the extension searches
88
+ ` GOPATH/bin ` and directories specified in the ` PATH ` environment variable (or
89
+ ` Path ` on Windows) with which the VS Code process has started. If the tools are
90
+ not found, the extension will prompt you to install the missing tools and show
91
+ the "⚠️ Analysis Tools Missing" warning in the bottom right corner. Please
92
+ install them by responding to the warning notification, or by manually running
93
+ the [ ` Go: Install/Update Go Tools ` command] .
96
94
97
95
## Setting up your workspace
98
96
99
97
[ Go modules] ( https://golang.org/ref/mod ) are how Go manages dependencies in
100
98
recent versions of Go. Modules replace the ` GOPATH ` -based approach to specifying
101
99
which source files are used in a given build, and they are the default build
102
100
mode in go1.16+. While this extension continues to support both Go modules and
103
- ` GOPATH ` mode , we highly recommend Go development in module mode. If you are
101
+ ` GOPATH ` modes , we highly recommend Go development in module mode. If you are
104
102
working on existing projects, please consider migrating to modules.
105
103
106
104
Unlike the traditional ` GOPATH ` mode, module mode does not require the workspace
107
105
to be located under ` GOPATH ` nor to use a specific structure. A module is
108
106
defined by a directory tree of Go source files with a ` go.mod ` file in the
109
- tree's root directory. Your project may involve one or more modules. If you are
110
- working with multiple modules or uncommon project layouts, you will need to
111
- configure your workspace so that the extension knows which code to load, so that
112
- features like references can work across modules. Please see the
113
- for information on supported workspace layouts.
107
+ tree's root directory.
108
+
109
+ Your project may involve one or more modules. If you are working with multiple
110
+ modules or uncommon project layouts, you will need to configure your workspace
111
+ by using [ Workspace Folders] . Please see this [ documentation about supported
112
+ workspace layouts] .
114
113
115
114
## Customization
116
115
117
116
The extension needs no configuration and should work out of the box. However,
118
- you may wish to adjust settings to customize its behavior. Below are a few
119
- commonly used settings. Please see the
117
+ you may wish to adjust settings to customize its behavior. Please see the
120
118
[ settings documentation] ( docs/settings.md ) for a comprehensive list of settings.
121
119
See [ advanced topics] ( docs/advanced.md ) for further customizations and unique
122
120
use cases.
123
121
122
+ ## Troubleshooting
123
+
124
+ If the extension isn't working as you expect, you can take a look at our
125
+ troubleshooting guides. There is one for [ general
126
+ troubleshooting] ( docs/troubleshooting.md ) , and another specifically for
127
+ [ troubleshooting the debugging feature] ( docs/debugging.md#troubleshooting ) .
128
+
124
129
## Ask for help
125
130
126
- If you're having issues with this extension, please reach out to us by
127
- [ filing an issue] ( https://github.com/golang/vscode-go/issues/new/choose ) or
128
- asking a question on the [ Gophers Slack] . We hang out in the ` #vscode ` channel!
131
+ If the troubleshooting guides did not resolve the issue, please reach out to us
132
+ by [ filing an issue] ( https://github.com/golang/vscode-go/issues/new/choose ) ,
133
+ [ starting a GitHub discussion] ( https://github.com/golang/vscode-go/discussions ) ,
134
+ or by asking a question in the [ Gophers Slack] . We hang out in the ` #vscode `
135
+ channel!
129
136
130
- Take a look at [ learn.go.dev] ( https://learn.go.dev ) and
137
+ Also, you can take a look at [ learn.go.dev] ( https://learn.go.dev ) and
131
138
[ golang.org/help] ( https://golang.org/help ) for more general guidance on using
132
139
Go.
133
140
158
165
[ Gophers Slack ] : https://gophers.slack.com/
159
166
[ `gopls` ] : https://golang.org/s/gopls
160
167
[ `go` ] : https://golang.org/cmd/go
161
- [ Manage extensions in VS Code] : https://code.visualstudio.com/docs/editor/extension-gallery
168
+ [ Managing extensions in VS Code] : https://code.visualstudio.com/docs/editor/extension-gallery
162
169
[ VS Code Go extension ] : https://marketplace.visualstudio.com/items?itemName=golang.go
163
170
[ Go installation guide ] : https://golang.org/doc/install
164
- [ Go open source live video ] : https://opensourcelive.withgoogle.com/events/go/watch?talk=session3
165
- [ IntelliSense ] : docs/features.md#intellisense
166
- [ code navigation ] : docs/features.md#code-navigation
167
- [ code editing ] : docs/features.md#code-editing
168
- [ diagnostics ] : docs/features.md#diagnostics
169
- [ testing ] : docs/features.md##run-and-test-in-the-editor
171
+ [ this video from the Go Open Source Live conference ] : https://opensourcelive.withgoogle.com/events/go/watch?talk=session3
172
+ [ IntelliSense ] : https://github.com/golang/vscode-go/blob/master/ docs/features.md#intellisense
173
+ [ code navigation ] : https://github.com/golang/vscode-go/blob/master/ docs/features.md#code-navigation
174
+ [ code editing ] : https://github.com/golang/vscode-go/blob/master/ docs/features.md#code-editing
175
+ [ diagnostics ] : https://github.com/golang/vscode-go/blob/master/ docs/features.md#diagnostics
176
+ [ testing ] : https://github.com/golang/vscode-go/blob/master/ docs/features.md##run-and-test-in-the-editor
170
177
[ debugging ] : #debugging
171
- [ full feature breakdown ] : docs/features.md
178
+ [ full feature breakdown ] : https://github.com/golang/vscode-go/blob/master/ docs/features.md
172
179
[ workspace documentation ] : https://github.com/golang/tools/blob/master/gopls/doc/workspace.md
180
+ [ `Go: Install/Update Go Tools` command ] : https://github.com/golang/vscode-go/blob/master/docs/commands.md#go-installupdate-tools
181
+ [ documentation about supported workspace layouts ] : https://github.com/golang/tools/blob/master/gopls/doc/workspace.md
182
+ [ Workspace Folders ] : https://code.visualstudio.com/docs/editor/multi-root-workspaces
0 commit comments