5
5
` gopls ` (pronounced "Go please") is the official Go [ language server] developed
6
6
by the Go team. It provides IDE features to any [ LSP] -compatible editor.
7
7
8
- <!-- TODO(rstambler ): Add gifs here.-->
8
+ <!-- TODO(rfindley ): Add gifs here.-->
9
9
10
10
You should not need to interact with ` gopls ` directly--it will be automatically
11
11
integrated into your editor. The specific features and settings vary slightly
12
- by editor, so we recommend that you proceed to the [ documentation for your
13
- editor] ( #editors ) below.
12
+ by editor, so we recommend that you proceed to the
13
+ [ documentation for your editor] ( #editors ) below.
14
14
15
15
## Editors
16
16
17
17
To get started with ` gopls ` , install an LSP plugin in your editor of choice.
18
18
19
- * [ VSCode ] ( https://github.com/golang/vscode-go/blob/master/README.md )
19
+ * [ VS Code ] ( https://github.com/golang/vscode-go/blob/master/README.md )
20
20
* [ Vim / Neovim] ( doc/vim.md )
21
21
* [ Emacs] ( doc/emacs.md )
22
22
* [ Atom] ( https://github.com/MordFustang21/ide-gopls )
23
23
* [ Sublime Text] ( doc/subl.md )
24
24
* [ Acme] ( https://github.com/fhs/acme-lsp )
25
25
26
- If you use ` gopls ` with an editor that is not on this list, please let us know
27
- by [ filing an issue ] ( #new-issue ) or [ modifying this documentation] ( doc/contributing.md ) .
26
+ If you use ` gopls ` with an editor that is not on this list, please send us a CL
27
+ [ updating this documentation] ( doc/contributing.md ) .
28
28
29
29
## Installation
30
30
31
31
For the most part, you should not need to install or update ` gopls ` . Your
32
32
editor should handle that step for you.
33
33
34
- If you do want to get the latest stable version of ` gopls ` , change to any
35
- directory that is both outside of your ` GOPATH ` and outside of a module (a temp
36
- directory is fine), and run:
34
+ If you do want to get the latest stable version of ` gopls ` , run the following
35
+ command:
37
36
38
37
``` sh
39
38
go install golang.org/x/tools/gopls@latest
40
39
```
41
40
42
- Learn more in the [ advanced installation
43
- instructions] ( doc/advanced.md#installing-unreleased-versions ) .
41
+ Learn more in the
42
+ [ advanced installation instructions] ( doc/advanced.md#installing-unreleased-versions ) .
43
+
44
+ Learn more about gopls releases in the [ release policy] ( doc/releases.md ) .
44
45
45
46
## Setting up your workspace
46
47
47
- ` gopls ` supports both Go module and GOPATH modes, but if you are working with
48
- multiple modules or uncommon project layouts, you will need to specifically
49
- configure your workspace. See the [ Workspace document] ( doc/workspace.md ) for
50
- information on supported workspace layouts.
48
+ ` gopls ` supports both Go module, multi-module and GOPATH modes. See the
49
+ [ workspace documentation] ( doc/workspace.md ) for information on supported
50
+ workspace layouts.
51
51
52
52
## Configuration
53
53
54
54
You can configure ` gopls ` to change your editor experience or view additional
55
55
debugging information. Configuration options will be made available by your
56
56
editor, so see your [ editor's instructions] ( #editors ) for specific details. A
57
- full list of ` gopls ` settings can be found in the [ Settings documentation] ( doc/settings.md ) .
57
+ full list of ` gopls ` settings can be found in the [ settings documentation] ( doc/settings.md ) .
58
58
59
59
### Environment variables
60
60
61
61
` gopls ` inherits your editor's environment, so be aware of any environment
62
62
variables you configure. Some editors, such as VS Code, allow users to
63
63
selectively override the values of some environment variables.
64
64
65
- ## Troubleshooting
65
+ ## Support Policy
66
66
67
- If you are having issues with ` gopls ` , please follow the steps described in the
68
- [ troubleshooting guide] ( doc/troubleshooting.md ) .
67
+ Gopls is maintained by engineers on the
68
+ [ Go tools team] ( https://github.com/orgs/golang/teams/tools-team/members ) ,
69
+ who actively monitor the
70
+ [ Go] ( https://github.com/golang/go/issues?q=is%3Aissue+is%3Aopen+label%3Agopls )
71
+ and
72
+ [ VS Code Go] ( https://github.com/golang/vscode-go/issues ) issue trackers.
69
73
70
- ## Supported Go versions and build systems
74
+ ### Supported Go versions
71
75
72
76
` gopls ` follows the
73
77
[ Go Release Policy] ( https://golang.org/doc/devel/release.html#policy ) ,
@@ -95,13 +99,22 @@ test failures may be skipped rather than fixed. Furthermore, if a regression in
95
99
an older Go version causes irreconcilable CI failures, we may drop support for
96
100
that Go version in CI if it is 3 or 4 Go versions old.
97
101
98
- ` gopls ` currently only supports the ` go ` command, so if you are using a
99
- different build system, ` gopls ` will not work well. Bazel is not officially
100
- supported, but Bazel support is in development (see
101
- [ bazelbuild/rules_go #512 ] ( https://github.com/bazelbuild/rules_go/issues/512 ) ).
102
+ ### Supported build systems
103
+
104
+ ` gopls ` currently only supports the ` go ` command, so if you are using
105
+ a different build system, ` gopls ` will not work well. Bazel is not officially
106
+ supported, but may be made to work with an appropriately configured
107
+ ` go/packages ` driver. See
108
+ [ bazelbuild/rules_go #512 ] ( https://github.com/bazelbuild/rules_go/issues/512 )
109
+ for more information.
102
110
You can follow [ these instructions] ( https://github.com/bazelbuild/rules_go/wiki/Editor-setup )
103
111
to configure your ` gopls ` to work with Bazel.
104
112
113
+ ### Troubleshooting
114
+
115
+ If you are having issues with ` gopls ` , please follow the steps described in the
116
+ [ troubleshooting guide] ( doc/troubleshooting.md ) .
117
+
105
118
## Additional information
106
119
107
120
* [ Features] ( doc/features.md )
@@ -115,4 +128,3 @@ to configure your `gopls` to work with Bazel.
115
128
116
129
[ language server ] : https://langserver.org
117
130
[ LSP ] : https://microsoft.github.io/language-server-protocol/
118
- [ Gophers Slack ] : https://gophers.slack.com/
0 commit comments