Allow users to override color definitions. Closes #101.

Thanks @FredDeschenes!
This commit is contained in:
Josh Dick
2017-05-15 14:38:03 -04:00
parent e8de593c37
commit b5827a2842
11 changed files with 151 additions and 809 deletions

View File

@@ -8,17 +8,15 @@ Please read this document before submitting a Pull Request.
### Background Information
onedark.vim, its companion [lightline.vim](https://github.com/itchyny/lightline.vim) and [vim-airline](https://github.com/vim-airline/vim-airline) themes, and its companion Xresources color palette file are built using a rudimentary templating and build system that allows color definitions to live in a single, central file. (Additional terminal color palette files are themselves generated from the template-produced Xresources file.)
onedark.vim's shared color definitions file `autoload/onedark.vim` and its companion Xresources color palette file are built using a rudimentary templating and build system that allows color definitions to live in a single, central file. (Additional terminal color palette files are themselves generated from the template-produced Xresources file.)
The basic idea is that the theme files are generated by a build tool that substitutes color values into templates that live in `build/templates`.
The basic idea is that these files are generated by a build tool that substitutes color values into templates that live in `build/templates`.
Here are the locations of the theme files that are generated by the build system, along with the locations of the corresponding templates they are generated from:
Here are the locations of the files that are generated by the build system, along with the locations of the corresponding templates they are generated from:
| Theme Location | Template Location |
|----------------------------------------------|------------------------------------------|
| `colors/onedark.vim` | `build/templates/onedark.template.vim` |
| `autoload/lightline/colorscheme/onedark.vim` | `build/templates/lightline.template.vim` |
| `autoload/airline/themes/onedark.vim` | `build/templates/airline.template.vim` |
| `autoload/onedark.vim` | `build/templates/autoload.template.vim` |
| `term/One Dark.Xresources` | `build/templates/One Dark.Xresources` |
### Configure It