x/tools/gopls: support InsertReplaceEdit completion items #61215
Labels
gopls/completion
Issues related to auto-completion in gopls.
gopls
Issues related to the Go language server, gopls.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
What version of Go, VS Code & VS Code Go extension are you using?
Version Information
go version
to get version of Go from the VS Code integrated terminal.gopls -v version
to get version of Gopls from the VS Code integrated terminal.code -v
orcode-insiders -v
to get version of VS Code or VS Code Insiders.Go: Locate Configured Go Tools
command.gotests: D:\Projects\Code\Go\bin\gotests.exe (version: v1.6.0 built with go: go1.20.1)
gomodifytags: D:\Projects\Code\Go\bin\gomodifytags.exe (version: v1.16.0 built with go: go1.20.1)
impl: D:\Projects\Code\Go\bin\impl.exe (version: v1.1.0 built with go: go1.20.1)
goplay: D:\Projects\Code\Go\bin\goplay.exe (version: v1.0.0 built with go: go1.20.1)
dlv: D:\Projects\Code\Go\bin\dlv.exe (version: v1.20.1 built with go: go1.20.1)
staticcheck: D:\Projects\Code\Go\bin\staticcheck.exe (version: v0.4.2 built with go: go1.20.1)
gopls: D:\Projects\Code\Go\bin\gopls.exe (version: v0.12.2 built with go: go1.20.1)
Share the Go related settings you have added/edited
Describe the bug
VsCode setting
"editor.suggest.insertMode": "insert"
has no effect in Go code.Steps to reproduce the behavior:
fmt.Println(Sword{Blade: Blade{Length: 0.8, Sharpness: 0.7}})
, place cursor in front of the first occurrence ofBlade
.Hi
to trigger autocompletion.Hilt
from the suggestions.Blade
is replaced byHilt
yieldingfmt.Println(Sword{Hilt: Blade{Length: 0.8, Sharpness: 0.7}})
instead offmt.Println(Sword{HiltBlade: Blade{Length: 0.8, Sharpness: 0.7}})
.The text was updated successfully, but these errors were encountered: