How do I activate type annotations hints in Kotlin like depicted?

后端 未结 3 1270
梦毁少年i
梦毁少年i 2021-01-31 16:38

I was able to activate this option once in my MacOS intellij version, but could never find this option anymore, I forgot its name.

I know there is the CTRL+SHIFT+P alter

相关标签:
3条回答
  • 2021-01-31 16:38

    Adding to @Simulant answer.

    In Latest Version of IntelliJ (2019.3.1) , You will NOT find this in Settings -> Editor -> General -> Appearance -> "Show parameter name hints"

    Its available in Settings -> Editor -> Inlay Hints -> Kotlin -> "Show parameter hints"

    0 讨论(0)
  • 2021-01-31 16:47

    Adding to @Simulant and @zero answers

    In the latest version of IntelliJ (2020.3) you need to go to Settings -> Editor -> Inlay Hints where you can specify "Show hints for" (for specific language) and then in Settings -> Editor -> Inlay Hints -> Kotlin -> Parameter hints -> Types you can specify what type of hints you want.

    0 讨论(0)
  • 2021-01-31 16:49

    Go to Settings -> Editor -> General -> Appearance -> "Show parameter name hints" -> Configure... -> Language: Kotlin -> Options -> "Show local variable type hints".

    In newer Versions of IntelliJ (at least from 2019.3.1 onwards) it is located at: Settings -> Editor -> Inlay Hints -> Kotlin -> "Show parameter hints" (thanks to @zero).

    I think you are allowed to say, that this feature configuration is a little bit hidden in the menues.

    0 讨论(0)
提交回复
热议问题