Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

faces for rainbow-delimiter-mode not applied #165

Open
duud opened this issue Jun 29, 2015 · 8 comments
Open

faces for rainbow-delimiter-mode not applied #165

duud opened this issue Jun 29, 2015 · 8 comments

Comments

@duud
Copy link

duud commented Jun 29, 2015

Faces for rainbow-delimiter-mode are inherited from outline mode.
After starting emacs and opening an elisp file none of the outline-faces are defined (checked with describe-face), since rainbow-delimiter-mode faces inherit from outline-mode faces, coloring of delimiters isn't working.
I order to get this working I have to enable outline-mode (after doing this faces for outline-mode get defined) and restartd rainbow-delomiter-mode.

@losingkeys
Copy link

I think I have the same issue: Fanael/rainbow-delimiters#21 (comment) (demo here: https://asciinema.org/a/allvq9du5q9fpnr46d2xn3kiq). Enabling outline-mode then emacs-lisp-mode (or whatever major mode I was in) seems to fix the issue.

@losingkeys
Copy link

rainbow-delimitiers appears to work with this config:

(use-package rainbow-delimiters                                                               
  :config (add-hook 'prog-mode-hook 'rainbow-delimiters-mode)) 

;;; ...

(use-package color-theme-solarized                                                            
  :init (require 'color-theme)                                                                
  :config                                                                                     
  (add-to-list 'custom-theme-load-path "emacs-color-theme-solarized")                         
  (load-theme 'solarized t))  

@losingkeys
Copy link

Scratch that, that config's not working now. Oddly enough it works when first installing the packages, but after restarting emacs it doesn't.

@losingkeys
Copy link

Not sure if this'll help... but I'm seeing the following paragraph twice in *Messages*:

Unable to load color "brightyellow" [12 times]                                                           
Unable to load color "brightwhite"                                                                       
Unable to load color "brightyellow"                                                                      
Unable to load color "brightwhite"                                                                       
Unable to load color "brightyellow"                                                                      
Unable to load color "brightwhite" [2 times]                                                             
Unable to load color "brightyellow" [2 times]                                                            
Unable to load color "brightwhite"                                                                       
Unable to load color "brightyellow"                                                                      
Unable to load color "brightwhite"                                                                       
Unable to load color "brightyellow"                                                                      
Unable to load color "brightwhite"                                                                       
Unable to load color "brightyellow" [2 times]                                                            
Unable to load color "brightwhite"                                                                       
Unable to load color "brightyellow"                                                                      
Unable to load color "brightwhite"                                                                       
Unable to load color "brightyellow"                                                                      
Unable to load color "brightwhite" [4 times]

Even after following the instructions in #175, which meant the following config:

(use-package color-theme-solarized                                                                       
  :init                                                                                                  
  (setq-default solarized-termcolors 256)                                                                
  (require 'color-theme)                                                                                 
  (load-theme 'solarized t))      

The warnings go away if I don't load this package, so I'm assuming it's caused by this package.

@ralsei
Copy link

ralsei commented Jun 23, 2016

Any progress on this?

@halcyon
Copy link

halcyon commented Jun 23, 2016

If you prefer the way it looks with 16 colors, then setting TERM to xterm-color should make the warnings go away. If you enjoy the way it looks with 256 colors, then setting TERM to xterm-256color should make the warnings go away.

@losingkeys
Copy link

I use 16 colors and this workaround, which works for me.

@PhilipDaniels
Copy link

I thought I was going nuts, so glad to find this issue. I am in the middle of refactoring my .emacs and was a bit upset when rainbow delimiters stopped working in solarized for some unknown reason because it looks fantastic with them. Thanks to @duud and @losingkeys I was able to get them working again using the outline-minor-mode hack.

Here is a minimal repro for the issue. It assumes you have the solarized theme and rainbow delimiters installed, and optionally for comparison purposes the gruvbox theme.

Save the following code in a file called emacs.srd.el:

(package-initialize)

(setq frame-background-mode 'dark)
(mapc 'frame-set-background-mode (frame-list))
(load-theme 'solarized t)
;(load-theme 'gruvbox t)

(require 'rainbow-delimiters)
(add-hook 'prog-mode-hook #'rainbow-delimiters-mode)

;; If you comment these two lines out, rainbow delimiters no longer work with
;; solarized, though they do still work with gruvbox.
(outline-minor-mode t)
(outline-minor-mode nil)

Then if you start Emacs with

emacs -q -l emacs.srd.el emacs.srd.el

You don't get rainbow delimiters unless you have the outline-minor-mode toggle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants