How do I get "rainbow parentheses" in emacs?

Arthur Ulfeldt picture Arthur Ulfeldt · Mar 9, 2010 · Viewed 12.1k times · Source

I would like rainbow parens for editing Clojure in Emacs and since VI does this I assume that in Emacs it should be something like M-x butterfly or something :)

Answer

Jeremy Rayman picture Jeremy Rayman · Mar 21, 2011

This is an old question now, but I recently wrote RainbowDelimiters mode for this. It's a 'rainbow parens'-type mode which colors all parens, brackets and braces, made with Clojure programming in mind.

It highlights the whole buffer, not just the parens surrounding point.

The most important thing is that it's FAST - all the other rainbow paren modes I've tried slow down editing (especially scrolling) quite a lot. I put significant effort into profiling and optimizing it so doesn't have any noticeable impact on scrolling/editing speed.

You can find info about it at the EmacsWiki page, and the mode itself is at rainbow-delimiters.el.