What version of Go, VS Code & VS Code Go extension are you using?
Version Information
- Run
go version to get version of Go from the VS Code integrated terminal.
- go version go1.26.2 windows/amd64
- Run
gopls -v version to get version of Gopls from the VS Code integrated terminal.
- golang.org/x/tools/gopls v0.21.1
- Run
code -v or code-insiders -v to get version of VS Code or VS Code Insiders.
- Version: 1.118.1 (system setup)
- Check your installed extensions to get the version of the VS Code Go extension
Share the Go related settings you have added/edited
Describe the bug
When autocompleting code for parameters to functions reveiving functions vs code fails to figure out parameters.
For example
var s []int
slices.SortFunc(s, func() int {})
So instead of figuring out that func() int should accept parameters a,b int vs code fails to do so.
Expected to have autocomplete of
var s []int
slices.SortFunc(s, func(a, b, int) int {})
PS: it feels that at some stage long ago it was working and then was broken maybe half year ago or so.
What version of Go, VS Code & VS Code Go extension are you using?
Version Information
go versionto get version of Go from the VS Code integrated terminal.gopls -v versionto get version of Gopls from the VS Code integrated terminal.code -vorcode-insiders -vto get version of VS Code or VS Code Insiders.Share the Go related settings you have added/edited
Describe the bug
When autocompleting code for parameters to functions reveiving functions vs code fails to figure out parameters.
For example
So instead of figuring out that func() int should accept parameters a,b int vs code fails to do so.
Expected to have autocomplete of
PS: it feels that at some stage long ago it was working and then was broken maybe half year ago or so.