WebStorm 2021.2 Help

Viewing method parameter information

Parameter hints show the names of parameters in calls of methods and functions.

Parameter hints are shown right in the editor next to a parameter in a function call making your code easier to read.

Parameter hints in the editor

You can turn off parameter hints in the editor and view them in a popup.

Parameter hints in a tooltip

WebStorm also shows parameter hints in completion lists and afterwards shows a tooltip with parameter hints for the selected function.

Showing parameter hints on completion

View parameter hints in the editor

By default, parameter hints are shown only for values that are literals or function expressions but not for named objects.

  1. Open the Settings/Preferences dialog Ctrl+Alt+S and go to Editor | Inlay Hints | <required language>.

  2. Select Parameter hints from the list, make sure the Show parameter hints checkbox is selected, and then specify the context where you want parameter hints shown.

    The preview below shows how the changes you make in the settings affect the code appearance.

  3. For some methods and functions, WebStorm does not show parameter hints in any context. Click Exclude list... to view these methods and functions, possibly enable parameter hints for them, or add new items to the list.

  4. To turn off parameter hints in the editor, clear the Show parameter name hints checkbox.

If you don't want to see parameter hints for specific methods, you can configure the list with exceptions. By default, the exception list contains a number of pre-defined methods. You can remove a method from the list to see the hints for it, or add new methods to hide their hints in the editor.

Configure the parameter hints exception list

  1. Open the Settings/Preferences dialog Ctrl+Alt+S, select Editor | Inlay Hints | <required language>, and make sure the Parameter hints checkbox is selected.

  2. Click Exclude list... and update the exceptions list as necessary.

View parameter hints in a popup

  • Place the caret anywhere within the call of a method or function and press Ctrl+P or choose View | Parameter Info from the main menu.

Configure parameter hints in popups

  1. In the Settings/Preferences dialog Ctrl+Alt+S, go to Editor | General | Code Completion.

  2. To have a complete method or function signature shown instead of a list of required types, select the Show full method signatures checkbox in the Parameter Info area.

  3. To have the list of parameter types for the called method or function shown automatically after a certain delay, select the Show the parameter info popup (in ms) checkbox and specify the time period in milliseconds.

Last modified: 10 August 2021