doomemacs / themes

A megapack of themes for GNU Emacs.
MIT License
2.16k stars 390 forks source link

rainbow delimiters not working #47

Closed jwintz closed 7 years ago

jwintz commented 7 years ago

Hello !

I've been looking you're package for some time now on twitter, and decided to give a try: I love it ! I will definiltly switch from spacemacs-theme to doom-light-one. Even though it is still a little be less designed and exhaustive.

As an example: rainbow delimiters are not honoured. I always fall back to the unmatched face. According to your code, it should be blue on the screenshot, but it's red.

screen shot 2017-04-16 at 21 37 27
jwintz commented 7 years ago

My bad, it works perfectly, it's just that switching from spacemacs-theme, I was misleaded by

     `(rainbow-delimiters-mismatched-face ((,class :foreground ,err :overline t)))
     `(rainbow-delimiters-unmatched-face ((,class :foreground ,err :overline t)))

Note that mismatched-face is missing. Do you mind a PR ?

I however wonder how to set the rainbow-delimiters-matched-face, should it exist, so that it differs from the unmatched one.

hlissner commented 7 years ago

I'm a heavy user of rainbow-delimiters, so it seems odd that doom-one isn't configured properly for it. So give me a day to look into it before you file that PR.

jwintz commented 7 years ago

Hummm, from what I see here: https://github.com/Fanael/rainbow-delimiters/blob/master/rainbow-delimiters.el. No rainbow-delimiters-matched-face.

All I see is:

screen shot 2017-04-18 at 18 58 32

I'll wait, Thanks.

hlissner commented 7 years ago

Sorry for the delay. I'm looking into it now.

Odd, rainbow-delimiters-mismatched-face inherits from rainbow-delimiters-unmatched-face, so I didn't think it was necessary to add a rule for it, but I did. Maybe that will help?

I hear many complaints from people who load my theme after spacemacs-theme. I wonder if that is related?

jwintz commented 7 years ago

Concerning spacemacs-theme, not related. I've removed any occurence to in my elpa directory, so, no interaction :-(.

I've just updated doom-themes, and I already love the withespace mode new faces :-)

hlissner commented 7 years ago

Have any of the recent updates changed your situation? If not, could you run Emacs vanilla (emacs -Q) and the following:

(require 'rainbow-delimiters)
(rainbow-delimiters-mode +1)
(require 'doom-themes)
(load-theme 'doom-one t)

I however wonder how to set the rainbow-delimiters-matched-face, should it exist, so that it differs from the unmatched one.

You can modify faces with custom-set-faces, for example:

(custom-set-faces
 `(rainbow-delimiters-unmatched-face  ((t (:foreground ,(doom-color 'yellow) :bold t :inverse-video t))))
 `(rainbow-delimiters-mismatched-face ((t (:foreground ,(doom-color 'red) :bold t :inverse-video t))))
 ;; ...
 )

I already love the withespace mode new faces

Fantastic! :D

jwintz commented 7 years ago

Works great now ! Thanks !

sorawee commented 4 years ago

Sorry for gravedigging an old thread. I just want to drop information here in case it's useful to people who have the same problem as me.

I recently switched from Spacemacs theme to a doom theme and found that parentheses highlighting is not the same. I initially thought that it's this issue. Turns out that rainbow delimiter is functional as it should. The real problem is that Spacemacs has an integration with smartparens which highlights the currently matched parentheses in a different way. Doom doesn't seem to have this integration, so it looks different. This could be fixed by adding:

  (let ((c '((class color) (min-colors 89))))
    (custom-theme-set-faces
     'doom-one
     `(sp-show-pair-match-face ((,c (:foreground ,(doom-color 'green) :inherit bold :underline t))))))