Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When editing Lisp code, can emacs be configured to display each nested level of parentheses in a different color?

Tags:

emacs

lisp

In other words, a block of code like this:

(setq initial-major-mode
  (lambda ()
    (text-mode)
    (font-lock-mode)
    ))

... would come out looking like something like this:

alt text

If something like this already exists, what is it? And if it doesn't exist, how should I go about writing it?

like image 535
raldi Avatar asked Sep 26 '08 06:09

raldi


2 Answers

I think you are looking for something like mwe-color-box.el

like image 196
dsm Avatar answered Sep 18 '22 08:09

dsm


There is the package rainbow-delimiters, which doesn't do exactly what you want, but does just colorize the parentheses - which is a nice subset and allows you to still see the other syntax highlighting provided by the major mode.

like image 31
Trey Jackson Avatar answered Sep 17 '22 08:09

Trey Jackson