You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE]:افزودن تنظیمات اختصاصی برای زبانهای RTL #36885
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
در حال حاضر تنظیمات جداگانهای برای زبانهای راستبهچپ ندارد.
افزودن گزینههایی مثل کنترل جهت متن، فاصلهگذاری، نمایش صحیح علائم نگارشی و پشتیبانی از فونتهای فارسی میتواند تجربه کاربران فارسیزبان را بسیار بهتر کند.
Checks for any Arabic character within the first 30 characters of the text:
Arabic found → RTL
No Arabic → LTR
Solves mixed-language cases:
"This is a long English sentence... مع عربي في النهاية" → LTR (Arabic after 48 chars)
"Hello مرحبا" → RTL (Arabic within first 30)
2. Prompt Input
Uses only 3 characters instead of 30 — switches to RTL instantly when the user types the first Arabic character.
3. List Containers (<ol>, <ul>)
These are skipped — they inherit direction from their parent (the Arabic paragraph). Individual <li> elements get direction based on their own content.
4. Locking Code & Links LTR
When an element is RTL, all code and anchor elements inside are forced LTR:
For those looking for RTL support, we've built an OpenCode plugin that automatically applies Unicode bidi isolation (RLI/LRI/PDI) to the AI's responses and system prompts.
Injects RTL system prompts so the AI responds in your language
Protects inline code (console.log()) and markdown blocks from getting scrambled by wrapping them in LTR isolates
Works out-of-the-box for Arabic, Persian, Hebrew, Urdu, etc.
Fixes character ordering and mixed-direction (BiDi) text issues
Current limitations:
Right-alignment: The plugin fixes the ordering of words and code (which fixes a lot of the unreadable output), but the text is still left-aligned. Full right-alignment requires native support in the renderer (like CSS dir="rtl" as discussed in this issue, or native alignment in the CLI TUI).
Streaming: It formats the text after the response completes. (We are proposing a streaming hook to fix this).
Closing as a duplicate of #16875, which tracks RTL (Persian/Arabic) support in the TUI. Please add your details there. In the meantime, the community opencode-rtl plugin mentioned there may help.
بهعنوان تکراریِ #16875 بسته شد؛ لطفاً جزئیات را آنجا اضافه کنید.
Activity
NXR8 commentedon Jul 16, 2026
RTL OpenCode — Arabic RTL Support System
A system that adds Right-to-Left (RTL) text support to the OpenCode Desktop app while keeping code blocks LTR.
How It Works
1. Arabic Detection
Checks for any Arabic character within the first 30 characters of the text:
Solves mixed-language cases:
2. Prompt Input
Uses only 3 characters instead of 30 — switches to RTL instantly when the user types the first Arabic character.
3. List Containers (
<ol>,<ul>)These are skipped — they inherit direction from their parent (the Arabic paragraph). Individual
<li>elements get direction based on their own content.4. Locking Code & Links LTR
When an element is RTL, all code and anchor elements inside are forced LTR:
5. MutationObserver for Streaming
Monitors DOM changes with:
Re-attaches the
inputevent listener on the prompt input when React re-renders it.Console Snippet
Testing
allow pastingin the Consolerazavioo commentedon Jul 29, 2026
Community plugin available:
opencode-rtlFor those looking for RTL support, we've built an OpenCode plugin that automatically applies Unicode bidi isolation (RLI/LRI/PDI) to the AI's responses and system prompts.
What it fixes today:
console.log()) and markdown blocks from getting scrambled by wrapping them in LTR isolatesCurrent limitations:
dir="rtl"as discussed in this issue, or native alignment in the CLI TUI).Repo: https://github.com/razavioo/opencode-rtl
razavioo commentedon Sep 27, 2026
تا زمانی که پشتیبانی بومی RTL به OpenCode اضافه بشه، میتونید از پلاگین opencode-rtl استفاده کنید.
این پلاگین تنظیمات اختصاصی RTL رو فراهم میکنه:
۱۰ زبان RTL پشتیبانی میشه: عربی، فارسی، عبری، اردو، پشتو، سندی، ییدیش، دیوهی، اویغوری، کردی.
neriousy commentedon Oct 1, 2026
Closing as a duplicate of #16875, which tracks RTL (Persian/Arabic) support in the TUI. Please add your details there. In the meantime, the community
opencode-rtlplugin mentioned there may help.بهعنوان تکراریِ #16875 بسته شد؛ لطفاً جزئیات را آنجا اضافه کنید.