A Material You code editor in Rust with 462 languages built in.
  • Rust 93.1%
  • Shell 4.5%
  • Python 2.1%
  • Nix 0.3%
Find a file

Damson icon

Damson

A Material You code editor in Rust that reads Kate's own syntax definitions, with motion at the centre of how it works.

The editor

What's different

  • Scrolling preview that pops out. Press the rail and it widens over the code while lines near the pointer swell like a lens, and a card of real, readable code bursts out and follows you on a spring. Drag to scroll. Hold Shift to only peek: let go and you're back where you were.
  • Terminal baked in. A full terminal (alacritty's emulator) grows out of the Terminal button, and its prompt icon morphs into a hide chevron. The cursor glides between cells.
  • Everything is on springs. Scrolling, the caret, the current-line bubble, tabs, panels and menus all use Material 3 Expressive's spring tokens. Settings has Off, Calm, Bouncy and Jelly.
  • Icons that morph between states, and only where a button really has two: sun and moon, run and stop, + and − for staging, maximize and restore. One-shot actions like Save stay still.
  • Jelly tabs whose indicator edges are separate springs, so it stretches as it moves.
  • One box for everything. Ctrl+Shift+P: type for files, > commands, : line, @ symbol, ! run.

The preview lens

Syntax highlighting

Damson runs Kate's KSyntaxHighlighting XML definitions directly, so it covers Kate's 460+ languages. It looks in /usr/share/org.kde.syntax-highlighting/, so the syntax-highlighting package must be installed. Drop your own .xml definition into ~/.local/share/org.kde.syntax-highlighting/syntax/ and it takes priority over the system one. Folding and comment tokens come from the same definitions.

59 of about 7,100 regexes in those definitions use PCRE features the Rust engine doesn't have, such as recursion. Those single rules are skipped, so a few constructs in some languages stay uncoloured.

Also included

Multi-cursor (Ctrl+Alt+Up/Down, Alt+J, Ctrl+click, Alt+drag for a block), folding, bookmarks, word wrap, bracket pairing and matching, split view, zen mode (F11), find and replace with regex, search in files, outline, a git panel (stage, commit, pull, push, diffs, changed lines in the gutter and preview), hot exit (unsaved text survives a crash or quit), and language servers for completion, hover, go to definition and diagnostics when they're installed (clangd, rust-analyzer, pylsp, gopls, typescript-language-server, bash-language-server, lua-language-server).

Colours come from your Caelestia scheme or KDE accent, or a colour you pick, and follow live changes.

Light mode

Not done yet

Vi mode, spell checking, snippets, reopening a file with a chosen encoding, and Kate's C++ plugins, which can't load into a Rust app. Long lines are not virtualised. It runs one window per launch. Linux only for now.

Build

./install.sh   # builds and installs to ~/.local

Needs Rust and the syntax-highlighting package. No other KDE parts are needed at runtime.

Tests

cargo test --lib
cargo test --test syntax_all -- --nocapture
DAMSON_SHOTS=/tmp/shots cargo test --test shots -- --test-threads=1

The last one drives the real app with no window, using real input events, and saves a screenshot of each screen. DAMSON_SMOKE=/some/dir damson runs the real window for 120 frames, saves window.png and status.txt, then quits.

Licence

MIT. Rubik is under the SIL Open Font License; the icons are Material Symbols (Apache 2.0).

Repository files (latest commit first)
Filename Latest commit message Latest commit date
astar76 8151aa71c0 Damson: a Material You code editor in Rust
Runs Kate's syntax definitions directly, on a hand-written editor core.
Spring-driven UI with a pop-out scrolling preview, baked-in terminal
grown from a morphing button, jelly tabs, command palette, side panels,
git, language servers and hot exit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 17:05:28 -06:00
assets Damson: a Material You code editor in Rust 2026-11-06 17:05:28 -06:00
docs Damson: a Material You code editor in Rust 2026-11-06 17:05:28 -06:00
packaging Damson: a Material You code editor in Rust 2026-11-06 17:05:28 -06:00
src Damson: a Material You code editor in Rust 2026-11-06 17:05:28 -06:00
tests Damson: a Material You code editor in Rust 2026-11-06 17:05:28 -06:00
tools Damson: a Material You code editor in Rust 2026-11-06 17:05:28 -06:00
.gitignore Damson: a Material You code editor in Rust 2026-11-06 17:05:28 -06:00
Cargo.lock Damson: a Material You code editor in Rust 2026-11-06 17:05:28 -06:00
Cargo.toml Damson: a Material You code editor in Rust 2026-11-06 17:05:28 -06:00
install.sh Damson: a Material You code editor in Rust 2026-11-06 17:05:28 -06:00
LICENSE Damson: a Material You code editor in Rust 2026-11-06 17:05:28 -06:00
README.md Damson: a Material You code editor in Rust 2026-11-06 17:05:28 -06:00