Files
cumulus/Cargo.toml
T
skkeyeandClaude Opus 5.5 bfc184f5ef Add the command line: commands, completion, ghost text and history
`:` opens a vim-style command line. Every command is described once, in
a typed table (name, the short form that still works, aliases, a `!`,
its arguments and what it does), so parsing, completion and the help can
never disagree. Short forms work as in vim (`:e`, `:vs`, `:q!`, `:x`),
and a test checks that no typed name can mean two commands.

Parsing turns a line into a typed Call, checking every argument against
what the app offers (open documents, nodes, colors, styles, settings),
or says what's wrong in words: the usage when an argument is missing,
the choices when a word isn't one, "did you mean :fold?" for a typo.
Documents and nodes match fuzzily (`:b gpl` finds Garden plans).

While typing, a popup above the word lists what can finish it (command
names by prefix, choices, files from the folders on disk, documents and
nodes fuzzily), with Tab and Shift-Tab putting them in the line. Ghost
text after the cursor comes from the history first, like fish's, then
from the best candidate; → or Ctrl-e takes it. Up and Down browse the
lines that start with what was typed. The line itself is a small input
that steps over whole characters, accents and emoji included.

The canvas example opens it with `:` and runs a handful of commands:
:fold, :color, :border, :tag, :focus, :rename, :in (to an Inbox),
:link, :unlink, :find, :version and :q.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-01 03:53:51 -04:00

40 lines
1.4 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"
# Where one character ends and the next begins, so the cursor steps over an
# accented letter or an emoji in one go.
unicode-segmentation = "1"
[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