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

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

[elpa] 1.2 ba9877f 048/101: Close #86: Handle case when :textDocumentSyn


From: Christian Johansson
Subject: [elpa] 1.2 ba9877f 048/101: Close #86: Handle case when :textDocumentSync isn't a number
Date: Thu, 29 Apr 2021 15:08:58 -0400 (EDT)

tag: 1.2
commit ba9877f24b9798adce24f2a31b700d5e726547da
Author: João Távora <joaotavora@gmail.com>
Commit: João Távora <joaotavora@gmail.com>

    Close #86: Handle case when :textDocumentSync isn't a number
    
    Also closes #87.
    
    * eglot.el (eglot--signal-textDocument/didChange): Grab :change
    from :textDocumentSync server capability.
---
 eglot.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/eglot.el b/eglot.el
index 7587164..31cce81 100644
--- a/eglot.el
+++ b/eglot.el
@@ -1191,7 +1191,9 @@ When called interactively, use the currently active 
server"
   "Send textDocument/didChange to server."
   (when eglot--recent-changes
     (let* ((server (eglot--current-server-or-lose))
-           (sync-kind (eglot--server-capable :textDocumentSync))
+           (sync-capability (eglot--server-capable :textDocumentSync))
+           (sync-kind (if (numberp sync-capability) sync-capability
+                        (plist-get sync-capability :change)))
            (full-sync-p (or (eq sync-kind 1)
                             (eq :emacs-messup eglot--recent-changes))))
       (jsonrpc-notify



reply via email to

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