Capstan
Clojure / ClojureScript support in the spirit of Calva, written in Clojure.
Install in
Clojure / ClojureScript support in the spirit of Calva, written in Clojure.
- Structural editing: Calva's paredit commands (all 435 Calva paredit test cases pass), strict mode,
cljfmt formatting, folding,
#_highlighting, form-aware Extend Selection - clojure-lsp through Capstan's own LSP client (latest version downloaded automatically, or your own) with refactorings in the Refactor menu
- nREPL: jack-in for deps.edn / Leiningen / shadow-cljs / babashka / nbb, inline results, REPL window with completion and pretty printing, ClojureScript sessions
- Custom REPL commands with placeholders (Calva's format,
~current-formstyle names too), and syncing changed files to the REPL in dependency order - Clickable stack traces in every console (JVM, pst, ex-info
:trace, compile errors), library frames greyed out, jar sources opened via the REPL classpath - "Resolve macro as…" intention that writes clj-kondo's
:lint-as; Clojure live templates - Follows the project's cljfmt config (
.cljfmt.ednand friends, or.lsp/config.edn); "Indent like…" intention for custom macros - Java interop completion from the REPL (
.method,Class/static, class names), narrowed by type hints - Regex literals highlighted and checked as regular expressions; inject other languages into strings
(Alt+Enter or a
;; language=JSONcomment) - Breadcrumbs (
defn greet › let › when-not) and sticky lines - Project dependencies from
deps.edn/project.cljimported as project libraries (Capstan: group/artifact:version), synced on open and on save - Data inspector for REPL values (cider-nrepl): drill into maps, vectors and nested structures, breadcrumb path, paging
- Prototype: debug Clojure in IDEA's Java debugger — jack-in starts the JVM with a JDWP agent and Capstan attaches
the debugger; gutter breakpoints become JVM breakpoints (also in
clojure.core), stepping skips the Clojure runtime, frames / locals / keywords / collections are shown the Clojure way (opt-in, IDEA only) - clojure.test results in the IDE test tree, with diffs and rerun failed
- Debugger: cider-nrepl's debugger in the IDE debugger UI — line breakpoints, stepping, locals, evaluate at breakpoint
Keys live under two prefix chords so nothing collides with IDE defaults: press Alt+N
(REPL, tests, debugger) or Alt+K (paredit), then the key below.
An optional "Capstan (Calva)" keymap adds Calva's single-stroke keys.
The full list is always available in Settings → Keymap (search "Capstan").
Alt+N, then… (REPL / tests / debugger)
Alt+K, then… (paredit / structural editing)
Supports the latest IntelliJ IDEA only. No other plugins required. Not compatible with Cursive or clojure-lsp-intellij.
Written by Joobi from the project's own listing. See the source page
1.10.0 — JDI debugger (prototype, IntelliJ IDEA only, enable it in Settings): gutter Clojure line breakpoints become
JVM breakpoints while the Java debugger is attached (no re-evaluation), so functions evaluated long ago in the REPL and
clojure.core in libraries stop too; stepping skips the Clojure runtime (clojure.lang.*,
clojure.core*, nrepl.*, cider.*; can be turned off) and stepping into
map / apply lands in your function. Frames read demo.gate/greet gate.clj:7,
locals get their Clojure names (user-info, valid?), keywords / symbols / vars / persistent
collections are shown the Clojure way; evaluating in a Clojure frame still takes Java expressions and points to the REPL
on errors. Fixes: libraries imported from deps.edn / project.clj could be dropped by IDEA
re-applying the module configuration at startup; threading assertions with cider breakpoints on IntelliJ 2026.3.
1.9.0 — Project dependencies from deps.edn / project.clj are imported as project libraries
(Capstan: group/artifact:version, jars get their sources attached), synced when the project is opened and
after the dependency files are saved (can be turned off in Settings); "Sync Project Dependencies…" re-picks the
alias / profile. Data inspector: the "Clojure Inspector" tool window shows cider-nrepl's inspect result —
drill into maps, vectors and nested structures, breadcrumb path, paging; Alt+N, V inspects the form at the cursor,
and the last REPL result and inline results can be inspected from the context menu.
Prototype: with the JDI debugger enabled in Settings, a deps.edn / Leiningen jack-in starts the JVM with a JDWP agent
and Capstan attaches IDEA's Java debugger, mapping Clojure sources into the Java debugging engine (IntelliJ IDEA only;
IDEs without the Java plugin keep using the cider debugger).
1.8.0 — Reformat Code, Alt+K Tab and Enter now follow the project's cljfmt config
(.cljfmt.edn, .cljfmt.clj, cljfmt.edn, cljfmt.clj searched upwards, or the
:cljfmt / :cljfmt-config-path of .lsp/config.edn) — previously only cljfmt's defaults were used,
which re-indented projects with custom rules. "Indent like…" intention writes :extra-indents for a macro (like defn,
let, do or condp, or a custom rule). Java interop completion: with a REPL connected, .method,
Class/static and class names complete from the REPL, narrowed by type hints, de-duplicated against clojure-lsp.
Language injection: regex literals are highlighted and checked as regular expressions; strings can get another language via
Alt+Enter or a preceding ;; language=… comment. Form-tree PSI with breadcrumbs (head and name of each enclosing
form, click to jump) and sticky lines.
1.7.0 — Ideas borrowed from Cursive. Custom REPL commands (Alt+N, Q / 0–9) in Calva's
customREPLCommandSnippets format with Cursive's ~current-form style names, set in
.capstan/config.edn or Settings. Sync changed files to the REPL (Alt+N, Shift+F): files changed since
connecting, including unsaved and external changes, are counted in the status bar and loaded in namespace
dependency order. "Resolve macro as…" intention writes clj-kondo's :lint-as (comments and formatting
kept, undoable) and open files are re-checked when .clj-kondo/ changes. Clojure live templates
(defn, ns, deftest, let, …) with a top-level context. Clickable stack traces in every console, including IDEA's
Analyze Stack Trace, plus an "Analyze Clojure Stack Trace…" action that needs no Java plugin; library frames are
greyed out and jar sources open via the REPL classpath. Fixed Alt+N, S failing when clojure.repl was not loaded.
Behavior change: .vscode/settings.json is no longer read; connect sequences go in
.capstan/config.edn.
1.6.1 — Fixed Clojure AOT initialization under the IDE plugin classloader so navigation functions such as goto-targets resolve correctly; unbound vars fail fast and are not cached.
1.6.0 — No longer depends on LSP4IJ: Capstan has its own LSP client for clojure-lsp. The latest clojure-lsp is downloaded and kept up to date automatically (or pin a version / use PATH / a custom path); the previous version is kept and used automatically if a new one fails to start. Status bar widget, log tool window, crash restarts. Diagnostics, completion, navigation, find usages, rename, documentation, code actions, parameter info, highlighting of usages, structure view, Go to Symbol, call hierarchy, reference counts and semantic highlighting.
1.5.0 — Version bump.
0.1.5 — Internal restructuring, no behavior change: Java classes grouped by feature (language, editing, REPL, tests, debugger, clojure-lsp) with shared base classes; Clojure code split into smaller namespaces with shared helpers.
0.1.4 — REPL output log: everything shown in the REPL window (inputs with their ns prompt,
stdout / stderr, results, connection markers) is also appended to
.capstan/repl-output.log in the project, ANSI-stripped, like Calva's file output
destination. Always on; rotates once past 10 MB (.log.1); the .capstan
folder ignores itself for git.
0.1.3 — Performance and robustness: evaluation, Extend Selection, typing, Enter and strict-mode keys no longer rescan the whole file on the UI thread; structure scanning is ~4× faster, folding and #_ highlighting share one model and fold in a single pass; typing updates the model incrementally (~20× faster on large files). Reformat Code runs cljfmt in the background (cancellable). nREPL messages are sent from a background writer (the UI never blocks on the socket; the status bar shows "not responding" if the server stops reading), and evaluation summaries are size-capped. Closing a project disconnects its REPL. Fixed an internal API use that failed plugin verification.
0.1.2 — Localization: English (default) and Chinese UI, following the IDE language (Chinese Language Pack). Keyboard shortcuts are now listed in the plugin description.
0.1.1 — REPL polish: evaluation results stand out in green italic (matching inline results), friendlier disconnected tool window with connect / jack-in buttons. Windows jack-in fixes: executable resolution via PATH + PATHEXT (no more error=2 / error=193 with scoop shims), correct argument quoting for -Sdeps.
0.1.0 — first release: structural editing, clojure-lsp, nREPL and jack-in, test tree, debugger, optional Calva keymap.
Follow this listing's changes (Atom feed)