r/Clojure • • 17h ago

Coxswain · An Emacs-style code editor, rebuilt in Clojure · TTalk

15 Upvotes

https://www.ttalk.im/en/products/coxn/

Coxswain (command name: coxn) is an Emacs-style text editor redeveloped from scratch in Clojure, running on the JVM with a terminal TUI as its default form, while offering an optional GUI version based on Compose Multiplatform (coxn gui). The project's design philosophy is "core editor + layered feature mounting": keybindings and command names strictly follow the Emacs global-map, and on top of that it adds its own M-m leader-key system, allowing Emacs users to migrate at virtually zero cost.

The editor core provides basic editing, buffer management, and window management. It also integrates tree-sitter to deliver syntax highlighting and structured editing, covering languages such as Clojure, Common Lisp, C++, Java, Erlang, and Elixir. A general-purpose LSP client supports servers including clojure-lsp, clangd, jdtls, erlang_ls, elixir-ls, and cl-lsp — whichever is installed gets used, automatically launched when a file is opened and reused per project root. Additional features include floating completion popups and function signatures, in-project grep, a project tree, Git integration, CIDER/SLIME-style REPL connections (nREPL/SWANK), 14 color themes, major-mode hooks and a minor-mode mechanism, plus internationalization support.

Architecturally, the editing core and the frontends are strictly decoupled: the TUI and GUI are merely two frontend implementations of the same core, with the GUI-side Kotlin code connecting only through clojure.java.api without intruding into editing logic. The GUI edition targets everyday desktop use: system font fallback with CJK double-width alignment, fcitx/ibus input method support, HiDPI adaptation, drag-and-drop file opening, system clipboard integration, and software rendering fallback when no GL environment is available. All configuration lives in ~/.config/coxn/init.clj, and every behavior is customizable.

Performance and quality are equally central to the project: keypress handling takes priority over background tasks; REPL/LSP output is batched with bounded caching; paren matching, highlighting, and indentation are all optimized based on syntax trees and caches; frame rendering and region indentation achieve sub-millisecond to sub-hundred-millisecond performance; and hundreds of automated tests guard behavioral stability. The project explicitly builds no agent features and depends on no network services — it remains a pure, local, auditable editor.

In an era saturated with agent-generated code, a text editor may seem like a relic of the past — but it's never too late to build a tool that truly feels right in your hand, even if it belongs to a bygone age


r/Clojure • • 16h ago

A blazing fast and versatile Linux desktop launcher, written in Jolt dialect of Clojure.

Thumbnail github.com
42 Upvotes

r/Clojure • • 1h ago

Where Did This div Come From? - Patrick de Kruif (Clojure/Conj 2026)

Thumbnail youtube.com
8 Upvotes

Fourteen years ago, Bret Victor argued that creators need an immediate connection to what they make. Clojure already lived it: the REPL, then Figwheel and shadow-cljs in the browser. But it stops at the rendered page: you can change the code and watch the page update, yet you can't point at something on it and ask which Clojure form made it. Render Hiccup to HTML and the div forgets it was ever Clojure code on a line. Three clicks deep? Grep and guesswork. This talk builds the other half: a source inspector wiring your app, browser, and editor into one loop. Hover an element and the editor jumps to the Hiccup that made it. Put your cursor on a view and the element lights up, definition told apart from call site. It's surprisingly little code. We build it live, end to end, so you can wire the same loop into your own server-rendered Hiccup app.

Speaker: Patrick de Kruif, Independent Clojure Developer

Patrick de Kruif has built software in Clojure professionally for the past five years, and tinkered with it longer still as a side interest before that. His work is mostly web applications backed by databases, and pretty much everything around them. From schema and UI through to CI, deployment, and the devops that keeps it all running. He's happiest working on interactive systems, with a weakness for small, sharp tools over large frameworks.