github.com/jd-ly/tools@v0.5.7/internal/lsp/source/api_json.go (about)

     1  // Code generated by "github.com/jd-ly/tools/gopls/doc/generate"; DO NOT EDIT.
     2  
     3  package source
     4  
     5  var GeneratedAPIJSON = &APIJSON{
     6  	Options: map[string][]*OptionJSON{
     7  		"Debugging": {
     8  			{
     9  				Name:       "verboseOutput",
    10  				Type:       "bool",
    11  				Doc:        "verboseOutput enables additional debug logging.\n",
    12  				EnumValues: nil,
    13  				Default:    "false",
    14  			},
    15  			{
    16  				Name:       "completionBudget",
    17  				Type:       "time.Duration",
    18  				Doc:        "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",
    19  				EnumValues: nil,
    20  				Default:    "\"100ms\"",
    21  			},
    22  		},
    23  		"Experimental": {
    24  			{
    25  				Name:       "annotations",
    26  				Type:       "map[string]bool",
    27  				Doc:        "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",
    28  				EnumValues: nil,
    29  				Default:    "{}",
    30  			},
    31  			{
    32  				Name:       "staticcheck",
    33  				Type:       "bool",
    34  				Doc:        "staticcheck enables additional analyses from staticcheck.io.\n",
    35  				EnumValues: nil,
    36  				Default:    "false",
    37  			},
    38  			{
    39  				Name:       "semanticTokens",
    40  				Type:       "bool",
    41  				Doc:        "semanticTokens controls whether the LSP server will send\nsemantic tokens to the client.\n",
    42  				EnumValues: nil,
    43  				Default:    "false",
    44  			},
    45  			{
    46  				Name:       "expandWorkspaceToModule",
    47  				Type:       "bool",
    48  				Doc:        "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",
    49  				EnumValues: nil,
    50  				Default:    "true",
    51  			},
    52  			{
    53  				Name:       "experimentalWorkspaceModule",
    54  				Type:       "bool",
    55  				Doc:        "experimentalWorkspaceModule opts a user into the experimental support\nfor multi-module workspaces.\n",
    56  				EnumValues: nil,
    57  				Default:    "false",
    58  			},
    59  			{
    60  				Name:       "experimentalDiagnosticsDelay",
    61  				Type:       "time.Duration",
    62  				Doc:        "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",
    63  				EnumValues: nil,
    64  				Default:    "\"250ms\"",
    65  			},
    66  			{
    67  				Name:       "experimentalPackageCacheKey",
    68  				Type:       "bool",
    69  				Doc:        "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",
    70  				EnumValues: nil,
    71  				Default:    "true",
    72  			},
    73  			{
    74  				Name:       "allowModfileModifications",
    75  				Type:       "bool",
    76  				Doc:        "allowModfileModifications disables -mod=readonly, allowing imports from\nout-of-scope modules. This option will eventually be removed.\n",
    77  				EnumValues: nil,
    78  				Default:    "false",
    79  			},
    80  			{
    81  				Name:       "allowImplicitNetworkAccess",
    82  				Type:       "bool",
    83  				Doc:        "allowImplicitNetworkAccess disables GOPROXY=off, allowing implicit module\ndownloads rather than requiring user action. This option will eventually\nbe removed.\n",
    84  				EnumValues: nil,
    85  				Default:    "false",
    86  			},
    87  		},
    88  		"User": {
    89  			{
    90  				Name:       "buildFlags",
    91  				Type:       "[]string",
    92  				Doc:        "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",
    93  				EnumValues: nil,
    94  				Default:    "[]",
    95  			},
    96  			{
    97  				Name:       "env",
    98  				Type:       "map[string]string",
    99  				Doc:        "env adds environment variables to external commands run by `gopls`, most notably `go list`.\n",
   100  				EnumValues: nil,
   101  				Default:    "{}",
   102  			},
   103  			{
   104  				Name: "hoverKind",
   105  				Type: "enum",
   106  				Doc:  "hoverKind controls the information that appears in the hover text.\nSingleLine and Structured are intended for use only by authors of editor plugins.\n",
   107  				EnumValues: []EnumValue{
   108  					{
   109  						Value: "\"FullDocumentation\"",
   110  						Doc:   "",
   111  					},
   112  					{
   113  						Value: "\"NoDocumentation\"",
   114  						Doc:   "",
   115  					},
   116  					{
   117  						Value: "\"SingleLine\"",
   118  						Doc:   "",
   119  					},
   120  					{
   121  						Value: "\"Structured\"",
   122  						Doc:   "`\"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",
   123  					},
   124  					{
   125  						Value: "\"SynopsisDocumentation\"",
   126  						Doc:   "",
   127  					},
   128  				},
   129  				Default: "\"FullDocumentation\"",
   130  			},
   131  			{
   132  				Name:       "usePlaceholders",
   133  				Type:       "bool",
   134  				Doc:        "placeholders enables placeholders for function parameters or struct fields in completion responses.\n",
   135  				EnumValues: nil,
   136  				Default:    "false",
   137  			},
   138  			{
   139  				Name:       "linkTarget",
   140  				Type:       "string",
   141  				Doc:        "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",
   142  				EnumValues: nil,
   143  				Default:    "\"pkg.go.dev\"",
   144  			},
   145  			{
   146  				Name:       "local",
   147  				Type:       "string",
   148  				Doc:        "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",
   149  				EnumValues: nil,
   150  				Default:    "\"\"",
   151  			},
   152  			{
   153  				Name:       "gofumpt",
   154  				Type:       "bool",
   155  				Doc:        "gofumpt indicates if we should run gofumpt formatting.\n",
   156  				EnumValues: nil,
   157  				Default:    "false",
   158  			},
   159  			{
   160  				Name:       "analyses",
   161  				Type:       "map[string]bool",
   162  				Doc:        "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",
   163  				EnumValues: nil,
   164  				Default:    "{}",
   165  			},
   166  			{
   167  				Name:       "codelenses",
   168  				Type:       "map[string]bool",
   169  				Doc:        "codelenses 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",
   170  				EnumValues: nil,
   171  				Default:    "{\"gc_details\":false,\"generate\":true,\"regenerate_cgo\":true,\"tidy\":true,\"upgrade_dependency\":true,\"vendor\":true}",
   172  			},
   173  			{
   174  				Name:       "linksInHover",
   175  				Type:       "bool",
   176  				Doc:        "linksInHover toggles the presence of links to documentation in hover.\n",
   177  				EnumValues: nil,
   178  				Default:    "true",
   179  			},
   180  			{
   181  				Name: "importShortcut",
   182  				Type: "enum",
   183  				Doc:  "importShortcut specifies whether import statements should link to\ndocumentation or go to definitions.\n",
   184  				EnumValues: []EnumValue{
   185  					{
   186  						Value: "\"Both\"",
   187  						Doc:   "",
   188  					},
   189  					{
   190  						Value: "\"Definition\"",
   191  						Doc:   "",
   192  					},
   193  					{
   194  						Value: "\"Link\"",
   195  						Doc:   "",
   196  					},
   197  				},
   198  				Default: "\"Both\"",
   199  			},
   200  			{
   201  				Name: "matcher",
   202  				Type: "enum",
   203  				Doc:  "matcher sets the algorithm that is used when calculating completion candidates.\n",
   204  				EnumValues: []EnumValue{
   205  					{
   206  						Value: "\"CaseInsensitive\"",
   207  						Doc:   "",
   208  					},
   209  					{
   210  						Value: "\"CaseSensitive\"",
   211  						Doc:   "",
   212  					},
   213  					{
   214  						Value: "\"Fuzzy\"",
   215  						Doc:   "",
   216  					},
   217  				},
   218  				Default: "\"Fuzzy\"",
   219  			},
   220  			{
   221  				Name: "symbolMatcher",
   222  				Type: "enum",
   223  				Doc:  "symbolMatcher sets the algorithm that is used when finding workspace symbols.\n",
   224  				EnumValues: []EnumValue{
   225  					{
   226  						Value: "\"CaseInsensitive\"",
   227  						Doc:   "",
   228  					},
   229  					{
   230  						Value: "\"CaseSensitive\"",
   231  						Doc:   "",
   232  					},
   233  					{
   234  						Value: "\"Fuzzy\"",
   235  						Doc:   "",
   236  					},
   237  				},
   238  				Default: "\"Fuzzy\"",
   239  			},
   240  			{
   241  				Name: "symbolStyle",
   242  				Type: "enum",
   243  				Doc:  "symbolStyle controls how symbols are qualified in symbol responses.\n\nExample Usage:\n```json5\n\"gopls\": {\n...\n  \"symbolStyle\": \"dynamic\",\n...\n}\n```\n",
   244  				EnumValues: []EnumValue{
   245  					{
   246  						Value: "\"Dynamic\"",
   247  						Doc:   "`\"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",
   248  					},
   249  					{
   250  						Value: "\"Full\"",
   251  						Doc:   "`\"Full\"` is fully qualified symbols, i.e.\n\"path/to/pkg.Foo.Field\".\n",
   252  					},
   253  					{
   254  						Value: "\"Package\"",
   255  						Doc:   "`\"Package\"` is package qualified symbols i.e.\n\"pkg.Foo.Field\".\n",
   256  					},
   257  				},
   258  				Default: "\"Dynamic\"",
   259  			},
   260  		},
   261  	},
   262  	Commands: []*CommandJSON{
   263  		{
   264  			Command: "gopls.generate",
   265  			Title:   "Run go generate",
   266  			Doc:     "generate runs `go generate` for a given directory.\n",
   267  		},
   268  		{
   269  			Command: "gopls.fill_struct",
   270  			Title:   "Fill struct",
   271  			Doc:     "fill_struct is a gopls command to fill a struct with default\nvalues.\n",
   272  		},
   273  		{
   274  			Command: "gopls.regenerate_cgo",
   275  			Title:   "Regenerate cgo",
   276  			Doc:     "regenerate_cgo regenerates cgo definitions.\n",
   277  		},
   278  		{
   279  			Command: "gopls.test",
   280  			Title:   "Run test(s)",
   281  			Doc:     "test runs `go test` for a specific test function.\n",
   282  		},
   283  		{
   284  			Command: "gopls.tidy",
   285  			Title:   "Run go mod tidy",
   286  			Doc:     "tidy runs `go mod tidy` for a module.\n",
   287  		},
   288  		{
   289  			Command: "gopls.update_go_sum",
   290  			Title:   "Update go.sum",
   291  			Doc:     "update_go_sum updates the go.sum file for a module.\n",
   292  		},
   293  		{
   294  			Command: "gopls.undeclared_name",
   295  			Title:   "Undeclared name",
   296  			Doc:     "undeclared_name adds a variable declaration for an undeclared\nname.\n",
   297  		},
   298  		{
   299  			Command: "gopls.go_get_package",
   300  			Title:   "go get package",
   301  			Doc:     "go_get_package runs `go get` to fetch a package.\n",
   302  		},
   303  		{
   304  			Command: "gopls.add_dependency",
   305  			Title:   "Add dependency",
   306  			Doc:     "add_dependency adds a dependency.\n",
   307  		},
   308  		{
   309  			Command: "gopls.upgrade_dependency",
   310  			Title:   "Upgrade dependency",
   311  			Doc:     "upgrade_dependency upgrades a dependency.\n",
   312  		},
   313  		{
   314  			Command: "gopls.remove_dependency",
   315  			Title:   "Remove dependency",
   316  			Doc:     "remove_dependency removes a dependency.\n",
   317  		},
   318  		{
   319  			Command: "gopls.vendor",
   320  			Title:   "Run go mod vendor",
   321  			Doc:     "vendor runs `go mod vendor` for a module.\n",
   322  		},
   323  		{
   324  			Command: "gopls.extract_variable",
   325  			Title:   "Extract to variable",
   326  			Doc:     "extract_variable extracts an expression to a variable.\n",
   327  		},
   328  		{
   329  			Command: "gopls.extract_function",
   330  			Title:   "Extract to function",
   331  			Doc:     "extract_function extracts statements to a function.\n",
   332  		},
   333  		{
   334  			Command: "gopls.gc_details",
   335  			Title:   "Toggle gc_details",
   336  			Doc:     "gc_details controls calculation of gc annotations.\n",
   337  		},
   338  		{
   339  			Command: "gopls.generate_gopls_mod",
   340  			Title:   "Generate gopls.mod",
   341  			Doc:     "generate_gopls_mod (re)generates the gopls.mod file.\n",
   342  		},
   343  	},
   344  	Lenses: []*LensJSON{
   345  		{
   346  			Lens:  "generate",
   347  			Title: "Run go generate",
   348  			Doc:   "generate runs `go generate` for a given directory.\n",
   349  		},
   350  		{
   351  			Lens:  "regenerate_cgo",
   352  			Title: "Regenerate cgo",
   353  			Doc:   "regenerate_cgo regenerates cgo definitions.\n",
   354  		},
   355  		{
   356  			Lens:  "test",
   357  			Title: "Run test(s)",
   358  			Doc:   "test runs `go test` for a specific test function.\n",
   359  		},
   360  		{
   361  			Lens:  "tidy",
   362  			Title: "Run go mod tidy",
   363  			Doc:   "tidy runs `go mod tidy` for a module.\n",
   364  		},
   365  		{
   366  			Lens:  "upgrade_dependency",
   367  			Title: "Upgrade dependency",
   368  			Doc:   "upgrade_dependency upgrades a dependency.\n",
   369  		},
   370  		{
   371  			Lens:  "vendor",
   372  			Title: "Run go mod vendor",
   373  			Doc:   "vendor runs `go mod vendor` for a module.\n",
   374  		},
   375  		{
   376  			Lens:  "gc_details",
   377  			Title: "Toggle gc_details",
   378  			Doc:   "gc_details controls calculation of gc annotations.\n",
   379  		},
   380  	},
   381  }