Pawel Lampe

Results 139 comments of Pawel Lampe
trafficstars

Hi, that's true - gdscript-mode in Melpa is of very low quality. I wrote over 2k LOC of GDScript using it and it was so painful I finally started looking...

Multiline lambdas are currently not supported. They won't be anytime soon as it requires writing a custom lexer to avoid ambiguity on the parser level.

As far as I remember the clash was on newlines/indent/dedent. The key thing is to get proper indent/dedent when in `([{`.

> So what is the current way to work around this? As this seems to be a lexer error, we can't really `gdlint: disable`, I assume. Is there a way...

@Skyway666 that's a good point - I can try exploring that. It's definitely not as simple as writing a single `if` statement or so, but maybe with some more conditions,...

@MikeSchulze since it does happen on the parser level, the `# gdlint:disable=` is not possible. I'll try to fix it at some point probably. Anyway, it's still a low prio...

> > > So what is the current way to work around this? As this seems to be a lexer error, we can't really `gdlint: disable`, I assume. Is there...

> @Scony I wholly understand that this issue is very tricky to fix, but a callout in the main documentation that multiline lambdas are currently causing `gdformat` to error out...

> Any news on this subject ? It's WIP, you can track progress here: https://github.com/Scony/godot-gdscript-toolkit/commits/multiline-lambdas/ TL;DR the lexer and parser support is done, the formatter support is like 5% done.