x/tools/gopls: support insertReplaceEdit results in completion items #48769
Labels
FrozenDueToAge
gopls
Issues related to the Go language server, gopls.
help wanted
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Tools
This label describes issues relating to any tools in the x/tools repository.
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.Run
code -v
orcode-insiders -v
to get version of VS Code or VS Code Insiders.7f6ab5485bbc008386c4386d08766667e155244e
x64
Check your installed extensions to get the version of the VS Code Go extension
Describe the bug
editor.suggest.insertMode
setting is set to "insert".editor.suggest.insertMode
is set to "insert", the word under the cursor should remain in-place, as demonstrated in this video.Example
Let's say I was editing the following line, where
✎
represents the current cursor position:I want to change the comparison to lowercase, so I type
strings.
at which time the suggestions dropdown appears. If I selectToLower
, then vscode-go will replace it as follows,where it has replaced
filepath
with the suggestion.But because my VSCode
editor.suggest.insertMode
setting is set to "insert", I would have expected,where the suggestion has been inserted at the original cursor position.
Bonus points
In the above example, if vscode-go could instead wrap the expression at the cursor, as follows, it would result in even greater productivity:
The text was updated successfully, but these errors were encountered: