gitwtfhub

wtf is legmacs?

nooga/legmacs — explained in plain English

Analysis updated 2026-05-18

25ClojureAudience · developerComplexity · 3/5LicenseSetup · easy

TL;DR

A small terminal text editor inspired by Emacs, written in and scriptable with the same Clojure-like Lisp language, so configuring it and building it are the same activity.

Mindmap

mindmap
  root((legmacs))
    What it does
      Emacs style terminal editor
      Written in let-go Lisp
      Same language configures it
    Tech stack
      Clojure dialect let-go
      Go bytecode VM
    Use cases
      Edit code with Emacs keys
      Script with same Lisp
      Live REPL inside editor
    Audience
      Developers
      Lisp enthusiasts

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Edit code in the terminal with Emacs-style keybindings, window splits, and multiple buffers.

REASON 2

Script and customize the editor using the same Lisp language it is built in, with no separate plugin API.

REASON 3

Get syntax highlighting and auto-indent for over 20 programming languages out of the box.

REASON 4

Use a live REPL inside the editor to evaluate and experiment with let-go or Clojure-style code.

What's in the stack?

ClojureLispGolet-go

How it stacks up

nooga/legmacsyogthos/flatirondynamic-alpha/ducktape
Stars252719
LanguageClojureClojureClojure
Setup difficultyeasymoderatemoderate
Complexity3/53/53/5
Audiencedeveloperdeveloperdata

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · easy Time to first run · 5min

A single Homebrew command installs a self-contained binary, no separate runtime is needed unless building from source.

MIT license: use freely for any purpose, including commercial use, as long as you keep the copyright notice.

Wtf does this do

Legmacs is a small terminal-based text editor styled after Emacs, built with a Lisp language called let-go, which is a dialect close to Clojure that runs on its own lightweight virtual machine written in Go. The standout idea here is that the editor itself and the language you customize it with are the exact same thing: there is no separate plugin system bolted on the side. Every built-in command and key binding is written using the same tools your own configuration file would use, so learning to configure legmacs and learning to modify legmacs are the same skill. Despite being written in only about 4,500 lines of code, it packs in a surprising number of features familiar to Emacs users: multiple buffers, window splits you can mix and nest, an extensible system of major and minor editing modes, and syntax highlighting with matching brackets and auto-indent for over 20 programming languages out of the box, with a simple way to add support for more. Because the editor is written in the same Lisp language it lets you script, you can evaluate code live inside the editor itself, turning the editing buffer into a running programming environment for the language. It also includes a dedicated REPL buffer for interactive experimentation, keyboard macros, fuzzy search style completion for commands and files, and even an optional Vim-style modal editing mode for people who prefer that style of navigation. Installing it is straightforward on macOS or Linux using the Homebrew package manager, which downloads a single self-contained program with nothing else to install. Alternatively, you can build and run it from its source code if you have the let-go language runtime installed. Customizing your setup means placing a small configuration file in a specific folder, written in the same Lisp syntax the editor itself is built from. This project is aimed at developers who enjoy Emacs-style terminal editors and are curious about Lisp programming, particularly those interested in an editor where the boundary between using the tool and programming the tool disappears. It is released under the MIT license, meaning it can be freely used, modified, and shared.

Yoink these prompts

Prompt 1
Walk me through installing legmacs with Homebrew and opening my first file in it.
Prompt 2
Help me write a legmacs-init configuration file that binds a custom command to a key.
Prompt 3
Explain how legmacs lets you script the editor using the same language it's written in.
Prompt 4
How do I add syntax highlighting support for a new programming language in legmacs?

Frequently asked questions

wtf is legmacs?

A small terminal text editor inspired by Emacs, written in and scriptable with the same Clojure-like Lisp language, so configuring it and building it are the same activity.

What language is legmacs written in?

Mainly Clojure. The stack also includes Clojure, Lisp, Go.

What license does legmacs use?

MIT license: use freely for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is legmacs to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is legmacs for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.