diff --git a/internal/lsp/diagnostics.go b/internal/lsp/diagnostics.go index a479e679..aa9fa0fc 100644 --- a/internal/lsp/diagnostics.go +++ b/internal/lsp/diagnostics.go @@ -22,11 +22,13 @@ func (s *Server) cacheAndDiagnose(ctx context.Context, uri span.URI, content str go func() { ctx := view.BackgroundContext() if ctx.Err() != nil { + s.log.Errorf(ctx, "canceling diagnostics for %s: %v", uri, ctx.Err()) return } reports, err := source.Diagnostics(ctx, view, uri) if err != nil { - return // handle error? + s.log.Errorf(ctx, "failed to compute diagnostics for %s: %v", uri, err) + return } s.undeliveredMu.Lock()