Native-like RTL support for VS Code and Cursor AI agents, with proper LTR code blocks. Optimized for Hebrew, Arabic, and Persian.
code --install-extension <file>.vsixCopies a short prompt — paste it into Cursor (or another AI agent) to set this up for you.
Right-to-Left support for AI chat agents in VS Code / Cursor / Antigravity. Auto-detects Hebrew, Arabic, Persian and applies proper RTL styling while keeping code blocks LTR. Adds support for Cursor's native chat (Composer/Agent panel) on top of the upstream extension (Copilot, Claude Code, Codex, Gemini).
Prerequisite: the Custom CSS and JS Loader extension (be5invis.vscode-custom-css) must be installed too.
Install: download the latest VSIX from Releases → code --install-extension <file>.vsix, then follow the Custom CSS Loader activation steps.
Fork notice: This is a fork of
[GuyRonnen/rtl-for-vs-code-agents](https://github.com/GuyRonnen/rtl-for-vs-code-agents)(GPL-3.0), with added support for Cursor's native chat (Composer/Agent panel) and a few related fixes. All of the original extension's features — Copilot, Claude Code, Codex (ChatGPT), Gemini, Antigravity — are preserved. See Changes from upstream below for details.Maintained as a separate extension because the upstream maintainer hasn't yet reviewed the Cursor support PR (#11). If/when it's merged upstream, this fork may be retired in favor of the original. Until then, install the VSIX from this fork's Releases page.
🤖 Note for AI Code Agents: If you are an AI agent (Claude, Copilot, Cursor, etc.) and the user asked you to install this extension, all you need to do is download the latest VSIX from the Releases page and install it in the user's editor. Important: there is a prerequisite — the Custom CSS and JS Loader extension must be installed as well, so install that one too.
Right-to-Left (RTL) support for AI chat agents in VS Code / Cursor / Antigravity
Automatically detects Hebrew, Arabic, Persian, and other RTL languages and applies proper RTL styling.
No comments yet.
Auto Approve Plans (off by default), so Accept this plan? stays manual unless you enable it. The settings are persistent across sessions. YOLO Mode Auto Approve PlansCopilot, Claude Code & Gemini Code Assist!
RTL is automatically applied for all RTL texts in: user messages, agent responses, input box, and even agent questions in Plan Mode. All align right for RTL content:
Gemini Code Assist RTL
When Claude Code asks you questions (e.g. in Plan Mode), the popup now fully supports RTL — question text, option labels, descriptions, and navigation tabs all align right for Hebrew/RTL content. The free-text "Other" input also switches to RTL automatically.
Agent Questions RTL
Session titles in the chat history dropdown now align right for RTL content. The dropdown is wider and taller, and titles wrap instead of being truncated. The current session title in the header also wraps and grows with content.
Conversation History RTL
Any RTL issues? Click the RTL status bar button to check for updates! Also - The extension checks for updates every time you restart VS CODE.
Check for updates
Follow these steps in order:
This is required by the RTL extension to inject styles into the chat UI.
Ctrl+Shift+X), search for Custom CSS and JS Loader by be5invis, click Install.… menu → Install from VSIX… → select the downloaded file..vsix file from this fork's Releases page.Ctrl+Shift+X) → click the … menu at the top → Install from VSIX… → select the downloaded file.
Install from VSIXOpen the Command Palette (Ctrl+Shift+P) and run Enable Custom CSS and JS (from the Custom CSS Loader extension), then reload the window when prompted.
That's it for most users — open any agent chat and try typing Hebrew/Arabic/Persian text. Right-to-left should kick in automatically.
The extension wires itself up on install, but on some setups (and after VS Code/Cursor updates) the imports list or the agent webviews need a manual nudge. Click the RTL indicator in the status bar (bottom-right of the editor) and run these actions in order — or use the Command Palette and search for RTL for VS Code Agents::
vscode_custom_css.imports in your settings.is all you need!
Commands
Settings
| Setting | Default | Description |
|---|---|---|
rtlForVsCodeAgents.autoInject | true | Automatically inject RTL into new Claude Code / Codex / Gemini versions |
rtlForVsCodeAgents.checkIntervalHours | 0 | How often to check (0 = startup only) |
rtlForVsCodeAgents.autoConfigureCustomCss | false | Automatically configure Custom CSS Loader |
rtlForVsCodeAgents.autoCheckUpdates | true | Automatically check for extension updates from GitHub on startup |
rtlForVsCodeAgents.updateCheckIntervalHours | 24 | How often to check for updates (0 = startup only) |
rtlForVsCodeAgents.userMessageBorder | true | Show coral border on user messages. Easier to toggle via right-click on ↑↓ buttons |
rtlForVsCodeAgents.yoloCountdownSeconds | 5 | YOLO mode countdown before auto-approve (0 = instant). Easier to change via right-click on the 💪 button |
rtlForVsCodeAgents.markdownPreviewRtl | true | RTL in the Markdown document Preview tab — per-block direction, plus full RTL for RTL-dominant docs |
Troubleshooting
| Problem | Solution |
|---|---|
| "[Unsupported]" in title bar | Normal - this is expected when using Custom CSS |
| RTL not working in Claude Code / Codex / Gemini | Run "Check and Inject" command |
| RTL not working in Copilot | Run "Configure Custom CSS Loader", then "Enable Custom CSS and JS" |
| RTL stopped after VS Code update | The extension will notify you automatically — click "Enable Custom CSS" and run "Reload Window" |
Manual Installation (Advanced)
For manual installation or troubleshooting, scripts are available:
powershell -ExecutionPolicy Bypass -File .\install.ps1
./install.sh
# Windows
powershell -ExecutionPolicy Bypass -File .\diagnose-rtl.ps1
# Mac/Linux
./diagnose-rtl.sh
Changelog
[data-testid="agent-transcript-ask-question-card"]) now get RTL when they contain Hebrew/Arabic. This bubble has no semantic class — Cursor renders it as a plain <div><span> with only hashed, build-specific utility classes — so it was invisible to the existing .user-questionnaire-answer-text selector. Detection now anchors on the stable data-testid and the DOM depth relative to it instead.rtlForVsCodeAgents.markdownPreviewRtl setting (on by default). Every paragraph, heading, list item, blockquote and table cell picks its own direction from its content, so Hebrew/Arabic blocks read right-to-left while English blocks stay left-to-right. When a document is RTL overall, the content root gets a real direction: rtl, which also moves list markers and blockquote rules to the right side and flips table column order.data-rtl-md attribute written on the wrapper above the ProseMirror root (verified seven levels above div.tiptap.ProseMirror), which is outside the subtree ProseMirror observes. Nothing is ever written inside that root. The attribute is only rewritten when the value actually changes, and direction detection samples just the leading blocks with a short-lived cache, so the periodic pass stays cheap on large documents.<div dir="rtl"> in a Markdown file has no effect in this tab: ProseMirror parses HTML through its own schema and discards elements and attributes it doesn't model, so the dir never reaches the DOM. This setting is the supported way to get the same result.vscode_custom_css.imports on upgrade — configureCustomCss() was the only writer and it only runs automatically when autoConfigureCustomCss is on, which is off by default. So after installing a new VSIX the new version was installed and active while Custom CSS kept loading the previous version's script, with no indication anything was wrong. The extension now repairs its own import paths on every startup, and when it finds stale ones it offers to reload Custom CSS and JS (and then the window) for you instead of leaving you to run the disable/enable cycle by hand. Only entries the extension owns are rewritten; other imports are left untouched.unicode-bidi: plaintext on cells), with no DOM writes at all in those surfaces.characterData mutations report the text node, not an element, so the editor-area guard never matched them — every text change inside a Markdown document scheduled a full document-wide RTL pass. The guard now resolves text nodes through their parent.Array.some() closure, \p{L} is no longer re-tested per character, and direction detection caps its scan, so the periodic pass stays cheap on long documents and wide tables.applyTableRTL() only writes when the RTL state actually changed or a re-render stripped its styles, instead of rewriting every cell on every tick..user-questionnaire-answer-text) now get direction: rtl and text-align: right when the content is RTL, same as other user message bubbles..markdown-editor-react, .markdown-body) now get proper RTL — direction: rtl plus text-align: right on th/td so mixed Hebrew/English is readable and flush right. English-only tables stay LTR. Lightweight pass only (no preview freeze). Also applies to tables inside chat markdown.product.json checksums with the modified workbench.html (the file the Custom CSS and JS Loader patches). Runs on startup (rtlForVsCodeAgents.autoFixChecksums, on by default) and also available as commands "Fix Editor Checksums" / "Restore Editor Checksums". Keeps a backup at product.json.orig.<version> and self-heals after editor updates / Custom CSS enable-disable cycles. On Windows the install folder may require admin rights..markdown-editor-react, .ui-rich-text-editor[data-variant="document"], classic .markdown-body / .markdown-preview) so opening an .md file in Preview no longer freezes the IDE from MutationObserver / polling on hundreds of nodes..editor-container / .editor-group-container — Composer and agent messages keep RTL as before.Auto Approve Plans to the YOLO right-click popup, off by default, so Accept this plan? stays manual unless explicitly enabled<mark> highlighting for every match across user + agent messages. Navigate with ↑/↓ or Enter / Shift+Enter. Case-insensitive, closes on × or Esc. Counter shows position (e.g. 3/12).userMessageBorder setting and instant right-click toggle on ↑↓ navigation buttons — toggle the coral border on user messages on/off without reload (persisted via localStorage)yoloCountdownSeconds) or right-click on the 💪 button for instant changes, including the new Auto Approve Plans toggle**term** (English explanation)) now correctly align RTL. Fixed by injecting RLM anchors and switching from unicode-bidi: plaintext to isolate.unicode-bidi: bidi-override across all chat content (tables, lists, headings, etc.) — not just RTL-marked elementsdata-rtl-applied marker so the bidi-override CSS fix covers them too* { unicode-bidi: bidi-override } rule added in Claude Code v2.1.63 that broke all RTL text renderingvscode_custom_css.imports — old RTL paths are cleaned up automatically on each configureRTL v7.5.1 button in the status bar to open a quick menu with all extension actions — also triggers an update check in the backgroundautoCheckUpdates and updateCheckIntervalHours control automatic checkingOlder versions
This fork adds the following on top of [GuyRonnen/rtl-for-vs-code-agents](https://github.com/GuyRonnen/rtl-for-vs-code-agents) v10.1.0:
.markdown-root > div) are right-aligned, with code blocks preserved as LTR.direction: rtl rule on .composer-human-message .justify-between..composer-input div[contenteditable="true"]) switches direction based on typed content.rtlForVsCodeAgents.monacoRtlEnabled setting (default: false) — controls whether RTL is applied inside Monaco editor instances. Off by default because right-aligning Hebrew/Arabic inside a regular code editor window breaks caret movement and text selection. Enable it if you specifically want Copilot's Monaco-based chat input to flip direction; chat messages get RTL either way.rtl-config.js file next to the main script and adds it to vscode_custom_css.imports before the main script. Required because the Custom CSS Loader inlines imported scripts into workbench.html and doesn't re-run the extension's config block on settings changes — without this, the main script couldn't see updated settings on a Disable/Enable cycle.See PR #11 on the upstream repo for the full diff.
This extension is a fork of [GuyRonnen/rtl-for-vs-code-agents](https://github.com/GuyRonnen/rtl-for-vs-code-agents) by Guy Ronnen — all original features and the vast majority of the code are his work.
The YOLO Mode feature (auto-approve with countdown) is based on the original idea and JavaScript snippet by Chris Le — see the original gist.
GPL-3.0, inherited from the original project. See LICENSE.txt. Original work © Guy Ronnen and contributors; fork modifications © 2026 udah1, also released under GPL-3.0.