Last active
March 24, 2021 15:10
-
-
Save tamago324/5ac3588bcb2f7faff922b73efab8734b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "http://json-schema.org/draft-04/schema#", | |
"description": "Setting of https://github.com/vscode-langservers/vscode-html-languageserver-bin", | |
"properties": { | |
"html.experimental.custom.tags": { | |
"type": "array", | |
"description": "A list of JSON file paths that define custom tags." | |
}, | |
"html.experimental.custom.attributes": { | |
"type": "array", | |
"description": "A list of JSON file paths that define custom attributes." | |
}, | |
"html.trace.server": { | |
"type": "string", | |
"default": "off", | |
"enum": [ | |
"off", | |
"messages", | |
"verbose" | |
] | |
}, | |
"html.filetypes": { | |
"type": "array", | |
"default": [ | |
"html", | |
"handlebars", | |
"htmldjango", | |
"blade" | |
], | |
"items": { | |
"type": "string" | |
} | |
}, | |
"html.format.enable": { | |
"type": "boolean", | |
"scope": "window", | |
"default": true, | |
"description": "Enable/disable default HTML formatter" | |
}, | |
"html.format.wrapLineLength": { | |
"type": "integer", | |
"scope": "resource", | |
"default": 120, | |
"description": "Maximum amount of characters per line (0 = disable)." | |
}, | |
"html.format.unformatted": { | |
"type": [ | |
"string", | |
"null" | |
], | |
"scope": "resource", | |
"default": "wbr", | |
"description": "List of tags, comma separated, that shouldn't be reformatted. 'null' defaults to all tags listed at https://www.w3.org/TR/html5/dom.html#phrasing-content." | |
}, | |
"html.format.contentUnformatted": { | |
"type": [ | |
"string", | |
"null" | |
], | |
"scope": "resource", | |
"default": "pre,code,textarea", | |
"description": "List of tags, comma separated, where the content shouldn't be reformatted. 'null' defaults to the 'pre' tag." | |
}, | |
"html.format.indentInnerHtml": { | |
"type": "boolean", | |
"scope": "resource", | |
"default": false | |
}, | |
"html.format.preserveNewLines": { | |
"type": "boolean", | |
"scope": "resource", | |
"default": true | |
}, | |
"html.format.maxPreserveNewLines": { | |
"type": [ | |
"number", | |
"null" | |
], | |
"scope": "resource", | |
"default": null, | |
"description": "List of tags, comma separated, that should have an extra newline before them. 'null'" | |
}, | |
"html.format.indentHandlebars": { | |
"type": "boolean", | |
"scope": "resource", | |
"default": false | |
}, | |
"html.format.endWithNewline": { | |
"type": "boolean", | |
"scope": "resource", | |
"default": false | |
}, | |
"html.format.extraLiners": { | |
"type": [ | |
"string", | |
"null" | |
], | |
"scope": "resource", | |
"default": "head, body, /html", | |
"description": "List of tags, comma separated, that should have an extra newline before them." | |
}, | |
"html.format.wrapAttributes": { | |
"type": "string", | |
"scope": "resource", | |
"default": "auto", | |
"enum": [ | |
"auto", | |
"force", | |
"force-aligned", | |
"force-expand-multiline", | |
"aligned-multiple", | |
"preserve", | |
"preserve-aligned" | |
] | |
}, | |
"html.suggest.html5": { | |
"type": "boolean", | |
"scope": "resource", | |
"default": true, | |
"description": "Configures if the built-in HTML language support suggests HTML5 tags, properties and values." | |
}, | |
"html.validate.scripts": { | |
"type": "boolean", | |
"scope": "resource", | |
"default": true, | |
"description": "Configures if the built-in HTML language support validates embedded scripts." | |
}, | |
"html.validate.styles": { | |
"type": "boolean", | |
"scope": "resource", | |
"default": true, | |
"description": "Configures if the built-in HTML language support validates embedded styles." | |
}, | |
"html.validate.html": { | |
"type": "boolean", | |
"scope": "resource", | |
"default": true, | |
"description": "Configures if the built-in HTML language support validates HTML." | |
}, | |
"html.autoClosingTags": { | |
"type": "boolean", | |
"default": false, | |
"description": "Enable/disable autoClosing of HTML tags." | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "http://json-schema.org/draft-04/schema#", | |
"description": "Setting of https://github.com/golang/tools/tree/master/gopls", | |
"properties": { | |
"go.buildOnSave": { | |
"type": "string", | |
"enum": [ | |
"package", | |
"workspace", | |
"off" | |
], | |
"default": "package", | |
"description": "Compiles code on file save using 'go build' or 'go test -c'. Options are 'workspace', 'package', or 'off'. Not applicable when using the language server's diagnostics. See 'go.languageServerExperimentalFeatures.diagnostics' setting.", | |
"scope": "resource" | |
}, | |
"go.buildFlags": { | |
"type": "array", | |
"items": { | |
"type": "string" | |
}, | |
"default": [], | |
"description": "Flags to `go build`/`go test` used during build-on-save or running tests. (e.g. [\"-ldflags='-s'\"]) This is propagated to the language server if `gopls.build.buildFlags` is not specified.", | |
"scope": "resource" | |
}, | |
"go.buildTags": { | |
"type": "string", | |
"default": "", | |
"description": "The Go build tags to use for all commands, that support a `-tags '...'` argument. When running tests, go.testTags will be used instead if it was set. This is propagated to the language server if `gopls.build.buildFlags` is not specified.", | |
"scope": "resource" | |
}, | |
"go.testTags": { | |
"type": [ | |
"string", | |
"null" | |
], | |
"default": null, | |
"description": "The Go build tags to use for when running tests. If null, then buildTags will be used.", | |
"scope": "resource" | |
}, | |
"go.disableConcurrentTests": { | |
"type": "boolean", | |
"default": false, | |
"description": "If true, tests will not run concurrently. When a new test run is started, the previous will be cancelled.", | |
"scope": "resource" | |
}, | |
"go.installDependenciesWhenBuilding": { | |
"type": "boolean", | |
"default": false, | |
"description": "If true, then `-i` flag will be passed to `go build` everytime the code is compiled. Since Go 1.10, setting this may be unnecessary unless you are in GOPATH mode and do not use the language server.", | |
"scope": "resource" | |
}, | |
"go.lintOnSave": { | |
"type": "string", | |
"enum": [ | |
"file", | |
"package", | |
"workspace", | |
"off" | |
], | |
"default": "package", | |
"description": "Lints code on file save using the configured Lint tool. Options are 'file', 'package', 'workspace' or 'off'.", | |
"scope": "resource" | |
}, | |
"go.lintTool": { | |
"type": "string", | |
"default": "staticcheck", | |
"description": "Specifies Lint tool name.", | |
"scope": "resource", | |
"enum": [ | |
"staticcheck", | |
"golint", | |
"golangci-lint", | |
"revive" | |
] | |
}, | |
"go.lintFlags": { | |
"type": "array", | |
"items": { | |
"type": "string" | |
}, | |
"default": [], | |
"description": "Flags to pass to Lint tool (e.g. [\"-min_confidence=.8\"])", | |
"scope": "resource" | |
}, | |
"go.vetOnSave": { | |
"type": "string", | |
"enum": [ | |
"package", | |
"workspace", | |
"off" | |
], | |
"default": "package", | |
"description": "Vets code on file save using 'go tool vet'. Not applicable when using the language server's diagnostics. See 'go.languageServerExperimentalFeatures.diagnostics' setting.", | |
"scope": "resource" | |
}, | |
"go.vetFlags": { | |
"type": "array", | |
"items": { | |
"type": "string" | |
}, | |
"default": [], | |
"description": "Flags to pass to `go tool vet` (e.g. [\"-all\", \"-shadow\"])", | |
"scope": "resource" | |
}, | |
"go.formatTool": { | |
"type": "string", | |
"default": "default", | |
"description": "Not applicable when using the language server. Choosing 'goimports', 'goreturns', or 'gofumports' will add missing imports and remove unused imports.", | |
"scope": "resource", | |
"enum": [ | |
"default", | |
"gofmt", | |
"goimports", | |
"goformat", | |
"gofumpt", | |
"gofumports" | |
], | |
"enumDescriptions": [ | |
"If the language server is enabled, format via the language server, which already supports gofmt, goimports, goreturns, and gofumpt. Otherwise, goimports.", | |
"Formats the file according to the standard Go style.", | |
"Organizes imports and formats the file with gofmt.", | |
"Configurable gofmt, see https://github.com/mbenkmann/goformat.", | |
"Stricter version of gofmt, see https://github.com/mvdan/gofumpt.", | |
"Applies gofumpt formatting and organizes imports." | |
] | |
}, | |
"go.formatFlags": { | |
"type": "array", | |
"items": { | |
"type": "string" | |
}, | |
"default": [], | |
"description": "Flags to pass to format tool (e.g. [\"-s\"]). Not applicable when using the language server.", | |
"scope": "resource" | |
}, | |
"go.inferGopath": { | |
"type": "boolean", | |
"default": false, | |
"description": "Infer GOPATH from the workspace root. This is ignored when using Go Modules. When specified as a workspace setting, the setting is used only when the workspace is marked trusted with \"Go: Toggle Workspace Trust Flag\".", | |
"scope": "resource" | |
}, | |
"go.gopath": { | |
"type": [ | |
"string", | |
"null" | |
], | |
"default": null, | |
"description": "Specify GOPATH here to override the one that is set as environment variable. The inferred GOPATH from workspace root overrides this, if go.inferGopath is set to true. When specified as a workspace setting, the setting is used only when the workspace is marked trusted with \"Go: Toggle Workspace Trust Flag\".", | |
"scope": "machine-overridable" | |
}, | |
"go.toolsGopath": { | |
"type": [ | |
"string", | |
"null" | |
], | |
"default": null, | |
"description": "Location to install the Go tools that the extension depends on if you don't want them in your GOPATH. When specified as a workspace setting, the setting is used only when the workspace is marked trusted with \"Go: Toggle Workspace Trust Flag\".", | |
"scope": "machine-overridable" | |
}, | |
"go.goroot": { | |
"type": [ | |
"string", | |
"null" | |
], | |
"default": null, | |
"description": "Specifies the GOROOT to use when no environment variable is set. When specified as a workspace setting, the setting is used only when the workspace is marked trusted with \"Go: Toggle Workspace Trust Flag\".", | |
"scope": "machine-overridable" | |
}, | |
"go.testOnSave": { | |
"type": "boolean", | |
"default": false, | |
"description": "Run 'go test' on save for current package. It is not advised to set this to `true` when you have Auto Save enabled.", | |
"scope": "resource" | |
}, | |
"go.coverOnSave": { | |
"type": "boolean", | |
"default": false, | |
"description": "If true, runs 'go test -coverprofile' on save and shows test coverage.", | |
"scope": "resource" | |
}, | |
"go.coverOnTestPackage": { | |
"type": "boolean", | |
"default": true, | |
"description": "If true, shows test coverage when Go: Test Package command is run." | |
}, | |
"go.coverOnSingleTest": { | |
"type": "boolean", | |
"default": false, | |
"description": "If true, shows test coverage when Go: Test Function at cursor command is run." | |
}, | |
"go.coverOnSingleTestFile": { | |
"type": "boolean", | |
"default": false, | |
"description": "If true, shows test coverage when Go: Test Single File command is run." | |
}, | |
"go.coverMode": { | |
"type": "string", | |
"enum": [ | |
"default", | |
"set", | |
"count", | |
"atomic" | |
], | |
"default": "default", | |
"description": "When generating code coverage, the value for -covermode. 'default' is the default value chosen by the 'go test' command.", | |
"scope": "resource" | |
}, | |
"go.coverShowCounts": { | |
"type": "boolean", | |
"default": false, | |
"description": "When generating code coverage, should counts be shown as --374--", | |
"scope": "resource" | |
}, | |
"go.coverageOptions": { | |
"type": "string", | |
"enum": [ | |
"showCoveredCodeOnly", | |
"showUncoveredCodeOnly", | |
"showBothCoveredAndUncoveredCode" | |
], | |
"default": "showBothCoveredAndUncoveredCode", | |
"description": "Use these options to control whether only covered or only uncovered code or both should be highlighted after running test coverage", | |
"scope": "resource" | |
}, | |
"go.coverageDecorator": { | |
"type": "object", | |
"properties": { | |
"type": { | |
"type": "string", | |
"enum": [ | |
"highlight", | |
"gutter" | |
] | |
}, | |
"coveredHighlightColor": { | |
"type": "string", | |
"description": "Color in the rgba format to use to highlight covered code." | |
}, | |
"uncoveredHighlightColor": { | |
"type": "string", | |
"description": "Color in the rgba format to use to highlight uncovered code." | |
}, | |
"coveredBorderColor": { | |
"type": "string", | |
"description": "Color to use for the border of covered code." | |
}, | |
"uncoveredBorderColor": { | |
"type": "string", | |
"description": "Color to use for the border of uncovered code." | |
}, | |
"coveredGutterStyle": { | |
"type": "string", | |
"enum": [ | |
"blockblue", | |
"blockred", | |
"blockgreen", | |
"blockyellow", | |
"slashred", | |
"slashgreen", | |
"slashblue", | |
"slashyellow", | |
"verticalred", | |
"verticalgreen", | |
"verticalblue", | |
"verticalyellow" | |
], | |
"description": "Gutter style to indicate covered code." | |
}, | |
"uncoveredGutterStyle": { | |
"type": "string", | |
"enum": [ | |
"blockblue", | |
"blockred", | |
"blockgreen", | |
"blockyellow", | |
"slashred", | |
"slashgreen", | |
"slashblue", | |
"slashyellow", | |
"verticalred", | |
"verticalgreen", | |
"verticalblue", | |
"verticalyellow" | |
], | |
"description": "Gutter style to indicate covered code." | |
} | |
}, | |
"additionalProperties": false, | |
"default": { | |
"type": "highlight", | |
"coveredHighlightColor": "rgba(64,128,128,0.5)", | |
"uncoveredHighlightColor": "rgba(128,64,64,0.25)", | |
"coveredBorderColor": "rgba(64,128,128,0.5)", | |
"uncoveredBorderColor": "rgba(128,64,64,0.25)", | |
"coveredGutterStyle": "blockblue", | |
"uncoveredGutterStyle": "slashyellow" | |
}, | |
"description": "This option lets you choose the way to display code coverage. Choose either to highlight the complete line or to show a decorator in the gutter. You can customize the colors and borders for the former and the style for the latter.", | |
"scope": "resource" | |
}, | |
"go.testTimeout": { | |
"type": "string", | |
"default": "30s", | |
"description": "Specifies the timeout for go test in ParseDuration format.", | |
"scope": "resource" | |
}, | |
"go.testEnvVars": { | |
"type": "object", | |
"default": {}, | |
"description": "Environment variables that will be passed to the process that runs the Go tests", | |
"scope": "resource" | |
}, | |
"go.testEnvFile": { | |
"type": "string", | |
"default": null, | |
"description": "Absolute path to a file containing environment variables definitions. File contents should be of the form key=value.", | |
"scope": "resource" | |
}, | |
"go.testFlags": { | |
"type": [ | |
"array", | |
"null" | |
], | |
"items": { | |
"type": "string" | |
}, | |
"default": null, | |
"description": "Flags to pass to `go test`. If null, then buildFlags will be used. This is not propagated to the language server.", | |
"scope": "resource" | |
}, | |
"go.generateTestsFlags": { | |
"type": "array", | |
"items": { | |
"type": "string" | |
}, | |
"default": [], | |
"description": "Additional command line flags to pass to `gotests` for generating tests.", | |
"scope": "resource" | |
}, | |
"go.toolsEnvVars": { | |
"type": "object", | |
"default": {}, | |
"description": "Environment variables that will be passed to the tools that run the Go tools (e.g. CGO_CFLAGS)", | |
"scope": "resource" | |
}, | |
"go.gocodeFlags": { | |
"type": "array", | |
"items": { | |
"type": "string" | |
}, | |
"default": [ | |
"-builtin", | |
"-ignore-case", | |
"-unimported-packages" | |
], | |
"description": "Additional flags to pass to gocode. Not applicable when using the language server.", | |
"scope": "resource" | |
}, | |
"go.gocodeAutoBuild": { | |
"type": "boolean", | |
"default": false, | |
"description": "Enable gocode's autobuild feature. Not applicable when using the language server.", | |
"scope": "resource" | |
}, | |
"go.gocodePackageLookupMode": { | |
"type": "string", | |
"enum": [ | |
"go", | |
"gb", | |
"bzl" | |
], | |
"default": "go", | |
"description": "Used to determine the Go package lookup rules for completions by gocode. Only applies when using nsf/gocode. Latest versions of the Go extension uses mdempsky/gocode by default. Not applicable when using the language server.", | |
"scope": "resource" | |
}, | |
"go.useCodeSnippetsOnFunctionSuggest": { | |
"type": "boolean", | |
"default": false, | |
"description": "Complete functions with their parameter signature, including the variable type. Not propagated to the language server.", | |
"scope": "resource" | |
}, | |
"go.useCodeSnippetsOnFunctionSuggestWithoutType": { | |
"type": "boolean", | |
"default": false, | |
"description": "Complete functions with their parameter signature, excluding the variable types. Use `gopls.usePlaceholders` when using the language server.", | |
"scope": "resource" | |
}, | |
"go.autocompleteUnimportedPackages": { | |
"type": "boolean", | |
"default": false, | |
"description": "Include unimported packages in auto-complete suggestions. Not applicable when using the language server.", | |
"scope": "resource" | |
}, | |
"go.docsTool": { | |
"type": "string", | |
"default": "godoc", | |
"description": "Pick 'godoc' or 'gogetdoc' to get documentation. Not applicable when using the language server.", | |
"scope": "resource", | |
"enum": [ | |
"godoc", | |
"gogetdoc", | |
"guru" | |
] | |
}, | |
"go.useLanguageServer": { | |
"type": "boolean", | |
"default": true, | |
"description": "Use the Go language server \"gopls\" from Google for powering language features like code navigation, completion, refactoring, formatting & diagnostics." | |
}, | |
"go.languageServerFlags": { | |
"type": "array", | |
"default": [], | |
"description": "Flags like -rpc.trace and -logfile to be used while running the language server." | |
}, | |
"go.languageServerExperimentalFeatures": { | |
"type": "object", | |
"properties": { | |
"diagnostics": { | |
"type": "boolean", | |
"default": true, | |
"description": "If true, the language server will provide build, vet errors and the extension will ignore the `buildOnSave`, `vetOnSave` settings." | |
} | |
}, | |
"additionalProperties": false, | |
"default": { | |
"diagnostics": true | |
}, | |
"markdownDescription": "Temporary flag to enable/disable diagnostics from the language server. This setting will be deprecated soon. Please see and response to [Issue 50](https://github.com/golang/vscode-go/issues/50)." | |
}, | |
"go.trace.server": { | |
"type": "string", | |
"enum": [ | |
"off", | |
"messages", | |
"verbose" | |
], | |
"default": "off", | |
"description": "Trace the communication between VS Code and the Go language server." | |
}, | |
"go.logging.level": { | |
"type": "string", | |
"default": "error", | |
"enum": [ | |
"off", | |
"error", | |
"info", | |
"verbose" | |
], | |
"description": "The logging level the extension logs at, defaults to 'error'", | |
"scope": "machine-overridable" | |
}, | |
"go.toolsManagement.checkForUpdates": { | |
"type": "string", | |
"default": "proxy", | |
"enum": [ | |
"proxy", | |
"local", | |
"off" | |
], | |
"enumDescriptions": [ | |
"keeps notified of new releases by checking the Go module proxy (GOPROXY)", | |
"checks only the minimum tools versions required by the extension", | |
"completely disables version check (not recommended)" | |
], | |
"markdownDescription": "Specify whether to prompt about new versions of Go and the Go tools (currently, only `gopls`) the extension depends on" | |
}, | |
"go.toolsManagement.autoUpdate": { | |
"type": "boolean", | |
"default": false, | |
"description": "Automatically update the tools used by the extension, without prompting the user.", | |
"scope": "resource" | |
}, | |
"go.useGoProxyToCheckForToolUpdates": { | |
"type": "boolean", | |
"default": true, | |
"description": "When enabled, the extension automatically checks the Go proxy if there are updates available for Go and the Go tools (at present, only gopls) it depends on and prompts the user accordingly", | |
"markdownDeprecationMessage": "Use `go.toolsManagement.checkForUpdates` instead." | |
}, | |
"go.gotoSymbol.includeImports": { | |
"type": "boolean", | |
"default": false, | |
"description": "If false, the import statements will be excluded while using the Go to Symbol in File feature. Not applicable when using the language server.", | |
"scope": "resource" | |
}, | |
"go.gotoSymbol.includeGoroot": { | |
"type": "boolean", | |
"default": false, | |
"description": "If false, the standard library located at $GOROOT will be excluded while using the Go to Symbol in File feature. Not applicable when using the language server.", | |
"scope": "resource" | |
}, | |
"go.enableCodeLens": { | |
"type": "object", | |
"properties": { | |
"references": { | |
"type": "boolean", | |
"default": false, | |
"description": "If true, enables the references code lens. Uses guru. Recalculates when there is change to the document followed by scrolling. Unnecessary when using the language server; use the call graph feature instead." | |
}, | |
"runtest": { | |
"type": "boolean", | |
"default": true, | |
"description": "If true, enables code lens for running and debugging tests" | |
} | |
}, | |
"additionalProperties": false, | |
"default": { | |
"references": false, | |
"runtest": true | |
}, | |
"description": "Feature level setting to enable/disable code lens for references and run/debug tests", | |
"scope": "resource" | |
}, | |
"go.overwriteGoplsMiddleware": { | |
"type": "object", | |
"properties": { | |
"codelens": { | |
"type": "object", | |
"properties": { | |
"test": { | |
"type": "boolean", | |
"default": false, | |
"description": "'test' codelens will be handled by gopls if true" | |
}, | |
"bench": { | |
"type": "boolean", | |
"default": false, | |
"description": "'benchmark' codelens will be handled by gopls if true" | |
} | |
} | |
}, | |
"default": { | |
"codelens": { | |
"test": false, | |
"bench": false | |
} | |
} | |
}, | |
"scope": "resource", | |
"deprecationMessage": "This option is deprecated.", | |
"description": "This option provides a set of flags which determine if vscode-go should intercept certain commands from gopls. These flags assume the `gopls` settings, which enable codelens from gopls, are also present." | |
}, | |
"go.addTags": { | |
"type": "object", | |
"properties": { | |
"promptForTags": { | |
"type": "boolean", | |
"default": false, | |
"description": "If true, Go: Add Tags command will prompt the user to provide tags, options, transform values instead of using the configured values" | |
}, | |
"tags": { | |
"type": "string", | |
"default": "json", | |
"description": "Comma separated tags to be used by Go: Add Tags command" | |
}, | |
"options": { | |
"type": "string", | |
"default": "json=omitempty", | |
"description": "Comma separated tag=options pairs to be used by Go: Add Tags command" | |
}, | |
"transform": { | |
"type": "string", | |
"enum": [ | |
"snakecase", | |
"camelcase", | |
"lispcase", | |
"pascalcase", | |
"keep" | |
], | |
"default": "snakecase", | |
"description": "Transformation rule used by Go: Add Tags command to add tags" | |
}, | |
"template": { | |
"type": "string", | |
"default": "", | |
"description": "Custom format used by Go: Add Tags command for the tag value to be applied" | |
} | |
}, | |
"additionalProperties": false, | |
"default": { | |
"tags": "json", | |
"options": "json=omitempty", | |
"promptForTags": false, | |
"transform": "snakecase", | |
"template": "" | |
}, | |
"description": "Tags and options configured here will be used by the Add Tags command to add tags to struct fields. If promptForTags is true, then user will be prompted for tags and options. By default, json tags are added.", | |
"scope": "resource" | |
}, | |
"go.liveErrors": { | |
"type": "object", | |
"properties": { | |
"enabled": { | |
"type": "boolean", | |
"default": false, | |
"description": "If true, runs gotype on the file currently being edited and reports any semantic or syntactic errors found. Disabled when the language server is enabled." | |
}, | |
"delay": { | |
"type": "number", | |
"default": 500, | |
"description": "The number of milliseconds to delay before execution. Resets with each keystroke." | |
} | |
}, | |
"additionalProperties": false, | |
"default": { | |
"enabled": false, | |
"delay": 500 | |
}, | |
"description": "Use gotype on the file currently being edited and report any semantic or syntactic errors found after configured delay. Not applicable when using the language server.", | |
"scope": "resource" | |
}, | |
"go.removeTags": { | |
"type": "object", | |
"properties": { | |
"promptForTags": { | |
"type": "boolean", | |
"default": false, | |
"description": "If true, Go: Remove Tags command will prompt the user to provide tags and options instead of using the configured values" | |
}, | |
"tags": { | |
"type": "string", | |
"default": "json", | |
"description": "Comma separated tags to be used by Go: Remove Tags command" | |
}, | |
"options": { | |
"type": "string", | |
"default": "json=omitempty", | |
"description": "Comma separated tag=options pairs to be used by Go: Remove Tags command" | |
} | |
}, | |
"additionalProperties": false, | |
"default": { | |
"tags": "", | |
"options": "", | |
"promptForTags": false | |
}, | |
"description": "Tags and options configured here will be used by the Remove Tags command to remove tags to struct fields. If promptForTags is true, then user will be prompted for tags and options. By default, all tags and options will be removed.", | |
"scope": "resource" | |
}, | |
"go.playground": { | |
"type": "object", | |
"properties": { | |
"openbrowser": { | |
"type": "boolean", | |
"default": true, | |
"description": "Whether to open the created Go Playground in the default browser" | |
}, | |
"share": { | |
"type": "boolean", | |
"default": true, | |
"description": "Whether to make the created Go Playground shareable" | |
}, | |
"run": { | |
"type": "boolean", | |
"default": true, | |
"description": "Whether to run the created Go Playground after creation" | |
} | |
}, | |
"description": "The flags configured here will be passed through to command `goplay`", | |
"additionalProperties": false, | |
"default": { | |
"openbrowser": true, | |
"share": true, | |
"run": true | |
} | |
}, | |
"go.editorContextMenuCommands": { | |
"type": "object", | |
"properties": { | |
"toggleTestFile": { | |
"type": "boolean", | |
"default": true, | |
"description": "If true, adds command to toggle between a Go file and its test file to the editor context menu" | |
}, | |
"addTags": { | |
"type": "boolean", | |
"default": true, | |
"description": "If true, adds command to add configured tags from struct fields to the editor context menu" | |
}, | |
"removeTags": { | |
"type": "boolean", | |
"default": true, | |
"description": "If true, adds command to remove configured tags from struct fields to the editor context menu" | |
}, | |
"fillStruct": { | |
"type": "boolean", | |
"default": true, | |
"description": "If true, adds command to fill struct literal with default values to the editor context menu" | |
}, | |
"testAtCursor": { | |
"type": "boolean", | |
"default": true, | |
"description": "If true, adds command to run the test under the cursor to the editor context menu" | |
}, | |
"testFile": { | |
"type": "boolean", | |
"default": true, | |
"description": "If true, adds command to run all tests in the current file to the editor context menu" | |
}, | |
"testPackage": { | |
"type": "boolean", | |
"default": true, | |
"description": "If true, adds command to run all tests in the current package to the editor context menu" | |
}, | |
"generateTestForFunction": { | |
"type": "boolean", | |
"default": true, | |
"description": "If true, adds command to generate unit tests for function under the cursor to the editor context menu" | |
}, | |
"generateTestForFile": { | |
"type": "boolean", | |
"default": true, | |
"description": "If true, adds command to generate unit tests for current file to the editor context menu" | |
}, | |
"generateTestForPackage": { | |
"type": "boolean", | |
"default": true, | |
"description": "If true, adds command to generate unit tests for currnt package to the editor context menu" | |
}, | |
"addImport": { | |
"type": "boolean", | |
"default": true, | |
"description": "If true, adds command to import a package to the editor context menu" | |
}, | |
"testCoverage": { | |
"type": "boolean", | |
"default": true, | |
"description": "If true, adds command to run test coverage to the editor context menu" | |
}, | |
"playground": { | |
"type": "boolean", | |
"default": true, | |
"description": "If true, adds command to upload the current file or selection to the Go Playground" | |
}, | |
"debugTestAtCursor": { | |
"type": "boolean", | |
"default": true, | |
"description": "If true, adds command to debug the test under the cursor to the editor context menu" | |
}, | |
"benchmarkAtCursor": { | |
"type": "boolean", | |
"default": true, | |
"description": "If true, adds command to benchmark the test under the cursor to the editor context menu" | |
} | |
}, | |
"additionalProperties": false, | |
"default": { | |
"toggleTestFile": true, | |
"addTags": true, | |
"removeTags": false, | |
"fillStruct": false, | |
"testAtCursor": true, | |
"testFile": false, | |
"testPackage": false, | |
"generateTestForFunction": true, | |
"generateTestForFile": false, | |
"generateTestForPackage": false, | |
"addImport": true, | |
"testCoverage": true, | |
"playground": true, | |
"debugTestAtCursor": true, | |
"benchmarkAtCursor": false | |
}, | |
"description": "Experimental Feature: Enable/Disable entries from the context menu in the editor.", | |
"scope": "resource" | |
}, | |
"go.gotoSymbol.ignoreFolders": { | |
"type": "array", | |
"items": { | |
"type": "string" | |
}, | |
"default": [], | |
"description": "Folder names (not paths) to ignore while using Go to Symbol in Workspace feature. Not applicable when using the language server.", | |
"scope": "resource" | |
}, | |
"go.delveConfig": { | |
"type": "object", | |
"properties": { | |
"dlvLoadConfig": { | |
"type": "object", | |
"properties": { | |
"followPointers": { | |
"type": "boolean", | |
"description": "FollowPointers requests pointers to be automatically dereferenced", | |
"default": true | |
}, | |
"maxVariableRecurse": { | |
"type": "number", | |
"description": "MaxVariableRecurse is how far to recurse when evaluating nested types", | |
"default": 1 | |
}, | |
"maxStringLen": { | |
"type": "number", | |
"description": "MaxStringLen is the maximum number of bytes read from a string", | |
"default": 64 | |
}, | |
"maxArrayValues": { | |
"type": "number", | |
"description": "MaxArrayValues is the maximum number of elements read from an array, a slice or a map", | |
"default": 64 | |
}, | |
"maxStructFields": { | |
"type": "number", | |
"description": "MaxStructFields is the maximum number of fields read from a struct, -1 will read all fields", | |
"default": -1 | |
} | |
}, | |
"description": "LoadConfig describes to delve, how to load values from target's memory", | |
"default": { | |
"followPointers": true, | |
"maxVariableRecurse": 1, | |
"maxStringLen": 64, | |
"maxArrayValues": 64, | |
"maxStructFields": -1 | |
} | |
}, | |
"apiVersion": { | |
"type": "number", | |
"enum": [ | |
1, | |
2 | |
], | |
"description": "Delve Api Version to use. Default value is 2.", | |
"default": 2 | |
}, | |
"showGlobalVariables": { | |
"type": "boolean", | |
"description": "Boolean value to indicate whether global package variables should be shown in the variables pane or not.", | |
"default": false | |
} | |
}, | |
"default": { | |
"dlvLoadConfig": { | |
"followPointers": true, | |
"maxVariableRecurse": 1, | |
"maxStringLen": 64, | |
"maxArrayValues": 64, | |
"maxStructFields": -1 | |
}, | |
"apiVersion": 2, | |
"showGlobalVariables": false | |
}, | |
"description": "Delve settings that applies to all debugging sessions. Debug configuration in the launch.json file will override these values.", | |
"scope": "resource" | |
}, | |
"go.alternateTools": { | |
"type": "object", | |
"default": {}, | |
"description": "Alternate tools or alternate paths for the same tools used by the Go extension. Provide either absolute path or the name of the binary in GOPATH/bin, GOROOT/bin or PATH. Useful when you want to use wrapper script for the Go tools or versioned tools from https://gopkg.in. When specified as a workspace setting, the setting is used only when the workspace is marked trusted with \"Go: Toggle Workspace Trust Flag\".", | |
"scope": "resource", | |
"properties": { | |
"go": { | |
"type": "string", | |
"default": "go", | |
"description": "Alternate tool to use instead of the go binary or alternate path to use for the go binary." | |
}, | |
"gopkgs": { | |
"type": "string", | |
"default": "gopkgs", | |
"description": "Alternate tool to use instead of the gopkgs binary or alternate path to use for the gopkgs binary." | |
}, | |
"gopls": { | |
"type": "string", | |
"default": "gopls", | |
"description": "Alternate tool to use instead of the gopls binary or alternate path to use for the gopls binary." | |
}, | |
"go-outline": { | |
"type": "string", | |
"default": "go-outline", | |
"description": "Alternate tool to use instead of the go-outline binary or alternate path to use for the go-outline binary." | |
}, | |
"dlv": { | |
"type": "string", | |
"default": "dlv", | |
"description": "Alternate tool to use instead of the dlv binary or alternate path to use for the dlv binary." | |
} | |
}, | |
"additionalProperties": true | |
}, | |
"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", | |
"properties": { | |
"build.allowImplicitNetworkAccess": { | |
"type": "boolean", | |
"markdownDescription": "(Experimental) allowImplicitNetworkAccess disables GOPROXY=off, allowing implicit module\ndownloads rather than requiring user action. This option will eventually\nbe removed.\n", | |
"default": false, | |
"scope": "resource" | |
}, | |
"build.allowModfileModifications": { | |
"type": "boolean", | |
"markdownDescription": "(Experimental) allowModfileModifications disables -mod=readonly, allowing imports from\nout-of-scope modules. This option will eventually be removed.\n", | |
"default": false, | |
"scope": "resource" | |
}, | |
"build.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\nIf unspecified, values of `go.buildFlags, go.buildTags` will be propagated.\n", | |
"scope": "resource" | |
}, | |
"build.directoryFilters": { | |
"type": "array", | |
"markdownDescription": "directoryFilters can be used to exclude unwanted directories from the\nworkspace. By default, all directories are included. Filters are an\noperator, `+` to include and `-` to exclude, followed by a path prefix\nrelative to the workspace folder. They are evaluated in order, and\nthe last filter that applies to a path controls whether it is included.\nThe path prefix can be empty, so an initial `-` excludes everything.\n\nExamples:\nExclude node_modules: `-node_modules`\nInclude only project_a: `-` (exclude everything), `+project_a`\nInclude only project_a, but not node_modules inside it: `-`, `+project_a`, `-project_a/node_modules`\n", | |
"scope": "resource" | |
}, | |
"build.env": { | |
"type": "object", | |
"markdownDescription": "env adds environment variables to external commands run by `gopls`, most notably `go list`.\n", | |
"scope": "resource" | |
}, | |
"build.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" | |
}, | |
"build.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" | |
}, | |
"build.experimentalWorkspaceModule": { | |
"type": "boolean", | |
"markdownDescription": "(Experimental) experimentalWorkspaceModule opts a user into the experimental support\nfor multi-module workspaces.\n", | |
"default": false, | |
"scope": "resource" | |
}, | |
"formatting.gofumpt": { | |
"type": "boolean", | |
"markdownDescription": "gofumpt indicates if we should run gofumpt formatting.\n", | |
"default": false, | |
"scope": "resource" | |
}, | |
"formatting.local": { | |
"type": "string", | |
"markdownDescription": "local is the equivalent of the `goimports -local` flag, which puts\nimports beginning with this string after third-party packages. It should\nbe the prefix of the import path whose imports should be grouped\nseparately.\n", | |
"default": "", | |
"scope": "resource" | |
}, | |
"ui.codelenses": { | |
"type": "object", | |
"markdownDescription": "codelenses overrides the enabled/disabled state of code lenses. See the\n\"Code Lenses\" section of the\n[Settings page](https://github.com/golang/tools/blob/master/gopls/doc/settings.md)\nfor the list of supported lenses.\n\nExample Usage:\n\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", | |
"scope": "resource", | |
"properties": { | |
"gc_details": { | |
"type": "boolean", | |
"markdownDescription": "Toggle the calculation of gc annotations.", | |
"default": false | |
}, | |
"generate": { | |
"type": "boolean", | |
"markdownDescription": "Runs `go generate` for a given directory.", | |
"default": true | |
}, | |
"regenerate_cgo": { | |
"type": "boolean", | |
"markdownDescription": "Regenerates cgo definitions.", | |
"default": true | |
}, | |
"test": { | |
"type": "boolean", | |
"markdownDescription": "Runs `go test` for a specific set of test or benchmark functions.", | |
"default": false | |
}, | |
"tidy": { | |
"type": "boolean", | |
"markdownDescription": "Runs `go mod tidy` for a module.", | |
"default": true | |
}, | |
"upgrade_dependency": { | |
"type": "boolean", | |
"markdownDescription": "Upgrades a dependency in the go.mod file for a module.", | |
"default": true | |
}, | |
"vendor": { | |
"type": "boolean", | |
"markdownDescription": "Runs `go mod vendor` for a module.", | |
"default": true | |
} | |
} | |
}, | |
"ui.completion.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" | |
}, | |
"ui.completion.matcher": { | |
"type": "string", | |
"markdownDescription": "(Advanced) matcher sets the algorithm that is used when calculating completion\ncandidates.\n", | |
"enum": [ | |
"CaseInsensitive", | |
"CaseSensitive", | |
"Fuzzy" | |
], | |
"markdownEnumDescriptions": [ | |
"", | |
"", | |
"" | |
], | |
"default": "Fuzzy", | |
"scope": "resource" | |
}, | |
"ui.completion.usePlaceholders": { | |
"type": "boolean", | |
"markdownDescription": "placeholders enables placeholders for function parameters or struct\nfields in completion responses.\n", | |
"default": false, | |
"scope": "resource" | |
}, | |
"ui.diagnostic.analyses": { | |
"type": "object", | |
"markdownDescription": "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\n[here](https://github.com/golang/tools/blob/master/gopls/doc/analyzers.md).\n\nExample Usage:\n\n```json5\n...\n\"analyses\": {\n \"unreachable\": false, // Disable the unreachable analyzer.\n \"unusedparams\": true // Enable the unusedparams analyzer.\n}\n...\n```\n", | |
"scope": "resource", | |
"properties": { | |
"asmdecl": { | |
"type": "boolean", | |
"markdownDescription": "report mismatches between assembly files and Go declarations", | |
"default": true | |
}, | |
"assign": { | |
"type": "boolean", | |
"markdownDescription": "check for useless assignments\n\nThis checker reports assignments of the form x = x or a[i] = a[i].\nThese are almost always useless, and even when they aren't they are\nusually a mistake.", | |
"default": true | |
}, | |
"atomic": { | |
"type": "boolean", | |
"markdownDescription": "check for common mistakes using the sync/atomic package\n\nThe atomic checker looks for assignment statements of the form:\n\n\tx = atomic.AddUint64(&x, 1)\n\nwhich are not atomic.", | |
"default": true | |
}, | |
"atomicalign": { | |
"type": "boolean", | |
"markdownDescription": "check for non-64-bits-aligned arguments to sync/atomic functions", | |
"default": true | |
}, | |
"bools": { | |
"type": "boolean", | |
"markdownDescription": "check for common mistakes involving boolean operators", | |
"default": true | |
}, | |
"buildtag": { | |
"type": "boolean", | |
"markdownDescription": "check that +build tags are well-formed and correctly located", | |
"default": true | |
}, | |
"cgocall": { | |
"type": "boolean", | |
"markdownDescription": "detect some violations of the cgo pointer passing rules\n\nCheck for invalid cgo pointer passing.\nThis looks for code that uses cgo to call C code passing values\nwhose types are almost always invalid according to the cgo pointer\nsharing rules.\nSpecifically, it warns about attempts to pass a Go chan, map, func,\nor slice to C, either directly, or via a pointer, array, or struct.", | |
"default": true | |
}, | |
"composites": { | |
"type": "boolean", | |
"markdownDescription": "check for unkeyed composite literals\n\nThis analyzer reports a diagnostic for composite literals of struct\ntypes imported from another package that do not use the field-keyed\nsyntax. Such literals are fragile because the addition of a new field\n(even if unexported) to the struct will cause compilation to fail.\n\nAs an example,\n\n\terr = &net.DNSConfigError{err}\n\nshould be replaced by:\n\n\terr = &net.DNSConfigError{Err: err}\n", | |
"default": true | |
}, | |
"copylocks": { | |
"type": "boolean", | |
"markdownDescription": "check for locks erroneously passed by value\n\nInadvertently copying a value containing a lock, such as sync.Mutex or\nsync.WaitGroup, may cause both copies to malfunction. Generally such\nvalues should be referred to through a pointer.", | |
"default": true | |
}, | |
"deepequalerrors": { | |
"type": "boolean", | |
"markdownDescription": "check for calls of reflect.DeepEqual on error values\n\nThe deepequalerrors checker looks for calls of the form:\n\n reflect.DeepEqual(err1, err2)\n\nwhere err1 and err2 are errors. Using reflect.DeepEqual to compare\nerrors is discouraged.", | |
"default": true | |
}, | |
"errorsas": { | |
"type": "boolean", | |
"markdownDescription": "report passing non-pointer or non-error values to errors.As\n\nThe errorsas analysis reports calls to errors.As where the type\nof the second argument is not a pointer to a type implementing error.", | |
"default": true | |
}, | |
"fieldalignment": { | |
"type": "boolean", | |
"markdownDescription": "find structs that would take less memory if their fields were sorted\n\nThis analyzer find structs that can be rearranged to take less memory, and provides\na suggested edit with the optimal order.\n", | |
"default": false | |
}, | |
"fillreturns": { | |
"type": "boolean", | |
"markdownDescription": "suggested fixes for \"wrong number of return values (want %d, got %d)\"\n\nThis checker provides suggested fixes for type errors of the\ntype \"wrong number of return values (want %d, got %d)\". For example:\n\tfunc m() (int, string, *bool, error) {\n\t\treturn\n\t}\nwill turn into\n\tfunc m() (int, string, *bool, error) {\n\t\treturn 0, \"\", nil, nil\n\t}\n\nThis functionality is similar to https://github.com/sqs/goreturns.\n", | |
"default": true | |
}, | |
"fillstruct": { | |
"type": "boolean", | |
"markdownDescription": "note incomplete struct initializations\n\nThis analyzer provides diagnostics for any struct literals that do not have\nany fields initialized. Because the suggested fix for this analysis is\nexpensive to compute, callers should compute it separately, using the\nSuggestedFix function below.\n", | |
"default": true | |
}, | |
"httpresponse": { | |
"type": "boolean", | |
"markdownDescription": "check for mistakes using HTTP responses\n\nA common mistake when using the net/http package is to defer a function\ncall to close the http.Response Body before checking the error that\ndetermines whether the response is valid:\n\n\tresp, err := http.Head(url)\n\tdefer resp.Body.Close()\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\t// (defer statement belongs here)\n\nThis checker helps uncover latent nil dereference bugs by reporting a\ndiagnostic for such mistakes.", | |
"default": true | |
}, | |
"ifaceassert": { | |
"type": "boolean", | |
"markdownDescription": "detect impossible interface-to-interface type assertions\n\nThis checker flags type assertions v.(T) and corresponding type-switch cases\nin which the static type V of v is an interface that cannot possibly implement\nthe target interface T. This occurs when V and T contain methods with the same\nname but different signatures. Example:\n\n\tvar v interface {\n\t\tRead()\n\t}\n\t_ = v.(io.Reader)\n\nThe Read method in v has a different signature than the Read method in\nio.Reader, so this assertion cannot succeed.\n", | |
"default": true | |
}, | |
"loopclosure": { | |
"type": "boolean", | |
"markdownDescription": "check references to loop variables from within nested functions\n\nThis analyzer checks for references to loop variables from within a\nfunction literal inside the loop body. It checks only instances where\nthe function literal is called in a defer or go statement that is the\nlast statement in the loop body, as otherwise we would need whole\nprogram analysis.\n\nFor example:\n\n\tfor i, v := range s {\n\t\tgo func() {\n\t\t\tprintln(i, v) // not what you might expect\n\t\t}()\n\t}\n\nSee: https://golang.org/doc/go_faq.html#closures_and_goroutines", | |
"default": true | |
}, | |
"lostcancel": { | |
"type": "boolean", | |
"markdownDescription": "check cancel func returned by context.WithCancel is called\n\nThe cancellation function returned by context.WithCancel, WithTimeout,\nand WithDeadline must be called or the new context will remain live\nuntil its parent context is cancelled.\n(The background context is never cancelled.)", | |
"default": true | |
}, | |
"nilfunc": { | |
"type": "boolean", | |
"markdownDescription": "check for useless comparisons between functions and nil\n\nA useless comparison is one like f == nil as opposed to f() == nil.", | |
"default": true | |
}, | |
"nilness": { | |
"type": "boolean", | |
"markdownDescription": "check for redundant or impossible nil comparisons\n\nThe nilness checker inspects the control-flow graph of each function in\na package and reports nil pointer dereferences, degenerate nil\npointers, and panics with nil values. A degenerate comparison is of the form\nx==nil or x!=nil where x is statically known to be nil or non-nil. These are\noften a mistake, especially in control flow related to errors. Panics with nil\nvalues are checked because they are not detectable by\n\n\tif r := recover(); r != nil {\n\nThis check reports conditions such as:\n\n\tif f == nil { // impossible condition (f is a function)\n\t}\n\nand:\n\n\tp := &v\n\t...\n\tif p != nil { // tautological condition\n\t}\n\nand:\n\n\tif p == nil {\n\t\tprint(*p) // nil dereference\n\t}\n\nand:\n\n\tif p == nil {\n\t\tpanic(p)\n\t}\n", | |
"default": false | |
}, | |
"nonewvars": { | |
"type": "boolean", | |
"markdownDescription": "suggested fixes for \"no new vars on left side of :=\"\n\nThis checker provides suggested fixes for type errors of the\ntype \"no new vars on left side of :=\". For example:\n\tz := 1\n\tz := 2\nwill turn into\n\tz := 1\n\tz = 2\n", | |
"default": true | |
}, | |
"noresultvalues": { | |
"type": "boolean", | |
"markdownDescription": "suggested fixes for \"no result values expected\"\n\nThis checker provides suggested fixes for type errors of the\ntype \"no result values expected\". For example:\n\tfunc z() { return nil }\nwill turn into\n\tfunc z() { return }\n", | |
"default": true | |
}, | |
"printf": { | |
"type": "boolean", | |
"markdownDescription": "check consistency of Printf format strings and arguments\n\nThe check applies to known functions (for example, those in package fmt)\nas well as any detected wrappers of known functions.\n\nA function that wants to avail itself of printf checking but is not\nfound by this analyzer's heuristics (for example, due to use of\ndynamic calls) can insert a bogus call:\n\n\tif false {\n\t\t_ = fmt.Sprintf(format, args...) // enable printf checking\n\t}\n\nThe -funcs flag specifies a comma-separated list of names of additional\nknown formatting functions or methods. If the name contains a period,\nit must denote a specific function using one of the following forms:\n\n\tdir/pkg.Function\n\tdir/pkg.Type.Method\n\t(*dir/pkg.Type).Method\n\nOtherwise the name is interpreted as a case-insensitive unqualified\nidentifier such as \"errorf\". Either way, if a listed name ends in f, the\nfunction is assumed to be Printf-like, taking a format string before the\nargument list. Otherwise it is assumed to be Print-like, taking a list\nof arguments with no format string.\n", | |
"default": true | |
}, | |
"shadow": { | |
"type": "boolean", | |
"markdownDescription": "check for possible unintended shadowing of variables\n\nThis analyzer check for shadowed variables.\nA shadowed variable is a variable declared in an inner scope\nwith the same name and type as a variable in an outer scope,\nand where the outer variable is mentioned after the inner one\nis declared.\n\n(This definition can be refined; the module generates too many\nfalse positives and is not yet enabled by default.)\n\nFor example:\n\n\tfunc BadRead(f *os.File, buf []byte) error {\n\t\tvar err error\n\t\tfor {\n\t\t\tn, err := f.Read(buf) // shadows the function variable 'err'\n\t\t\tif err != nil {\n\t\t\t\tbreak // causes return of wrong value\n\t\t\t}\n\t\t\tfoo(buf)\n\t\t}\n\t\treturn err\n\t}\n", | |
"default": false | |
}, | |
"shift": { | |
"type": "boolean", | |
"markdownDescription": "check for shifts that equal or exceed the width of the integer", | |
"default": true | |
}, | |
"simplifycompositelit": { | |
"type": "boolean", | |
"markdownDescription": "check for composite literal simplifications\n\nAn array, slice, or map composite literal of the form:\n\t[]T{T{}, T{}}\nwill be simplified to:\n\t[]T{{}, {}}\n\nThis is one of the simplifications that \"gofmt -s\" applies.", | |
"default": true | |
}, | |
"simplifyrange": { | |
"type": "boolean", | |
"markdownDescription": "check for range statement simplifications\n\nA range of the form:\n\tfor x, _ = range v {...}\nwill be simplified to:\n\tfor x = range v {...}\n\nA range of the form:\n\tfor _ = range v {...}\nwill be simplified to:\n\tfor range v {...}\n\nThis is one of the simplifications that \"gofmt -s\" applies.", | |
"default": true | |
}, | |
"simplifyslice": { | |
"type": "boolean", | |
"markdownDescription": "check for slice simplifications\n\nA slice expression of the form:\n\ts[a:len(s)]\nwill be simplified to:\n\ts[a:]\n\nThis is one of the simplifications that \"gofmt -s\" applies.", | |
"default": true | |
}, | |
"sortslice": { | |
"type": "boolean", | |
"markdownDescription": "check the argument type of sort.Slice\n\nsort.Slice requires an argument of a slice type. Check that\nthe interface{} value passed to sort.Slice is actually a slice.", | |
"default": true | |
}, | |
"stdmethods": { | |
"type": "boolean", | |
"markdownDescription": "check signature of methods of well-known interfaces\n\nSometimes a type may be intended to satisfy an interface but may fail to\ndo so because of a mistake in its method signature.\nFor example, the result of this WriteTo method should be (int64, error),\nnot error, to satisfy io.WriterTo:\n\n\ttype myWriterTo struct{...}\n func (myWriterTo) WriteTo(w io.Writer) error { ... }\n\nThis check ensures that each method whose name matches one of several\nwell-known interface methods from the standard library has the correct\nsignature for that interface.\n\nChecked method names include:\n\tFormat GobEncode GobDecode MarshalJSON MarshalXML\n\tPeek ReadByte ReadFrom ReadRune Scan Seek\n\tUnmarshalJSON UnreadByte UnreadRune WriteByte\n\tWriteTo\n", | |
"default": true | |
}, | |
"stringintconv": { | |
"type": "boolean", | |
"markdownDescription": "check for string(int) conversions\n\nThis checker flags conversions of the form string(x) where x is an integer\n(but not byte or rune) type. Such conversions are discouraged because they\nreturn the UTF-8 representation of the Unicode code point x, and not a decimal\nstring representation of x as one might expect. Furthermore, if x denotes an\ninvalid code point, the conversion cannot be statically rejected.\n\nFor conversions that intend on using the code point, consider replacing them\nwith string(rune(x)). Otherwise, strconv.Itoa and its equivalents return the\nstring representation of the value in the desired base.\n", | |
"default": true | |
}, | |
"structtag": { | |
"type": "boolean", | |
"markdownDescription": "check that struct field tags conform to reflect.StructTag.Get\n\nAlso report certain struct tags (json, xml) used with unexported fields.", | |
"default": true | |
}, | |
"testinggoroutine": { | |
"type": "boolean", | |
"markdownDescription": "report calls to (*testing.T).Fatal from goroutines started by a test.\n\nFunctions that abruptly terminate a test, such as the Fatal, Fatalf, FailNow, and\nSkip{,f,Now} methods of *testing.T, must be called from the test goroutine itself.\nThis checker detects calls to these functions that occur within a goroutine\nstarted by the test. For example:\n\nfunc TestFoo(t *testing.T) {\n go func() {\n t.Fatal(\"oops\") // error: (*T).Fatal called from non-test goroutine\n }()\n}\n", | |
"default": true | |
}, | |
"tests": { | |
"type": "boolean", | |
"markdownDescription": "check for common mistaken usages of tests and examples\n\nThe tests checker walks Test, Benchmark and Example functions checking\nmalformed names, wrong signatures and examples documenting non-existent\nidentifiers.\n\nPlease see the documentation for package testing in golang.org/pkg/testing\nfor the conventions that are enforced for Tests, Benchmarks, and Examples.", | |
"default": true | |
}, | |
"undeclaredname": { | |
"type": "boolean", | |
"markdownDescription": "suggested fixes for \"undeclared name: <>\"\n\nThis checker provides suggested fixes for type errors of the\ntype \"undeclared name: <>\". It will insert a new statement:\n\"<> := \".", | |
"default": true | |
}, | |
"unmarshal": { | |
"type": "boolean", | |
"markdownDescription": "report passing non-pointer or non-interface values to unmarshal\n\nThe unmarshal analysis reports calls to functions such as json.Unmarshal\nin which the argument type is not a pointer or an interface.", | |
"default": true | |
}, | |
"unreachable": { | |
"type": "boolean", | |
"markdownDescription": "check for unreachable code\n\nThe unreachable analyzer finds statements that execution can never reach\nbecause they are preceded by an return statement, a call to panic, an\ninfinite loop, or similar constructs.", | |
"default": true | |
}, | |
"unsafeptr": { | |
"type": "boolean", | |
"markdownDescription": "check for invalid conversions of uintptr to unsafe.Pointer\n\nThe unsafeptr analyzer reports likely incorrect uses of unsafe.Pointer\nto convert integers to pointers. A conversion from uintptr to\nunsafe.Pointer is invalid if it implies that there is a uintptr-typed\nword in memory that holds a pointer value, because that word will be\ninvisible to stack copying and to the garbage collector.", | |
"default": true | |
}, | |
"unusedparams": { | |
"type": "boolean", | |
"markdownDescription": "check for unused parameters of functions\n\nThe unusedparams analyzer checks functions to see if there are\nany parameters that are not being used.\n\nTo reduce false positives it ignores:\n- methods\n- parameters that do not have a name or are underscored\n- functions in test files\n- functions with empty bodies or those with just a return stmt", | |
"default": false | |
}, | |
"unusedresult": { | |
"type": "boolean", | |
"markdownDescription": "check for unused results of calls to some functions\n\nSome functions like fmt.Errorf return a result and have no side effects,\nso it is always a mistake to discard the result. This analyzer reports\ncalls to certain functions in which the result of the call is ignored.\n\nThe set of functions may be controlled using flags.", | |
"default": true | |
}, | |
"unusedwrite": { | |
"type": "boolean", | |
"markdownDescription": "checks for unused writes\n\nThe analyzer reports instances of writes to struct fields and\narrays that are never read. Specifically, when a struct object\nor an array is copied, its elements are copied implicitly by\nthe compiler, and any element write to this copy does nothing\nwith the original object.\n\nFor example:\n\n\ttype T struct { x int }\n\tfunc f(input []T) {\n\t\tfor i, v := range input { // v is a copy\n\t\t\tv.x = i // unused write to field x\n\t\t}\n\t}\n\nAnother example is about non-pointer receiver:\n\n\ttype T struct { x int }\n\tfunc (t T) f() { // t is a copy\n\t\tt.x = i // unused write to field x\n\t}\n", | |
"default": false | |
} | |
}, | |
"ui.diagnostic.annotations": { | |
"type": "object", | |
"markdownDescription": "(Experimental) annotations specifies the various kinds of optimization diagnostics\nthat should be reported by the gc_details command.\n", | |
"scope": "resource", | |
"properties": { | |
"bounds": { | |
"type": "boolean", | |
"markdownDescription": "`\"bounds\"` controls bounds checking diagnostics.\n", | |
"default": true | |
}, | |
"escape": { | |
"type": "boolean", | |
"markdownDescription": "`\"escape\"` controls diagnostics about escape choices.\n", | |
"default": true | |
}, | |
"inline": { | |
"type": "boolean", | |
"markdownDescription": "`\"inline\"` controls diagnostics about inlining choices.\n", | |
"default": true | |
}, | |
"nil": { | |
"type": "boolean", | |
"markdownDescription": "`\"nil\"` controls nil checks.\n", | |
"default": true | |
} | |
} | |
}, | |
"ui.diagnostic.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": "250ms", | |
"scope": "resource" | |
}, | |
"ui.diagnostic.staticcheck": { | |
"type": "boolean", | |
"markdownDescription": "(Experimental) staticcheck enables additional analyses from staticcheck.io.\n", | |
"default": false, | |
"scope": "resource" | |
}, | |
"ui.documentation.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" | |
}, | |
"ui.documentation.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" | |
}, | |
"ui.documentation.linksInHover": { | |
"type": "boolean", | |
"markdownDescription": "linksInHover toggles the presence of links to documentation in hover.\n", | |
"default": true, | |
"scope": "resource" | |
}, | |
"ui.navigation.importShortcut": { | |
"type": "string", | |
"markdownDescription": "importShortcut specifies whether import statements should link to\ndocumentation or go to definitions.\n", | |
"enum": [ | |
"Both", | |
"Definition", | |
"Link" | |
], | |
"markdownEnumDescriptions": [ | |
"", | |
"", | |
"" | |
], | |
"default": "Both", | |
"scope": "resource" | |
}, | |
"ui.navigation.symbolMatcher": { | |
"type": "string", | |
"markdownDescription": "(Advanced) symbolMatcher sets the algorithm that is used when finding workspace symbols.\n", | |
"enum": [ | |
"CaseInsensitive", | |
"CaseSensitive", | |
"Fuzzy" | |
], | |
"markdownEnumDescriptions": [ | |
"", | |
"", | |
"" | |
], | |
"default": "Fuzzy", | |
"scope": "resource" | |
}, | |
"ui.navigation.symbolStyle": { | |
"type": "string", | |
"markdownDescription": "(Advanced) 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", | |
"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": "Dynamic", | |
"scope": "resource" | |
}, | |
"ui.semanticTokens": { | |
"type": "boolean", | |
"markdownDescription": "(Experimental) semanticTokens controls whether the LSP server will send\nsemantic tokens to the client.\n", | |
"default": false, | |
"scope": "resource" | |
}, | |
"verboseOutput": { | |
"type": "boolean", | |
"markdownDescription": "(For Debugging) verboseOutput enables additional debug logging.\n", | |
"default": false, | |
"scope": "resource" | |
} | |
} | |
} | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment