IntelliJ shows method parameter hints on usage - How to disable it
Asked Answered
S

10

327

I am new to IntelliJ and recently updated to IntelliJ-2016.3.
In the editor for Java code, it shows the method signature upon usage. How do I disable this feature?

Here's an example of a method's signature and its call site:

1

Method call:

2

This behavior was not there in 2016.1.4 version. I am seeing this after update.

Sattler answered 29/11, 2016 at 12:41 Comment(14)
@IslamAbdalla Not always, a simple string.split() should not have "regex: " in front of the parameter, it's obnoxious.Selfreliant
@Selfreliant why shouldn't it have "regex:" in front of the parameter? It helps in reminding you that, despite appearances, string.split(".") does not split on the dots.Probability
@KlitosKyriacou That's more an issue of method naming, not one of showing the name of a parameter or not.Selfreliant
I have to say, this feature is super annoying. Like the slow animation in which the things appear, and also the fact that it shifts the rest of the code around so that you visually lose your place... not sure what they were thinkingMaori
Regarding readability: It may help when viewing in this particular tool, but if someone reads your code outside of IntelliJ, they won't see the hints. I believe such readability issues should be resolved in the choice of variable names (and maybe creation of variables names), and just generally better APIs. Plus... it obscures line length, where that is a style issue in some environments.Lamellibranch
idea have ctrl+p hot key, which show same information. This tooltips is garbage.Laufer
showing the parameter name in the calling list is super annoying. I just want it to show what I'm typing in it. It just makes the code more unreadable.Gabon
I agree with @Joe. Positioning your cursor to edit a paramter is a HUGE pain in the neck. Just shut it off. Would be happier with a pop-up hint on hover.Fredericton
When I look at my code, columns can be horrendously over the specified limit and I can't read lines of code without side-scrolling. I can't autoformat to fix this because these hints aren't counted toward that limit.Ise
All fun and games until code review time, then back to "what exactly does true mean here?"Willi
linked #38734611Joelie
If you know that it called a "hint" then you can type "hint" into the settings filter and you can find this setup entry that may be in different places according to the IDE version. And you can also learn other possibilities: hints on completion that may be useful even if you don't want to see hints general, and color scheme for hints.Wiggler
This feature is confusing particularly to newcomers. I see questions like "Why doesn't this work when I call a method: myObj.someMethod(name: "arg", age: 23)" on a regular base. Examples: here and here.Accordant
Oh, and here.Accordant
R
211

Right click on the hint, then on Disable:

enter image description here

Robinette answered 27/2, 2017 at 10:23 Comment(3)
The keyboard shortcut for this Alt + Q (Context Info)Tabor
@Custodio indeed, I forgot to specify that was on under the default Windows/Linux keymap. Apparently on Mac it is ⌃⇧Q (Ctrl + Shift + Q)Tabor
God why is this so difficult. There are like 5 different related options that don't seem to do anything if I disable them. This answer is the only one that actually worked. Thanks!Indispose
N
301

Untick the bottom option Show parameter name hints

Show parameter name hints

Ningsia answered 29/11, 2016 at 12:47 Comment(3)
Just to be clear, this isnt the very bottom option in IntelliJ 2019.X... its somewhere near the middle of this pane. :)Thaler
In IntelliJ 2019 it is in not in the Appearance, not even in the General. It is in Editor -> Inlay Hints -> Parameter hints.Gunthar
for Intellij IDEA 2022 Editor -> Inlay Hints -> Code vision -> Usages , Uncheck thisSocialization
R
211

Right click on the hint, then on Disable:

enter image description here

Robinette answered 27/2, 2017 at 10:23 Comment(3)
The keyboard shortcut for this Alt + Q (Context Info)Tabor
@Custodio indeed, I forgot to specify that was on under the default Windows/Linux keymap. Apparently on Mac it is ⌃⇧Q (Ctrl + Shift + Q)Tabor
God why is this so difficult. There are like 5 different related options that don't seem to do anything if I disable them. This answer is the only one that actually worked. Thanks!Indispose
A
55

I find it helpful to use a shortcut such as P + shift + command to toggle parameter type hinting as needed. I don't want it disabled entirely.

  1. open preferences
  2. click Keymap
  3. filter by parameter
  4. double click on Toggle parameter name hints
  5. enter key combination ie, P + shift + command
  6. Apply and Ok
  7. Now the key combo will toggle hints for you.

enter image description here

Aerobe answered 7/8, 2017 at 11:53 Comment(2)
This solution was a win for me. Sometimes the parameter hints are useful, sometimes they're annoying, and an easy toggle was exactly what I wanted. (The only challenge was finding an unused key combination that I could remember!)Epizoon
If you want to toggle all inlay hints than make a key for 'Toggle Inlay Hints Globally' ( I used SHIFT+H )Lied
M
18

From the what's new page:

Parameter hints

The editor now shows parameter hints for literals and nulls used as method arguments. These hints make code much more readable.

If you find hints redundant for a certain method, you can tell the IDE not to show hints for this method. To disable hints completely, uncheck Settings → Editor → General → Appearance → Show parameter name hints.

(emphasis is mine)

Milreis answered 29/11, 2016 at 12:44 Comment(1)
Isn't there anymore. Now it's in the Settings → Editor → Inlay Hints → Java → Show parameter hints for.Warwickshire
G
17

In latest version you can find it under Settings → Editor → Inlay Hints

enter image description here

Geny answered 2/7, 2020 at 6:31 Comment(0)
R
15

Others have already answered this, but here is a way of finding it without jumping into menus.

Try hitting ⌘ + Shift + A on Mac or CTRL + SHIFT + A on Linux and type the Show parameter name hints into the search bar.

Show parameter appears when searching from the Action/Option name search bar

Roderica answered 14/4, 2018 at 0:48 Comment(3)
lol, @AfonsoLage I think you have a typo, better off deleting and re-commenting if you can no longer editChalmers
CTRL + SHIFT + A on Linux, tested here.Gallion
If you keep getting a pop-up from terminal when you try CMD + SHIFT + A: intellij-support.jetbrains.com/hc/en-us/articles/…Neve
M
10

As of 2022, it's been renamed to "inlay hints"

You can disable it by pressing shift + shift, then type inlay hints and then disable it.

enter image description here

Masturbate answered 29/4, 2022 at 13:0 Comment(0)
Z
5
  1. ⌘ + Shift + A
  2. Type Inlay Hints
  3. Make sure that the language of your choice has Types set up properly!!! Here's an example for Kotlin: Inlay Hints settings
Zetta answered 29/1, 2021 at 8:19 Comment(0)
D
3

As on 2022 (WebStorm 2022.1.2), the option is under the Editor → Inlay Hints. Uncheck the parameter names checkbox.

enter image description here

Devil answered 25/6, 2022 at 23:15 Comment(0)
S
2

For Intellij IDEA 2022 Editor -> Inlay Hints -> Code vision -> Usages , Uncheck this

Socialization answered 1/7, 2022 at 1:54 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.