| --- |
| title: "Gopls release v0.24.0 (expected Sep 2026)" |
| --- |
| |
| In this release: |
| |
| - [commits](https://go.googlesource.com/tools/+log/refs/heads/gopls-release-branch.0.23..refs/heads/gopls-release-branch.0.24) |
| - [issues closed](https://github.com/golang/go/milestone/440?closed=1) |
| |
| Key features are described below. |
| |
| Gopls now supports [v3.18](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.18/specification) of the Language Server Protocol. |
| |
| <!-- TODO: 1-line overview of release --> |
| |
| ## Configuration changes |
| |
| The `memoryLimit` setting allows clients to set a soft memory limit on |
| the gopls process using |
| [runtime/debug.SetMemoryLimit](https://pkg.go.dev/runtime/debug#SetMemoryLimit). |
| This feature is experimental. It may permit users to trade more CPU |
| for lower steady state memory usage; but it may cause GC thrashing if |
| set too low. |
| |
| The gopls server now enforces |
| [`SemanticTokensClientCapabilities`](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.18/specification/#semanticTokensClientCapabilities) |
| fields: `TokenTypes` and `TokenModifiers`. The semantic token types and |
| modifiers gopls returns are now limited to what these lists contain, so |
| it's important that clients fully list their semantic token |
| capabilities. The gopls UI settings |
| [`semanticTokenTypes`](https://go.dev/gopls/settings#semantictokentypes-mapstringbool) |
| and |
| [`semanticTokenModifiers`](https://go.dev/gopls/settings#semantictokenmodifiers-mapstringbool) |
| can still be used by users to further restrict these lists. |
| |
| ## Web-based features |
| |
| ## Editing features |
| |
| Gopls now supports the Hover request in Go assembly files: hovering |
| over a symbol reports the signature and doc comment of its Go |
| declaration. |
| |
| Gopls now supports the `textDocument/documentHighlight` request in Go |
| assembly files: all occurrences of the symbol, label, or machine |
| register under the cursor are highlighted within the enclosing TEXT |
| function, with definitions classified as writes and references as |
| reads. |
| |
| ## Analysis features |
| |
| <!-- TODO Gopls is now using staticcheck [v0.8.0-rc1](https://github.com/dominikh/go-tools/releases/tag/2026.2rc1). --> |
| |
| ### `ptrtoerror` analyzer |
| |
| This new analyzer reports inconsistent use of a named type `E` and its |
| pointer type `*E` as an error. |
| <!-- #80159 --> |
| |
| ### `slicesclip` modernizer |
| |
| The new `slicesclip` modernizer suggests replacing a full slice |
| expression of the form `x[:len(x):len(x)]`, which clips the capacity |
| of a slice to its length, with the simpler and more readable |
| `slices.Clip(x)`, added in Go 1.21. |
| <!-- #80438 --> |
| |
| ## Code transformation features |