doomemacs/modules/lang/clojure
Henrik Lissner 3ce5d96e0a
bump: :lang
ShuguangSun/ess-view-data@5ec1c7206f -> ShuguangSun/ess-view-data@7dcbd23d4c
agda/agda@0d52fa2217 -> agda/agda@bb9e13d970
ardumont/markdown-toc@d3324cb6bc -> ardumont/markdown-toc@29e5c0f33e
atomontage/xterm-color@ce82e87ea3 -> atomontage/xterm-color@86fab1d247
babashka/neil@0b7373dd1b -> babashka/neil@8d5ccdbd81
clojure-emacs/cider@fb7aa88812 -> clojure-emacs/cider@15bd3b0265
clojure-emacs/clojure-mode@28dc02114a -> clojure-emacs/clojure-mode@4679222109
crystal-lang-tools/emacs-crystal-mode@d913fea6f0 -> crystal-lang-tools/emacs-crystal-mode@559e1d8ff9
davazp/graphql-mode@ee49531935 -> davazp/graphql-mode@ef757c6ce2
emacs-ess/ESS@7b9123669c -> emacs-ess/ESS@f8c464dc1b
emacs-geiser/gauche@9eb8b35f0c -> emacs-geiser/gauche@b8197c6288
emacs-geiser/geiser@43b9a034aa -> emacs-geiser/geiser@8842104d15
emacs-lsp/lsp-treemacs@3e5550f278 -> emacs-lsp/lsp-treemacs@49df7292c5
emacs-php/composer.el@eba6b953a4 -> emacs-php/composer.el@8cb5704edd
emacs-straight/auctex@a6f4741c22 -> emacs-straight/auctex@077874d25a
emacsmirror/cmake-mode@b08b5d9045 -> emacsmirror/cmake-mode@25340a7d12
emacsorphanage/dart-mode@9fbf703e1f -> emacsorphanage/dart-mode@773e9ebc74
emacsorphanage/ox-pandoc@5766c70b6d -> emacsorphanage/ox-pandoc@1caeb56a4b
emacsorphanage/restclient@426507f8f7 -> emacsorphanage/restclient@1800a4e367
erlang/otp@e281016db9 -> erlang/otp@2b2b39797f
fxbois/web-mode@1eb0abb1a9 -> fxbois/web-mode@1e7694aee8
gcv/julia-snail@7b50882f5a -> gcv/julia-snail@5a7e2d479c
godotengine/emacs-gdscript-mode@79739fc80f -> godotengine/emacs-gdscript-mode@248b73b1bd
greghendershott/racket-mode@d98852ef6d -> greghendershott/racket-mode@150b057953
hhvm/hack-mode@0addbff8b6 -> hhvm/hack-mode@86a981bd7b
https://codeberg.org/pranshu/haskell-ts-mode@b7db74c7fe96 -> https://codeberg.org/pranshu/haskell-ts-mode@bf143ee8382f
joaotavora/sly@6a303bae74 -> joaotavora/sly@b01993cf1d
ledger/ledger-mode@1cee636788 -> ledger/ledger-mode@9ab399186f
magit/orgit-forge@15f8e91083 -> magit/orgit-forge@c2116b8701 (v1.1.1)
magit/orgit@e0b3fca9f3 -> magit/orgit@24c8fe48c4 (v2.1.1)
mekeor/nael@101726eb47 -> mekeor/nael@9711443449
minad/org-modern@55b5bbeb1e -> minad/org-modern@9bbc44cc7e
nonsequitur/inf-ruby@b8076aad10 -> nonsequitur/inf-ruby@274398a242
ocaml/dune@a40c461736 -> ocaml/dune@14df34d30d
ocaml/merlin@ecfbed3976 -> ocaml/merlin@a0b096c243
oer/org-re-reveal@72c2463782 -> oer/org-re-reveal@8245facfdc
org-noter/org-noter@aafa08a49c -> org-noter/org-noter@81765d267e
org-roam/org-roam@b2634a17f8 -> org-roam/org-roam@c72702cf27
polymode/polymode@25ba9463a4 -> polymode/polymode@14b1fd8d2a
rust-lang/rust-mode@2d31814676 -> rust-lang/rust-mode@ae161dca23
wbolster/emacs-python-pytest@ed2ecee09d -> wbolster/emacs-python-pytest@78b5ea1d19
weijiangan/flycheck-golangci-lint@38cc30eb8b -> weijiangan/flycheck-golangci-lint@f7e36e19d6

Close: #8624
2026-01-18 03:13:00 -05:00
..
.doommodule feat: add .doommodule files 2024-09-14 20:47:39 -04:00
autoload.el refactor: (if|when)-let -> (if|when)-let* 2025-01-08 19:33:37 -05:00
config.el fix: file-name-concat paths instead of concat 2025-12-30 22:59:10 -05:00
doctor.el fix(clojure): void-function derived-mode-add-parents on <30 2025-12-30 22:50:31 -05:00
packages.el bump: :lang 2026-01-18 03:13:00 -05:00
README.org fix(clojure): void-function derived-mode-add-parents on <30 2025-12-30 22:50:31 -05:00

