2014-12-18 05:12:04 +00:00
|
|
|
# Colors contribution layer for Spacemacs
|
|
|
|
|
2014-12-24 06:03:49 +00:00
|
|
|
![logo](img/rainbow_dash.png)
|
2014-12-18 05:12:04 +00:00
|
|
|
|
|
|
|
<!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc/generate-toc again -->
|
|
|
|
**Table of Contents**
|
|
|
|
|
|
|
|
- [Colors contribution layer for Spacemacs](#colors-contribution-layer-for-spacemacs)
|
|
|
|
- [Description](#description)
|
|
|
|
- [Install](#install)
|
2015-01-26 06:05:24 +00:00
|
|
|
- [Enable rainbow-identifiers](#enable-rainbow-identifiers)
|
2015-02-01 06:31:39 +00:00
|
|
|
- [Enable Nyan cat](#enable-nyan-cat)
|
2014-12-18 05:12:04 +00:00
|
|
|
- [Key bindings](#key-bindings)
|
|
|
|
- [Rainbow Identifiers](#rainbow-identifiers)
|
2015-01-24 05:03:40 +00:00
|
|
|
- [Rainbow Mode](#rainbow-mode)
|
2014-12-18 05:12:04 +00:00
|
|
|
|
|
|
|
<!-- markdown-toc end -->
|
|
|
|
|
|
|
|
## Description
|
|
|
|
|
|
|
|
This layer colors your life with:
|
|
|
|
- [rainbow identifiers][]
|
2015-01-24 05:03:40 +00:00
|
|
|
- [rainbow mode][]
|
2015-02-01 06:31:39 +00:00
|
|
|
- [nyan mode][]
|
2014-12-18 05:12:04 +00:00
|
|
|
|
|
|
|
[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.
|
|
|
|
|
2015-01-24 05:03:40 +00:00
|
|
|
[rainbow mode][] displays strings representing colors with the color they
|
|
|
|
represent as background.
|
|
|
|
|
2015-02-01 06:31:39 +00:00
|
|
|
[nyan mode][] display a Nyan cat progress bar in the mode-line.
|
|
|
|
|
2014-12-18 05:12:04 +00:00
|
|
|
## Install
|
|
|
|
|
|
|
|
To use this contribution add it to your `~/.spacemacs`
|
|
|
|
|
|
|
|
```elisp
|
|
|
|
(setq-default dotspacemacs-configuration-layers '(colors)
|
|
|
|
"List of contribution to load."
|
|
|
|
)
|
|
|
|
```
|
|
|
|
|
2015-01-26 06:05:24 +00:00
|
|
|
### Enable rainbow-identifiers
|
|
|
|
|
|
|
|
To enable the package `rainbow-identifiers` set the variable
|
|
|
|
`colors-enable-rainbow-identifiers` to `t`:
|
|
|
|
|
|
|
|
```elisp
|
|
|
|
(setq-default dotspacemacs-configuration-layers '(
|
2015-02-01 06:31:39 +00:00
|
|
|
(colors :variables colors-enable-rainbow-identifiers t))
|
|
|
|
"List of contribution to load."
|
|
|
|
)
|
|
|
|
```
|
|
|
|
|
|
|
|
### Enable Nyan cat
|
|
|
|
|
|
|
|
To enable the package `nyan-mode` set the variable
|
2015-02-02 02:29:07 +00:00
|
|
|
`colors-enable-nyan-cat-progress-bar` to `t`:
|
2015-02-01 06:31:39 +00:00
|
|
|
|
|
|
|
```elisp
|
|
|
|
(setq-default dotspacemacs-configuration-layers '(
|
2015-02-02 02:29:07 +00:00
|
|
|
(colors :variables colors-enable-nyan-cat-progress-bar t))
|
2015-01-26 06:05:24 +00:00
|
|
|
"List of contribution to load."
|
|
|
|
)
|
|
|
|
```
|
|
|
|
|
2015-02-02 02:47:53 +00:00
|
|
|
It may be handy to enable it only in a GUI, you can do it by using
|
|
|
|
a quasi-quoted list:
|
|
|
|
|
|
|
|
```elisp
|
|
|
|
(setq-default dotspacemacs-configuration-layers
|
|
|
|
`((colors :variables
|
|
|
|
colors-enable-nyan-cat-progress-bar ,(display-graphic-p)))
|
|
|
|
"List of contribution to load."
|
|
|
|
)
|
|
|
|
```
|
|
|
|
|
2014-12-18 05:12:04 +00:00
|
|
|
## Key bindings
|
|
|
|
|
|
|
|
The prefix associated with colors is <kbd>C</kbd>.
|
|
|
|
|
|
|
|
### Rainbow Identifiers
|
|
|
|
|
2015-01-24 05:03:40 +00:00
|
|
|
![theme_tweaks_python](img/theme-tweaks-python.png)
|
|
|
|
|
2014-12-18 05:12:04 +00:00
|
|
|
`rainbow-identifiers` mode can be toggled on and off with:
|
|
|
|
|
|
|
|
<SPC> t C i
|
|
|
|
|
|
|
|
Note that the toggle is local to the current buffer.
|
|
|
|
|
|
|
|
The `saturation` and `lightness` of identifier colors can be adjusted live
|
|
|
|
with the micro-state:
|
|
|
|
|
|
|
|
Key Binding | Description
|
|
|
|
--------------|------------------------------------------------------------
|
|
|
|
`<SPC> C i s` | initiate change `saturation` mini-mode
|
|
|
|
`<SPC> C i l` | initiate change `lightness` mini-mode
|
|
|
|
`+` | increase the `saturation` or `lightness`
|
|
|
|
`-` | decrease the `saturation` or `lightness`
|
|
|
|
`=` | reset the `saturation` or `lightness`
|
|
|
|
Any other key | leave the change mini-mode
|
|
|
|
|
2015-01-24 05:03:40 +00:00
|
|
|
### Rainbow Mode
|
|
|
|
|
|
|
|
![rainbow_mode](img/rainbow-mode.png)
|
|
|
|
|
|
|
|
`rainbow-mode` mode can be toggled on and off with:
|
|
|
|
|
|
|
|
<SPC> t C c
|
|
|
|
|
2015-02-01 23:16:41 +00:00
|
|
|
### Nyan Mode
|
|
|
|
|
|
|
|
`nyan-mode` mode can be toggled on and off with:
|
|
|
|
|
|
|
|
<SPC> t m n
|
|
|
|
|
2015-01-24 05:03:40 +00:00
|
|
|
Note that the toggle is local to the current buffer.
|
2014-12-18 05:12:04 +00:00
|
|
|
|
|
|
|
[rainbow identifiers]: https://github.com/Fanael/rainbow-identifiers
|
2015-01-24 05:03:40 +00:00
|
|
|
[rainbow mode]: https://julien.danjou.info/projects/emacs-packages
|
2015-02-10 21:10:31 +00:00
|
|
|
[nyan mode]: https://github.com/syl20bnr/nyan-mode
|
2015-01-24 05:03:40 +00:00
|
|
|
|