├── .travis.yml ├── test ├── Dockerfile └── test.sh ├── .gitignore ├── LICENSE ├── ROADMAP.md ├── DESIGN.md ├── doc └── PaperColor.txt ├── README.md └── colors └── PaperColor.vim /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: required 2 | 3 | language: sh 4 | 5 | services: 6 | - docker 7 | 8 | script: 9 | - docker build -t test test/ 10 | - docker run --rm -it -v $(pwd):/mnt test colors/PaperColor.vim 11 | -------------------------------------------------------------------------------- /test/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nlknguyen/alpine-shellcheck 2 | 3 | MAINTAINER Nikyle Nguyen 4 | 5 | RUN apk add --no-cache vim 6 | 7 | RUN mkdir -p /opt/ 8 | 9 | COPY test.sh /opt/ 10 | 11 | # Check test script 12 | RUN shellcheck /opt/test.sh 13 | 14 | RUN chmod +x /opt/test.sh 15 | 16 | # Start working at the mounted directory 17 | WORKDIR /mnt 18 | 19 | ENTRYPOINT ["/opt/test.sh"] 20 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ################################################################# 2 | # Global/Vim.gitignore 3 | ################################################################# 4 | # Swap 5 | [._]*.s[a-v][a-z] 6 | [._]*.sw[a-p] 7 | [._]s[a-rt-v][a-z] 8 | [._]ss[a-gi-z] 9 | [._]sw[a-p] 10 | 11 | # Session 12 | Session.vim 13 | 14 | # Temporary 15 | .netrwhist 16 | *~ 17 | # Auto-generated tag files 18 | tags 19 | # Persistent undo 20 | [._]*.un~ 21 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015-2020 Nikyle Nguyen 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /test/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | framework_file=$1 6 | 7 | # cat ${framework_file} 8 | 9 | # Custom temporary runtime path for vim 10 | custom_rtp=$(mktemp -d) 11 | 12 | # Add color scheme to runtime part 13 | mkdir -p "${custom_rtp}/colors" 14 | cp "${framework_file}" "${custom_rtp}/colors" 15 | 16 | # Minimum vimrc file 17 | cat > "${custom_rtp}/.vimrc" <<- EOF 18 | 19 | set rtp+=${custom_rtp} 20 | syntax on 21 | color PaperColor 22 | EOF 23 | 24 | # Go to temporary directory 25 | cd "$(mktemp -d)" || exit 1 26 | 27 | ############################### 28 | printf "Check startup status... " 29 | echo | vim -Nu "$custom_rtp/.vimrc" +qa 1>/dev/null 2>err.txt 30 | if grep -q Error err.txt 31 | then 32 | echo "$framework_file caused starup error" 33 | sed 's/^.*Error/Error/' err.txt 34 | exit 1 35 | fi 36 | rm err.txt 37 | echo "ok" 38 | 39 | ############################### 40 | # TODO: later after rearchitect test mechanism 41 | # printf "Run unit test... " 42 | # vim -Nu "${custom_rtp}/.vimrc" -c 'call g:PaperColor_Test()' +qa 1>log.txt 2>err.txt 43 | # if grep -q Error log.txt 44 | # then 45 | # echo "error" 46 | # sed 's/^.*Error/Error/' log.txt 47 | # exit 1 48 | # fi 49 | 50 | # if grep -q "FAILED" log.txt 51 | # then 52 | # echo "$framework_file failed unit test" 53 | # exit 1 54 | # fi 55 | # rm log.txt 56 | 57 | # echo "ok" 58 | 59 | exit 0 60 | -------------------------------------------------------------------------------- /ROADMAP.md: -------------------------------------------------------------------------------- 1 | # 1.0 Release Candidate 2 | For more than 1 year and a half, PaperColor has been improved a lot, but there is no release tag. The reason is because there has always been small incremental changes and supports for more languages and plugins. Now it's time for something different. Version 1.0 is going to be the biggest improvement of PaperColor to add support for low-quality terminals and to enable alternative color palettes on top of PaperColor's rich support for many file types and plugins. 3 | 4 | [Join the discussion](https://github.com/NLKNguyen/papercolor-theme/issues/71) 5 | 6 | Task List: 7 | - [x] Support 16-color terminal (e.g. Windows Command Prompt). Currently, PaperColor requires 256-color. 8 | - [x] Provide terminal themes for PaperColor Light & Dark, target firstly Windows Command Prompt and Mac Terminal. The other repo https://github.com/NLKNguyen/papercolor-16 will be dedicated for terminal themes. 9 | - [ ] Provide terminal theme design guideline so that others can port to different terminals AND make alternative color palettes for PaperColor. ~~For now, this is the only reference http://codepen.io/NLKNguyen/full/NrRpej/~~ 10 | - [ ] Enable alternative color palettes for PaperColor in True-color / 256-color. 11 | 12 | 13 | Related issues (motivations): 14 | * https://github.com/NLKNguyen/papercolor-theme/issues/64 15 | * https://github.com/NLKNguyen/papercolor-theme/issues/65 16 | * https://github.com/NLKNguyen/papercolor-theme/pull/68 17 | * https://github.com/NLKNguyen/papercolor-theme/issues/69 18 | * https://github.com/NLKNguyen/papercolor-theme/issues/70 19 | -------------------------------------------------------------------------------- /DESIGN.md: -------------------------------------------------------------------------------- 1 | Design Guideline 2 | ================ 3 | 4 | This note explains how to override theme colors and create your own theme on top of PaperColor as well as the full list of color names and the format of color values. 5 | 6 | 1. Customize current theme colors 7 | 2. Create your own theme 8 | 3. Color Format 9 | 4. Color Names 10 | 11 | # Customize Current Theme Colors 12 | 13 | You can override any color of the theme of interest. This example is for `default` theme (original PaperColor Theme), but you can specify any other theme that is registered. 14 | 15 | The overriding setting is placed in `override` key of `g:PaperColor_Theme_Options` variable that you set in `.vimrc` like this. 16 | 17 | ```VimL 18 | let g:PaperColor_Theme_Options = { 19 | \ 'theme': { 20 | \ 'default.dark': { 21 | \ 'override' : { 22 | \ 'color00' : ['#080808', '232'], 23 | \ 'linenumber_bg' : ['#080808', '232'] 24 | \ } 25 | \ } 26 | \ } 27 | \ } 28 | 29 | ``` 30 | 31 | In this case, `default` is color theme name, and `dark` is the specific variant that we want to override some colors. The other is `light`, and you can set the same way. 32 | 33 | All colors can be overridden within `override` key. See Color Names section for all available options. 34 | 35 | # Create your own theme 36 | 37 | You can create your own theme on top of PaperColor. Your custom theme is simply responsible for color palette specification, similar to how the default theme specifies the colors. Think of this like a plugin for PaperColor framework. You can distribute your theme as a plugin that depends on PaperColor, and users need to install both. Your theme benefits from all development in PaperColor that occurs independently. 38 | 39 | Example: https://github.com/NLKNguyen/papercolor-blue 40 | 41 | Disclaimer: This feature is very new and important, and I expect many revisions to get it right, so keep in mind of incompatible changes in future. 42 | 43 | TODO: more instruction 44 | 45 | 46 | # Color Format 47 | 48 | 49 | The format of color value is `[GUI-Color, 256-Color]` where each item is a quoted string. 50 | 51 | * `GUI-Color` is used for Vim variants that can display GUI Color such as MacVim, GVim, or NeoVim. The value format is Red-Green-Blue in hexadecimal, i.e. `'#RRGGBB'` 52 | * `256-Color` is used for terminal Vim. The value format is from `'00'` to `'255'` in base 10 number system. 53 | 54 | You only have to provide one of them; for example, `['#080808', '']` or `['', '232']`, and the theme will automatically convert as needed. 55 | 56 | 256-color can be converted exactly to their GUI color representation. The reverse is not necessary true. 256-color can only represent a very small subset of GUI-color, so for the GUI color outside 256-color range, the converter can only approximate the nearest 256-color of the GUI-color. 57 | 58 | This is a [256-color table](http://www.calmar.ws/vim/256-xterm-24bit-rgb-color-chart.html) and their corresponding GUI-color. 59 | 60 | 61 | # Color Names 62 | 63 | ## Standard 64 | 65 | 16 standard colors are the required for all themes. These are also the falling-back colors for all extended colors if not provided. 66 | 67 | name | note 68 | --------|----------- 69 | color00 | background (main) 70 | color01 | *negative* (should be red) 71 | color02 | *positive* (should be green) 72 | color03 | string 73 | color04 | *neutral* (2nd background) 74 | color05 | comment 75 | color06 | typically storage class keywords 76 | color07 | foreground (normal text) 77 | color08 | 3rd background 78 | color09 | typically import/try-catch keywords 79 | color10 | typically type and more emphasized keywords 80 | color11 | typically if/conditional/loop keywords 81 | color12 | accent (rarely used) 82 | color13 | typically number 83 | color14 | typically the rest of keywords 84 | color15 | highlight 85 | 86 | ## Extended Colors 87 | 88 | All of these are optional but better be utilized for theme richness. 89 | 90 | name | note 91 | -------- | ----------- 92 | color16 | certain keywords where otherwise just color14 93 | color17 | typically boolean and label/tag 94 | cursor_fg | 95 | cursor_bg | 96 | cursorline | 97 | cursorcolumn | 98 | cursorlinenr_fg | 99 | cursorlinenr_bg | 100 | popupmenu_fg | 101 | popupmenu_bg | 102 | search_fg | 103 | search_bg | 104 | linenumber_fg | 105 | linenumber_bg | 106 | vertsplit_fg | 107 | vertsplit_bg | 108 | statusline_active_fg | 109 | statusline_active_bg | 110 | statusline_inactive_fg | 111 | statusline_inactive_bg | 112 | todo_fg | 113 | todo_bg | 114 | error_fg | 115 | error_bg | 116 | matchparen_bg | 117 | matchparen_fg | 118 | visual_fg | 119 | visual_bg | 120 | folded_fg | 121 | folded_bg | 122 | wildmenu_fg | 123 | wildmenu_bg | 124 | spellbad | 125 | spellcap | 126 | spellrare | 127 | spelllocal | 128 | diffadd_fg | 129 | diffadd_bg | 130 | diffdelete_fg | 131 | diffdelete_bg | 132 | difftext_fg | 133 | difftext_bg | 134 | diffchange_fg | 135 | diffchange_bg | 136 | 137 | For tabline plugin 138 | 139 | name | note 140 | -------- | ----------- 141 | tabline_bg | 142 | tabline_active_fg | 143 | tabline_active_bg | 144 | tabline_inactive_fg | 145 | tabline_inactive_bg | 146 | 147 | For vim-buftabline plugin 148 | 149 | name | note 150 | -------- | ----------- 151 | buftabline_bg | 152 | buftabline_current_fg | 153 | buftabline_current_bg | 154 | buftabline_active_fg | 155 | buftabline_active_bg | 156 | buftabline_inactive_fg | 157 | buftabline_inactive_bg | 158 | 159 | -------------------------------------------------------------------------------- /doc/PaperColor.txt: -------------------------------------------------------------------------------- 1 | *PaperColor.txt* An elegant, flexible, and beautiful Vim colorscheme. 2 | 3 | Author: Nikyle Nguyen 4 | 5 | Table of Contents *PaperColor-Theme* 6 | 7 | 1. Introduction .......................... |PaperColor-Theme-intro| 8 | 2. Setup ................................. |PaperColor-Theme-setup| 9 | 3. Configuration ......................... |PaperColor-Theme-configuration| 10 | 4. Credits ............................... |PaperColor-Theme-credits| 11 | 12 | ============================================================================== 13 | 1. INTRODUCTION *PaperColor-Theme-intro* 14 | 15 | The |PaperColor-Theme| plugin provides an elegant, flexible, and beautiful Vim 16 | colorscheme. It provides the following distinguishing features: 17 | 18 | 1. Comprehensive programming language and plugin support 19 | 2. Light AND Dark theme 20 | 3. Flexible color ranges 21 | 4. Complete configurability 22 | 5. Performance 23 | 24 | Comprehensive language and plugin support~ 25 | 26 | PaperColor is designed to support any language with Vim syntax definitions. 27 | At the time of writing, these languages include: 28 | 29 | ALGOL, ASN.1, Ada, Assembly (MIPS, GAS, NASM), Awk, Bash/Shell script, C++, C, 30 | CMake, COBOL, Clojure, Cucumber, DTrace, Dockerfile, Dosini, Elixir, Elm, 31 | Erlang, F#, Fortran, Git commit message, Golang, HTML, Haskell, JSON, Java, 32 | JavaScript, Jsx, LUA, Lex/Flex & Yacc/Bison, Mail, Makefile, Markdown, NGINX, 33 | Octave/MATLAB, PHP, Pascal, Perl, PlantUML, Powershell script, Purescript, 34 | Python, R, Ruby, Rust, SQL/MySQL, Sed, SystemTap, Vim script, XML, YAML, 35 | reStructuredText, (insert another dinosaur...), (insert another egg...) 36 | 37 | As most active Vim users have discovered, the best language syntax support 38 | comes from community-driven plugins. Please refer to the PaperColor Git 39 | repository's README for references to syntax plugins that are directly 40 | supported by PaperColor. 41 | 42 | Light AND dark theme~ 43 | 44 | Some colorschemes are light, some are dark. PaperColor is both. 45 | 46 | Flexible color ranges~ 47 | 48 | A given terminals or GUI programs may support a different number of colors. 49 | PaperColor aims to support most, if not all, of these options. PaperColor 50 | currently supports True color / GUI-color, and identical 256-color that the 51 | design is based on. It also gracefully supports everything down to a 16-color 52 | terminal, which uses terminal native colors (think the Linux tty). 53 | 54 | Note that in 8-color and 4-color, PaperColor may lack the necessary variation 55 | of colors to function properly. 56 | 57 | Complete configurability~ 58 | 59 | If you don't like our choices, you are free to change them with flexible 60 | configuration options explained in |PaperColor-Theme-configuration|. 61 | 62 | Performance~ 63 | 64 | Performance is important. This plugin does a lot, but optimizations have been 65 | prioritized where possible to prevent it from slowing you down. 66 | 67 | ============================================================================== 68 | 2. Setup *PaperColor-Theme-setup* 69 | 70 | Assuming you've already installed this plugin, to get it to work properly, 71 | you'll need to configure your Vim syntax. To start, you should tell PaperColor 72 | what your terminal supports. 73 | 74 | If your terminal only supports 16 colors: > 75 | 76 | set t_Co=16 77 | 78 | If your terminal supports up to 256 colors: > 79 | 80 | set t_Co=256 81 | 82 | If your terminal supports True Color: > 83 | 84 | set termguicolors 85 | 86 | If you'd like to use the "dark" version of PaperColor: > 87 | 88 | set background=dark 89 | 90 | If you'd like to use the "light" version of PaperColor: > 91 | 92 | set background=light 93 | 94 | Finally, after you've selected your appropriate configuration options above: > 95 | 96 | colorscheme PaperColor 97 | 98 | Here is a full example with a dark background and True Color support: > 99 | 100 | set termguicolors 101 | set background=dark 102 | colorscheme PaperColor 103 | 104 | When PaperColor is enabled, to switch to dark or light variant during an 105 | editing session: > 106 | 107 | :set background=dark OR :set background=light 108 | 109 | Some plugins have PaperColor support. 110 | 111 | To set vim-airline theme: > 112 | 113 | let g:airline_theme='papercolor' 114 | 115 | To set lightline theme: > 116 | 117 | let g:lightline = { 'colorscheme': 'PaperColor' } 118 | 119 | ============================================================================== 120 | 3. CONFIGURATION *PaperColor-Theme-configuration* 121 | 122 | This theme currently provides theme options and language-specific options. All 123 | config options can be stored in global variable g:PaperColor_Theme_Options 124 | which can be set in your .vimrc. 125 | 126 | g:PaperColor_Theme_Options must be placed before "colorscheme PaperColor" in 127 | your vimrc. 128 | 129 | If the same option is provided in both a theme and a theme's variant, the 130 | value in the theme's variant options will take precedence. 131 | 132 | *g:PaperColor_Theme_Options* 133 | g:PaperColor_Theme_Options~ 134 | 135 | Type: Dictionary[String, Dictionary] 136 | Default: {} 137 | 138 | *Theme options* 139 | 140 | Within section theme, options for each theme can be specified under the theme 141 | name. The original PaperColor theme is default. For example: > 142 | 143 | let g:PaperColor_Theme_Options = { 144 | \ 'theme': { 145 | \ 'default': { 146 | \ 'transparent_background': 1 147 | \ } 148 | \ } 149 | \ } 150 | 151 | Or if you want to specify options only for a variant (dark or light) of a 152 | theme, you can specify using this pattern [theme name].light or [theme 153 | name].dark. For example: > 154 | 155 | let g:PaperColor_Theme_Options = { 156 | \ 'theme': { 157 | \ 'default.dark': { 158 | \ 'override' : { 159 | \ 'color00' : ['#080808', '232'], 160 | \ 'linenumber_bg' : ['#080808', '232'] 161 | \ } 162 | \ } 163 | \ } 164 | \ } 165 | 166 | Accepted values~ 167 | 168 | transparent_background > 169 | 170 | values -- 1: use terminal background, 0: use theme background 171 | default -- 0 172 | 173 | allow_bold > 174 | 175 | values -- 1: use bold for certain text, 0: not at all 176 | default -- decided by the theme 177 | 178 | allow_italic > 179 | 180 | values -- 1: use italics for certain text, 0: not at all 181 | default -- decided by the theme 182 | 183 | override > 184 | 185 | values -- dictionary of color key-value 186 | default -- {} 187 | 188 | *Language-specific options* 189 | 190 | In general, for each language, built-in functions and constants are not 191 | highlighted. This is intentional; the vim syntax file often lags behind actual 192 | language development. To override the default behavior, optionally place a 193 | language section in g:PaperColor_Theme_Options. An example configuration is 194 | available below: > 195 | 196 | let g:PaperColor_Theme_Options = { 197 | \ 'language': { 198 | \ 'python': { 199 | \ 'highlight_builtins' : 1 200 | \ }, 201 | \ 'cpp': { 202 | \ 'highlight_standard_library': 1 203 | \ }, 204 | \ 'c': { 205 | \ 'highlight_builtins' : 1 206 | \ } 207 | \ } 208 | \ } 209 | 210 | Accepted values~ 211 | 212 | language option values default 213 | c highlight_builtins 1: enable, 0: disable 0 214 | cpp highlight_standard_library 1: enable, 0: disable 0 215 | python highlight_builtins 1: enable, 0: disable 0 216 | 217 | ============================================================================== 218 | 4. CREDITS *PaperColor-Theme-credits* 219 | 220 | Special thanks to Samuel Roeca for writing this documentation. 221 | 222 | Development for PaperColor-Theme takes place at 223 | https://github.com/NLKNguyen/papercolor-theme. Please refer to that 224 | repository's README for the latest news, projects, and features. If you have a 225 | plugin, language, or other feature that you would like implemented, please 226 | submit a pull request or raise an issue. 227 | 228 | vim:tw=78:ts=8:ft=help:norl: 229 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 |

3 | License: MIT 4 |

5 | 6 | 7 |

8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | License: MIT 16 | 17 | 18 | 19 | 20 | License: MIT 21 | 22 | 23 | 26 | 27 | 30 | 31 | 32 | Closed issues 33 | 34 | 35 | 36 | Patreon donate button 37 | 38 | 39 | 40 | Open Collective donate button 41 | 42 | 43 | 44 | PayPal donate button 45 | 46 | 47 | 48 | Amazon donate button 49 | 50 | 51 |

52 | 53 |

54 | 55 | Buy Me A Coffee 56 | 57 |

58 | 59 | Light & Dark color schemes for terminal and GUI **Vim** awesome editor 60 | 61 | Inspired by Google's Material Design. Improve code readability! Great for presentation! 62 | 63 | It is optimized to load fast and support 4-bit, 8-bit and 24-bit color terminals or GUIs. For full color spectrum, any 8-bit (256-color) capable display is sufficient. 64 | 65 | **Plus:** PaperColor is also a syntax highlighting framework for creating color themes, in which the PaperColor theme you see here is the default. If you want to create your own theme, consider creating on top of PaperColor to leverage 100% its functionality and still have your own specialization. 66 | 67 | ![Light](https://nlknguyen.files.wordpress.com/2015/05/asm.png) 68 | 69 | ![Dark](https://nlknguyen.files.wordpress.com/2015/05/c-dark-split.png) 70 | 71 | *** 72 | Why was this theme created? [Read the background story](https://dephony.com/blog/software-updates/papercolor-theme-v1-0/) 73 | *** 74 | 75 | 76 | # ✨ Inclusive support 77 | 78 | ## 🎨 Colors 79 | 80 | Support True / GUI color (24-bit) and identical **256 color** (8-bit) that the default theme is based on. 81 | 82 | Also gracefully support down to **16 color** (4-bit) terminal, which will use terminal native colors. You need to change the terminal colors to PaperColor palette. 83 | 84 | In **8 color** and **4 color** terminals, they might lack the necessary variation of colors to express PaperColor look, but seriously let me know if you still use these kinds of terminals. 85 | 86 | **Default Theme Palette** 87 | 88 | | | Light Theme | 8-bit | 24-bit | Dark Theme | 8-bit | 24-bit | 89 | |--- | ----- | -------|---------| ----- | -------|---------| 90 | | 0 |![#eeeeee](https://place-hold.it/100x40/eeeeee/000000?text=+) | 255 | #eeeeee |![#1c1c1c](https://place-hold.it/100x40/1c1c1c/000000?text=+) | 234 | #1c1c1c | 91 | | 1 |![#af0000](https://place-hold.it/100x40/af0000/000000?text=+) | 124 | #af0000 |![#af005f](https://place-hold.it/100x40/af005f/000000?text=+) | 125 | #af005f | 92 | | 2 |![#008700](https://place-hold.it/100x40/008700/000000?text=+) | 28 | #008700 |![#5faf00](https://place-hold.it/100x40/5faf00/000000?text=+) | 70 | #5faf00 | 93 | | 3 |![#5f8700](https://place-hold.it/100x40/5f8700/000000?text=+) | 64 | #5f8700 |![#d7af5f](https://place-hold.it/100x40/d7af5f/000000?text=+) | 179 | #d7af5f | 94 | | 4 |![#0087af](https://place-hold.it/100x40/0087af/000000?text=+) | 31 | #0087af |![#5fafd7](https://place-hold.it/100x40/5fafd7/000000?text=+) | 74 | #5fafd7 | 95 | | 5 |![#878787](https://place-hold.it/100x40/878787/000000?text=+) | 102 | #878787 |![#808080](https://place-hold.it/100x40/808080/000000?text=+) | 244 | #808080 | 96 | | 6 |![#005f87](https://place-hold.it/100x40/005f87/000000?text=+) | 24 | #005f87 |![#d7875f](https://place-hold.it/100x40/d7875f/000000?text=+) | 173 | #d7875f | 97 | | 7 |![#444444](https://place-hold.it/100x40/444444/000000?text=+) | 238 | #444444 |![#d0d0d0](https://place-hold.it/100x40/d0d0d0/000000?text=+) | 252 | #d0d0d0 | 98 | | 8 |![#bcbcbc](https://place-hold.it/100x40/bcbcbc/000000?text=+) | 250 | #bcbcbc |![#585858](https://place-hold.it/100x40/585858/000000?text=+) | 240 | #585858 | 99 | | 9 |![#d70000](https://place-hold.it/100x40/d70000/000000?text=+) | 160 | #d70000 |![#5faf5f](https://place-hold.it/100x40/5faf5f/000000?text=+) | 71 | #5faf5f | 100 | | 10 |![#d70087](https://place-hold.it/100x40/d70087/000000?text=+) | 162 | #d70087 |![#afd700](https://place-hold.it/100x40/afd700/000000?text=+) | 148 | #afd700 | 101 | | 11 |![#8700af](https://place-hold.it/100x40/8700af/000000?text=+) | 91 | #8700af |![#af87d7](https://place-hold.it/100x40/af87d7/000000?text=+) | 140 | #af87d7 | 102 | | 12 |![#d75f00](https://place-hold.it/100x40/d75f00/000000?text=+) | 166 | #d75f00 |![#ffaf00](https://place-hold.it/100x40/ffaf00/000000?text=+) | 214 | #ffaf00 | 103 | | 13 |![#d75f00](https://place-hold.it/100x40/d75f00/000000?text=+) | 166 | #d75f00 |![#ff5faf](https://place-hold.it/100x40/ff5faf/000000?text=+) | 205 | #ff5faf | 104 | | 14 |![#005faf](https://place-hold.it/100x40/005faf/000000?text=+) | 25 | #005faf |![#00afaf](https://place-hold.it/100x40/00afaf/000000?text=+) | 37 | #00afaf | 105 | | 15 |![#005f87](https://place-hold.it/100x40/005f87/000000?text=+) | 24 | #005f87 |![#5f8787](https://place-hold.it/100x40/5f8787/000000?text=+) | 66 | #5f8787 | 106 | 107 | 108 | There are many more colors for many additional syntax groups, but they are designed to fall back to these base 16 colors strategically so that it can utilize the terminal native color palette (if configured like above), and also theme designers only need to provide 16 colors for a functional theme. 109 | 110 | ## 🚀 Languages 111 | 112 | Currently designed for these languages: 113 | - Haskell, Erlang, Elixir, Clojure, Elm, Purescript, F# 114 | - C, C++, Golang, Rust, Java, JavaScript, Python, Ruby, Pascal, PHP, Perl, LUA 115 | - DTrace, SystemTap, SQL/MySQL, Octave/MATLAB, R, Lex/Flex & Yacc/Bison, ASN.1, Assembly (MIPS, GAS, NASM), Bash/Shell script, Sed, Awk, Vim script, Powershell script 116 | - Dockerfile, Makefile, CMake, NGINX, Cucumber, YAML, JSON, HTML, XML, Markdown, reStructuredText, PlantUML, Dosini, Mail, Git commit message 117 | - Ada, COBOL, Fortran, ALGOL, *(what's your other favorite dinosaur?)* 118 | 119 | Other file types can still display well as long as your Vim is set up to recognize the language syntax even though that may not be the optimal experience. So, if the language you are working on isn't listed here, feel free to make a design request. 120 | ## 📚 Targeted plugins for additional syntax highlighting 121 | 122 | vimdiff, netrw, [NERDTree](https://github.com/scrooloose/nerdtree), [tagbar](https://github.com/majutsushi/tagbar), [tabline](https://github.com/mkitt/tabline.vim), [vim-airline](https://github.com/bling/vim-airline), [vim-indent-guides](https://github.com/nathanaelkane/vim-indent-guides), [vim-startify](https://github.com/mhinz/vim-startify), [Agit](https://github.com/cohama/agit.vim), [vim-signify](https://github.com/mhinz/vim-signify), [nvim-dap-ui](https://github.com/rcarriga/nvim-dap-ui) ([PR](https://github.com/NLKNguyen/papercolor-theme/pull/181)), [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) ([PR](https://github.com/NLKNguyen/papercolor-theme/pull/182)), [vim-gitgutter](https://github.com/airblade/vim-gitgutter) 123 | 124 | The below are programming language syntax highlighting plugins that enhances upon Vim built-in syntax highlighting. 125 | 126 | * C: [c-syntax.vim](https://github.com/NLKNguyen/c-syntax.vim) 127 | * JavaScript: [vim-javascript](https://github.com/pangloss/vim-javascript) 128 | * Jsx: [vim-jsx-pretty](https://github.com/MaxMEllon/vim-jsx-pretty) 129 | * JSON: [vim-json](https://github.com/elzr/vim-json) 130 | * Go: [vim-go](https://github.com/fatih/vim-go) 131 | * DTrace: [dtrace-syntax-file](https://github.com/vim-scripts/dtrace-syntax-file) 132 | * SystemTap: [vim-systemtap](https://github.com/nickhutchinson/vim-systemtap) 133 | * Haskell: [haskell-vim](https://github.com/raichoo/haskell-vim) 134 | * PlantUML: [plantuml-syntax](https://github.com/aklt/plantuml-syntax) 135 | * Markdown: [vim-markdown](https://github.com/plasticboy/vim-markdown) 136 | * Assembly MIPS: [mips](https://github.com/vim-scripts/mips.vim) 137 | * Assembly GAS: [vim-gas](https://github.com/Shirk/vim-gas) 138 | * Octave/MATLAB: [vim-octave](https://github.com/jvirtanen/vim-octave) 139 | * Python: [python-syntax](https://github.com/vim-python/python-syntax/) 140 | * Dockerfile: [dockerfile.vim](https://github.com/docker/docker/tree/master/contrib/syntax/vim) 141 | * NGINX: [nginx-vim-syntax](https://github.com/evanmiller/nginx-vim-syntax) 142 | * Elixir: [vim-elixir](https://github.com/elixir-lang/vim-elixir) 143 | * Elm: [elm-vim](https://github.com/ElmCast/elm-vim) 144 | * Purescript: [purescript-vim](https://github.com/purescript-contrib/purescript-vim) 145 | * F#: [vim-fsharp](https://github.com/fsharp/vim-fsharp) 146 | * PowerShell: [vim-ps1](https://github.com/PProvost/vim-ps1) 147 | * CMake: [vim-cmake-syntax](https://github.com/pboettch/vim-cmake-syntax) 148 | * ALGOL: [vim-algol68](https://github.com/sterpe/vim-algol68) 149 | 150 | 151 | 152 | # 🔌 Installation 153 | 154 | ### Using a plugin manager 155 | 156 | It's easy to use a plugin manager like [Vundle](https://github.com/gmarik/Vundle.vim) (recommended for convenient `:PluginUpdate`). Add this to your .vimrc where Vundle is configured, and run `:PluginInstall` 157 | 158 | Plugin 'NLKNguyen/papercolor-theme' 159 | 160 | 161 | A newer and popular plugin manager is Plug that you can use as well. Similar setup like above; run `:PlugInstall` 162 | 163 | Plug 'NLKNguyen/papercolor-theme' 164 | 165 | To use vims built in package manager use this command 166 | 167 | git clone https://github.com/NLKNguyen/papercolor-theme.git ~/.vim/pack/colors/start/papercolor-theme 168 | 169 | 170 | ### Manual 171 | 172 | If you can't use a plugin manager (you should), then manually place `PaperColor.vim` file into `colors` folder within your Vim directory, e.g. `~/.vim/colors/` 173 | 174 | ## ⭐ Configure `.vimrc` 175 | 176 | Put this in your `~/.vimrc` 177 | 178 | ```VimL 179 | set t_Co=256 " This is may or may not needed. 180 | 181 | set background=light 182 | colorscheme PaperColor 183 | ``` 184 | 185 | Or using the dark version: 186 | 187 | ```VimL 188 | set background=dark 189 | colorscheme PaperColor 190 | ``` 191 | 192 | To switch to dark or light variant during session: `:set background=dark` or `:set background=light` 193 | 194 | To quickly toggle between them, use [vim-unimpaired](https://github.com/tpope/vim-unimpaired)'s keymap `cob` 195 | 196 | *Optional*: turn on line numbers and status bar 197 | 198 | ```VimL 199 | set number 200 | set laststatus=2 201 | ``` 202 | # 🛠️ User Customization 203 | 204 | 205 | This theme currently provides theme options and language-specific options. All config options can be stored in global variable `g:PaperColor_Theme_Options` which can be set in your `.vimrc` 206 | 207 | 208 | **Note**: 209 | + This `g:PaperColor_Theme_Options` variable must be placed anywhere **before** `color PaperColor` command. 210 | + if the same option is provided in both a theme and a theme's variant, the value in the theme's variant options will take precedence. 211 | 212 | ### Theme Options 213 | 214 | Within section `theme`, options for each theme can be specified under the theme name. The original PaperColor theme is `default`. For example: 215 | 216 | ```VimL 217 | let g:PaperColor_Theme_Options = { 218 | \ 'theme': { 219 | \ 'default': { 220 | \ 'transparent_background': 1 221 | \ } 222 | \ } 223 | \ } 224 | ``` 225 | 226 | Or if you want to specify options only for a variant (dark or light) of a theme, you can specify using this pattern `[theme name].light` or `[theme name].dark`. For example: 227 | 228 | ```VimL 229 | let g:PaperColor_Theme_Options = { 230 | \ 'theme': { 231 | \ 'default.dark': { 232 | \ 'transparent_background': 1 233 | \ } 234 | \ } 235 | \ } 236 | ``` 237 | 238 | **Color overriding** 239 | 240 | 241 | You can override any color of the theme of interest. This example is for `default` theme (original PaperColor Theme), but you can specify any other theme that is registered. 242 | 243 | The overriding setting is placed in `override` key of `g:PaperColor_Theme_Options` variable that you set in `.vimrc` like this. 244 | 245 | ```VimL 246 | let g:PaperColor_Theme_Options = { 247 | \ 'theme': { 248 | \ 'default.dark': { 249 | \ 'override' : { 250 | \ 'color00' : ['#080808', '232'], 251 | \ 'linenumber_bg' : ['#080808', '232'] 252 | \ } 253 | \ } 254 | \ } 255 | \ } 256 | 257 | ``` 258 | 259 | See [DESIGN.md](https://github.com/NLKNguyen/papercolor-theme/blob/master/DESIGN.md) for more details and full list of color names. 260 | 261 | 262 | #### Currently available theme options 263 | 264 | option | value | default 265 | ------ | ------ | ------- 266 | `transparent_background` | 1: use terminal background | 0: use theme background 267 | `allow_bold` | 1: use bold for certain text, 0: not at all | decided by the theme 268 | `allow_italic` | 1: use italics for certain text, 0: not at all | decided by the theme 269 | `override` | dictionary of color key-value | 270 | 271 | 272 | ### Language-specific options 273 | 274 | In general, for each language, built-in functions and constants are not highlighted. 275 | This is intentional; the vim syntax file often lags behind actual language development. 276 | To override the default behavior, optionally place a language section in `g:PaperColor_Theme_Options`. 277 | An example configuration is available below 278 | 279 | 280 | ```VimL 281 | let g:PaperColor_Theme_Options = { 282 | \ 'language': { 283 | \ 'haskell': { 284 | \ 'no_bold_types' : 1 285 | \ }, 286 | \ 'python': { 287 | \ 'highlight_builtins' : 1 288 | \ }, 289 | \ 'cpp': { 290 | \ 'highlight_standard_library': 1 291 | \ }, 292 | \ 'c': { 293 | \ 'highlight_builtins' : 1 294 | \ } 295 | \ } 296 | \ } 297 | ``` 298 | 299 | #### Currently available language options 300 | 301 | language | option | value | default 302 | ------ | ------ | ------ | ------ 303 | `c` | `highlight_builtins` | 1: enable | 0: disable 304 | `cpp` | `highlight_standard_library` | 1: enable | 0: disable 305 | `python` | `highlight_builtins` | 1: enable | 0: disable 306 | `haskell` | `no_bold_types` | 1: enable | 0: disable 307 | 308 | 309 | ### Vim-airline support 310 | 311 | ![Vim-airline support](https://nlknguyen.files.wordpress.com/2015/05/gifrecord_2015-05-31_010251.gif) 312 | 313 | To set [vim-airline](https://github.com/bling/vim-airline) theme: 314 | 315 | ```VimL 316 | let g:airline_theme='papercolor' 317 | ``` 318 | 319 | Note: to be able to use this theme, it is also necessary to install [vim-airline-themes](https://github.com/vim-airline/vim-airline-themes) 320 | 321 | To set [lightline](https://github.com/itchyny/lightline.vim) theme: 322 | 323 | ```VimL 324 | let g:lightline = { 'colorscheme': 'PaperColor' } 325 | ``` 326 | 327 | 328 | # 📺 Screenshots 329 | 330 | 331 | **Default Light** 332 | 333 | ![Sample Ruby code](https://nlknguyen.files.wordpress.com/2015/05/ruby1.png) 334 | 335 | ![Sample DTrace code](https://nlknguyen.files.wordpress.com/2015/05/dtrace1.png) 336 | 337 | ![Sample MySQL code](https://nlknguyen.files.wordpress.com/2015/05/mysql.png) 338 | 339 | ![Sample Assembly code](https://nlknguyen.files.wordpress.com/2015/05/asm.png) 340 | 341 | ![Sample Vimdiff w/ git tool](https://cloud.githubusercontent.com/assets/4667129/24315492/9410c372-10a4-11e7-84c7-8846984bdca0.png) 342 | 343 | **Default Dark** 344 | 345 | ![Sample Ruby code](https://nlknguyen.files.wordpress.com/2015/05/ruby-dark.png) 346 | 347 | ![Sample Go code](https://nlknguyen.files.wordpress.com/2015/05/go-dark.png) 348 | 349 | ![Sample JavaScript code](https://nlknguyen.files.wordpress.com/2015/05/javascript-dark2.png) 350 | 351 | ![Sample C code](https://nlknguyen.files.wordpress.com/2015/05/c-dark-split.png) 352 | 353 | ![Sample Vimdiff w/ git tool](https://cloud.githubusercontent.com/assets/4667129/24315493/94122816-10a4-11e7-8d3f-f5d92a064a14.png) 354 | 355 | 356 | *Have screenshots to contribute?* Use [this thread](https://github.com/NLKNguyen/papercolor-theme/issues/90) to upload images and get direct links to place here. 357 | 358 | # 👋 Author 359 | 360 | 361 | 👤 **Nikyle Nguyen** 362 | 363 | 364 | Twitter: NLKNguyen 365 | 366 | 367 | * Website: https://dephony.com/Nikyle 368 | * Twitter: [@NLKNguyen](https://twitter.com/NLKNguyen) 369 | * Github: [@NLKNguyen](https://github.com/NLKNguyen) 370 | * LinkedIn: [@NLKNguyen](https://linkedin.com/in/NLKNguyen) 371 | 372 | # 🤝 Contributing 373 | 374 | Give a ⭐️ if this color scheme helped you developing more comfortably! 375 | 376 | Contributions, issues and feature requests are welcome! Feel free to check [issues page](https://github.com/NLKNguyen/papercolor-theme/issues). 377 | 378 | ## 🙇 Your support is very much appreciated 379 | 380 | I create open-source projects on GitHub and continue to develop/maintain as they are helping others. You can integrate and use these projects in your applications for free! You are free to modify and redistribute anyway you like, even in commercial products. 381 | 382 | I try to respond to users' feedback and feature requests as much as possible. Obviously, this takes a lot of time and efforts (speaking of mental context-switching between different projects and daily work). Therefore, if these projects help you in your work, and you want to encourage me to continue create, here are a few ways you can support me: 383 | 384 | + 💬 Following my blog and social profiles listed above to help me connect with your network 385 | + ⭐️ Starring this project and sharing with others as more users come, more great ideas arrive! 386 | + ☘️ Donating any amount is a great way to help me work on the projects more regularly! 387 | 388 |

389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | Buy Me A Coffee 400 | 401 | 402 | 403 | 404 | 405 | 406 |

407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | Thanks to all contributors who make PaperColor great! ❤️ 415 | 416 | *** 417 | 418 | ## 🔮 Related projects based on PaperColor 419 | 420 | [Material iTerm](https://github.com/stoeffel/material-iterm) theme by Christoph Hermann 421 | 422 | [Material Terminator](https://github.com/marhs/material-terminator) (terminal emulator) theme by Marco Herrero 423 | 424 | [Terminal Theme](https://www.reddit.com/r/vim/comments/36xzbs/vim_paper_color_theme_inspired_by_googles/crqbfpa) by Fixles 425 | 426 | [PaperColor Light for iTerm2](https://github.com/aseom/dotfiles/blob/master/osx/iterm2/papercolor-light.itermcolors) by ASeom Han 427 | 428 | [PaperColor for Terminal.app](https://github.com/tomotargz/papercolor-terminal-app) by tomotargz 429 | 430 | [PaperColor Light for konsole](https://raw.githubusercontent.com/z2oh/dotfiles/82bf6835948674f0ed1f98a14b82975ff2dd8f3e/konsole/paperrlight.colorscheme) by [z2oh](https://github.com/z2oh) 431 | 432 | [PaperColor Light for konsole](https://github.com/MaxG87/konsole-papercolor) (some palette collisions resolved) by [MaxG87](https://github.com/MaxG87) 433 | 434 | [PaperColor Theme for Vis Editor](https://github.com/jceb/dotfiles/blob/master/config/vis/lexers/themes/papercolor.lua) by Jan Christoph Ebersbach 435 | 436 | [Airline PaperColor Theme for Emacs Powerline](https://github.com/AnthonyDiGirolamo/airline-themes) by Anthony DiGirolamo 437 | 438 | [Airline PaperColor Theme for Vim Lightline](https://github.com/itchyny/lightline.vim) 439 | 440 | [Ninrod's `vim + tmux + zsh` dotfiles](https://github.com/ninrod/dotfiles.git) by [Filipe Silva](https://github.com/ninrod) 441 | 442 | [PaperColor for Vscode](https://github.com/Rozbo/papercolor-vscode) by [rozbo](https://github.com/rozbo) 443 | 444 | [PaperColor for Vscode Redux](https://github.com/mrworkman/papercolor-vscode-redux) by [mrworkman](https://github.com/mrworkman) 445 | 446 | [PaperColor theme for Hyper](https://github.com/rafaelrinaldi/hyper-papercolor) by [Rafael Rinaldi](https://github.com/rafaelrinaldi) 447 | 448 | [PaperColor Theme for kitty](https://github.com/craffate/papercolor-kitty) by [Cyril Raffatelli](https://github.com/craffate) 449 | 450 | [PaperColor Light theme for several tools](https://github.com/stoerdebegga/papercolor-light-contrib) by [stoerdebegga](https://github.com/stoerdebegga) 451 | 452 | [PaperColor Light theme for Alacritty](https://github.com/eendroroy/alacritty-theme/blob/master/themes/papercolor_light.yaml) 453 | 454 | Feel free to send a PR to add related projects here! 455 | 456 | *** 457 | 458 | # 📝 License 459 | 460 | Copyright © 2015 - 2020 [Nikyle Nguyen](https://github.com/NLKNguyen) 461 | 462 | The project is [MIT License](https://github.com/NLKNguyen/papercolor-theme/blob/master/LICENSE) 463 | -------------------------------------------------------------------------------- /colors/PaperColor.vim: -------------------------------------------------------------------------------- 1 | " Theme: PaperColor 2 | " Author: Nikyle Nguyen 3 | " License: MIT 4 | " Source: http://github.com/NLKNguyen/papercolor-theme 5 | 6 | let s:version = '0.9.x' 7 | 8 | " Note on navigating this source code: 9 | " - Use folding feature to collapse/uncollapse blocks of marked code 10 | " zM to fold all markers in this file to see the structure of the source code 11 | " zR to unfold all recursively 12 | " za to toggle a fold 13 | " See: http://vim.wikia.com/wiki/Folding 14 | " - The main section is at the end where the functions are called in order. 15 | 16 | " Theme Repository: {{{ 17 | 18 | let s:themes = {} 19 | 20 | " }}} 21 | 22 | fun! s:register_default_theme() 23 | " Theme name should be lowercase 24 | let s:themes['default'] = { 25 | \ 'maintainer' : 'Nikyle Nguyen ', 26 | \ 'source' : 'http://github.com/NLKNguyen/papercolor-theme', 27 | \ 'description' : 'The original PaperColor Theme, inspired by Google Material Design', 28 | \ 'options' : { 29 | \ 'allow_bold': 1 30 | \ } 31 | \ } 32 | 33 | " Theme can have 'light' and/or 'dark' color palette. 34 | " Color values can be HEX and/or 256-color. Use empty string '' if not provided. 35 | " Only color00 -> color15 are required. The rest are optional. 36 | let s:themes['default'].light = { 37 | \ 'NO_CONVERSION': 1, 38 | \ 'TEST_256_COLOR_CONSISTENCY' : 1, 39 | \ 'palette' : { 40 | \ 'color00' : ['#eeeeee', '255'], 41 | \ 'color01' : ['#af0000', '124'], 42 | \ 'color02' : ['#008700', '28'], 43 | \ 'color03' : ['#5f8700', '64'], 44 | \ 'color04' : ['#0087af', '31'], 45 | \ 'color05' : ['#878787', '102'], 46 | \ 'color06' : ['#005f87', '24'], 47 | \ 'color07' : ['#444444', '238'], 48 | \ 'color08' : ['#bcbcbc', '250'], 49 | \ 'color09' : ['#d70000', '160'], 50 | \ 'color10' : ['#d70087', '162'], 51 | \ 'color11' : ['#8700af', '91'], 52 | \ 'color12' : ['#d75f00', '166'], 53 | \ 'color13' : ['#d75f00', '166'], 54 | \ 'color14' : ['#005faf', '25'], 55 | \ 'color15' : ['#005f87', '24'], 56 | \ 'color16' : ['#0087af', '31'], 57 | \ 'color17' : ['#008700', '28'], 58 | \ 'cursor_fg' : ['#eeeeee', '255'], 59 | \ 'cursor_bg' : ['#005f87', '24'], 60 | \ 'cursorline' : ['#e4e4e4', '254'], 61 | \ 'cursorcolumn' : ['#e4e4e4', '254'], 62 | \ 'cursorlinenr_fg' : ['#af5f00', '130'], 63 | \ 'cursorlinenr_bg' : ['#eeeeee', '255'], 64 | \ 'popupmenu_fg' : ['#444444', '238'], 65 | \ 'popupmenu_bg' : ['#d0d0d0', '252'], 66 | \ 'search_fg' : ['#444444', '238'], 67 | \ 'search_bg' : ['#ffff5f', '227'], 68 | \ 'incsearch_fg' : ['#ffff5f', '227'], 69 | \ 'incsearch_bg' : ['#444444', '238'], 70 | \ 'linenumber_fg' : ['#b2b2b2', '249'], 71 | \ 'linenumber_bg' : ['#eeeeee', '255'], 72 | \ 'vertsplit_fg' : ['#005f87', '24'], 73 | \ 'vertsplit_bg' : ['#eeeeee', '255'], 74 | \ 'statusline_active_fg' : ['#e4e4e4', '254'], 75 | \ 'statusline_active_bg' : ['#005f87', '24'], 76 | \ 'statusline_inactive_fg' : ['#444444', '238'], 77 | \ 'statusline_inactive_bg' : ['#d0d0d0', '252'], 78 | \ 'todo_fg' : ['#00af5f', '35'], 79 | \ 'todo_bg' : ['#eeeeee', '255'], 80 | \ 'error_fg' : ['#af0000', '124'], 81 | \ 'error_bg' : ['#ffd7ff', '225'], 82 | \ 'matchparen_bg' : ['#c6c6c6', '251'], 83 | \ 'matchparen_fg' : ['#005f87', '24'], 84 | \ 'visual_fg' : ['#eeeeee', '255'], 85 | \ 'visual_bg' : ['#0087af', '31'], 86 | \ 'folded_fg' : ['#0087af', '31'], 87 | \ 'folded_bg' : ['#afd7ff', '153'], 88 | \ 'wildmenu_fg': ['#444444', '238'], 89 | \ 'wildmenu_bg': ['#ffff00', '226'], 90 | \ 'spellbad': ['#ffafd7', '218'], 91 | \ 'spellcap': ['#ffffaf', '229'], 92 | \ 'spellrare': ['#afff87', '156'], 93 | \ 'spelllocal': ['#d7d7ff', '189'], 94 | \ 'diffadd_fg': ['#008700', '28'], 95 | \ 'diffadd_bg': ['#afffaf', '157'], 96 | \ 'diffdelete_fg': ['#af0000', '124'], 97 | \ 'diffdelete_bg': ['#ffd7ff', '225'], 98 | \ 'difftext_fg': ['#0087af', '31'], 99 | \ 'difftext_bg': ['#ffffd7', '230'], 100 | \ 'diffchange_fg': ['#444444', '238'], 101 | \ 'diffchange_bg': ['#ffd787', '222'], 102 | \ 'tabline_bg': ['#005f87', '24'], 103 | \ 'tabline_active_fg': ['#444444', '238'], 104 | \ 'tabline_active_bg': ['#e4e4e4', '254'], 105 | \ 'tabline_inactive_fg': ['#eeeeee', '255'], 106 | \ 'tabline_inactive_bg': ['#0087af', '31'], 107 | \ 'buftabline_bg': ['#005f87', '24'], 108 | \ 'buftabline_current_fg': ['#444444', '238'], 109 | \ 'buftabline_current_bg': ['#e4e4e4', '254'], 110 | \ 'buftabline_active_fg': ['#eeeeee', '255'], 111 | \ 'buftabline_active_bg': ['#005faf', '25'], 112 | \ 'buftabline_inactive_fg': ['#eeeeee', '255'], 113 | \ 'buftabline_inactive_bg': ['#0087af', '31'] 114 | \ } 115 | \ } 116 | 117 | " TODO: idea for subtheme options 118 | " let s:themes['default'].light.subtheme = { 119 | " \ 'alternative' : { 120 | " \ 'options' : { 121 | " \ 'transparent_background': 1 122 | " \ }, 123 | " \ 'palette' : { 124 | " \ } 125 | " \ } 126 | " \ } 127 | 128 | let s:themes['default'].dark = { 129 | \ 'NO_CONVERSION': 1, 130 | \ 'TEST_256_COLOR_CONSISTENCY' : 1, 131 | \ 'palette' : { 132 | \ 'color00' : ['#1c1c1c', '234'], 133 | \ 'color01' : ['#af005f', '125'], 134 | \ 'color02' : ['#5faf00', '70'], 135 | \ 'color03' : ['#d7af5f', '179'], 136 | \ 'color04' : ['#5fafd7', '74'], 137 | \ 'color05' : ['#808080', '244'], 138 | \ 'color06' : ['#d7875f', '173'], 139 | \ 'color07' : ['#d0d0d0', '252'], 140 | \ 'color08' : ['#585858', '240'], 141 | \ 'color09' : ['#5faf5f', '71'], 142 | \ 'color10' : ['#afd700', '148'], 143 | \ 'color11' : ['#af87d7', '140'], 144 | \ 'color12' : ['#ffaf00', '214'], 145 | \ 'color13' : ['#ff5faf', '205'], 146 | \ 'color14' : ['#00afaf', '37'], 147 | \ 'color15' : ['#5f8787', '66'], 148 | \ 'color16' : ['#5fafd7', '74'], 149 | \ 'color17' : ['#d7af00', '178'], 150 | \ 'cursor_fg' : ['#1c1c1c', '234'], 151 | \ 'cursor_bg' : ['#c6c6c6', '251'], 152 | \ 'cursorline' : ['#303030', '236'], 153 | \ 'cursorcolumn' : ['#303030', '236'], 154 | \ 'cursorlinenr_fg' : ['#ffff00', '226'], 155 | \ 'cursorlinenr_bg' : ['#1c1c1c', '234'], 156 | \ 'popupmenu_fg' : ['#c6c6c6', '251'], 157 | \ 'popupmenu_bg' : ['#303030', '236'], 158 | \ 'search_fg' : ['#000000', '16'], 159 | \ 'search_bg' : ['#00875f', '29'], 160 | \ 'incsearch_fg' : ['#00875f', '29'], 161 | \ 'incsearch_bg' : ['#000000', '16'], 162 | \ 'linenumber_fg' : ['#585858', '240'], 163 | \ 'linenumber_bg' : ['#1c1c1c', '234'], 164 | \ 'vertsplit_fg' : ['#5f8787', '66'], 165 | \ 'vertsplit_bg' : ['#1c1c1c', '234'], 166 | \ 'statusline_active_fg' : ['#1c1c1c', '234'], 167 | \ 'statusline_active_bg' : ['#5f8787', '66'], 168 | \ 'statusline_inactive_fg' : ['#bcbcbc', '250'], 169 | \ 'statusline_inactive_bg' : ['#3a3a3a', '237'], 170 | \ 'todo_fg' : ['#ff8700', '208'], 171 | \ 'todo_bg' : ['#1c1c1c', '234'], 172 | \ 'error_fg' : ['#af005f', '125'], 173 | \ 'error_bg' : ['#5f0000', '52'], 174 | \ 'matchparen_bg' : ['#4e4e4e', '239'], 175 | \ 'matchparen_fg' : ['#c6c6c6', '251'], 176 | \ 'visual_fg' : ['#000000', '16'], 177 | \ 'visual_bg' : ['#8787af', '103'], 178 | \ 'folded_fg' : ['#d787ff', '177'], 179 | \ 'folded_bg' : ['#5f005f', '53'], 180 | \ 'wildmenu_fg': ['#1c1c1c', '234'], 181 | \ 'wildmenu_bg': ['#afd700', '148'], 182 | \ 'spellbad': ['#5f0000', '52'], 183 | \ 'spellcap': ['#5f005f', '53'], 184 | \ 'spellrare': ['#005f00', '22'], 185 | \ 'spelllocal': ['#00005f', '17'], 186 | \ 'diffadd_fg': ['#87d700', '112'], 187 | \ 'diffadd_bg': ['#005f00', '22'], 188 | \ 'diffdelete_fg': ['#af005f', '125'], 189 | \ 'diffdelete_bg': ['#5f0000', '52'], 190 | \ 'difftext_fg': ['#5fffff', '87'], 191 | \ 'difftext_bg': ['#008787', '30'], 192 | \ 'diffchange_fg': ['#d0d0d0', '252'], 193 | \ 'diffchange_bg': ['#005f5f', '23'], 194 | \ 'tabline_bg': ['#262626', '235'], 195 | \ 'tabline_active_fg': ['#121212', '233'], 196 | \ 'tabline_active_bg': ['#00afaf', '37'], 197 | \ 'tabline_inactive_fg': ['#bcbcbc', '250'], 198 | \ 'tabline_inactive_bg': ['#585858', '240'], 199 | \ 'buftabline_bg': ['#262626', '235'], 200 | \ 'buftabline_current_fg': ['#121212', '233'], 201 | \ 'buftabline_current_bg': ['#00afaf', '37'], 202 | \ 'buftabline_active_fg': ['#00afaf', '37'], 203 | \ 'buftabline_active_bg': ['#585858', '240'], 204 | \ 'buftabline_inactive_fg': ['#bcbcbc', '250'], 205 | \ 'buftabline_inactive_bg': ['#585858', '240'] 206 | \ } 207 | \ } 208 | endfun 209 | 210 | " ============================ THEME REGISTER ================================= 211 | 212 | " Acquire Theme Data: {{{ 213 | 214 | " Brief: 215 | " Function to get theme information and store in variables for other 216 | " functions to use 217 | " 218 | " Require: 219 | " s:themes collection of all theme palettes 220 | " 221 | " Require Optionally: 222 | " {g:PaperColor_Theme_[s:theme_name]} user custom theme palette 223 | " g:PaperColor_Theme_Options user options 224 | " 225 | " Expose: 226 | " s:theme_name the name of the selected theme 227 | " s:selected_theme the selected theme object (contains palette, etc.) 228 | " s:selected_variant 'light' or 'dark' 229 | " s:palette the palette of selected theme 230 | " s:options user options 231 | fun! s:acquire_theme_data() 232 | 233 | " Get theme name: {{{ 234 | let s:theme_name = 'default' 235 | 236 | if exists("g:PaperColor_Theme") " Users expressed theme preference 237 | let lowercase_theme_name = tolower(g:PaperColor_Theme) 238 | 239 | if lowercase_theme_name !=? 'default' 240 | let theme_identifier = 'PaperColor_' . lowercase_theme_name 241 | let autoload_function = theme_identifier . '#register' 242 | 243 | call {autoload_function}() 244 | 245 | let theme_variable = 'g:' . theme_identifier 246 | 247 | if exists(theme_variable) 248 | let s:theme_name = lowercase_theme_name 249 | let s:themes[s:theme_name] = {theme_variable} 250 | endif 251 | 252 | endif 253 | 254 | endif 255 | " }}} 256 | 257 | if s:theme_name ==? 'default' 258 | " Either no other theme is specified or they failed to load 259 | " Defer loading default theme until now 260 | call s:register_default_theme() 261 | endif 262 | 263 | let s:selected_theme = s:themes[s:theme_name] 264 | 265 | " Get Theme Variant: either dark or light {{{ 266 | let s:selected_variant = 'dark' 267 | 268 | let s:is_dark=(&background == 'dark') 269 | 270 | if s:is_dark 271 | if has_key(s:selected_theme, 'dark') 272 | let s:selected_variant = 'dark' 273 | else " in case the theme only provides the other variant 274 | let s:selected_variant = 'light' 275 | endif 276 | 277 | else " is light background 278 | if has_key(s:selected_theme, 'light') 279 | let s:selected_variant = 'light' 280 | else " in case the theme only provides the other variant 281 | let s:selected_variant = 'dark' 282 | endif 283 | endif 284 | 285 | let s:palette = s:selected_theme[s:selected_variant].palette 286 | 287 | " Systematic User-Config Options: {{{ 288 | " Example config in .vimrc 289 | " let g:PaperColor_Theme_Options = { 290 | " \ 'theme': { 291 | " \ 'default': { 292 | " \ 'allow_bold': 1, 293 | " \ 'allow_italic': 0, 294 | " \ 'transparent_background': 1 295 | " \ } 296 | " \ }, 297 | " \ 'language': { 298 | " \ 'python': { 299 | " \ 'highlight_builtins' : 1 300 | " \ }, 301 | " \ 'c': { 302 | " \ 'highlight_builtins' : 1 303 | " \ }, 304 | " \ 'cpp': { 305 | " \ 'highlight_standard_library': 1 306 | " \ } 307 | " \ } 308 | " \ } 309 | " 310 | let s:options = {} 311 | 312 | 313 | if exists("g:PaperColor_Theme_Options") 314 | let s:options = g:PaperColor_Theme_Options 315 | endif 316 | " }}} 317 | 318 | " }}} 319 | endfun 320 | 321 | 322 | " }}} 323 | 324 | " Identify Color Mode: {{{ 325 | 326 | fun! s:identify_color_mode() 327 | let s:MODE_16_COLOR = 0 328 | let s:MODE_256_COLOR = 1 329 | let s:MODE_GUI_COLOR = 2 330 | 331 | if has("gui_running") || has('termguicolors') && &termguicolors || has('nvim') && $NVIM_TUI_ENABLE_TRUE_COLOR 332 | let s:mode = s:MODE_GUI_COLOR 333 | elseif (&t_Co >= 256) 334 | let s:mode = s:MODE_256_COLOR 335 | else 336 | let s:mode = s:MODE_16_COLOR 337 | endif 338 | endfun 339 | 340 | " }}} 341 | 342 | " ============================ OPTION HANDLER ================================= 343 | 344 | " Generate Them Option Variables: {{{ 345 | 346 | 347 | fun! s:generate_theme_option_variables() 348 | " 0. All possible theme option names must be registered here 349 | let l:available_theme_options = [ 350 | \ 'allow_bold', 351 | \ 'allow_italic', 352 | \ 'transparent_background', 353 | \ ] 354 | 355 | " 1. Generate variables and set to default value 356 | for l:option in l:available_theme_options 357 | let s:{'themeOpt_' . l:option} = 0 358 | endfor 359 | 360 | let s:themeOpt_override = {} " special case, this has to be a dictionary 361 | 362 | " 2. Reassign value to the above variables based on theme settings 363 | 364 | " 2.1 In case the theme has top-level options 365 | if has_key(s:selected_theme, 'options') 366 | let l:theme_options = s:selected_theme['options'] 367 | for l:opt_name in keys(l:theme_options) 368 | let s:{'themeOpt_' . l:opt_name} = l:theme_options[l:opt_name] 369 | " echo 's:themeOpt_' . l:opt_name . ' = ' . s:{'themeOpt_' . l:opt_name} 370 | endfor 371 | endif 372 | 373 | " 2.2 In case the theme has specific variant options 374 | if has_key(s:selected_theme[s:selected_variant], 'options') 375 | let l:theme_options = s:selected_theme[s:selected_variant]['options'] 376 | for l:opt_name in keys(l:theme_options) 377 | let s:{'themeOpt_' . l:opt_name} = l:theme_options[l:opt_name] 378 | " echo 's:themeOpt_' . l:opt_name . ' = ' . s:{'themeOpt_' . l:opt_name} 379 | endfor 380 | endif 381 | 382 | 383 | " 3. Reassign value to the above variables which the user customizes 384 | " Part of user-config options 385 | let s:theme_options = {} 386 | if has_key(s:options, 'theme') 387 | let s:theme_options = s:options['theme'] 388 | endif 389 | 390 | " 3.1 In case user sets for a theme without specifying which variant 391 | if has_key(s:theme_options, s:theme_name) 392 | let l:theme_options = s:theme_options[s:theme_name] 393 | for l:opt_name in keys(l:theme_options) 394 | let s:{'themeOpt_' . l:opt_name} = l:theme_options[l:opt_name] 395 | " echo 's:themeOpt_' . l:opt_name . ' = ' . s:{'themeOpt_' . l:opt_name} 396 | endfor 397 | endif 398 | 399 | 400 | " 3.2 In case user sets for a specific variant of a theme 401 | 402 | " Create the string that the user might have set for this theme variant 403 | " for example, 'default.dark' 404 | let l:specific_theme_variant = s:theme_name . '.' . s:selected_variant 405 | 406 | if has_key(s:theme_options, l:specific_theme_variant) 407 | let l:theme_options = s:theme_options[l:specific_theme_variant] 408 | for l:opt_name in keys(l:theme_options) 409 | let s:{'themeOpt_' . l:opt_name} = l:theme_options[l:opt_name] 410 | " echo 's:themeOpt_' . l:opt_name . ' = ' . s:{'themeOpt_' . l:opt_name} 411 | endfor 412 | endif 413 | 414 | endfun 415 | " }}} 416 | 417 | " Check If Theme Has Hint: {{{ 418 | " 419 | " Brief: 420 | " Function to Check if the selected theme and variant has a hint 421 | " 422 | " Details: 423 | " A hint is a known key that has value 1 424 | " It is not part of theme design but is used for technical purposes 425 | " 426 | " Example: 427 | " If a theme has hint 'NO_CONVERSION', then we can assume that every 428 | " color value is a complete pair, so we don't have to check. 429 | 430 | fun! s:theme_has_hint(hint) 431 | return has_key(s:selected_theme[s:selected_variant], a:hint) && 432 | \ s:selected_theme[s:selected_variant][a:hint] == 1 433 | endfun 434 | " }}} 435 | 436 | " Set Overriding Colors: {{{ 437 | 438 | fun! s:set_overriding_colors() 439 | 440 | if s:theme_has_hint('NO_CONVERSION') 441 | " s:convert_colors will not do anything, so we take care of conversion 442 | " for the overriding colors that need to be converted 443 | 444 | if s:mode == s:MODE_GUI_COLOR 445 | " if GUI color is not provided, convert from 256 color that must be available 446 | if !empty(s:themeOpt_override) 447 | call s:load_256_to_GUI_converter() 448 | endif 449 | 450 | for l:color in keys(s:themeOpt_override) 451 | let l:value = s:themeOpt_override[l:color] 452 | if l:value[0] == '' 453 | let l:value[0] = s:to_HEX[l:value[1]] 454 | endif 455 | let s:palette[l:color] = l:value 456 | endfor 457 | 458 | elseif s:mode == s:MODE_256_COLOR 459 | " if 256 color is not provided, convert from GUI color that must be available 460 | if !empty(s:themeOpt_override) 461 | call s:load_GUI_to_256_converter() 462 | endif 463 | 464 | for l:color in keys(s:themeOpt_override) 465 | let l:value = s:themeOpt_override[l:color] 466 | if l:value[1] == '' 467 | let l:value[1] = s:to_256(l:value[0]) 468 | endif 469 | let s:palette[l:color] = l:value 470 | endfor 471 | endif 472 | 473 | else " simply set the colors and let s:convert_colors() take care of conversion 474 | 475 | for l:color in keys(s:themeOpt_override) 476 | let s:palette[l:color] = s:themeOpt_override[l:color] 477 | endfor 478 | endif 479 | 480 | endfun 481 | " }}} 482 | 483 | " Generate Language Option Variables: {{{ 484 | 485 | " Brief: 486 | " Function to generate language option variables so that there is no need to 487 | " look up from the dictionary every time the option value is checked in the 488 | " function s:apply_syntax_highlightings() 489 | " 490 | " Require: 491 | " s:options user options 492 | " 493 | " Require Optionally: 494 | " g:PaperColor_Theme_Options user option config in .vimrc 495 | " 496 | " Expose: 497 | " s:langOpt_[LANGUAGE]__[OPTION] variables for language options 498 | " 499 | " Example: 500 | " g:PaperColor_Theme_Options has something like this: 501 | " 'language': { 502 | " \ 'python': { 503 | " \ 'highlight_builtins': 1 504 | " \ } 505 | " } 506 | " The following variable will be generated: 507 | " s:langOpt_python__highlight_builtins = 1 508 | 509 | fun! s:generate_language_option_variables() 510 | " 0. All possible theme option names must be registered here 511 | let l:available_language_options = [ 512 | \ 'c__highlight_builtins', 513 | \ 'cpp__highlight_standard_library', 514 | \ 'python__highlight_builtins', 515 | \ 'haskell__no_bold_types' 516 | \ ] 517 | 518 | " 1. Generate variables and set to default value 519 | for l:option in l:available_language_options 520 | let s:{'langOpt_' . l:option} = 0 521 | endfor 522 | 523 | " Part of user-config options 524 | if has_key(s:options, 'language') 525 | let l:language_options = s:options['language'] 526 | " echo l:language_options 527 | for l:lang in keys(l:language_options) 528 | let l:options = l:language_options[l:lang] 529 | " echo l:lang 530 | " echo l:options 531 | for l:option in keys(l:options) 532 | let s:{'langOpt_' . l:lang . '__' . l:option} = l:options[l:option] 533 | " echo 's:langOpt_' . l:lang . '__' . l:option . ' = ' . l:options[l:option] 534 | endfor 535 | endfor 536 | 537 | endif 538 | 539 | endfun 540 | " }}} 541 | 542 | " =========================== COLOR CONVERTER ================================= 543 | 544 | fun! s:load_GUI_to_256_converter() 545 | " GUI-color To 256-color: {{{ 546 | " Returns an approximate grey index for the given grey level 547 | fun! s:grey_number(x) 548 | if &t_Co == 88 549 | if a:x < 23 550 | return 0 551 | elseif a:x < 69 552 | return 1 553 | elseif a:x < 103 554 | return 2 555 | elseif a:x < 127 556 | return 3 557 | elseif a:x < 150 558 | return 4 559 | elseif a:x < 173 560 | return 5 561 | elseif a:x < 196 562 | return 6 563 | elseif a:x < 219 564 | return 7 565 | elseif a:x < 243 566 | return 8 567 | else 568 | return 9 569 | endif 570 | else 571 | if a:x < 14 572 | return 0 573 | else 574 | let l:n = (a:x - 8) / 10 575 | let l:m = (a:x - 8) % 10 576 | if l:m < 5 577 | return l:n 578 | else 579 | return l:n + 1 580 | endif 581 | endif 582 | endif 583 | endfun 584 | 585 | " Returns the actual grey level represented by the grey index 586 | fun! s:grey_level(n) 587 | if &t_Co == 88 588 | if a:n == 0 589 | return 0 590 | elseif a:n == 1 591 | return 46 592 | elseif a:n == 2 593 | return 92 594 | elseif a:n == 3 595 | return 115 596 | elseif a:n == 4 597 | return 139 598 | elseif a:n == 5 599 | return 162 600 | elseif a:n == 6 601 | return 185 602 | elseif a:n == 7 603 | return 208 604 | elseif a:n == 8 605 | return 231 606 | else 607 | return 255 608 | endif 609 | else 610 | if a:n == 0 611 | return 0 612 | else 613 | return 8 + (a:n * 10) 614 | endif 615 | endif 616 | endfun 617 | 618 | " Returns the palette index for the given grey index 619 | fun! s:grey_colour(n) 620 | if &t_Co == 88 621 | if a:n == 0 622 | return 16 623 | elseif a:n == 9 624 | return 79 625 | else 626 | return 79 + a:n 627 | endif 628 | else 629 | if a:n == 0 630 | return 16 631 | elseif a:n == 25 632 | return 231 633 | else 634 | return 231 + a:n 635 | endif 636 | endif 637 | endfun 638 | 639 | " Returns an approximate colour index for the given colour level 640 | fun! s:rgb_number(x) 641 | if &t_Co == 88 642 | if a:x < 69 643 | return 0 644 | elseif a:x < 172 645 | return 1 646 | elseif a:x < 230 647 | return 2 648 | else 649 | return 3 650 | endif 651 | else 652 | if a:x < 75 653 | return 0 654 | else 655 | let l:n = (a:x - 55) / 40 656 | let l:m = (a:x - 55) % 40 657 | if l:m < 20 658 | return l:n 659 | else 660 | return l:n + 1 661 | endif 662 | endif 663 | endif 664 | endfun 665 | 666 | " Returns the actual colour level for the given colour index 667 | fun! s:rgb_level(n) 668 | if &t_Co == 88 669 | if a:n == 0 670 | return 0 671 | elseif a:n == 1 672 | return 139 673 | elseif a:n == 2 674 | return 205 675 | else 676 | return 255 677 | endif 678 | else 679 | if a:n == 0 680 | return 0 681 | else 682 | return 55 + (a:n * 40) 683 | endif 684 | endif 685 | endfun 686 | 687 | " Returns the palette index for the given R/G/B colour indices 688 | fun! s:rgb_colour(x, y, z) 689 | if &t_Co == 88 690 | return 16 + (a:x * 16) + (a:y * 4) + a:z 691 | else 692 | return 16 + (a:x * 36) + (a:y * 6) + a:z 693 | endif 694 | endfun 695 | 696 | " Returns the palette index to approximate the given R/G/B colour levels 697 | fun! s:colour(r, g, b) 698 | " Get the closest grey 699 | let l:gx = s:grey_number(a:r) 700 | let l:gy = s:grey_number(a:g) 701 | let l:gz = s:grey_number(a:b) 702 | 703 | " Get the closest colour 704 | let l:x = s:rgb_number(a:r) 705 | let l:y = s:rgb_number(a:g) 706 | let l:z = s:rgb_number(a:b) 707 | 708 | if l:gx == l:gy && l:gy == l:gz 709 | " There are two possibilities 710 | let l:dgr = s:grey_level(l:gx) - a:r 711 | let l:dgg = s:grey_level(l:gy) - a:g 712 | let l:dgb = s:grey_level(l:gz) - a:b 713 | let l:dgrey = (l:dgr * l:dgr) + (l:dgg * l:dgg) + (l:dgb * l:dgb) 714 | let l:dr = s:rgb_level(l:gx) - a:r 715 | let l:dg = s:rgb_level(l:gy) - a:g 716 | let l:db = s:rgb_level(l:gz) - a:b 717 | let l:drgb = (l:dr * l:dr) + (l:dg * l:dg) + (l:db * l:db) 718 | if l:dgrey < l:drgb 719 | " Use the grey 720 | return s:grey_colour(l:gx) 721 | else 722 | " Use the colour 723 | return s:rgb_colour(l:x, l:y, l:z) 724 | endif 725 | else 726 | " Only one possibility 727 | return s:rgb_colour(l:x, l:y, l:z) 728 | endif 729 | endfun 730 | 731 | " Returns the palette index to approximate the '#rrggbb' hex string 732 | fun! s:to_256(rgb) 733 | let l:r = ("0x" . strpart(a:rgb, 1, 2)) + 0 734 | let l:g = ("0x" . strpart(a:rgb, 3, 2)) + 0 735 | let l:b = ("0x" . strpart(a:rgb, 5, 2)) + 0 736 | 737 | return s:colour(l:r, l:g, l:b) 738 | endfun 739 | 740 | 741 | 742 | " }}} 743 | endfun 744 | 745 | fun! s:load_256_to_GUI_converter() 746 | " 256-color To GUI-color: {{{ 747 | 748 | """ Xterm 256 color dictionary 749 | " See: http://www.calmar.ws/vim/256-xterm-24bit-rgb-color-chart.html 750 | " 751 | let s:to_HEX = { 752 | \ '00': '#000000', '01': '#800000', '02': '#008000', '03': '#808000', '04': '#000080', 753 | \ '05': '#800080', '06': '#008080', '07': '#c0c0c0', '08': '#808080', '09': '#ff0000', 754 | \ '10': '#00ff00', '11': '#ffff00', '12': '#0000ff', '13': '#ff00ff', '14': '#00ffff', 755 | \ '15': '#ffffff', '16': '#000000', '17': '#00005f', '18': '#000087', '19': '#0000af', 756 | \ '20': '#0000d7', '21': '#0000ff', '22': '#005f00', '23': '#005f5f', '24': '#005f87', 757 | \ '25': '#005faf', '26': '#005fd7', '27': '#005fff', '28': '#008700', '29': '#00875f', 758 | \ '30': '#008787', '31': '#0087af', '32': '#0087d7', '33': '#0087ff', '34': '#00af00', 759 | \ '35': '#00af5f', '36': '#00af87', '37': '#00afaf', '38': '#00afd7', '39': '#00afff', 760 | \ '40': '#00d700', '41': '#00d75f', '42': '#00d787', '43': '#00d7af', '44': '#00d7d7', 761 | \ '45': '#00d7ff', '46': '#00ff00', '47': '#00ff5f', '48': '#00ff87', '49': '#00ffaf', 762 | \ '50': '#00ffd7', '51': '#00ffff', '52': '#5f0000', '53': '#5f005f', '54': '#5f0087', 763 | \ '55': '#5f00af', '56': '#5f00d7', '57': '#5f00ff', '58': '#5f5f00', '59': '#5f5f5f', 764 | \ '60': '#5f5f87', '61': '#5f5faf', '62': '#5f5fd7', '63': '#5f5fff', '64': '#5f8700', 765 | \ '65': '#5f875f', '66': '#5f8787', '67': '#5f87af', '68': '#5f87d7', '69': '#5f87ff', 766 | \ '70': '#5faf00', '71': '#5faf5f', '72': '#5faf87', '73': '#5fafaf', '74': '#5fafd7', 767 | \ '75': '#5fafff', '76': '#5fd700', '77': '#5fd75f', '78': '#5fd787', '79': '#5fd7af', 768 | \ '80': '#5fd7d7', '81': '#5fd7ff', '82': '#5fff00', '83': '#5fff5f', '84': '#5fff87', 769 | \ '85': '#5fffaf', '86': '#5fffd7', '87': '#5fffff', '88': '#870000', '89': '#87005f', 770 | \ '90': '#870087', '91': '#8700af', '92': '#8700d7', '93': '#8700ff', '94': '#875f00', 771 | \ '95': '#875f5f', '96': '#875f87', '97': '#875faf', '98': '#875fd7', '99': '#875fff', 772 | \ '100': '#878700', '101': '#87875f', '102': '#878787', '103': '#8787af', '104': '#8787d7', 773 | \ '105': '#8787ff', '106': '#87af00', '107': '#87af5f', '108': '#87af87', '109': '#87afaf', 774 | \ '110': '#87afd7', '111': '#87afff', '112': '#87d700', '113': '#87d75f', '114': '#87d787', 775 | \ '115': '#87d7af', '116': '#87d7d7', '117': '#87d7ff', '118': '#87ff00', '119': '#87ff5f', 776 | \ '120': '#87ff87', '121': '#87ffaf', '122': '#87ffd7', '123': '#87ffff', '124': '#af0000', 777 | \ '125': '#af005f', '126': '#af0087', '127': '#af00af', '128': '#af00d7', '129': '#af00ff', 778 | \ '130': '#af5f00', '131': '#af5f5f', '132': '#af5f87', '133': '#af5faf', '134': '#af5fd7', 779 | \ '135': '#af5fff', '136': '#af8700', '137': '#af875f', '138': '#af8787', '139': '#af87af', 780 | \ '140': '#af87d7', '141': '#af87ff', '142': '#afaf00', '143': '#afaf5f', '144': '#afaf87', 781 | \ '145': '#afafaf', '146': '#afafd7', '147': '#afafff', '148': '#afd700', '149': '#afd75f', 782 | \ '150': '#afd787', '151': '#afd7af', '152': '#afd7d7', '153': '#afd7ff', '154': '#afff00', 783 | \ '155': '#afff5f', '156': '#afff87', '157': '#afffaf', '158': '#afffd7', '159': '#afffff', 784 | \ '160': '#d70000', '161': '#d7005f', '162': '#d70087', '163': '#d700af', '164': '#d700d7', 785 | \ '165': '#d700ff', '166': '#d75f00', '167': '#d75f5f', '168': '#d75f87', '169': '#d75faf', 786 | \ '170': '#d75fd7', '171': '#d75fff', '172': '#d78700', '173': '#d7875f', '174': '#d78787', 787 | \ '175': '#d787af', '176': '#d787d7', '177': '#d787ff', '178': '#d7af00', '179': '#d7af5f', 788 | \ '180': '#d7af87', '181': '#d7afaf', '182': '#d7afd7', '183': '#d7afff', '184': '#d7d700', 789 | \ '185': '#d7d75f', '186': '#d7d787', '187': '#d7d7af', '188': '#d7d7d7', '189': '#d7d7ff', 790 | \ '190': '#d7ff00', '191': '#d7ff5f', '192': '#d7ff87', '193': '#d7ffaf', '194': '#d7ffd7', 791 | \ '195': '#d7ffff', '196': '#ff0000', '197': '#ff005f', '198': '#ff0087', '199': '#ff00af', 792 | \ '200': '#ff00d7', '201': '#ff00ff', '202': '#ff5f00', '203': '#ff5f5f', '204': '#ff5f87', 793 | \ '205': '#ff5faf', '206': '#ff5fd7', '207': '#ff5fff', '208': '#ff8700', '209': '#ff875f', 794 | \ '210': '#ff8787', '211': '#ff87af', '212': '#ff87d7', '213': '#ff87ff', '214': '#ffaf00', 795 | \ '215': '#ffaf5f', '216': '#ffaf87', '217': '#ffafaf', '218': '#ffafd7', '219': '#ffafff', 796 | \ '220': '#ffd700', '221': '#ffd75f', '222': '#ffd787', '223': '#ffd7af', '224': '#ffd7d7', 797 | \ '225': '#ffd7ff', '226': '#ffff00', '227': '#ffff5f', '228': '#ffff87', '229': '#ffffaf', 798 | \ '230': '#ffffd7', '231': '#ffffff', '232': '#080808', '233': '#121212', '234': '#1c1c1c', 799 | \ '235': '#262626', '236': '#303030', '237': '#3a3a3a', '238': '#444444', '239': '#4e4e4e', 800 | \ '240': '#585858', '241': '#626262', '242': '#6c6c6c', '243': '#767676', '244': '#808080', 801 | \ '245': '#8a8a8a', '246': '#949494', '247': '#9e9e9e', '248': '#a8a8a8', '249': '#b2b2b2', 802 | \ '250': '#bcbcbc', '251': '#c6c6c6', '252': '#d0d0d0', '253': '#dadada', '254': '#e4e4e4', 803 | \ '255': '#eeeeee' } 804 | 805 | " }}} 806 | endfun 807 | 808 | " ========================== ENVIRONMENT ADAPTER ============================== 809 | 810 | " Set Format Attributes: {{{ 811 | 812 | fun! s:set_format_attributes() 813 | " These are the default 814 | if s:mode == s:MODE_GUI_COLOR 815 | let s:ft_bold = " cterm=bold gui=bold " 816 | let s:ft_none = " cterm=none gui=none " 817 | let s:ft_reverse = " cterm=reverse gui=reverse " 818 | let s:ft_italic = " cterm=italic gui=italic " 819 | let s:ft_italic_bold = " cterm=italic,bold gui=italic,bold " 820 | elseif s:mode == s:MODE_256_COLOR 821 | let s:ft_bold = " cterm=bold " 822 | let s:ft_none = " cterm=none " 823 | let s:ft_reverse = " cterm=reverse " 824 | let s:ft_italic = " cterm=italic " 825 | let s:ft_italic_bold = " cterm=italic,bold " 826 | else 827 | let s:ft_bold = "" 828 | let s:ft_none = " cterm=none " 829 | let s:ft_reverse = " cterm=reverse " 830 | let s:ft_italic = "" 831 | let s:ft_italic_bold = "" 832 | endif 833 | 834 | " Unless instructed otherwise either by theme setting or user overriding 835 | 836 | if s:themeOpt_allow_bold == 0 837 | let s:ft_bold = "" 838 | endif 839 | if s:themeOpt_allow_italic == 0 840 | let s:ft_italic = "" 841 | let s:ft_italic_bold = s:ft_bold 842 | endif 843 | 844 | endfun 845 | 846 | " }}} 847 | 848 | " Convert Colors If Needed: {{{ 849 | fun! s:convert_colors() 850 | if s:theme_has_hint('NO_CONVERSION') 851 | return 852 | endif 853 | 854 | if s:mode == s:MODE_GUI_COLOR 855 | " if GUI color is not provided, convert from 256 color that must be available 856 | call s:load_256_to_GUI_converter() 857 | 858 | for l:color in keys(s:palette) 859 | let l:value = s:palette[l:color] 860 | if l:value[0] == '' 861 | let l:value[0] = s:to_HEX[l:value[1]] 862 | endif 863 | let s:palette[l:color] = l:value 864 | endfor 865 | 866 | elseif s:mode == s:MODE_256_COLOR 867 | " if 256 color is not provided, convert from GUI color that must be available 868 | call s:load_GUI_to_256_converter() 869 | 870 | for l:color in keys(s:palette) 871 | let l:value = s:palette[l:color] 872 | if l:value[1] == '' 873 | let l:value[1] = s:to_256(l:value[0]) 874 | endif 875 | let s:palette[l:color] = l:value 876 | endfor 877 | endif 878 | " otherwise use the terminal colors and none of the theme colors are used 879 | endfun 880 | 881 | " }}} 882 | 883 | " ============================ COLOR POPULARIZER =============================== 884 | 885 | " Set Color Variables: {{{ 886 | fun! s:set_color_variables() 887 | 888 | " Helper: {{{ 889 | " ------- 890 | " Function to dynamically generate variables that store the color strings 891 | " for setting highlighting. Each color name will have 2 variables with prefix 892 | " s:fg_ and s:bg_. For example: 893 | " if a:color_name is 'Normal' and a:color_value is ['#000000', '0', 'Black'], 894 | " the following 2 variables will be created: 895 | " s:fg_Normal that stores the string ' guifg=#000000 ' 896 | " s:bg_Normal that stores the string ' guibg=#000000 ' 897 | " Depending on the color mode, ctermfg and ctermbg will be either 0 or Black 898 | " 899 | " Rationale: 900 | " The whole purpose is for speed. We generate these ahead of time so that we 901 | " don't have to do look up or do any if-branch when we set the highlightings. 902 | " 903 | " Furthermore, multiple function definitions for each mode actually reduces 904 | " the need for multiple if-branches inside a single function. This is not 905 | " pretty, but Vim Script is slow, so reducing if-branches in function that is 906 | " often called helps speeding things up quite a bit. Think of this like macro. 907 | " 908 | " If you are familiar with the old code base (v0.9 and ealier), this way of 909 | " generate variables dramatically reduces the loading speed. 910 | " None of previous optimization tricks gets anywhere near this. 911 | if s:mode == s:MODE_GUI_COLOR 912 | fun! s:create_color_variables(color_name, rich_color, term_color) 913 | let {'s:fg_' . a:color_name} = ' guifg=' . a:rich_color[0] . ' ' 914 | let {'s:bg_' . a:color_name} = ' guibg=' . a:rich_color[0] . ' ' 915 | let {'s:sp_' . a:color_name} = ' guisp=' . a:rich_color[0] . ' ' 916 | endfun 917 | elseif s:mode == s:MODE_256_COLOR 918 | fun! s:create_color_variables(color_name, rich_color, term_color) 919 | let {'s:fg_' . a:color_name} = ' ctermfg=' . a:rich_color[1] . ' ' 920 | let {'s:bg_' . a:color_name} = ' ctermbg=' . a:rich_color[1] . ' ' 921 | let {'s:sp_' . a:color_name} = '' 922 | endfun 923 | else 924 | fun! s:create_color_variables(color_name, rich_color, term_color) 925 | let {'s:fg_' . a:color_name} = ' ctermfg=' . a:term_color . ' ' 926 | let {'s:bg_' . a:color_name} = ' ctermbg=' . a:term_color . ' ' 927 | let {'s:sp_' . a:color_name} = '' 928 | endfun 929 | endif 930 | " }}} 931 | 932 | " Color value format: Array [, <256-Base>, <16-Base>] 933 | " 16-Base is terminal's native color palette that can be alternated through 934 | " the terminal settings. The 16-color names are according to `:h cterm-colors` 935 | 936 | " BASIC COLORS: 937 | " color00-15 are required by all themes. 938 | " These are also how the terminal color palette for the target theme should be. 939 | " See README for theme design guideline 940 | " 941 | " An example format of the below variable's value: ['#262626', '234', 'Black'] 942 | " Where the 1st value is HEX color for GUI Vim, 2nd value is for 256-color terminal, 943 | " and the color name on the right is for 16-color terminal (the actual terminal colors 944 | " can be different from what the color names suggest). See :h cterm-colors 945 | " 946 | " Depending on the provided color palette and current Vim, the 1st and 2nd 947 | " parameter might not exist, for example, on 16-color terminal, the variables below 948 | " only store the color names to use the terminal color palette which is the only 949 | " thing available therefore no need for GUI-color or 256-color. 950 | 951 | let color00 = get(s:palette, 'color00') 952 | let color01 = get(s:palette, 'color01') 953 | let color02 = get(s:palette, 'color02') 954 | let color03 = get(s:palette, 'color03') 955 | let color04 = get(s:palette, 'color04') 956 | let color05 = get(s:palette, 'color05') 957 | let color06 = get(s:palette, 'color06') 958 | let color07 = get(s:palette, 'color07') 959 | let color08 = get(s:palette, 'color08') 960 | let color09 = get(s:palette, 'color09') 961 | let color10 = get(s:palette, 'color10') 962 | let color11 = get(s:palette, 'color11') 963 | let color12 = get(s:palette, 'color12') 964 | let color13 = get(s:palette, 'color13') 965 | let color14 = get(s:palette, 'color14') 966 | let color15 = get(s:palette, 'color15') 967 | 968 | call s:create_color_variables('background', color00 , 'Black') 969 | call s:create_color_variables('negative', color01 , 'DarkRed') 970 | call s:create_color_variables('positive', color02 , 'DarkGreen') 971 | call s:create_color_variables('olive', color03 , 'DarkYellow') " string 972 | call s:create_color_variables('neutral', color04 , 'DarkBlue') 973 | call s:create_color_variables('comment', color05 , 'DarkMagenta') 974 | call s:create_color_variables('navy', color06 , 'DarkCyan') " storageclass 975 | call s:create_color_variables('foreground', color07 , 'LightGray') 976 | 977 | call s:create_color_variables('nontext', color08 , 'DarkGray') 978 | call s:create_color_variables('red', color09 , 'LightRed') " import / try/catch 979 | call s:create_color_variables('pink', color10 , 'LightGreen') " statement, type 980 | call s:create_color_variables('purple', color11 , 'LightYellow') " if / conditional 981 | call s:create_color_variables('accent', color12 , 'LightBlue') 982 | call s:create_color_variables('orange', color13 , 'LightMagenta') " number 983 | call s:create_color_variables('blue', color14 , 'LightCyan') " other keyword 984 | call s:create_color_variables('highlight', color15 , 'White') 985 | 986 | " Note: special case for FoldColumn group. I want to get rid of this case. 987 | call s:create_color_variables('transparent', [color00[0], 'none'], 'none') 988 | 989 | " EXTENDED COLORS: 990 | " From here on, all colors are optional and must have default values (3rd parameter of the 991 | " `get` command) that point to the above basic colors in case the target theme doesn't 992 | " provide the extended colors. The default values should be reasonably sensible. 993 | " The terminal color must be provided also. 994 | 995 | call s:create_color_variables('aqua', get(s:palette, 'color16', color14) , 'LightCyan') 996 | call s:create_color_variables('green', get(s:palette, 'color17', color13) , 'LightMagenta') 997 | call s:create_color_variables('wine', get(s:palette, 'color18', color11) , 'LightYellow') 998 | 999 | " LineNumber: when set number 1000 | call s:create_color_variables('linenumber_fg', get(s:palette, 'linenumber_fg', color08) , 'DarkGray') 1001 | call s:create_color_variables('linenumber_bg', get(s:palette, 'linenumber_bg', color00) , 'Black') 1002 | 1003 | " Vertical Split: when there are more than 1 window side by side, ex: 1004 | call s:create_color_variables('vertsplit_fg', get(s:palette, 'vertsplit_fg', color15) , 'White') 1005 | call s:create_color_variables('vertsplit_bg', get(s:palette, 'vertsplit_bg', color00) , 'Black') 1006 | 1007 | " Statusline: when set status=2 1008 | call s:create_color_variables('statusline_active_fg', get(s:palette, 'statusline_active_fg', color00) , 'Black') 1009 | call s:create_color_variables('statusline_active_bg', get(s:palette, 'statusline_active_bg', color15) , 'White') 1010 | call s:create_color_variables('statusline_inactive_fg', get(s:palette, 'statusline_inactive_fg', color07) , 'LightGray') 1011 | call s:create_color_variables('statusline_inactive_bg', get(s:palette, 'statusline_inactive_bg', color08) , 'DarkGray') 1012 | 1013 | 1014 | " Cursor: in normal mode 1015 | call s:create_color_variables('cursor_fg', get(s:palette, 'cursor_fg', color00) , 'Black') 1016 | call s:create_color_variables('cursor_bg', get(s:palette, 'cursor_bg', color07) , 'LightGray') 1017 | 1018 | call s:create_color_variables('cursorline', get(s:palette, 'cursorline', color00) , 'Black') 1019 | 1020 | " CursorColumn: when set cursorcolumn 1021 | call s:create_color_variables('cursorcolumn', get(s:palette, 'cursorcolumn', color00) , 'Black') 1022 | 1023 | " CursorLine Number: when set cursorline number 1024 | call s:create_color_variables('cursorlinenr_fg', get(s:palette, 'cursorlinenr_fg', color13) , 'LightMagenta') 1025 | call s:create_color_variables('cursorlinenr_bg', get(s:palette, 'cursorlinenr_bg', color00) , 'Black') 1026 | 1027 | " Popup Menu: when for autocomplete 1028 | call s:create_color_variables('popupmenu_fg', get(s:palette, 'popupmenu_fg', color07) , 'LightGray') 1029 | call s:create_color_variables('popupmenu_bg', get(s:palette, 'popupmenu_bg', color08) , 'DarkGray') " TODO: double check this, might resolve an issue 1030 | 1031 | " Search: ex: when * on a word 1032 | call s:create_color_variables('search_fg', get(s:palette, 'search_fg', color00) , 'Black') 1033 | call s:create_color_variables('search_bg', get(s:palette, 'search_bg', color15) , 'Yellow') 1034 | 1035 | " IncSearch: ex: during a search 1036 | call s:create_color_variables('incsearch_fg', get(s:palette, 'incsearch_fg', color00) , 'Black') 1037 | call s:create_color_variables('incsearch_bg', get(s:palette, 'incsearch_bg', color15) , 'Yellow') 1038 | 1039 | " Todo: ex: TODO 1040 | call s:create_color_variables('todo_fg', get(s:palette, 'todo_fg', color05) , 'LightYellow') 1041 | call s:create_color_variables('todo_bg', get(s:palette, 'todo_bg', color00) , 'Black') 1042 | 1043 | " Error: ex: turn spell on and have invalid words 1044 | call s:create_color_variables('error_fg', get(s:palette, 'error_fg', color01) , 'DarkRed') 1045 | call s:create_color_variables('error_bg', get(s:palette, 'error_bg', color00) , 'Black') 1046 | 1047 | " Match Parenthesis: selecting an opening/closing pair and the other one will be highlighted 1048 | call s:create_color_variables('matchparen_fg', get(s:palette, 'matchparen_fg', color00) , 'LightMagenta') 1049 | call s:create_color_variables('matchparen_bg', get(s:palette, 'matchparen_bg', color05) , 'Black') 1050 | 1051 | " Visual: 1052 | call s:create_color_variables('visual_fg', get(s:palette, 'visual_fg', color08) , 'Black') 1053 | call s:create_color_variables('visual_bg', get(s:palette, 'visual_bg', color07) , 'White') 1054 | 1055 | " Folded: 1056 | call s:create_color_variables('folded_fg', get(s:palette, 'folded_fg', color00) , 'Black') 1057 | call s:create_color_variables('folded_bg', get(s:palette, 'folded_bg', color05) , 'DarkYellow') 1058 | 1059 | " WildMenu: Autocomplete command, ex: :color 1060 | call s:create_color_variables('wildmenu_fg', get(s:palette, 'wildmenu_fg', color00) , 'Black') 1061 | call s:create_color_variables('wildmenu_bg', get(s:palette, 'wildmenu_bg', color06) , 'LightGray') 1062 | 1063 | " Spelling: when spell on and there are spelling problems like this for example: papercolor. a vim color scheme 1064 | call s:create_color_variables('spellbad', get(s:palette, 'spellbad', color04) , 'DarkRed') 1065 | call s:create_color_variables('spellcap', get(s:palette, 'spellcap', color05) , 'DarkMagenta') 1066 | call s:create_color_variables('spellrare', get(s:palette, 'spellrare', color06) , 'DarkYellow') 1067 | call s:create_color_variables('spelllocal', get(s:palette, 'spelllocal', color01) , 'DarkBlue') 1068 | 1069 | " Diff: 1070 | call s:create_color_variables('diffadd_fg', get(s:palette, 'diffadd_fg', color00) , 'Black') 1071 | call s:create_color_variables('diffadd_bg', get(s:palette, 'diffadd_bg', color02) , 'DarkGreen') 1072 | 1073 | call s:create_color_variables('diffdelete_fg', get(s:palette, 'diffdelete_fg', color00) , 'Black') 1074 | call s:create_color_variables('diffdelete_bg', get(s:palette, 'diffdelete_bg', color04) , 'DarkRed') 1075 | 1076 | call s:create_color_variables('difftext_fg', get(s:palette, 'difftext_fg', color00) , 'Black') 1077 | call s:create_color_variables('difftext_bg', get(s:palette, 'difftext_bg', color06) , 'DarkYellow') 1078 | 1079 | call s:create_color_variables('diffchange_fg', get(s:palette, 'diffchange_fg', color00) , 'Black') 1080 | call s:create_color_variables('diffchange_bg', get(s:palette, 'diffchange_bg', color14) , 'LightYellow') 1081 | 1082 | " Tabline: when having tabs, ex: :tabnew 1083 | call s:create_color_variables('tabline_bg', get(s:palette, 'tabline_bg', color00) , 'Black') 1084 | call s:create_color_variables('tabline_active_fg', get(s:palette, 'tabline_active_fg', color07) , 'LightGray') 1085 | call s:create_color_variables('tabline_active_bg', get(s:palette, 'tabline_active_bg', color00) , 'Black') 1086 | call s:create_color_variables('tabline_inactive_fg', get(s:palette, 'tabline_inactive_fg', color07) , 'Black') 1087 | call s:create_color_variables('tabline_inactive_bg', get(s:palette, 'tabline_inactive_bg', color08) , 'DarkMagenta') 1088 | 1089 | " Plugin: BufTabLine https://github.com/ap/vim-buftabline 1090 | call s:create_color_variables('buftabline_bg', get(s:palette, 'buftabline_bg', color00) , 'Black') 1091 | call s:create_color_variables('buftabline_current_fg', get(s:palette, 'buftabline_current_fg', color07) , 'LightGray') 1092 | call s:create_color_variables('buftabline_current_bg', get(s:palette, 'buftabline_current_bg', color05) , 'DarkMagenta') 1093 | call s:create_color_variables('buftabline_active_fg', get(s:palette, 'buftabline_active_fg', color07) , 'LightGray') 1094 | call s:create_color_variables('buftabline_active_bg', get(s:palette, 'buftabline_active_bg', color12) , 'LightBlue') 1095 | call s:create_color_variables('buftabline_inactive_fg', get(s:palette, 'buftabline_inactive_fg', color07) , 'LightGray') 1096 | call s:create_color_variables('buftabline_inactive_bg', get(s:palette, 'buftabline_inactive_bg', color00) , 'Black') 1097 | 1098 | " Neovim terminal colors https://neovim.io/doc/user/nvim_terminal_emulator.html#nvim-terminal-emulator-configuration 1099 | " TODO: Fix this 1100 | let g:terminal_color_0 = color00[0] 1101 | let g:terminal_color_1 = color01[0] 1102 | let g:terminal_color_2 = color02[0] 1103 | let g:terminal_color_3 = color03[0] 1104 | let g:terminal_color_4 = color04[0] 1105 | let g:terminal_color_5 = color05[0] 1106 | let g:terminal_color_6 = color06[0] 1107 | let g:terminal_color_7 = color07[0] 1108 | let g:terminal_color_8 = color08[0] 1109 | let g:terminal_color_9 = color09[0] 1110 | let g:terminal_color_10 = color10[0] 1111 | let g:terminal_color_11 = color11[0] 1112 | let g:terminal_color_12 = color12[0] 1113 | let g:terminal_color_13 = color13[0] 1114 | let g:terminal_color_14 = color14[0] 1115 | let g:terminal_color_15 = color15[0] 1116 | 1117 | " Vim 8's :terminal buffer ANSI colors 1118 | if has('terminal') 1119 | let g:terminal_ansi_colors = [color00[0], color01[0], color02[0], color03[0], 1120 | \ color04[0], color05[0], color06[0], color07[0], color08[0], color09[0], 1121 | \ color10[0], color11[0], color12[0], color13[0], color14[0], color15[0]] 1122 | endif 1123 | 1124 | endfun 1125 | " }}} 1126 | 1127 | " Apply Syntax Highlightings: {{{ 1128 | 1129 | fun! s:apply_syntax_highlightings() 1130 | 1131 | if s:themeOpt_transparent_background 1132 | exec 'hi Normal' . s:fg_foreground 1133 | " Switching between dark & light variant through `set background` 1134 | " NOTE: Handle background switching right after `Normal` group because of 1135 | " God-know-why reason. Not doing this way had caused issue before 1136 | if s:is_dark " DARK VARIANT 1137 | set background=dark 1138 | else " LIGHT VARIANT 1139 | set background=light 1140 | endif 1141 | 1142 | exec 'hi NonText' . s:fg_nontext 1143 | exec 'hi LineNr' . s:fg_linenumber_fg 1144 | exec 'hi Conceal' . s:fg_linenumber_fg 1145 | exec 'hi VertSplit' . s:fg_vertsplit_fg . s:ft_none 1146 | exec 'hi FoldColumn' . s:fg_folded_fg . s:bg_transparent . s:ft_none 1147 | else 1148 | exec 'hi Normal' . s:fg_foreground . s:bg_background 1149 | " Switching between dark & light variant through `set background` 1150 | if s:is_dark " DARK VARIANT 1151 | set background=dark 1152 | exec 'hi EndOfBuffer' . s:fg_cursor_fg . s:ft_none 1153 | else " LIGHT VARIANT 1154 | set background=light 1155 | endif 1156 | 1157 | exec 'hi NonText' . s:fg_nontext . s:bg_background 1158 | exec 'hi LineNr' . s:fg_linenumber_fg . s:bg_linenumber_bg 1159 | exec 'hi Conceal' . s:fg_linenumber_fg . s:bg_linenumber_bg 1160 | exec 'hi VertSplit' . s:fg_vertsplit_bg . s:bg_vertsplit_fg 1161 | exec 'hi FoldColumn' . s:fg_folded_fg . s:bg_background . s:ft_none 1162 | endif 1163 | 1164 | exec 'hi Cursor' . s:fg_cursor_fg . s:bg_cursor_bg 1165 | exec 'hi SpecialKey' . s:fg_nontext 1166 | exec 'hi Search' . s:fg_search_fg . s:bg_search_bg 1167 | exec 'hi IncSearch' . s:fg_incsearch_fg . s:bg_incsearch_bg 1168 | exec 'hi StatusLine' . s:fg_statusline_active_bg . s:bg_statusline_active_fg 1169 | exec 'hi StatusLineNC' . s:fg_statusline_inactive_bg . s:bg_statusline_inactive_fg 1170 | exec 'hi StatusLineTerm' . s:fg_statusline_active_bg . s:bg_statusline_active_fg 1171 | exec 'hi StatusLineTermNC' . s:fg_statusline_inactive_bg . s:bg_statusline_inactive_fg 1172 | exec 'hi Visual' . s:fg_visual_fg . s:bg_visual_bg 1173 | exec 'hi Directory' . s:fg_blue 1174 | exec 'hi ModeMsg' . s:fg_olive 1175 | exec 'hi MoreMsg' . s:fg_olive 1176 | exec 'hi Question' . s:fg_olive 1177 | exec 'hi WarningMsg' . s:fg_pink 1178 | exec 'hi MatchParen' . s:fg_matchparen_fg . s:bg_matchparen_bg 1179 | exec 'hi Folded' . s:fg_folded_fg . s:bg_folded_bg 1180 | exec 'hi WildMenu' . s:fg_wildmenu_fg . s:bg_wildmenu_bg . s:ft_bold 1181 | 1182 | if version >= 700 1183 | exec 'hi CursorLine' . s:bg_cursorline . s:ft_none 1184 | if s:mode == s:MODE_16_COLOR 1185 | exec 'hi CursorLineNr' . s:fg_cursorlinenr_fg . s:bg_cursorlinenr_bg 1186 | else 1187 | exec 'hi CursorLineNr' . s:fg_cursorlinenr_fg . s:bg_cursorlinenr_bg . s:ft_none 1188 | endif 1189 | exec 'hi CursorColumn' . s:bg_cursorcolumn . s:ft_none 1190 | exec 'hi PMenu' . s:fg_popupmenu_fg . s:bg_popupmenu_bg . s:ft_none 1191 | exec 'hi PMenuSel' . s:fg_popupmenu_fg . s:bg_popupmenu_bg . s:ft_reverse 1192 | if s:themeOpt_transparent_background 1193 | exec 'hi SignColumn' . s:fg_green . s:ft_none 1194 | else 1195 | exec 'hi SignColumn' . s:fg_green . s:bg_background . s:ft_none 1196 | endif 1197 | end 1198 | if version >= 703 1199 | exec 'hi ColorColumn' . s:bg_cursorcolumn . s:ft_none 1200 | end 1201 | 1202 | exec 'hi TabLine' . s:fg_tabline_inactive_fg . s:bg_tabline_inactive_bg . s:ft_none 1203 | exec 'hi TabLineFill' . s:fg_tabline_bg . s:bg_tabline_bg . s:ft_none 1204 | exec 'hi TabLineSel' . s:fg_tabline_active_fg . s:bg_tabline_active_bg . s:ft_none 1205 | 1206 | exec 'hi BufTabLineCurrent' . s:fg_buftabline_current_fg . s:bg_buftabline_current_bg . s:ft_none 1207 | exec 'hi BufTabLineActive' . s:fg_buftabline_active_fg . s:bg_buftabline_active_bg . s:ft_none 1208 | exec 'hi BufTabLineHidden' . s:fg_buftabline_inactive_fg . s:bg_buftabline_inactive_bg . s:ft_none 1209 | exec 'hi BufTabLineFill' . s:bg_buftabline_bg . s:ft_none 1210 | 1211 | " Standard Group Highlighting: 1212 | exec 'hi Comment' . s:fg_comment . s:ft_italic 1213 | 1214 | exec 'hi Constant' . s:fg_orange 1215 | exec 'hi String' . s:fg_olive 1216 | exec 'hi Character' . s:fg_olive 1217 | exec 'hi Number' . s:fg_orange 1218 | exec 'hi Boolean' . s:fg_green . s:ft_bold 1219 | exec 'hi Float' . s:fg_orange 1220 | 1221 | exec 'hi Identifier' . s:fg_navy 1222 | exec 'hi Function' . s:fg_foreground 1223 | 1224 | exec 'hi Statement' . s:fg_pink . s:ft_none 1225 | exec 'hi Conditional' . s:fg_purple . s:ft_bold 1226 | exec 'hi Repeat' . s:fg_purple . s:ft_bold 1227 | exec 'hi Label' . s:fg_blue 1228 | exec 'hi Operator' . s:fg_aqua . s:ft_none 1229 | exec 'hi Keyword' . s:fg_blue 1230 | exec 'hi Exception' . s:fg_red 1231 | 1232 | exec 'hi PreProc' . s:fg_blue 1233 | exec 'hi Include' . s:fg_red 1234 | exec 'hi Define' . s:fg_blue 1235 | exec 'hi Macro' . s:fg_blue 1236 | exec 'hi PreCondit' . s:fg_aqua 1237 | 1238 | exec 'hi Type' . s:fg_pink . s:ft_bold 1239 | exec 'hi StorageClass' . s:fg_navy . s:ft_bold 1240 | exec 'hi Structure' . s:fg_blue . s:ft_bold 1241 | exec 'hi Typedef' . s:fg_pink . s:ft_bold 1242 | 1243 | exec 'hi Special' . s:fg_foreground 1244 | exec 'hi SpecialChar' . s:fg_foreground 1245 | exec 'hi Tag' . s:fg_green 1246 | exec 'hi Delimiter' . s:fg_aqua 1247 | exec 'hi SpecialComment' . s:fg_comment . s:ft_bold 1248 | exec 'hi Debug' . s:fg_orange 1249 | 1250 | exec 'hi Error' . s:fg_error_fg . s:bg_error_bg 1251 | exec 'hi Todo' . s:fg_todo_fg . s:bg_todo_bg . s:ft_bold 1252 | 1253 | exec 'hi Title' . s:fg_comment 1254 | exec 'hi Global' . s:fg_blue 1255 | 1256 | " Neovim (LSP) diagnostics 1257 | if has('nvim') 1258 | exec 'hi LspDiagnosticsDefaultError' . s:fg_error_fg . s:bg_error_bg 1259 | exec 'hi LspDiagnosticsDefaultWarning' . s:fg_todo_fg . s:bg_todo_bg . s:ft_bold 1260 | exec 'hi LspDiagnosticsDefaultInformation' . s:fg_todo_fg . s:bg_todo_bg . s:ft_bold 1261 | exec 'hi LspDiagnosticsDefaultHint' . s:fg_todo_fg . s:bg_todo_bg . s:ft_bold 1262 | 1263 | exec 'hi LspDiagnosticsUnderlineError cterm=undercurl gui=undercurl' . s:sp_error_fg 1264 | exec 'hi LspDiagnosticsUnderlineWarning cterm=undercurl gui=undercurl' . s:sp_todo_fg 1265 | exec 'hi LspDiagnosticsUnderlineInformation cterm=undercurl gui=undercurl' . s:sp_todo_fg 1266 | exec 'hi LspDiagnosticsUnderlineHint cterm=undercurl gui=undercurl' . s:sp_todo_fg 1267 | 1268 | hi! link DiagnosticError LspDiagnosticsDefaultError 1269 | hi! link DiagnosticWarn LspDiagnosticsDefaultWarning 1270 | hi! link DiagnosticInfo LspDiagnosticsDefaultInformation 1271 | hi! link DiagnosticHint LspDiagnosticsDefaultHint 1272 | 1273 | hi! link DiagnosticUnderlineError LspDiagnosticsUnderlineError 1274 | hi! link DiagnosticUnderlineWarn LspDiagnosticsUnderlineWarning 1275 | hi! link DiagnosticUnderlineInfo LspDiagnosticsUnderlineInformation 1276 | hi! link DiagnosticUnderlineHint LspDiagnosticsUnderlineHint 1277 | 1278 | endif 1279 | 1280 | " Extension {{{ 1281 | " VimL Highlighting 1282 | exec 'hi vimCommand' . s:fg_pink 1283 | exec 'hi vimVar' . s:fg_navy 1284 | exec 'hi vimFuncKey' . s:fg_pink 1285 | exec 'hi vimFunction' . s:fg_blue . s:ft_bold 1286 | exec 'hi vimNotFunc' . s:fg_pink 1287 | exec 'hi vimMap' . s:fg_red 1288 | exec 'hi vimAutoEvent' . s:fg_aqua . s:ft_bold 1289 | exec 'hi vimMapModKey' . s:fg_aqua 1290 | exec 'hi vimFuncName' . s:fg_purple 1291 | exec 'hi vimIsCommand' . s:fg_foreground 1292 | exec 'hi vimFuncVar' . s:fg_aqua 1293 | exec 'hi vimLet' . s:fg_red 1294 | exec 'hi vimContinue' . s:fg_aqua 1295 | exec 'hi vimMapRhsExtend' . s:fg_foreground 1296 | exec 'hi vimCommentTitle' . s:fg_comment . s:ft_italic_bold 1297 | exec 'hi vimBracket' . s:fg_aqua 1298 | exec 'hi vimParenSep' . s:fg_aqua 1299 | exec 'hi vimNotation' . s:fg_aqua 1300 | exec 'hi vimOper' . s:fg_foreground 1301 | exec 'hi vimOperParen' . s:fg_foreground 1302 | exec 'hi vimSynType' . s:fg_purple 1303 | exec 'hi vimSynReg' . s:fg_pink . s:ft_none 1304 | exec 'hi vimSynRegion' . s:fg_foreground 1305 | exec 'hi vimSynMtchGrp' . s:fg_pink 1306 | exec 'hi vimSynNextgroup' . s:fg_pink 1307 | exec 'hi vimSynKeyRegion' . s:fg_green 1308 | exec 'hi vimSynRegOpt' . s:fg_blue 1309 | exec 'hi vimSynMtchOpt' . s:fg_blue 1310 | exec 'hi vimSynContains' . s:fg_pink 1311 | exec 'hi vimGroupName' . s:fg_foreground 1312 | exec 'hi vimGroupList' . s:fg_foreground 1313 | exec 'hi vimHiGroup' . s:fg_foreground 1314 | exec 'hi vimGroup' . s:fg_navy . s:ft_bold 1315 | exec 'hi vimOnlyOption' . s:fg_blue 1316 | 1317 | " Makefile Highlighting 1318 | exec 'hi makeIdent' . s:fg_blue 1319 | exec 'hi makeSpecTarget' . s:fg_olive 1320 | exec 'hi makeTarget' . s:fg_red 1321 | exec 'hi makeStatement' . s:fg_aqua . s:ft_bold 1322 | exec 'hi makeCommands' . s:fg_foreground 1323 | exec 'hi makeSpecial' . s:fg_orange . s:ft_bold 1324 | 1325 | " CMake Highlighting (Builtin) 1326 | exec 'hi cmakeStatement' . s:fg_blue 1327 | exec 'hi cmakeArguments' . s:fg_foreground 1328 | exec 'hi cmakeVariableValue' . s:fg_pink 1329 | 1330 | " CMake Highlighting (Plugin: https://github.com/pboettch/vim-cmake-syntax) 1331 | exec 'hi cmakeCommand' . s:fg_blue 1332 | exec 'hi cmakeCommandConditional' . s:fg_purple . s:ft_bold 1333 | exec 'hi cmakeKWset' . s:fg_orange 1334 | exec 'hi cmakeKWvariable_watch' . s:fg_orange 1335 | exec 'hi cmakeKWif' . s:fg_orange 1336 | exec 'hi cmakeArguments' . s:fg_foreground 1337 | exec 'hi cmakeKWproject' . s:fg_pink 1338 | exec 'hi cmakeGeneratorExpressions' . s:fg_orange 1339 | exec 'hi cmakeGeneratorExpression' . s:fg_aqua 1340 | exec 'hi cmakeVariable' . s:fg_pink 1341 | exec 'hi cmakeProperty' . s:fg_aqua 1342 | exec 'hi cmakeKWforeach' . s:fg_aqua 1343 | exec 'hi cmakeKWunset' . s:fg_aqua 1344 | exec 'hi cmakeKWmacro' . s:fg_aqua 1345 | exec 'hi cmakeKWget_property' . s:fg_aqua 1346 | exec 'hi cmakeKWset_tests_properties' . s:fg_aqua 1347 | exec 'hi cmakeKWmessage' . s:fg_aqua 1348 | exec 'hi cmakeKWinstall_targets' . s:fg_orange 1349 | exec 'hi cmakeKWsource_group' . s:fg_orange 1350 | exec 'hi cmakeKWfind_package' . s:fg_aqua 1351 | exec 'hi cmakeKWstring' . s:fg_olive 1352 | exec 'hi cmakeKWinstall' . s:fg_aqua 1353 | exec 'hi cmakeKWtarget_sources' . s:fg_orange 1354 | 1355 | " C Highlighting 1356 | exec 'hi cType' . s:fg_pink . s:ft_bold 1357 | exec 'hi cFormat' . s:fg_olive 1358 | exec 'hi cStorageClass' . s:fg_navy . s:ft_bold 1359 | 1360 | exec 'hi cBoolean' . s:fg_green . s:ft_bold 1361 | exec 'hi cCharacter' . s:fg_olive 1362 | exec 'hi cConstant' . s:fg_green . s:ft_bold 1363 | exec 'hi cConditional' . s:fg_purple . s:ft_bold 1364 | exec 'hi cSpecial' . s:fg_olive . s:ft_bold 1365 | exec 'hi cDefine' . s:fg_blue 1366 | exec 'hi cNumber' . s:fg_orange 1367 | exec 'hi cPreCondit' . s:fg_aqua 1368 | exec 'hi cRepeat' . s:fg_purple . s:ft_bold 1369 | exec 'hi cLabel' . s:fg_aqua 1370 | " exec 'hi cAnsiFunction' . s:fg_aqua . s:ft_bold 1371 | " exec 'hi cAnsiName' . s:fg_pink 1372 | exec 'hi cDelimiter' . s:fg_blue 1373 | " exec 'hi cBraces' . s:fg_foreground 1374 | " exec 'hi cIdentifier' . s:fg_blue . s:bg_pink 1375 | " exec 'hi cSemiColon' . s:bg_blue 1376 | exec 'hi cOperator' . s:fg_aqua 1377 | " exec 'hi cStatement' . s:fg_pink 1378 | " exec 'hi cTodo' . s:fg_comment . s:ft_bold 1379 | " exec 'hi cStructure' . s:fg_blue . s:ft_bold 1380 | exec 'hi cCustomParen' . s:fg_foreground 1381 | " exec 'hi cCustomFunc' . s:fg_foreground 1382 | " exec 'hi cUserFunction' . s:fg_blue . s:ft_bold 1383 | exec 'hi cOctalZero' . s:fg_purple . s:ft_bold 1384 | if s:langOpt_c__highlight_builtins == 1 1385 | exec 'hi cFunction' . s:fg_blue 1386 | else 1387 | exec 'hi cFunction' . s:fg_foreground 1388 | endif 1389 | 1390 | " CPP highlighting 1391 | exec 'hi cppBoolean' . s:fg_green . s:ft_bold 1392 | exec 'hi cppSTLnamespace' . s:fg_purple 1393 | exec 'hi cppSTLexception' . s:fg_pink 1394 | exec 'hi cppSTLfunctional' . s:fg_foreground . s:ft_bold 1395 | exec 'hi cppSTLiterator' . s:fg_foreground . s:ft_bold 1396 | exec 'hi cppExceptions' . s:fg_red 1397 | exec 'hi cppStatement' . s:fg_blue 1398 | exec 'hi cppStorageClass' . s:fg_navy . s:ft_bold 1399 | exec 'hi cppAccess' . s:fg_orange . s:ft_bold 1400 | if s:langOpt_cpp__highlight_standard_library == 1 1401 | exec 'hi cppSTLconstant' . s:fg_green . s:ft_bold 1402 | exec 'hi cppSTLtype' . s:fg_pink . s:ft_bold 1403 | exec 'hi cppSTLfunction' . s:fg_blue 1404 | exec 'hi cppSTLios' . s:fg_olive . s:ft_bold 1405 | else 1406 | exec 'hi cppSTLconstant' . s:fg_foreground 1407 | exec 'hi cppSTLtype' . s:fg_foreground 1408 | exec 'hi cppSTLfunction' . s:fg_foreground 1409 | exec 'hi cppSTLios' . s:fg_foreground 1410 | endif 1411 | " exec 'hi cppSTL' . s:fg_blue 1412 | 1413 | " Rust highlighting 1414 | exec 'hi rustKeyword' . s:fg_pink 1415 | exec 'hi rustModPath' . s:fg_blue 1416 | exec 'hi rustModPathSep' . s:fg_blue 1417 | exec 'hi rustLifetime' . s:fg_purple 1418 | exec 'hi rustStructure' . s:fg_aqua . s:ft_bold 1419 | exec 'hi rustAttribute' . s:fg_aqua . s:ft_bold 1420 | exec 'hi rustPanic' . s:fg_olive . s:ft_bold 1421 | exec 'hi rustTrait' . s:fg_blue . s:ft_bold 1422 | exec 'hi rustEnum' . s:fg_green . s:ft_bold 1423 | exec 'hi rustEnumVariant' . s:fg_green 1424 | exec 'hi rustSelf' . s:fg_orange 1425 | exec 'hi rustSigil' . s:fg_aqua . s:ft_bold 1426 | exec 'hi rustOperator' . s:fg_aqua . s:ft_bold 1427 | exec 'hi rustMacro' . s:fg_olive . s:ft_bold 1428 | exec 'hi rustMacroVariable' . s:fg_olive 1429 | exec 'hi rustAssert' . s:fg_olive . s:ft_bold 1430 | exec 'hi rustConditional' . s:fg_purple . s:ft_bold 1431 | 1432 | " Lex highlighting 1433 | exec 'hi lexCFunctions' . s:fg_foreground 1434 | exec 'hi lexAbbrv' . s:fg_purple 1435 | exec 'hi lexAbbrvRegExp' . s:fg_aqua 1436 | exec 'hi lexAbbrvComment' . s:fg_comment 1437 | exec 'hi lexBrace' . s:fg_navy 1438 | exec 'hi lexPat' . s:fg_aqua 1439 | exec 'hi lexPatComment' . s:fg_comment 1440 | exec 'hi lexPatTag' . s:fg_orange 1441 | " exec 'hi lexPatBlock' . s:fg_foreground . s:ft_bold 1442 | exec 'hi lexSlashQuote' . s:fg_foreground 1443 | exec 'hi lexSep' . s:fg_foreground 1444 | exec 'hi lexStartState' . s:fg_orange 1445 | exec 'hi lexPatTagZone' . s:fg_olive . s:ft_bold 1446 | exec 'hi lexMorePat' . s:fg_olive . s:ft_bold 1447 | exec 'hi lexOptions' . s:fg_olive . s:ft_bold 1448 | exec 'hi lexPatString' . s:fg_olive 1449 | 1450 | " Yacc highlighting 1451 | exec 'hi yaccNonterminal' . s:fg_navy 1452 | exec 'hi yaccDelim' . s:fg_orange 1453 | exec 'hi yaccInitKey' . s:fg_aqua 1454 | exec 'hi yaccInit' . s:fg_navy 1455 | exec 'hi yaccKey' . s:fg_purple 1456 | exec 'hi yaccVar' . s:fg_aqua 1457 | 1458 | " NASM highlighting 1459 | exec 'hi nasmStdInstruction' . s:fg_navy 1460 | exec 'hi nasmGen08Register' . s:fg_aqua 1461 | exec 'hi nasmGen16Register' . s:fg_aqua 1462 | exec 'hi nasmGen32Register' . s:fg_aqua 1463 | exec 'hi nasmGen64Register' . s:fg_aqua 1464 | exec 'hi nasmHexNumber' . s:fg_purple 1465 | exec 'hi nasmStorage' . s:fg_aqua . s:ft_bold 1466 | exec 'hi nasmLabel' . s:fg_pink 1467 | exec 'hi nasmDirective' . s:fg_blue . s:ft_bold 1468 | exec 'hi nasmLocalLabel' . s:fg_orange 1469 | 1470 | " GAS highlighting 1471 | exec 'hi gasSymbol' . s:fg_pink 1472 | exec 'hi gasDirective' . s:fg_blue . s:ft_bold 1473 | exec 'hi gasOpcode_386_Base' . s:fg_navy 1474 | exec 'hi gasDecimalNumber' . s:fg_purple 1475 | exec 'hi gasSymbolRef' . s:fg_pink 1476 | exec 'hi gasRegisterX86' . s:fg_blue 1477 | exec 'hi gasOpcode_P6_Base' . s:fg_navy 1478 | exec 'hi gasDirectiveStore' . s:fg_foreground . s:ft_bold 1479 | 1480 | " MIPS highlighting 1481 | exec 'hi mipsInstruction' . s:fg_pink 1482 | exec 'hi mipsRegister' . s:fg_navy 1483 | exec 'hi mipsLabel' . s:fg_aqua . s:ft_bold 1484 | exec 'hi mipsDirective' . s:fg_purple . s:ft_bold 1485 | 1486 | " Shell/Bash highlighting 1487 | exec 'hi bashStatement' . s:fg_foreground . s:ft_bold 1488 | exec 'hi shDerefVar' . s:fg_aqua . s:ft_bold 1489 | exec 'hi shDerefSimple' . s:fg_aqua 1490 | exec 'hi shFunction' . s:fg_orange . s:ft_bold 1491 | exec 'hi shStatement' . s:fg_foreground 1492 | exec 'hi shLoop' . s:fg_purple . s:ft_bold 1493 | exec 'hi shQuote' . s:fg_olive 1494 | exec 'hi shCaseEsac' . s:fg_aqua . s:ft_bold 1495 | exec 'hi shSnglCase' . s:fg_purple . s:ft_none 1496 | exec 'hi shFunctionOne' . s:fg_navy 1497 | exec 'hi shCase' . s:fg_navy 1498 | exec 'hi shSetList' . s:fg_navy 1499 | " @see Dockerfile Highlighting section for more sh* 1500 | 1501 | " PowerShell Highlighting 1502 | exec 'hi ps1Type' . s:fg_green . s:ft_bold 1503 | exec 'hi ps1Variable' . s:fg_navy 1504 | exec 'hi ps1Boolean' . s:fg_navy . s:ft_bold 1505 | exec 'hi ps1FunctionInvocation' . s:fg_pink 1506 | exec 'hi ps1FunctionDeclaration' . s:fg_pink 1507 | exec 'hi ps1Keyword' . s:fg_blue . s:ft_bold 1508 | exec 'hi ps1Exception' . s:fg_red 1509 | exec 'hi ps1Operator' . s:fg_aqua . s:ft_bold 1510 | exec 'hi ps1CommentDoc' . s:fg_purple 1511 | exec 'hi ps1CDocParam' . s:fg_orange 1512 | 1513 | " HTML Highlighting 1514 | exec 'hi htmlTitle' . s:fg_green . s:ft_bold 1515 | exec 'hi htmlH1' . s:fg_green . s:ft_bold 1516 | exec 'hi htmlH2' . s:fg_aqua . s:ft_bold 1517 | exec 'hi htmlH3' . s:fg_purple . s:ft_bold 1518 | exec 'hi htmlH4' . s:fg_orange . s:ft_bold 1519 | exec 'hi htmlTag' . s:fg_comment 1520 | exec 'hi htmlTagName' . s:fg_wine 1521 | exec 'hi htmlArg' . s:fg_pink 1522 | exec 'hi htmlEndTag' . s:fg_comment 1523 | exec 'hi htmlString' . s:fg_blue 1524 | exec 'hi htmlScriptTag' . s:fg_comment 1525 | exec 'hi htmlBold' . s:fg_foreground . s:ft_bold 1526 | exec 'hi htmlItalic' . s:fg_comment . s:ft_italic 1527 | exec 'hi htmlBoldItalic' . s:fg_navy . s:ft_italic_bold 1528 | " exec 'hi htmlLink' . s:fg_blue . s:ft_bold 1529 | exec 'hi htmlTagN' . s:fg_wine . s:ft_bold 1530 | exec 'hi htmlSpecialTagName' . s:fg_wine 1531 | exec 'hi htmlComment' . s:fg_comment . s:ft_italic 1532 | exec 'hi htmlCommentPart' . s:fg_comment . s:ft_italic 1533 | 1534 | " CSS Highlighting 1535 | exec 'hi cssIdentifier' . s:fg_pink 1536 | exec 'hi cssPositioningProp' . s:fg_foreground 1537 | exec 'hi cssNoise' . s:fg_foreground 1538 | exec 'hi cssBoxProp' . s:fg_foreground 1539 | exec 'hi cssTableAttr' . s:fg_purple 1540 | exec 'hi cssPositioningAttr' . s:fg_navy 1541 | exec 'hi cssValueLength' . s:fg_orange 1542 | exec 'hi cssFunctionName' . s:fg_blue 1543 | exec 'hi cssUnitDecorators' . s:fg_aqua 1544 | exec 'hi cssColor' . s:fg_blue . s:ft_bold 1545 | exec 'hi cssBraces' . s:fg_pink 1546 | exec 'hi cssBackgroundProp' . s:fg_foreground 1547 | exec 'hi cssTextProp' . s:fg_foreground 1548 | exec 'hi cssDimensionProp' . s:fg_foreground 1549 | exec 'hi cssClassName' . s:fg_pink 1550 | 1551 | " Markdown Highlighting 1552 | exec 'hi markdownHeadingRule' . s:fg_pink . s:ft_bold 1553 | exec 'hi markdownH1' . s:fg_pink . s:ft_bold 1554 | exec 'hi markdownH2' . s:fg_orange . s:ft_bold 1555 | exec 'hi markdownBlockquote' . s:fg_pink 1556 | exec 'hi markdownCodeBlock' . s:fg_olive 1557 | exec 'hi markdownCode' . s:fg_olive 1558 | exec 'hi markdownLink' . s:fg_blue . s:ft_bold 1559 | exec 'hi markdownUrl' . s:fg_blue 1560 | exec 'hi markdownLinkText' . s:fg_pink 1561 | exec 'hi markdownLinkTextDelimiter' . s:fg_purple 1562 | exec 'hi markdownLinkDelimiter' . s:fg_purple 1563 | exec 'hi markdownCodeDelimiter' . s:fg_blue 1564 | 1565 | exec 'hi mkdCode' . s:fg_olive 1566 | exec 'hi mkdLink' . s:fg_blue . s:ft_bold 1567 | exec 'hi mkdURL' . s:fg_comment 1568 | exec 'hi mkdString' . s:fg_foreground 1569 | exec 'hi mkdBlockQuote' . s:fg_pink 1570 | exec 'hi mkdLinkTitle' . s:fg_pink 1571 | exec 'hi mkdDelimiter' . s:fg_aqua 1572 | exec 'hi mkdRule' . s:fg_pink 1573 | 1574 | " reStructuredText Highlighting 1575 | exec 'hi rstSections' . s:fg_pink . s:ft_bold 1576 | exec 'hi rstDelimiter' . s:fg_pink . s:ft_bold 1577 | exec 'hi rstExplicitMarkup' . s:fg_pink . s:ft_bold 1578 | exec 'hi rstDirective' . s:fg_blue 1579 | exec 'hi rstHyperlinkTarget' . s:fg_green 1580 | exec 'hi rstExDirective' . s:fg_foreground 1581 | exec 'hi rstInlineLiteral' . s:fg_olive 1582 | exec 'hi rstInterpretedTextOrHyperlinkReference' . s:fg_blue 1583 | 1584 | " Python Highlighting 1585 | exec 'hi pythonImport' . s:fg_pink . s:ft_bold 1586 | exec 'hi pythonExceptions' . s:fg_red 1587 | exec 'hi pythonException' . s:fg_purple . s:ft_bold 1588 | exec 'hi pythonInclude' . s:fg_red 1589 | exec 'hi pythonStatement' . s:fg_pink 1590 | exec 'hi pythonConditional' . s:fg_purple . s:ft_bold 1591 | exec 'hi pythonRepeat' . s:fg_purple . s:ft_bold 1592 | exec 'hi pythonFunction' . s:fg_aqua . s:ft_bold 1593 | exec 'hi pythonPreCondit' . s:fg_purple 1594 | exec 'hi pythonExClass' . s:fg_orange 1595 | exec 'hi pythonOperator' . s:fg_purple . s:ft_bold 1596 | exec 'hi pythonBuiltin' . s:fg_foreground 1597 | exec 'hi pythonDecorator' . s:fg_orange 1598 | 1599 | exec 'hi pythonString' . s:fg_olive 1600 | exec 'hi pythonEscape' . s:fg_olive . s:ft_bold 1601 | exec 'hi pythonStrFormatting' . s:fg_olive . s:ft_bold 1602 | 1603 | exec 'hi pythonBoolean' . s:fg_green . s:ft_bold 1604 | exec 'hi pythonBytesEscape' . s:fg_olive . s:ft_bold 1605 | exec 'hi pythonDottedName' . s:fg_purple 1606 | exec 'hi pythonStrFormat' . s:fg_foreground 1607 | 1608 | if s:langOpt_python__highlight_builtins == 1 1609 | exec 'hi pythonBuiltinFunc' . s:fg_blue 1610 | exec 'hi pythonBuiltinObj' . s:fg_red 1611 | else 1612 | exec 'hi pythonBuiltinFunc' . s:fg_foreground 1613 | exec 'hi pythonBuiltinObj' . s:fg_foreground 1614 | endif 1615 | 1616 | " Java Highlighting 1617 | exec 'hi javaExternal' . s:fg_pink 1618 | exec 'hi javaAnnotation' . s:fg_orange 1619 | exec 'hi javaTypedef' . s:fg_aqua 1620 | exec 'hi javaClassDecl' . s:fg_aqua . s:ft_bold 1621 | exec 'hi javaScopeDecl' . s:fg_blue . s:ft_bold 1622 | exec 'hi javaStorageClass' . s:fg_navy . s:ft_bold 1623 | exec 'hi javaBoolean' . s:fg_green . s:ft_bold 1624 | exec 'hi javaConstant' . s:fg_blue 1625 | exec 'hi javaCommentTitle' . s:fg_wine 1626 | exec 'hi javaDocTags' . s:fg_aqua 1627 | exec 'hi javaDocComment' . s:fg_comment 1628 | exec 'hi javaDocParam' . s:fg_foreground 1629 | exec 'hi javaStatement' . s:fg_pink 1630 | 1631 | " JavaScript Highlighting 1632 | exec 'hi javaScriptBraces' . s:fg_blue 1633 | exec 'hi javaScriptParens' . s:fg_blue 1634 | exec 'hi javaScriptIdentifier' . s:fg_pink 1635 | exec 'hi javaScriptFunction' . s:fg_blue . s:ft_bold 1636 | exec 'hi javaScriptConditional' . s:fg_purple . s:ft_bold 1637 | exec 'hi javaScriptRepeat' . s:fg_purple . s:ft_bold 1638 | exec 'hi javaScriptBoolean' . s:fg_green . s:ft_bold 1639 | exec 'hi javaScriptNumber' . s:fg_orange 1640 | exec 'hi javaScriptMember' . s:fg_navy 1641 | exec 'hi javaScriptReserved' . s:fg_navy 1642 | exec 'hi javascriptNull' . s:fg_comment . s:ft_bold 1643 | exec 'hi javascriptGlobal' . s:fg_foreground 1644 | exec 'hi javascriptStatement' . s:fg_pink 1645 | exec 'hi javaScriptMessage' . s:fg_foreground 1646 | exec 'hi javaScriptMember' . s:fg_foreground 1647 | 1648 | " TypeScript Highlighting 1649 | exec 'hi typescriptDecorators' . s:fg_orange 1650 | exec 'hi typescriptLabel' . s:fg_purple . s:ft_bold 1651 | 1652 | " @target https://github.com/pangloss/vim-javascript 1653 | exec 'hi jsImport' . s:fg_pink . s:ft_bold 1654 | exec 'hi jsExport' . s:fg_pink . s:ft_bold 1655 | exec 'hi jsModuleAs' . s:fg_pink . s:ft_bold 1656 | exec 'hi jsFrom' . s:fg_pink . s:ft_bold 1657 | exec 'hi jsExportDefault' . s:fg_pink . s:ft_bold 1658 | exec 'hi jsFuncParens' . s:fg_blue 1659 | exec 'hi jsFuncBraces' . s:fg_blue 1660 | exec 'hi jsParens' . s:fg_blue 1661 | exec 'hi jsBraces' . s:fg_blue 1662 | exec 'hi jsNoise' . s:fg_blue 1663 | 1664 | " Jsx Highlighting 1665 | " @target https://github.com/MaxMEllon/vim-jsx-pretty 1666 | exec 'hi jsxTagName' . s:fg_wine 1667 | exec 'hi jsxComponentName' . s:fg_wine 1668 | exec 'hi jsxAttrib' . s:fg_pink 1669 | exec 'hi jsxEqual' . s:fg_comment 1670 | exec 'hi jsxString' . s:fg_blue 1671 | exec 'hi jsxCloseTag' . s:fg_comment 1672 | exec 'hi jsxCloseString' . s:fg_comment 1673 | exec 'hi jsxDot' . s:fg_wine 1674 | exec 'hi jsxNamespace' . s:fg_wine 1675 | exec 'hi jsxPunct' . s:fg_comment 1676 | 1677 | " Json Highlighting 1678 | " @target https://github.com/elzr/vim-json 1679 | exec 'hi jsonKeyword' . s:fg_blue 1680 | exec 'hi jsonString' . s:fg_olive 1681 | exec 'hi jsonQuote' . s:fg_comment 1682 | exec 'hi jsonNoise' . s:fg_foreground 1683 | exec 'hi jsonKeywordMatch' . s:fg_foreground 1684 | exec 'hi jsonBraces' . s:fg_foreground 1685 | exec 'hi jsonNumber' . s:fg_orange 1686 | exec 'hi jsonNull' . s:fg_purple . s:ft_bold 1687 | exec 'hi jsonBoolean' . s:fg_green . s:ft_bold 1688 | exec 'hi jsonCommentError' . s:fg_pink . s:bg_background 1689 | 1690 | " Go Highlighting 1691 | exec 'hi goDirective' . s:fg_red 1692 | exec 'hi goDeclaration' . s:fg_blue . s:ft_bold 1693 | exec 'hi goStatement' . s:fg_pink 1694 | exec 'hi goConditional' . s:fg_purple . s:ft_bold 1695 | exec 'hi goConstants' . s:fg_orange 1696 | exec 'hi goFunction' . s:fg_orange 1697 | " exec 'hi goTodo' . s:fg_comment . s:ft_bold 1698 | exec 'hi goDeclType' . s:fg_blue 1699 | exec 'hi goBuiltins' . s:fg_purple 1700 | 1701 | " Systemtap Highlighting 1702 | " exec 'hi stapBlock' . s:fg_comment . s:ft_none 1703 | exec 'hi stapComment' . s:fg_comment . s:ft_none 1704 | exec 'hi stapProbe' . s:fg_aqua . s:ft_bold 1705 | exec 'hi stapStat' . s:fg_navy . s:ft_bold 1706 | exec 'hi stapFunc' . s:fg_foreground 1707 | exec 'hi stapString' . s:fg_olive 1708 | exec 'hi stapTarget' . s:fg_navy 1709 | exec 'hi stapStatement' . s:fg_pink 1710 | exec 'hi stapType' . s:fg_pink . s:ft_bold 1711 | exec 'hi stapSharpBang' . s:fg_comment 1712 | exec 'hi stapDeclaration' . s:fg_pink 1713 | exec 'hi stapCMacro' . s:fg_blue 1714 | 1715 | " DTrace Highlighting 1716 | exec 'hi dtraceProbe' . s:fg_blue 1717 | exec 'hi dtracePredicate' . s:fg_purple . s:ft_bold 1718 | exec 'hi dtraceComment' . s:fg_comment 1719 | exec 'hi dtraceFunction' . s:fg_foreground 1720 | exec 'hi dtraceAggregatingFunction' . s:fg_blue . s:ft_bold 1721 | exec 'hi dtraceStatement' . s:fg_navy . s:ft_bold 1722 | exec 'hi dtraceIdentifier' . s:fg_pink 1723 | exec 'hi dtraceOption' . s:fg_pink 1724 | exec 'hi dtraceConstant' . s:fg_orange 1725 | exec 'hi dtraceType' . s:fg_pink . s:ft_bold 1726 | 1727 | " PlantUML Highlighting 1728 | exec 'hi plantumlPreProc' . s:fg_orange . s:ft_bold 1729 | exec 'hi plantumlDirectedOrVerticalArrowRL' . s:fg_pink 1730 | exec 'hi plantumlDirectedOrVerticalArrowLR' . s:fg_pink 1731 | exec 'hi plantumlString' . s:fg_olive 1732 | exec 'hi plantumlActivityThing' . s:fg_purple 1733 | exec 'hi plantumlText' . s:fg_navy 1734 | exec 'hi plantumlClassPublic' . s:fg_olive . s:ft_bold 1735 | exec 'hi plantumlClassPrivate' . s:fg_red 1736 | exec 'hi plantumlColonLine' . s:fg_orange 1737 | exec 'hi plantumlClass' . s:fg_navy 1738 | exec 'hi plantumlHorizontalArrow' . s:fg_pink 1739 | exec 'hi plantumlTypeKeyword' . s:fg_blue . s:ft_bold 1740 | exec 'hi plantumlKeyword' . s:fg_pink . s:ft_bold 1741 | 1742 | exec 'hi plantumlType' . s:fg_blue . s:ft_bold 1743 | exec 'hi plantumlBlock' . s:fg_pink . s:ft_bold 1744 | exec 'hi plantumlPreposition' . s:fg_orange 1745 | exec 'hi plantumlLayout' . s:fg_blue . s:ft_bold 1746 | exec 'hi plantumlNote' . s:fg_orange 1747 | exec 'hi plantumlLifecycle' . s:fg_aqua 1748 | exec 'hi plantumlParticipant' . s:fg_foreground . s:ft_bold 1749 | 1750 | 1751 | " Haskell Highlighting 1752 | if s:langOpt_haskell__no_bold_types == 1 1753 | exec 'hi haskellType' . s:fg_aqua 1754 | else 1755 | exec 'hi haskellType' . s:fg_aqua . s:ft_bold 1756 | endif 1757 | exec 'hi haskellIdentifier' . s:fg_orange . s:ft_bold 1758 | exec 'hi haskellOperators' . s:fg_pink 1759 | exec 'hi haskellWhere' . s:fg_foreground . s:ft_bold 1760 | exec 'hi haskellDelimiter' . s:fg_aqua 1761 | exec 'hi haskellImportKeywords' . s:fg_pink 1762 | exec 'hi haskellStatement' . s:fg_purple . s:ft_bold 1763 | 1764 | 1765 | " SQL/MySQL Highlighting 1766 | exec 'hi sqlStatement' . s:fg_pink . s:ft_bold 1767 | exec 'hi sqlType' . s:fg_blue . s:ft_bold 1768 | exec 'hi sqlKeyword' . s:fg_pink 1769 | exec 'hi sqlOperator' . s:fg_aqua 1770 | exec 'hi sqlSpecial' . s:fg_green . s:ft_bold 1771 | 1772 | exec 'hi mysqlVariable' . s:fg_olive . s:ft_bold 1773 | exec 'hi mysqlType' . s:fg_blue . s:ft_bold 1774 | exec 'hi mysqlKeyword' . s:fg_pink 1775 | exec 'hi mysqlOperator' . s:fg_aqua 1776 | exec 'hi mysqlSpecial' . s:fg_green . s:ft_bold 1777 | 1778 | 1779 | " Octave/MATLAB Highlighting 1780 | exec 'hi octaveVariable' . s:fg_foreground 1781 | exec 'hi octaveDelimiter' . s:fg_pink 1782 | exec 'hi octaveQueryVar' . s:fg_foreground 1783 | exec 'hi octaveSemicolon' . s:fg_purple 1784 | exec 'hi octaveFunction' . s:fg_navy 1785 | exec 'hi octaveSetVar' . s:fg_blue 1786 | exec 'hi octaveUserVar' . s:fg_foreground 1787 | exec 'hi octaveArithmeticOperator' . s:fg_aqua 1788 | exec 'hi octaveBeginKeyword' . s:fg_purple . s:ft_bold 1789 | exec 'hi octaveElseKeyword' . s:fg_purple . s:ft_bold 1790 | exec 'hi octaveEndKeyword' . s:fg_purple . s:ft_bold 1791 | exec 'hi octaveStatement' . s:fg_pink 1792 | 1793 | " Ruby Highlighting 1794 | exec 'hi rubyModule' . s:fg_navy . s:ft_bold 1795 | exec 'hi rubyClass' . s:fg_pink . s:ft_bold 1796 | exec 'hi rubyPseudoVariable' . s:fg_comment . s:ft_bold 1797 | exec 'hi rubyKeyword' . s:fg_pink 1798 | exec 'hi rubyInstanceVariable' . s:fg_purple 1799 | exec 'hi rubyFunction' . s:fg_foreground . s:ft_bold 1800 | exec 'hi rubyDefine' . s:fg_pink 1801 | exec 'hi rubySymbol' . s:fg_aqua 1802 | exec 'hi rubyConstant' . s:fg_blue 1803 | exec 'hi rubyAccess' . s:fg_navy 1804 | exec 'hi rubyAttribute' . s:fg_green 1805 | exec 'hi rubyInclude' . s:fg_red 1806 | exec 'hi rubyLocalVariableOrMethod' . s:fg_orange 1807 | exec 'hi rubyCurlyBlock' . s:fg_foreground 1808 | exec 'hi rubyCurlyBlockDelimiter' . s:fg_aqua 1809 | exec 'hi rubyArrayDelimiter' . s:fg_aqua 1810 | exec 'hi rubyStringDelimiter' . s:fg_olive 1811 | exec 'hi rubyInterpolationDelimiter' . s:fg_orange 1812 | exec 'hi rubyConditional' . s:fg_purple . s:ft_bold 1813 | exec 'hi rubyRepeat' . s:fg_purple . s:ft_bold 1814 | exec 'hi rubyControl' . s:fg_purple . s:ft_bold 1815 | exec 'hi rubyException' . s:fg_purple . s:ft_bold 1816 | exec 'hi rubyExceptional' . s:fg_purple . s:ft_bold 1817 | exec 'hi rubyBoolean' . s:fg_green . s:ft_bold 1818 | 1819 | " Fortran Highlighting 1820 | exec 'hi fortranUnitHeader' . s:fg_blue . s:ft_bold 1821 | exec 'hi fortranIntrinsic' . s:fg_blue . s:bg_background . s:ft_none 1822 | exec 'hi fortranType' . s:fg_pink . s:ft_bold 1823 | exec 'hi fortranTypeOb' . s:fg_pink . s:ft_bold 1824 | exec 'hi fortranStructure' . s:fg_aqua 1825 | exec 'hi fortranStorageClass' . s:fg_navy . s:ft_bold 1826 | exec 'hi fortranStorageClassR' . s:fg_navy . s:ft_bold 1827 | exec 'hi fortranKeyword' . s:fg_pink 1828 | exec 'hi fortranReadWrite' . s:fg_aqua . s:ft_bold 1829 | exec 'hi fortranIO' . s:fg_navy 1830 | exec 'hi fortranOperator' . s:fg_aqua . s:ft_bold 1831 | exec 'hi fortranCall' . s:fg_aqua . s:ft_bold 1832 | exec 'hi fortranContinueMark' . s:fg_green 1833 | 1834 | " ALGOL Highlighting (Plugin: https://github.com/sterpe/vim-algol68) 1835 | exec 'hi algol68Statement' . s:fg_blue . s:ft_bold 1836 | exec 'hi algol68Operator' . s:fg_aqua . s:ft_bold 1837 | exec 'hi algol68PreProc' . s:fg_green 1838 | exec 'hi algol68Function' . s:fg_blue 1839 | 1840 | " R Highlighting 1841 | exec 'hi rType' . s:fg_blue 1842 | exec 'hi rArrow' . s:fg_pink 1843 | exec 'hi rDollar' . s:fg_blue 1844 | 1845 | " XXD Highlighting 1846 | exec 'hi xxdAddress' . s:fg_navy 1847 | exec 'hi xxdSep' . s:fg_pink 1848 | exec 'hi xxdAscii' . s:fg_pink 1849 | exec 'hi xxdDot' . s:fg_aqua 1850 | 1851 | " PHP Highlighting 1852 | exec 'hi phpIdentifier' . s:fg_foreground 1853 | exec 'hi phpVarSelector' . s:fg_pink 1854 | exec 'hi phpKeyword' . s:fg_blue 1855 | exec 'hi phpRepeat' . s:fg_purple . s:ft_bold 1856 | exec 'hi phpConditional' . s:fg_purple . s:ft_bold 1857 | exec 'hi phpStatement' . s:fg_pink 1858 | exec 'hi phpAssignByRef' . s:fg_aqua . s:ft_bold 1859 | exec 'hi phpSpecialFunction' . s:fg_blue 1860 | exec 'hi phpFunctions' . s:fg_blue 1861 | exec 'hi phpComparison' . s:fg_aqua 1862 | exec 'hi phpBackslashSequences' . s:fg_olive . s:ft_bold 1863 | exec 'hi phpMemberSelector' . s:fg_blue 1864 | exec 'hi phpStorageClass' . s:fg_purple . s:ft_bold 1865 | exec 'hi phpDefine' . s:fg_navy 1866 | exec 'hi phpIntVar' . s:fg_navy . s:ft_bold 1867 | 1868 | " Perl Highlighting 1869 | exec 'hi perlFiledescRead' . s:fg_green 1870 | exec 'hi perlMatchStartEnd' . s:fg_pink 1871 | exec 'hi perlStatementFlow' . s:fg_pink 1872 | exec 'hi perlStatementStorage' . s:fg_pink 1873 | exec 'hi perlFunction' . s:fg_pink . s:ft_bold 1874 | exec 'hi perlMethod' . s:fg_foreground 1875 | exec 'hi perlStatementFiledesc' . s:fg_orange 1876 | exec 'hi perlVarPlain' . s:fg_navy 1877 | exec 'hi perlSharpBang' . s:fg_comment 1878 | exec 'hi perlStatementInclude' . s:fg_aqua . s:ft_bold 1879 | exec 'hi perlStatementScalar' . s:fg_purple 1880 | exec 'hi perlSubName' . s:fg_aqua . s:ft_bold 1881 | exec 'hi perlSpecialString' . s:fg_olive . s:ft_bold 1882 | 1883 | " Pascal Highlighting 1884 | exec 'hi pascalType' . s:fg_pink . s:ft_bold 1885 | exec 'hi pascalStatement' . s:fg_blue . s:ft_bold 1886 | exec 'hi pascalPredefined' . s:fg_pink 1887 | exec 'hi pascalFunction' . s:fg_foreground 1888 | exec 'hi pascalStruct' . s:fg_navy . s:ft_bold 1889 | exec 'hi pascalOperator' . s:fg_aqua . s:ft_bold 1890 | exec 'hi pascalPreProc' . s:fg_green 1891 | exec 'hi pascalAcces' . s:fg_navy . s:ft_bold 1892 | 1893 | " Lua Highlighting 1894 | exec 'hi luaFunc' . s:fg_foreground 1895 | exec 'hi luaIn' . s:fg_blue . s:ft_bold 1896 | exec 'hi luaFunction' . s:fg_pink 1897 | exec 'hi luaStatement' . s:fg_blue 1898 | exec 'hi luaRepeat' . s:fg_blue . s:ft_bold 1899 | exec 'hi luaCondStart' . s:fg_purple . s:ft_bold 1900 | exec 'hi luaTable' . s:fg_aqua . s:ft_bold 1901 | exec 'hi luaConstant' . s:fg_green . s:ft_bold 1902 | exec 'hi luaElse' . s:fg_purple . s:ft_bold 1903 | exec 'hi luaCondElseif' . s:fg_purple . s:ft_bold 1904 | exec 'hi luaCond' . s:fg_purple . s:ft_bold 1905 | exec 'hi luaCondEnd' . s:fg_purple 1906 | 1907 | " Clojure highlighting: 1908 | exec 'hi clojureConstant' . s:fg_blue 1909 | exec 'hi clojureBoolean' . s:fg_orange 1910 | exec 'hi clojureCharacter' . s:fg_olive 1911 | exec 'hi clojureKeyword' . s:fg_pink 1912 | exec 'hi clojureNumber' . s:fg_orange 1913 | exec 'hi clojureString' . s:fg_olive 1914 | exec 'hi clojureRegexp' . s:fg_purple 1915 | exec 'hi clojureRegexpEscape' . s:fg_pink 1916 | exec 'hi clojureParen' . s:fg_aqua 1917 | exec 'hi clojureVariable' . s:fg_olive 1918 | exec 'hi clojureCond' . s:fg_blue 1919 | exec 'hi clojureDefine' . s:fg_blue . s:ft_bold 1920 | exec 'hi clojureException' . s:fg_red 1921 | exec 'hi clojureFunc' . s:fg_navy 1922 | exec 'hi clojureMacro' . s:fg_blue 1923 | exec 'hi clojureRepeat' . s:fg_blue 1924 | exec 'hi clojureSpecial' . s:fg_blue . s:ft_bold 1925 | exec 'hi clojureQuote' . s:fg_blue 1926 | exec 'hi clojureUnquote' . s:fg_blue 1927 | exec 'hi clojureMeta' . s:fg_blue 1928 | exec 'hi clojureDeref' . s:fg_blue 1929 | exec 'hi clojureAnonArg' . s:fg_blue 1930 | exec 'hi clojureRepeat' . s:fg_blue 1931 | exec 'hi clojureDispatch' . s:fg_aqua 1932 | 1933 | " Dockerfile Highlighting 1934 | " @target https://github.com/docker/docker/tree/master/contrib/syntax/vim 1935 | exec 'hi dockerfileKeyword' . s:fg_blue 1936 | exec 'hi shDerefVar' . s:fg_purple . s:ft_bold 1937 | exec 'hi shOperator' . s:fg_aqua 1938 | exec 'hi shOption' . s:fg_navy 1939 | exec 'hi shLine' . s:fg_foreground 1940 | exec 'hi shWrapLineOperator' . s:fg_pink 1941 | 1942 | " NGINX Highlighting 1943 | " @target https://github.com/evanmiller/nginx-vim-syntax 1944 | exec 'hi ngxDirectiveBlock' . s:fg_pink . s:ft_bold 1945 | exec 'hi ngxDirective' . s:fg_blue . s:ft_none 1946 | exec 'hi ngxDirectiveImportant' . s:fg_blue . s:ft_bold 1947 | exec 'hi ngxString' . s:fg_olive 1948 | exec 'hi ngxVariableString' . s:fg_purple 1949 | exec 'hi ngxVariable' . s:fg_purple . s:ft_none 1950 | 1951 | " Yaml Highlighting 1952 | exec 'hi yamlBlockMappingKey' . s:fg_blue 1953 | exec 'hi yamlKeyValueDelimiter' . s:fg_pink 1954 | exec 'hi yamlBlockCollectionItemStart' . s:fg_pink 1955 | 1956 | " Qt QML Highlighting 1957 | exec 'hi qmlObjectLiteralType' . s:fg_pink 1958 | exec 'hi qmlReserved' . s:fg_purple 1959 | exec 'hi qmlBindingProperty' . s:fg_navy 1960 | exec 'hi qmlType' . s:fg_navy 1961 | 1962 | " Dosini Highlighting 1963 | exec 'hi dosiniHeader' . s:fg_pink 1964 | exec 'hi dosiniLabel' . s:fg_blue 1965 | 1966 | " Mail highlighting 1967 | exec 'hi mailHeaderKey' . s:fg_blue 1968 | exec 'hi mailHeaderEmail' . s:fg_purple 1969 | exec 'hi mailSubject' . s:fg_pink 1970 | exec 'hi mailHeader' . s:fg_comment 1971 | exec 'hi mailURL' . s:fg_aqua 1972 | exec 'hi mailEmail' . s:fg_purple 1973 | exec 'hi mailQuoted1' . s:fg_olive 1974 | exec 'hi mailQuoted2' . s:fg_navy 1975 | 1976 | " XML Highlighting 1977 | exec 'hi xmlProcessingDelim' . s:fg_pink 1978 | exec 'hi xmlString' . s:fg_olive 1979 | exec 'hi xmlEqual' . s:fg_orange 1980 | exec 'hi xmlAttrib' . s:fg_navy 1981 | exec 'hi xmlAttribPunct' . s:fg_pink 1982 | exec 'hi xmlTag' . s:fg_blue 1983 | exec 'hi xmlTagName' . s:fg_blue 1984 | exec 'hi xmlEndTag' . s:fg_blue 1985 | exec 'hi xmlNamespace' . s:fg_orange 1986 | 1987 | " Elixir Highlighting 1988 | " @target https://github.com/elixir-lang/vim-elixir 1989 | exec 'hi elixirAlias' . s:fg_blue . s:ft_bold 1990 | exec 'hi elixirAtom' . s:fg_navy 1991 | exec 'hi elixirVariable' . s:fg_navy 1992 | exec 'hi elixirUnusedVariable' . s:fg_foreground . s:ft_bold 1993 | exec 'hi elixirInclude' . s:fg_purple 1994 | exec 'hi elixirStringDelimiter' . s:fg_olive 1995 | exec 'hi elixirKeyword' . s:fg_purple . s:ft_bold 1996 | exec 'hi elixirFunctionDeclaration' . s:fg_aqua . s:ft_bold 1997 | exec 'hi elixirBlockDefinition' . s:fg_pink 1998 | exec 'hi elixirDefine' . s:fg_pink 1999 | exec 'hi elixirStructDefine' . s:fg_pink 2000 | exec 'hi elixirPrivateDefine' . s:fg_pink 2001 | exec 'hi elixirModuleDefine' . s:fg_pink 2002 | exec 'hi elixirProtocolDefine' . s:fg_pink 2003 | exec 'hi elixirImplDefine' . s:fg_pink 2004 | exec 'hi elixirModuleDeclaration' . s:fg_aqua . s:ft_bold 2005 | exec 'hi elixirDocString' . s:fg_olive 2006 | exec 'hi elixirDocTest' . s:fg_green . s:ft_bold 2007 | 2008 | " Erlang Highlighting 2009 | exec 'hi erlangBIF' . s:fg_purple . s:ft_bold 2010 | exec 'hi erlangBracket' . s:fg_pink 2011 | exec 'hi erlangLocalFuncCall' . s:fg_foreground 2012 | exec 'hi erlangVariable' . s:fg_foreground 2013 | exec 'hi erlangAtom' . s:fg_navy 2014 | exec 'hi erlangAttribute' . s:fg_blue . s:ft_bold 2015 | exec 'hi erlangRecordDef' . s:fg_blue . s:ft_bold 2016 | exec 'hi erlangRecord' . s:fg_blue 2017 | exec 'hi erlangRightArrow' . s:fg_blue . s:ft_bold 2018 | exec 'hi erlangStringModifier' . s:fg_olive . s:ft_bold 2019 | exec 'hi erlangInclude' . s:fg_blue . s:ft_bold 2020 | exec 'hi erlangKeyword' . s:fg_pink 2021 | exec 'hi erlangGlobalFuncCall' . s:fg_foreground 2022 | 2023 | " Cucumber Highlighting 2024 | exec 'hi cucumberFeature' . s:fg_blue . s:ft_bold 2025 | exec 'hi cucumberBackground' . s:fg_pink . s:ft_bold 2026 | exec 'hi cucumberScenario' . s:fg_pink . s:ft_bold 2027 | exec 'hi cucumberGiven' . s:fg_orange 2028 | exec 'hi cucumberGivenAnd' . s:fg_blue 2029 | exec 'hi cucumberThen' . s:fg_orange 2030 | exec 'hi cucumberThenAnd' . s:fg_blue 2031 | exec 'hi cucumberWhen' . s:fg_purple . s:ft_bold 2032 | exec 'hi cucumberScenarioOutline' . s:fg_pink . s:ft_bold 2033 | exec 'hi cucumberExamples' . s:fg_aqua 2034 | exec 'hi cucumberTags' . s:fg_aqua 2035 | exec 'hi cucumberPlaceholder' . s:fg_aqua 2036 | 2037 | " Ada Highlighting 2038 | exec 'hi adaInc' . s:fg_aqua . s:ft_bold 2039 | exec 'hi adaSpecial' . s:fg_aqua . s:ft_bold 2040 | exec 'hi adaKeyword' . s:fg_pink 2041 | exec 'hi adaBegin' . s:fg_pink 2042 | exec 'hi adaEnd' . s:fg_pink 2043 | exec 'hi adaTypedef' . s:fg_navy . s:ft_bold 2044 | exec 'hi adaAssignment' . s:fg_aqua . s:ft_bold 2045 | exec 'hi adaAttribute' . s:fg_green 2046 | 2047 | " COBOL Highlighting 2048 | exec 'hi cobolMarker' . s:fg_comment . s:bg_cursorline 2049 | exec 'hi cobolLine' . s:fg_foreground 2050 | exec 'hi cobolReserved' . s:fg_blue 2051 | exec 'hi cobolDivision' . s:fg_pink . s:ft_bold 2052 | exec 'hi cobolDivisionName' . s:fg_pink . s:ft_bold 2053 | exec 'hi cobolSection' . s:fg_navy . s:ft_bold 2054 | exec 'hi cobolSectionName' . s:fg_navy . s:ft_bold 2055 | exec 'hi cobolParagraph' . s:fg_purple 2056 | exec 'hi cobolParagraphName' . s:fg_purple 2057 | exec 'hi cobolDeclA' . s:fg_purple 2058 | exec 'hi cobolDecl' . s:fg_green 2059 | exec 'hi cobolCALLs' . s:fg_aqua . s:ft_bold 2060 | exec 'hi cobolEXECs' . s:fg_aqua . s:ft_bold 2061 | 2062 | " GNU sed highlighting 2063 | exec 'hi sedST' . s:fg_purple . s:ft_bold 2064 | exec 'hi sedFlag' . s:fg_purple . s:ft_bold 2065 | exec 'hi sedRegexp47' . s:fg_pink 2066 | exec 'hi sedRegexpMeta' . s:fg_blue . s:ft_bold 2067 | exec 'hi sedReplacement47' . s:fg_olive 2068 | exec 'hi sedReplaceMeta' . s:fg_orange . s:ft_bold 2069 | exec 'hi sedAddress' . s:fg_pink 2070 | exec 'hi sedFunction' . s:fg_aqua . s:ft_bold 2071 | exec 'hi sedBranch' . s:fg_green . s:ft_bold 2072 | exec 'hi sedLabel' . s:fg_green . s:ft_bold 2073 | 2074 | " GNU awk highlighting 2075 | exec 'hi awkPatterns' . s:fg_pink . s:ft_bold 2076 | exec 'hi awkSearch' . s:fg_pink 2077 | exec 'hi awkRegExp' . s:fg_blue . s:ft_bold 2078 | exec 'hi awkCharClass' . s:fg_blue . s:ft_bold 2079 | exec 'hi awkFieldVars' . s:fg_green . s:ft_bold 2080 | exec 'hi awkStatement' . s:fg_blue . s:ft_bold 2081 | exec 'hi awkFunction' . s:fg_blue 2082 | exec 'hi awkVariables' . s:fg_green . s:ft_bold 2083 | exec 'hi awkArrayElement' . s:fg_orange 2084 | exec 'hi awkOperator' . s:fg_foreground 2085 | exec 'hi awkBoolLogic' . s:fg_foreground 2086 | exec 'hi awkExpression' . s:fg_foreground 2087 | exec 'hi awkSpecialPrintf' . s:fg_olive . s:ft_bold 2088 | 2089 | " Elm highlighting 2090 | exec 'hi elmImport' . s:fg_navy 2091 | exec 'hi elmAlias' . s:fg_aqua 2092 | exec 'hi elmType' . s:fg_pink 2093 | exec 'hi elmOperator' . s:fg_aqua . s:ft_bold 2094 | exec 'hi elmBraces' . s:fg_aqua . s:ft_bold 2095 | exec 'hi elmTypedef' . s:fg_blue . s:ft_bold 2096 | exec 'hi elmTopLevelDecl' . s:fg_green . s:ft_bold 2097 | 2098 | " Purescript highlighting 2099 | exec 'hi purescriptModuleKeyword' . s:fg_navy 2100 | exec 'hi purescriptImportKeyword' . s:fg_navy 2101 | exec 'hi purescriptModuleName' . s:fg_pink 2102 | exec 'hi purescriptOperator' . s:fg_aqua . s:ft_bold 2103 | exec 'hi purescriptType' . s:fg_pink 2104 | exec 'hi purescriptTypeVar' . s:fg_navy 2105 | exec 'hi purescriptStructure' . s:fg_blue . s:ft_bold 2106 | exec 'hi purescriptLet' . s:fg_blue . s:ft_bold 2107 | exec 'hi purescriptFunction' . s:fg_green . s:ft_bold 2108 | exec 'hi purescriptDelimiter' . s:fg_aqua . s:ft_bold 2109 | exec 'hi purescriptStatement' . s:fg_purple . s:ft_bold 2110 | exec 'hi purescriptConstructor' . s:fg_pink 2111 | exec 'hi purescriptWhere' . s:fg_purple . s:ft_bold 2112 | 2113 | " F# highlighting 2114 | exec 'hi fsharpTypeName' . s:fg_pink 2115 | exec 'hi fsharpCoreClass' . s:fg_pink 2116 | exec 'hi fsharpType' . s:fg_pink 2117 | exec 'hi fsharpKeyword' . s:fg_blue . s:ft_bold 2118 | exec 'hi fsharpOperator' . s:fg_aqua . s:ft_bold 2119 | exec 'hi fsharpBoolean' . s:fg_green . s:ft_bold 2120 | exec 'hi fsharpFormat' . s:fg_foreground 2121 | exec 'hi fsharpLinq' . s:fg_blue 2122 | exec 'hi fsharpKeyChar' . s:fg_aqua . s:ft_bold 2123 | exec 'hi fsharpOption' . s:fg_orange 2124 | exec 'hi fsharpCoreMethod' . s:fg_purple 2125 | exec 'hi fsharpAttrib' . s:fg_orange 2126 | exec 'hi fsharpModifier' . s:fg_aqua 2127 | exec 'hi fsharpOpen' . s:fg_red 2128 | 2129 | " ASN.1 highlighting 2130 | exec 'hi asnExternal' . s:fg_green . s:ft_bold 2131 | exec 'hi asnTagModifier' . s:fg_purple 2132 | exec 'hi asnBraces' . s:fg_aqua . s:ft_bold 2133 | exec 'hi asnDefinition' . s:fg_foreground 2134 | exec 'hi asnStructure' . s:fg_blue 2135 | exec 'hi asnType' . s:fg_pink 2136 | exec 'hi asnTypeInfo' . s:fg_aqua . s:ft_bold 2137 | exec 'hi asnFieldOption' . s:fg_purple 2138 | 2139 | " }}} 2140 | 2141 | " Plugin: Netrw 2142 | exec 'hi netrwVersion' . s:fg_red 2143 | exec 'hi netrwList' . s:fg_pink 2144 | exec 'hi netrwHidePat' . s:fg_olive 2145 | exec 'hi netrwQuickHelp' . s:fg_blue 2146 | exec 'hi netrwHelpCmd' . s:fg_blue 2147 | exec 'hi netrwDir' . s:fg_aqua . s:ft_bold 2148 | exec 'hi netrwClassify' . s:fg_pink 2149 | exec 'hi netrwExe' . s:fg_green 2150 | exec 'hi netrwSuffixes' . s:fg_comment 2151 | exec 'hi netrwTreeBar' . s:fg_linenumber_fg 2152 | 2153 | " Plugin: NERDTree 2154 | exec 'hi NERDTreeUp' . s:fg_comment 2155 | exec 'hi NERDTreeHelpCommand' . s:fg_pink 2156 | exec 'hi NERDTreeHelpTitle' . s:fg_blue . s:ft_bold 2157 | exec 'hi NERDTreeHelpKey' . s:fg_pink 2158 | exec 'hi NERDTreeHelp' . s:fg_foreground 2159 | exec 'hi NERDTreeToggleOff' . s:fg_red 2160 | exec 'hi NERDTreeToggleOn' . s:fg_green 2161 | exec 'hi NERDTreeDir' . s:fg_blue . s:ft_bold 2162 | exec 'hi NERDTreeDirSlash' . s:fg_pink 2163 | exec 'hi NERDTreeFile' . s:fg_foreground 2164 | exec 'hi NERDTreeExecFile' . s:fg_green 2165 | exec 'hi NERDTreeOpenable' . s:fg_aqua . s:ft_bold 2166 | exec 'hi NERDTreeClosable' . s:fg_pink 2167 | 2168 | " Plugin: Tagbar 2169 | exec 'hi TagbarHelpTitle' . s:fg_blue . s:ft_bold 2170 | exec 'hi TagbarHelp' . s:fg_foreground 2171 | exec 'hi TagbarKind' . s:fg_pink 2172 | exec 'hi TagbarSignature' . s:fg_aqua 2173 | 2174 | " Plugin: Vimdiff 2175 | exec 'hi DiffAdd' . s:fg_diffadd_fg . s:bg_diffadd_bg . s:ft_none 2176 | exec 'hi DiffChange' . s:fg_diffchange_fg . s:bg_diffchange_bg . s:ft_none 2177 | exec 'hi DiffDelete' . s:fg_diffdelete_fg . s:bg_diffdelete_bg . s:ft_none 2178 | exec 'hi DiffText' . s:fg_difftext_fg . s:bg_difftext_bg . s:ft_none 2179 | 2180 | " Plugin: vim-gitgutter 2181 | exec 'hi GitGutterAdd' . s:fg_diffadd_fg 2182 | exec 'hi GitGutterChange' . s:fg_diffchange_fg 2183 | exec 'hi GitGutterDelete' . s:fg_diffdelete_fg 2184 | exec 'hi GitGutterAddLine' . s:fg_diffadd_fg . s:bg_diffadd_bg . s:ft_none 2185 | exec 'hi GitGutterChangeLine' . s:fg_diffchange_fg . s:bg_diffchange_bg . s:ft_none 2186 | exec 'hi GitGutterDeleteLine' . s:fg_diffdelete_fg . s:bg_diffdelete_bg . s:ft_none 2187 | 2188 | " Plugin: AGit 2189 | exec 'hi agitHead' . s:fg_green . s:ft_bold 2190 | exec 'hi agitHeader' . s:fg_olive 2191 | exec 'hi agitStatAdded' . s:fg_diffadd_fg 2192 | exec 'hi agitStatRemoved' . s:fg_diffdelete_fg 2193 | exec 'hi agitDiffAdd' . s:fg_diffadd_fg 2194 | exec 'hi agitDiffRemove' . s:fg_diffdelete_fg 2195 | exec 'hi agitDiffHeader' . s:fg_pink 2196 | exec 'hi agitDiff' . s:fg_foreground 2197 | exec 'hi agitDiffIndex' . s:fg_purple 2198 | exec 'hi agitDiffFileName' . s:fg_aqua 2199 | exec 'hi agitLog' . s:fg_foreground 2200 | exec 'hi agitAuthorMark' . s:fg_olive 2201 | exec 'hi agitDateMark' . s:fg_comment 2202 | exec 'hi agitHeaderLabel' . s:fg_aqua 2203 | exec 'hi agitDate' . s:fg_aqua 2204 | exec 'hi agitTree' . s:fg_pink 2205 | exec 'hi agitRef' . s:fg_blue . s:ft_bold 2206 | exec 'hi agitRemote' . s:fg_purple . s:ft_bold 2207 | exec 'hi agitTag' . s:fg_orange . s:ft_bold 2208 | 2209 | " Plugin: Spell Checking 2210 | exec 'hi SpellBad' . s:fg_foreground . s:bg_spellbad 2211 | exec 'hi SpellCap' . s:fg_foreground . s:bg_spellcap 2212 | exec 'hi SpellRare' . s:fg_foreground . s:bg_spellrare 2213 | exec 'hi SpellLocal' . s:fg_foreground . s:bg_spelllocal 2214 | 2215 | " Plugin: Indent Guides 2216 | exec 'hi IndentGuidesOdd' . s:bg_background 2217 | exec 'hi IndentGuidesEven' . s:bg_cursorline 2218 | 2219 | " Plugin: Startify 2220 | exec 'hi StartifyFile' . s:fg_blue . s:ft_bold 2221 | exec 'hi StartifyNumber' . s:fg_orange 2222 | exec 'hi StartifyHeader' . s:fg_comment 2223 | exec 'hi StartifySection' . s:fg_pink 2224 | exec 'hi StartifyPath' . s:fg_foreground 2225 | exec 'hi StartifySlash' . s:fg_navy 2226 | exec 'hi StartifyBracket' . s:fg_aqua 2227 | exec 'hi StartifySpecial' . s:fg_aqua 2228 | 2229 | " Plugin: Signify 2230 | exec 'hi SignifyLineChange' . s:fg_diffchange_fg 2231 | exec 'hi SignifySignChange' . s:fg_diffchange_fg 2232 | exec 'hi SignifyLineAdd' . s:fg_diffadd_fg 2233 | exec 'hi SignifySignAdd' . s:fg_diffadd_fg 2234 | exec 'hi SignifyLineDelete' . s:fg_diffdelete_fg 2235 | exec 'hi SignifySignDelete' . s:fg_diffdelete_fg 2236 | 2237 | " Git commit message 2238 | exec 'hi gitcommitSummary' . s:fg_blue 2239 | exec 'hi gitcommitHeader' . s:fg_green . s:ft_bold 2240 | exec 'hi gitcommitSelectedType' . s:fg_blue 2241 | exec 'hi gitcommitSelectedFile' . s:fg_pink 2242 | exec 'hi gitcommitUntrackedFile' . s:fg_diffdelete_fg 2243 | exec 'hi gitcommitBranch' . s:fg_aqua . s:ft_bold 2244 | exec 'hi gitcommitDiscardedType' . s:fg_diffdelete_fg 2245 | exec 'hi gitcommitDiff' . s:fg_comment 2246 | 2247 | exec 'hi diffFile' . s:fg_blue 2248 | exec 'hi diffSubname' . s:fg_comment 2249 | exec 'hi diffIndexLine' . s:fg_comment 2250 | exec 'hi diffAdded' . s:fg_diffadd_fg 2251 | exec 'hi diffRemoved' . s:fg_diffdelete_fg 2252 | exec 'hi diffLine' . s:fg_orange 2253 | exec 'hi diffBDiffer' . s:fg_orange 2254 | exec 'hi diffNewFile' . s:fg_comment 2255 | 2256 | " Pluging: CoC 2257 | exec 'hi CocFloating' . s:fg_popupmenu_fg . s:bg_popupmenu_bg . s:ft_none 2258 | exec 'hi CocErrorFloat' . s:fg_popupmenu_fg . s:bg_popupmenu_bg . s:ft_none 2259 | exec 'hi CocWarningFloat' . s:fg_popupmenu_fg . s:bg_popupmenu_bg . s:ft_none 2260 | exec 'hi CocInfoFloat' . s:fg_popupmenu_fg . s:bg_popupmenu_bg . s:ft_none 2261 | exec 'hi CocHintFloat' . s:fg_popupmenu_fg . s:bg_popupmenu_bg . s:ft_none 2262 | 2263 | exec 'hi CocErrorHighlight' . s:fg_foreground . s:bg_spellbad 2264 | exec 'hi CocWarningHighlight' . s:fg_foreground . s:bg_spellcap 2265 | exec 'hi CocInfoHighlight' . s:fg_foreground . s:bg_spellcap 2266 | exec 'hi CocHintHighlight' . s:fg_foreground . s:bg_spellcap 2267 | 2268 | exec 'hi CocErrorSign' . s:fg_error_fg . s:bg_error_bg 2269 | exec 'hi CocWarningSign' . s:fg_todo_fg . s:bg_todo_bg . s:ft_bold 2270 | exec 'hi CocInfoSign' . s:fg_todo_fg . s:bg_todo_bg . s:ft_bold 2271 | exec 'hi CocHintSign' . s:fg_todo_fg . s:bg_todo_bg . s:ft_bold 2272 | 2273 | " Debug Adapter Protocol (DAP) - Plugin: rcarriga/nvim-dap-ui 2274 | if has('nvim') 2275 | exec 'hi DapUIDecoration' . s:fg_blue 2276 | " DAP Scopes window 2277 | hi! link DapUIType Type 2278 | hi! link DapUIVariable Identifier 2279 | exec 'hi DapUIScope' . s:fg_red . s:ft_bold 2280 | hi! link DapUIValue Number 2281 | exec 'hi DapUIModifiedValue' . s:fg_orange . s:ft_bold . s:bg_error_bg 2282 | " DAP Breakpoints window 2283 | hi! link DapUILineNumber LineNr 2284 | hi! link DapUIBreakpointsDisabledLine LineNr 2285 | exec 'hi DapUIBreakpointsCurrentLine' . s:fg_linenumber_fg . s:ft_bold . s:bg_error_bg 2286 | exec 'hi DapUIBreakpointsInfo' . s:fg_green 2287 | exec 'hi DapUIBreakpointsPath' . s:fg_olive . s:ft_bold 2288 | " DAP Stacks window 2289 | exec 'hi DapUIFrameName' . s:fg_blue 2290 | exec 'hi DapUIThread' . s:fg_pink . s:ft_bold 2291 | exec 'hi DapUIStoppedThread' . s:fg_pink 2292 | " DAP Watches window 2293 | exec 'hi DapUIWatchesEmpty' . s:fg_pink . s:ft_bold 2294 | hi! link DapUIWatchesError DapUIWatchesEmpty 2295 | hi! link DapUIWatchesValue Number 2296 | " DAP Breakpoints window 2297 | exec 'hi DapUISource' . s:fg_olive 2298 | " DAP Floating window 2299 | exec 'hi DapUIFloatBorder' . s:fg_blue 2300 | endif 2301 | 2302 | " Plugin: hrsh7th/nvim-cmp 2303 | if has('nvim') 2304 | hi! link CmpItemKindValue Number 2305 | hi! link CmpItemKindVariable Identifier 2306 | hi! link CmpItemKindKeyword Keyword 2307 | hi! link CmpItemKindField CmpItemKindVariable 2308 | exec 'hi CmpItemKindFunction' . s:fg_blue 2309 | hi! link CmpItemKindMethod CmpItemKindFunction 2310 | hi! link CmpItemKindConstructor CmpItemKindFunction 2311 | hi! link CmpItemKindClass Structure 2312 | hi! link CmpItemKindInterface Structure 2313 | exec 'hi CmpItemKindSnippet' . s:fg_orange 2314 | exec 'hi CmpItemKindFile' . s:fg_orange 2315 | hi! link CmpItemKindFolder CmpItemKindFile 2316 | exec 'hi CmpItemAbbrMatch' . s:fg_blue . s:ft_bold 2317 | exec 'hi CmpItemAbbrMatchFuzzy' . s:fg_blue . s:ft_bold 2318 | exec 'hi CmpItemAbbrDeprecated' . s:fg_foreground . ' gui=strikethrough' 2319 | endif 2320 | 2321 | endfun 2322 | " }}} 2323 | 2324 | " ================================== MISC ===================================== 2325 | " Command to show theme information {{{ 2326 | fun! g:PaperColor() 2327 | echom 'PaperColor Theme Framework' 2328 | echom ' version ' . s:version 2329 | echom ' by Nikyle Nguyen et al.' 2330 | echom ' at https://github.com/NLKNguyen/papercolor-theme/' 2331 | echom ' ' 2332 | echom 'Current theme: ' . s:theme_name 2333 | echom ' ' . s:selected_theme['description'] 2334 | echom ' by ' . s:selected_theme['maintainer'] 2335 | echom ' at ' . s:selected_theme['source'] 2336 | 2337 | " TODO: add diff display for theme color names between 'default' and current 2338 | " theme if it is a custom theme, i.e. child theme. 2339 | endfun 2340 | 2341 | " @brief command alias for g:PaperColor() 2342 | command! -nargs=0 PaperColor :call g:PaperColor() 2343 | " }}} 2344 | 2345 | " =============================== MAIN ======================================== 2346 | 2347 | hi clear 2348 | syntax reset 2349 | let g:colors_name = "PaperColor" 2350 | 2351 | call s:acquire_theme_data() 2352 | call s:identify_color_mode() 2353 | 2354 | call s:generate_theme_option_variables() 2355 | call s:generate_language_option_variables() 2356 | 2357 | call s:set_format_attributes() 2358 | call s:set_overriding_colors() 2359 | 2360 | call s:convert_colors() 2361 | call s:set_color_variables() 2362 | 2363 | call s:apply_syntax_highlightings() 2364 | 2365 | " ============================================================================= 2366 | " Cheers! 2367 | " vim: fdm=marker ff=unix 2368 | --------------------------------------------------------------------------------