You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As I understand, the current textDocument/documentSymbol reports symbols, which can be useful in source code navigation, like imenu of emacs. So it doesn't report local variables, for example. But it reports function scoped static variables. This has a negative effect on imenu: we cannot select the function itself, only the static variables in it.
I was wrestling with the same issue, making imenu useless for jumping to function definitions. I had figured it was an emacs issue, and was stumped until I happened to come across @geza-herman's investigations. I've been using the following patch for a few days now, and it seems to do just what I want without causing any trouble that I've noticed.
As I understand, the current textDocument/documentSymbol reports symbols, which can be useful in source code navigation, like imenu of emacs. So it doesn't report local variables, for example. But it reports function scoped static variables. This has a negative effect on imenu: we cannot select the function itself, only the static variables in it.
Here's a little discussion about this: emacs-lsp/lsp-mode#1424
I think it's worth considering ignoring function scoped static variables as well (not just "proper" local variables).
The text was updated successfully, but these errors were encountered: