Skip to content

language: Add fallback for enum member completion highlight #27929

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

Merged
merged 1 commit into from
May 5, 2025

Conversation

xdBronch
Copy link
Contributor

@xdBronch xdBronch commented Apr 2, 2025

i tried to use variant but it wasnt giving any color despite my theme definitely having a color for it, am i doing something wrong? i think property is an alright fallback
before:
image
after:
image

Release Notes:

  • N/A

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Apr 2, 2025
@maxdeviant maxdeviant changed the title add fallback for enummember completions highlighting language: Add fallback for enum member completion highlight Apr 2, 2025
@xdBronch
Copy link
Contributor Author

xdBronch commented Apr 2, 2025

i think i somewhat understand whats happening with variant, my treesitter highlights dont use it anywhere so its not loaded. if i have match something to variant then it works here. anyone know how you might fix that? should it be a separate issue?

Copy link
Contributor

@SomeoneToIgnore SomeoneToIgnore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you.

I think variant is what has to be queried first, and only then we can fall back to property.

The code for that is on the line above with the or_else(|| .. usage, let's do that and merge the PR.

@SomeoneToIgnore SomeoneToIgnore self-assigned this May 5, 2025
@SomeoneToIgnore SomeoneToIgnore enabled auto-merge (squash) May 5, 2025 22:11
@SomeoneToIgnore SomeoneToIgnore merged commit b4653c1 into zed-industries:main May 5, 2025
19 checks passed
@xdBronch xdBronch deleted the enummember branch May 5, 2025 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed The user has signed the Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants