-
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: autocompletion overriding content #42634
Comments
@szmcdull What is the gopls version? ( |
@hyangah golang.org/x/tools/gopls@v0.5.3 h1:C8QSrqjqaVzlVoHL1R9yWbROoOApRgI8gN1G+cHlPuw= |
Can you please provide a small repro case to illustrate the problem? |
Then set cursor to the start the line 2, then enter "pr", ctrl+space, choose "print" from the candidate list and press ENTER or TAB. Now you can see "word" is disappeared. |
Thanks @szmcdull - I could reproduce the issue even after excluding the extension's snippet by disabling it. Here is the gopls trace - that is suggesting a textEdit for complete word replacement. Transferring to the gopls issue tracker.
I will transfer this to the gopls repo. |
I think this is a dupe of #40871. |
Duplicate of #40871 |
What version of Go, VS Code & VS Code Go extension are you using?
Run
go version
to get version of GoRun
code -v
orcode-insiders -v
to get version of VS Code or VS Code InsidersCheck your installed extensions to get the version of the VS Code Go extension
Run
go env
to get the go development environment detailsShare the Go related settings you have added/edited
Run
Preferences: Open Settings (JSON)
command to open your settings.json file.Share all the settings with the
go.
or["go"]
orgopls
prefixes.Describe the bug
When accepting auto-completion, the suggestion is replaced over the current word (including the part after the cursor).
Other languages such as python or javascript will not replace the part after the cursor.
The text was updated successfully, but these errors were encountered: