]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't send other notifications before initialized
authorAleksey Kladov <aleksey.kladov@gmail.com>
Sat, 8 Sep 2018 22:19:29 +0000 (23:19 +0100)
committerJoão Távora <joaotavora@gmail.com>
Sat, 8 Sep 2018 22:19:29 +0000 (23:19 +0100)
Copyright-paperwork-exempt: yes

* eglot.el (eglot--connect): send initialized before
activating minor mode.

GitHub-reference: close https://github.com/joaotavora/eglot/issues/100

lisp/progmodes/eglot.el

index 49cfce28ce3832d4b3935b5ae136a95057bfcd9d..1a702543b962fc50a608e1b0510894d0eb9cd447 100644 (file)
@@ -559,10 +559,10 @@ This docstring appeases checkdoc, that's all."
                           (push server
                                 (gethash project eglot--servers-by-project))
                           (setf (eglot--capabilities server) capabilities)
+                          (jsonrpc-notify server :initialized `(:__dummy__ t))
                           (dolist (buffer (buffer-list))
                             (with-current-buffer buffer
                               (eglot--maybe-activate-editing-mode server)))
-                          (jsonrpc-notify server :initialized `(:__dummy__ t))
                           (setf (eglot--inhibit-autoreconnect server)
                                 (cond
                                  ((booleanp eglot-autoreconnect)