mirror of
https://github.com/zed-industries/zed.git
synced 2026-05-23 12:37:09 +00:00
Adds a `markdown_preview_code_font_family` setting that overrides the font used in the markdown preview for code — inline `code` spans and fenced code blocks. This is the counterpart to `markdown_preview_font_family` (#54003), which already does this for body text. Together they let you choose a typographically matched body + code font pair for the preview without forcing the code font onto editor buffers, where it may not be a good coding font: ```json { "markdown_preview_font_family": "Noto Serif", "markdown_preview_code_font_family": "Noto Sans Mono" } ``` Behavior mirrors `markdown_preview_font_family`: - Scoped to the markdown preview only (`MarkdownFont::Preview`). The agent panel, notifications, hover popovers, and REPL output are unaffected — they keep using the buffer font for code. - Falls back to the buffer font family when unset, so existing previews are unchanged. - Overrides the font family only; fallbacks and features still come from the buffer font. Before (uses buffer font, here Iosevka): <img width="509" height="368" alt="Screenshot 2026-05-14 at 1 39 51 PM" src="https://github.com/user-attachments/assets/6b7e49b2-fc6e-4db1-9679-392b3447f411" /> After (uses specified font, here Noto Sans Mono): <img width="508" height="368" alt="Screenshot 2026-05-14 at 1 40 51 PM" src="https://github.com/user-attachments/assets/f911c99b-08f8-4336-83eb-54b555f11c54" /> Release Notes: - Added `markdown_preview_code_font_family` to override the code font in the markdown preview |
||
|---|---|---|
| .. | ||
| examples | ||
| src | ||
| Cargo.toml | ||
| LICENSE-GPL | ||