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:
- Unexported and outside of the workspace. Since one wouldn't jump to these symbols to e.g. view documentation, they are less relevant.
- 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.