Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Claude Code RTL (Arabic)New to Visual Studio Code? Get it now.
Claude Code RTL (Arabic)

Claude Code RTL (Arabic)

Mohamed Masoud

|
1 install
| (1) | Free
Renders Arabic text right-to-left in the Claude Code for VS Code chat. English, code blocks, tool calls and thinking blocks stay left-to-right.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Claude Code RTL (Arabic)

English | العربية

Makes the Claude Code for VS Code chat render Arabic text right-to-left — both the conversation and what you type. English stays left-to-right. Code blocks, tool calls and thinking blocks always stay left-to-right — even when their content is Arabic.

Commands

Open the Command Palette (Cmd/Ctrl+Shift+P):

  • Claude Code RTL (Arabic): Enable RTL
  • Claude Code RTL (Arabic): Disable RTL

After enabling or disabling, choose Reload when prompted so the change takes effect.

How it works

VS Code isolates each extension's webview, so there is no API for one extension to style another's chat UI. This extension therefore appends a small, marked, auditable block to Claude Code's own webview assets on disk (webview/index.css and webview/index.js):

  • A CSS block forces code / tool / thinking subtrees to stay LTR.
  • A tiny script sets dir="rtl" on each message block whose first word is Arabic (a debounced MutationObserver keeps up with streaming). Detection targets the Arabic Unicode block, so Hebrew stays LTR.
  • The composer input flips too: your Arabic text right-aligns as you type — both the caret and the visible text — while English stays left.

Direction is decided per paragraph, so a message mixing Arabic and English paragraphs renders each side correctly.

Auto re-apply on update

A Claude Code update replaces its files and wipes the patch. This extension watches for extension changes and re-applies the patch silently on the next startup or update, then offers a Reload prompt.

Limitations

  • Arabic and Persian share the same script, so pure Persian text may also render RTL. This is an accepted, unavoidable limitation for Arabic users. Hebrew is cleanly excluded.
  • This modifies another extension's installed files. That is the only way to reach its webview. The patch is marker-delimited and fully removed by Disable RTL.

Develop

npm install
npm run build        # or: npm run watch
npm run typecheck

Press F5 to launch an Extension Development Host with the real Claude Code extension installed, then run Enable RTL.

Build outputs:

  • dist/extension.js — the extension (Node).
  • dist/rtl.runtime.js — the compiled webview payload (browser IIFE).
  • dist/rtl.css — the CSS payload.

Contributing

Contributions are welcome. Fork the repo and open a pull request — every PR requires the maintainer's review and approval before it can be merged into main.

License

MIT © Mohamed Masoud. Free to use, modify and distribute.


العربية

تجعل محادثة Claude Code for VS Code تعرض النص العربي من اليمين إلى اليسار — سواء في المحادثة أو فيما تكتبه أنت. يبقى النص الإنجليزي من اليسار إلى اليمين. وتبقى كتل الأكواد واستدعاءات الأدوات وكتل التفكير من اليسار إلى اليمين دائمًا — حتى لو كان محتواها عربيًا.

الأوامر

افتح لوحة الأوامر (Cmd/Ctrl+Shift+P):

  • Claude Code RTL (Arabic): Enable RTL — تفعيل الاتجاه من اليمين إلى اليسار
  • Claude Code RTL (Arabic): Disable RTL — تعطيله

بعد التفعيل أو التعطيل، اختر Reload عند طلب ذلك حتى يسري التغيير.

كيف تعمل

يعزل VS Code واجهة كل إضافة (webview)، فلا توجد واجهة برمجية تتيح لإضافةٍ أن تنسّق واجهة إضافةٍ أخرى. لذلك تُلحق هذه الإضافة كتلةً صغيرة وموسومة وقابلة للمراجعة بملفات واجهة Claude Code على القرص (webview/index.css و webview/index.js):

  • كتلة CSS تُجبر الأكواد والأدوات وكتل التفكير على البقاء من اليسار إلى اليمين.
  • سكربت صغير يضبط dir="rtl" على كل كتلة نص تبدأ كلمتها الأولى بالعربية (مع MutationObserver يواكب البثّ المتدفق). يعتمد الكشف على نطاق يونيكود العربي فقط، لذا يبقى العبري من اليسار إلى اليمين.
  • يُضبط اتجاه حقل الإدخال أيضًا: يُحاذى نصك العربي إلى اليمين أثناء الكتابة — المؤشر والنص المرئي معًا — بينما يبقى الإنجليزي إلى اليسار.

يُحدَّد الاتجاه لكل فقرة على حدة، فالرسالة التي تخلط العربية والإنجليزية تُعرض كل جانبٍ منها بشكل صحيح.

إعادة التطبيق التلقائية عند التحديث

يستبدل تحديث Claude Code ملفاته ويمحو التعديل. تراقب هذه الإضافة تغيّرات الإضافات وتعيد تطبيق التعديل بصمت عند بدء التشغيل التالي أو عند التحديث، ثم تعرض زر Reload.

القيود

  • تتشارك العربية والفارسية الحروف نفسها، لذا قد يُعرض النص الفارسي الخالص من اليمين إلى اليسار أيضًا. هذا قيد مقبول وغير قابل للتفادي لمستخدمي العربية. أما العبري فمُستثنى بوضوح.
  • تعدّل الإضافة ملفات إضافةٍ أخرى مثبّتة على القرص. هذه هي الطريقة الوحيدة للوصول إلى واجهتها. التعديل موسوم بعلامات ويُزال بالكامل عبر Disable RTL.

التطوير

npm install
npm run build        # or: npm run watch
npm run typecheck

اضغط F5 لتشغيل Extension Development Host مع تثبيت إضافة Claude Code الحقيقية، ثم شغّل Enable RTL.

مخرجات البناء:

  • dist/extension.js — الإضافة (Node).
  • dist/rtl.runtime.js — حِمل الواجهة المُصرَّف (browser IIFE).
  • dist/rtl.css — حِمل CSS.

المساهمة

المساهمات مرحّب بها. انسخ المستودع (Fork) وافتح Pull Request — وكل طلب دمج يتطلب مراجعة صاحب المستودع وموافقته قبل دمجه في الفرع main.

الترخيص

MIT © محمد مسعود. حر الاستخدام والتعديل وإعادة التوزيع.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft