]> git.eshelyaron.com Git - emacs.git/commitdiff
Correctly report what we currently are capable of
authorJoão Távora <joaotavora@gmail.com>
Wed, 2 May 2018 12:32:13 +0000 (13:32 +0100)
committerJoão Távora <joaotavora@gmail.com>
Wed, 2 May 2018 14:50:17 +0000 (15:50 +0100)
Which is almost nothing.

* eglot.el (eglot--protocol-initialize): Clean up.

lisp/progmodes/eglot.el

index db594f4984a8e6e2ed0e160c05eb3a9f03920c69..1f2737effd6f9b0428e422661e5b2c8d012ed280 100644 (file)
@@ -459,20 +459,23 @@ INTERACTIVE is t if caller was called interactively."
   (eglot--request
    process
    :initialize
-   `(:processId  ,(emacs-pid)
-                 :rootPath  ,(concat 
-                              (expand-file-name (car (project-roots
-                                                      (project-current)))))
-                 :initializationOptions  []
-                 :capabilities (:workspace (:executeCommand (:dynamicRegistration t))
-                                           :textDocument (:synchronization (:didSave t))))
+   (eglot--obj :processId  (emacs-pid)
+               :rootPath  (concat
+                           (expand-file-name (car (project-roots
+                                                   (project-current)))))
+               :initializationOptions  []
+               :capabilities
+               (eglot--obj
+                :workspace (eglot--obj)
+                :textDocument (eglot--obj
+                               :publishDiagnostics `(:relatedInformation t))))
    :success-fn (cl-function
                 (lambda (&key capabilities)
                   (setf (eglot--capabilities process) capabilities)
                   (when interactive
                     (setf (eglot--status process) nil)
                     (eglot--message
-                     "So yeah I got lots (%d) of capabilities"
+                     "Server reports %d capabilities"
                      (length capabilities)))))))
 
 (defun eglot-quit-server (process &optional sync interactive)