godotengine / godot-vscode-plugin

Godot development tools for VSCode
MIT License
1.47k stars 148 forks source link

Some formatting breaks in lambda functions #624

Open rktprof opened 3 months ago

rktprof commented 3 months ago

Godot version

4.2.1

VS Code version

VSCodium 1.87.1

Godot Tools VS Code extension version

2.0.0

System information

macOS 14.4

Issue description

I'm not sure if other operators misbehaves but I also remember seeing the syntax coloring breaking in a lambda but can't remember what/where that was, but when using an equals sign in a lambda:

poll_animation.on_complete(func() -> void:
    highlight.visible = false
)

becomes:

poll_animation.on_complete(func() -> void:
    highlight.visible=false
)

(it also happens when the lambda content is on the same row)

Steps to reproduce

Take the example code above and just save the file

Calinou commented 3 months ago

It might be worth checking whether https://github.com/godotengine/godot-vscode-plugin/pull/605 fixes this. You can download the godot-tools artifact from the top-right corner on its checks page and extract the ZIP archive, then install the VSIX file contained in the ZIP.

DaelonSuzuka commented 3 months ago

I can say for sure that #605 does not fix this yet, but when it gets fixed that's where you'll be able to find it.