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
Today, we have 'Go to Implementation' and 'Peek References' - the former always defaults to going to an implementation, the latter to always shows peek. We should align those, e.g find references should be able to work like go to commands and go to commands should be able to work like peek references commands. There are more things to be polished, namely:
don't open peek references when only have one reference
implement find references similar to go to XYZ
tweak the editor.gotoLocation.multiple-setting so that it can be set per feature too
I can understand always going to a definition if there is only one, but I don't always want to go to a reference. I've often used the "Peek references" (Shift+F12) behavior when writing code as a way to quickly see how an API/interface should be used, but now that this behavior always goes to the reference if there is only a single reference causes issues with my workflow. This is especially disruptive if I have two editors open for the same document in different tab groups, as jumping back in the navigation stack ends up jumping to my previous location in the other tab group, which loses track of the prior position I had open in that tab group.
I think this surfaces two issues:
There does not seem to be a setting/preference to revert to the previous behavior for "Peek references" (there is one for when there are multiple references, but not for a single reference).
The backtracking through the navigation stack is sub-par when you have the same document open in two (or more) tab groups.
There does not seem to be a setting/preference to revert to the previous behavior for "Peek references" (there is one for when there are multiple references, but not for a single reference).
The "Peek References" behaviour is still the same as before but we did un-assign its keybinding and now use it for "Go to References". Still, the peek commands are still there and you should be able to tweak the keybindings so that the before-behaviour is back.
The backtracking through the navigation stack is sub-par when you have the same document open in two (or more) tab groups.
Did this remove "Peek Definition" entirely? I really enjoyed the workflow of Peek Definition > Peek Definition > Peek Definition .... Now it seems I have to Go to Definition > Go Back > Go to Definition > Go Back ... where Go Back is either mouse to keyboard or two clicks through the menu (1.141.0-insider).
Trevor Karjanis (@TrevorKarjanis) We only changed the context menu, the peek-commands are still there and for Peek Definition we also haven't changed the keybinding Alt+F12. Is is that you are so used to running it from the context menu and that you are now missing it from there?
Johannes Rieken (@jrieken) Yes at least within my proficiency, point and clicking the desired symbols and the trivial nature of a right and then left click to select a menu option is quicker than navigating with or to and from the keyboard. Therefore, I used the Peek Definition context menu option to familiarize or refresh my memory on any number of definitions while formulating implementation on the current page.
I guess if this change remains I can learn Alt + F12, set an easier binding, or investigate creating an extension to add it back.
I take the feedback - the goal was to clean-up and streamline the context menu but not to annoy users. Not sure what we will end up doing. Ideally, we have user-configurable menus but that's another (big) issue
Activity
[-]Align Find Implementation and Find References[/-][+]Polish existing code navigation gestures[/+]F12 navigates peek view results, #83752
add setting editor.gotoLocation.multipleReferences etc and deprecate …
tweak names, assign Shift+F12 to go to references (from peek referenc…
remove peek declaration, add "go to references", "go to decl" to glob…
bug - don't close peek when changing editors, #83752
polish peek flow, #83752
ignore declaration when references return only two results, #83752
use goto, not peek references as fallback #83752
add generic go to locations command that allows to implement go-to-so…
rbuckton commentedon Nov 11, 2019
I can understand always going to a definition if there is only one, but I don't always want to go to a reference. I've often used the "Peek references" (Shift+F12) behavior when writing code as a way to quickly see how an API/interface should be used, but now that this behavior always goes to the reference if there is only a single reference causes issues with my workflow. This is especially disruptive if I have two editors open for the same document in different tab groups, as jumping back in the navigation stack ends up jumping to my previous location in the other tab group, which loses track of the prior position I had open in that tab group.
I think this surfaces two issues:
jrieken commentedon Nov 12, 2019
The "Peek References" behaviour is still the same as before but we did un-assign its keybinding and now use it for "Go to References". Still, the peek commands are still there and you should be able to tweak the keybindings so that the before-behaviour is back.
I know. Can you please file a separate issue.
TrevorKarjanis commentedon Nov 12, 2019
Did this remove "Peek Definition" entirely? I really enjoyed the workflow of Peek Definition > Peek Definition > Peek Definition .... Now it seems I have to Go to Definition > Go Back > Go to Definition > Go Back ... where Go Back is either mouse to keyboard or two clicks through the menu (1.141.0-insider).
jrieken commentedon Nov 13, 2019
Trevor Karjanis (@TrevorKarjanis) We only changed the context menu, the peek-commands are still there and for Peek Definition we also haven't changed the keybinding Alt+F12. Is is that you are so used to running it from the context menu and that you are now missing it from there?
TrevorKarjanis commentedon Nov 13, 2019
Johannes Rieken (@jrieken) Yes at least within my proficiency, point and clicking the desired symbols and the trivial nature of a right and then left click to select a menu option is quicker than navigating with or to and from the keyboard. Therefore, I used the Peek Definition context menu option to familiarize or refresh my memory on any number of definitions while formulating implementation on the current page.
I guess if this change remains I can learn Alt + F12, set an easier binding, or investigate creating an extension to add it back.
jrieken commentedon Nov 13, 2019
I take the feedback - the goal was to clean-up and streamline the context menu but not to annoy users. Not sure what we will end up doing. Ideally, we have user-configurable menus but that's another (big) issue
TrevorKarjanis commentedon Nov 13, 2019
Johannes Rieken (@jrieken) I've been using Alt + F12 today, and I've found it completely adequate. Thank you!