gopls/doc/vscode.md: update vscode setting example
Update the vscode settings example based on the new settings organization.
Change-Id: I6a52cc525a038caa4f35716f6a8c2be145b5238e
Reviewed-on: https://go-review.googlesource.com/c/tools/+/283394
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
diff --git a/gopls/doc/settings.md b/gopls/doc/settings.md
index cf465ce..1f210ed 100644
--- a/gopls/doc/settings.md
+++ b/gopls/doc/settings.md
@@ -12,8 +12,8 @@
```json5
"gopls": {
- "usePlaceholders": true,
- "completeUnimported": true
+ "ui.completion.usePlaceholders": true,
+ ...
},
```
diff --git a/gopls/doc/vscode.md b/gopls/doc/vscode.md
index 72be1ad..7dcb9b0 100644
--- a/gopls/doc/vscode.md
+++ b/gopls/doc/vscode.md
@@ -19,22 +19,15 @@
},
},
"gopls": {
- // Add parameter placeholders when completing a function.
- "usePlaceholders": true,
+ // Add parameter placeholders when completing a function.
+ "ui.completion.usePlaceholders": true,
// If true, enable additional analyses with staticcheck.
// Warning: This will significantly increase memory usage.
- "staticcheck": false,
-}
-```
-
-VSCode will complain about the `"gopls"` settings, but they will still work. Once we have a consistent set of settings, we will make the changes in the VSCode plugin necessary to remove the errors.
-
-If you encounter problems with import organization, please try setting a higher code action timeout (any value greater than 750ms), for example:
-
-```json5
-"[go]": {
- "editor.codeActionsOnSaveTimeout": 3000
+ "ui.diagnostic.staticcheck": false,
+
+ // For more customization, see
+ // see https://github.com/golang/vscode-go/blob/master/docs/settings.md
}
```
@@ -44,7 +37,7 @@
"go.languageServerFlags": [
"-rpc.trace", // for more detailed debug logging
"serve",
- "--debug=localhost:6060", // to investigate memory usage, see profiles
+ "--debug=localhost:6060", // Optional: to investigate memory usage, see profiles
],
```
@@ -52,15 +45,9 @@
You can disable features through the `"go.languageServerExperimentalFeatures"` section of the config. An example of a feature you may want to disable is `"documentLink"`, which opens [`pkg.go.dev`](https://pkg.go.dev) links when you click on import statements in your file.
-### Build tags
+### Build tags and flags
-build tags will not be picked from `go.buildTags` configuration section, instead they should be specified as part of the`GOFLAGS` environment variable:
-
-```json5
-"go.toolsEnvVars": {
- "GOFLAGS": "-tags=<yourtag>"
-}
-```
+build tags and flags will be automatically picked up from `"go.buildTags"` and `"go.buildFlags"` settings. In rare cases if you don't want the default behavior, you can still override the settings from the `gopls` section, using `"gopls": { "build.buildFlags": [] }`.
[VSCode-Go]: https://github.com/golang/vscode-go