Clojure and Vim - bare essentials setup
I recorded my vim + clojure setup a few days ago. I’m quite new to clojure and had a hard time figuring everything out. So hopefully this can be of help to someone new to vim + clojure.
You can checkout the video here: youtu.be/gb58d9-W-kA
I just wanted to have a vim setup which is enough for me to explore clojures repl from vim in the quickest way possible.
My notes from the video:
Clojure Vim Setup
- Unknown unknowns
- Avoiding fancy stuff
- Linting
- REPL driven development
- Connecting to repl from vim
- Manipulating parens
Requirements
Opendjk-8/11
sudo apt install default-jdk
Clojure
curl -O https://download.clojure.org/install/linux-install-1.10.1.561.sh chmod +x linux-install-1.10.1.561.sh sudo ./linux-install-1.10.1.561.sh
Leininininingen
Vim plugins
clj-kondo with Ale
curl -sLO https://raw.githubusercontent.com/borkdude/clj-kondo/master/script/install-clj-kondo chmod +x install-clj-kondo ./install-clj-kondo
cider-nrepl
{:user {:plugins [[cider/cider-nrepl "0.25.3"]]}
vim-fireplace
cqc
: quasi repl blank linecqq
: quasi repl fill the formcpp
: push the current form to the repl
- vim-parinfer
- async-clj-omni
Post video thoughts
Funnily enough, I’m trying out emacs + doom now because I’ve been fed up with VimL for quite some time.
Elisp used to look arcane but after learning the basics of clojure it is finally readable (and seems much better than VimL from my limited interaction with it).
I did try Conjure and I’ve seen the author quite active in clojurians #vim channel, but I found vim-fireplace to be an easier starting point so I just went with it. :)