Editors for Clojure developmentλ︎
The best editor to use for learning Clojure is the editor already familiar with (or want to learn).
Use SublimeText & ClojureSublimed if unsure where to start as it will be the simplest tool to use.
Clojure editor featuresλ︎
An ideal Clojure editor includes the these core features
- running / connecting to a REPL process
- evaluation results inline or in a repl window (fast feedback on what the code does)
- syntax highlighting (including highlight of matching parens)
- structural editing to ensure parens are balanced when writing and refactor code
- data inspector to visualise large and nested data, or connection to external data inpector tools
Clojure aware editorsλ︎
Emacs (Spacemacs, Doom, Prelude), Neovim (Conjure) and VSCode (Calva) are the most common open source Editors for Clojure and ClojureScript development.
SublimeText and IntelliJ are commercial editors (with limited free editions) which also provide Clojure support
Emacs is a very powerful editor with thousands of packages enabling a person to do almost any digital task concievable. Emacs is highly extensible via the ELisp programming language used to write configuration and the numerous Emacs packages. Emacs 28 onward uses Native Compilation of Emacs packages, dramatically speeding up many common tasks.
Emacs uses CIDER and Clojure LSP for a feature rich clojure development experience.
Use one of the popular community configurations for Emacs or visit the CIDER documentation to learn how to add Clojure support to Emacs.
Spacemacs is a community configuration bringing Emacs features and Vim style editing together. Spacemacs uses a mnemonic menu system that makes it easy to learn and provides detailed documentation for configuring and using Emacs.
Practicalli Spacemacs provides a guide to Clojure development, vim-style editing, documenting with org-mode, Git version control with Magit, Issues & Pull Requests with Forge and dozens of other features.
practicalli/spacemacs.d repository contains a customised configuration for Clojure development and supporting tools. Browse the repository online or fork / clone the repository
The Practicalli configuration should replace the
~/.spacemacs file if it exists
Spacemacs install guide - Practicalli Spacemacs
Doom Emacs is a community configuration for Emacs that provides a minimalistic configuration that is readily customisable. Doom Emacs is most suited to those coming from a Vim-style editing background or simply looking for a lightweight setup with options to extend the configuration.
practicalli/doom-emacs-config repository contains a customised configuration for Clojure development and supporting tools. Browse the repository online or fork / clone the repository
~/.config/doom/directory created by the
Emacs Prelude is an easy to use Emacs configuration for Emacs newcomers and lots of additional power for Emacs power users, from the author of CIDER - the definitive Clojure IDE for Emacs.
Prelude uses the traditional chorded key bindings to drive Emacs, e.g. Ctrl+c Ctrl+c to evaluate the current top-level form.
Emacs 28 is recommended as it includes native compilation support and optomised JSON support which is valuable for Language Server Protocol servers.
Emacs is available for Linux, MacOSX and Windows.
apt-cache show emacs to check available versions of Emacs in the Ubuntu package manager. If version 28 is available, install Emacs using the Ubuntu package manager.
Additional versions of Emacs are available via the Ubuntu Emacs Team Personal Package Archive.
sudo apt install emacs-snapshot package to use the latest nightly build of Emacs, although be aware that some things may break.
Build Emacs 28 from source
Building Emacs 28 from source code on Ubuntu is relatively straight forward task, although it will take a little time to compile. Building Emacs allows customisation of some features, such as native compilatin of elisp to enhance the performance of Emacs.
Emacs Plus from Homebrew provides many options, including native compilation and Spacemacs Icon for application launchers.
Emacs.app is installed to:
Optionally run Emacs plus as a service
Get a hot cup of something as Emacs native compilation compiles all the things.
Download Emacs-28.2 from the GNU repository and extract the zip file to
Alternatively, if you are using the Chocolatey package manager then install Emacs version 28
Add the Emacs directory to the
PATH variable in your user account environment variables.
To start Emacs run the command
runemacs.exe. You can also pin this to the start menu or task bar.
Access to common Unix tools
Command line tools, such as
diff, are used by Emacs. To have these command line tools available in Windows, install Emacs as above but then run emacs from a Unix shell such as GitBash.
Once Emacs is installed, add the cider package for essential Clojure support.
Neovim is a hyper-extensible text editor that evolved from Vim whist still fully compatible with Vim"s editing model and Vimscript extension language. Neovim uses lua configuration and with the aniseed package configuration and Neovim packages can be written in Fennel (a lisp dialect).
Neovim is based on multi-model editing (e.g. normal, insert, visual editing states) providing a highly effective tool for writing code, configuration and documentation.
Neovim now includes Treesitter which understands the syntax of a great many programming and configuration languages, also providing a Language Sever Protocol (LSP) client.
Conjure is predominantly used for Clojure development and supports Clojure CLI, Leiningen and Babashka projects (as well as several other Lisp dialects and interesting languages)
Try the Conjure interactive
:ConjureSchool tutorial which only requires a recent version of neovim
:q to quit the tutorial.
Practicalli Neovim - install Neovim & Conjure, plus user guide
Practicalli Neovim provides an install and user guide for Neovim and Conjure for Clojure development, folloiwng a REPL driven workflow.
practicalli/neovim-config-redux is provided as a configuration for Neovim which adds a range of Neovim plugins for a rich development experience.
- mnemonic of key bindings to make adoptiong Neovim easier
- visual navigation for files, project, environment variables and any other list items
- version control and GitHub issue & pull request management
Conjure provides interactive environment for evaluating Clojure code and providing inline results (or see results in an Heads Up Display or Log buffer).
Practicalli Neovim covers installation and basic use of Neovim for Clojure development.
SpaceVim is a fully featured vim experience that includes a simple Clojure development environment based around vim-fireplace
Follow the Quick Start Guide to instal SpaceVim
Add the Clojure layer to the SpaceVim custom configuration file
Interactive Clojure Environment for Vim8/Neovim, aimed at the more experienced Vim/Neovim user.
vim-iced uses vim-sexp for structural editing
vim-plug is required to install the vim-iced packages.
VS Code is a freely available editor build on open source and available for Linux, MacOS and Microsoft Windows.
VS Code has a large marketplace of extensions, proiding additional tools for a complete development environment.
Calva is the most commonly used extension for Clojure support and aims to provide similar features to Emacs Cider (and uses some of the same Clojure libraries).
VSpaceCode provides a mnemonic menu to drive VS Code by keyboard alone, vim editing and rich Git client (edamagit). VSpaceCode extension also provides key bindings for common Calva commands. Users experienced with Neovim and Emacs (Spacemacs / Doom) will find this extension makes VS Code easiter to use than vanilla VS Code or VS Code with an Neovim backend.
Clover provides a mininal, highly customisable environment using Socket REPL.
The Calva extension adds Clojure REPL support to VS Code editor, including Clojure LSP, formatting, structural editing and many other features.
Calva is under active development and the #calva channel on the Clojurians Slack community can be supportive.
Calva Getting Started Guide Calva - VS Code Marketplace
VSpaceCode is a Spacemacs-like community configuration for Microsoft VS Code. Drive VS Code entirely from the keyboard, using easy to remember mnemonic keys for all commands and full vim-stile editing tools.
Calva is supported by VSpaceCode and Calva commands are included in the mneomic menu when a Clojure file is open.
Edamagit is a sophisticated text based Git client (like magit for Emacs) is also included in the VSpacemacs extension.
Practicalli VSpaceCode install guide Practicalli VSpaceCode user guide
Clover is a Socket REPL based development tool for Clojure with some ClojureScript support (not including Figwheel).
Clojure GitLab repository includes usage details.
SublimeText 4 is a lightweight and feature rich text editor, especially of interest to those that like a simple and uncluttered UI. SublimeText is a commercial project although has free trial version available (check conditions of use).
Clojure-Sublimed provides Clojure support for SublimeText 4, with support for Clojure & Edn syntax, code formatting and an nREPL client to connect to a Clojure REPL process.
Tutkain is an Sublime 4 package that supports Clojure development (self-described as alpha software).
Build configuration to start a REPL
Clojure Sublime connects to a REPL via an nREPL server. Run a terminal REPL using Clojure CLI, Leinginen (
lein repl) or Shadow-cljs (
shadow-cljs watch app)
Alternatively, configure Clojure Sublimed to run a REPL process by creating a new build system via Tools » Build System » New Build System. The following example starts a Clojure CLI REPL with nREPL server and assumes Java and Clojure CLI are installed.
SublimeText install Clojure-Sublimed install SublimeText Documentation
Pulsar Community-led Hyper-Hackable Editor is a very new project to create a community version of the Atom editor from GitHub.
Chlorine plugin provides a Clojure and ClojureScript development environment using Socket-REPL integration
Pulsar Community-led Hyper-Hackable Editor Pulsar Chlorine plugin
Atom not actively developed
Atom will be archived on December 15 2022 with no further updates from GitHub team
Consider using VSCode with Clover or Calva plugin or help support the evolution of the Pulsar project
Cursive may be an appropriate choice for people from a Java background who are already familiar with IntelliJ. Cursive will run static analysis of Clojure code when opening a Clojure project, as IntelliJ does with other languages.
Follow the Cursive user guide to configure IntelliJ and install Cursive.
Requires license for commercial development
There is a free license when development is not for commercial projects, however, a license must be purchased for each developer working on a commercial project.
IntelliJ & Cursive install guide