AppFlowy-IO / AppFlowy-IO/AppFlowy
[FR] Add syntax highlighting support for Alif (Arabic Programming Language) in code blocks
- 主要语言
- Dart
- 星标
- 76.6k
- 派生
- 6k
- PR 合并指标
- 30 天内没有已合并 PR
描述
### Description
When writing documentation, tutorials, or personal notes in Arabic using AppFlowy, developers and educators who use Alif (لغة البرمجة العربية ألف) cannot get syntax highlighting inside code blocks.
Currently, selecting standard languages (such as Python or C++) does not recognize native Arabic keywords (e.g., دالة, متغير, إذا, طبع), leaving the code unhighlighted or rendering as plain text.
1. Language Option: Add Alif (or ألف) to the language selection dropdown in AppFlowy's code block component.
2. Syntax Highlighting: Implement basic syntax rules for Alif code constructs:
Keywords: دالة, متغير, إذا, وإلا, لكل, طالما, إرجاع, صنف, استورد, صحيح, خطأ
Built-in Functions: طبع(), قراءة(), نوع()
Comments: Single-line comments starting with #
Strings & Numbers: Arabic and standard string literals ("...", '...') and numbers
3. RTL / Text Rendering: Ensure code
blocks containing right-to-left (RTL) Arabic syntax display smoothly without text layout or character wrapping issues.
### Impact
Supporting Alif in AppFlowy will greatly improve the experience for Arabic-speaking developers, educators, and students who use AppFlowy for tech documentation and learning management.
### Additional Context
Alif Language Repository: [github.com/alifcommunity/Alif](https://github.com/alifcommunity/Alif)
Sample Alif Code Snippet:
مقتطف الرمز
# برنامج بسيط بلغة ألف
دالة رئيسية()
الاسم = "عالم"
إذا الاسم != "":
طبع("أهلاً بك يا ", الاسم)
贡献指南
这个仓库没有索引到贡献指南
评估
这个 Issue 还没有评估数据。