Closed as not planned
Description
This issue is extracted from #69980, where the request is to include undeclared (but used) names in lexical completion results.
We could do this by extracting such names from type errors (see also gopls/internal/analysis/undeclaredname
).
I think we're much less likely to implement this feature than we are to offer the fix in #69980. Presumably it's much more important to help users fix their incorrect syntax, than it is to operate as though the syntax were valid. Putting in the unplanned milestone.
func _() {
myvariable = 2
foo(myv_) <-- offer 'myvariable' in lexical completion results here
}