Expand description
Code Editor module.
This public module implements the Liora native code editor surface for editable snippets and diagnostics. It keeps the reusable
component logic inside liora-components rather than Gallery or Docs so
downstream GPUI applications can compose the same behavior with their own
app state, assets, and release policy.
§Usage model
Components in this module render native GPUI element trees. Stateless builder
values can be constructed inline, while controls with focus, selection,
popup, drag, or editing state should be stored as gpui::Entity<T> fields in
the parent view so state survives GPUI render passes.
§Design contract
The implementation should use Liora theme tokens from liora-core and
liora-theme, keep accessibility-oriented keyboard/pointer behavior close to
the component, and avoid app-specific Gallery/Docs resources in this SDK
crate.
Structs§
- Code
Diagnostic - Fluent native GPUI component for rendering Liora code diagnostic.
- Code
Editor - Native code editing surface with line numbers, indentation metadata, syntax-highlight preview and pluggable diagnostics.
- Code
Indent - Keyboard action that indents the selected code editor lines.
- Code
Outdent - Keyboard action that outdents the selected code editor lines.
Enums§
- Code
Diagnostic Severity - Options that control code diagnostic severity behavior.
Type Aliases§
- Code
Diagnostics Provider - Type alias for code diagnostics provider values used by the code editor API.
- Code
Editor Change Callback - Type alias for code editor change callback values used by the code editor API.