Skip to content

fix(syntax): let injected markdown inherit doc comment color - #170

Merged
tecandrew merged 1 commit into
catppuccin:mainfrom
ryanwinchester:main
Sep 18, 2026
Merged

tecandrew merged 1 commit into
catppuccin:mainfrom
ryanwinchester:main

Conversation

@ryanwinchester

@ryanwinchester ryanwinchester commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Injected markdown overrode doc comment color

Languages that inject markdown into documentation strings/comments (e.g. Elixir
@doc/@moduledoc) rendered their prose in the bright foreground color instead of
the muted comment color. Zed's markdown grammar captures every (paragraph) as
@text, and the theme mapped text → c.text, which sat on top of the parent
comment.doc highlight.

Fix: remove the text syntax rule. Zed only pushes a highlight when the capture
resolves to a theme key, so with no text rule the paragraph inherits the
enclosing style. Plain .md files are unaffected: unhighlighted paragraphs fall
back to the editor's default colors.text, which is the same value.

Zed's bundled themes already follow this convention:

  • One (assets/themes/one/one.json),
  • Ayu (assets/themes/ayu/ayu.json), and
  • Gruvbox (assets/themes/gruvbox/gruvbox.json)

each define text.literal but no bare text rule, so injected markdown prose
inherits the enclosing style (e.g. comment.doc) in those themes.

Screenshots

Before

Unusable. Doc comments inject markdown, so everything is just normal bright text. Comments don't look like comments.

Screenshot 2026-09-16@09 56 07 @2x Screenshot 2026-09-16@09 52 18 @2x

After

Comments look like comments, and sanity is restored.

Screenshot 2026-09-16@09 55 35 @2x Screenshot 2026-09-16@09 51 26 @2x

@tecandrew
tecandrew merged commit 0ec5fee into catppuccin:main Sep 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants