[FEATURE] Add syntax highlighting to fenced code blocks in the VS Code extension chat panel
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
### Summary
Fenced code blocks in the Claude Code VS Code extension's chat panel render in
a flat single color regardless of the language tag ( `python , `
typescript , `diff , etc.). Tokenized syntax highlighting using the
host editor's TextMate grammars and active theme would significantly improve
readability of diffs and code suggestions.
### Current behavior
All fenced code in the chat panel is rendered as monochrome text on a dark
background. Diff markers (+/-) get a subtle background tint, but the
language inside the diff is not tokenized. Custom languages (e.g. .fga) and
standard ones (Python, TypeScript, Go) all look identical.
Screenshot:
<img width="512" height="461" alt="Image" src="https://github.com/user-attachments/assets/a1c1ee8c-0376-43ee-a157-7b0bcc530d9d" />
This is inside the vscode plugin. No syntax highlighting is available, which makes the code hard to read.
### Possible approaches
- TextMate grammar tokenization via VS Code's syntax APIs — match the
language tag against installed grammars and render tokens with the active
theme.
- Embed Shiki (already used by VS Code's markdown preview) for static
highlighting that respects the user's theme.
- Render fenced blocks via Monaco in read-only mode — heavier, but gives
full editor parity.
Option 2 is probably the lightest path and would cover the common case.
### Environment
- Claude Code VS Code extension:
<version> - VS Code:
<version> - OS: macOS / Linux / Windows
- Theme:
<theme name>
### Related
- Existing chat-panel rendering issues (e.g. #18738) suggest the renderer is
being actively touched, so this may be a natural addition.
Proposed Solution
### Expected behavior
Fenced code blocks should be tokenized using the language tag and rendered with
the user's active VS Code theme, matching the highlighting they see in the
editor for the same file type. Diff blocks should additionally tokenize the
inner language so a + line of TypeScript reads as TypeScript, not as plain
text with a green background.
Alternative Solutions
_No response_
Priority
High - Significant impact on productivity
Feature Category
Developer tools/SDK
Use Case Example
### Why this matters
- Code suggestions are the primary output of Claude Code, and reading them in
monochrome is significantly slower than reading the same code in the editor.
- For users learning a codebase or reviewing AI-suggested changes (e.g. via
slash commands that intentionally render diffs in chat instead of writing
files), the chat panel is where the code lives — so the fidelity of that
rendering matters.
- Users already have language servers, themes, and grammars configured for the
languages they work in. The chat panel is the only place in their editor that
ignores them.
Additional Context
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