Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to trigger documentation popup in vscode

How to trigger a popup with documentation for identifier under the cursor? Normally it appears when hovering the identifier using the mouse pointer: enter image description here

I would like to achieve this effect using a command or keyboard shortcut.

The only related commands I found are: trigger completion (which doesn't show the function doc) and trigger parameters hint (which only works when the cursor is inside function call - parameters list).

like image 715
Robert Zaremba Avatar asked Nov 23 '17 12:11

Robert Zaremba


People also ask

How do I trigger autocomplete in VS Code?

You can trigger IntelliSense in any editor window by typing Ctrl+Space or by typing a trigger character (such as the dot character (.)

How do I pop out Visual Studio code?

You can launch the command input by Ctrl + Shift + P , then type 'new window' and you will see the result File: Open active tab in a new window , and select it.

How do I use the prompt code in Visual Studio?

let name = prompt("what is your name"); prompt() (docs)would get you the name prompt and store the input as the script is running in the terminal. so write your script let's say something like: nameProgram.


2 Answers

This is the editor.action.showHover command. It is bound to cmdk cmdi by default.

Note: Shortcut works by holding down the cmd [ctrl in windows], then while holding press k then i

You can change the keyboard shortcut with a keybinding such as:

{     "key": "cmd+k ctrl+space",     "command": "editor.action.showHover",     "when": "editorTextFocus" } 
like image 151
Matt Bierner Avatar answered Sep 30 '22 16:09

Matt Bierner


The default shortcut for Trigger Parameter Hints is Ctrl+Shift+Space

like image 43
Tae Soo Kim Avatar answered Sep 30 '22 18:09

Tae Soo Kim