-
Notifications
You must be signed in to change notification settings - Fork 184
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
add commands for opening "find references" in bottom or quick panel #2409
Conversation
✅ Deploy Preview for sublime-lsp ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for sublime-lsp ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
For the context menu, would it be better to change to the alternative display method if a modifier key is pressed when you select the "Find References" item? I think the additional entry is okay for the command palette, but I think it's not the best UI to have two of the items with basically the same functionality in the context menu. Modifier keys for the context menu should work fine (you can confirm by adding
|
That would make the feature pretty much impossible to discover though... |
I gues most users are satisfied with having the global "how_references_in_quick_panel": true/false setting. The only request for that in the issue tracker I can see is from you: #2084 |
Actually we could even use the modifier key too for the side-by-side mode. This would only be relevant if it is displayed in the quick panel. I.e. activate side-by-side if Shift is pressed (like in the default key binding) and change panel mode (bottom/quick panel) if Primary is pressed. |
Actually, the That means that ideally for the side-by-side triggered from the context menu we'd also need to use primary (ctrl on win, cmd on mac) but then what would we use for "default-inverted" action? Shift? Doesn't feel quite right. |
I've added support for holding |
Yes, I confused the Shift and Primary keys above. I think now it is better than adding an additional context menu item. A few more suggestions for the labels and names:
|
The reason I've used "bottom panel" is to match the description of the setting:
but I'm fine with changing both. |
Don't like this since it's not clear what "false" means. |
I tried pressing I did a little search in my keybindings, and found out that I had
EDIT: it does work as expected when I invoke it from |
Does it work to press shift+enter on other menu items? If it doesn't work with those that don't handle shift specifically (so basically most of them) then I would assume it's a Linux/Window Manager thing. |
plugin/references.py
Outdated
show_in_quick_panel = show_in == 'quick_panel' or show_in is None and userprefs().show_references_in_quick_panel | ||
if modifier_keys.get('shift'): | ||
show_in_quick_panel = not show_in_quick_panel |
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.
I've realized that I should only be handling shift when "show_in" is not specified.
|
Hm... this sounds a bit like a "TV show" or something. I like your "output" suggestion, or "output_mode", or "display_mode". The command caption still has "Bottom Panel" instead of "Output Panel" currently. |
Include an additional variant of the
Find references
command in Command Palette and menus that allows to show references in the way that is opposite to the default behavior (which depends onshow_references_in_quick_panel
).So when
show_references_in_quick_panel
is enabled, we'll showFind References (in bottom panel)
in addition to the defaultFind References
and ifshow_references_in_quick_panel
is disabled we'll showFind References (in quick panel)
so that both variants are always accessible.The reason for that is that while showing references in the quick panel is typically the preferred way, one might want to occasionally show those in the bottom panel to be able to keep the list as a reference when wanting to update all results manually.