Cursive (Clojure IDE) supports Parinfer out of the box

Published on in Clojure

It's not mentioned in the docs or anywhere, but you can enable Parinfer from Cursive's settings. Works great with IdeaVim.

Table of contents

Paredit bad (for me)

Cursive, the IDE for Clojure and ClojureScript, uses Paredit for structural editing.

Editing code in Cursive has been a hassle because I'm using IdeaVim (a Vim plugin for Cursive and other IntelliJ-based IDEs) and haven't configured keybindings for Paredit. I haven't found any good tutorials on that, so it feels overwhelming. (Otherwise I have liked Cursive when doing Clojure exercises on Exercism.)

Parinfer good (and how to enable it in Cursive)

I have dreamed of using Parinfer in Cursive. Parinfer seems so much easier to use than Paredit.

Today my dreams came true because turns out that Cursive supports Parinfer out of the box! Go to Settings → Editor → General → Smart Keys → Clojure and choose "Parinfer Smart mode" from the "Structural editing style" dropdown.


What's infuriating is that there's zero mention of Parinfer in the Cursive docs or in Cursive's GitHub Wiki. 🤦‍♂️ I have wasted so much time trying to google "cursive ide parinfer" and finding only a few mentions that "Cursive supports Parinfer" but no information how to enable that. I found the setting today by accident because I was just going to disable Paredit.