private async Task CloseDocumentAndHideDiagnosticsAsync(TextDocumentIdentifier documentId)
 {
     try {
         await documents.CloseDocumentAsync(documentId);
     } catch (Exception e) {
         logger.LogError(e, "error while closing the document");
     }
     diagnosticPublisher.HideDiagnostics(documentId);
 }