(If wrong channel, let me know!) If a function has...
# getting-started
(If wrong channel, let me know!) If a function has multiple arguments, e.g.:
Copy code
fun f(x: Int, y: Int) = TODO()
then it is possible to autocomplete them with arguments like so: Type:
, then it should suggest to autocomplete
and then you press some key so that the IDE (Android Studio or IntelliJ) now completes it to
f(x = , y = )
, with the cursor just before the comma so you can continue typing, e.g.
and then you press tab to move the cursor to the next argument (
y =
) so you can continue typing. I'm sitting right next to a colleague who can do this in one project. But not in another, so we think it's a project setting that's somehow enabled in one project, but not in the other. This would be super helpful to enable this in all our projects, but how do we do that? What's this feature called? Is there a keystroke to use? Is this something that can be enabled?
Thanks, but it's not that extra action, unfortunately
I really see my coworker type part of a function name, press enter, and boom: it completes the function and argument names with = symbols, commas and everything to just continue typing
But we simply don't know how he managed to get that behaviour in one project, and not in another
­čśé 1
We found it, finally after an hour of trial and error:
It's a composable function
For which there is a setting, probably from the Compose Plugin:
That's basically what I want globally, not just for composable functions
­čĹÇ 1
It's likely a bad idea for some reason, though