x/tools/gopls: bad completion insertion after syntax error #32510
Labels
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.
Milestone
In this code
Completing "f" to "foo" ends up inserting "ffoo" instead of "foo". This is because the syntax error on the previous line completely obscures the "f" *ast.Ident, so we don't detect it properly as the prefix. Perhaps if we are in a BadExpr we could "manually" detect the surrounding identifier so completion still works to some degree?
/cc @stamblerre
The text was updated successfully, but these errors were encountered: