I quite often need to specify all / a lot of named parameters.
Is there a shortcut in IntelliJ to fill out all parameters (like in the second screenshot),
and let my cursor jump from one to another like in a live template?
plus1 4
w
wasyl
06/03/2023, 11:04 AM
There's a plugin called Kotlin Fill Class I think that does what you want, I use it daily and it's brilliant
Overall named parameters story could be improved in couple of areas IMO, from top of my head:
⢠named parameters are notoriously difficult to get as one of the first IDE suggestions on cmd+space/cmd+shift+space
⢠it's not possible to encourage or force IDE (e.g. with an annotation) to use named parameters for a given class/package
⢠adding new parameters doesn't by default append parameter name even if all the existing parameters already have names (so it's almost certain new parameters should also use names)
⢠the issue I linked, incredibly annoying, conversion from named parameter to a trailing lambda on any refactor
š 1
j
jonas.app
06/06/2023, 9:37 PM
One other tiny thing I missed the last days which is related to your suggestions:
⢠IDE suggestion to add named parameters on all call sites of a function.