tag: 1.2
commit e866ca5ed32f1913b42b985dc9307a1dd092560a
Author: MichaĆ Krzywkowski <[email protected]>
Commit: mkcms <[email protected]>
Use the container name of a symbol in imenu
* eglot.el (eglot-imenu): Prepend :containerName to each symbol, when
provided.
---
eglot.el | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/eglot.el b/eglot.el
index 26ee814..e151704 100644
--- a/eglot.el
+++ b/eglot.el
@@ -1657,10 +1657,15 @@ If SKIP-SIGNATURE, don't try to send
textDocument/signatureHelp."
(let ((entries
(mapcar
(jsonrpc-lambda
- (&key name kind location _containerName _deprecated)
+ (&key name kind location containerName _deprecated)
(cons (propertize
- name :kind (alist-get kind eglot--symbol-kind-names
- "(Unknown)"))
+ (concat
+ (and (stringp containerName)
+ (not (string-empty-p containerName))
+ (concat containerName "::"))
+ name)
+ :kind (alist-get kind eglot--symbol-kind-names
+ "(Unknown)"))
(eglot--lsp-position-to-point
(plist-get (plist-get location :range) :start))))
(jsonrpc-request (eglot--current-server-or-lose)