Top 5 IDEs and text editors for Clojure
We carry on with our IDE series! This week, we take a look at some of the best IDEs and text editors for Clojure, a dynamic programming language for the JVM.
We explored Clojure last summer as a part of our Pirates of the JVM series, but there’s more to this dynamic programming language than a brief shore leave could discover. Clojure has been around for over a decade, giving developers a robust and practical platform to work from.
Clojure may be prone to fewer defects on GitHub, but it’s a useful language to know for work as well as hobby coding. Plus, Clojure 1.9 has excellent adoption rates in the community, as everyone moved to take advantage of all the upgrades.
Caveat: Once again, it’s important to note that this list is subjective. There are a lot of IDEs on the market and we can’t cover them all. Plus, we’re trying to focus on the best IDEs for Clojure rather than focusing on a general IDE that works for all kinds of languages.
In no particular order, here are the top 5 IDEs and code editors for Clojure.
No, this isn’t some Silver Age superhero. Nightcode is actually a handy tool for your Clojure adventures. It consists of an IDE that bundles a smart editor, the Leiningen and Boot build tools, and a home screen with quick access to the Clojure cheatsheet and REPL.
Nightcode runs with a smart editor designed to support rainbow parenthesis and matching highlights. It uses Parinfer, a Lisp editing mode that’s great for beginners. Any reader errors are displayed inline to make it easy to see them. An instaREPL evaluates the code immediately. Nightcode is keyboard friendly and has lots of shortcuts to cut down on the IDE clutter.
More information about Nightcode is available here. Nightcode is free and open source.
This extensible text editor has made our top 5 lists before for other languages (specifically for Kotlin, React, and Scala). Originally an interpreter for Emacs Lisp, its customizable nature makes it a good text editor for all kinds of languages and frameworks. However, today we’re going to focus on Emacs with the CIDER extensions for Clojure.
CIDER extends Emacs with support for interactive programming in Clojure. To start, cider-mode is an Emacs minor-mode that complements clojure-mode. cider-mode adds support for interacting with a running Clojure process for compilation as well as definition and documentation lookup. Other features include Java Object inspection, step debugging, and test running.
More information about Emacs with CIDER is available here. Emacs is free under a GPL license.
Quelle surprise, Atom makes the IDE list again. It shouldn’t be a surprise why, though: Atom is highly hackable, making it a great choice for all kinds of languages. It’s simple enough for beginners with enough raw power and performance to entire experts. The Atom tool bar is extensible and makes it easy to control the REPL, add your own commands, or create visualizations.
In particular, the Proto REPL extensions for Atom are designed for Clojure developers. This package makes it easier to write code, with features like autocompleting Clojure namespaces, function names, vars, and local bindings. Developers can evaluate blocks of code with the click of a mouse or a button, with the results available in the REPL or inline next to the code. The automatic evaluation mode keeps track as you write and tests can be run in a namespace or over the whole project.
More information about Proto REPL for Atom is available here. Atom is free and open source.
Built off of IntelliJ, Cursive is an intelligent Clojure(Script) IDE that understands your code. If you’re already on IntelliJ, why switch to another IDE? Cursive offers developers a familiar interface with a number of useful functions like all JetBrains products and seamless Java integration.
Cursive is written entirely in Clojure, giving developers the opportunity to use tools like Leiningen and nREPL. Other features include code completion, syntax highlighting, Symbol renaming, extract let and more. There’s support for clojure.test, a Clojure debugger, Paredit-style structural editing, and code formatting. And of course, it comes with all the standard IntelliJ features like project management and VCS.
More information about Cursive is available here. A free, six-month license is available to individuals for non-commercial uses like personal hacking, open source, and student work. All other kinds of commercial development require a license.
As always, it’s not a JAXenter list without Eclipse. Eclipse is a popular cross-platform IDE; it supports Clojure with the CounterClockWise plugin. CounterClockWise can even be installed as a standalone product if you don’t have Eclipse. All you need is JVM 8.
As a plugin for Eclipse, CounterClockWise brings a lot of Clojure specific features to the popular IDE. This includes things like Leiningen support, Clojure support, and code evaluation. Writing code is easier than ever thanks to several Clojure Editor features like syntax highlighting, code completion, macro expansion, error reporting, and keyboard shortcuts. There’s even cider-repl support!
More information about the CounterClockWise plugin for Eclipse is available here. Eclipse is free and open source.
Light Table would have made our top 5 list thanks to its customizable nature. However, the community has definitely moved on; although some brave soul has been working on it on GitHub recently, most of the last major commits are from 2-4 years ago.
Sublime REPL is another mostly abandoned project. It’s a good way to dip your toes into Clojure if you’re already a Sublime Text user. However, there’s not much of an active community anymore.
Looking for our favorite IDEs in other languages? Check them out here: