go
go copied to clipboard
x/tools/gopls: fillstruct heuristic fails to look beneath current point, or in other files
The fillstruct code action looks for declarations in the current file, before the current point, as candidates for the initializers of each missing field. That seems doubly arbitrary: package-level declarations in other files should be candidates too, as should declarations beneath the current point.