diff --git a/internal/lsp/source/diagnostics.go b/internal/lsp/source/diagnostics.go index 7a275f2953..2e5306b177 100644 --- a/internal/lsp/source/diagnostics.go +++ b/internal/lsp/source/diagnostics.go @@ -72,7 +72,7 @@ func Diagnostics(ctx context.Context, view View, f GoFile, disabledAnalyses map[ if err != nil { return nil, "", err } - cph := NarrowestCheckPackageHandle(cphs) + cph := WidestCheckPackageHandle(cphs) pkg, err := cph.Check(ctx) if err != nil { log.Error(ctx, "no package for file", err)