Move back rainbow-delimiters to spacemacs layer
Also always install rainbow-identifiers
This commit is contained in:
parent
1328280ca4
commit
3b36507178
|
@ -11,7 +11,6 @@
|
|||
- [Enable rainbow-identifiers](#enable-rainbow-identifiers)
|
||||
- [Key bindings](#key-bindings)
|
||||
- [Rainbow Identifiers](#rainbow-identifiers)
|
||||
- [Rainbow delimiters](#rainbow-delimiters)
|
||||
- [Rainbow Mode](#rainbow-mode)
|
||||
|
||||
<!-- markdown-toc end -->
|
||||
|
@ -20,16 +19,12 @@
|
|||
|
||||
This layer colors your life with:
|
||||
- [rainbow identifiers][]
|
||||
- [rainbow delimiters][]
|
||||
- [rainbow mode][]
|
||||
|
||||
[rainbow identifiers][] mode will colorize each variables and functions with an
|
||||
almost unique color. The keywords and the declaration of function colors are
|
||||
disabled in order to make the colorized variables and functions stand out.
|
||||
|
||||
[rainbow delimiters][] highlights delimiters such as parentheses, brackets or
|
||||
braces according to their depth.
|
||||
|
||||
[rainbow mode][] displays strings representing colors with the color they
|
||||
represent as background.
|
||||
|
||||
|
@ -82,14 +77,6 @@ Key Binding | Description
|
|||
`=` | reset the `saturation` or `lightness`
|
||||
Any other key | leave the change mini-mode
|
||||
|
||||
### Rainbow delimiters
|
||||
|
||||
`rainbow-delimiters` mode can be toggled on and off with:
|
||||
|
||||
<SPC> t C d
|
||||
|
||||
Note that the toggle is local to the current buffer.
|
||||
|
||||
### Rainbow Mode
|
||||
|
||||
![rainbow_mode](img/rainbow-mode.png)
|
||||
|
@ -101,6 +88,5 @@ Note that the toggle is local to the current buffer.
|
|||
Note that the toggle is local to the current buffer.
|
||||
|
||||
[rainbow identifiers]: https://github.com/Fanael/rainbow-identifiers
|
||||
[rainbow delimiters]: https://github.com/Fanael/rainbow-delimiters
|
||||
[rainbow mode]: https://julien.danjou.info/projects/emacs-packages
|
||||
|
||||
|
|
|
@ -21,8 +21,7 @@
|
|||
|
||||
;; Command prefixes
|
||||
|
||||
(setq colors/key-binding-prefixes '(("C" . "colors")
|
||||
("tC" . "toggles-colors")))
|
||||
(setq colors/key-binding-prefixes '(("C" . "colors")))
|
||||
(when colors-enable-rainbow-identifiers
|
||||
(push (cons "Ci" "colors-identifiers") colors/key-binding-prefixes))
|
||||
(mapc (lambda (x) (spacemacs/declare-prefix (car x) (cdr x)))
|
||||
|
|
|
@ -14,30 +14,20 @@
|
|||
'(
|
||||
;; not working well for now
|
||||
;; rainbow-blocks
|
||||
rainbow-delimiters
|
||||
rainbow-identifiers
|
||||
rainbow-mode
|
||||
)
|
||||
"List of all packages to install and/or initialize. Built-in packages
|
||||
which require an initialization must be listed explicitly in the list.")
|
||||
|
||||
(when colors-enable-rainbow-identifiers
|
||||
(push 'rainbow-identifiers colors-packages))
|
||||
|
||||
(defun colors/init-rainbow-blocks ()
|
||||
(use-package rainbow-blocks
|
||||
:disabled t
|
||||
:init (add-hook 'emacs-lisp-mode-hook 'rainbow-blocks-mode)))
|
||||
|
||||
(defun colors/init-rainbow-delimiters ()
|
||||
(use-package rainbow-delimiters
|
||||
:defer t
|
||||
:init
|
||||
(progn
|
||||
(evil-leader/set-key "tCd" 'rainbow-delimiters-mode)
|
||||
(add-to-hooks 'rainbow-delimiters-mode '(prog-mode-hook)))))
|
||||
|
||||
(defun colors/init-rainbow-identifiers ()
|
||||
(use-package rainbow-identifiers
|
||||
:if colors-enable-rainbow-identifiers
|
||||
:commands rainbow-identifiers-mode
|
||||
:init
|
||||
(progn
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
("s" . "search/symbol")
|
||||
("S" . "spelling")
|
||||
("t" . "toggles")
|
||||
("tC" . "toggles-colors")
|
||||
("tm" . "toggles-modeline")
|
||||
("T" . "themes")
|
||||
("w" . "windows")
|
||||
|
|
|
@ -97,6 +97,7 @@
|
|||
popwin
|
||||
powerline
|
||||
projectile
|
||||
rainbow-delimiters
|
||||
rcirc
|
||||
rcirc-color
|
||||
recentf
|
||||
|
@ -1854,6 +1855,14 @@ which require an initialization must be listed explicitly in the list.")
|
|||
(projectile-global-mode)
|
||||
(spacemacs|hide-lighter projectile-mode))))
|
||||
|
||||
(defun spacemacs/init-rainbow-delimiters ()
|
||||
(use-package rainbow-delimiters
|
||||
:defer t
|
||||
:init
|
||||
(progn
|
||||
(evil-leader/set-key "tCd" 'rainbow-delimiters-mode)
|
||||
(add-to-hooks 'rainbow-delimiters-mode '(prog-mode-hook)))))
|
||||
|
||||
(defun spacemacs/init-rcirc ()
|
||||
(use-package rcirc
|
||||
:commands irc
|
||||
|
|
Loading…
Reference in a new issue