-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Open
Labels
BugReportIssues describing a possible bug in the Go implementation.Issues describing a possible bug in the Go implementation.ToolsThis label describes issues relating to any tools in the x/tools repository.This label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.Issues related to the Go language server, gopls.
Milestone
Description
gopls version: gopls@974c859
(master
)
CL https://go.dev/cl/694295 changed the folding logic and reintroduced behavior reported and fixed in #70467:
Lack of the closing parenthesis makes code editing more difficult. For example, users have to unfold
fmt.Println
to add more code. This behavior is particularly frustrating when working with calls liket.Run
.
Also, there's a conflict between gopls' and VSCode's logic that makes this issue extremely annoying.
1.mp4
Code snippet from the video
func _() {
slice := []int{1, 2, 3}
sort.Slice(slice, func(i, j int) bool {
a, b := slice[i], slice[j]
return a < b
})
sort.Slice(
slice,
func(i, j int) bool {
return slice[i] < slice[j]
},
)
fmt.Println(
1, 2, 3,
4,
)
}
func TestA(t *testing.T) {
t.Run("add", func(t *testing.T) {
_ = 1 + 1
})
t.Run("sub", func(t *testing.T) {
_ = 1 - 1
})
}
func TestB(t *testing.T) {
_ = 123
}
Metadata
Metadata
Assignees
Labels
BugReportIssues describing a possible bug in the Go implementation.Issues describing a possible bug in the Go implementation.ToolsThis label describes issues relating to any tools in the x/tools repository.This label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.Issues related to the Go language server, gopls.