From: Michal Krzywkowski Date: Wed, 31 Oct 2018 13:16:56 +0000 (+0100) Subject: Use the container name of a symbol in imenu X-Git-Tag: emacs-29.0.90~1616^2~524^2~4^2~412 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7f062198c8677028c6ade0b68e07e5f26a3b4867;p=emacs.git Use the container name of a symbol in imenu * eglot.el (eglot-imenu): Prepend :containerName to each symbol, when provided. --- diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 26ee814755a..e15170400d8 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/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)