How to trigger parameter hints in Visual Studio Code?
Visual Studio-CodeVisual Studio-Code Problem Overview
I want to show parameter hints when I position cursor within the parentheses of the calling method.
> 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.
Visual Studio-Code Solutions
Solution 1 - Visual Studio-Code
For Windows and Linux:
Ctrl + Shift + Space
For MacOS:
⇧ + ⌘ + Space
Solution 2 - Visual Studio-Code
v1.6 - Aug 2021
UpdateThere's also a new feature called inlay hints which you can enable in your settings.json
like this:
"javascript.inlayHints.parameterNames.enabled": "all",
Solution 3 - Visual Studio-Code
- Code -> Preferences -> Keyboard Shortcuts
- Search for "Trigger parameter hints"
2.a Here you can either inspect the defined shortcut
2.b Or you can change keybinding by pressing to the left of "Trigger parameter hints" command name.
Solution 4 - Visual Studio-Code
For Java extension, ctrl+shift+space works only after setting Java > Signature Help: Enabled
in your settings.json
:
Solution 5 - Visual Studio-Code
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