tag: 1.2
commit 7342d8833cefa88ffe0d4e34cdfed38c70c4a4b1
Author: João Távora <[email protected]>
Commit: João Távora <[email protected]>

    Close #115: Don't block kill-buffer-hook if server somehow hangs
    
    * eglot.el (eglot--signal-textDocument/didClose): Use
    with-demoted-errors.
---
 eglot.el | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/eglot.el b/eglot.el
index 1a70254..959cc5d 100644
--- a/eglot.el
+++ b/eglot.el
@@ -1223,9 +1223,11 @@ When called interactively, use the currently active 
server"
 
 (defun eglot--signal-textDocument/didClose ()
   "Send textDocument/didClose to server."
-  (jsonrpc-notify
-   (eglot--current-server-or-lose)
-   :textDocument/didClose `(:textDocument ,(eglot--TextDocumentIdentifier))))
+  (with-demoted-errors
+      "[eglot] error sending textDocument/didClose: %s"
+    (jsonrpc-notify
+     (eglot--current-server-or-lose)
+     :textDocument/didClose `(:textDocument 
,(eglot--TextDocumentIdentifier)))))
 
 (defun eglot--signal-textDocument/willSave ()
   "Send textDocument/willSave to server."

Reply via email to