Files
zed/crates/languages
Riddhi Gupta 0967dd028c Fix C++ lambda specifier highlighting (#66406)
## Summary
Closes #66169

Fixed missing syntax highlighting for C++ lambda specifiers and the
defined preprocessor operator.

- Added lambda_specifier to the C++ keyword captures so mutable and
static lambda specifiers are highlighted correctly
- Highlighted defined as a preprocessor keyword
- Highlighted the identifier inside defined(...) as a macro constant
- Add a regression test to verify that all four tokens receive the
expected captures.

## Testing

- cargo test -p languages: 109 passed, 0 failed
- cargo test -p languages
test_cpp_highlights_query_captures_lambda_and_defined_keywords: passed
- cargo fmt --all -- --check: passed.

Manually tested on Windows using a locally built Zed instance:
<img width="512" height="471" alt="zed_test"
src="https://github.com/user-attachments/assets/f4ae3b5b-5e3e-4eb9-9d96-caf8923a37a0"
/>

## Self-review

- [X] I've reviewed my diff for quality, security, reliability, and
performance.
- [X] UI changes follow the
[checklist](https://zed.dev/docs/development/ui-checklist).
- [X] Tests cover the new or changed behavior.

Release Notes:

- Fixed missing syntax highlighting for C++ lambda specifiers and the
defined preprocessor operator
2026-11-02 12:37:09 +00:00
..