Calva: Clojure & ClojureScript support for VS Code
Welcome to Calva, an easy to use, integrated REPL powered environment for enjoyable and productive Clojure and ClojureScript coding. It includes inline code evaluation, Paredit (and some little Parinfer), a Clojure formatter, a test runner, Clojure syntax highlighting, and more. Much of the power is provided by The Orchard.
Calva is short for Calvados, a liquid gifted to humanity from God. It is distilled from Cider.
With Calva we hope to help lower the barriers into the Clojure world. The idea is that by leveraging the strengths of VS Code and nREPL, we can offer a turn-key, productive environment in which to learn and use Clojure and ClojureScript.
How to Connect Calva to your project
Connect by letting Calva start your project (a.k.a. Jack-in).
When Calva has connected, it will open a REPL window giving you some getting started tips, and you can start hacking. The first thing you should always do to ”wake” Calva is to load/evaluate the current Clojure(Script) file:
Troubles connecting? Check here. (Please help keep that wiki page updated.)
Something to try first
You might want to start with evaluating some code. Calva has this notion about the ”current” form (the symbol under the cursor or the paren enclosed s-expr immediately adjacent to the cursor). Issue the Evaluate current form (or selection) command:
There is also a command for evaluating the current top level form, which aösp works inside
See Calva Top 10 Commands for some more things to try.
The Calva Wiki
When something doesn't work and you think there might be a workaround for it, please see the wiki. Anyone can author the wiki so if you know about workarounds or gotchas or anything that is good to know about when using Calva, please edit the appropriate page (or create a new page).
At a glance
Demo: switch between
More in depth (and some usage info)
Demo: Peek at definitions, etcetera:
Calva Paredit and Calva Formatter included
You really should have a look at the READMEs for those as well. One thing to note about it is that Calva Formatter sets the default keybinding of the Format current form command to
Slurp and Barf keyboard shortcuts
To make slurping and barfing forward really easy to perform they are bound to
Clojure Warrior included
Note: If you for some reason do not want rainbow colors, put this in your
How to contribute
I'm glad you are reading this section!
Calva is built using a combination of TypeScript and ClojureScript. The ClojureScript part uses the shadow-cljs toolchain. See the How to Contribute page on the wiki for instructions on how to hack on Calva.
The Calva Team
Many people have contributed to Calva. Here are the ones who have engaged in the project as such.
Happy coding ❤️
We hope you will find good use for Calva. Please let us know what you think. PRs welcome, file an issue or chat us up in the