package.json: declare gopls settings as a one property

Assuming most users shouldn't need to configure gopls
to behave different from the default behavior, asking users
to use the JSON editor instead of the settings UI isn't too
bad. Actually, this makes the settings UI less cluttered
and helps users focus on the required settings.

Updates #987

Change-Id: I3bd117b2db13e5408430ee1185a5b1cc97c4d1ab
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/274694
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Trust: Suzy Mueller <suzmue@golang.org>
Reviewed-by: Suzy Mueller <suzmue@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
diff --git a/docs/settings.md b/docs/settings.md
index 8efa26e..1156542 100644
--- a/docs/settings.md
+++ b/docs/settings.md
@@ -415,300 +415,6 @@
 
 Default: `package`
 
-### `gopls.analyses`
+### `gopls`
 
-(Experimental) analyses specify analyses that the user would like to enable or disable.
-A map of the names of analysis passes that should be enabled/disabled.
-A full list of analyzers that gopls uses can be found [here](analyzers.md)
-
-Example Usage:
-```json5
-...
-"analyses": {
-  "unreachable": false, // Disable the unreachable analyzer.
-  "unusedparams": true  // Enable the unusedparams analyzer.
-}
-...
-```
-
-
-### `gopls.annotations`
-
-(Experimental) annotations suppress various kinds of optimization diagnostics
-that would be reported by the gc_details command.
- * noNilcheck suppresses display of nilchecks.
- * noEscape suppresses escape choices.
- * noInline suppresses inlining choices.
- * noBounds suppresses bounds checking diagnostics.
-
-
-### `gopls.buildFlags`
-
-buildFlags is the set of flags passed on to the build system when invoked.
-It is applied to queries like `go list`, which is used when discovering files.
-The most common use is to set `-tags`.
-
-
-### `gopls.codelens`
-
-(Experimental) codelens overrides the enabled/disabled state of code lenses. See the "Code Lenses"
-section of settings.md for the list of supported lenses.
-
-Example Usage:
-```json5
-"gopls": {
-...
-  "codelens": {
-    "generate": false,  // Don't show the `go generate` lens.
-    "gc_details": true  // Show a code lens toggling the display of gc's choices.
-  }
-...
-}
-```
-
-
-Default:{<br/>
-&nbsp;&nbsp;`"gc_details": false`,<br/>
-&nbsp;&nbsp;`"generate": true`,<br/>
-&nbsp;&nbsp;`"regenerate_cgo": true`,<br/>
-&nbsp;&nbsp;`"tidy": true`,<br/>
-&nbsp;&nbsp;`"upgrade_dependency": true`,<br/>
-&nbsp;&nbsp;`"vendor": true`,<br/>
-    }
-
-
-### `gopls.completeUnimported`
-
-(Experimental) completeUnimported enables completion for packages that you do not currently import.
-
-
-Default: `true`
-
-### `gopls.completionBudget`
-
-(For Debugging) completionBudget is the soft latency goal for completion requests. Most
-requests finish in a couple milliseconds, but in some cases deep
-completions can take much longer. As we use up our budget we
-dynamically reduce the search scope to ensure we return timely
-results. Zero means unlimited.
-
-
-Default: `100ms`
-
-### `gopls.completionDocumentation`
-
-(Experimental) completionDocumentation enables documentation with completion results.
-
-
-Default: `true`
-
-### `gopls.deepCompletion`
-
-(Experimental) deepCompletion enables the ability to return completions from deep inside relevant entities, rather than just the locally accessible ones.
-
-Consider this example:
-
-```go
-package main
-
-import "fmt"
-
-type wrapString struct {
-    str string
-}
-
-func main() {
-    x := wrapString{"hello world"}
-    fmt.Printf(<>)
-}
-```
-
-At the location of the `<>` in this program, deep completion would suggest the result `x.str`.
-
-
-Default: `true`
-
-### `gopls.env`
-
-env adds environment variables to external commands run by `gopls`, most notably `go list`.
-
-
-### `gopls.expandWorkspaceToModule`
-
-(Experimental) expandWorkspaceToModule instructs `gopls` to adjust the scope of the
-workspace to find the best available module root. `gopls` first looks for
-a go.mod file in any parent directory of the workspace folder, expanding
-the scope to that directory if it exists. If no viable parent directory is
-found, gopls will check if there is exactly one child directory containing
-a go.mod file, narrowing the scope to that directory if it exists.
-
-
-Default: `true`
-
-### `gopls.experimentalDiagnosticsDelay`
-
-(Experimental) experimentalDiagnosticsDelay controls the amount of time that gopls waits
-after the most recent file modification before computing deep diagnostics.
-Simple diagnostics (parsing and type-checking) are always run immediately
-on recently modified packages.
-
-This option must be set to a valid duration string, for example `"250ms"`.
-
-
-Default: `0s`
-
-### `gopls.experimentalPackageCacheKey`
-
-(Experimental) experimentalPackageCacheKey controls whether to use a coarser cache key
-for package type information to increase cache hits. This setting removes
-the user's environment, build flags, and working directory from the cache
-key, which should be a safe change as all relevant inputs into the type
-checking pass are already hashed into the key. This is temporarily guarded
-by an experiment because caching behavior is subtle and difficult to
-comprehensively test.
-
-
-Default: `true`
-
-### `gopls.experimentalWorkspaceModule`
-
-(Experimental) experimentalWorkspaceModule opts a user into the experimental support
-for multi-module workspaces.
-
-
-Default: `false`
-
-### `gopls.gofumpt`
-
-gofumpt indicates if we should run gofumpt formatting.
-
-
-Default: `false`
-
-### `gopls.hoverKind`
-
-hoverKind controls the information that appears in the hover text.
-SingleLine and Structured are intended for use only by authors of editor plugins.
-
-
-Allowed Values:`[FullDocumentation NoDocumentation SingleLine Structured SynopsisDocumentation]`
-
-Default: `FullDocumentation`
-
-### `gopls.importShortcut`
-
-(Experimental) importShortcut specifies whether import statements should link to
-documentation or go to definitions.
-
-
-Allowed Values:`[Both Definition Link]`
-
-Default: `Both`
-
-### `gopls.linkTarget`
-
-linkTarget controls where documentation links go.
-It might be one of:
-
-* `"godoc.org"`
-* `"pkg.go.dev"`
-
-If company chooses to use its own `godoc.org`, its address can be used as well.
-
-
-Default: `pkg.go.dev`
-
-### `gopls.linksInHover`
-
-(Experimental) linksInHover toggles the presence of links to documentation in hover.
-
-
-Default: `true`
-
-### `gopls.local`
-
-local is the equivalent of the `goimports -local` flag, which puts imports beginning with this string after 3rd-party packages.
-It should be the prefix of the import path whose imports should be grouped separately.
-
-
-Default: ``
-
-### `gopls.matcher`
-
-(Experimental) matcher sets the algorithm that is used when calculating completion candidates.
-
-
-Allowed Values:`[CaseInsensitive CaseSensitive Fuzzy]`
-
-Default: `Fuzzy`
-
-### `gopls.semanticTokens`
-
-(Experimental) semanticTokens controls whether the LSP server will send
-semantic tokens to the client.
-
-
-Default: `false`
-
-### `gopls.staticcheck`
-
-(Experimental) staticcheck enables additional analyses from staticcheck.io.
-
-
-Default: `false`
-
-### `gopls.symbolMatcher`
-
-(Experimental) symbolMatcher sets the algorithm that is used when finding workspace symbols.
-
-
-Allowed Values:`[CaseInsensitive CaseSensitive Fuzzy]`
-
-Default: `Fuzzy`
-
-### `gopls.symbolStyle`
-
-(Experimental) symbolStyle controls how symbols are qualified in symbol responses.
-
-Example Usage:
-```json5
-"gopls": {
-...
-  "symbolStyle": "dynamic",
-...
-}
-```
-
-
-Allowed Values:`[Dynamic Full Package]`
-
-Default: `Package`
-
-### `gopls.tempModfile`
-
-(Experimental) tempModfile controls the use of the -modfile flag in Go 1.14.
-
-
-Default: `true`
-
-### `gopls.usePlaceholders`
-
-placeholders enables placeholders for function parameters or struct fields in completion responses.
-
-
-Default: `false`
-
-### `gopls.verboseOutput`
-
-(For Debugging) verboseOutput enables additional debug logging.
-
-
-Default: `false`
-
-### `gopls.verboseWorkDoneProgress`
-
-(Experimental) verboseWorkDoneProgress controls whether the LSP server should send
-progress reports for all work done outside the scope of an RPC.
-
-
-Default: `false`
+Configure the default Go language server ('gopls'). In most cases, configuring this section is unnecessary. See [the documentation](https://github.com/golang/tools/blob/master/gopls/doc/settings.md) for all available settings.
diff --git a/package.json b/package.json
index 6a12c01..08aa500 100644
--- a/package.json
+++ b/package.json
@@ -2004,234 +2004,242 @@
           },
           "additionalProperties": true
         },
-        "gopls.buildFlags": {
-          "type": "array",
-          "markdownDescription": "buildFlags is the set of flags passed on to the build system when invoked.\nIt is applied to queries like `go list`, which is used when discovering files.\nThe most common use is to set `-tags`.\n",
-          "default": [],
-          "scope": "resource"
-        },
-        "gopls.env": {
+        "gopls": {
           "type": "object",
-          "markdownDescription": "env adds environment variables to external commands run by `gopls`, most notably `go list`.\n",
-          "default": {},
-          "scope": "resource"
-        },
-        "gopls.hoverKind": {
-          "type": "string",
-          "markdownDescription": "hoverKind controls the information that appears in the hover text.\nSingleLine and Structured are intended for use only by authors of editor plugins.\n",
-          "enum": [
-            "FullDocumentation",
-            "NoDocumentation",
-            "SingleLine",
-            "Structured",
-            "SynopsisDocumentation"
-          ],
-          "markdownEnumDescriptions": [
-            "",
-            "",
-            "",
-            "`\"Structured\"` is an experimental setting that returns a structured hover format.\nThis format separates the signature from the documentation, so that the client\ncan do more manipulation of these fields.\n\nThis should only be used by clients that support this behavior.\n",
-            ""
-          ],
-          "default": "FullDocumentation",
-          "scope": "resource"
-        },
-        "gopls.usePlaceholders": {
-          "type": "boolean",
-          "markdownDescription": "placeholders enables placeholders for function parameters or struct fields in completion responses.\n",
-          "default": false,
-          "scope": "resource"
-        },
-        "gopls.linkTarget": {
-          "type": "string",
-          "markdownDescription": "linkTarget controls where documentation links go.\nIt might be one of:\n\n* `\"godoc.org\"`\n* `\"pkg.go.dev\"`\n\nIf company chooses to use its own `godoc.org`, its address can be used as well.\n",
-          "default": "pkg.go.dev",
-          "scope": "resource"
-        },
-        "gopls.local": {
-          "type": "string",
-          "markdownDescription": "local is the equivalent of the `goimports -local` flag, which puts imports beginning with this string after 3rd-party packages.\nIt should be the prefix of the import path whose imports should be grouped separately.\n",
-          "default": "",
-          "scope": "resource"
-        },
-        "gopls.gofumpt": {
-          "type": "boolean",
-          "markdownDescription": "gofumpt indicates if we should run gofumpt formatting.\n",
-          "default": false,
-          "scope": "resource"
-        },
-        "gopls.analyses": {
-          "type": "object",
-          "markdownDescription": "(Experimental) analyses specify analyses that the user would like to enable or disable.\nA map of the names of analysis passes that should be enabled/disabled.\nA full list of analyzers that gopls uses can be found [here](analyzers.md)\n\nExample Usage:\n```json5\n...\n\"analyses\": {\n  \"unreachable\": false, // Disable the unreachable analyzer.\n  \"unusedparams\": true  // Enable the unusedparams analyzer.\n}\n...\n```\n",
-          "default": {},
-          "scope": "resource"
-        },
-        "gopls.codelens": {
-          "type": "object",
-          "markdownDescription": "(Experimental) codelens overrides the enabled/disabled state of code lenses. See the \"Code Lenses\"\nsection of settings.md for the list of supported lenses.\n\nExample Usage:\n```json5\n\"gopls\": {\n...\n  \"codelens\": {\n    \"generate\": false,  // Don't show the `go generate` lens.\n    \"gc_details\": true  // Show a code lens toggling the display of gc's choices.\n  }\n...\n}\n```\n",
-          "default": {
-            "gc_details": false,
-            "generate": true,
-            "regenerate_cgo": true,
-            "tidy": true,
-            "upgrade_dependency": true,
-            "vendor": true
-          },
-          "scope": "resource"
-        },
-        "gopls.completionDocumentation": {
-          "type": "boolean",
-          "markdownDescription": "(Experimental) completionDocumentation enables documentation with completion results.\n",
-          "default": true,
-          "scope": "resource"
-        },
-        "gopls.completeUnimported": {
-          "type": "boolean",
-          "markdownDescription": "(Experimental) completeUnimported enables completion for packages that you do not currently import.\n",
-          "default": true,
-          "scope": "resource"
-        },
-        "gopls.deepCompletion": {
-          "type": "boolean",
-          "markdownDescription": "(Experimental) deepCompletion enables the ability to return completions from deep inside relevant entities, rather than just the locally accessible ones.\n\nConsider this example:\n\n```go\npackage main\n\nimport \"fmt\"\n\ntype wrapString struct {\n    str string\n}\n\nfunc main() {\n    x := wrapString{\"hello world\"}\n    fmt.Printf(<>)\n}\n```\n\nAt the location of the `<>` in this program, deep completion would suggest the result `x.str`.\n",
-          "default": true,
-          "scope": "resource"
-        },
-        "gopls.matcher": {
-          "type": "string",
-          "markdownDescription": "(Experimental) matcher sets the algorithm that is used when calculating completion candidates.\n",
-          "enum": [
-            "CaseInsensitive",
-            "CaseSensitive",
-            "Fuzzy"
-          ],
-          "markdownEnumDescriptions": [
-            "",
-            "",
-            ""
-          ],
-          "default": "Fuzzy",
-          "scope": "resource"
-        },
-        "gopls.annotations": {
-          "type": "object",
-          "markdownDescription": "(Experimental) annotations suppress various kinds of optimization diagnostics\nthat would be reported by the gc_details command.\n * noNilcheck suppresses display of nilchecks.\n * noEscape suppresses escape choices.\n * noInline suppresses inlining choices.\n * noBounds suppresses bounds checking diagnostics.\n",
-          "default": {},
-          "scope": "resource"
-        },
-        "gopls.staticcheck": {
-          "type": "boolean",
-          "markdownDescription": "(Experimental) staticcheck enables additional analyses from staticcheck.io.\n",
-          "default": false,
-          "scope": "resource"
-        },
-        "gopls.symbolMatcher": {
-          "type": "string",
-          "markdownDescription": "(Experimental) symbolMatcher sets the algorithm that is used when finding workspace symbols.\n",
-          "enum": [
-            "CaseInsensitive",
-            "CaseSensitive",
-            "Fuzzy"
-          ],
-          "markdownEnumDescriptions": [
-            "",
-            "",
-            ""
-          ],
-          "default": "Fuzzy",
-          "scope": "resource"
-        },
-        "gopls.symbolStyle": {
-          "type": "string",
-          "markdownDescription": "(Experimental) symbolStyle controls how symbols are qualified in symbol responses.\n\nExample Usage:\n```json5\n\"gopls\": {\n...\n  \"symbolStyle\": \"dynamic\",\n...\n}\n```\n",
-          "enum": [
-            "Dynamic",
-            "Full",
-            "Package"
-          ],
-          "markdownEnumDescriptions": [
-            "`\"Dynamic\"` uses whichever qualifier results in the highest scoring\nmatch for the given symbol query. Here a \"qualifier\" is any \"/\" or \".\"\ndelimited suffix of the fully qualified symbol. i.e. \"to/pkg.Foo.Field\" or\njust \"Foo.Field\".\n",
-            "`\"Full\"` is fully qualified symbols, i.e.\n\"path/to/pkg.Foo.Field\".\n",
-            "`\"Package\"` is package qualified symbols i.e.\n\"pkg.Foo.Field\".\n"
-          ],
-          "default": "Package",
-          "scope": "resource"
-        },
-        "gopls.linksInHover": {
-          "type": "boolean",
-          "markdownDescription": "(Experimental) linksInHover toggles the presence of links to documentation in hover.\n",
-          "default": true,
-          "scope": "resource"
-        },
-        "gopls.tempModfile": {
-          "type": "boolean",
-          "markdownDescription": "(Experimental) tempModfile controls the use of the -modfile flag in Go 1.14.\n",
-          "default": true,
-          "scope": "resource"
-        },
-        "gopls.importShortcut": {
-          "type": "string",
-          "markdownDescription": "(Experimental) importShortcut specifies whether import statements should link to\ndocumentation or go to definitions.\n",
-          "enum": [
-            "Both",
-            "Definition",
-            "Link"
-          ],
-          "markdownEnumDescriptions": [
-            "",
-            "",
-            ""
-          ],
-          "default": "Both",
-          "scope": "resource"
-        },
-        "gopls.verboseWorkDoneProgress": {
-          "type": "boolean",
-          "markdownDescription": "(Experimental) verboseWorkDoneProgress controls whether the LSP server should send\nprogress reports for all work done outside the scope of an RPC.\n",
-          "default": false,
-          "scope": "resource"
-        },
-        "gopls.semanticTokens": {
-          "type": "boolean",
-          "markdownDescription": "(Experimental) semanticTokens controls whether the LSP server will send\nsemantic tokens to the client.\n",
-          "default": false,
-          "scope": "resource"
-        },
-        "gopls.expandWorkspaceToModule": {
-          "type": "boolean",
-          "markdownDescription": "(Experimental) expandWorkspaceToModule instructs `gopls` to adjust the scope of the\nworkspace to find the best available module root. `gopls` first looks for\na go.mod file in any parent directory of the workspace folder, expanding\nthe scope to that directory if it exists. If no viable parent directory is\nfound, gopls will check if there is exactly one child directory containing\na go.mod file, narrowing the scope to that directory if it exists.\n",
-          "default": true,
-          "scope": "resource"
-        },
-        "gopls.experimentalWorkspaceModule": {
-          "type": "boolean",
-          "markdownDescription": "(Experimental) experimentalWorkspaceModule opts a user into the experimental support\nfor multi-module workspaces.\n",
-          "default": false,
-          "scope": "resource"
-        },
-        "gopls.experimentalDiagnosticsDelay": {
-          "type": "string",
-          "markdownDescription": "(Experimental) experimentalDiagnosticsDelay controls the amount of time that gopls waits\nafter the most recent file modification before computing deep diagnostics.\nSimple diagnostics (parsing and type-checking) are always run immediately\non recently modified packages.\n\nThis option must be set to a valid duration string, for example `\"250ms\"`.\n",
-          "default": "0s",
-          "scope": "resource"
-        },
-        "gopls.experimentalPackageCacheKey": {
-          "type": "boolean",
-          "markdownDescription": "(Experimental) experimentalPackageCacheKey controls whether to use a coarser cache key\nfor package type information to increase cache hits. This setting removes\nthe user's environment, build flags, and working directory from the cache\nkey, which should be a safe change as all relevant inputs into the type\nchecking pass are already hashed into the key. This is temporarily guarded\nby an experiment because caching behavior is subtle and difficult to\ncomprehensively test.\n",
-          "default": true,
-          "scope": "resource"
-        },
-        "gopls.verboseOutput": {
-          "type": "boolean",
-          "markdownDescription": "(For Debugging) verboseOutput enables additional debug logging.\n",
-          "default": false,
-          "scope": "resource"
-        },
-        "gopls.completionBudget": {
-          "type": "string",
-          "markdownDescription": "(For Debugging) completionBudget is the soft latency goal for completion requests. Most\nrequests finish in a couple milliseconds, but in some cases deep\ncompletions can take much longer. As we use up our budget we\ndynamically reduce the search scope to ensure we return timely\nresults. Zero means unlimited.\n",
-          "default": "100ms",
-          "scope": "resource"
+          "markdownDescription": "Configure the default Go language server ('gopls'). In most cases, configuring this section is unnecessary. See [the documentation](https://github.com/golang/tools/blob/master/gopls/doc/settings.md) for all available settings.",
+          "scope": "resource",
+          "additionalProperties": false,
+          "properties": {
+            "buildFlags": {
+              "type": "array",
+              "markdownDescription": "buildFlags is the set of flags passed on to the build system when invoked.\nIt is applied to queries like `go list`, which is used when discovering files.\nThe most common use is to set `-tags`.\n",
+              "default": [],
+              "scope": "resource"
+            },
+            "env": {
+              "type": "object",
+              "markdownDescription": "env adds environment variables to external commands run by `gopls`, most notably `go list`.\n",
+              "default": {},
+              "scope": "resource"
+            },
+            "hoverKind": {
+              "type": "string",
+              "markdownDescription": "hoverKind controls the information that appears in the hover text.\nSingleLine and Structured are intended for use only by authors of editor plugins.\n",
+              "enum": [
+                "FullDocumentation",
+                "NoDocumentation",
+                "SingleLine",
+                "Structured",
+                "SynopsisDocumentation"
+              ],
+              "markdownEnumDescriptions": [
+                "",
+                "",
+                "",
+                "`\"Structured\"` is an experimental setting that returns a structured hover format.\nThis format separates the signature from the documentation, so that the client\ncan do more manipulation of these fields.\n\nThis should only be used by clients that support this behavior.\n",
+                ""
+              ],
+              "default": "FullDocumentation",
+              "scope": "resource"
+            },
+            "usePlaceholders": {
+              "type": "boolean",
+              "markdownDescription": "placeholders enables placeholders for function parameters or struct fields in completion responses.\n",
+              "default": false,
+              "scope": "resource"
+            },
+            "linkTarget": {
+              "type": "string",
+              "markdownDescription": "linkTarget controls where documentation links go.\nIt might be one of:\n\n* `\"godoc.org\"`\n* `\"pkg.go.dev\"`\n\nIf company chooses to use its own `godoc.org`, its address can be used as well.\n",
+              "default": "pkg.go.dev",
+              "scope": "resource"
+            },
+            "local": {
+              "type": "string",
+              "markdownDescription": "local is the equivalent of the `goimports -local` flag, which puts imports beginning with this string after 3rd-party packages.\nIt should be the prefix of the import path whose imports should be grouped separately.\n",
+              "default": "",
+              "scope": "resource"
+            },
+            "gofumpt": {
+              "type": "boolean",
+              "markdownDescription": "gofumpt indicates if we should run gofumpt formatting.\n",
+              "default": false,
+              "scope": "resource"
+            },
+            "analyses": {
+              "type": "object",
+              "markdownDescription": "(Experimental) analyses specify analyses that the user would like to enable or disable.\nA map of the names of analysis passes that should be enabled/disabled.\nA full list of analyzers that gopls uses can be found [here](analyzers.md)\n\nExample Usage:\n```json5\n...\n\"analyses\": {\n  \"unreachable\": false, // Disable the unreachable analyzer.\n  \"unusedparams\": true  // Enable the unusedparams analyzer.\n}\n...\n```\n",
+              "default": {},
+              "scope": "resource"
+            },
+            "codelens": {
+              "type": "object",
+              "markdownDescription": "(Experimental) codelens overrides the enabled/disabled state of code lenses. See the \"Code Lenses\"\nsection of settings.md for the list of supported lenses.\n\nExample Usage:\n```json5\n\"gopls\": {\n...\n  \"codelens\": {\n    \"generate\": false,  // Don't show the `go generate` lens.\n    \"gc_details\": true  // Show a code lens toggling the display of gc's choices.\n  }\n...\n}\n```\n",
+              "default": {
+                "gc_details": false,
+                "generate": true,
+                "regenerate_cgo": true,
+                "tidy": true,
+                "upgrade_dependency": true,
+                "vendor": true
+              },
+              "scope": "resource"
+            },
+            "completionDocumentation": {
+              "type": "boolean",
+              "markdownDescription": "(Experimental) completionDocumentation enables documentation with completion results.\n",
+              "default": true,
+              "scope": "resource"
+            },
+            "completeUnimported": {
+              "type": "boolean",
+              "markdownDescription": "(Experimental) completeUnimported enables completion for packages that you do not currently import.\n",
+              "default": true,
+              "scope": "resource"
+            },
+            "deepCompletion": {
+              "type": "boolean",
+              "markdownDescription": "(Experimental) deepCompletion enables the ability to return completions from deep inside relevant entities, rather than just the locally accessible ones.\n\nConsider this example:\n\n```go\npackage main\n\nimport \"fmt\"\n\ntype wrapString struct {\n    str string\n}\n\nfunc main() {\n    x := wrapString{\"hello world\"}\n    fmt.Printf(<>)\n}\n```\n\nAt the location of the `<>` in this program, deep completion would suggest the result `x.str`.\n",
+              "default": true,
+              "scope": "resource"
+            },
+            "matcher": {
+              "type": "string",
+              "markdownDescription": "(Experimental) matcher sets the algorithm that is used when calculating completion candidates.\n",
+              "enum": [
+                "CaseInsensitive",
+                "CaseSensitive",
+                "Fuzzy"
+              ],
+              "markdownEnumDescriptions": [
+                "",
+                "",
+                ""
+              ],
+              "default": "Fuzzy",
+              "scope": "resource"
+            },
+            "annotations": {
+              "type": "object",
+              "markdownDescription": "(Experimental) annotations suppress various kinds of optimization diagnostics\nthat would be reported by the gc_details command.\n * noNilcheck suppresses display of nilchecks.\n * noEscape suppresses escape choices.\n * noInline suppresses inlining choices.\n * noBounds suppresses bounds checking diagnostics.\n",
+              "default": {},
+              "scope": "resource"
+            },
+            "staticcheck": {
+              "type": "boolean",
+              "markdownDescription": "(Experimental) staticcheck enables additional analyses from staticcheck.io.\n",
+              "default": false,
+              "scope": "resource"
+            },
+            "symbolMatcher": {
+              "type": "string",
+              "markdownDescription": "(Experimental) symbolMatcher sets the algorithm that is used when finding workspace symbols.\n",
+              "enum": [
+                "CaseInsensitive",
+                "CaseSensitive",
+                "Fuzzy"
+              ],
+              "markdownEnumDescriptions": [
+                "",
+                "",
+                ""
+              ],
+              "default": "Fuzzy",
+              "scope": "resource"
+            },
+            "symbolStyle": {
+              "type": "string",
+              "markdownDescription": "(Experimental) symbolStyle controls how symbols are qualified in symbol responses.\n\nExample Usage:\n```json5\n\"gopls\": {\n...\n  \"symbolStyle\": \"dynamic\",\n...\n}\n```\n",
+              "enum": [
+                "Dynamic",
+                "Full",
+                "Package"
+              ],
+              "markdownEnumDescriptions": [
+                "`\"Dynamic\"` uses whichever qualifier results in the highest scoring\nmatch for the given symbol query. Here a \"qualifier\" is any \"/\" or \".\"\ndelimited suffix of the fully qualified symbol. i.e. \"to/pkg.Foo.Field\" or\njust \"Foo.Field\".\n",
+                "`\"Full\"` is fully qualified symbols, i.e.\n\"path/to/pkg.Foo.Field\".\n",
+                "`\"Package\"` is package qualified symbols i.e.\n\"pkg.Foo.Field\".\n"
+              ],
+              "default": "Package",
+              "scope": "resource"
+            },
+            "linksInHover": {
+              "type": "boolean",
+              "markdownDescription": "(Experimental) linksInHover toggles the presence of links to documentation in hover.\n",
+              "default": true,
+              "scope": "resource"
+            },
+            "tempModfile": {
+              "type": "boolean",
+              "markdownDescription": "(Experimental) tempModfile controls the use of the -modfile flag in Go 1.14.\n",
+              "default": true,
+              "scope": "resource"
+            },
+            "importShortcut": {
+              "type": "string",
+              "markdownDescription": "(Experimental) importShortcut specifies whether import statements should link to\ndocumentation or go to definitions.\n",
+              "enum": [
+                "Both",
+                "Definition",
+                "Link"
+              ],
+              "markdownEnumDescriptions": [
+                "",
+                "",
+                ""
+              ],
+              "default": "Both",
+              "scope": "resource"
+            },
+            "verboseWorkDoneProgress": {
+              "type": "boolean",
+              "markdownDescription": "(Experimental) verboseWorkDoneProgress controls whether the LSP server should send\nprogress reports for all work done outside the scope of an RPC.\n",
+              "default": false,
+              "scope": "resource"
+            },
+            "semanticTokens": {
+              "type": "boolean",
+              "markdownDescription": "(Experimental) semanticTokens controls whether the LSP server will send\nsemantic tokens to the client.\n",
+              "default": false,
+              "scope": "resource"
+            },
+            "expandWorkspaceToModule": {
+              "type": "boolean",
+              "markdownDescription": "(Experimental) expandWorkspaceToModule instructs `gopls` to adjust the scope of the\nworkspace to find the best available module root. `gopls` first looks for\na go.mod file in any parent directory of the workspace folder, expanding\nthe scope to that directory if it exists. If no viable parent directory is\nfound, gopls will check if there is exactly one child directory containing\na go.mod file, narrowing the scope to that directory if it exists.\n",
+              "default": true,
+              "scope": "resource"
+            },
+            "experimentalWorkspaceModule": {
+              "type": "boolean",
+              "markdownDescription": "(Experimental) experimentalWorkspaceModule opts a user into the experimental support\nfor multi-module workspaces.\n",
+              "default": false,
+              "scope": "resource"
+            },
+            "experimentalDiagnosticsDelay": {
+              "type": "string",
+              "markdownDescription": "(Experimental) experimentalDiagnosticsDelay controls the amount of time that gopls waits\nafter the most recent file modification before computing deep diagnostics.\nSimple diagnostics (parsing and type-checking) are always run immediately\non recently modified packages.\n\nThis option must be set to a valid duration string, for example `\"250ms\"`.\n",
+              "default": "0s",
+              "scope": "resource"
+            },
+            "experimentalPackageCacheKey": {
+              "type": "boolean",
+              "markdownDescription": "(Experimental) experimentalPackageCacheKey controls whether to use a coarser cache key\nfor package type information to increase cache hits. This setting removes\nthe user's environment, build flags, and working directory from the cache\nkey, which should be a safe change as all relevant inputs into the type\nchecking pass are already hashed into the key. This is temporarily guarded\nby an experiment because caching behavior is subtle and difficult to\ncomprehensively test.\n",
+              "default": true,
+              "scope": "resource"
+            },
+            "verboseOutput": {
+              "type": "boolean",
+              "markdownDescription": "(For Debugging) verboseOutput enables additional debug logging.\n",
+              "default": false,
+              "scope": "resource"
+            },
+            "completionBudget": {
+              "type": "string",
+              "markdownDescription": "(For Debugging) completionBudget is the soft latency goal for completion requests. Most\nrequests finish in a couple milliseconds, but in some cases deep\ncompletions can take much longer. As we use up our budget we\ndynamically reduce the search scope to ensure we return timely\nresults. Zero means unlimited.\n",
+              "default": "100ms",
+              "scope": "resource"
+            }
+          }
         }
       }
     },
diff --git a/tools/goplssetting/main.go b/tools/goplssetting/main.go
index e294890..868a027 100644
--- a/tools/goplssetting/main.go
+++ b/tools/goplssetting/main.go
@@ -181,14 +181,20 @@
 	}
 
 	line(`{`)
+	line(`"gopls": {`)
+	line(`    "type": "object",`)
+	line(`    "markdownDescription": "Configure the default Go language server ('gopls'). In most cases, configuring this section is unnecessary. See [the documentation](https://github.com/golang/tools/blob/master/gopls/doc/settings.md) for all available settings.",`)
+	line(`    "scope": "resource",`)
+	line(`    "additionalProperties": false,`)
+	line(`    "properties": {`)
 	for i, o := range options {
-		line(`  "gopls.%v" : {`, o.Name)
+		line(`    "%v" : {`, o.Name)
 
 		typ := propertyType(o.Type)
-		line(`    "type": %q,`, typ)
+		line(`      "type": %q,`, typ)
 		// TODO: consider 'additionalProperties' if gopls api-json outputs acceptable peoperties.
 
-		line(`    "markdownDescription": %q,`, o.Doc)
+		line(`      "markdownDescription": %q,`, o.Doc)
 
 		var enums, enumDocs []string
 		for _, v := range o.EnumValues {
@@ -196,25 +202,28 @@
 			enumDocs = append(enumDocs, fmt.Sprintf("%q", v.Doc))
 		}
 		if len(enums) > 0 {
-			line(`    "enum": [%v],`, strings.Join(enums, ","))
-			line(`    "markdownEnumDescriptions": [%v],`, strings.Join(enumDocs, ","))
+			line(`      "enum": [%v],`, strings.Join(enums, ","))
+			line(`      "markdownEnumDescriptions": [%v],`, strings.Join(enumDocs, ","))
 		}
 
 		if len(o.Default) > 0 {
-			line(`    "default": %v,`, o.Default)
+			line(`      "default": %v,`, o.Default)
 		}
 
 		// TODO: are all gopls settings in the resource scope?
-		line(`    "scope": "resource"`)
+		line(`      "scope": "resource"`)
 		// TODO: deprecation attribute
 
+		// "%v" : {
 		if i == len(options)-1 {
-			line(`  }`)
+			line(`    }`)
 		} else {
-			line(`  },`)
+			line(`    },`)
 		}
 	}
-	line(`}`)
+	line(`    }`) //  "properties": {
+	line(`  }`)   // "gopls": {
+	line(`}`)     // {
 }
 
 func propertyType(t string) string {
diff --git a/tools/goplssetting/main_test.go b/tools/goplssetting/main_test.go
index 368a693..a135f2c 100644
--- a/tools/goplssetting/main_test.go
+++ b/tools/goplssetting/main_test.go
@@ -44,7 +44,7 @@
 				Doc:     "verboseOutput enables additional debug logging.\n",
 				Default: "false",
 			},
-			out: `"gopls.verboseOutput": {
+			out: `"verboseOutput": {
 					"type": "boolean",
 					"markdownDescription": "verboseOutput enables additional debug logging.\n",
 					"default": false,
@@ -58,7 +58,7 @@
 				Type:    "time.Duration",
 				Default: "\"100ms\"",
 			},
-			out: `"gopls.completionBudget": {
+			out: `"completionBudget": {
 					"type": "string",
 					"markdownDescription": "",
 					"default": "100ms",
@@ -72,7 +72,7 @@
 				Type:    "map[string]bool",
 				Default: "{}",
 			},
-			out: `"gopls.analyses":{
+			out: `"analyses":{
 					"type": "object",
 					"markdownDescription": "",
 					"default": {},
@@ -100,7 +100,7 @@
 				},
 				Default: "\"Fuzzy\"",
 			},
