github golang/tools gopls/v0.5.1

latest releases: gopls/v0.17.0-pre.2, gopls/v0.17.0-pre.1, v0.27.0...
4 years ago

gopls/v0.5.1

Features

Completion speed improvements

https://golang.org/cl/257240 eliminated some duplicate type-checking in completions (and some other features), halving latency in most cases.

Improvements to symbol rankings

From https://golang.org/cl/254037:

Downrank symbols if they are:

  1. Unexported and outside of the workspace. Since one wouldn't jump to these symbols to e.g. view documentation, they are less relevant.
  2. Fields and interface methods. Usually one would jump to the type name, so having fields highly ranked can be noisy.

Warnings for excluded files

You will now see diagnostics if you open a file that is excluded from the current build, likely by build tags. This should aid in understanding cases when gopls fails to work on a certain file.

Better error reporting when code lenses fail

A pop-up with an error will appear if a code lens fails to run its command.

Experimental

Multi-module workspace support

The proposal described in golang/go#32394 is partially implemented, but off by default.
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 go mod tidy diagnostics, are not yet implemented.

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

Fixes

Toggle GC Details on Windows

There was a bug in the new experimental GC details code lens on Windows machines (golang/go#41614). We added a work-around to fix the issue.

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

Documentation

The documentation for settings is now automatically generated so it will stay up-to-date. Documentation was also updated for working with Neovim and for working on the Go project itself.

Thank you to our contributors!

@heschik @findleyr @dandua98 @pjweinb @ainar-g

Don't miss a new tools release

NewReleases is sending notifications on new releases.