From: João Távora Date: Wed, 2 May 2018 12:32:13 +0000 (+0100) Subject: Correctly report what we currently are capable of X-Git-Tag: emacs-29.0.90~1616^2~524^2~4^2~680 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4a87a536b97fcf00d28f6603132c6f960dd5f80f;p=emacs.git Correctly report what we currently are capable of Which is almost nothing. * eglot.el (eglot--protocol-initialize): Clean up. --- 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)