Does anyone else have this issue? In the pics atta...
# android-studio
c
Does anyone else have this issue? In the pics attached I am passing a lambda parameter. Starting from the empty lambda
{}
, I press enter and the cursor is indented 10 spaces for some reason. It should be 2 spaces. Anybody know how to fix this? Thanks
👀 2
m
Take a look at
.idea/codeStyles/Project.xml
file and see if
CONTINUATION_INDENT_SIZE
or
INDENT_SIZE
is set to 10, and if it is, then change it to 2
You can also click double shift to open search everywhere dialog, and search for
Tabs and Indents
, you'll see a dialog in which you can control Indent size, continuation_indent, tab...etc
c
Thanks for responding. Sorry I realize my description was not quite right. In the case of
onClick
there, it indents 10 spaces. But if it were like this:
Copy code
onLongerFunctionNameClick = {|}
I’d get:
Copy code
onLongerFunctionNameClick = {
                            |
}
m
hmm, probably there is some plugin or configuration that mess with project coding style, but try the aforementioned solutions, they should be a good starting point to diagnose the problem at least
c
Thanks