emacs.d/clones/lisp/lispcookbook.github.io/cl-cookbook/editor-support.html

339 lines
12 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="en">
<head>
<meta name="generator" content=
"HTML Tidy for HTML5 for Linux version 5.2.0">
<title>Editor support</title>
<meta charset="utf-8">
<meta name="description" content="A collection of examples of using Common Lisp">
<meta name="viewport" content=
"width=device-width, initial-scale=1">
<link rel="icon" href=
"assets/cl-logo-blue.png"/>
<link rel="stylesheet" href=
"assets/style.css">
<script type="text/javascript" src=
"assets/highlight-lisp.js">
</script>
<script type="text/javascript" src=
"assets/jquery-3.2.1.min.js">
</script>
<script type="text/javascript" src=
"assets/jquery.toc/jquery.toc.min.js">
</script>
<script type="text/javascript" src=
"assets/toggle-toc.js">
</script>
<link rel="stylesheet" href=
"assets/github.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
</head>
<body>
<h1 id="title-xs"><a href="index.html">The Common Lisp Cookbook</a> &ndash; Editor support</h1>
<div id="logo-container">
<a href="index.html">
<img id="logo" src="assets/cl-logo-blue.png"/>
</a>
<div id="searchform-container">
<form onsubmit="duckSearch()" action="javascript:void(0)">
<input id="searchField" type="text" value="" placeholder="Search...">
</form>
</div>
<div id="toc-container" class="toc-close">
<div id="toc-title">Table of Contents</div>
<ul id="toc" class="list-unstyled"></ul>
</div>
</div>
<div id="content-container">
<h1 id="title-non-xs"><a href="index.html">The Common Lisp Cookbook</a> &ndash; Editor support</h1>
<!-- Announcement we can keep for 1 month or more. I remove it and re-add it from time to time. -->
<p class="announce">
📹 <a href="https://www.udemy.com/course/common-lisp-programming/?couponCode=6926D599AA-LISP4ALL">NEW! Learn Lisp in videos and support our contributors with this 40% discount.</a>
</p>
<p class="announce-neutral">
📕 <a href="index.html#download-in-epub">Get the EPUB and PDF</a>
</p>
<div id="content"
<p>The editor of choice is still <a href="https://www.gnu.org/software/emacs/">Emacs</a>, but it is not the only one.</p>
<h2 id="emacs">Emacs</h2>
<p><a href="https://github.com/slime/slime/">SLIME</a> 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.</p>
<p><a href="https://shinmera.github.io/portacle/">Portacle</a> is a portable and
multi-platform Common Lisp environment. It ships Emacs, SBCL,
Quicklisp, SLIME and Git.</p>
<p><img src="assets/portacle.png" style="width: 800px" /></p>
<h3 id="installing-slime">Installing SLIME</h3>
<p>SLIME is in the official GNU ELPA repository of Emacs Lisp packages
(in Emacs24 and forward). Install with:</p>
<pre><code>M-x package-install RET slime RET
</code></pre>
<p>Since SLIME is heavily modular and the defaults only do the bare minimum (not
even the SLIME REPL), you might want to enable more features with</p>
<pre><code class="language-lisp">(slime-setup '(slime-fancy slime-quicklisp slime-asdf))
</code></pre>
<p>For more details, consult the
<a href="https://common-lisp.net/project/slime/doc/html/">documentation</a> (also available
as an Info page).</p>
<p>Now you can run SLIME with <code>M-x slime</code> and/or <code>M-x slime-connect</code>.</p>
<p>See also:</p>
<ul>
<li><a href="https://wikemacs.org/wiki/SLIME">https://wikemacs.org/wiki/SLIME</a> - configuration examples and extensions.</li>
</ul>
<h3 id="using-emacs-as-an-ide">Using Emacs as an IDE</h3>
<p>See <a href="emacs-ide.html">“Using Emacs as an IDE”</a>.</p>
<h2 id="vim--neovim">Vim &amp; Neovim</h2>
<p><a href="https://www.vim.org/scripts/script.php?script_id=2531">Slimv</a> is a full-blown
environment for Common Lisp inside of Vim.</p>
<p><a href="https://github.com/vlime/vlime">Vlime</a> is a Common Lisp dev
environment for Vim (and Neovim), similar to SLIME for Emacs and SLIMV
for Vim.</p>
<p><img src="assets/slimv.jpg" style="width: 800px" /></p>
<p><a href="https://github.com/adolenc/cl-neovim/">cl-neovim</a> makes it possible to write
Neovim plugins in Common Lisp.</p>
<p><a href="https://gitlab.com/HiPhish/quicklisp.nvim">quicklisp.nvim</a> is a Neovim
frontend for Quicklisp.</p>
<p><a href="https://github.com/justin2004/slimv_box">Slimv_box</a> brings Vim, SBCL, ABCL,
and tmux in a Docker container for a quick installation.</p>
<h2 id="atom">Atom</h2>
<p>See <a href="https://github.com/neil-lindquist/slima">SLIMA</a>. This package
allows you to interactively develop Common Lisp code, turning
Atom into a pretty good Lisp IDE.</p>
<p><img src="assets/atom-slime.png" style="width: 800px" /></p>
<h2 id="vscode">VSCode</h2>
<p><a href="https://marketplace.visualstudio.com/items?itemName=rheller.alive">Alive</a> makes
VSCode a powerful Common Lisp development. It hooks directly into the Swank
server that Emacs Slime uses and is fully compatible with VSCodes 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:</p>
<ul>
<li>Syntax highlighting</li>
<li>Code completion</li>
<li>Code formatter</li>
<li>Jump to definition</li>
<li>Snippets</li>
<li>REPL integration</li>
<li>Interactive Debugger</li>
<li>REPL history</li>
<li>Inline evaluation</li>
<li>Macro expand</li>
<li>Disassemble</li>
<li>Inspector</li>
<li>Hover Text</li>
<li>Rename function args and let bindings</li>
<li>Code folding</li>
</ul>
<p><img src="assets/commonlisp-vscode-alive.png" style="width: 800px" /></p>
<p><a href="https://marketplace.visualstudio.com/items?itemName=ailisp.commonlisp-vscode">commonlisp-vscode
extension</a>
works via the <a href="https://github.com/ailisp/cl-lsp">cl-lsp</a> language server and
its possible to write LSP client that works in other editors. It depends
heavily on <a href="https://roswell.github.io/Home.html">Roswell</a>. It currently
supports:</p>
<ul>
<li>running a REPL</li>
<li>evaluate code</li>
<li>auto indent,</li>
<li>code completion</li>
<li>go to definition</li>
<li>documentation on hover</li>
</ul>
<p><img src="assets/commonlisp-vscode.png" style="width: 800px" /></p>
<h3 id="using-vscode-with-alive">Using VSCode with Alive</h3>
<p>See <a href="vscode-alive.html">Using VSCode with Alive</a>.</p>
<h2 id="eclipse">Eclipse</h2>
<p><a href="https://github.com/Ragnaroek/dandelion">Dandelion</a> is a plugin for the
Eclipse IDE.</p>
<p>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,…</p>
<p><img src="dandelion.png" style="width: 800px" /></p>
<h2 id="lem">Lem</h2>
<p><a href="https://github.com/lem-project/lem/wiki">Lem</a> 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 Electron
frontend, and other programming modes: Python, Go, Rust, JS, Nim,
Scheme, HTML, CSS, directory mode, a vim layer, and more.</p>
<p><img src="assets/lem-terminal.png" style="width: 800px" /></p>
<p>It can be started as a REPL right away in the terminal. Run it with:</p>
<pre><code>lem --eval "(lem-lisp-mode:start-lisp-repl t)"
</code></pre>
<p>So you probably want a shell alias:</p>
<pre><code>alias ilem='lem --eval "(lem-lisp-mode:start-lisp-repl t)"'
</code></pre>
<p><img src="assets/lem-terminal.png" style="width: 800px" title="Lem's REPL" /></p>
<h2 id="sublime-text">Sublime Text</h2>
<p><a href="http://www.sublimetext.com/3">Sublime Text</a> has now good support for
Common Lisp.</p>
<p>First install the “SublimeREPL” package and then see the options
in Tools/SublimeREPL to choose your CL implementation.</p>
<p>Then <a href="https://github.com/s-clerc/slyblime">Slyblime</a> 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.</p>
<p><img src="assets/editor-sublime.png" style="width: 800px" /></p>
<h2 id="lispworks-proprietary">LispWorks (proprietary)</h2>
<p><a href="http://www.lispworks.com/">LispWorks</a> 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 <strong>proprietary</strong> and
provides a <strong>free limited version</strong>.</p>
<p>You can <a href="lispworks.html">read our LispWorks review here</a>.</p>
<p><img src="assets/lispworks/two-sided-view.png" style="width: 800px" title="The LispWorks listener an the editor in the Mate desktop environment" /></p>
<h2 id="geany-experimental">Geany (experimental)</h2>
<p><a href="https://github.com/jasom/geany-lisp">Geany-lisp</a> is an experimental
lisp mode for the <a href="https://geany.org/">Geany</a> 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.</p>
<p><img src="assets/geany.png" style="width: 800px" /></p>
<h2 id="notebooks">Notebooks</h2>
<p><a href="https://github.com/yitzchak/common-lisp-jupyter">common-lisp-jupyter</a> is a Common Lisp
kernel for Jupyter notebooks.</p>
<p>You can <a href="https://nbviewer.jupyter.org/github/yitzchak/common-lisp-jupyter/blob/master/examples/about.ipynb">see a live Jupyter notebook written in Lisp here</a>. It is easy to install (Roswell, repo2docker and Docker recipes).</p>
<p><img src="assets/jupyterpreview.png" style="width: 800px" /></p>
<p>There is also <a href="https://github.com/tamamu/darkmatter">Darkmatter</a>, a notebook-style
Common Lisp environment, built in Common Lisp.</p>
<h2 id="repls">REPLs</h2>
<p><a href="https://github.com/koji-kojiro/cl-repl">cl-repl</a> is an ipython-like REPL. It supports symbol completion, magic and shell commands, editing command in a file and a simple debugger.</p>
<p>You might also like <a href="https://github.com/hellerve/sbcli">sbcli</a>, an even simpler REPL with readline capabilities. It handles errors gracefully instead of showing a debugger.</p>
<p><img src="assets/cl-repl.png" style="width: 500px" /></p>
<h2 id="others">Others</h2>
<p>There are some more editors out there, more or less discontinued, and
free versions of other Lisp vendors, such as Allegro CL.</p>
<p class="page-source">
Page source: <a href="https://github.com/LispCookbook/cl-cookbook/blob/master/editor-support.md">editor-support.md</a>
</p>
</div>
<script type="text/javascript">
// Don't write the TOC on the index.
if (window.location.pathname != "/cl-cookbook/") {
$("#toc").toc({
content: "#content", // will ignore the first h1 with the site+page title.
headings: "h1,h2,h3,h4"});
}
$("#two-cols + ul").css({
"column-count": "2",
});
$("#contributors + ul").css({
"column-count": "4",
});
</script>
<div>
<footer class="footer">
<hr/>
&copy; 2002&ndash;2021 the Common Lisp Cookbook Project
</footer>
</div>
<div id="toc-btn">T<br>O<br>C</div>
</div>
<script text="javascript">
HighlightLisp.highlight_auto({className: null});
</script>
<script type="text/javascript">
function duckSearch() {
var searchField = document.getElementById("searchField");
if (searchField && searchField.value) {
var query = escape("site:lispcookbook.github.io/cl-cookbook/ " + searchField.value);
window.location.href = "https://duckduckgo.com/?kj=b2&kf=-1&ko=1&q=" + query;
// https://duckduckgo.com/params
// kj=b2: blue header in results page
// kf=-1: no favicons
}
}
</script>
<script async defer data-domain="lispcookbook.github.io/cl-cookbook" src="https://plausible.io/js/plausible.js"></script>
</body>
</html>