forked from golang/vscode-go
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
My goal in this change was to clean up the main README and make it a bit more welcoming. The structure is now oriented towards helping people get started and linking all of the pages in the docs/ folder. A lot of the current content is a bit too specific and fits better in the docs pages, so I copy-pasted a lot of text to the relevant pages. Follow-up CLs will involve cleaning up these other pages and smoothing out the content there. Change-Id: I905026d1b4efb3dbad3b7c41e2f234185dee51ed Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/236057 Reviewed-by: Hyang-Ah Hana Kim <[email protected]>
- Loading branch information
1 parent
6a61856
commit 4bccab7
Showing
7 changed files
with
213 additions
and
204 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [[email protected]](mailto:[email protected]) with any additional questions or comments. | ||
# Code of Conduct | ||
|
||
This project follows the [Go Community Code of Conduct](https://golang.org/conduct). If you encounter an issue, please mail [email protected]. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,41 @@ | ||
# `gopls`, the Go language server | ||
# [`gopls`](golang.org/s/gopls), the Go language server | ||
|
||
**Note: `gopls` only supports Go versions above 1.11.** | ||
|
||
#### Install/Update the Go language server | ||
|
||
Ideally, you would see prompts to use/install/update the language server. | ||
Follow the prompts and the language server should get set up correctly. | ||
If you want to manually install/update the language server, | ||
- Ensure you have set `go.useLanguageServer` to `true` in your settings | ||
- Use the `Go: Install/Update Tools` command, select `gopls` from the list and press Ok. | ||
|
||
|
||
#### Settings to control the use of the Go language server | ||
|
||
Below are the settings you can use to control the use of the language server. You need to reload the VS Code window for any changes in these settings to take effect. | ||
|
||
- Set `go.useLanguageServer` to `true` to enable the use of language server. | ||
- When using `gopls`, see the [recommended settings](https://github.com/golang/tools/blob/master/gopls/doc/vscode.md). | ||
- Some of the features from the language server can be disabled if needed using the setting `go.languageServerExperimentalFeatures`. Below are the features you can thus control. By default, all are set to `true` i.e are enabled. | ||
```json | ||
"go.languageServerExperimentalFeatures": { | ||
"diagnostics": true, | ||
"documentLink": true | ||
} | ||
``` | ||
- Set `"go.languageServerFlags": ["-logfile", "path to a text file that exists"]` to collect logs in a log file. | ||
- Set `"go.languageServerFlags": ["-rpc.trace"]` to see the complete rpc trace in the output panel (`View` -> `Output` -> `gopls`) | ||
|
||
#### Provide feedback on gopls | ||
|
||
If you find any problems using the `gopls` language server, please first check the [list of existing issues for gopls](https://github.com/golang/go/issues?q=is%3Aissue+is%3Aopen+label%3Agopls) and update the relevant ones with your case before logging a new one at https://github.com/golang/go/issues | ||
|
||
|
||
#### Helpful links for gopls | ||
|
||
- [Wiki for gopls](https://github.com/golang/tools/blob/master/gopls/doc/user.md) | ||
- [Recommended settings for VSCode when using gopls](https://github.com/golang/tools/blob/master/gopls/doc/vscode.md) | ||
- [Troubleshooting for gopls](https://github.com/golang/go/wiki/gopls#troubleshooting) | ||
- [Known bugs with gopls](https://github.com/golang/go/wiki/gopls#known-issues) | ||
- [Github issues for gopls](https://github.com/golang/go/issues?q=is%3Aissue+is%3Aopen+label%3Agopls) |