goimports v0.5.2 Release Notes

Release Date: 2020-10-28 // over 3 years ago
  • gopls/v0.5.2

    ๐Ÿ”‹ Features

    ๐Ÿš€ No new features have been added in this release.

    Experimental

    ๐Ÿ‘ 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.

    ๐Ÿ›  Fixes

    ๐Ÿ›  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