gopls: consistently capitalize enum variants for symbolStyle

We use a case-insensitive comparison so this doesn't really
matter but it's a bit confusing that gopls/doc/settings.md and
internal/lsp/source/api_json.go were inconsistent here.  I'm assuming
the latter also shows up as user-visible documentation somewhere,
probably in the VSCode plugin.

Change-Id: I14fa5b9d062266b6de0397aafb36e0ad84730752
Reviewed-on: https://go-review.googlesource.com/c/tools/+/344353
Trust: Rebecca Stambler <rstambler@golang.org>
Trust: Peter Weinberger <pjw@google.com>
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
This commit is contained in:
Johannes Altmanninger 2021-08-24 23:49:47 +02:00 committed by Rebecca Stambler
parent 4e109c5706
commit d39bbca0a3
4 changed files with 5 additions and 5 deletions

View File

@ -412,7 +412,7 @@ Example Usage:
```json5
"gopls": {
...
"symbolStyle": "dynamic",
"symbolStyle": "Dynamic",
...
}
```

View File

@ -341,7 +341,7 @@ var GeneratedAPIJSON = &APIJSON{
{
Name: "symbolStyle",
Type: "enum",
Doc: "symbolStyle controls how symbols are qualified in symbol responses.\n\nExample Usage:\n\n```json5\n\"gopls\": {\n...\n \"symbolStyle\": \"dynamic\",\n...\n}\n```\n",
Doc: "symbolStyle controls how symbols are qualified in symbol responses.\n\nExample Usage:\n\n```json5\n\"gopls\": {\n...\n \"symbolStyle\": \"Dynamic\",\n...\n}\n```\n",
EnumKeys: EnumKeys{
ValueType: "",
Keys: nil,

View File

@ -69,7 +69,7 @@ var (
// DefaultOptions is the options that are used for Gopls execution independent
// of any externally provided configuration (LSP initialization, command
// invokation, etc.).
// invocation, etc.).
func DefaultOptions() *Options {
optionsOnce.Do(func() {
var commands []string
@ -411,7 +411,7 @@ type NavigationOptions struct {
// ```json5
// "gopls": {
// ...
// "symbolStyle": "dynamic",
// "symbolStyle": "Dynamic",
// ...
// }
// ```

View File

@ -18,7 +18,7 @@ func TestSetOption(t *testing.T) {
}{
{
name: "symbolStyle",
value: "dynamic",
value: "Dynamic",
check: func(o Options) bool { return o.SymbolStyle == DynamicSymbols },
},
{