semanticTokens controls whether the LSP server will send semantic tokens to the client. This setting is experimental and may be deleted. memoryMode controls the tradeoff gopls makes between memory usage and correctness. matcher sets the algorithm that is used when calculating completion candidates. This is an advanced setting and should not be configured by most gopls users. Local is the equivalent of the goimports -local flag, which puts imports beginning with this string after third-party packages. LinksInHover toggles the presence of links to documentation in hover. LinkTarget controls where documentation links go. ImportShortcut specifies whether import statements should link to documentation or go to definitions. HoverKind controls the information that appears in the hover text. Gofumpt indicates if we should run gofumpt formatting. experimentalWorkspaceModule opts a user into the experimental support for multi-module workspaces. ![]() experimentalWatchedFileDelay controls the amount of time that gopls waits for additional workspace/didChangeWatchedFiles notifications to arrive, before processing all such notifications in a single batch. experimentalUseInvalidMetadata enables gopls to fall back on outdated package metadata to provide editor features if the go command fails to load packages for some reason (like an invalid go.mod file). experimentalPostfixCompletions enables artifical method snippets such as "someSlice.sort!". experimentalPackageCacheKey controls whether to use a coarser cache key for package type information to increase cache hits. expandWorkspaceToModule instructs gopls to adjust the scope of the workspace to find the best available module root. diagnosticsDelay controls the amount of time that gopls waits after the most recent file modification before computing deep diagnostics.ĭirectoryFilters can be used to exclude unwanted directories from the workspace.Įnv adds environment variables to external commands run by gopls, most notably go list. completionBudget is the soft latency goal for completion requests. This setting is for debugging purposes only. annotations specifies the various kinds of optimization diagnostics that should be reported by the gc_details command.īuildFlags is the set of flags passed on to the build system when invoked.Ĭodelenses overrides the enabled/disabled state of code lenses. allowModfileModifications disables -mod=readonly, allowing imports from out-of-scope modules.Īnalyses specify analyses that the user would like to enable or disable. allowImplicitNetworkAccess disables GOPROXY=off, allowing implicit module downloads rather than requiring user action. ![]() Configuration options KeyĮXPERIMENTAL Check for gopls updates on start.ĭisable completion feature (Change requires :CocRestart)ĭisable handle diagnostics (Change requires :CocRestart)ĭisable workspaceFolders feature (Change requires :CocRestart)Īrguments passed to gopls (Change requires :CocRestart)ĮNV passed to gopls (Change requires :CocRestart) Snippets are imported from golang/vscode-go and require coc-snippets to be installed. add yaml autocmd FileType go nmap gtx :CocCommand go. add json autocmd FileType go nmap gty :CocCommand go. Generate unit tests for exported functions in fileĪutocmd FileType go nmap gtj :CocCommand go. Remove tags from struct field in current line Remove all tags from struct fields in current line Additional to commands provided by gopls, this extensions provides these commands: Key
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |