[symbols-view] “Go to Declaration” command should fall back to buffer symbols if no project-wide symbol provider is available
Have you checked for existing feature requests?
- [X] Completed
Summary
Lots of users don't even realize that the Symbols View: Go To Declaration command exists, and others probably noticed that it doesn't seem to do anything. That's because it depends upon the ability to generate project-wide symbols. Currently, that's something they'd need to generate a TAGS file for with ctags, or else use pulsar-ide-typescript-alpha or one of the handful of other experimental pulsar-ide- packages.
But if the command is going to do nothing in those scenarios, there's no reason why it couldn't instead just try to resolve the symbol under the cursor by doing a buffer-wide symbol search instead of a project-wide symbol search. It'd have more value than it does now.
What benefits does this feature provide?
Trains people to expect Go To Declaration to do something. Everyone should use that command once in a while; it's wonderful.
Any alternatives?
It should still be a goal of ours to make it so that more users have set up their environments so that project-wide symbol search is an option! That'd happen by increasing awareness of IDE backend packages and bringing them up to date. But in the meantime, this enhancement doesn't have a downside.
Other examples:
No response
This is on my to-do list, but I'm capturing it in an issue since I wasn't able to get to it in the last month.