You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
package main
typeFoostruct {
barBar
}
typeBarstringconstAAABar="aaa"constBBBBar="bbb"funcmain() {
f:=Foo{
bar: |// cursor here before completion
}
}
What did you see happen?
Selecting a completion target at the cursor's location will insert the completion, but leave it to the user to complete the line with a trailing comma.
funcmain() {
f:=Foo{
bar: AAA|// cursor after completion
}
}
What did you expect to see?
gopls should also insert the trailing comma at this point.
funcmain() {
f:=Foo{
bar: AAA,|// cursor after completion
}
}
Note that if the field name was inserted by gopls completion, it would have added a colon and trailing comma, leaving the cursor in between.
funcmain() {
f:=Foo{
bar: |, // cursor after completion
}
}
Editor and settings
No response
Logs
No response
The text was updated successfully, but these errors were encountered:
seankhliao
added
gopls
Issues related to the Go language server, gopls.
Tools
This label describes issues relating to any tools in the x/tools repository.
labels
May 7, 2024
gopls version
go env
What did you do?
What did you see happen?
Selecting a completion target at the cursor's location will insert the completion, but leave it to the user to complete the line with a trailing comma.
What did you expect to see?
gopls should also insert the trailing comma at this point.
Note that if the field name was inserted by gopls completion, it would have added a colon and trailing comma, leaving the cursor in between.
Editor and settings
No response
Logs
No response
The text was updated successfully, but these errors were encountered: