[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 1.2 da4cd2a 083/101: Make imenu hierarchical
From: |
Christian Johansson |
Subject: |
[elpa] 1.2 da4cd2a 083/101: Make imenu hierarchical |
Date: |
Thu, 29 Apr 2021 15:09:05 -0400 (EDT) |
tag: 1.2
commit da4cd2a37ea3619b02e9c6ae7b7a68ec558d0506
Author: MichaĆ Krzywkowski <k.michal@zoho.com>
Commit: mkcms <k.michal@zoho.com>
Make imenu hierarchical
* eglot.el (eglot-imenu): Use :containerName to build a nested imenu
index alist.
---
eglot.el | 25 +++++++++++++++++--------
1 file changed, 17 insertions(+), 8 deletions(-)
diff --git a/eglot.el b/eglot.el
index f11a14e..22f509b 100644
--- a/eglot.el
+++ b/eglot.el
@@ -1670,20 +1670,29 @@ If SKIP-SIGNATURE, don't try to send
textDocument/signatureHelp."
(jsonrpc-lambda
(&key name kind location containerName _deprecated)
(cons (propertize
- (concat
- (and (stringp containerName)
- (not (string-empty-p containerName))
- (concat containerName "::"))
- name)
+ name
:kind (alist-get kind eglot--symbol-kind-names
- "(Unknown)"))
+ "Unknown")
+ :containerName (and (stringp containerName)
+ (not (string-empty-p containerName))
+ containerName))
(eglot--lsp-position-to-point
(plist-get (plist-get location :range) :start))))
(jsonrpc-request (eglot--current-server-or-lose)
:textDocument/documentSymbol
`(:textDocument
,(eglot--TextDocumentIdentifier))))))
- (seq-group-by (lambda (e) (get-text-property 0 :kind (car e)))
- entries))
+ (mapcar
+ (pcase-lambda (`(,kind . ,syms))
+ (let ((syms-by-scope (seq-group-by
+ (lambda (e)
+ (get-text-property 0 :containerName (car
e)))
+ syms)))
+ (cons kind (cl-loop for (scope . elems) in syms-by-scope
+ append (if scope
+ (list (cons scope elems))
+ elems)))))
+ (seq-group-by (lambda (e) (get-text-property 0 :kind (car e)))
+ entries)))
(funcall oldfun)))
(defun eglot--apply-text-edits (edits &optional version)
- [elpa] 1.2 1408860 052/101: Close #94: Prefer ccls over cquery for C/C++, (continued)
- [elpa] 1.2 1408860 052/101: Close #94: Prefer ccls over cquery for C/C++, Christian Johansson, 2021/04/29
- [elpa] 1.2 a1e8946 045/101: Close #80: Consider :triggerCharacters in company completion, Christian Johansson, 2021/04/29
- [elpa] 1.2 989647a 049/101: When exiting emacs, don't ask the user to confirm killing processes (#83), Christian Johansson, 2021/04/29
- [elpa] 1.2 ce9076d 047/101: Close #82: Correctly delete text before expanding snippet completions, Christian Johansson, 2021/04/29
- [elpa] 1.2 746505f 072/101: Require subr-x at compile time (#139), Christian Johansson, 2021/04/29
- [elpa] 1.2 eec30e3 070/101: Fix misspelling of "outstanding" (#74), Christian Johansson, 2021/04/29
- [elpa] 1.2 ff62057 071/101: Fix #138: accept deprecated field in SymbolInformation, Christian Johansson, 2021/04/29
- [elpa] 1.2 f317a7d 069/101: * eglot-tests.el: Disable eclipse connection tests., Christian Johansson, 2021/04/29
- [elpa] 1.2 ff92d67 073/101: Remove duplicates from imenu, Christian Johansson, 2021/04/29
- [elpa] 1.2 660d9e3 078/101: Slightly robustify test engine, Christian Johansson, 2021/04/29
- [elpa] 1.2 da4cd2a 083/101: Make imenu hierarchical,
Christian Johansson <=
- [elpa] 1.2 912d10f 088/101: Fix a bug introduced by previous bugfix, Christian Johansson, 2021/04/29
- [elpa] 1.2 8529b55 089/101: Fix #124: add ability to move to LSP-precise columns, Christian Johansson, 2021/04/29
- [elpa] 1.2 90b3bfd 090/101: Fix #148: complex completions work when chosen from *completions*, Christian Johansson, 2021/04/29
- [elpa] 1.2 63c2bbc 092/101: Add support for TextEdits in completion, Christian Johansson, 2021/04/29
- [elpa] 1.2 d52738f 095/101: Treat tab characters as 1 column wide in position conversion functions, Christian Johansson, 2021/04/29
- [elpa] 1.2 7e9cc05 098/101: Fix #154: fix potential security issue fontifying LSP doc, Christian Johansson, 2021/04/29
- [elpa] 1.2 2bbf06e 097/101: Add support for R's languageserver (#161), Christian Johansson, 2021/04/29
- [elpa] 1.2 c667d79 093/101: Fix #125: add ability to report LSP-compliant columns, Christian Johansson, 2021/04/29
- [elpa] 1.2 a39a446 020/101: Close #61: Snappier completions that don't hinder typing, Christian Johansson, 2021/04/29
- [elpa] 1.2 2e21c12 084/101: * eglot.el (eglot-client-capabilities): Mention supported SymbolKinds., Christian Johansson, 2021/04/29