Hello emacs and Lisp enthusiasts,

I remember seeing an article that talked about the superfluity of parenthesis in Lisp code, and how non-Lisp programmers were overwhelmed by them, but Lisp programmers had trained their eyes to look at indentation structure and didn’t see the parenthesis, and it showed an image of Lisp code without and with the parenthesis faded. I don’t have a link to the article, but even as a slightly seasoned Lisper I thought the fainter parenthesis improved readability.

So I’m wondering if/how it’s possible to achieve this effect in emacs. Is there already a minor-mode for it? Would it involve a font-lock/face for parenthesis? I’ve tried to navigate the syntax highlighting code before and was a bit turned off by the apparent complexity, so any form of introduction would be greatly appreciated.

  • MitchellMarquez42B
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    I use the rainbow-delimiters package, which gives you up to 9 faces to set parentheses

    • JDRiverRunB
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      I also use rainbow-delimiters, but they are a bit too bright in my dark theme, so I:

      (use-package rainbow-delimiters
        :config
        ;; Darken them a bit
        (cl-loop for f in (face-list)
      	   if (and (string-prefix-p "rainbow-delimiters" (symbol-name f)) 
      		   (face-foreground f)) do
      	   (set-face-foreground f (color-darken-name (face-foreground f) 15))))
      

      See also color-lighten-name to go the other way.