Kasane — drop-in Kakoune frontend with an extensible UI foundation

Hi, long-time Kakoune user, first time posting here.

I’ve been working on Kasane, an independent frontend for Kakoune that communicates via kak -ui json. It’s not an official Kakoune project — it depends on Kakoune and does not work without it.

Why I built this

I love Kakoune’s editing model, but I wanted richer UI extensibility. Currently, building UI-level plugins often means relying on tmux, window managers, or shell scripts — which introduces environment dependencies and performance overhead. I wanted a frontend that provides a proper UI foundation for plugins, without losing anything from the standard Kakoune experience.

Drop-in compatible

Your kakrc, keybindings, and plugins (kak-lsp, fzf.kak, etc.) all work as-is. No configuration changes needed.

alias kak=kasane

Rendering runs at ~49 μs per frame at 80×24, so there should be no perceptible overhead.

WASM plugin system

Kasane provides a plugin API where plugins can contribute UI elements, transform existing elements, add line annotations, and create overlays. Plugins are built as WASM components — portable and sandboxed.

Plugins can spawn and communicate with external processes via streaming I/O — the bundled fuzzy finder coordinates fd and fzf this way. This opens the door to linter integration, REPLs, and other tool-driven workflows.

Plugins can also declare their own surfaces (independent screen regions) and manipulate the workspace layout — splitting panes, adding tabs, docking panels, or creating floating windows. The UI foundation is designed so that features like these are built as plugins rather than requiring core changes.

A few bundled plugins ship as examples: cursor line highlight, color preview, selection badge, and fuzzy finder.

GPU backend

An optional GPU backend (wgpu + glyphon) is available with --features gui. Native font rendering, smooth animations — worth a try if you’re curious.

demo

Also enabled by default

  • Flicker-free rendering (double-buffered + synchronized updates)
  • Correct Unicode width calculation (CJK, emoji)
  • System clipboard integration (no xclip/xsel dependency)
  • True 24-bit color

Links

I’d love any feedback — bug reports, feature requests, ideas for plugins you’d want to build, or even just casual impressions. Issues, PRs, and comments here are all very welcome.

4 Likes

doesnt render any text in the buffer in terminal nor gui. modeline, menu and popups are rendered.

1 Like

Thanks for the report — this should be fixed on master now (05de79d).

The parser required the widget_columns field in draw, which was only added to Kakoune in PR #5455 (not yet in a release). Kasane now treats it as optional and defaults to 0 when absent.

Could you try again from master? And if you don’t mind, kak -version would help confirm.

I like a lot the project! I just found one thing that cause me friction to keep using it, first, it seems fifo buffers are not working as intended, I have an AI assistant plugin that relies on them for the experience.

1 Like


Thanks for the report! I tested FIFO buffers extensively — basic FIFO streaming at various rates (up to 190 lines/sec), and also with gemi2 directly (I guessed from your GitHub that you might be using it — let me know if that’s wrong!). Everything worked correctly on my end, includingstreaming responses and FIFO reuse across multiple :gm invocations.
Could you help me narrow down the issue?

  1. Which plugin are you using, and what exactly happens? (blank buffer / error / partial display freeze?)
  2. What is your Kakoune version? (kak -version)
  3. What OS and terminal emulator?
  4. Does a simple test work?: mkfifo /tmp/test, then in Kasane :edit -fifo /tmp/test -scroll test, then in another terminal echo hello > /tmp/test

Oh it seems I was trying a release that had something broken, I built again from main and it seems to work well, theres something off with the cursor tho. I use themes from: GitHub - anhsirk0/kakoune-themes: Beautiful Color schemes for kakoune. · GitHub, and the cursor is quite invisible with some of them, and also the selection is not visible with others :V

1 Like

Thanks for the follow-up and glad FIFO is working now!

I investigated the cursor/selection issues with anhsirk0/kakoune-themes and found two problems, both now fixed on main:

Selection not visible: Those themes use rgba:RRGGBBAA colors (with alpha) for PrimarySelection/SecondarySelection. Kakoune’s JSON UI passes these through as-is when the base face background is default, and Kasane was only handling rgb:RRGGBB — so the entire draw message failed to parse silently, dropping any frame that contained a selection. Fixed by adding rgba: support (alpha is stripped since terminals don’t support transparency).

Cursor detection: The themes define PrimaryCursor without +rfg (no REVERSE/FINAL_FG attributes), unlike Kakoune’s default default,white+rfg. Kasane’s multi-cursor detection relied on that attribute pattern. Added a fallback that identifies cursor positions by face-matching against the protocol-provided primary cursor coordinate.

Could you rebuild from main and see if things improve? If the cursor is still hard to see with specific themes, let me know which ones — there are 48 themes in that repo and the issue might be theme-specific (e.g. low contrast between cursor color and background).