Example #1
0
        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();
        }
Example #2
0
        private void OnPublishDiagnostics(object sender, PublishDiagnosticsEventArgs e)
        {
            var parameters = new PublishDiagnosticsParams {
                uri         = e.uri,
                diagnostics = e.diagnostics.ToArray()
            };

            _rpc.InvokeAsync("textDocument/publishDiagnostics", parameters);
        }
Example #3
0
 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);