Convert Figma logo to code with AI

clojure-emacs logocider

The Clojure Interactive Development Environment that Rocks for Emacs

3,573
647
3,573
124

Top Related Projects

1,879

Interactive evaluation for Neovim (Clojure, Fennel, Janet, Racket, Hy, MIT Scheme, Guile, Python and more!)

Native, fast starting Clojure interpreter for scripting

Clojure & ClojureScript Language Server (LSP) implementation

fireplace.vim: Clojure REPL support

Quick Overview

CIDER (Clojure Interactive Development Environment that Rocks) is a powerful Emacs package for interactive Clojure development. It provides a rich set of features for Clojure programmers, including code evaluation, debugging, code completion, and integration with various Clojure tools.

Pros

  • Seamless integration with Emacs, providing a comprehensive Clojure development environment
  • Robust REPL integration with advanced features like inline code evaluation and debugging
  • Extensive documentation and active community support
  • Supports both Clojure and ClojureScript development

Cons

  • Steep learning curve for new users, especially those not familiar with Emacs
  • Can be resource-intensive, particularly on older hardware
  • Setup and configuration can be complex, requiring additional Emacs packages and tweaks

Code Examples

  1. Evaluating Clojure code in-buffer:
(defn greet [name]
  (str "Hello, " name "!"))

;; Place cursor at the end of the expression and press C-x C-e
(greet "CIDER")
;; => "Hello, CIDER!"
  1. Starting a REPL and connecting to a Clojure project:
;; In Emacs, open a Clojure file in your project directory
;; Then run:
M-x cider-jack-in
  1. Using CIDER's debugging features:
(defn divide [a b]
  (/ a b))

;; Set a breakpoint by adding #break before the function call
#break (divide 10 0)
;; This will open the debugger when evaluated

