-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Open
Labels
ThinkingToolsThis 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
This issue tracks all of the workarounds implemented in gopls to handle places where go/parser loses information. Most of this code can be found in golang.org/x/tools/internal/lsp/cache/parse.go and was written by @muirdm.
The current list of workarounds includes handling:
- Missing curly braces in
ifstatements (if foo->if foo {}) - Missing selectors (
x.->x._) - Partial identifiers that are keywords (
foo.var->foo._) - Missing conditional statements in
ifstatements with initialization statements (if i := 0) - Unexpected array types (
[]int->[]int{}) - Incomplete
goordeferstatements (go foo->go foo()). - Dangling selectors in
goordeferstatements
go foo.
y := 1becomes
go foo._
y := 1Metadata
Metadata
Assignees
Labels
ThinkingToolsThis 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.