aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2018-08-07 22:33:22 -0500
committerJesús <heckyel@hyperbola.info>2018-08-07 22:33:22 -0500
commit9b5b7dfcc98d957db6703115cf03fc4ebc4c4228 (patch)
treea9dae879f1e335b7cdd42f827c991d070d69c38d
parent157bc796d1cc8c9b164926fdba5bbb4ed7616db9 (diff)
downloademacs-personal-9b5b7dfcc98d957db6703115cf03fc4ebc4c4228.tar.lz
emacs-personal-9b5b7dfcc98d957db6703115cf03fc4ebc4c4228.tar.xz
emacs-personal-9b5b7dfcc98d957db6703115cf03fc4ebc4c4228.zip
rainbow-mode: colorize color names in buffers (css, less, sass, scss)
-rw-r--r--custom.el2
-rw-r--r--init.el2
-rw-r--r--lisp/init-rainbow.el10
3 files changed, 13 insertions, 1 deletions
diff --git a/custom.el b/custom.el
index 28cdeb2..69fbb04 100644
--- a/custom.el
+++ b/custom.el
@@ -11,7 +11,7 @@
'(anzu-search-threshold 1000)
'(package-selected-packages
(quote
- (scss-mode sass-mode less-css-mode ac-php smarty-mode php-mode pkgbuild-mode markdown-mode flycheck anzu sml-modeline smart-mode-line-powerline-theme smart-mode-line nlinum sublime-themes))))
+ (rainbow-mode scss-mode sass-mode less-css-mode ac-php smarty-mode php-mode pkgbuild-mode markdown-mode flycheck anzu sml-modeline smart-mode-line-powerline-theme smart-mode-line nlinum sublime-themes))))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
diff --git a/init.el b/init.el
index 151c5c0..87aa87a 100644
--- a/init.el
+++ b/init.el
@@ -43,6 +43,8 @@
(require 'init-less)
(require 'init-sass)
(require 'init-scss)
+;; Plus
+(require 'init-rainbow)
;;; Loads custom file
(when (file-exists-p custom-file)
diff --git a/lisp/init-rainbow.el b/lisp/init-rainbow.el
new file mode 100644
index 0000000..4461279
--- /dev/null
+++ b/lisp/init-rainbow.el
@@ -0,0 +1,10 @@
+;; rainbow-mode
+(require-package 'rainbow-mode)
+(add-hook 'css-mode-hook 'rainbow-mode)
+(add-hook 'sass-mode-hook 'rainbow-mode)
+(add-hook 'scss-mode-hook 'rainbow-mode)
+(add-hook 'less-mode-hook 'rainbow-mode)
+(add-hook 'web-mode-hook 'rainbow-mode)
+(add-hook 'html-mode-hook 'rainbow-mode)
+
+(provide 'init-rainbow)