x/tools/gopls: formatting on save inserts an unnecessary package clause #38412
When using with VS Code
gopls version 0.4.0
how to repro:
$ cat main.go
Open the it from the code, and save the file again (command+s). That triggers text edit like:
Attached the gopls log. code.log
File save was requested after the message 7.
Note: when triggering the formatting using "Format Document" (e.g. right click -> "Format Document") the formatting works as expected.
The text was updated successfully, but these errors were encountered: