Fine tuning of rainbow-identifiers colors

This commit is contained in:
syl20bnr 2014-09-20 23:09:49 -04:00
parent 814b55691b
commit 6dba08a92c
2 changed files with 29 additions and 7 deletions

View file

@ -270,17 +270,33 @@ argument takes the kindows rotate backwards."
(setq spacemacs-cur-theme (pop spacemacs-themes))
(message "Loading theme %s..." spacemacs-cur-theme)
(load-theme spacemacs-cur-theme t)
(set-flycheck-custom-face))
(spacemacs/post-theme-init spacemacs-cur-theme))
(defun spacemacs/set-flycheck-custom-face ()
" Use foreground of the flycheck faces as background for color-mode line (in
order to have a proper transparent background of Spacemacs custom bitmaps)"
(defun spacemacs/post-theme-init (theme)
" Some processing that needs to be done when the current theme has been
changed to THEME."
(interactive)
(eval-after-load "flycheck-color-mode-line"
;; Use foreground of the flycheck faces as background for color-mode line
;; (in order to have a proper transparent background of Spacemacs custom
;; bitmaps)
'(progn
(set-face-attribute 'flycheck-color-mode-line-error-face nil :background (face-foreground 'flycheck-fringe-error))
(set-face-attribute 'flycheck-color-mode-line-warning-face nil :background (face-foreground 'flycheck-fringe-warning))
(set-face-attribute 'flycheck-color-mode-line-info-face nil :background (face-foreground 'flycheck-fringe-info))
)))
))
(eval-after-load "rainbow-identifiers"
;; adjust saturation and lightness of rainbow-delimiters depending on the
;; current theme
(pcase theme
(`solarized-dark (setq rainbow-identifiers-cie-l*a*b*-saturation 60
rainbow-identifiers-cie-l*a*b*-lightness 50))
(`solarized-light (setq rainbow-identifiers-cie-l*a*b*-saturation 100
rainbow-identifiers-cie-l*a*b*-lightness 40))
(_ (setq rainbow-identifiers-cie-l*a*b*-saturation 80
rainbow-identifiers-cie-l*a*b*-lightness 45))))
(if (buffer-file-name)
(revert-buffer nil t)))
;; From http://xugx2007.blogspot.ca/2007/06/benjamin-rutts-emacs-c-development-tips.html
(setq compilation-finish-function

View file

@ -1367,8 +1367,14 @@ which require an initialization must be listed explicitly in the list."
(use-package rainbow-identifiers
:commands rainbow-identifiers-mode
:init
(add-to-hooks 'rainbow-identifiers-mode '(prog-mode-hook
erlang-mode-hook))))
(progn
(setq rainbow-identifiers-choose-face-function 'rainbow-identifiers-cie-l*a*b*-choose-face
rainbow-identifiers-cie-l*a*b*-color-count 64
rainbow-identifiers-cie-l*a*b*-saturation 100
rainbow-identifiers-cie-l*a*b*-lightness 40)
(add-to-hooks 'rainbow-identifiers-mode '(prog-mode-hook
erlang-mode-hook)))
))
(defun spacemacs/init-rainbow-mode ()
(use-package rainbow-mode