# OpenIDEA — contributor guide Rust + Tauri 2 desktop IDE with full-featured, multi-language code intelligence. Visual style: dark, low-contrast greys, one cool accent (`src/styles/tokens.css` is the source of truth for colours and metrics). ## Layout - `crates/ide-*` — backend crates; one domain each. Depend on `ide-core` for shared types; never reach into another crate's internals. - `src-tauri/` — glue only: `state.rs` (AppState / Project), `commands/.rs` (thin typed IPC adapters), `events.rs`. No domain logic here. - `src/bindings.ts` — generated by tauri-specta (`pnpm gen:bindings`). Never edit. - `src/platform/` — ipc (`call`, `onIdeEvent`, `nextRequestId`), actions registry, keymap + dispatcher, context keys / `when` clauses, project store. - `src/workbench/contributions.ts` — extension points (tool windows, status items, overlays, editor kinds) and cross-feature services (editor, tool windows, notifications). - `src/ui/` — design-system primitives. `src/features//` — one feature each, exporting `activate()` registered in `src/features/index.ts`. - `languages/.toml` — language definitions (detection, comments, LSP, DAP). - `crates/ide-host` — the `openidea-server` binary for remote development and the `openidea-plugin` CLI (plugin starter templates live in its `templates.rs`). - `wit/` — plugin interface definitions; `plugins/` — sample and bundled plugins. Plugin docs: `plugins/README.md`, `docs/plugins/themes.md`. - `java/` — JDT LS extension bundles (`java-usages`, `kotlin-bridge`) and the patched Lombok agent, embedded into the app by `ide-sdk` / `ide-tools`. - `e2e/` — Playwright UI tests (`pnpm e2e`). `fixtures/` — sample projects per language for manual and automated testing. ## Rules - IPC coordinates: 0-based lines, **UTF-16** columns/offsets everywhere (`ide-core::text`). - Every command returns `IdeResult`; convert internal errors at the crate edge. - Streaming → `tauri::ipc::Channel`; cancellable → UI-allocated `RequestId` + `cancel_request`. Backend → UI notifications → `IdeEvent` via `EventSink`. - Long work never blocks the UI thread or a Tauri command thread: use `spawn_blocking`/rayon, honour `CancellationToken`. - Frontend features never import each other; communicate via actions, contributions and services. All user-invocable behaviour is an action with a stable id; default shortcuts live in `src/platform/keymaps/`. - Styling: CSS Modules + tokens only (no hex literals in components). Inline SVG icons from `src/ui/icons.tsx`, never emoji. Real `