Skip to content
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

Shortcut for Peek Call Hierarchy #113184

Closed
phatNfqAsia opened this issue Dec 20, 2020 · 12 comments
Closed

Shortcut for Peek Call Hierarchy #113184

phatNfqAsia opened this issue Dec 20, 2020 · 12 comments
Assignees
Labels
*question Issue represents a question, should be posted to StackOverflow (VS Code)

Comments

@phatNfqAsia
Copy link

I can not set a shortcut for peek Hierarchy Call, can you consider making it available? thanks.

image
image

@jrieken
Copy link
Member

jrieken commented Dec 21, 2020

The command is called editor.showCallHierarchy

@jrieken jrieken closed this as completed Dec 21, 2020
@jrieken jrieken added the *question Issue represents a question, should be posted to StackOverflow (VS Code) label Dec 21, 2020
@phatNfqAsia
Copy link
Author

phatNfqAsia commented Dec 21, 2020

The command is called editor.showCallHierarchy
@jrieken
this is not what I meant, the show call hierarchy show a menu in left bar while I want a floating menu right in the editor - the peek version of it for a quicker UX.

@yngwi
Copy link

yngwi commented Dec 23, 2020

I'm interested in this as well. The function is visible in this screenshot:
image

@jrieken
Copy link
Member

jrieken commented Dec 23, 2020

The command is still called editor.showCallHierarchy. So, please try this first and report back if that doesn't work

Screenshot 2020-12-23 at 12 37 56

@coolcorexix
Copy link

@jrieken can you specify the 'condition' that can be set in keybinding to call this 'peek' action, I tried this name but it keep calling the 'show call hierarchy' with UI in the sidebar 😢

@phatNfqAsia
Copy link
Author

@jrieken I confirm it doesn't work, you can also check from your side though

@jrieken
Copy link
Member

jrieken commented Jan 4, 2021

Please paste the keybindings that you are using/trying

@phatNfqAsia
Copy link
Author

@jrieken
this
image

when I press Shift + Cmd + ,
this appear
image

when I press Shift + Option + H
Uploading image.png…

image

@jrieken
Copy link
Member

jrieken commented Jan 4, 2021

The command is still called editor.showCallHierarchy! You have bound Shift + Cmd + , to editor.action.peekCallHierarchy which does not work because the command is still called editor.showCallHierarchy.

What makes you think the command is called editor.action.peekCallHierarchy?

@phatNfqAsia
Copy link
Author

phatNfqAsia commented Jan 4, 2021

@jrieken the thing is when I call Shift + Option + H the sidebar appear not the peek panel, so I try another name and it did not exist. What I am trying to tell you is that there is no action to activate peek call hierarchy via shortcut, only the show call hierarchy. The only place where I can get wrong is the condition of the keybinding, or we might have to have an distinct action name for this peek action

@jrieken
Copy link
Member

jrieken commented Jan 4, 2021

Having this in keybinding.json just works for me

	{
		"key": "shift+alt+h",
		"command": "editor.showCallHierarchy",
		"when": "editorHasCallHierarchyProvider && editorTextFocus && !inReferenceSearchEditor"
	}

@phatNfqAsia
Copy link
Author

Having this in keybinding.json just works for me

	{
		"key": "shift+alt+h",
		"command": "editor.showCallHierarchy",
		"when": "editorHasCallHierarchyProvider && editorTextFocus && !inReferenceSearchEditor"
	}

@jrieken I confirm this worked the way I expected. Thank you for your patience

@github-actions github-actions bot locked and limited conversation to collaborators Feb 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*question Issue represents a question, should be posted to StackOverflow (VS Code)
Projects
None yet
Development

No branches or pull requests

4 participants