tsdh / highlight-parentheses.el

Moved to SourceHut: https://sr.ht/~tsdh/highlight-parentheses.el/ (Emacs: highlight surrounding parentheses)
http://nschum.de/src/emacs/highlight-parentheses/
GNU General Public License v3.0
89 stars 21 forks source link

Allow to add other face attributes (such as underline) #9

Open svauban opened 10 years ago

svauban commented 10 years ago

Hello,

I'd like to get the same effect with your package as what one gets in Sublime Text, that is the first level of nearest parens underlined.

One could as well imagine bold or such for that.

Currently, I just have the first level of parens highlighted, but with colors. I miss the others params.

Thanks!

tsdh commented 9 years ago

Currently, you can customize hl-paren-face which applies to all surrounding parens. The values of hl-paren-colors and hl-paren-background-colors are used to define foreground/background colors of the nearest N-th paren pair.

So as it stands now, you can only distinguish the paren levels by their foreground/background colors right now.

tsdh commented 9 years ago

Related: #6, #4

Both PRs were declined but I suggested the introduction of a new defcustom hl-paren-face-attributes which would allow a paren-level-wise configuration of all face attributes. (Of course we still need to keep hl-paren-colors/hl-paren-background-colors for backward compatibility reasons.)

And the same to you as to the other two: PR welcome!

holtzermann17 commented 4 years ago

FYI here is an (undocumented) hack that will turn off foreground colors, which allows other face features to be set elsewhere.

(setq hl-paren-colors '(t)) 

E.g., I have hl-paren-face set like this now:

(set-face-attribute 'hl-paren-face nil
                    :height 0.6)
tsdh commented 3 years ago

@holtzermann17 What this issue is about is being able to set different attribute values depending on the "paren level", i.e., make the immediately surrounding parens bold, the next pair underlined, the next outer pair a bit smaller, etc. In your example, every surrounding pair of parens will have the height 0.6.