godot-vscode-plugin icon indicating copy to clipboard operation
godot-vscode-plugin copied to clipboard

Some formatting breaks in lambda functions

Open rktprof opened this issue 11 months ago • 2 comments

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

rktprof avatar Mar 14 '24 14:03 rktprof

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.

Calinou avatar Mar 14 '24 18:03 Calinou

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.

DaelonSuzuka avatar Mar 14 '24 18:03 DaelonSuzuka