Files
doomemacs/modules/lang/clojure
Henrik Lissner 1bb191e8eb bump: :lang
FStarLang/fstar-mode.el@6e5d3ea858 -> FStarLang/fstar-mode.el@36ffb46259
ProofGeneral/PG@d668946929 -> ProofGeneral/PG@e0ec3db200
Wilfred/helpful@4ba24cac9f -> Wilfred/helpful@5ad8a9ce57
agda/agda@3344ca8058 -> agda/agda@10a0ca0516
bastibe/org-journal@17b34ce8df -> bastibe/org-journal@115b9c0354
beancount/beancount-mode@452621fa1f -> beancount/beancount-mode@ddd4b87257
clojure-emacs/cider@f00e83d338 -> clojure-emacs/cider@a0d6169026
crystal-lang-tools/emacs-crystal-mode@ea89b108fa -> crystal-lang-tools/emacs-crystal-mode@d913fea6f0
emacs-ess/ESS@c72b911d70 -> emacs-ess/ESS@0eb240bcb6
emacs-geiser/geiser@74eed1669a -> emacs-geiser/geiser@c1c27072a4
emacs-lsp/lsp-haskell@6981f8d122 -> emacs-lsp/lsp-haskell@b2edf1a9f8
emacs-lsp/lsp-metals@6a6a345a8a -> emacs-lsp/lsp-metals@567089f7f4
emacs-rustic/rustic@e5c0271f1e -> emacs-rustic/rustic@fbbf0a7192
emacs-straight/auctex@f00256cbfd -> emacs-straight/auctex@53f80ba36c
emacs-straight/org-mode@5a4686915e -> emacs-straight/org-mode@ff33d9ec2e
emacs-typescript/typescript.el@dd10f702d4 -> emacs-typescript/typescript.el@481df3ad2c
emacsorphanage/dart-mode@02e919c1cf -> emacsorphanage/dart-mode@88b6683f43
emacsorphanage/macrostep@44faf4f7bf -> emacsorphanage/macrostep@d0928626b4
erlang/otp@3e7f126fe4 -> erlang/otp@64185e73b0
fuxialexander/org-pdftools@4e420233a1 -> fuxialexander/org-pdftools@5613b7ae56
greghendershott/racket-mode@f2645aadd2 -> greghendershott/racket-mode@eef5e9ab2c
hakimel/reveal.js@e15cf92ccd -> hakimel/reveal.js@2059d388f7
haskell/haskell-mode@1a285fc4c5 -> haskell/haskell-mode@7f452cc9e6
joaotavora/sly@742355f755 -> joaotavora/sly@c48defcf58
jorgenschaefer/emacs-buttercup@bf01a33f8b -> jorgenschaefer/emacs-buttercup@c467c659b2
jrblevin/markdown-mode@e100778594 -> jrblevin/markdown-mode@ee9d6de1d2
js-emacs/js2-refactor.el@a0977c4ce1 -> js-emacs/js2-refactor.el@e1177c728a
kaushalmodi/ox-hugo@98421a1298 -> kaushalmodi/ox-hugo@e3365cb4e6
ljos/jq-mode@a0f79eba78 -> ljos/jq-mode@eeb86b4d5a
magit/orgit@59d21fdb21 -> magit/orgit@3b6b34bd11
nonsequitur/inf-ruby@dad78a13f1 -> nonsequitur/inf-ruby@b8076aad10
ocaml/dune@098117d229 -> ocaml/dune@b74586e909
ocaml/merlin@3a806ef87f -> ocaml/merlin@92c3ba9473
oer/org-re-reveal@ab1422c163 -> oer/org-re-reveal@88e9d9e679
org-roam/org-roam@cad3518788 -> org-roam/org-roam@0037daaf3e
purescript-emacs/purescript-mode@07e4d6ecfe -> purescript-emacs/purescript-mode@b076bafe94
pythonic-emacs/anaconda-mode@f900bd7656 -> pythonic-emacs/anaconda-mode@5c6eff4645
pythonic-emacs/company-anaconda@169252fca7 -> pythonic-emacs/company-anaconda@0f7984b3be
pythonic-emacs/pyenv-mode@76787ea44f -> pythonic-emacs/pyenv-mode@f7d53796d6
seagle0128/grip-mode@df0ba7589d -> seagle0128/grip-mode@ffce7f78eb
swift-emacs/swift-mode@ab189d6e89 -> swift-emacs/swift-mode@2c0b2b72dc
technomancy/fennel-mode@3632cc77de -> technomancy/fennel-mode@4ccb6d5944
weijiangan/flycheck-golangci-lint@91c59b128a -> weijiangan/flycheck-golangci-lint@424ba1b3a1
2025-02-21 18:35:11 -05:00
..
2024-09-14 20:47:39 -04:00
2024-10-20 02:41:50 -04:00
2024-10-20 02:41:50 -04:00
2025-02-21 18:35:11 -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.

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?