emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/elpa e7ffc31 067/139: Make reported capabilities into i


From: João Távora
Subject: [elpa] externals/elpa e7ffc31 067/139: Make reported capabilities into its own function
Date: Mon, 14 May 2018 09:53:36 -0400 (EDT)

branch: externals/elpa
commit e7ffc31b9d7cc792241e3d077d2b7bb51e21ad84
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>

    Make reported capabilities into its own function
    
    * eglot.el (eglot--client-capabilities): New function.
    (eglot--connect): Use it.
---
 eglot.el | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/eglot.el b/eglot.el
index 10435a1..b305ca3 100644
--- a/eglot.el
+++ b/eglot.el
@@ -189,6 +189,13 @@ CONTACT is as `eglot--contact'.  Returns a process object."
                   (push sym retval))))
     retval))
 
+(defun eglot--client-capabilities ()
+  "What the EGLOT LSP client supports."
+  (eglot--obj
+   :workspace (eglot--obj)
+   :textDocument (eglot--obj
+                  :publishDiagnostics `(:relatedInformation nil))))
+
 (defun eglot--connect (project managed-major-mode
                                short-name contact &optional success-fn)
   "Connect for PROJECT, MANAGED-MAJOR-MODE, SHORT-NAME and CONTACT.
@@ -218,11 +225,7 @@ SUCCESS-FN with no args if all goes well."
                                  (expand-file-name (car (project-roots
                                                          (project-current)))))
                      :initializationOptions  []
-                     :capabilities
-                     (eglot--obj
-                      :workspace (eglot--obj)
-                      :textDocument (eglot--obj
-                                     :publishDiagnostics `(:relatedInformation 
t))))
+                     :capabilities (eglot--client-capabilities))
          :success-fn
          (cl-function
           (lambda (&key capabilities)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]