:VSCLIDE
A full-powered Common Lisp IDE for VS Code, comes with its
own Common Lisp reader (via Eclector) and the mighty power
of the Lisp image via Slynk if you so choose. Brings the
Emacs Sly experience to VS Code.
Status: early development, version 0.3.1 is now available
on the VS Code Extension Marketplace and the Open VSX Registry.
Features
- Lisp Omniscient features a Common Lisp reader, so
:VSCLIDE
intimately knows and understands core Lisp without needing to be
connected to a Lisp image. This is powered by
Eclector.
- Multiple Connections: start a Lisp, attach to running slynk servers
(Emacs, Nyxt, Lem, etc.) as
sly-connect does, and keep them all at once;
one is active and serves evaluation, completion and the rest
- mREPL: a REPL panel with several REPLs, grouped by connection,
that you can split side by side as in the terminal; values are
clickable and open the inspector
- Evaluate and Compile: top-level form, last expression, selection,
form or whole file, with compiler notes in the Problems panel
- Completion, Signature help and Go-to-Definition: from the running
Lisp; completion can also work from the symbols of the file alone, with
no Lisp running
- Debugger and Inspector: a side panel with restarts, frames, stepping
and source locations; every open level and every inspected object is a
click away, on each connection
- Stickers: SLY's stickers; mark forms, record values, replay them
- Breakpoints: the gutter's, on top of stickers
- Indentation: Emacs-style Tab and Enter, from the rules of the macros
your Lisp has loaded
- Syntax Highlighting: its own grammar; your theme stays as it is.
In addition, the Eclector arm reads your code and provides
definitions and their names, parameters and where they are used, calls,
reader macros (
#+ and #-) without code compilation. Full syntax
highlighting is powered once connected to Slynk.
- Key bindings: a VS Code style set and an SLY and Emacs set
- Linux & Windows: the same extension and the same Lisp side on both
How it works
VSCLIDE has two parts:
- clide, written in Common Lisp, speaks slynk to a running Lisp, or
to several, and serves the extension over JSON-RPC on a loopback
socket. It also reads your source text with Eclector, which needs no
running Lisp, for completion and highlighting.
- jekyl, written in TypeScript, is the VS Code extension. It starts
clide and provides the editor-facing features.
You bring your own Lisp implementation. VSCLIDE speaks slynk only; a
swank (SLIME) server is not supported. See
docs/architecture.md for the design.
Dependencies
Direct dependencies:
- SBCL, the Lisp VSCLIDE runs
- ocicl, which fetches the Lisp
libraries, slynk included; set it up once with
ocicl setup, which
loads it from your SBCL init file (.sbclrc)
- Node.js and npm, to build the extension
- VS Code or VSCodium
VSCLIDE runs on Linux and on Windows.
Install
Install from the VS Code Extension Marketplace or Open VSX Registry.
If you want the latest development you can build a VSIX and
install it:
npm install
npm run package
codium --install-extension vsclide-*.vsix # or: code
When it activates, for instance on opening a Lisp file, the extension
runs ocicl install in its own code/clide folder, which fetches the
pinned dependencies, slynk included; set vsclide.ocicl.command if
ocicl is not on your PATH. It runs again only when the pins change.
Quick start
From a checkout, for development:
npm install
npm run compile
(cd code/clide && ocicl install)
Open the folder in VS Code and press F5 to start an Extension
Development Host. Open a .lisp file there and evaluate a form; the
first evaluation starts Lisp, or run VSCLIDE: Connect.
docs/contributing.md has the details.
Usage
Every command is in the palette under VSCLIDE:.
To attach to a running slynk server, run VSCLIDE: Connect to Running Slynk. The status bar shows the active connection; click it to switch
when several are open, or use VSCLIDE: Switch Connection.
VSCLIDE: Disconnect ends one; it stops a Lisp VSCLIDE started and
leaves an attached server running.
Key bindings come in two sets, chosen by vsclide.keymap: auto
(the default) picks the Emacs set when Awesome Emacs Keymap is
installed, otherwise the VS Code set. See
docs/keybindings.md.
Settings, all under vsclide.:
| Setting |
Controls |
lisp.command |
the Lisp executable (default sbcl) |
keymap |
the key set: auto, vscode or emacs |
repl.* |
opening on connect, Sylvester's art, package sync |
completion.* |
the completion source (slynk or document), limit and documentation |
highlighting.* |
the reader's colours, loaded macros, #+/#- forms |
definitions.enabled |
go to definition |
references.* |
find all references, and which kinds it searches |
diagnostics.* |
compiler notes in the editor |
signatureHelp.* |
the lambda list popup |
stickers.autoRefresh |
fetching recordings after code runs |
VSCLIDE never changes your settings.
Documentation
License
(defmacro license-terms (system . plist)
"See LICENSE for the actual legally-binding, non-parenthesized version."
(declare (optimize (safety 0))) ; use at your own risk
`(list :system ',system ,@plist))
(license-terms vsclide
:type '(:MIT . "https://spdx.org/licenses/MIT.html")
:permissions '(:use :copy :modify :merge :publish :distribute
:sublicense :sell)
:conditions '(:include-copyright-notice
:include-license-notice)
:warranty nil)
↳ LICENSE
| |