alphapapa / prism.el

Disperse Lisp forms (and other languages) into a spectrum of colors by depth
GNU General Public License v3.0
287 stars 4 forks source link

( same color #25

Closed MarcRohrer closed 1 year ago

MarcRohrer commented 1 year ago

Hi,

I absolutely love your package! It makes Lisp so much more readable! Is there a possibiliy to have the surrounding paren in the same color?

eg.

(defun new-function (new-parameter) (+ new-parameter 1))

the first ( is a different color to defun.

This confuses me.

Can I set prism to have the same color?

Thank you for your attention! Best wishes!

Marc

alphapapa commented 1 year ago

Hello Marc,

I'm glad you like it.

Having the parens be a different color is an intentional design decision. In my thinking, the parentheses represent boundaries, and those boundaries are part of the surrounding form, not the elements of the contained list. This is mentioned in the comparisons section of the readme: https://github.com/alphapapa/prism.el#comparisons

If you really prefer it the other way, you could use the rainbow-blocks package instead, which works that way.

Alternatively, you could write a patch to prism that colorizes the parens to match a list's contents, but I don't have time to work on that feature myself. I'm willing to consider merging such a patch, but I won't promise to, because I don't know if the extra complexity would be worth the cost.

Thanks.

MarcRohrer commented 1 year ago

Hi,

thanks for the info! I will check it out. Didn't see the comparisons section probably overwhelmed by the millions of screenshots :-)

Marc