-			out: `"gopls.matcher": {
+			out: `"matcher": {
  					"type": "string",
 					"markdownDescription": "",
 					"enum": [ "CaseInsensitive", "CaseSensitive", "Fuzzy" ],
@@ -116,7 +116,18 @@
 			options := []*OptionJSON{tc.in}
 			buf := &bytes.Buffer{}
 			writeAsVSCodeSettings(buf, options)
-			if got, want := normalize(t, buf.String()), normalize(t, "{ "+tc.out+" }"); got != want {
+			if got, want := normalize(t, buf.String()), normalize(t, `
+			{ 
+				"gopls": {
+					"type": "object",
+					"markdownDescription": "Configure the default Go language server ('gopls'). In most cases, configuring this section is unnecessary. See [the documentation](https://github.com/golang/tools/blob/master/gopls/doc/settings.md) for all available settings.",
+					"scope": "resource",
+					"additionalProperties": false,
+					"properties": {
+				       `+tc.out+`
+					}
+				}
+			}`); got != want {
 				t.Errorf("writeAsVSCodeSettings = %v, want %v", got, want)
 			}
 		})
@@ -127,9 +138,12 @@
 	t.Helper()
 	cmd := exec.Command("jq")
 	cmd.Stdin = strings.NewReader(in)
+	stderr := new(bytes.Buffer)
+	cmd.Stderr = stderr
+
 	out, err := cmd.Output()
 	if err != nil {
-		t.Fatalf("failed to run jq: %v", err)
+		t.Fatalf("%s\n%s\nfailed to run jq: %v", in, stderr, err)
 	}
 	return string(out)
 }