[FEATURE] Markdown syntax highlighting in prompt input field

Resolved 💬 2 comments Opened Feb 3, 2026 by macintacos Closed Mar 3, 2026

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

When composing prompts in Claude Code's TUI, the input field displays plain monochrome text. Users who write structured prompts using markdown (headers, code blocks, bold, lists) have no visual feedback about their formatting while typing.

This makes it harder to:

  • Verify structure at a glance while composing
  • Catch formatting mistakes before submission
  • Maintain mental model of prompt organization

This is distinct from existing requests:

  • Output rendering (#13600) — rendering Claude's responses as formatted markdown
  • External editor support (#4922) — opening $EDITOR to compose prompts (implemented via Ctrl+E)

The request here is for live syntax highlighting of markdown source in the prompt input itself — not rendered output, but styled source text like code editors display.

Proposed Solution

Apply syntax highlighting to markdown in the prompt input as the user types:

  • Headers (#, ##) — distinct color or weight
  • Bold/italic (**text**, *text*) — markers and text styled
  • Code blocks (triple backticks) — distinct background or color
  • Inline code (single backticks) — monospace with tint
  • Lists (-, *, 1.) — accent color on markers
  • Links ([text](url)) — differentiated colors for text vs URL

This mirrors how editors like Neovim (with treesitter) or VSCode highlight markdown source files — the syntax is styled to show structure, not rendered into formatted output.

Alternative Solutions

  • Current workaround: Ctrl+E opens the prompt in $EDITOR, which provides syntax highlighting if configured. This works but adds friction for quick prompts.
  • Opt-in setting: Could be a toggle in settings for users who prefer plain text input.

Priority

Medium - Would be very helpful

Feature Category

Interactive mode (TUI)

Use Case Example

When writing a structured prompt like:

## Context
Working on `src/auth/login.ts` which handles OAuth.

## Problem
The **refresh token** logic has a race condition when:
- Multiple tabs are open
- Token expires simultaneously

## Request
Review and suggest a fix using a mutex pattern.

With syntax highlighting, headers would stand out in a distinct color, inline code (src/auth/login.ts) would be visually distinct, bold markers would be styled, and list items would have colored bullets — all visible while typing, making it easier to compose well-organized prompts without switching to an external editor.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