Skip to content

Commit

Permalink
Close #86: Handle case when :textDocumentSync isn't a number
Browse files Browse the repository at this point in the history
Also closes #87.

* eglot.el (eglot--signal-textDocument/didChange): Grab :change
from :textDocumentSync server capability.

#86: joaotavora/eglot#86
#87: joaotavora/eglot#87
  • Loading branch information
joaotavora committed Aug 25, 2018
1 parent 017ee4b commit 93bea5c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lisp/progmodes/eglot.el
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 93bea5c

Please sign in to comment.