Open cjmaxik opened 1 month ago
Oh my God, that's it!!! I had a file that stopped getting formatted, and I couldn't for the life of me figure out what in my config was causing this to happen...!
😆 🤣 😢
Correctly detecting this situation might be approaching the limits of this formatter, but I might be able to make it continue formatting even if there's a problem....
I expected this to be difficult because the textmate tokenizer doesn't preserve a lot of context across lines, but it was actually a simple index-out-of-bounds error because the -
is the 0th token and token n-1 doesn't exist.
This will be fixed in the next release.
Oh perfect! Happy it turned out to be “simple”! Thanks!
On Sun, Nov 3, 2024 at 11:28 AM David Kincaid @.***> wrote:
I expected this to be difficult because the textmate tokenizer doesn't preserve a lot of context across lines, but it was actually a simple index-out-of-bounds error because the - is the 0th token and token n-1 doesn't exist.
This will be fixed in the next release.
— Reply to this email directly, view it on GitHub https://github.com/godotengine/godot-vscode-plugin/issues/717#issuecomment-2453486261, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAACIVYA6CYUSSNDRUDE4SDZ6Y6IBAVCNFSM6AAAAABOI7DYBSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINJTGQ4DMMRWGE . You are receiving this because you commented.Message ID: @.***>
Godot version
v4.3.stable.official [77dcf97d8]
VS Code version
1.93.1
Godot Tools VS Code extension version
2.1.0
System information
Windows 11
Issue description
If one uses a multiline statement and one of the lines has a leading minus sign, the formatter silently breaks.
Steps to reproduce
The following examples will break the formatter.