How to disable parameter hints for constructors only?

Answered

How do you disable parameter hints for constructors only? Mostly to reduce the new File([pathname]"path") noise.

Tried adding exclusions for "java.io.File" and "java.io.File(*)" and those didn't work.

Might also be worth adding log4j Logger and Category to the default exclusions.

4 comments
Comment actions Permalink

java.io.File.File(pathname) should work.

You don't have to type it manually, Alt+Enter, Do not show hints for current method:

0
Comment actions Permalink

Didn't know that one thanks.

Looking at our codebase could also do with a stoplist of exclusions to avoid hinting: single chars, 'parameter[s]', 'param[s|0..9]', 'arg[s]', 'option[s]', 'value[s]', 'item[s]' ...

0
Comment actions Permalink

Tested in PhpStorm2017.1

1. Open Settings

2. Type parameter name hints in search box

3. Click Appearance, uncheck "Show parameter name hints" to hide all hints

4. Click Configure to configure specific methods only. When you click it, you get another window "Configure Parameter Name Hints". 

5. In Configure Parameter Name Hints place cursor to the last line and enter your method. e.g. __construct(*) to hide hints for constructors in PHP

 

Happy PHPStorming :)

- Samundra

1

Please sign in to leave a comment.