lem
CLAUDE.md3.1k starsChanged 10 months agoMITView on GitHub
Lem is a text editor written in Common Lisp with multiple frontend support (terminal, GUI, browser). Four-layer design: Frontends → Interface (lem-if:*) → Core → Extensions Key abstractions: - Buffer: Text storage with points, marks, undo history - Window: Buffer display, organized in tree (splits) or floating - Mode: Major (one per buffer) + Minor (multiple, toggleable) - Command: Interactive operation via define-command This project uses code-contractor for automated PR review. code-contractor is a GitHub App that validates pull requests…
We split this CLAUDE.md into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 72
Use lem-core package symbols, avoid lem:: internal access
≈ “Common” is an estimate: at least 1 in 5 of the 25,680 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md - Lem Editor
Lem is a text editor written in Common Lisp with multiple frontend support (terminal, GUI, browser).
Quick Reference
# Build and run
make sdl2 # GUI version
make ncurses # Terminal version
# Development
qlot install # Install dependencies
make test # Run testsProject Structure
src/ # Core editor
├── lem.lisp # Entry point
├── buffer/ # Text buffer system
├── window/ # Window management
├── mode.lisp # Mode system
├── keymap.lisp # Key bindings
├── defcommand.lisp # Command definition
└── interface.lisp # Frontend abstraction
frontends/ # UI implementations
├── sdl2/ # Desktop GUI
├── ncurses/ # Terminal
└── webview/ # Browser-based
extensions/ # Language modes (50+)
├── lisp-mode/ # Common Lisp with REPL
├── lsp-mode/ # LSP client
└── vi-mode/ # Vim emulationArchitecture
Four-layer design: Frontends → Interface (lem-if:*) → Core → Extensions
Key abstractions:
- Buffer: Text storage with points, marks, undo history
- Window: Buffer display, organized in tree (splits) or floating
- Mode: Major (one per buffer) + Minor (multiple, toggleable)
- Command: Interactive operation via
define-command
Coding Standards
This project uses code-contractor for automated PR review. code-contractor is a GitHub App that validates pull requests against rules defined in contract.yml.
All coding standards are defined in contract.yml at the repository root. Refer to it for:
- Package and file structure rules
- Documentation requirements
- Style conventions (loop syntax, error handling, etc.)
- Functional programming guidelines
Key Files for Common Tasks
| Task | Files |
| Add command | src/defcommand.lisp for macro, src/commands/ for examples |
| Add mode | extensions/ for examples, inherit language-mode |
| Add frontend | src/interface.lisp for protocol, frontends/ for impl |
| Buffer ops | src/buffer/internal/buffer.lisp, src/buffer/internal/edit.lisp |
| Window ops | src/window/window.lisp |
Development Notes
- Use
lem-corepackage symbols, avoidlem::internal access - Frontends implement
lem-if:*generic functions - Modes register via
define-major-mode/define-minor-mode - Commands register via
define-commandwith argument descriptors
Configuration
User config locations (in order):
$LEM_HOME/init.lisp~/.config/lem/init.lisp~/.lem/init.lisp~/.lemrc
Documentation
- Architecture details:
docs/ARCHITECTURE.md - Extension development:
docs/extension-development.md - Online docs: https://lem-project.github.io/
Recent Changes
- 001-multi-language-canvas: Added Common Lisp (SBCL), tree-sitter-cl FFI bindings + lem/core, tree-sitter-cl, lem-call-graph (existing), lem-tree-sitter
- 001-multi-language-canvas: Added [if applicable, e.g., PostgreSQL, CoreData, files or N/A]
Active Technologies
- Common Lisp (SBCL), tree-sitter-cl FFI bindings + lem/core, tree-sitter-cl, lem-call-graph (existing), lem-tree-sitter (001-multi-language-canvas)
- N/A (in-memory graph structures, optional position caching) (001-multi-language-canvas)
Trending
Less talk lately.about the whole repository
Who's talking about lem-project/lem
- A Hacker News story“Lem v2.0.0 – Common Lisp IDE with high expansibility”Hacker News · May 22, 2023 · 129 points
- NixOS/nixpkgs“Package request: Lem Editor”GitHub · Sep 2, 2024 · 31 reactions
- @jackrusher.com“Lem is fairly recent emacs-like editor written in Common Lisp. It has an editor backend with front-ends for …”Bluesky · May 29, 2023 · 10 likes
- A Hacker News story“Lem v2.1.0 – Common Lisp IDE with high expansibility”Hacker News · Jul 18, 2023 · 5 points
- A Hacker News story“Lem: Common Lisp editor/IDE with high expansibility”Hacker News · Aug 9, 2022 · 5 points
The biggest 5 of 35 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 35
Talked about on GitHub, Hacker News and Bluesky (35 times).
On GitHub · 29
- Sep 2, 2024Package request: Lem Editor — NixOS/nixpkgs31 reactions · 6 comments
- Jun 5, 2023Support multilingual — lem-project/lem-project.github.io3 reactions · 3 comments
- May 12, 2022Neovim integration — atlas-engineer/nyxt2 reactions · 22 comments
- Aug 9, 2023Documentation: Improve section on how to use Quicklisp/ASDF/other library manager for `lisp-modules` — NixOS/nixpkgs1 reaction · 7 comments
- Oct 10, 2026Permission to Port to Lem — triska/ediprolog0 reactions · 1 comment
24 more on GitHub
- Jul 17, 2026M0: Environment hardening checklist — yathxyz/lem0 reactions · 1 comment
- Jul 16, 2026Failure to install quicklisp when behind proxy — fukamachi/qlot0 reactions
- Jul 10, 2026Common Lisp — helheim-emacs/helheim0 reactions
- Nov 5, 2025Add instructions for webview-ncurses installation — lem-project/lem-project.github.io0 reactions
- Sep 30, 2025Send PR to Lem? — mychris/lem-bookmark0 reactions · 2 comments
- Feb 10, 2025narkive.com — mypdns/matrix0 reactions
- Nov 9, 2024add: tips for `find-definitions` on built-in symbol. — lem-project/lem-project.github.io0 reactions · 3 comments
- Nov 9, 2024add: the tips for `find-definitions` command. — lem-project/lem-project.github.io0 reactions · 5 comments
- Nov 2, 2024Dupe of `System "lem-vi-sexp" not found` — fukamachi/.lem0 reactions · 9 comments
- Oct 18, 2024Update copilot.md: `copilot-login` -> `copilot-signin` — lem-project/lem-project.github.io0 reactions
- Oct 1, 2024Lem in Guix — Fuglesteg/guix-fuglesteg-channel0 reactions
- Jul 24, 2024Add about SDL settings in windows — lem-project/lem-project.github.io0 reactions
- Feb 22, 2024Write the GUI in CL — atlas-engineer/nyxt0 reactions · 5 comments
- Feb 9, 2024[System Request]: Lem Editor (and extensions) — ocicl/request-system-additions-here0 reactions · 6 comments
- Dec 6, 2023The qlot installation seems to have failed. — fukamachi/qlot0 reactions · 3 comments
- Nov 4, 2023update hack on lem with micros, update make target — lem-project/lem-project.github.io0 reactions · 1 comment
- Sep 9, 2023Remove static declaration on my_exit — lem-project/async-process0 reactions · 1 comment
- Aug 22, 2023[Bug] GitHub notifications are showing way too many — seagle0128/doom-modeline0 reactions · 3 comments
- Aug 22, 2023Package request: lem — NixOS/nixpkgs0 reactions · 17 comments
- Aug 5, 2023Document lisp-search-symbol — lem-project/lem-project.github.io0 reactions · 1 comment
- Jul 21, 2023How to use the package — borodust/alien-works-delivery0 reactions
- Jul 6, 2023Check OpenGL errors before checking `glFramebufferTexture2DEXT()` — libsdl-org/SDL0 reactions · 5 comments
- Jun 15, 2023Lem working with Clojure — lsevero/abclj0 reactions
- Jun 11, 2023Standardize release zip files — lem-project/setup-lem0 reactions · 2 comments
On Hacker News · 5
- May 22, 2023Lem v2.0.0 – Common Lisp IDE with high expansibility129 points · 22 comments
- Jul 18, 2023Lem v2.1.0 – Common Lisp IDE with high expansibility5 points · 2 comments
- Aug 9, 2022Lem: Common Lisp editor/IDE with high expansibility5 points
- Oct 2, 2022Lem: Common Lisp editor/IDE with high expansibility4 points
- Jan 20, 2022Lem: About Common Lisp editor/IDE with high expansibility2 points
On Bluesky · 1
- May 29, 2023Lem is fairly recent emacs-like editor written in Common Lisp. It has an editor backend with front-ends for the terminal, JSON-RPC, and… — @jackrusher.com10 likes and reposts · 1 reply
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

