golang / vscode-go

Go extension for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=golang.Go
Other
3.87k stars 750 forks source link

Signature help tooltip shows up when accepting a suggestion when "editor.parameterHints.enabled" is false #3071

Closed hyangah closed 10 months ago

hyangah commented 10 months ago

The language server middleware injects a follow up command for each completion item which triggers parameter hint if editor.parameterHints is set.

https://github.com/golang/vscode-go/blob/4316a961ee8a5ad7c9c664adca9b26318bf14ead/src/language/goLanguageServer.ts#L659

This is not a boolean setting (the bug was introduced in https://go-review.googlesource.com/c/vscode-go/+/382234 sorry). As a result, this is always truthy. We should use editor.parameterHints.enabled instead.

gopherbot commented 10 months ago

Change https://go.dev/cl/546155 mentions this issue: src/language/goLanguageServer: fix parameter hint setting query