x/tools/cmd/gopls: completions do not work for unpersisted imports #31338
Labels
FrozenDueToAge
gopls
Issues related to the Go language server, gopls.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Considering the following
govim
testscript
in which I attempt a completion in a file that does not currently have the relevant import (of"fmt"
) persisted to disk:As with all
govim
buffers, every initial buffer read is sent togopls
as aDidOpen
notification; every subsequent change is sent as aDidChange
.What did you expect to see?
The completion to succeed and hence the test to pass.
What did you see instead?
cc @stamblerre @ianthehat
The text was updated successfully, but these errors were encountered: