Skip to main content

Built-in Editor

GenieBuilder includes a full-featured code editor powered by a modern editing component. It provides syntax highlighting, editing capabilities, and integration with the workspace—all without leaving the desktop app.

Built-in Editor

Supported Languages

The editor provides first-class support for:

Programming Languages

LanguageSyntax HighlightingNotes
Java✅ FullJDTLS integration for LSP features
TypeScript✅ FullIncludes JSX/TSX support
JavaScript✅ FullES2023+ support
Python✅ FullPython 3.x syntax
Go✅ FullGo 1.21+ support
Rust✅ FullRust 2021 edition

Markup & Config

LanguageSyntax Highlighting
HTML✅ Full
XML✅ Full
JSON✅ Full
YAML✅ Full
Markdown✅ Full
CSS/SCSS✅ Full

Fallback

Files with unsupported extensions open as plain text with basic editing capabilities.

Editor Features

Core Editing

  • Multi-cursor editingAlt/Cmd + Click to place multiple cursors
  • Block selectionAlt/Cmd + Shift + Drag for column selection
  • Auto-indentation — Smart indentation based on language
  • Bracket matching — Highlight matching brackets
  • Code folding — Collapse/expand code blocks

Search & Replace

  • FindCtrl/Cmd + F
  • ReplaceCtrl/Cmd + H
  • Find in filesCtrl/Cmd + Shift + F (project-wide)
  • Regex support — Pattern matching in search
  • Go to lineCtrl/Cmd + G
  • Symbol navigation — Jump to definitions (Java with JDTLS)

Visual

  • Line numbers — Toggle in settings
  • Active line highlight — Current line indication
  • Selection highlight — Occurrence highlighting
  • Whitespace rendering — Optional visible whitespace

Workspace Integration

File Operations

Files are opened through workspace-scoped IPC:

  1. File selected in explorer
  2. IPC request to main process
  3. Path validation — Ensure within workspace root
  4. Size check — Reject files > 1 MiB
  5. Content loaded and sent to renderer
  6. Editor tab opened with content

Save Flow

User presses Ctrl+S

Editor content sent via IPC

Main process validates path

File written to disk

Success/error returned

Editor shows save status

Auto-save

Optional auto-save on:

  • Focus change
  • Delay after typing (configurable)
  • Window close

File Explorer Integration

Opening Files

  • Click — Open in current tab
  • Double-click — Open in new tab
  • Right-click — Context menu options

File Tree

  • Respects .gitignore — Hidden files filtered
  • Folder expansion — Lazy-loaded children
  • File icons — Language-based icons
  • Active file highlight — Current tab indicated

Limits

For predictable performance:

LimitValueRationale
Visible items5,000Prevent UI freezing
File size1 MiBLarge files open as unsupported
Nesting depth20 levelsPrevent stack overflow

Security Considerations

Path Validation

  • Workspace root enforcement — Files outside root rejected
  • Symlink rejection — Prevents path escape
  • Path normalization — Resolve .. segments

Content Handling

  • Binary file detection — Open as unsupported
  • Large file protection — Size limits enforced
  • Encoding — UTF-8 default, BOM handling

Java Language Server (JDTLS)

For Java projects, optional JDTLS integration provides:

LSP Features

  • Go to definitionF12 or Ctrl/Cmd + Click
  • Find referencesShift + F12
  • Hover information — Type information on hover
  • Diagnostics — Compile errors and warnings
  • Code actions — Quick fixes and refactorings

Setup

  1. Install JDTLS: brew install jdtls (macOS) or equivalent
  2. Set path if not in PATH: DG_JDTLS_COMMAND=/path/to/jdtls
  3. The editor auto-detects and uses JDTLS for Java support

Fallback

Without JDTLS:

  • Source scanning for basic navigation
  • Basic compiler diagnostics
  • Lighter resource usage

Editor Settings

Configurable options:

SettingOptionsDefault
ThemeLight, Dark, SystemSystem
Font size10-24px14px
Font familyMonospace fontsJetBrains Mono
Line numbersOn, OffOn
Word wrapOn, OffOff
Tab size2, 4, 84
Insert spacesYes, NoYes
Auto-saveOn, OffOff

Keyboard Shortcuts

The built-in editor supports standard keyboard shortcuts:

ShortcutAction
Ctrl/Cmd + SSave file
Ctrl/Cmd + FFind
Ctrl/Cmd + HReplace
Ctrl/Cmd + GGo to line
Ctrl/Cmd + /Toggle comment
Ctrl/Cmd + DSelect next occurrence
Ctrl/Cmd + Shift + KDelete line
Alt/Cmd + ↑/↓Move line up/down
F12Go to definition (Java with JDTLS)
Shift + F12Find references (Java with JDTLS)
Java Features

Go to definition and find references require JDTLS (Java Language Server) to be installed and configured.

Troubleshooting

File Won't Open

If a file fails to open:

  1. Check file size (must be < 1 MiB)
  2. Verify file permissions
  3. Ensure file is within workspace root
  4. Check for binary content

Syntax Highlighting Missing

If code appears as plain text:

  1. Verify file extension is recognized
  2. Check theme settings
  3. Reload window (Ctrl/Cmd + R)

Java Features Not Working

If Java navigation/diagnostics fail:

  1. Verify JDTLS is installed
  2. Check DG_JDTLS_COMMAND if not in PATH
  3. Ensure Java project has proper structure
  4. Check the editor logs

Slow Performance

If editing feels sluggish:

  1. Close unused tabs
  2. Disable auto-save if not needed
  3. Reduce file explorer visible items
  4. Check for large files open in background