Antigravity RTL Support

A lightweight Visual Studio Code / Antigravity IDE extension designed specifically to patch and fix Right-to-Left (RTL) text rendering for Hebrew and Arabic within the built-in AI Chat interface.
This extension automatically ensures that while RTL text aligns perfectly to the right, code blocks (<pre>, <code>), English segments, and interactive buttons remain correctly formatted from Left-to-Right (LTR).
Key Features
- 🌐 Automatic RTL Text Alignment: Fixes inverted or left-aligned Hebrew and Arabic text inside the IDE's AI chat interface.
- 🧠 Smart Formatting Exclusions: Retains original LTR layout and syntax formatting for code blocks, pre-formatted strings, inline code markdown, and status buttons.
- ⚡ Toggle via Command Palette: Easily enable or disable the RTL styling patches on-the-fly without manually modifying configuration files.
- 🎨 List Padding Alignments: Re-adjusts standard list margins (bulleted and numbered lists) to align on the right side when containing RTL content.
- 💾 Persistent Preference: Saves the active injection state across IDE workspaces, windows, and restarts.
How It Works
Antigravity IDE dynamically renders chat content. This extension patches the underlying VS Code workbench file (workbench.desktop.main.js) to inject a lightweight script.
The injected script:
- Installs a
MutationObserver that listens for updates to the chat window.
- Scans text elements dynamically for Hebrew (
\u0590-\u05FF) or Arabic (\u0600-\u06FF, etc.) characters.
- Automatically applies the inline CSS styles
direction: rtl !important and text-align: right !important only to relevant text fragments.
Getting Started & Usage
Because the customized UI of Antigravity IDE overrides the standard VS Code Status Bar layout, you can control the extension using the command palette:
- Press
Ctrl + Shift + P (or Cmd + Shift + P on macOS) to open the Command Palette.
- Type
Antigravity RTL: Toggle Status and press Enter.
- A notification dialog will appear confirming whether RTL support has been enabled or disabled.
- Click Restart Now to refresh the window and apply the layout configuration.
Technical Specifications & Requirements
To apply the workbench patch, the extension requires access to the following:
- Workspace File System: Requires write permissions to the internal
out/vs/workbench/workbench.desktop.main.js path within vscode.env.appRoot to inject the style observer.
[!WARNING]
IDE Updates: If the Antigravity IDE undergoes a major core update, it may overwrite the workbench file and clear the patch. If this happens, simply run the Antigravity RTL: Toggle Status command again to re-apply the patch.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Developed with ❤️ by talco.