卡萨娜:新的Kakoune前端,具有GPU渲染和WASM插件。
Kasane: New drop-in Kakoune front end with GPU rendering and WASM Plugins

原始链接: https://github.com/Yus314/kasane

## Kasane:一款现代Kakoune前端 Kasane是Kakoune文本编辑器的全新前端,通过重建渲染管道和强大的插件系统来增强其功能。它保持与现有`kakrc`配置和Kakoune插件(如`kak-lsp`)的完全兼容性。 主要改进包括无闪烁渲染、原生多窗格支持、通用剪贴板和正确的Unicode处理。GPU后端(`--ui gui`)提供流畅动画、系统字体渲染和内联图像显示等功能,所有功能均由沙盒化的WebAssembly (WASM) 插件提供支持。 这些插件易于创建(甚至只需约15行Rust代码!),可以添加浮动叠加层、代码折叠和自定义输入处理等功能。Kasane已稳定用于日常使用,并提供通过软件包管理器(Arch、macOS、Nix)或从源代码进行安装的简单方法。 本质上,Kasane是构建在Kakoune之上的,提供更具视觉吸引力和可扩展性的编辑体验。

Hacker News 新闻 | 过去 | 评论 | 提问 | 展示 | 招聘 | 提交 登录 Kasane: 新的 Kakoune 前端,具有 GPU 渲染和 WASM 插件 (github.com/yus314) 5 分,由 nsagent 发表于 39 分钟前 | 隐藏 | 过去 | 收藏 | 讨论 帮助 考虑申请 YC 2026 夏季项目!申请截止至 5 月 4 日 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系方式 搜索:
相关文章

原文

Kakoune handles editing. Kasane rebuilds the rendering pipeline — terminal or GPU — and opens the full UI to extension: splits, image display, workspace persistence, and beyond. Extend it yourself with sandboxed WASM plugins — a complete one fits in 15 lines of Rust. Your kakrc works unchanged.

Kasane demo — fuzzy finder, pane splits, and color preview running as WASM plugins
GPU backend (--ui gui) — fuzzy finder, pane splits, and color preview are all WASM plugins

CI License: MIT OR Apache-2.0 Rust: 1.85+

Getting Started · What's Different · Plugin Development · Vision

alias kak=kasane and these improvements apply automatically:

  • Flicker-free rendering — no more tearing on redraws
  • Multi-pane without tmux — native splits with per-pane status bars
  • Clipboard that just works — Wayland, X11, macOS, SSH — no xclip needed
  • Correct Unicode — CJK and emoji display correctly regardless of terminal

Add --ui gui for a GPU backend with system font rendering, smooth animations, and inline image display.

Existing Kakoune plugins (kak-lsp, …) work as before. See What's Different for the full list.

Note

Requires Kakoune 2024.12.09 or later. Binary packages skip the Rust toolchain requirement.

Arch Linux: yay -S kasane-bin · macOS: brew install Yus314/kasane/kasane · Nix: nix run github:Yus314/kasane · From source: cargo install --path kasane

kasane file.txt               # your Kakoune config works unchanged
alias kak=kasane              # add to .bashrc / .zshrc

GPU backend: cargo install --path kasane --features gui, then kasane --ui gui.

See Getting Started for detailed setup.

Plugins can add floating overlays, line annotations, virtual text, code folding, gutter decorations, input handling, scroll policies, and more. Bundled example plugins you can try today:

Each plugin builds into a single .kpk package — sandboxed, composable, and ready to install. A complete plugin in 15 lines — here is sel-badge in its entirety:

kasane_plugin_sdk::define_plugin! {
    manifest: "kasane-plugin.toml",

    state {
        #[bind(host_state::get_cursor_count(), on: dirty::BUFFER)]
        cursor_count: u32 = 0,
    },

    slots {
        STATUS_RIGHT(dirty::BUFFER) => |_ctx| {
            (state.cursor_count > 1).then(|| {
                auto_contribution(text(&format!(" {} sel ", state.cursor_count), default_face()))
            })
        },
    },
}

Start writing your own:

kasane plugin new my-plugin    # scaffold from 6 templates
kasane plugin dev              # hot-reload while you edit

See Plugin Development and Plugin API.

Kasane is stable as a Kakoune frontend — ready for daily use. The plugin API is evolving; see Plugin Development for the current ABI version and migration guides.

kasane [options] [kak-options] [file]... [+<line>[:<col>]|+:]

All Kakoune arguments work — kasane passes them through to kak.

kasane file.txt              # Edit a file
kasane -c project            # Connect to existing session
kasane -s myses file.txt     # Named session
kasane --ui gui file.txt     # GPU backend
kasane -l                    # List sessions (delegates to kak)

See docs/config.md for configuration.

See CONTRIBUTING.md for development setup and guidelines.

cargo test                             # Run all tests
cargo clippy -- -D warnings            # Lint
cargo fmt --check                      # Format check

MIT OR Apache-2.0

联系我们 contact @ memedata.com