private void OnPublishDiagnostics(object sender, PublishDiagnosticsEventArgs e) { var parameters = new PublishDiagnosticsParams { uri = e.uri.ToString(), diagnostics = e.diagnostics.ToArray() }; _rpc.NotifyWithParameterObjectAsync("textDocument/publishDiagnostics", parameters).DoNotWait(); }
private void OnPublishDiagnostics(object sender, PublishDiagnosticsEventArgs e) { var parameters = new PublishDiagnosticsParams { uri = e.uri, diagnostics = e.diagnostics.ToArray() }; _rpc.InvokeAsync("textDocument/publishDiagnostics", parameters); }
private void OnPublishDiagnostics(object sender, PublishDiagnosticsEventArgs e) { lock (_lock) { // If list is empty (errors got fixed), publish immediately, // otherwise throttle so user does not get spurious squiggles // while typing normally. var diags = e.diagnostics.ToArray(); _pendingDiagnostic[e.uri] = diags; if (diags.Length == 0) { PublishPendingDiagnostics(); } } }
public void PublishDiagnostics(PublishDiagnosticsEventArgs e) => OnPublishDiagnostics?.Invoke(this, e);