diff --git a/gopls/doc/settings.md b/gopls/doc/settings.md index af83ae31e7..ee9a74e06e 100644 --- a/gopls/doc/settings.md +++ b/gopls/doc/settings.md @@ -94,8 +94,8 @@ Must be one of: * `"DegradeClosed"`: In DegradeClosed mode, `gopls` will collect less information about packages without open files. As a result, features like Find References and Rename will miss results in such packages. - * `"Normal"` + Default: `"Normal"`. #### **expandWorkspaceToModule** *bool* @@ -247,6 +247,7 @@ Must be one of: * `"CaseInsensitive"` * `"CaseSensitive"` * `"Fuzzy"` + Default: `"Fuzzy"`. ##### **experimentalPostfixCompletions** *bool* @@ -298,11 +299,8 @@ that should be reported by the gc_details command. Can contain any of: * `"bounds"` controls bounds checking diagnostics. - * `"escape"` controls diagnostics about escape choices. - * `"inline"` controls diagnostics about inlining choices. - * `"nil"` controls nil checks. Default: `{"bounds":true,"escape":true,"inline":true,"nil":true}`. @@ -350,8 +348,8 @@ Must be one of: This format separates the signature from the documentation, so that the client can do more manipulation of these fields.\ This should only be used by clients that support this behavior. - * `"SynopsisDocumentation"` + Default: `"FullDocumentation"`. ##### **linkTarget** *string* @@ -384,6 +382,7 @@ Must be one of: * `"Both"` * `"Definition"` * `"Link"` + Default: `"Both"`. ##### **symbolMatcher** *enum* @@ -398,6 +397,7 @@ Must be one of: * `"CaseSensitive"` * `"FastFuzzy"` * `"Fuzzy"` + Default: `"Fuzzy"`. ##### **symbolStyle** *enum* @@ -422,10 +422,8 @@ Must be one of: match for the given symbol query. Here a "qualifier" is any "/" or "." delimited suffix of the fully qualified symbol. i.e. "to/pkg.Foo.Field" or just "Foo.Field". - * `"Full"` is fully qualified symbols, i.e. "path/to/pkg.Foo.Field". - * `"Package"` is package qualified symbols i.e. "pkg.Foo.Field". diff --git a/internal/lsp/source/options.go b/internal/lsp/source/options.go index 285527b8f2..07acdf7972 100644 --- a/internal/lsp/source/options.go +++ b/internal/lsp/source/options.go @@ -1336,12 +1336,9 @@ func collectEnums(opt *OptionJSON) string { write := func(name, doc string, index, len int) { if doc != "" { unbroken := parBreakRE.ReplaceAllString(doc, "\\\n") - fmt.Fprintf(&b, "* %s", unbroken) + fmt.Fprintf(&b, "* %s\n", strings.TrimSpace(unbroken)) } else { - fmt.Fprintf(&b, "* `%s`", name) - } - if index < len-1 { - fmt.Fprint(&b, "\n") + fmt.Fprintf(&b, "* `%s`\n", name) } } if len(opt.EnumValues) > 0 && opt.Type == "enum" {