Release gopls/v0.5.2 · golang/tools

By golang

No new features have been added in this release.


We have added support for a new allExperiments setting. By enabling this flag, you will enable all experimental features that we intend to roll out slowly. You can still disable individual settings (full list of settings). In-progress features, such as multi-module workspaces (below), will remain disabled until they are ready for users.

Improved CPU utilization: experimentalDiagnosticsDelay

experimentalDiagnosticsDelay controls the amount of time that gopls waits after the most recent file modification before computing deep diagnostics. Simple diagnostics (parsing and type-checking) are always run immediately on recently modified packages.

Enable it by setting it to a duration string, for example "200ms". With allExperiments, this is set to "200ms".

Improved memory usage for workspaces with multiple folders: experimentalPackageCacheKey

experimentalPackageCacheKey controls whether to use a coarser cache key for package type information. If you use the gopls daemon, this may reduce your total memory usage.

Enable it by setting it to true. With allExperiments, this is set to true.

Multi-module workspace support

The proposal described in golang/go#32394 is still in development and off by default. See our progress by tracking the multi-module workspace milestone and project.

Enable multi-module workspace support by adding the following to your settings:

"gopls": { "experimentalWorkspaceModule": true,

With this setting, you will be able to open a directory that contains multiple modules. Most features will work across modules, but some, such as goimports, will not work as expected.

Give this a try if you're interested in this new feature, but please note that it is still very experimental.

Support for semantic tokens

This is a new, unreleased LSP feature that provides additional syntax highlighting. In advance of this new LSP version, we have added preliminary support for this feature. Enable it by setting:

"gopls": { "semanticTokens": true,

It will not be enabled with allExperiments.


A list of all issues fixed can be found in the gopls/v0.5.2 milestone.

For editor clients

All command names have been given gopls. prefixes, to avoid conflicting with commands registered by other language servers.
This should not have affected any clients.

Thank you to our contributors!

@heschik @findleyr @dandua98 @pjweinb @leitzler @kortschak @bcmills @hyangah @jadekler