Vim engine, rope buffer, and modal editor primitives for building vim-modal terminal apps in Rust.
Extracted from sqeel for reuse across
sqeel, buffr, and the standalone
hjkl binary.
0.12.2 — full LSP client (diagnostics, goto, hover, completion, code actions,
rename, format), window splits, tabs, tmux-navigator handoff, mouse scroll, line
numbers, and a consumer-agnostic picker PreviewHighlighter trait. See
CHANGELOG.md for the full release arc and
docs.rs/hjkl-engine for the trait reference.
| Crate | Role |
|---|---|
hjkl-engine |
Vim FSM + grammar, traits, no I/O deps. |
hjkl-buffer |
Rope-backed text buffer with cursor + edits + folds + search. |
hjkl-editor |
Front-door facade: re-exports engine + buffer + spec types. |
hjkl-editor-tui |
Ratatui adapter: editor draw, form rendering, spinner widget. |
hjkl-clipboard |
In-house clipboard for the ecosystem (sync + async, OSC 52 SSH). |
hjkl-form |
Vim-modal forms with full vim grammar inside every text field. |
hjkl-bonsai |
Tree-sitter syntax highlighting; runtime .so grammars, Neovim-flavoured themes. |
hjkl-picker |
Fuzzy picker subsystem: file walk, grep, custom sources, PreviewHighlighter trait. |
hjkl-config |
Shared TOML config loader: XDG paths, span errors, layered merge. |
hjkl-splash |
Startup splash screen widget (ratatui feature). |
hjkl-lsp |
LSP client: per-language server lifecycle, full text-sync, diagnostics. |
Published on crates.io. Add to Cargo.toml:
hjkl-editor = "0.4"The standalone editor reads $XDG_CONFIG_HOME/hjkl/config.toml (Linux/macOS) or
%APPDATA%\kryptic\hjkl\config\config.toml (Windows). Defaults are bundled into
the binary from apps/hjkl/src/config.toml — that
file is the single source of truth for default values. The user file is
deep-merged on top: only the fields you want to override need to appear
there. Unknown keys are an error.
A custom path can be passed with --config <PATH>.
# ~/.config/hjkl/config.toml — minimal override example
[editor]
leader = "\\"
tab_width = 2See apps/hjkl/src/config.toml for the full schema
with comments.
git clone git@github.com:kryptic-sh/hjkl.git
cd hjkl
rustup toolchain install stable # rust-toolchain.toml pins this for you
cargo test --workspaceEach hjkl-* crate lives in its own submodule and ships independently to
crates.io. #![deny(missing_docs)] is enforced on hjkl-engine — new public
API needs rustdoc.
Performance budgets are documented in MIGRATION.md. CI fails
if a criterion bench regresses past budget.
The only cargo fuzz target today is hjkl-engine/fuzz :: handle_key — feeds
an arbitrary keystroke stream into a fresh Editor and asserts no panics. Local
reproduction:
cd crates/hjkl-engine/fuzz
cargo +nightly fuzz run handle_keySee the org-wide CONTRIBUTING guide for PR conventions, BCTP release flow, snapshot test workflow, and supported language toolchains. Project-specific dev setup lives above in Development.
For security issues, see the org-wide SECURITY policy — do not file public issues.
MIT. See LICENSE.