kbrose / vsc-python-indent

Correctly indent python code on the fly, in Visual Studio Code.
https://marketplace.visualstudio.com/items?itemName=KevinRose.vsc-python-indent
MIT License
82 stars 19 forks source link

keepHangingBracketOnLine doesn't seem to be working for square brackets #104

Closed jkyeung closed 11 months ago

jkyeung commented 2 years ago

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.

kbrose commented 2 years ago

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 commented 2 years ago

@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).

jkyeung commented 11 months ago

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