intellij-ideajavadoccode-completion

How to make IntelliJ display the Javadoc of autocompletion suggestions?


IntelliJ display Java code auto-completion suggestions in a drop-down menu after pressing CtrlSpace. All other IDEs manage to display the corresponding Javadoc if available. How to get IntelliJ to do that?

How to see JavaDoc in IntelliJ IDEA? refers to displaying it on a mouse hover event whereas I'm missing the Javadoc from code-completion suggestions.


Solution

  • Once you put a dot and the suggestions appear, press F1 (which is the default shortcut for "Quick Documentation" in most keymaps). The documentation for the currently selected method then appears as a card as show in the image. Then you can either use the up/down arrow keys or start typing the method name to select it. The documentation card will reflect accordingly.

    intellij quick documentation

    You can also click on the pin icon on top right of the documentation card to expand it if required.