Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix various syntax highlighting issues #674

Merged
merged 6 commits into from
Jul 2, 2024

Conversation

DaelonSuzuka
Copy link
Collaborator

Old:

Code_EHbXfjjetl

New:

Code_RQj17cr7tR

@DaelonSuzuka
Copy link
Collaborator Author

I'm currently experiencing a very strange issue:

image

preload() is supposed to be dark blue like a keyword, but it's white. It has this meta.global-method tag, which is NOT PRESENT in the GDScript grammar:

image

It doesn't happen in my Extension Development Host, it only happens when I actually build and install a .vsix:

image

I originally thought I was using some regex rule that works differently in debug vs prod builds, but I created an empty VSCode profile and installed only the .vsix build, and the highlighting is correct there. This has to be coming from another extension.

@RedCMD do you know how to determine the origin of a particular textmate scope or audit all my installed extensions or something?

@RedCMD
Copy link

RedCMD commented Jul 1, 2024

you could try installing the pre-release of my extension
then click the TextMate flower on the sidebar

currently it won't always pick the correct grammar if there are multiple with the same scopeName
I'll have to work on that soon™️

I think the extension host has priority over other extensions
which have priority over the builtin's
and iirc I think order is determined by which extension loads/activates last

@Calinou Calinou added the bug label Jul 1, 2024
@DaelonSuzuka
Copy link
Collaborator Author

you could try installing the pre-release of my extension
then click the TextMate flower on the sidebar

God damn, that's cool! Tracing the call stack found the exact culprit in about 15 seconds! A theme I had installed also had an injection grammar with a couple of extra rules, and the tags came from there.

Thanks for the quick response, you and your extension are an unbelievable help.

I think the extension host has priority over other extensions

Lol, I forgot to mention that I run my extension host with a temporary, clean profile to reduce load times and to avoid negative/accidental interactions with other extensions. That's why it worked when debugging but not when I installed the .vsix into my main profile.

@DaelonSuzuka DaelonSuzuka merged commit 9750f8d into godotengine:master Jul 2, 2024
4 checks passed
@DaelonSuzuka DaelonSuzuka deleted the highlighting_fixes branch July 2, 2024 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants