Matej
Matej

Reputation: 8988

How to trigger parameter hints in Visual Studio Code?

I want to show parameter hints when I position cursor within the parentheses of the calling method.


Note: I know similar answers already exist for Visual Studio on Reddit, but I couldn't find a quick answer for this question on Stack Overflow. So I've decided to add it.

Upvotes: 284

Views: 172545

Answers (8)

Ramazan Burak Ekinci
Ramazan Burak Ekinci

Reputation: 51

  1. command + i -> info parameters
  2. commdan + . -> Quick Fix (write const etc.)
  3. command + shift + space -> info parameters hints

Upvotes: 3

lava
lava

Reputation: 7343

Method1

cntrl+shift+space

enter image description here

Method2

View -> Command Palette->parameter hints

enter image description here

Method3

hover mouse on the function.then it will show the hint.

enter image description here

If you feel gif is too small click on the gif it will expand.

Upvotes: 20

Ninroot
Ninroot

Reputation: 61

If like me you always forget, open the palette, the shortcut will be displayed:

enter image description here

Upvotes: 0

Dan
Dan

Reputation: 593

  1. Code -> Preferences -> Keyboard Shortcuts

  2. Search for "Trigger parameter hints"

    1. Here you can either inspect the defined shortcut

    2. Or you can change keybinding by pressing to the left of "Trigger parameter hints" command name.

Upvotes: 13

Matej
Matej

Reputation: 8988

For Windows and Linux:

Ctrl + Shift + Space

For MacOS:

Shift ⇧ + Cmd ⌘ + Space

Upvotes: 452

Akshay Kumar
Akshay Kumar

Reputation: 479

Update v1.6 - Aug 2021

There's also a new feature called inlay hints which you can enable in your settings.json like this:

"javascript.inlayHints.parameterNames.enabled": "all",

Upvotes: 47

prograhammer
prograhammer

Reputation: 20590

For Java extension, ctrl+shift+space works only after setting Java > Signature Help: Enabled in your settings.json:

enter image description here

enter image description here

Upvotes: 13

Ali_Baghayeri
Ali_Baghayeri

Reputation: 185

You can use Ctrl+Space to show parameter hints before parentheses, and if you want to trigger parameter hints in parentheses to know about arguments you can use Ctrl+Shift+Space

Upvotes: 11

Related Questions