Crate gpui_editor

Crate gpui_editor 

Source
Expand description

A standalone editor component for GPUI

This crate provides a text editor widget for GPUI applications with syntax highlighting support.

§Architecture

The editor is structured in three layers:

  • Editor: The core data model and editing operations
  • EditorElement: The GPUI element that renders an Editor
  • EditorView: A complete view with keyboard handling (see examples)

Re-exports§

pub use buffer::GapBuffer;
pub use buffer::TextBuffer;
pub use editor::CursorPosition;
pub use editor::Editor;
pub use editor::EditorConfig;
pub use element::EditorElement;
pub use syntax_highlighter::SyntaxHighlighter;
pub use gpui;

Modules§

buffer
Gap buffer implementation for efficient text editing.
editor
element
GPUI Element implementation for rendering an Editor
syntax_highlighter

Structs§

BindingBuilder
Helper to create multiple bindings with the same context
BindingSpec
Specification for a key binding
Keymap
Represents a complete keymap configuration
KeymapCollection
A collection of keymaps, typically loaded from multiple files
MetaLine
Selection

Enums§

Language

Functions§

bind
Helper to create a single binding
create_bindings
Helper to create a list of key bindings from action-keystroke pairs