Skip to content

Commit

Permalink
Handle case when :textdocumentsync isn't a number
Browse files Browse the repository at this point in the history
Also closes joaotavora/eglot#87.

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

GitHub-reference: close joaotavora/eglot#86
  • Loading branch information
joaotavora committed Aug 25, 2018
1 parent 93ca152 commit d01b511
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 d01b511

Please sign in to comment.