:lang clojure

Description   unfold

This module adds support for the Clojure(Script) language.

  • Interactive development environment (cider): REPL, compilation, debugging, running tests, definitions & documentation lookup, code completion, and much more
  • Refactoring (clj-refactor)
  • Linting (clj-kondo), requires doom-module::checkers syntax
  • LSP support (clojure-lsp), required doom-module:+lsp

Maintainers

Module flags

+lsp
Enable LSP support for clojure-mode (alongside Cider). Requires doom-module::tools lsp and a langserver (supports clojure-lsp).
+tree-sitter
Leverages tree-sitter for better syntax highlighting and structural text editing. Requires doom-module::tools tree-sitter and Emacs 30.1 or newer.

Hacks

  • Error messages emitted from CIDER are piped into the REPL buffer when it is first opened, to make them easier to notice.
  • Disabled the help banner when opening the cider REPL.

TODO Changelog

This module does not have a changelog yet.

Installation

Enable this module in your doom! block.

This module requires:

This module optionally requires:

  • clj-kondo, for linting code (if doom-module::checkers syntax)
  • clojure-lsp, for LSP support (if doom-module:+lsp)
  • neil for the ability to add packages to your Clojure project from Emacs
  • jet for jet integration
  • cljfmt, for formatting code (if doom-module::editor format)

Usage

Below is a listing of the various keybinds provided by the module.

REPL management

For the most part, general usage should fall into:

  • Open a Clojure project
  • Open/connect to a REPL

As such, these bindings are most likely to be used.

Keybind Command
<localleader> ' cider-jack-in-clj
<localleader> c cider-connect-clj
<localleader> C cider-connect-cljs
<localleader> m " cider-jack-in-cljs
<localleader> r R cider-restart
<localleader> r q cider-quit
<localleader> r B +clojure/cider-switch-to-repl-buffer-and-switch-ns
<localleader> r L cider-load-buffer-and-switch-to-repl-buffer
<localleader> r b cider-switch-to-repl-buffer
<localleader> r c cider-find-and-clear-repl-output
<localleader> r l cider-load-buffer
<localleader> r n cider-repl-set-ns
<localleader> r r cider-ns-refresh

Tests

The module also provides support for running tests through cider, including a nicely formatted output.

Keybind Command
<localleader> t a cider-test-rerun-test
<localleader> t l cider-test-run-loaded-tests
<localleader> t n cider-test-run-ns-tests
<localleader> t p cider-test-run-project-tests
<localleader> t r cider-test-rerun-failed-tests
<localleader> t s cider-test-run-ns-tests-with-filters
<localleader> t t cider-test-run-test

Search/navigation

Some useful bindings for navigating around namespaces and symbols. When using doom-module:+lsp, the bindings in doom-module::tools lsp are supported.

Keybind Command
<localleader> g b cider-pop-back
<localleader> g g cider-find-var
<localleader> g n cider-find-ns
<localleader> h n cider-find-ns
<localleader> n N cider-browse-ns-all
<localleader> n n cider-browse-ns
<localleader> h a cider-apropos

Evaluation

Outside of the SPC m e bindings for evaluating forms, the following are also available; including some to pretty-print the results.

Keybind Command
<localleader> e D cider-insert-defun-in-repl
<localleader> e E cider-insert-last-sexp-in-repl
<localleader> e R cider-insert-region-in-repl
<localleader> e b cider-eval-buffer
<localleader> e d cider-eval-defun-at-point
<localleader> e e cider-eval-last-sexp
<localleader> e r cider-eval-region
<localleader> p d cider-pprint-eval-defun-at-point
<localleader> p D cider-pprint-eval-defun-to-comment
<localleader> p p cider-pprint-eval-last-sexp
<localleader> p P cider-pprint-eval-last-sexp-to-comment
<localleader> p r cider-pprint-eval-last-sexp-to-repl

Debugging

A number of bindings to provide useful overlays that help during debugging. cider-enlighten-mode is a mode that will highlight the results of a function evaluation, including the locals. See a demo here.

Keybind Command
<localleader> M cider-macroexpand-all
<localleader> R hydra-cljr-help-menu/body
<localleader> e u cider-undef
<localleader> i e cider-enlighten-mode
<localleader> i i cider-inspect
<localleader> i r cider-inspect-last-result
<localleader> m cider-macroexpand-1

Help

Several bindings used for viewing documentation for various functions, both inside and outside of both a REPL and Emacs (K for example uses the sources and a cached version of clojuredocs)

Keybind Command
<localleader> h c cider-clojuredocs
<localleader> h d cider-doc
<localleader> h j cider-javadoc
<localleader> h w cider-clojuredocs-web
K +lookup/documentation

Configuration

enrich-classpath

In recent versions, an option has been introduced that attempts to improve the experience of CIDER by accessing java source & javadocs, though this option is still currently considered beta.

In order to opt into this, add the following to your config.el

(setq cider-enrich-classpath t)

See the docs for more

Troubleshooting

There are no known problems with this module. Report one?

Frequently asked questions

This module has no FAQs yet. Ask one?

TODO Appendix

󱌣 This module has no appendix yet. Write one?