From 4a87a536b97fcf00d28f6603132c6f960dd5f80f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jo=C3=A3o=20T=C3=A1vora?= Date: Wed, 2 May 2018 13:32:13 +0100 Subject: [PATCH] Correctly report what we currently are capable of Which is almost nothing. * eglot.el (eglot--protocol-initialize): Clean up. --- lisp/progmodes/eglot.el | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index db594f4984a..1f2737effd6 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -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) -- 2.39.2