Getting Started

  1. Install Emacs (version 25.1 or later)
  2. Add CIDER to your Emacs configuration:
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
(package-initialize)
(unless (package-installed-p 'cider)
  (package-install 'cider))
  1. Open a Clojure file and run M-x cider-jack-in to start a REPL
  2. Begin evaluating Clojure code in your buffer using C-x C-e or other CIDER commands

For more detailed setup instructions and usage, refer to the official CIDER documentation.

Competitor Comparisons

1,879

Interactive evaluation for Neovim (Clojure, Fennel, Janet, Racket, Hy, MIT Scheme, Guile, Python and more!)

Pros of Conjure

  • Language-agnostic: Supports multiple Lisp dialects and other languages
  • Lightweight and fast: Minimal setup required, quick startup time
  • Vim/Neovim native: Seamlessly integrates with Vim workflows

Cons of Conjure

  • Less feature-rich: Fewer built-in debugging and inspection tools
  • Smaller community: Less extensive documentation and user support
  • Limited IDE-like features: Lacks some advanced development environment capabilities

Code Comparison

CIDER (Emacs):

(cider-connect '(:host "localhost" :port 7000))
(cider-eval-buffer)
(cider-find-var)

Conjure (Vim/Neovim):

:ConjureConnect localhost:7000
:ConjureEval (+ 1 2 3)
:ConjureFindVar

Both CIDER and Conjure are popular tools for Clojure development, but they cater to different editor ecosystems. CIDER is deeply integrated with Emacs and provides a comprehensive development environment with extensive features. Conjure, on the other hand, focuses on providing a lightweight and flexible solution for Vim and Neovim users, supporting multiple languages beyond just Clojure.

CIDER offers more advanced debugging capabilities, richer documentation integration, and a larger ecosystem of plugins. Conjure emphasizes simplicity and speed, making it easier to set up and use across different projects and languages. The choice between the two largely depends on the user's preferred editor and specific development needs.

Native, fast starting Clojure interpreter for scripting

Pros of Babashka

  • Fast startup time for scripting and CLI applications
  • Native executables for easy distribution and deployment
  • Supports a subset of Clojure, making it lightweight and portable

Cons of Babashka

  • Limited functionality compared to full Clojure ecosystem
  • Not suitable for large-scale application development
  • Lacks advanced REPL-driven development features

Code Comparison

Babashka script example:

#!/usr/bin/env bb
(require '[babashka.cli :as cli])

(defn greet [name]
  (println (str "Hello, " name "!")))

(cli/parse-opts *command-line-args* {:coerce {:name :string}})
(greet (:name (cli/parse-opts *command-line-args*)))

CIDER REPL interaction example:

;; In Emacs CIDER REPL
(defn greet [name]
  (str "Hello, " name "!"))

(greet "World")
;; => "Hello, World!"

Summary

Babashka excels in scripting and CLI applications with its fast startup time and native executables. It's ideal for small to medium-sized tasks and automation. CIDER, on the other hand, provides a rich interactive development environment for Clojure, offering advanced REPL features and deep integration with Emacs. CIDER is better suited for large-scale application development and projects requiring a full Clojure environment.

Clojure & ClojureScript Language Server (LSP) implementation

Pros of clojure-lsp

  • Language-server protocol support, enabling integration with various editors and IDEs
  • Faster startup time and lower memory footprint
  • More comprehensive static analysis and refactoring capabilities

Cons of clojure-lsp

  • Less mature and potentially less stable than CIDER
  • Smaller community and ecosystem compared to CIDER
  • May require additional setup and configuration for optimal performance

Code Comparison

CIDER (nREPL-based):

(cider-connect '(:host "localhost" :port 7888))
(cider-eval-buffer)
(cider-doc 'clojure.core/map)

clojure-lsp:

;; No direct REPL interaction, relies on editor integration
(ns my-namespace
  (:require [my-library.core :as lib]))
;; LSP provides auto-completion, diagnostics, and refactoring

clojure-lsp focuses on static analysis and editor integration, while CIDER provides a more interactive development experience with direct REPL integration. clojure-lsp offers broader editor support and potentially faster performance, but CIDER has a more established ecosystem and deeper Clojure-specific features. The choice between them depends on individual preferences and development workflows.

fireplace.vim: Clojure REPL support

Pros of vim-fireplace

  • Lightweight and fast, with minimal setup required
  • Seamless integration with Vim's ecosystem and keybindings
  • Works well with other Vim plugins for a customized Clojure development environment

Cons of vim-fireplace

  • Less feature-rich compared to CIDER's extensive toolset
  • Limited debugging capabilities
  • Smaller community and fewer resources for support and documentation

Code Comparison

vim-fireplace:

:Require
:Eval (+ 1 2 3)
:FireplaceConnect

CIDER:

cider-jack-in
cider-eval-buffer
cider-debug-defun-at-point

Summary

vim-fireplace is a lightweight Clojure development plugin for Vim users, offering quick setup and seamless integration with the Vim ecosystem. It provides essential features for Clojure development but lacks some of the more advanced tools found in CIDER.

CIDER, on the other hand, is a comprehensive Clojure Interactive Development Environment for Emacs. It offers a wider range of features, including advanced debugging capabilities, extensive documentation, and a larger community for support.

The choice between vim-fireplace and CIDER often comes down to personal preference for the editor (Vim vs. Emacs) and the desired level of feature complexity. vim-fireplace is ideal for those who prefer a minimalist approach and are comfortable with Vim, while CIDER caters to developers seeking a more feature-rich and integrated Clojure development experience within Emacs.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

CIDER Logo


License GPL 3 CircleCI Integration tests Spell-check Status Discord Slack

CIDER is the Clojure(Script) Interactive Development Environment that Rocks!

CIDER extends Emacs with support for interactive programming in Clojure. The features are centered around cider-mode, an Emacs minor-mode that complements clojure-mode and clojure-ts-mode. While clojure-mode and clojure-ts-mode support editing Clojure source files, cider-mode adds support for interacting with a running Clojure process for compilation, code completion, debugging, definition and documentation lookup, running tests and so on.


OpenCollective OpenCollective Patreon Paypal

Bozhidar (a.k.a. Bug, CIDER's primary author/maintainer) has spent countless hours working on CIDER and the numerous related projects. That's a lot of work and not all of it is fun!

Please consider supporting financially CIDER's ongoing development.

Quickstart

The instructions that follow are meant to get you from zero to a running CIDER REPL in under 5 minutes. See the online documentation for (way) more details.

Installation

MELPA MELPA Stable NonGNU ELPA

The recommended way to install CIDER is via package.el - the built-in package manager in Emacs.

CIDER is available on all major package.el community maintained repos - NonGNU ELPA, MELPA Stable and MELPA.

Provided you've enabled one of them in your Emacs setup, you can install CIDER with the following command:

M-x package-install RET cider RET

Launch an nREPL server and client from Emacs

Simply open in Emacs a file belonging to your lein, tools.deps or boot project (like foo.clj) and type M-x cider-jack-in. This will start an nREPL server with all the project dependencies loaded in and CIDER will automatically connect to it.

Alternatively you can use C-u M-x cider-jack-in to specify the path to a Clojure project, without having to visit any file in it.

[!TIP]

In Clojure(Script) buffers the command cider-jack-in is bound to C-c C-x (C-)j.

Connect to a running nREPL server

You can go to your project's directory in a terminal and type there (assuming you're using Leiningen that is):

$ lein repl

Or with Boot:

$ boot repl -s wait

Alternatively you can start nREPL either manually or by the facilities provided by your project's build tool (tools.deps, Gradle, Maven, etc).

After you get your nREPL server running go back to Emacs. Typing there M-x cider-connect will allow you to connect to the running nREPL server.

[!TIP]

In Clojure(Script) buffers the command cider-connect is bound to C-c C-x (C-)c (C-)j and the command cider-connect-cljs is bound to C-c C-x (C-)c (C-)s.

Diving Deeper

CIDER packs a ton of functionality and you really want to be familiar with it, so you can fully empower your workflow. The best way to get acquainted with all available features is to go over the entire CIDER manual.

If you're into video lessons, you might also check out this intro to CIDER demo as well.

Quick Reference Card

You'll find all of CIDER's essential commands and their keybindings in its one-page printable quick reference card.

New CIDER users might benefit from keeping a copy close to their keyboard.

Get Help

Start with CIDER's discussions board. If it doesn't get the job done consider some of the other available support channels.

Changelog

An extensive changelog is available here.

Team

The Core Team

The direction of the project is being stewarded by the CIDER core team. This group of long-term contributors manage releases, evaluate pull-requests, and does a lot of the groundwork on major new features.

CIDER Alumni

In addition, we'd like to extend a special thanks the following retired CIDER core team members. Lovingly known as The Alumni:

Release policy

We’re following SemVer.

You can read more on the subject here.

Logo

CIDER's logo was created by @tapeinosyne. You can find the logo in various formats here.

The logo is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.

Homepage

CIDER's homepage https://cider.mx is in the gh-pages branch of this repository and is deployed automatically when changes are made to it.

It's just a single index.html file and a bit of Bootstrap 4. Contributions to it are very welcome!

Funding

While CIDER is free software and will always be, the project would benefit immensely from some funding. Raising a monthly budget of a couple of thousand dollars would make it possible to pay people to work on certain complex features, fund other development related stuff (e.g. hardware, conference trips) and so on. Raising a monthly budget of over $5000 would open the possibility of someone working full-time on the project which would speed up the pace of development significantly.

We welcome both individual and corporate sponsors! We also offer a wide array of funding channels to account for your preferences (although currently Open Collective is our preferred funding platform).

If you're working in a company that's making significant use of CIDER we'd appreciate it if you suggest to your company to become a CIDER sponsor.

You can support the development of CIDER, clojure-mode and inf-clojure via Open Collective, GitHub Sponsors, Patreon and PayPal.

Open Collective Backers

Open Collective Sponsors

Become a sponsor and get your logo on our README on Github with a link to your site. [Become a sponsor]

License

CIDER is distributed under the GNU General Public License, version 3.

Copyright © 2012-2025 Bozhidar Batsov, Artur Malabarba, Tim King, Phil Hagelberg and contributors.