Expand description
§hjkl-editor
Front door for the hjkl modal editor stack. Re-exports the working
parts of hjkl_engine and hjkl_buffer under a curated
namespace so downstream consumers (sqeel, buffr, hjkl binary) add
one dependency instead of three and don’t need to know the
crate-split.
Two layers ride alongside each other during the 0.0.x churn:
- Legacy surface (today’s runtime): the
runtimemodule re-exports the existingEditor,KeybindingMode,VimMode,Input,Key,SearchPrompt,Registers,Slot, andLspIntent. This is what sqeel-tui consumes today. - Planned surface (0.1.0 SPEC): the
specmodule re-exports the additive types fromhjkl_engine::types—spec::Pos,spec::Selection,spec::SelectionSet,spec::Edit,spec::Mode,spec::Style,spec::Highlight,spec::Options,spec::Input,spec::Host,spec::EngineError. Trait extraction will rewire the runtime onto these — once it ships,runtimebecomes a thin compat layer.
§Usage
use hjkl_editor::buffer;
use hjkl_editor::runtime::{DefaultHost, Editor, Options};
let mut editor = Editor::new(buffer::Buffer::new(), DefaultHost::new(), Options::default());
editor.set_content("hello world");Buffer and rope helpers are re-exported at the buffer module,
mirroring the hjkl_buffer surface.
Modules§
- buffer
- Re-export of
hjkl_buffer’s public surface. - runtime
- Legacy runtime surface — the working sqeel-vim port.
- spec
- Engine trait surface re-exported for consumers.