tag: 1.2
commit ba9877f24b9798adce24f2a31b700d5e726547da
Author: João Távora <[email protected]>
Commit: João Távora <[email protected]>
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