mirror of
https://github.com/golang/go
synced 2024-11-18 04:24:47 -07:00
x/gools/gopls: document settings for working on source distribution
Gopls needs to use the right go command to work properly on a source distribution. One way of getting this done is by setting go.alternateTools. Fixes golang/go#38603 Change-Id: Ie379b372c48f651a22c73d93f8608194c5e3a417 Reviewed-on: https://go-review.googlesource.com/c/tools/+/253297 Run-TryBot: Peter Weinberger <pjw@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rebecca Stambler <rstambler@golang.org>
This commit is contained in:
parent
44a2922940
commit
b484961fa2
@ -130,6 +130,20 @@ supported within symbol queries:
|
|||||||
| `^` | `^printf` | exact prefix |
|
| `^` | `^printf` | exact prefix |
|
||||||
| `$` | `printf$` | exact suffix |
|
| `$` | `printf$` | exact suffix |
|
||||||
|
|
||||||
|
### Working on the Go source distribution
|
||||||
|
|
||||||
|
If you are working on the [Go project](https://go.googlesource.com/go) itself, your `go` command will have to correspond to the version of the source you are working on. That is, if you have downloaded the code to `$HOME/go`, your `go` command should be the `$HOME/go/bin/go` executable that you built with `make.bash` or equivalent.
|
||||||
|
|
||||||
|
You can achieve this by adding the right version of `go` to your `PATH` (`export PATH=$HOME/go/bin:$PATH` on Unix systems) or by configuring your editor. In VS Code, you can use the `go.alternateTools` setting to point to the correct version of `go`:
|
||||||
|
|
||||||
|
```json5
|
||||||
|
{
|
||||||
|
|
||||||
|
"go.alternateTools": {
|
||||||
|
"go": "$HOME/bin/go"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
## Command line support
|
## Command line support
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user