Overview
Polaris IDE features a powerful code editor built on CodeMirror 6, providing a modern, performant editing experience with syntax highlighting, intelligent code completion, and AI-powered assistance.Multi-Language Support
Syntax highlighting for JavaScript, TypeScript, HTML, CSS, JSON, Markdown, and Python
AI-Powered
Inline suggestions and quick editing with natural language commands
Smart Features
Auto-completion, bracket matching, code folding, and multi-cursor editing
Customizable
Minimap, line numbers, indentation markers, and custom themes
Language Support
The editor automatically detects file types and applies appropriate syntax highlighting based on file extensions:Supported Languages
Supported Languages
| Language | Extensions | Features |
|---|---|---|
| JavaScript | .js | Full ES6+ syntax support |
| JSX | .jsx | React component syntax |
| TypeScript | .ts | Type annotations and interfaces |
| TSX | .tsx | TypeScript with JSX |
| HTML | .html | Tag completion and validation |
| CSS | .css | Property suggestions |
| JSON | .json | Automatic formatting |
| Markdown | .md, .mdx | Live preview support |
| Python | .py | Indentation-aware editing |
getLanguageExtension() function:
Core Features
Line Numbers & Gutters
The editor displays line numbers and interactive gutters for code folding:Click the chevron icons in the gutter to fold/unfold code blocks, functions, and objects.
Code Folding
Collapse code sections to focus on what matters:- Functions and methods
- Object literals and arrays
- Import/export blocks
- HTML/JSX elements
Multi-Cursor Editing
Polaris supports multiple cursors for efficient batch editing:Bracket Matching
Automatically highlights matching brackets, braces, and parentheses as you type:Auto-Completion
Intelligent code completion suggests:- Variable and function names
- Language keywords
- Imported modules
- HTML tags and attributes
- CSS properties
Advanced Features
Minimap
Get a bird’s-eye view of your code with the integrated minimap powered by@replit/codemirror-minimap:
Minimap Navigation
The minimap appears on the right side of the editor, showing a zoomed-out view of your entire file for quick navigation.
Indentation Markers
Visual guides show indentation levels using@replit/codemirror-indentation-markers, making nested code easier to read.
Syntax Highlighting
The editor uses the One Dark theme with custom styling:The editor uses IBM Plex Mono as the default monospace font for optimal code readability.
Keyboard Shortcuts
Essential Shortcuts
| Shortcut | Action |
|---|---|
| Tab | Indent selection or accept AI suggestion |
| Cmd/Ctrl + Z | Undo |
| Cmd/Ctrl + Shift + Z | Redo |
| Cmd/Ctrl + / | Toggle line comment |
| Cmd/Ctrl + F | Search in file |
| Cmd/Ctrl + K | Quick edit with AI (when text is selected) |
Selection Shortcuts
| Shortcut | Action |
|---|---|
| Cmd/Ctrl + D | Select next occurrence |
| Cmd/Ctrl + A | Select all |
| Alt/Option + Click | Add cursor at position |
Code Folding Shortcuts
| Shortcut | Action |
|---|---|
| Cmd/Ctrl + Shift + [ | Fold code block |
| Cmd/Ctrl + Shift + ] | Unfold code block |
Editor Extensions
Polaris extends CodeMirror with custom extensions:AI Suggestions
Real-time code suggestions powered by AI as you type
Quick Edit
Edit code with natural language using Cmd+K
Selection Tooltip
Contextual actions when you select code
Custom Setup
Pre-configured with optimal settings for web development
Custom Setup Extension
The editor comes pre-configured with:Auto-Save
Polaris automatically saves your changes with a 1.5-second debounce to prevent excessive updates:How Auto-Save Works
How Auto-Save Works
- You make changes to a file
- The editor waits 1500ms for additional changes
- If no new changes occur, the file is saved to the database
- Changes sync in real-time across all open sessions
Scrollbar Customization
The editor features custom-styled scrollbars that match the dark theme:Performance
CodeMirror 6 provides excellent performance even with large files:- Lazy rendering - Only visible lines are rendered
- Incremental parsing - Syntax highlighting updates incrementally
- Optimized updates - Minimal DOM manipulation
- Virtual scrolling - Smooth scrolling through thousands of lines
The editor is optimized for files up to 10,000 lines. For larger files, some features may be automatically disabled for performance.
Next Steps
AI Assistance
Learn about AI-powered code suggestions and editing
File Management
Manage your project files and folders