# languages: Fix C/C\+\+ preprocessor directive highlight regression \(\#49031\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/c4d700446eaa1626ec68870933a1486556b691a1)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: c4d700446eaa1626ec68870933a1486556b691a1

Requested commit: c4d700446eaa1626ec68870933a1486556b691a1

Commit: c4d700446eaa1626ec68870933a1486556b691a1

Tree: 3795763ff081f4f562abebd662eedc31fd0fddb6

Author: Wuji Chen

Committer: GitHub

## Message

```
languages: Fix C/C++ preprocessor directive highlight regression (#49031)

## Summary

- PR #48109 changed the capture name for C/C++ preprocessor directives
from `@keyword.directive` to `@preproc`. While semantically correct, the
builtin themes had `preproc` defined with colors nearly
indistinguishable from plain text (e.g. One Dark `#dce0e5ff`, Ayu Dark
`#bfbdb6ff`), making `#include`, `#define`, etc. appear unhighlighted.
- This PR updates the `preproc` color in all builtin themes (and the
fallback theme) to match their respective `keyword` color, restoring
visible highlighting for preprocessor directives.

Fixes #49024

## Side effects

- Go uses `@preproc` for `//go:` and `// +build` compiler directives.
These will also change from the previous muted gray to the keyword
color. This is arguably an improvement — compiler directives are special
constructs that benefit from visible highlighting, consistent with how
other editors (CLion, VS Code) handle them.

## Test plan

- [x] `cargo test -p language highlight_map` passes
- [x] Open a C/C++ file and verify `#include`, `#define`, `#ifdef`, etc.
are highlighted with the keyword color
- [x] Verify across multiple builtin themes (One Dark, Ayu Dark, Gruvbox
Dark, etc.)
- [x] Open a Go file and verify `//go:` directives are highlighted
reasonably

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Release Notes:

- Fixed C/C++ preprocessor directives (`#include`, `#define`, etc.)
appearing unhighlighted in builtin themes.

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: MrSubidubi <finn@zed.dev>
```

## Parents

- [e0b9c3afd01d30d37732467ed7d885152da1da95](https://git.cafe/gitcafe/zed/commit/e0b9c3afd01d30d37732467ed7d885152da1da95?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/c4d700446eaa1626ec68870933a1486556b691a1?format=markdown)
