emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/eglot 8d4c2c3 13/24: Demote unvisited diagnostics loggi


From: João Távora
Subject: [elpa] externals/eglot 8d4c2c3 13/24: Demote unvisited diagnostics logging to debug level
Date: Sat, 26 May 2018 14:31:15 -0400 (EDT)

branch: externals/eglot
commit 8d4c2c33985d95f5c7060f66f3b9ef41e2941eb8
Author: Josh Elsasser <address@hidden>
Commit: Josh Elsasser <address@hidden>

    Demote unvisited diagnostics logging to debug level
    
    The PublishDiagnostic spec (LSP Specification, 3.0) does not
    strictly forbid the server from publishing diagnostics before
    a file has been visited.
    
    * eglot.el (eglot--server-textDocument/publishDiagnostics): Log
    the "received diagnostics for unvisited file" warning as debug
    to avoid spamming users of compliant language servers.
---
 eglot.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eglot.el b/eglot.el
index 92f16c0..467e524 100644
--- a/eglot.el
+++ b/eglot.el
@@ -1038,7 +1038,7 @@ function with the server still running."
   "Unreported diagnostics for this buffer.")
 
 (cl-defmethod eglot-handle-notification
-  (_server (_method (eql :textDocument/publishDiagnostics)) &key uri 
diagnostics)
+  (server (_method (eql :textDocument/publishDiagnostics)) &key uri 
diagnostics)
   "Handle notification publishDiagnostics"
   (if-let ((buffer (find-buffer-visiting (eglot--uri-to-path uri))))
       (with-current-buffer buffer
@@ -1060,7 +1060,7 @@ function with the server still running."
                         (setq eglot--unreported-diagnostics nil))
                        (t
                         (setq eglot--unreported-diagnostics diags)))))
-    (eglot--warn "Diagnostics received for unvisited %s" uri)))
+    (eglot--debug server "Diagnostics received for unvisited %s" uri)))
 
 (cl-defun eglot--register-unregister (server jsonrpc-id things how)
   "Helper for `registerCapability'.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]