godotengine / godot-vscode-plugin

Godot development tools for VSCode
MIT License
1.58k stars 168 forks source link

Formatting scientific notation adds spaces #734

Open ForestKatsch opened 3 weeks ago

ForestKatsch commented 3 weeks ago

Godot version

4.3.stable

VS Code version

1.94.2

Godot Tools VS Code extension version

2.3.0

System information

Windows 11

Issue description

Scientific notation formatting adds a space around the "-" or "+".

var my_tiny_number = 1e-6

is formatted to

var my_tiny_number = 1e - 6

(which is syntactically invalid GDScript.)

Previously reported in #653, but PR #605 referenced in that issue is now merged, but the scientific notation issue persists.

Steps to reproduce

Create a GDScript file containing

var my_tiny_number = 1e-6

Format the file.

DaelonSuzuka commented 2 days ago

This should be fixed in the next release.