-
Notifications
You must be signed in to change notification settings - Fork 18k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
x/tools/gopls: suppress signature help inside string literal #43397
Comments
Happy to submit a CL for this with some guidance - the gopls codebase has changed a bit from when I last looked. Do we really think this is a gopls issue and not an editor issue though? gopls is returning the correct signature help when asked. I would think it should be the editor's responsibility to ensure a nice user experience and not ask gopls for help when it is not desired. |
The issue is that the editor doesn't parse the file when |
Can I pick this up? I'm going under the impression that this is a bug and that nobody wants this. |
Currently the `SignatureHelp` function provides signature help even when the requested range lies within a string literal. Let's suppress this behavior and return an error when someone requests signature help from within a string literal. Fixes golang/go#43397 Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Change https://golang.org/cl/337170 mentions this issue: |
Thanks, @KarthikNayak!! |
What version of Go, VS Code & VS Code Go extension are you using?
go version
to get version of Gogopls -v version
to get version of Gopls if you are using the language server.code -v
orcode-insiders -v
to get version of VS Code or VS Code InsidersShare the Go related settings you have added/edited
Describe the bug
I am seeing the signature help popup when I press the
,
key inside a string literal. This is distracting, as I'm not needing signature help and the popup is obstructing the code I need to see while completing a method call.In this case, the signature help is constantly obstructing my view of the code when writing SQL inside a string literal. It occurs both inside
"
and backtick terminated strings, and seems to occur both whengopls.usePlaceholders
is true and false.I would expect that just like autocomplete, we suppress signature help inside the string literal, and that I don't see the signature help window again until I complete the string literal and then press
,
.Steps to reproduce the behavior:
(
character observe the signature help dialog present itself. This is normal and expected as it is now time to fill in the arguments."...
,
before closing the string with"
.,
is entered. This is unexpected.Screenshots or recordings
The text was updated successfully, but these errors were encountered: