Files
cumulus/Cargo.toml
T
skkeyeandClaude Opus 5.5 c2e62de172 Add the key engine, which-key and keys.toml
Keys now work the way vim reads them. A key press becomes a Key (with vim
notation for writing keys: `<C-w>v`, `<leader>c`, `<<`), and the engine
collects counts (`12j`), registers (`"+p`), sequences (`gg`), operators
with their targets (`dd`, `dab`, `2d3d` multiplies to 6) and keys that take
a character (`ma`, `'A`), then hands over a typed Command. Every command
has a name and a help text in one table, and the default keys live in one
table per place they work (motions, normal, canvas, visual, move, connect,
lists).

keys.toml changes keys per section, with the leader configurable and
"nothing" to unbind. Each mistake is skipped and reported in words, with a
suggestion for mistyped command names, and a key that would hide a longer
one is reported too. The which-key popup reads the same tables: it shows
what can follow the keys typed so far, in skyshift's look and place, with
the leader menu instant and other prefixes after 300 ms. The mouse reader
turns button events into presses, double-clicks, drags and scrolls.

`Direction` moved from the glyphs to the model, since input needs it too.
The canvas example now runs on all of this, with a two-line keys.toml of
its own that makes `q` quit.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-01 01:54:06 -04:00

37 lines
1.3 KiB
TOML

[package]
name = "cumulus"
version = "0.1.0"
edition = "2024"
# The version cumulus is built and tested with (pinned in rust-toolchain.toml).
rust-version = "1.90"
description = "Brainstorm in the terminal: idea graphs on a 2D canvas, with vim keys and the mouse."
publish = false
[dependencies]
# Document files are RON (Rust Object Notation), read and written through serde.
serde = { version = "1", features = ["derive"] }
ron = "0.12"
# Config files are TOML: keys.toml so far, config.toml and themes later.
toml = "1"
# Error types with readable messages, for the parts that report problems.
thiserror = "2"
# Terminal user interface. The crossterm backend works on Windows, Linux and
# macOS. Default features are off to skip widgets cumulus doesn't use.
ratatui = { version = "0.30", default-features = false, features = ["crossterm_0_29", "layout-cache"] }
# How many terminal columns text takes (accents, Asian scripts, emoji), for
# sizing node boxes.
unicode-width = "0.2"
[lints.rust]
unsafe_code = "forbid"
[lints.clippy]
all = { level = "warn", priority = -1 }
[profile.release]
# A smaller, faster program: optimize across all crates at once (lto, in one
# piece with codegen-units = 1), and leave out the debug symbols (strip).
lto = true
codegen-units = 1
strip = true