public override async Task <Unit> Handle(DidChangeTextDocumentParams notification, CancellationToken cancellationToken) { _logger.LogTrace("received change notification {DocumentUri}", notification.TextDocument.Uri); var document = await _documents.UpdateDocumentAsync(notification, cancellationToken); if (document != null) { _diagnosticPublisher.PublishDiagnostics(document, cancellationToken); } return(Unit.Value); }
public override Task <Unit> Handle(DidChangeTextDocumentParams notification, CancellationToken cancellationToken) { logger.LogTrace("received change notification {DocumentUri}", notification.TextDocument.Uri); HandleUpdateAndPublishDiagnosticsAsync(documents.UpdateDocumentAsync(notification)); return(Unit.Task); }