Closed DaelonSuzuka closed 10 months ago
Will this fix the lambda_declaration
rule?
Because I was getting support.function.any-method.gdscript
(method color) for func
in func(): ...
instead of storage.type.function.gdscript
(keyword color).
Is r"..."
actually valid syntax in GDScript?
I tested in Godot 3 and 4 script editors and neither is accepting it.
It's also not listed here.
Is r"..." actually valid syntax in GDScript?
Is r"..." actually valid syntax in GDScript?
Ah I see, so it's a new feature.
"escaping" in r-strings exists, but the sequences are escaped into themselves
I've never used this r-string before, but if I understood correctly, it seems some care needs to be taken about the internal patterns, because I believe nothing inside should be colored like an escape character. It would probably need a separate rule(s). Otherwise it can be misleading and people won't understand the difference in the syntax.
For example, in r"\""
both the \
and the "
are part of the string, even though "
won't close it when preceded by \
.
So it should look like the image in this comment in those tests:
r-string stuff
Makes sense. I was just making sure they were highlighted at all.
screenshot
Wait a second, are triple single quotes valid in Godot 4? IIRC they're illegal in Godot 3 and I have them marked as such.
Will this fix the
lambda_declaration
rule? Because I was gettingsupport.function.any-method.gdscript
(method color) forfunc
infunc(): ...
instead ofstorage.type.function.gdscript
(keyword color).
This is what I'm currently seeing:
How strange ... this is what I'm getting (both when Godot is connected or disconnected).
I'm on geequlim.godot-tools v1.3.1
on VSCodium v1.84.2
I've also disabled all other godot-related extensions (to make sure mine wasn't interfering somehow), same result.
I think I took those screenshots with this PR, not 1.3.1
. Would you mind checking with master
to make sure that this is working correctly for you?
(both when Godot is connected or disconnected)
Why would this matter?
Why would this matter?
I think LSP can affect some highlighting behaviour IIRC
It could, if the Godot LSP supported semantic tokenization, but it doesn't.
Wait a second, are triple single quotes valid in Godot 4? IIRC they're illegal in Godot 3 and I have them marked as such.
Triple single quotes for multiline strings have always been allowed, even in Godot 1.0.
Wait a second, are triple single quotes valid in Godot 4? IIRC they're illegal in Godot 3 and I have them marked as such.
Triple single quotes for multiline strings have always been allowed, even in Godot 1.0.
For some reason, 2 years ago I thought it wasn't. Maybe I wrote a python-style docstring, got an error, and assumed, who knows?
Either way I've fixed it now.
_
spacers in numeric literals