-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Enhance syntax highlight for C++20 keywords #36817
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
Conversation
|
We require contributors to sign our Contributor License Agreement, and we don't have @caiopiccirillo on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'. |
|
@cla-bot check |
|
The cla-bot has been summoned, and re-checked this pull request! |
| (module_name | ||
| (identifier) @module))) | ||
|
|
||
| (co_await_expression |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right now co_await and company get different highlights than return; I don't believe that's desirable given that co_await is a control flow construct. Can we have them share the highlights with return, as it is today?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
Thanks! |
Closes zed-industries#36439 and zed-industries#32999 ## C++20 modules: Before (Zed Preview v0.201.3): <img width="1048" height="704" alt="image" src="https://github.com/user-attachments/assets/8eaaf77f-4e27-4a5a-9e87-4e5ba7293990" /> After: <img width="1048" height="704" alt="image" src="https://github.com/user-attachments/assets/df8d0b2c-f2d0-4b0e-9a52-495e6be5a8c0" /> ## C++20 coroutines: Before (Zed Preview v0.201.3): <img width="1048" height="704" alt="image" src="https://github.com/user-attachments/assets/652191ec-a653-444d-a239-da3e4e4b661e" /> After: <img width="1048" height="704" alt="image" src="https://github.com/user-attachments/assets/36947eb5-8997-483a-b36c-8af84872b158" /> ## Logical operators: Before (Zed Preview v0.201.3): <img width="511" height="102" alt="image" src="https://github.com/user-attachments/assets/9bf95bac-b076-4edd-a1f3-c3dfee98c2fd" /> After: <img width="511" height="102" alt="image" src="https://github.com/user-attachments/assets/82c7564d-b94d-41f5-9c48-e39fe3ba3b3e" /> ## Operator keyword: Before (Zed Preview v0.201.3): <img width="591" height="381" alt="image" src="https://github.com/user-attachments/assets/1d9dad05-2d86-4566-97f4-aff440dcd1df" /> After: <img width="591" height="381" alt="image" src="https://github.com/user-attachments/assets/a1ca289a-8a5d-4ffd-96db-0d511405da4b" /> ## Goto: Before (Zed Preview v0.201.3): <img width="610" height="430" alt="image" src="https://github.com/user-attachments/assets/2d00382b-d1ad-4e36-a3ee-88e06ec528ed" /> After: <img width="610" height="430" alt="image" src="https://github.com/user-attachments/assets/de887b21-66f0-4a70-9ed2-e18dbb3c81c9" /> Release Notes: - Enhance keyword highlighting for C++
Closes zed-industries#36439 and zed-industries#32999 ## C++20 modules: Before (Zed Preview v0.201.3): <img width="1048" height="704" alt="image" src="https://github.com/user-attachments/assets/8eaaf77f-4e27-4a5a-9e87-4e5ba7293990" /> After: <img width="1048" height="704" alt="image" src="https://github.com/user-attachments/assets/df8d0b2c-f2d0-4b0e-9a52-495e6be5a8c0" /> ## C++20 coroutines: Before (Zed Preview v0.201.3): <img width="1048" height="704" alt="image" src="https://github.com/user-attachments/assets/652191ec-a653-444d-a239-da3e4e4b661e" /> After: <img width="1048" height="704" alt="image" src="https://github.com/user-attachments/assets/36947eb5-8997-483a-b36c-8af84872b158" /> ## Logical operators: Before (Zed Preview v0.201.3): <img width="511" height="102" alt="image" src="https://github.com/user-attachments/assets/9bf95bac-b076-4edd-a1f3-c3dfee98c2fd" /> After: <img width="511" height="102" alt="image" src="https://github.com/user-attachments/assets/82c7564d-b94d-41f5-9c48-e39fe3ba3b3e" /> ## Operator keyword: Before (Zed Preview v0.201.3): <img width="591" height="381" alt="image" src="https://github.com/user-attachments/assets/1d9dad05-2d86-4566-97f4-aff440dcd1df" /> After: <img width="591" height="381" alt="image" src="https://github.com/user-attachments/assets/a1ca289a-8a5d-4ffd-96db-0d511405da4b" /> ## Goto: Before (Zed Preview v0.201.3): <img width="610" height="430" alt="image" src="https://github.com/user-attachments/assets/2d00382b-d1ad-4e36-a3ee-88e06ec528ed" /> After: <img width="610" height="430" alt="image" src="https://github.com/user-attachments/assets/de887b21-66f0-4a70-9ed2-e18dbb3c81c9" /> Release Notes: - Enhance keyword highlighting for C++

Closes #36439 and #32999
C++20 modules:
Before (Zed Preview v0.201.3):


After:
C++20 coroutines:
Before (Zed Preview v0.201.3):


After:
Logical operators:
Before (Zed Preview v0.201.3):

After:

Operator keyword:
Before (Zed Preview v0.201.3):

After:

Goto:
Before (Zed Preview v0.201.3):

After:

Release Notes: