In 2025.1 EAP, with K2 enabled, parameter name inl...
# eap
h
In 2025.1 EAP, with K2 enabled, parameter name inlay hints are always shown, right? There doesn't seem to be an option to have them only for literals anymore?
youtrack 1
solved 1
a
Hi! Can you please provide a little bit more details regarding the issue? The code and screenshots what do you see with K1 and K2 would help. Thank you!
h
I can not give you the code, but here is an example from a unit test: With K1, only the literal value (i.e. the value that needs explaining) has the parameter inlay hint. That's perfect.
thank you color 1
With K2, the same line of code becomes overly verbose (and also needs a lot of horizontal space now).
a
Copy code
class Foo {
    fun bar(buzz: Buzz) {
    }
}

class Buzz(
    val param1: Int,
    val param2: MyEnum
)

enum class MyEnum {
    FIRST
}

fun main() {
    val foo = Foo()
    foo.bar(Buzz(11, MyEnum.FIRST))
}
Same behaviour occurs in IntelliJ IDEA 2024.3.2.1 (Ultimate Edition) IntelliJ IDEA 2024.2.5 (Ultimate Edition) Can't find the option to show the hints only for literals. I've create a new ticket regarding the issue: https://youtrack.jetbrains.com/issue/KTIJ-32872/K2-Paremeters-list-inlay-hints-Add-option-to-show-hints-only-for-simple-values Thank you!
gratitude thank you 1