-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optionally fallback to goto_definition in lsp_symbol_definition #1986
Optionally fallback to goto_definition in lsp_symbol_definition #1986
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Would be good to mention something about that in https://lsp.sublimetext.io/features/#goto-definition also.
- The default keybindings should be updated to include this argument (disabled by default) for visibility.
@rchl I've addressed your suggestions. |
I wonder whether this shouldn't be made the default behavior? (I.e. use default value Otherwise, users need to override the resource files |
If we want to make the |
I'm not 100% sure but would lean towards enabling Adding the status message on fallback is not a bad idea (although myself I probably wouldn't notice it anyway). |
Unfortunatelly not all LSPs have good symbol definition support. For example,
solargraph
(ruby) has limited support and quite offten returnsNo results found
, so you have to keep and remember the built-in Sublimegoto_definition
key bining to be able to jump to at least something.It becomes especially inconvenient when you switch between different programming langages where one has a better symbol defition support than another so you always have to keep in mind what exact key to use.
This PR adds an optional
fallback
parameter to thelsp_symbol_definition
command that allows to fallback to the built-ingoto_definition
command in case no results were found.This option allows you to have more consistant key bining and better integration with Sublime, because you don't need to worry if LSP is enable or no, as every time it would try to find at least something.