The Common Lisp Cookbook – Editor support

Table of Contents

The Common Lisp Cookbook – Editor support

šŸ“¢ New videos: web dev demo part 1, dynamic page with HTMX, Weblocks demo

šŸ“• Get the EPUB and PDF

The editor of choice is still Emacs, but it is not the only one.

Emacs

SLIME is the Superior Lisp Interaction Mode for Emacs. It has support for interacting with a running Common Lisp process for compilation, debugging, documentation lookup, cross-references, and so on. It works with many implementations.

Portacle is a portable and multi-platform Common Lisp environment. It ships Emacs, SBCL, Quicklisp, SLIME and Git.

Portacle with an open Slime REPL

Using Emacs as an IDE

See ā€œUsing Emacs as an IDEā€.

Vim & Neovim

Slimv is a full-blown environment for Common Lisp inside of Vim.

Vlime is a Common Lisp dev environment for Vim (and Neovim), similar to SLIME for Emacs and SLIMV for Vim.

The Slimv plugin with an open REPL

cl-neovim makes it possible to write Neovim plugins in Common Lisp.

quicklisp.nvim is a Neovim frontend for Quicklisp.

Slimv_box brings Vim, SBCL, ABCL, and tmux in a Docker container for a quick installation.

See also:

Pulsar (ex Atom)

See SLIMA. This package allows you to interactively develop Common Lisp code, turning Atom, or now Pulsar, into a pretty good Lisp IDE. It features:

It is based on the Swank backend, like Slime for Emacs.

The SLIMA extension for Atom with an open Lisp REPL

VSCode

Alive makes VSCode a powerful Common Lisp development. It hooks directly into the Swank server that Emacs Slime uses and is fully compatible with VSCodeā€™s ability to develop remotely in containers, WSL, Remote machines, etc. It has no dependencies beyond a version of Common Lisp on which to run the Swank server. It can be configured to run with Quicklisp, CLPM, and Roswell. It currently supports:

The Alive VSCode plugin showing the interactive debugger.

commonlisp-vscode extension works via the cl-lsp language server and itā€™s possible to write LSP client that works in other editors. It depends heavily on Roswell. It currently supports:

The VSCode extension with a Lisp REPL, code completion and a mini-map.

Using VSCode with Alive

See Using VSCode with Alive.

JetBrains - NEW in Jan, 2023!

SLT is a new (published on January, 2023) plugin for the suite of JetBrainsā€™ IDEs. It uses a modified SLIME/Swank protocol to commmunicate with SBCL, providing IDE capabilities for Common Lisp.

It has a very good user guide.

At the time of writing, for its version 0.4, it supports:

SLT, a good Common Lisp plugin for JetBrains IDEs.

Eclipse

Dandelion is a plugin for the Eclipse IDE.

Available for Windows, Mac and Linux, built-in SBCL and CLISP support and possibility to connect other environments, interactive debugger with restarts, macro-expansion, parenthesis matching,ā€¦

Dandelion, a simple Common Lisp plugin for Eclipse

Lem

Lem is an editor tailored for Common Lisp development. Once you install it, you can start developing. Its interface resembles Emacs and SLIME (same shortcuts). It comes with an ncurses and an SDL2 frontend, and other programming modes thanks to its built-in LSP client: Python, Go, Rust, JS, Nim, Scheme, HTML, CSS, plus a directory mode, a vim layer, and more.

Lem running in a SDL2 GUI.

It can be started as a REPL right away in the terminal. Run it with:

lem --eval "(lem-lisp-mode:start-lisp-repl t)"

So you probably want a shell alias:

alias ilem='lem --eval "(lem-lisp-mode:start-lisp-repl t)"'

Lem running in the terminal with the Lisp REPL full screen, showing a completion window.

Sublime Text

Sublime Text has now good support for Common Lisp.

First install the ā€œSublimeREPLā€ package and then see the options in Tools/SublimeREPL to choose your CL implementation.

Then Slyblime ships IDE-like features to interact with the running Lisp image. It is an implementation of SLY and it uses the same backend (SLYNK). It provides advanced features including a debugger with stack frame inspection.

A Lisp REPL in Sublime Text

LispWorks (proprietary)

LispWorks is a Common Lisp implementation that comes with its own Integrated Development Environment (IDE) and its share of unique features, such as the CAPI GUI toolkit. It is proprietary and provides a free limited version.

You can read our LispWorks review here.

The LispWorks listener and the editor in the Mate desktop environment

Geany (experimental)

Geany-lisp is an experimental lisp mode for the Geany editor. It features completion of symbols, smart indenting, jump to definition, compilation of the current file and highlighting of errors and warnings, a REPL, and a project skeleton creator.

The Geany Lisp plugin showing compilation warnings

Notebooks

common-lisp-jupyter is a Common Lisp kernel for Jupyter notebooks.

You can see a live Jupyter notebook written in Lisp here. It is easy to install (Roswell, repo2docker and Docker recipes).

A Jupyter notebook running a Common Lisp kernel, exploring the Lorentz system of differential equations, showing a colorful 3D plot with interactive controls (note: the code in the screenshot is actually not Lisp!)

There is also Darkmatter, a notebook-style Common Lisp environment, built in Common Lisp.

REPLs

cl-repl is an ipython-like REPL. It supports symbol completion, magic and shell commands, multi-line editing, editing command in a file and a simple debugger.

It is available as a binary.

You might also like sbcli, an even simpler REPL with readline capabilities. It handles errors gracefully instead of showing a debugger.

cl-repl 0.4.1 runnning in the terminal, built with Roswell, featuring multi-line prompts and syntax highlighting.

Others

There are some more editors out there, more or less discontinued, and free versions of other Lisp vendors, such as Allegro CL.

Page source: editor-support.md

T
O
C