godotengine / godot-vscode-plugin

Godot development tools for VSCode
MIT License
1.55k stars 164 forks source link

Wrong auto-indentation #536

Closed moritztim closed 10 months ago

moritztim commented 10 months ago

Godot version

v4.1.3.stable.arch_linux

VS Code version

1.84.2

Godot Tools VS Code extension version

1.3.1

System information

Arch Linux

Issue description

I'll just make a checklist:

= hitting enter here |e = expected cursor position |a = actual cursor position

  • [ ] Newline after getter or setter signature
    var foo: int:
    get:↵
    |a  |e
  • [ ] Newline after variable declaration ending in : auto-indented too much
    var foo: int:
    |e  |a

    I have not been able to reproduce this but it's happened a bunch of times and I will update this when it happens again

  • [ ] Newline after variable declaration ending in : not auto-indented
    var foo: int:↵
    |a  |e
  • [ ] Newline after lambda function
    var x = func():↵
    |a  |e
  • [ ] Nested blocks auto-indent to inner most block
    # expected result of typing else on the last line without indenting manually
    if true:
    if true:
    if true:
    else
    # actual result:
    if true:
    if true:
    if true:
    else

Steps to reproduce

as described.

DaelonSuzuka commented 10 months ago

Already fixed in master.