vsc-python-indent icon indicating copy to clipboard operation
vsc-python-indent copied to clipboard

keepHangingBracketOnLine doesn't seem to be working for square brackets

Open jkyeung opened this issue 2 years ago • 2 comments

What the code looks like before pressing enter:

foo = [|]

What I want the code to look like after pressing enter:

foo = [
    |]

What the code actually looks like after pressing enter:

foo = [
    |
]

This issue is specifically about square brackets. For parens and curly braces, this setting works as expected (thank you for that!).

I am presuming that this setting is meant to apply to square brackets as well. If that hasn't changed, and no one else has brought it up, then maybe there is something about my other VS Code settings or extensions that is somehow in conflict. I'll be glad to try stuff out and report back, if you have any ideas.

jkyeung avatar Sep 13 '22 21:09 jkyeung

Hey @jkyeung thanks for the heads up. I'm away from my computer for a while, but I'm hopeful this will be easy to fix once I am able.

kbrose avatar Sep 15 '22 23:09 kbrose

@jkyeung can you double check the behavior?

When I set Python Indent: Keep Hanging Bracket On Line to on then it behaves the way you want (keeping the square bracket on the second line instead of putting it alone on the third).

kbrose avatar Oct 03 '22 23:10 kbrose

Closing as stale and unreproducible. See my comment on #105

jkyeung avatar Nov 03 '23 20:11 jkyeung