tag: 1.2
commit 2e21c126129c3c7c518a09bd0316b973bee16c8c
Author: MichaƂ Krzywkowski <[email protected]>
Commit: mkcms <[email protected]>

    * eglot.el (eglot-client-capabilities): Mention supported SymbolKinds.
---
 eglot.el | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/eglot.el b/eglot.el
index 22f509b..0a78970 100644
--- a/eglot.el
+++ b/eglot.el
@@ -196,6 +196,8 @@ let the buffer grow forever."
   "JSON object to send under `initializationOptions'"
   (:method (_s) nil)) ; blank default
 
+(defvar eglot--symbol-kind-names)
+
 (cl-defgeneric eglot-client-capabilities (server)
   "What the EGLOT LSP client supports for SERVER."
   (:method (_s)
@@ -221,7 +223,11 @@ let the buffer grow forever."
              :signatureHelp      `(:dynamicRegistration :json-false)
              :references         `(:dynamicRegistration :json-false)
              :definition         `(:dynamicRegistration :json-false)
-             :documentSymbol     `(:dynamicRegistration :json-false)
+             :documentSymbol     (list
+                                  :dynamicRegistration :json-false
+                                  :symbolKind `(:valueSet
+                                                [,@(mapcar
+                                                    #'car 
eglot--symbol-kind-names)]))
              :documentHighlight  `(:dynamicRegistration :json-false)
              :codeAction         (list
                                   :dynamicRegistration :json-false

Reply via email to