<div dir="ltr"><div class="gmail_default" style="font-family:monospace">Hello <a class="gmail_plusreply" id="plusReplyChip-0" href="mailto:compiler-dev@openjdk.org" tabindex="-1">@compiler-dev</a>,</div><div class="gmail_default" style="font-family:monospace"><br></div><div class="gmail_default" style="font-family:monospace">Sometimes, when using JShell, I like to write code like this.</div><div class="gmail_default" style="font-family:monospace"><br></div><div class="gmail_default" style="font-family:monospace">Stream.of(</div><div class="gmail_default" style="font-family:monospace">    some(complex(expression)),</div><div class="gmail_default" style="font-family:monospace">    another(kind, of(complex, expression)),</div><div class="gmail_default" style="font-family:monospace">    you(get, the, idea)</div><div class="gmail_default" style="font-family:monospace">)</div><div class="gmail_default" style="font-family:monospace">.parallel()</div><div class="gmail_default" style="font-family:monospace">.map(...)</div><div class="gmail_default" style="font-family:monospace">.forEach(...)</div><div class="gmail_default" style="font-family:monospace">;</div><div class="gmail_default" style="font-family:monospace"><br></div><div class="gmail_default" style="font-family:monospace">But when typing the above in JShell, the 3 expressions in the call to Stream.of() are not indented. And in fact, even if I manually indent the first expression, JShell will require me to do the same for the following lines.</div><div class="gmail_default" style="font-family:monospace"><br></div><div class="gmail_default" style="font-family:monospace">There's a couple of different ways to go about this. Maybe JShell could be smarter about realizing where its current indent should be. For example, it could just follow the indent of the previous line. That would let the user pick the indent of their choice.</div><div class="gmail_default" style="font-family:monospace"><br></div><div class="gmail_default" style="font-family:monospace">But from what little I have read of the JShell codebase, it sounds like it would just be easiest to just make open parentheses + new line = increment indent.</div><div class="gmail_default" style="font-family:monospace"><br></div><div class="gmail_default" style="font-family:monospace">What do you think?</div><div class="gmail_default" style="font-family:monospace"><br></div><div class="gmail_default" style="font-family:monospace">Thank you for your time and consideration.</div><div class="gmail_default" style="font-family:monospace">David Alayachew</div></div>