Skip to content

Repository files navigation

Rusty-Editor

Rusty-Editor is a small, fast desktop code editor written in Rust with iced. It is intentionally focused: the editor should feel quick for everyday coding while remaining easy to understand and extend.

Rusty-Editor screenshot

Current features

  • Create, open, and save text files.
  • Multiple tabs with per-document dirty badges and save/discard confirmation modals.
  • Save As, recent files, and restoration of the last workspace and editor preferences.
  • Rust and other supported-language syntax highlighting through iced-code-editor.
  • Light and dark themes, plus selectable highlighting themes.
  • Optional word wrapping.
  • Find, replace, replace-all, case-sensitive search, and go-to-line.
  • Duplicate line, move line, and toggle-comment editing commands.
  • File/Edit/View/Search/Run/Help menus powered by one iced_aw menu bar, alongside keyboard shortcuts.
  • Open-folder workspaces with an asynchronous, collapsible file tree.
  • A dark, reference-driven desktop shell with custom window chrome, compact menu and toolbar bands, an activity rail, explorer, and outline section.
  • Multi-document tabs with file-type icons, an active underline, close controls, and dirty-state markers.
  • A synchronized line-number gutter and code editor with current-line highlighting, folding, undo/redo, selection, search, and per-tab scroll state.
  • A read-only minimap with a viewport indicator and a neutral status bar with branch, diagnostics, path, cursor, indentation, encoding, line-ending, and language metadata.
  • Coherent Lucide outline icons with semantic Rust, TOML, Markdown, folder, and generic-file colors.
  • Responsive behavior that hides the minimap and collapses the explorer at compact desktop widths.
  • A clean keyboard-driven text editing surface that remains usable without a workspace open.
  • On a clean launch, the current working directory is loaded as the initial workspace and the first Rust, TOML, or Markdown file is opened when one is available; later launches restore the last workspace.

Building and running

Rust stable and Cargo are required. From the project directory:

cargo run

Run the test suite with:

cargo test

The application currently targets Linux first. The custom frame keeps normal window dragging and maximize/minimize/close actions; edge resizing follows the desktop compositor's support for undecorated windows. File dialogs are provided by rfd, so their exact native appearance depends on the desktop environment.

Roadmap

Editing flow

  • Selection-aware status information and a complete shortcut/help surface.
  • Autosave and external-change detection.
  • User-configurable editor font size, line height, indentation, and minimap visibility.

Project workflow

  • Quick-open and project-wide search.
  • Sensible filtering of generated and version-control directories.
  • Workspace-aware run/check actions and visible task output.

Language intelligence

  • LSP support beginning with Rust and rust-analyzer.
  • Diagnostics, hover information, completion, definitions, references, and document symbols.

Shell panels

  • Search, source control, Run/Debug, diagnostics, and extensions panels are represented by functional navigation states with focused empty states.
  • Git integration, task execution, and extension loading will progressively replace those placeholders without changing the shell layout.

Rusty-Editor is planned as a focused code editor rather than a full IDE. An integrated terminal, debugger, and extension marketplace are outside the initial roadmap and may be considered later if they support the core editing experience.

Development notes

The application state is driven by iced::Task messages. File I/O and other potentially slow operations remain asynchronous so typing stays responsive.

The root Editor is an application coordinator rather than the owner of every surface. Cohesive UI areas follow a small sub-application convention:

  • Sidebar owns workspace-tree data, expansion and activity-panel state, its scoped sidebar::Message, update, and view.
  • SearchPanel owns find/replace and go-to-line state, its scoped search_panel::Message, update, and view.
  • DocumentSession owns open documents, stable IDs, active-tab selection, dirty-state queries, word-wrap propagation, and the tab-strip message → update → action → view cycle. Save dialogs and confirmation policy stay in the root because they coordinate I/O across components.
  • WindowChrome owns native-window size, drag/minimize/maximize/resize/close commands, resize subscriptions, title-bar and edge-handle views, and its chrome-specific styles. The root intercepts only close requests that may need unsaved-document confirmation.
  • Sub-app messages are mapped into the root message enum. A sub-app returns a small action only when work crosses its boundary, such as opening a file or showing search. This keeps child components independent of application-wide policy without leaking their internal state into Editor.
  • Shared, stateless shell primitives live in ui; feature state and behavior stay with the sub-app that renders them.

New shell areas should use the same state/message/update/view boundary instead of adding unrelated fields and match arms directly to Editor.

Application-level keyboard subscriptions cover the common New, Open, Save, Save As, Find, and Close Tab commands even when focus is outside the editor. The modal confirmation follows Iced's layered stack/opaque pattern, and the command menus use iced_aw 0.14. The editor core is iced-code-editor 0.3, while Lucide's bundled font supplies the outline icon system. Shell chrome uses the platform UI font; Fira Code is intentionally scoped to the editor, line-number gutter, and minimap. New features should preserve plain-text editing when optional developer tooling is unavailable.

Contributions and focused experiments are welcome. Keep changes small, test them with cargo test, and update this README when the feature surface or roadmap changes.

About

Kibet's iced editor.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages