Sourced from golang.org/x/tools's releases.
gopls/v0.4.0
- Improved support for working with modules (
@ridersofrohan). A detailed walk-through of the new features can be found here. A quick summary:
- Use the
-modfileflag to suggest which modules should be added/removed from thego.modfile, rather than editing it automatically.- Suggest dependency upgrades in-editor and provide additional language features, such as formatting, for the
go.modfile.- Inverse implementations (
@muirdm). "Go to implementations" on a concrete type will show the interfaces it implements.- Completion improvements (
@muirdm). Specifically, improved completion for keywords. Also, offerif err != nil { return err }as a completion item.- Jumping to definition on an import statement returns all files as definition locations (
@danishprakash).- Support for running
go generatethrough the editor, via a code lens (@marwan-at-work).- Command-line support for workspace symbols (
@daisuzu).Opt-in:
- Code actions suggesting
gofmt -s-style simplifications (@ridersofrohan). To get these on-save, add the following setting:"[go]": { "editor.codeActionsOnSave": { "source.fixAll": true, } }
- Code actions suggesting fixes for type errors, such as missing return values (goreturns-style), undeclared names, unused parameters, and assignment statements that should be converted from
:=to=(@ridersofrohan). Add the following to your gopls settings to opt-in to these analyzers. In the future, they will be on by default and high-confidence suggested fixes may be applied on save. See additional documentation on analyzers here."gopls": { "analyses": { "fillreturns": true, "undeclaredname": true, "unusedparams": true, "nonewvars": true, } }
- Further improvements in the support for multiple concurrent clients (
@findleyr). See #34111 for all details.For a complete list of the issues resolved, see the gopls/v0.4.0 milestone.
gopls/v0.3.4
- golang.org/cl/222979: fix for a nil pointer exception in completion (
@muirdm).- golang.org/cl/222980: fix a concurrent map write and iteration (
@ridersofrohan).gopls/v0.3.3
- Support for workspace symbols. (
@daisuzu)- Various completion improvements, including fixes for completion in code that doesn't parse. (
@muirdm)- Limit diagnostic concurrency, preventing huge spikes in memory usage that some users encountered. (
@heschik)- Improved handling for URIs containing escaped characters. (
@heschik)- Module versions from "go list" in pkg.go.dev links. (
@ridersofrohan)
... (truncated)
aee3994 gopls/internal/lsp/fake: in (*Workdir).RenameFile, fall back to read + writefe60148 go.mod: update golang.org/x dependenciesc9ea9a7 gopls/internal/regtest: add a test for the case when the renaming package's p...bf5db81 gopls/internal/lsp/cache: improve ad-hoc warning for nested modulesaa9f4b2 go/analysis: document that facts are gob encoded in one gulpbdcd082 internal/gcimporter: skip tests earlier when 'go build' is not available2ad6325 gopls/internal/lsp/cache: expand ImportPath!=PackagePath comment52c7b88 gopls/internal/robustio: only define ERROR_SHARING_VIOLATION on Windows4f69bf3 gopls/internal/lsp/cache: narrow reloadOrphanedFiles to open files6002d6e gopls/internal/regtest/misc: test Implementations + vendor