spacemacs icon indicating copy to clipboard operation
spacemacs copied to clipboard

imenu-unavailable-error: imenu unavailable: "No items suitable for an index found in this buffer"

Open jason--liu opened this issue 3 years ago • 10 comments

In lsp-mode, when I try to invoke lsp-ui-imenu,it reports imenu unavailable: "No items suitable for an index found in this buffer" I'm not very sure what it means, but from the picture below, we can see lsp-ui can display headerline, so I think there have index, Am I right? So, what is the reason of the error and how to make lsp-ui-imenu work. Thanks. image

jason--liu avatar Apr 15 '21 03:04 jason--liu

Are you using clangd?

lebensterben avatar Apr 15 '21 06:04 lebensterben

Are you using clangd?

YES, is that related?

jason--liu avatar Apr 15 '21 09:04 jason--liu

@lebensterben It seems that not related to clangd, because I just switched to ccls, it still has the same problem.

jason--liu avatar Apr 15 '21 10:04 jason--liu

https://clangd.llvm.org/installation.html

See the project setup section.

lebensterben avatar Apr 15 '21 19:04 lebensterben

I've read it. The compile_commands.json is already in the project

jason--liu avatar Apr 16 '21 04:04 jason--liu

not able to reproduce the issue.

lebensterben avatar Apr 16 '21 05:04 lebensterben

Maybe I should describe it more clearly. The first file opened after opening spacemacs, the imenu-list displays normally. However, when I jump to other functions and this function is in other files, this problem occurs.

jason--liu avatar Apr 16 '21 06:04 jason--liu

Is that file also in the same project?

lebensterben avatar Apr 16 '21 06:04 lebensterben

yes, in the same project

jason--liu avatar Apr 16 '21 06:04 jason--liu

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!

github-actions[bot] avatar Aug 24 '22 09:08 github-actions[bot]