emacs-ccls icon indicating copy to clipboard operation
emacs-ccls copied to clipboard

imenu not showing symbol types

Open shunlir opened this issue 5 years ago • 3 comments

image

shunlir avatar Jul 27 '20 13:07 shunlir

https://github.com/emacs-lsp/lsp-mode/issues/436

diff --git a/src/messages/textDocument_document.cc b/src/messages/textDocument_document.cc
index a1ce9494..60a4b50a 100644
--- a/src/messages/textDocument_document.cc
+++ b/src/messages/textDocument_document.cc
@@ -196,8 +196,8 @@ void MessageHandler::textDocument_documentSymbol(JsonReader &reader,
         auto *def = entity.anyDef();
         if (!def)
           return;
-        ds->name = def->name(false);
-        ds->detail = def->detailed_name;
+        ds->name = // def->name(false);
+            ds->detail = def->detailed_name;
         for (auto &def : entity.def)
           if (def.file_id == file_id && !ignore(&def)) {
             kind = ds->kind = def.kind;

myrgy avatar Aug 18 '20 12:08 myrgy

@myrgy The patch did the trick for me, thanks. image

shunlir avatar Sep 03 '20 15:09 shunlir

@shunlir , it worth to increase imenu-max-item-length

(setq imenu-max-item-length 256)

myrgy avatar Sep 06 '20 00:09 myrgy