Persian Vazirmatn font and RTL support for the Anthropic Claude Code extension in VS Code.
What it does
Applies Vazirmatn font to the Claude Code webview UI
Switches the UI to right-to-left layout
Automatically detects Persian vs. English per paragraph, so mixed-language
messages keep each part aligned correctly instead of forcing one direction
on the whole message
Keeps the composer's mention overlay in sync with the real input, so the
caret and the visible text never drift apart when direction changes
Keeps code blocks, terminal output, Monaco editor and icons in left-to-right
Optional Ctrl+Enter-to-send, adjustable line height, and a custom composer
placeholder
Can patch Claude Code in other editors on the same machine (VS Code
Insiders, Cursor, Windsurf, Antigravity), not just the one it runs in
How it works
Claude Code's webview uses a strict Content Security Policy: inline scripts and inline styles are blocked. This extension patches Claude's webview/index.css by appending a managed CSS block (wrapped in /* claude-vazirmatn-font:start */ ... /* claude-vazirmatn-font:end */ sentinels) and ships the Vazirmatn font next to it so the webview origin can load it.
The managed block is re-applied automatically whenever Claude Code is updated, and is cleanly removed when you uninstall this extension.
Settings
claudeVazirmatnFont.enabled — master toggle
claudeVazirmatnFont.patchOnStartup — apply on VS Code startup
claudeVazirmatnFont.showReloadPrompt — prompt to reload after patching
claudeVazirmatnFont.preferredFontFamily — override the primary UI font
claudeVazirmatnFont.autoDetectDirection — auto-detect direction per paragraph (default on)
claudeVazirmatnFont.lineHeight — line spacing for RTL text (default 1.85)
claudeVazirmatnFont.inputPlaceholder — custom composer placeholder text
claudeVazirmatnFont.ctrlEnterToSend — Ctrl+Enter sends, Enter inserts a newline
claudeVazirmatnFont.patchOtherEditors — also patch Claude Code in other VS Code-family editors on this machine
Commands
Apply Persian RTL Patch — patch now
Check Claude Compatibility — verify the installed Claude folder is patchable
Restore Original Claude Files — revert changes, keeps settings
Full Cleanup and Reset Managed Settings — revert changes and remove our settings
Known limitations
RTL CSS is tuned against Claude Code 2.1.x webview structure. Future Claude releases may introduce new class names or layout primitives that need additional CSS rules.
The patcher writes to a file inside Claude Code's extension folder. VS Code will flag Claude Code as "tampered" on the next update until Claude is re-patched (this extension handles the re-patch automatically on startup).