├── .github ├── renovate.json └── workflows │ └── lint.yaml ├── .gitignore ├── LICENSE ├── README.md ├── autoload ├── airline │ └── themes │ │ └── srcery.vim ├── clap │ └── themes │ │ └── srcery.vim ├── lightline │ └── colorscheme │ │ └── srcery.vim └── srcery │ └── helper.vim ├── colors └── srcery.vim ├── doc └── srcery.txt └── lua └── lualine └── themes └── srcery.lua /.github/renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://docs.renovatebot.com/renovate-schema.json", 3 | 4 | "extends": ["local>srcery-colors/.github:renovate-config"], 5 | 6 | "enabledManagers": ["github-actions"] 7 | } 8 | -------------------------------------------------------------------------------- /.github/workflows/lint.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | name: Check Them Vim Files 3 | 4 | on: # yamllint disable-line 5 | push: 6 | pull_request: 7 | branches: [$default-branch] 8 | 9 | jobs: 10 | lint: 11 | runs-on: ubuntu-latest 12 | name: Linting 13 | steps: 14 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 15 | - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 16 | with: 17 | python-version: "3.x" 18 | - name: Install Vint 19 | run: | 20 | python -m pip install --upgrade pip setuptools wheel 21 | pip install --upgrade vim-vint 22 | - name: Vinting code 23 | run: vint --verbose --stat $(find . -type f -name '*.vim') 24 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | doc/tags 2 | TODOs.org 3 | *.temp 4 | *_archive 5 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 for portions of Srcery are held by morhetz as part of Gruvbox. 4 | All other Copyright (c) 2021 for Srcery are held by Daniel Berg and contributers of Srcery. 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | 3 |

4 | 5 |

6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |

20 | 21 |

22 | Srcery is a color scheme with clearly defined contrasting colors and a 23 | slightly earthy tone. 24 |

25 | 26 |
27 | Table of content 28 | 29 | - [Requirements](#requirements) 30 | - [GUI](#gui) 31 | - [TUI](#tui) 32 | - [Installation](#installation) 33 | - [Manually](#manually) 34 | - [Vim 8](#vim-8) 35 | - [dein.vim](#deinvim) 36 | - [vim-pathogen](#vim-pathogen) 37 | - [vim-plug](#vim-plug) 38 | - [packer](#packer) 39 | - [Usage](#usage) 40 | - [Configuration](#configuration) 41 | - [Colors](#colors) 42 | - [Options](#options) 43 | - [g:srcery\_bold](#gsrcery_bold) 44 | - [g:srcery\_italic](#gsrcery_italic) 45 | - [g:srcery\_underline](#gsrcery_underline) 46 | - [g:srcery\_undercurl](#gsrcery_undercurl) 47 | - [g:srcery\_strikethrough](#gsrcery_strikethrough) 48 | - [g:srcery\_inverse](#gsrcery_inverse) 49 | - [g:srcery\_inverse\_matches](#gsrcery_inverse_matches) 50 | - [g:srcery\_inverse\_match\_paren](#gsrcery_inverse_match_paren) 51 | - [g:srcery\_dim\_lisp\_paren](#gsrcery_dim_lisp_paren) 52 | - [g:srcery\_guisp\_fallback](#gsrcery_guisp_fallback) 53 | - [g:srcery\_italic\_types](#gsrcery_italic_types) 54 | - [g:srcery\_bg](#gsrcery_bg) 55 | - [g:srcery\_hard\_black\_terminal\_bg](#gsrcery_hard_black_terminal_bg) 56 | - [Screenshots](#screenshots) 57 | - [Plugin support](#plugin-support) 58 | - [Lightline](#lightline) 59 | - [Airline](#airline) 60 | - [Other](#other) 61 | - [Attribution](#attribution) 62 | - [Troubleshooting](#troubleshooting) 63 | - [Colors don't look right](#colors-dont-look-right) 64 | - [24-bit color, tmux and Neovim](#24-bit-color-tmux-and-neovim) 65 | - [Extra](#extra) 66 | - [Emacs](#emacs) 67 | 68 | 69 |
70 | 71 | ## Requirements 72 | 73 | ### GUI 74 | 75 | You don’t need to do anything for this colorscheme to work in gVim or MacVim. 76 | 77 | ### TUI 78 | 79 | To use Srcery in the terminal you need to change your terminal emulator’s 80 | so-called “ASCII” colors to the ones in the table below. There's a list of 81 | terminal configurations in the 82 | [srcery-terminal](https://github.com/srcery-colors/srcery-terminal) repository. 83 | 84 | | IMG | TERMCOL | NR | VAR | HEX | RGB | HSL | 85 | |------|---------|----|-----|-----|------|-----| 86 | | ![black](https://place-hold.it/24x24/1c1b19?text=+) | black | 0 | `g:srcery_black` | #1C1B19 | 28, 27, 25 | 40, 6%, 10% | 87 | | ![red](https://place-hold.it/24x24/ef2f27?text=+) | red | 1 | `g:srcery_red` | #EF2F27 | 239, 47, 39 | 2, 86%, 55% | 88 | | ![green](https://place-hold.it/24x24/519f50?text=+) | green | 2 | `g:srcery_green` | #519F50 | 81, 159, 80 | 119, 33%, 47% | 89 | | ![yellow](https://place-hold.it/24x24/fbb829?text=+) | yellow | 3 | `g:srcery_yellow` | #FBB829 | 251, 184, 41 | 41, 96%, 57% | 90 | | ![blue](https://place-hold.it/24x24/2c78bf?text=+) | blue | 4 | `g:srcery_blue` | #2C78BF | 44, 120, 191 | 209, 63%, 46% | 91 | | ![magenta](https://place-hold.it/24x24/e02c6d?text=+) | magenta | 5 | `g:srcery_magenta` | #E02C6D | 224, 44, 109 | 338, 74%, 53% | 92 | | ![cyan](https://place-hold.it/24x24/0aaeb3?text=+) | cyan | 6 | `g:srcery_cyan` | #0AAEB3 | 10, 174, 179 | 182, 89%, 37% | 93 | | ![white](https://place-hold.it/24x24/baa67f?text=+) | white | 7 | `g:srcery_white` | #BAA67F | 186, 166, 127 | 40, 30%, 61% | 94 | | ![brightblack](https://place-hold.it/24x24/918175?text=+) | brightblack | 8 | `g:srcery_bright_black` | #918175 | 145, 129, 117 | 26, 11%, 51% | 95 | | ![brightred](https://place-hold.it/24x24/f75341?text=+) | brightred | 9 | `g:srcery_bright_red` | #F75341 | 247, 83, 65 | 6, 92%, 61% | 96 | | ![brightgreen](https://place-hold.it/24x24/98bc37?text=+) | brightgreen | 10 | `g:srcery_bright_green` | #98BC37 | 152, 188, 55 | 76, 55%, 48% | 97 | | ![brightyellow](https://place-hold.it/24x24/fed06e?text=+) | brightyellow | 11 | `g:srcery_bright_yellow` | #FED06E | 254, 208, 110 | 41, 99%, 71% | 98 | | ![brightblue](https://place-hold.it/24x24/68a8e4?text=+) | brightblue | 12 | `g:srcery_bright_blue` | #68A8E4 | 104, 168, 228 | 209, 70%, 65% | 99 | | ![brightmagenta](https://place-hold.it/24x24/ff5c8f?text=+) | brightmagenta | 13 | `g:srcery_bright_magenta` | #FF5C8F | 255, 92, 143 | 341, 100%, 68% | 100 | | ![brightcyan](https://place-hold.it/24x24/2be4d0?text=+) | brightcyan | 14 | `g:srcery_bright_cyan` | #2BE4D0 | 43, 228, 208 | 174, 77%, 53% | 101 | | ![brightwhite](https://place-hold.it/24x24/fce8c3?text=+) | brightwhite | 15 | `g:srcery_bright_white` | #FCE8C3 | 252, 232, 195 | 39, 90%, 88% | 102 | 103 | Additionally Srcery uses some [xterm 256 104 | colors](https://en.wikipedia.org/wiki/Xterm#/media/File:Xterm_256color_chart.svg) 105 | to pad out the color selection, no extra configuration needed. 106 | 107 | | IMG | NAME | NR | VAR | HEX | RGB | HSL | 108 | |------|------|----|-----|-----|------|-----| 109 | | ![orange](https://place-hold.it/24x24/ff5f00?text=+) | orange | 202 | `g:srcery_orange`, `g:srcery_orange_cterm` | #FF5F00 | 255, 95, 0 | 22, 100%, 50% | 110 | | ![bright_orange](https://place-hold.it/24x24/ff8700?text=+) | bright_orange | 208 | `g:srcery_bright_orange`, `g:srcery_bright_orange_cterm` | #FF8700 | 255, 135, 0 | 32, 100%, 50% | 111 | | ![hard_black](https://place-hold.it/24x24/121212?text=+) | hard_black | 233 | `g:srcery_hard_black`, `g:srcery_hard_black_cterm`| #121212 | 18, 18, 18 | 0, 0%, 7% | 112 | | ![xgray1](https://place-hold.it/24x24/262626?text=+) | xgray1 | 235 | `g:srcery_xgray1`, `g:srcery_xgray1_cterm` | #262626 | 38, 38, 38 | 0, 0%, 15% | 113 | | ![xgray2](https://place-hold.it/24x24/303030?text=+) | xgray2 | 236 | `g:srcery_xgray2`, `g:srcery_xgray2_cterm` | #303030 | 48, 48, 48 | 0, 0%, 19% | 114 | | ![xgray3](https://place-hold.it/24x24/3a3a3a?text=+) | xgray3 | 237 | `g:srcery_xgray3`, `g:srcery_xgray3_cterm` | #3A3A3A | 58, 58, 58 | 0, 0%, 23% | 115 | | ![xgray4](https://place-hold.it/24x24/444444?text=+) | xgray4 | 238 | `g:srcery_xgray4`, `g:srcery_xgray4_cterm` |#444444 | 68, 68, 68 | 0, 0%, 27% | 116 | | ![xgray5](https://place-hold.it/24x24/4e4e4e?text=+) | xgray5 | 239 | `g:srcery_xgray5`, `g:srcery_xgray5_cterm` | #4E4E4E | 78, 78, 78 | 0, 0%, 31% | 117 | | ![xgray6](https://place-hold.it/24x24/585858?text=+) | xgray6 | 240 | `g:srcery_xgray6`, `g:srcery_xgray6_cterm` | #585858 | 88, 88, 88 | 0, 0%, 35% | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | ## Installation 128 | 129 | ### Manually 130 | 131 | Download or clone srcery's repository to a location of your choosing and set your `runtimepath` correctly, otherwise srcery will not work as it relies on the `autoload` functionality. 132 | 133 | You can also install with your favourite plugin manager. 134 | 135 | ### Vim 8 136 | 137 | Vim 8 has native support for loading plugins by using `packages`. All you need to do to, is to clone this repository into `~/.vim/pack/themes/opt`. 138 | 139 | git clone https://github.com/srcery-colors/srcery-vim ~/.vim/pack/themes/opt/srcery-vim 140 | 141 | And then set your `.vimrc` accordingly. 142 | 143 | ```vim 144 | packadd! srcery-vim 145 | colorscheme srcery 146 | ``` 147 | 148 | The same works for Neovim, but you have to clone it into a path where Neovim can 149 | find it. 150 | 151 | git clone https://github.com/srcery-colors/srcery-vim $XDG_CONFIG_HOME/nvim/pack/themes/opt 152 | 153 | ### [dein.vim](https://github.com/Shougo/dein.vim) 154 | 155 | ```vim 156 | call dein#add('srcery-colors/srcery-vim') 157 | ``` 158 | 159 | ### [vim-pathogen](https://github.com/tpope/vim-pathogen) 160 | 161 | ```shell 162 | cd ~/.vim/bundle 163 | git clone https://github.com/srcery-colors/srcery-vim 164 | ``` 165 | 166 | ### [vim-plug](https://github.com/junegunn/vim-plug) 167 | 168 | ```vim 169 | Plug 'srcery-colors/srcery-vim' 170 | ``` 171 | ### [packer](https://github.com/wbthomason/packer.nvim) 172 | ```lua 173 | use {'srcery-colors/srcery-vim', as = 'srcery'} 174 | ``` 175 | 176 | ## Usage 177 | 178 | ``` 179 | :color srcery 180 | ``` 181 | 182 | If you like what you see and decide to make srcery your default colorscheme, add the relevant line to your `.vimrc`: 183 | 184 | ```vim 185 | colorscheme srcery 186 | ``` 187 | 188 | ## Configuration 189 | 190 | Srcery includes a few toggles due to discrepancies in the various setups possible. 191 | To change any of these you'd put something like this in your `.vimrc` 192 | 193 | ```vim 194 | let g:srcery_italic = 1 195 | ``` 196 | 197 | Make sure that you set these variables before assigning `colorscheme`. 198 | 199 | ### Colors 200 | 201 | You can customize each of Srcery's colors, to customize say the red color: 202 | 203 | ```vim 204 | let g:srcery_red = '#FF0000' 205 | ``` 206 | 207 | Inside a 256-color terminal emulator, additional colors are configurable 208 | via setting the corresponding variable with the \_cterm suffix, e.g. 209 | 210 | ```vim 211 | let g:srcery_hard_black_cterm = 232 212 | ``` 213 | 214 | Refer to the [table](#TUI) for a full list of color variables, hexes and more. 215 | 216 | This will only work on `set termguicolors` and in gVim, to override terminal 217 | colors, do so in your [terminal 218 | configuration](https://github.com/srcery-colors/srcery-terminal). 219 | 220 | ### Options 221 | 222 | #### g:srcery\_bold 223 | 224 | Enables bold text. 225 | 226 | Default: 1 227 | 228 | #### g:srcery\_italic 229 | 230 | Enables italic text. 231 | 232 | Default: gui 1, term 0 233 | 234 | #### g:srcery\_underline 235 | 236 | Enables underlined text. 237 | 238 | Default: 1 239 | 240 | #### g:srcery\_undercurl 241 | 242 | Enables undercurled text. 243 | 244 | Default: 1 245 | 246 | #### g:srcery\_strikethrough 247 | 248 | Enables strikethrough text. 249 | 250 | Default: 1 251 | 252 | #### g:srcery\_inverse 253 | 254 | Enable or disable inverse highlighting (foreground becomes background, 255 | vice versa). This is used for visual selection, search highlights and 256 | some other things. 257 | 258 | Srcery will fall back to other methods of highlighting if this is 259 | disabled. 260 | 261 | Default: 1 262 | 263 | #### g:srcery\_inverse\_matches 264 | 265 | Highlight search matches using inverse colors. 266 | 267 | Default: 0 268 | 269 | #### g:srcery\_inverse\_match\_paren 270 | 271 | When enabled will highlight matching delimiters using inverse colors. 272 | (`:DoMatchParen`) 273 | 274 | Works best with [Rainbow parenthesis](https://github.com/kien/rainbow_parentheses.vim). 275 | 276 | Default: 0 277 | 278 | #### g:srcery\_dim\_lisp\_paren 279 | 280 | Dims lisp dialects delimiters to a fairly dark gray (xgray5 specifically). 281 | 282 | Default: 0 283 | 284 | #### g:srcery\_guisp\_fallback 285 | 286 | Sets up alternate highlighting for colored underline/undercurl. Some 287 | environments are unable to color underline, so this setting will set either the 288 | background or foreground to whatever color the underline is supposed to be. 289 | 290 | This comes in handy if colored underline doesn't work, or underline is disabled 291 | entirely. 292 | 293 | Default: 'NONE' 294 | 295 | Possible Values: 'fg', 'bg' 296 | 297 | #### g:srcery\_italic\_types 298 | 299 | Italicize types if italic is enabled. 300 | 301 | Default: 0 302 | 303 | #### g:srcery\_bg 304 | 305 | Let's you customize the background color. This var takes a list with two 306 | values, with a quoted HEX in the first position, and a terminal color index for 307 | the second position. This lets you set both a 24-bit color, and a 8bit terminal 308 | color index. 309 | 310 | You can specify `'NONE'` as one of the values to make it transparent, as such 311 | `['NONE', 'NONE']` would be the same as the previous option 312 | `g:srcery_bg_passthrough = 1`. 313 | 314 | You can specify `'DEFAULT'` as one of the values in order to use that 315 | position's default value. 316 | 317 | Default: `[g:srcery_black, 0]` 318 | 319 | #### g:srcery\_hard\_black\_terminal\_bg 320 | 321 | If enabled, will set the terminal background in vim to hard black. 322 | Note that this currently only works in Vim, not Neovim. 323 | 324 | Default: 1 325 | 326 | ## Screenshots 327 | 328 | viml, bash 329 | ![viml\_bash](https://raw.githubusercontent.com/srcery-colors/srcery-assets/master/vim/viml_bash.png) 330 | 331 | clojure, elisp 332 | ![lisp](https://raw.githubusercontent.com/srcery-colors/srcery-assets/master/vim/lisp.png) 333 | 334 | c, rust 335 | ![c\_rust](https://raw.githubusercontent.com/srcery-colors/srcery-assets/master/vim/c_rust.png) 336 | 337 | python, js 338 | ![py\_js](https://raw.githubusercontent.com/srcery-colors/srcery-assets/master/vim/py_js.png) 339 | 340 | git, terminal 341 | ![git\_term](https://raw.githubusercontent.com/srcery-colors/srcery-assets/master/vim/git_term.png) 342 | 343 | Typeface used in screenshots is [Iosevka](https://github.com/be5invis/Iosevka) 344 | 345 | ## Plugin support 346 | 347 | ### Lightline 348 | 349 | ![lightline](https://raw.githubusercontent.com/srcery-colors/srcery-assets/master/vim/lightline.png) 350 | 351 | [Lightline](https://github.com/itchyny/lightline.vim) colorscheme. 352 | To use it, include 'srcery' value in lightline configuration, like so: 353 | 354 | ```vim 355 | let g:lightline = { 356 | \ 'colorscheme': 'srcery', 357 | \ } 358 | ``` 359 | ### Lualine 360 | 361 | [Lualine](https://github.com/nvim-lualine/lualine.nvim) colorscheme. 362 | It's the same as Lightline's. Enable it in your configuration: 363 | 364 | ``` 365 | require('lualine').setup { 366 | options = { 367 | theme = 'srcery', 368 | }, 369 | } 370 | ``` 371 | 372 | ### Airline 373 | 374 | ![airline](https://raw.githubusercontent.com/srcery-colors/srcery-assets/master/vim/airline.png) 375 | 376 | Thanks to [MindTooth](https://github.com/MindTooth), Srcery now includes an [Airline](https://github.com/vim-airline/vim-airline) theme. 377 | 378 | ### Other 379 | 380 | These don't require any additional configuration. 381 | 382 | * [ale](https://github.com/w0rp/ale) 383 | * [coc.nvim](https://github.com/neoclide/coc.nvim) 384 | * [ctrlp.vim](https://github.com/ctrlpvim/ctrlp.vim) 385 | * [fzf.vim](https://github.com/junegunn/fzf.vim) 386 | * [nerdtree](https://github.com/preservim/nerdtree) 387 | * [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) 388 | * [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter) 389 | * [telescope-nvim](https://github.com/nvim-telescope/telescope.nvim) 390 | * [vim-clap](https://github.com/liuchengxu/vim-clap) 391 | * [vim-gitgutter](https://github.com/airblade/vim-gitgutter) 392 | * [vim-indent-guides](https://github.com/nathanaelkane/vim-indent-guides) 393 | * [vim-sneak](https://github.com/justinmk/vim-sneak) 394 | * [vim-startify](https://github.com/mhinz/vim-startify) 395 | 396 | Plugin support is still a work in progress and more will come, if there is 397 | anything missing that you'd like to add please open an issue and let me know. 398 | 399 | ## Attribution 400 | 401 | This project started as essentially a palette swap of 402 | [Gruvbox](https://github.com/morhetz/gruvbox) and all credit goes to the 403 | maintainers of that fantastic color scheme. I wanted something a bit sharper, but 404 | I loved the syntax color choices of Gruvbox. I also tried to make the theme as 405 | simple to use as possible, which was inspired by 406 | [Flattened](https://github.com/romainl/flattened). Other themes that influenced 407 | Srcery: 408 | 409 | * [Base16](http://chriskempson.com/projects/base16/) 410 | * [Badwolf](https://github.com/sjl/badwolf) 411 | * [Jellybeans](https://github.com/nanotech/jellybeans.vim) 412 | * [Molokai](https://github.com/tomasr/molokai) 413 | 414 | ## Troubleshooting 415 | 416 | ### Colors don't look right 417 | 418 | Ensure that 256 colors are enabled in vim by setting this option **before** setting the colorscheme. 419 | 420 | ```viml 421 | set t_Co=256 422 | ``` 423 | 424 | ### 24-bit color, tmux and Neovim 425 | 426 | If you want to use GUI colors in terminal make sure that tmux pass 427 | through 24-bit color codes. For example, if you use 428 | [Termite](https://github.com/thestinger/termite) add it to the 429 | terminal overrides setting: 430 | 431 | ```tmux 432 | set -ga terminal-overrides ",xterm-termite:Tc" 433 | ``` 434 | 435 | For other terminals, replace `xterm-termite` with the relevant 436 | terminal type. (stored in `$TERM`). 437 | 438 | See [Arch wiki](https://wiki.archlinux.org/index.php/Tmux#24-bit_color) 439 | and this [issue](https://github.com/srcery-colors/srcery-vim/issues/36). 440 | 441 | ## Extra 442 | 443 | ### Emacs 444 | 445 | Check out [srcery-emacs](https://github.com/srcery-colors/srcery-emacs) 446 | -------------------------------------------------------------------------------- /autoload/airline/themes/srcery.vim: -------------------------------------------------------------------------------- 1 | " vim-airline-srcery theme 2 | " vim: expandtab shiftwidth=2 tabstop=2 : 3 | 4 | 5 | " Srcery Palette {{{ 6 | 7 | " Normal Colors 8 | let s:black = srcery#helper#GetColor('SrceryBlack') 9 | let s:red = srcery#helper#GetColor('SrceryRed') 10 | let s:green = srcery#helper#GetColor('SrceryGreen') 11 | let s:yellow = srcery#helper#GetColor('SrceryYellow') 12 | let s:blue = srcery#helper#GetColor('SrceryBlue') 13 | let s:magenta = srcery#helper#GetColor('SrceryMagenta') 14 | let s:cyan = srcery#helper#GetColor('SrceryCyan') 15 | let s:white = srcery#helper#GetColor('SrceryWhite') 16 | 17 | " Bright Colors 18 | let s:bright_black = srcery#helper#GetColor('SrceryBrightBlack') 19 | let s:bright_red = srcery#helper#GetColor('SrceryBrightRed') 20 | let s:bright_green = srcery#helper#GetColor('SrceryBrightGreen') 21 | let s:bright_yellow = srcery#helper#GetColor('SrceryBrightYellow') 22 | let s:bright_blue = srcery#helper#GetColor('SrceryBrightBlue') 23 | let s:bright_magenta = srcery#helper#GetColor('SrceryBrightMagenta') 24 | let s:bright_cyan = srcery#helper#GetColor('SrceryBrightCyan') 25 | let s:bright_white = srcery#helper#GetColor('SrceryBrightWhite') 26 | 27 | " Extra Colors 28 | let s:orange = srcery#helper#GetColor('SrceryOrange') 29 | let s:bright_orange = srcery#helper#GetColor('SrceryBrightOrange') 30 | let s:hard_black = srcery#helper#GetColor('SrceryHardBlack') 31 | let s:xgray1 = srcery#helper#GetColor('SrceryXgray1') 32 | let s:xgray2 = srcery#helper#GetColor('SrceryXgray2') 33 | let s:xgray3 = srcery#helper#GetColor('SrceryXgray3') 34 | let s:xgray4 = srcery#helper#GetColor('SrceryXgray4') 35 | let s:xgray5 = srcery#helper#GetColor('SrceryXgray5') 36 | let s:xgray6 = srcery#helper#GetColor('SrceryXgray6') 37 | 38 | "}}} 39 | 40 | 41 | " Theme Initializing {{{ 42 | let g:airline#themes#srcery#palette = {} 43 | let s:modified = { 'airline_c': [ s:orange[0] , '' , s:orange[1] , '' , '' ] } 44 | 45 | " }}} 46 | 47 | 48 | " Mode Config {{{ 49 | 50 | " Command Mode 51 | let s:c1 = [ s:black[0] , s:bright_white[0] , s:black[1] , s:bright_white[1] ] 52 | let s:c2 = [ s:bright_white[0] , s:xgray3[0] , s:bright_white[1] , s:xgray3[1] ] 53 | let s:c3 = [ s:bright_white[0] , s:xgray1[0] , s:bright_white[1] , s:xgray1[1] ] 54 | let g:airline#themes#srcery#palette.commandline = airline#themes#generate_color_map(s:c1, s:c2, s:c3) 55 | let g:airline#themes#srcery#palette.commandline_modified = s:modified 56 | let g:airline#themes#srcery#palette.commandline_paste = s:modified 57 | 58 | " Normal Mode 59 | let s:n1 = [ s:bright_white[0] , s:xgray4[0] , s:bright_white[1] , s:xgray4[1] ] 60 | let s:n2 = [ s:bright_white[0] , s:xgray3[0] , s:bright_white[1] , s:xgray3[1] ] 61 | let s:n3 = [ s:bright_white[0] , s:xgray1[0] , s:bright_white[1] , s:xgray1[1] ] 62 | let g:airline#themes#srcery#palette.normal = airline#themes#generate_color_map(s:n1, s:n2, s:n3) 63 | let g:airline#themes#srcery#palette.normal_modified = s:modified 64 | let g:airline#themes#srcery#palette.normal_paste = s:modified 65 | 66 | " Inactive Mode 67 | let s:in1 = [ s:xgray6[0] , s:xgray4[0] , s:bright_black[1] , s:xgray4[1] ] 68 | let s:in2 = [ s:xgray6[0] , s:xgray3[0] , s:bright_black[1] , s:xgray3[1] ] 69 | let s:in3 = [ s:xgray6[0] , s:xgray2[0] , s:bright_black[1] , s:xgray2[1] ] 70 | let g:airline#themes#srcery#palette.inactive = airline#themes#generate_color_map(s:in1, s:in2, s:in3) 71 | let g:airline#themes#srcery#palette.inactive_modified = s:modified 72 | 73 | " Insert Mode 74 | let s:i1 = [ s:black[0] , s:bright_white[0] , s:black[1] , s:bright_white[1] ] 75 | let s:i2 = [ s:black[0] , s:bright_black[0] , s:black[1] , s:bright_black[1] ] 76 | let s:i3 = [ s:bright_white[0] , s:xgray1[0] , s:bright_white[1] , s:xgray1[1] ] 77 | let g:airline#themes#srcery#palette.insert = airline#themes#generate_color_map(s:i1, s:i2, s:i3) 78 | let g:airline#themes#srcery#palette.insert_modified = s:modified 79 | 80 | " Replace Mode 81 | let s:r1 = [ s:bright_white[0] , s:bright_red[0] , s:bright_white[1] , s:bright_red[1] ] 82 | let s:r2 = [ s:black[0] , s:bright_black[0] , s:black[1] , s:bright_black[1] ] 83 | let s:r3 = [ s:bright_white[0] , s:xgray1[0] , s:bright_white[1] , s:xgray1[1] ] 84 | let g:airline#themes#srcery#palette.replace = airline#themes#generate_color_map(s:r1, s:r2, s:r3) 85 | let g:airline#themes#srcery#palette.replace_modified = s:modified 86 | 87 | " Terminal Mode 88 | let s:t1 = [ s:black[0] , s:yellow[0] , s:black[1] , s:yellow[1] ] 89 | let s:t2 = [ s:bright_white[0] , s:xgray3[0] , s:bright_white[1] , s:xgray3[1] ] 90 | let s:t3 = [ s:bright_white[0] , s:xgray1[0] , s:bright_white[1] , s:xgray1[1] ] 91 | let g:airline#themes#srcery#palette.terminal = airline#themes#generate_color_map(s:t1, s:t2, s:t3) 92 | let g:airline#themes#srcery#palette.terminal.airline_term = s:t3 93 | 94 | " Visual Mode 95 | let s:v1 = [ s:black[0] , s:cyan[0] , s:black[1] , s:cyan[1] ] 96 | let s:v2 = [ s:bright_white[0] , s:xgray5[0] , s:bright_white[1] , s:xgray5[1] ] 97 | let s:v3 = [ s:bright_white[0] , s:xgray1[0] , s:bright_white[1] , s:xgray1[1] ] 98 | let g:airline#themes#srcery#palette.visual = airline#themes#generate_color_map(s:v1, s:v2, s:v3) 99 | let g:airline#themes#srcery#palette.visual_modified = s:modified 100 | 101 | " }}} 102 | 103 | 104 | " Plugin Settings {{{ 105 | 106 | " ctrlp.vim 107 | if get(g:, 'loaded_ctrlp', 0) 108 | let s:cp1 = [ s:bright_white[0] , s:xgray2[0] , s:bright_white[1] , s:xgray2[1] ] 109 | let s:cp2 = [ s:bright_white[0] , s:xgray5[0] , s:bright_white[1] , s:xgray5[1] ] 110 | let s:cp3 = [ s:bright_white[0] , s:xgray3[0] , s:bright_white[1] , s:xgray3[1] ] 111 | 112 | let g:airline#themes#srcery#palette.ctrlp = airline#extensions#ctrlp#generate_color_map(s:cp1, s:cp2, s:cp3) 113 | endif 114 | 115 | " }}} 116 | -------------------------------------------------------------------------------- /autoload/clap/themes/srcery.vim: -------------------------------------------------------------------------------- 1 | " Author: Birger J. Nordolum 2 | 3 | " Description: Clap theme based on the Srcery color scheme. The theme 4 | " require some tweaks to make it work. If you plan on copying or 5 | " building upon this code for your own colorscheme, make sure that you 6 | " are aware of the additional tweaks for Srcery. 7 | 8 | 9 | let s:save_cpo = &cpoptions 10 | set cpoptions&vim 11 | 12 | 13 | " Srcery Palette {{{ 14 | 15 | " Normal Colors 16 | let s:black = srcery#helper#GetColor('SrceryBlack') 17 | let s:red = srcery#helper#GetColor('SrceryRed') 18 | let s:green = srcery#helper#GetColor('SrceryGreen') 19 | let s:yellow = srcery#helper#GetColor('SrceryYellow') 20 | let s:blue = srcery#helper#GetColor('SrceryBlue') 21 | let s:magenta = srcery#helper#GetColor('SrceryMagenta') 22 | let s:cyan = srcery#helper#GetColor('SrceryCyan') 23 | let s:white = srcery#helper#GetColor('SrceryWhite') 24 | 25 | " Bright Colors 26 | let s:bright_black = srcery#helper#GetColor('SrceryBrightBlack') 27 | let s:bright_red = srcery#helper#GetColor('SrceryBrightRed') 28 | let s:bright_green = srcery#helper#GetColor('SrceryBrightGreen') 29 | let s:bright_yellow = srcery#helper#GetColor('SrceryBrightYellow') 30 | let s:bright_blue = srcery#helper#GetColor('SrceryBrightBlue') 31 | let s:bright_magenta = srcery#helper#GetColor('SrceryBrightMagenta') 32 | let s:bright_cyan = srcery#helper#GetColor('SrceryBrightCyan') 33 | let s:bright_white = srcery#helper#GetColor('SrceryBrightWhite') 34 | 35 | " Extra Colors 36 | let s:orange = srcery#helper#GetColor('SrceryOrange') 37 | let s:bright_orange = srcery#helper#GetColor('SrceryBrightOrange') 38 | let s:hard_black = srcery#helper#GetColor('SrceryHardBlack') 39 | let s:xgray1 = srcery#helper#GetColor('SrceryXgray1') 40 | let s:xgray2 = srcery#helper#GetColor('SrceryXgray2') 41 | let s:xgray3 = srcery#helper#GetColor('SrceryXgray3') 42 | let s:xgray4 = srcery#helper#GetColor('SrceryXgray4') 43 | let s:xgray5 = srcery#helper#GetColor('SrceryXgray5') 44 | let s:xgray6 = srcery#helper#GetColor('SrceryXgray6') 45 | 46 | "}}} 47 | " Srcery Tweaks {{{ 48 | 49 | " The following tweaks are done to make sure that the theme works 50 | " properly. Because Srcery has a transparent background as an option, 51 | " some additional actions were taken to ensure that the clap colors look 52 | " right regardless of this setting. 53 | 54 | " We need to tweak both the SignColumn and ClapSymbol to set the colors 55 | " correctly. When using the transparent option, we explicitly need to 56 | " change the symbol color. 57 | 58 | " Save original SignColumn 59 | let s:original_signcolumn_bg_color = srcery#helper#GetColor('SignColumn', 'bg') 60 | 61 | 62 | " We use an augroup to load/unload tweaks needed for the theme. Clap 63 | " includes some triggers that we can hook onto. 64 | 65 | function! ClapSrceryLoad() abort 66 | " Set column color to NONE so that clap can control this. 67 | " Note! This changes also the normal SignColumn color of the 68 | " main window. Might result in unexpected changes. 69 | highlight SignColumn ctermbg=NONE guibg=NONE 70 | 71 | " Only execute the color change when the variable 72 | " `g:srcery_transparent_background` set to 1. This is for 73 | " making the rounded corners display correctly. Clap read the 74 | " `Normal` highlight color, but in this case it's not enough, 75 | " and hence the explicit change. 76 | if exists('g:srcery_transparent_background') 77 | let l:clap_symbol_style = 'ctermbg=' .s:black[1]. ' guibg=' .s:black[0] 78 | 79 | execute 'highlight ClapSymbol ' . l:clap_symbol_style 80 | endif 81 | endfunction 82 | 83 | function! ClapSrceryUnload() abort 84 | " Revert the change made to SignColumn.. 85 | let l:signcolumn = 'ctermbg=' . 86 | \ (s:original_signcolumn_bg_color[1] ? s:original_signcolumn_bg_color[1] : 'NONE') . 87 | \' guibg=' . 88 | \ (s:original_signcolumn_bg_color[0] ? s:original_signcolumn_bg_color[0] : 'NONE') 89 | 90 | execute 'highlight SignColumn ' . l:signcolumn 91 | endfunction 92 | 93 | augroup ClapSrcery 94 | autocmd! 95 | 96 | autocmd User ClapOnEnter call ClapSrceryLoad() 97 | autocmd User ClapOnExit call ClapSrceryUnload() 98 | augroup END 99 | 100 | " }}} 101 | " Clap Theme {{{ 102 | 103 | " The tweaks below is copied from the upstream code, but tweaked to use 104 | " Srcery's colors. 105 | " Upstream: https://github.com/liuchengxu/vim-clap/blob/master/autoload/clap/themes/material_design_dark.vim 106 | 107 | let s:palette = {} 108 | 109 | let s:palette.display = { 'ctermbg': s:xgray2[1], 'guibg': s:xgray2[0], 'ctermfg': 'NONE', } 110 | 111 | " Let ClapInput, ClapSpinner and ClapSearchText use the same backgound. 112 | let s:bg0 = { 'ctermbg': s:xgray5[1], 'guibg': s:xgray5[0] } 113 | let s:palette.input = s:bg0 114 | let s:palette.spinner = extend({ 'ctermfg': s:bright_orange[1], 'guifg': s:bright_orange[0], 'cterm': 'bold', 'gui': 'bold'}, s:bg0) 115 | let s:palette.search_text = extend({ 'ctermfg': s:bright_white[1], 'guifg': s:bright_white[0], 'cterm': 'bold', 'gui': 'bold' }, s:bg0) 116 | 117 | let s:palette.preview = { 'ctermbg': s:xgray4[1], 'guibg': s:xgray4[0] } 118 | 119 | let s:palette.current_selection = { 'ctermbg': s:xgray3[1], 'guibg': s:xgray3[0], 'cterm': 'bold', 'gui': 'bold' } 120 | let s:palette.current_selection_sign = { 'ctermfg': s:red[1], 'guifg': s:red[0], 'ctermbg': s:xgray3[1], 'guibg': s:xgray3[0]} 121 | 122 | let s:palette.selected = { 'ctermfg': 'NONE', 'guifg': s:bright_blue[0], 'ctermbg': s:xgray3[1], 'guibg': s:xgray3[0] } 123 | let s:palette.selected_sign = { 'ctermfg': s:green[1], 'guifg': s:green[0], 'ctermbg': s:xgray3[1], 'guibg': s:xgray3[0] } 124 | 125 | let g:clap#themes#srcery#palette = s:palette 126 | 127 | " }}} 128 | 129 | 130 | let &cpoptions = s:save_cpo 131 | unlet s:save_cpo 132 | -------------------------------------------------------------------------------- /autoload/lightline/colorscheme/srcery.vim: -------------------------------------------------------------------------------- 1 | " ----------------------------------------------------------------------------- 2 | " File: srcery.vim 3 | " Description: Srcery colorscheme for Lightline (itchyny/lightline.vim) 4 | " Author: Roosta 5 | " Source: https://github.com/morhetz/gruvbox/blob/master/autoload/lightline/colorscheme/gruvbox.vim 6 | " ----------------------------------------------------------------------------- 7 | 8 | if exists('g:lightline') 9 | 10 | " Normal Colors 11 | let s:black = srcery#helper#GetColor('SrceryBlack') 12 | let s:red = srcery#helper#GetColor('SrceryRed') 13 | let s:green = srcery#helper#GetColor('SrceryGreen') 14 | let s:yellow = srcery#helper#GetColor('SrceryYellow') 15 | let s:blue = srcery#helper#GetColor('SrceryBlue') 16 | let s:magenta = srcery#helper#GetColor('SrceryMagenta') 17 | let s:cyan = srcery#helper#GetColor('SrceryCyan') 18 | let s:white = srcery#helper#GetColor('SrceryWhite') 19 | 20 | " Bright Colors 21 | let s:bright_black = srcery#helper#GetColor('SrceryBrightBlack') 22 | let s:bright_red = srcery#helper#GetColor('SrceryBrightRed') 23 | let s:bright_green = srcery#helper#GetColor('SrceryBrightGreen') 24 | let s:bright_yellow = srcery#helper#GetColor('SrceryBrightYellow') 25 | let s:bright_blue = srcery#helper#GetColor('SrceryBrightBlue') 26 | let s:bright_magenta = srcery#helper#GetColor('SrceryBrightMagenta') 27 | let s:bright_cyan = srcery#helper#GetColor('SrceryBrightCyan') 28 | let s:bright_white = srcery#helper#GetColor('SrceryBrightWhite') 29 | 30 | " Extra Colors 31 | let s:orange = srcery#helper#GetColor('SrceryOrange') 32 | let s:bright_orange = srcery#helper#GetColor('SrceryBrightOrange') 33 | let s:hard_black = srcery#helper#GetColor('SrceryHardBlack') 34 | let s:xgray1 = srcery#helper#GetColor('SrceryXgray1') 35 | let s:xgray2 = srcery#helper#GetColor('SrceryXgray2') 36 | let s:xgray3 = srcery#helper#GetColor('SrceryXgray3') 37 | let s:xgray4 = srcery#helper#GetColor('SrceryXgray4') 38 | let s:xgray5 = srcery#helper#GetColor('SrceryXgray5') 39 | let s:xgray6 = srcery#helper#GetColor('SrceryXgray6') 40 | 41 | let s:p = {'normal':{}, 'inactive':{}, 'insert':{}, 'replace':{}, 'visual':{}, 'tabline':{}, 'terminal':{}, 'command':{}} 42 | let s:p.normal.left = [ [ s:bright_white, s:xgray5 ], [ s:bright_white, s:xgray3 ] ] 43 | let s:p.normal.right = [ [ s:bright_white, s:xgray5 ], [ s:bright_white, s:xgray3 ] ] 44 | let s:p.normal.middle = [ [ s:bright_white, s:xgray2 ] ] 45 | let s:p.inactive.right = [ [ s:bright_black, s:xgray2 ], [ s:bright_black, s:xgray2 ] ] 46 | let s:p.inactive.left = [ [ s:bright_black, s:xgray2 ], [ s:bright_black, s:xgray2 ] ] 47 | let s:p.inactive.middle = [ [ s:xgray6, s:xgray2 ] ] 48 | let s:p.insert.left = [ [ s:black, s:bright_white ], [ s:black, s:bright_black ] ] 49 | let s:p.insert.right = [ [ s:black, s:bright_white ], [ s:black, s:bright_black ] ] 50 | let s:p.insert.middle = [ [ s:bright_white, s:xgray2 ] ] 51 | let s:p.replace.left = [ [ s:bright_white, s:bright_red ], [ s:black, s:bright_black ] ] 52 | let s:p.replace.right = [ [ s:bright_white, s:bright_red ], [ s:black, s:bright_black ] ] 53 | let s:p.replace.middle = [ [ s:bright_white, s:xgray2 ] ] 54 | let s:p.visual.left = [ [ s:black, s:cyan ], [ s:bright_white, s:xgray5 ] ] 55 | let s:p.visual.right = [ [ s:black, s:cyan ], [ s:bright_white, s:xgray5 ] ] 56 | let s:p.visual.middle = [ [ s:bright_white, s:xgray2 ] ] 57 | let s:p.tabline.left = [ [ s:bright_black, s:xgray2 ] ] 58 | let s:p.tabline.tabsel = [ [ s:bright_white, s:xgray5 ] ] 59 | let s:p.tabline.middle = [ [ s:black, s:xgray2 ] ] 60 | let s:p.tabline.right = [ [ s:bright_white, s:xgray5 ] ] 61 | let s:p.normal.error = [ [ s:bright_white, s:red ] ] 62 | let s:p.normal.warning = [ [ s:black, s:orange ] ] 63 | let s:p.terminal.left = [ [ s:black, s:green ], [ s:bright_white, s:xgray5 ] ] 64 | let s:p.terminal.right = [ [ s:black, s:green ], [ s:bright_white, s:xgray5 ] ] 65 | let s:p.terminal.middle = [ [ s:bright_white, s:xgray2 ] ] 66 | let s:p.command.left = [ [ s:black, s:yellow ], [ s:bright_white, s:xgray5 ] ] 67 | let s:p.command.right = [ [ s:black, s:yellow ], [ s:bright_white, s:xgray5 ] ] 68 | let s:p.command.middle = [ [ s:bright_white, s:xgray2 ] ] 69 | 70 | 71 | let g:lightline#colorscheme#srcery#palette = lightline#colorscheme#flatten(s:p) 72 | endif 73 | -------------------------------------------------------------------------------- /autoload/srcery/helper.vim: -------------------------------------------------------------------------------- 1 | " ----------------------------------------------------------------------------- 2 | " File: helper.vim 3 | " Description: Srcery colorscheme helpers functions 4 | " Authors: Daniel Berg , Birger J. Nordolum 5 | " Last Modified: 2020-08-27 6 | " ----------------------------------------------------------------------------- 7 | 8 | " Helper to get a source color defined in colorscheme 9 | function! srcery#helper#GetColor(group, ...) abort 10 | " Arguments: group, what 11 | 12 | " optionally pass a 'what' argument, defaults to 'fg' 13 | if a:0 > 0 14 | let l:what = a:1 15 | else 16 | let l:what = 'fg' 17 | endif 18 | 19 | let l:gui_color = synIDattr(hlID(a:group), l:what, 'gui') 20 | let l:term_color = synIDattr(hlID(a:group), l:what, 'cterm') 21 | 22 | return [ l:gui_color, l:term_color ] 23 | endfunction 24 | 25 | " vim: fdm=marker ts=2 sts=2 sw=2 fdl=0: 26 | -------------------------------------------------------------------------------- /colors/srcery.vim: -------------------------------------------------------------------------------- 1 | " 'srcery.vim' -- Vim color scheme. 2 | " Maintainer: Roosta (mail@roosta.sh) 3 | " Description: Colorscheme that focus ease of use and clearly defined contrasting colors with a slightly earthy tone. 4 | " Original Source: https://github.com/morhetz/gruvbox 5 | 6 | scriptencoding utf-8 7 | 8 | set background=dark 9 | 10 | if v:version > 580 11 | hi clear 12 | if exists('syntax_on') 13 | syntax reset 14 | endif 15 | endif 16 | 17 | let g:colors_name='srcery' 18 | 19 | if !has('gui_running') && &t_Co != 256 20 | finish 21 | endif 22 | 23 | " Setup Variables: {{{ 24 | 25 | " Colors {{{ 26 | 27 | if !exists('g:srcery_black') 28 | let g:srcery_black='#1C1B19' 29 | endif 30 | 31 | if !exists('g:srcery_red') 32 | let g:srcery_red='#EF2F27' 33 | endif 34 | 35 | if !exists('g:srcery_green') 36 | let g:srcery_green='#519F50' 37 | endif 38 | 39 | if !exists('g:srcery_yellow') 40 | let g:srcery_yellow='#FBB829' 41 | endif 42 | 43 | if !exists('g:srcery_blue') 44 | let g:srcery_blue='#2C78BF' 45 | endif 46 | 47 | if !exists('g:srcery_magenta') 48 | let g:srcery_magenta='#E02C6D' 49 | endif 50 | 51 | if !exists('g:srcery_cyan') 52 | let g:srcery_cyan='#0AAEB3' 53 | endif 54 | 55 | if !exists('g:srcery_white') 56 | let g:srcery_white='#BAA67F' 57 | endif 58 | 59 | if !exists('g:srcery_bright_black') 60 | let g:srcery_bright_black='#918175' 61 | endif 62 | 63 | if !exists('g:srcery_bright_red') 64 | let g:srcery_bright_red='#F75341' 65 | endif 66 | 67 | if !exists('g:srcery_bright_green') 68 | let g:srcery_bright_green='#98BC37' 69 | endif 70 | 71 | if !exists('g:srcery_bright_yellow') 72 | let g:srcery_bright_yellow='#FED06E' 73 | endif 74 | 75 | if !exists('g:srcery_bright_blue') 76 | let g:srcery_bright_blue='#68A8E4' 77 | endif 78 | 79 | if !exists('g:srcery_bright_magenta') 80 | let g:srcery_bright_magenta='#FF5C8F' 81 | endif 82 | 83 | if !exists('g:srcery_bright_cyan') 84 | let g:srcery_bright_cyan='#2BE4D0' 85 | endif 86 | 87 | if !exists('g:srcery_bright_white') 88 | let g:srcery_bright_white='#FCE8C3' 89 | endif 90 | 91 | if !exists('g:srcery_orange') 92 | let g:srcery_orange='#FF5F00' 93 | endif 94 | 95 | if !exists('g:srcery_orange_cterm') 96 | let g:srcery_orange_cterm=202 97 | endif 98 | 99 | if !exists('g:srcery_bright_orange') 100 | let g:srcery_bright_orange='#FF8700' 101 | endif 102 | 103 | if !exists('g:srcery_bright_orange_cterm') 104 | let g:srcery_bright_orange_cterm=208 105 | endif 106 | 107 | if !exists('g:srcery_hard_black') 108 | let g:srcery_hard_black='#121212' 109 | endif 110 | 111 | if !exists('g:srcery_hard_black_cterm') 112 | let g:srcery_hard_black_cterm=233 113 | endif 114 | 115 | if !exists('g:srcery_xgray1') 116 | let g:srcery_xgray1='#262626' 117 | endif 118 | 119 | if !exists('g:srcery_xgray1_cterm') 120 | let g:srcery_xgray1_cterm=235 121 | endif 122 | 123 | if !exists('g:srcery_xgray2') 124 | let g:srcery_xgray2='#303030' 125 | endif 126 | 127 | if !exists('g:srcery_xgray2_cterm') 128 | let g:srcery_xgray2_cterm=236 129 | endif 130 | 131 | if !exists('g:srcery_xgray3') 132 | let g:srcery_xgray3='#3A3A3A' 133 | endif 134 | 135 | if !exists('g:srcery_xgray3_cterm') 136 | let g:srcery_xgray3_cterm=237 137 | endif 138 | 139 | if !exists('g:srcery_xgray4') 140 | let g:srcery_xgray4='#444444' 141 | endif 142 | 143 | if !exists('g:srcery_xgray4_cterm') 144 | let g:srcery_xgray4_cterm=238 145 | endif 146 | 147 | if !exists('g:srcery_xgray5') 148 | let g:srcery_xgray5='#4E4E4E' 149 | endif 150 | 151 | if !exists('g:srcery_xgray5_cterm') 152 | let g:srcery_xgray5_cterm=239 153 | endif 154 | 155 | if !exists('g:srcery_xgray6') 156 | let g:srcery_xgray6='#585858' 157 | endif 158 | 159 | if !exists('g:srcery_xgray6_cterm') 160 | let g:srcery_xgray6_cterm=240 161 | endif 162 | 163 | " }}} 164 | " Options {{{ 165 | 166 | if !exists('g:srcery_bold') 167 | let g:srcery_bold=1 168 | endif 169 | 170 | if !exists('g:srcery_italic') 171 | if has('gui_running') || $TERM_ITALICS ==? 'true' 172 | let g:srcery_italic=1 173 | else 174 | let g:srcery_italic=0 175 | endif 176 | endif 177 | 178 | if !exists('g:srcery_undercurl') 179 | let g:srcery_undercurl=1 180 | endif 181 | 182 | if !exists('g:srcery_underline') 183 | let g:srcery_underline=1 184 | endif 185 | 186 | if !exists('g:srcery_strikethrough') 187 | let g:srcery_strikethrough=1 188 | endif 189 | 190 | if !exists('g:srcery_inverse') 191 | let g:srcery_inverse=1 192 | endif 193 | 194 | if !exists('g:srcery_inverse_matches') 195 | let g:srcery_inverse_matches=0 196 | endif 197 | 198 | if !exists('g:srcery_inverse_match_paren') 199 | let g:srcery_inverse_match_paren=0 200 | endif 201 | 202 | if !exists('g:srcery_dim_lisp_paren') 203 | let g:srcery_dim_lisp_paren=0 204 | endif 205 | 206 | if !exists('g:srcery_guisp_fallback') || index(['fg', 'bg'], g:srcery_guisp_fallback) == -1 207 | let g:srcery_guisp_fallback='NONE' 208 | endif 209 | 210 | if !exists('g:srcery_italic_types') 211 | let g:srcery_italic_types=0 212 | endif 213 | 214 | if !exists('g:srcery_bg') 215 | "Sets the default color for both guisp and cterm backgrounds. 216 | let g:srcery_bg=[g:srcery_black, 0] 217 | elseif (index(g:srcery_bg, 'DEFAULT') >= 0) || (index(g:srcery_bg, 'NONE') >= 0 && has('gui_running')) 218 | "Defaults should be set if the user specifies it, or if the background is set as 'NONE' whilst the gui is running. 219 | for i in [0, 1] 220 | if g:srcery_bg[i] ==# 'DEFAULT' || (g:srcery_bg[i] ==# 'NONE' && has('gui_running')) 221 | let g:srcery_bg[i] = (i==1 ? 0 : g:srcery_black) 222 | endif 223 | endfor 224 | endif 225 | 226 | if !exists('g:srcery_hard_black_terminal_bg') 227 | let g:srcery_hard_black_terminal_bg=1 228 | endif 229 | 230 | " }}} 231 | 232 | " }}} 233 | 234 | " Palette {{{ 235 | 236 | let s:none = ['NONE', 'NONE'] 237 | 238 | " 16 base colors 239 | let s:black = [g:srcery_black, 0] 240 | let s:red = [g:srcery_red, 1] 241 | let s:green = [g:srcery_green, 2] 242 | let s:yellow = [g:srcery_yellow, 3] 243 | let s:blue = [g:srcery_blue, 4] 244 | let s:magenta = [g:srcery_magenta, 5] 245 | let s:cyan = [g:srcery_cyan, 6] 246 | let s:white = [g:srcery_white, 7] 247 | let s:bright_black = [g:srcery_bright_black, 8] 248 | let s:bright_red = [g:srcery_bright_red, 9] 249 | let s:bright_green = [g:srcery_bright_green, 10] 250 | let s:bright_yellow = [g:srcery_bright_yellow, 11] 251 | let s:bright_blue = [g:srcery_bright_blue, 12] 252 | let s:bright_magenta = [g:srcery_bright_magenta, 13] 253 | let s:bright_cyan = [g:srcery_bright_cyan, 14] 254 | let s:bright_white = [g:srcery_bright_white, 15] 255 | 256 | " xterm colors 257 | let s:orange = [g:srcery_orange, g:srcery_orange_cterm] 258 | let s:bright_orange = [g:srcery_bright_orange, g:srcery_bright_orange_cterm] 259 | let s:hard_black = [g:srcery_hard_black, g:srcery_hard_black_cterm] 260 | let s:xgray1 = [g:srcery_xgray1, g:srcery_xgray1_cterm] 261 | let s:xgray2 = [g:srcery_xgray2, g:srcery_xgray2_cterm] 262 | let s:xgray3 = [g:srcery_xgray3, g:srcery_xgray3_cterm] 263 | let s:xgray4 = [g:srcery_xgray4, g:srcery_xgray4_cterm] 264 | let s:xgray5 = [g:srcery_xgray5, g:srcery_xgray5_cterm] 265 | let s:xgray6 = [g:srcery_xgray6, g:srcery_xgray6_cterm] 266 | 267 | "}}} 268 | 269 | " Setup Emphasis: {{{ 270 | 271 | let s:bold = 'bold,' 272 | if g:srcery_bold == 0 273 | let s:bold = '' 274 | endif 275 | 276 | let s:italic = 'italic,' 277 | if g:srcery_italic == 0 278 | let s:italic = '' 279 | endif 280 | 281 | let s:underline = 'underline,' 282 | if g:srcery_underline == 0 283 | let s:underline = '' 284 | endif 285 | 286 | let s:undercurl = 'undercurl,' 287 | if g:srcery_undercurl == 0 288 | let s:undercurl = '' 289 | endif 290 | 291 | let s:inverse = 'inverse,' 292 | if g:srcery_inverse == 0 293 | let s:inverse = '' 294 | endif 295 | 296 | let s:strikethrough = 'strikethrough,' 297 | if g:srcery_strikethrough == 0 298 | let s:strikethrough = '' 299 | endif 300 | 301 | " }}} 302 | 303 | " Highlighting Function: {{{ 304 | 305 | function! s:HL(group, fg, ...) 306 | " Arguments: group, guifg, guibg, gui, guisp 307 | 308 | " foreground 309 | let l:fg = a:fg 310 | 311 | " background 312 | if a:0 >= 1 313 | let l:bg = a:1 314 | else 315 | let l:bg = s:none 316 | endif 317 | 318 | " emphasis 319 | if a:0 >= 2 && strlen(a:2) 320 | let l:emstr = a:2 321 | else 322 | let l:emstr = 'NONE,' 323 | endif 324 | 325 | " special fallback 326 | if a:0 >= 3 327 | if g:srcery_guisp_fallback !=# 'NONE' 328 | let fg = a:3 329 | endif 330 | 331 | " bg fallback mode should invert higlighting 332 | if g:srcery_guisp_fallback ==# 'bg' 333 | let emstr .= 'inverse,' 334 | endif 335 | endif 336 | 337 | let l:histring = [ 'hi', a:group, 338 | \ 'guifg=' . l:fg[0], 'ctermfg=' . l:fg[1], 339 | \ 'guibg=' . l:bg[0], 'ctermbg=' . l:bg[1], 340 | \ 'gui=' . l:emstr[:-2], 'cterm=' . l:emstr[:-2] 341 | \ ] 342 | 343 | " special 344 | if a:0 >= 3 345 | call add(l:histring, 'guisp=' . a:3[0]) 346 | endif 347 | 348 | execute join(l:histring, ' ') 349 | endfunction 350 | 351 | "}}} 352 | 353 | " Srcery Hi Groups: {{{ 354 | 355 | " memoize common hi groups 356 | call s:HL('SrceryRed', s:red) 357 | call s:HL('SrceryGreen', s:green) 358 | call s:HL('SrceryYellow', s:yellow) 359 | call s:HL('SrceryBlue', s:blue) 360 | call s:HL('SrceryMagenta', s:magenta) 361 | call s:HL('SrceryCyan', s:cyan) 362 | call s:HL('SrceryBlack', s:black) 363 | call s:HL('SrceryWhite', s:white) 364 | 365 | call s:HL('SrceryRedBold', s:red, s:none, s:bold) 366 | call s:HL('SrceryGreenBold', s:green, s:none, s:bold) 367 | call s:HL('SrceryYellowBold', s:yellow, s:none, s:bold) 368 | call s:HL('SrceryBlueBold', s:blue, s:none, s:bold) 369 | call s:HL('SrceryMagentaBold', s:magenta, s:none, s:bold) 370 | call s:HL('SrceryCyanBold', s:cyan, s:none, s:bold) 371 | call s:HL('SrceryBlackBold', s:black, s:none, s:bold) 372 | call s:HL('SrceryWhiteBold', s:white, s:none, s:bold) 373 | 374 | call s:HL('SrceryBrightRed', s:bright_red, s:none) 375 | call s:HL('SrceryBrightGreen', s:bright_green, s:none) 376 | call s:HL('SrceryBrightYellow', s:bright_yellow, s:none) 377 | call s:HL('SrceryBrightBlue', s:bright_blue, s:none) 378 | call s:HL('SrceryBrightMagenta', s:bright_magenta, s:none) 379 | call s:HL('SrceryBrightCyan', s:bright_cyan, s:none) 380 | call s:HL('SrceryBrightBlack', s:bright_black, s:none) 381 | call s:HL('SrceryBrightWhite', s:bright_white) 382 | 383 | call s:HL('SrceryBrightRedBold', s:bright_red, s:none, s:bold) 384 | call s:HL('SrceryBrightGreenBold', s:bright_green, s:none, s:bold) 385 | call s:HL('SrceryBrightYellowBold', s:bright_yellow, s:none, s:bold) 386 | call s:HL('SrceryBrightBlueBold', s:bright_blue, s:none, s:bold) 387 | call s:HL('SrceryBrightMagentaBold', s:bright_magenta, s:none, s:bold) 388 | call s:HL('SrceryBrightCyanBold', s:bright_cyan, s:none, s:bold) 389 | call s:HL('SrceryBrightBlackBold', s:bright_black, s:none, s:bold) 390 | call s:HL('SrceryBrightWhiteBold', s:bright_white, s:none, s:bold) 391 | 392 | " special 393 | call s:HL('SrceryOrange', s:orange) 394 | call s:HL('SrceryBrightOrange', s:bright_orange) 395 | call s:HL('SrceryOrangeBold', s:orange, s:none, s:bold) 396 | call s:HL('SrceryHardBlack', s:hard_black) 397 | call s:HL('SrceryXgray1', s:xgray1) 398 | call s:HL('SrceryXgray2', s:xgray2) 399 | call s:HL('SrceryXgray3', s:xgray3) 400 | call s:HL('SrceryXgray4', s:xgray4) 401 | call s:HL('SrceryXgray5', s:xgray5) 402 | call s:HL('SrceryXgray6', s:xgray6) 403 | 404 | " }}} 405 | 406 | " Setup Terminal Colors For Neovim: {{{ 407 | 408 | if has('nvim') 409 | let g:terminal_color_0 = s:black[0] 410 | let g:terminal_color_8 = s:bright_black[0] 411 | 412 | let g:terminal_color_1 = s:red[0] 413 | let g:terminal_color_9 = s:bright_red[0] 414 | 415 | let g:terminal_color_2 = s:green[0] 416 | let g:terminal_color_10 = s:bright_green[0] 417 | 418 | let g:terminal_color_3 = s:yellow[0] 419 | let g:terminal_color_11 = s:bright_yellow[0] 420 | 421 | let g:terminal_color_4 = s:blue[0] 422 | let g:terminal_color_12 = s:bright_blue[0] 423 | 424 | let g:terminal_color_5 = s:magenta[0] 425 | let g:terminal_color_13 = s:bright_magenta[0] 426 | 427 | let g:terminal_color_6 = s:cyan[0] 428 | let g:terminal_color_14 = s:bright_cyan[0] 429 | 430 | let g:terminal_color_7 = s:white[0] 431 | let g:terminal_color_15 = s:bright_white[0] 432 | endif 433 | 434 | " }}} 435 | 436 | " Setup Terminal Colors For Vim with termguicolors: {{{ 437 | 438 | if exists('*term_setansicolors') 439 | let g:terminal_ansi_colors = repeat([0], 16) 440 | 441 | let g:terminal_ansi_colors[0] = s:black[0] 442 | let g:terminal_ansi_colors[8] = s:bright_black[0] 443 | 444 | let g:terminal_ansi_colors[1] = s:red[0] 445 | let g:terminal_ansi_colors[9] = s:bright_red[0] 446 | 447 | let g:terminal_ansi_colors[2] = s:green[0] 448 | let g:terminal_ansi_colors[10] = s:bright_green[0] 449 | 450 | let g:terminal_ansi_colors[3] = s:yellow[0] 451 | let g:terminal_ansi_colors[11] = s:bright_yellow[0] 452 | 453 | let g:terminal_ansi_colors[4] = s:blue[0] 454 | let g:terminal_ansi_colors[12] = s:bright_blue[0] 455 | 456 | let g:terminal_ansi_colors[5] = s:magenta[0] 457 | let g:terminal_ansi_colors[13] = s:bright_magenta[0] 458 | 459 | let g:terminal_ansi_colors[6] = s:cyan[0] 460 | let g:terminal_ansi_colors[14] = s:bright_cyan[0] 461 | 462 | let g:terminal_ansi_colors[7] = s:white[0] 463 | let g:terminal_ansi_colors[15] = s:bright_white[0] 464 | endif 465 | 466 | " }}} 467 | 468 | " Vanilla Colorscheme: {{{ 469 | 470 | " General UI: {{{ 471 | 472 | " Normal text 473 | " 474 | call s:HL('Normal', s:bright_white, g:srcery_bg) 475 | 476 | call s:HL('FloatBorder', s:white, g:srcery_bg) 477 | call s:HL('NormalFloat', s:none, s:xgray2) 478 | 479 | if v:version >= 700 480 | " Screen line that the cursor is 481 | call s:HL('CursorLine', s:none, s:xgray2) 482 | " Screen column that the cursor is 483 | hi! link CursorColumn CursorLine 484 | 485 | call s:HL('TabLineFill', s:bright_black, s:xgray2) 486 | call s:HL('TabLineSel', s:bright_white, s:xgray5) 487 | 488 | " Not active tab page label 489 | hi! link TabLine TabLineFill 490 | 491 | " Match paired bracket under the cursor 492 | " 493 | if g:srcery_inverse_match_paren == 1 494 | call s:HL('MatchParen', s:bright_magenta, s:none, s:inverse . s:bold) 495 | else 496 | call s:HL('MatchParen', s:bright_magenta, s:none, s:bold) 497 | endif 498 | endif 499 | 500 | if v:version >= 703 501 | " Highlighted screen columns 502 | call s:HL('ColorColumn', s:none, s:xgray2) 503 | 504 | " Concealed element: \lambda → λ 505 | call s:HL('Conceal', s:blue, s:none) 506 | 507 | " Line number of CursorLine 508 | call s:HL('CursorLineNr', s:yellow, g:srcery_bg) 509 | 510 | endif 511 | 512 | hi! link NonText SrceryXgray4 513 | hi! link SpecialKey SrceryBlue 514 | 515 | if g:srcery_inverse == 1 516 | call s:HL('Visual', s:none, s:none, s:inverse) 517 | else 518 | call s:HL('Visual', s:none, s:xgray2, s:bold) 519 | endif 520 | 521 | hi! link VisualNOS Visual 522 | 523 | if g:srcery_inverse == 1 && g:srcery_inverse_matches == 1 524 | call s:HL('Search', s:none, s:none, s:inverse) 525 | call s:HL('IncSearch', s:none, s:none, s:underline . s:inverse . s:bold) 526 | call s:HL('CurSearch', s:none, s:none, s:underline . s:inverse . s:bold) 527 | else 528 | call s:HL('Search', s:none, s:xgray5) 529 | call s:HL('IncSearch', s:none, s:xgray5, s:underline . s:bold) 530 | call s:HL('CurSearch', s:none, s:xgray5, s:underline . s:bold) 531 | endif 532 | 533 | call s:HL('Underlined', s:blue, s:none, s:underline) 534 | 535 | call s:HL('StatusLine', s:bright_white, s:xgray2) 536 | 537 | call s:HL('StatusLineNC', s:bright_black, g:srcery_bg, s:underline) 538 | " The column separating vertically split windows 539 | call s:HL('VertSplit', s:bright_white, g:srcery_bg) 540 | " Current match in wildmenu completion 541 | call s:HL('WildMenu', s:blue, g:srcery_bg, s:bold) 542 | 543 | " Directory names, special names in listing 544 | hi! link Directory SrceryGreenBold 545 | 546 | " Titles for output from :set all, :autocmd, etc. 547 | hi! link Title SrceryGreenBold 548 | 549 | " Error messages on the command line 550 | call s:HL('ErrorMsg', s:bright_white, s:red) 551 | " More prompt: -- More -- 552 | hi! link MoreMsg SrceryYellowBold 553 | " Current mode message: -- INSERT -- 554 | hi! link ModeMsg SrceryYellowBold 555 | " 'Press enter' prompt and yes/no questions 556 | hi! link Question SrceryOrangeBold 557 | " Warning messages 558 | hi! link WarningMsg SrceryRedBold 559 | 560 | " }}} 561 | " Gutter: {{{ 562 | 563 | " Line number for :number and :# commands 564 | call s:HL('LineNr', s:bright_black) 565 | 566 | " Column where signs are displayed 567 | " TODO Possibly need to fix SignColumn 568 | call s:HL('SignColumn', s:none, g:srcery_bg) 569 | " Line used for closed folds 570 | call s:HL('Folded', s:bright_black, g:srcery_bg, s:italic) 571 | " Column where folds are displayed 572 | call s:HL('FoldColumn', s:bright_black, g:srcery_bg) 573 | 574 | " }}} 575 | " Cursor: {{{ 576 | 577 | " Character under cursor 578 | call s:HL('Cursor', s:black, s:yellow) 579 | " Visual mode cursor, selection 580 | hi! link vCursor Cursor 581 | " Input moder cursor 582 | hi! link iCursor Cursor 583 | " Language mapping cursor 584 | hi! link lCursor Cursor 585 | 586 | " }}} 587 | " Syntax Highlighting: {{{ 588 | 589 | hi! link Special SrceryOrange 590 | 591 | call s:HL('Comment', s:bright_black, s:none, s:italic) 592 | 593 | call s:HL('Todo', s:bright_white, g:srcery_bg, s:bold . s:italic) 594 | 595 | call s:HL('Error', s:bright_white, s:red, s:bold) 596 | 597 | " String constant: "this is a string" 598 | call s:HL('String', s:bright_green) 599 | 600 | " Generic statement 601 | hi! link Statement SrceryRed 602 | " if, then, else, endif, swicth, etc. 603 | hi! link Conditional SrceryRed 604 | " for, do, while, etc. 605 | hi! link Repeat SrceryRed 606 | " case, default, etc. 607 | hi! link Label SrceryRed 608 | " try, catch, throw 609 | hi! link Exception SrceryRed 610 | " sizeof, "+", "*", etc. 611 | hi! link Operator SrceryBrightWhite 612 | " Any other keyword 613 | hi! link Keyword SrceryRed 614 | 615 | " Variable name 616 | hi! link Identifier SrceryCyan 617 | " Function name 618 | hi! link Function SrceryYellow 619 | 620 | " Generic preprocessor 621 | hi! link PreProc SrceryCyan 622 | " Preprocessor #include 623 | hi! link Include SrceryCyan 624 | " Preprocessor #define 625 | hi! link Define SrceryCyan 626 | " Same as Define 627 | hi! link Macro SrceryOrange 628 | " Preprocessor #if, #else, #endif, etc. 629 | hi! link PreCondit SrceryCyan 630 | 631 | " Generic constant 632 | hi! link Constant SrceryBrightMagenta 633 | " Character constant: 'c', '/n' 634 | hi! link Character SrceryBrightMagenta 635 | " Boolean constant: TRUE, false 636 | hi! link Boolean SrceryBrightMagenta 637 | " Number constant: 234, 0xff 638 | hi! link Number SrceryBrightMagenta 639 | " Floating point constant: 2.3e10 640 | hi! link Float SrceryBrightMagenta 641 | 642 | " Generic type 643 | if g:srcery_italic_types == 1 && g:srcery_italic == 1 644 | call s:HL('Type', s:bright_blue, s:none, s:italic) 645 | else 646 | hi! link Type SrceryBrightBlue 647 | end 648 | " static, register, volatile, etc 649 | hi! link StorageClass SrceryOrange 650 | " struct, union, enum, etc. 651 | hi! link Structure SrceryCyan 652 | " typedef 653 | hi! link Typedef SrceryMagenta 654 | 655 | if g:srcery_dim_lisp_paren == 1 656 | hi! link Delimiter SrceryXgray6 657 | else 658 | hi! link Delimiter SrceryBrightBlack 659 | endif 660 | 661 | " }}} 662 | " Completion Menu: {{{ 663 | 664 | if v:version >= 700 665 | " Popup menu: normal item 666 | call s:HL('Pmenu', s:bright_white, s:xgray2) 667 | " Popup menu: selected item 668 | call s:HL('PmenuSel', s:bright_white, s:blue, s:bold) 669 | 670 | " Popup menu: scrollbar 671 | call s:HL('PmenuSbar', s:none, g:srcery_bg) 672 | " Popup menu: scrollbar thumb 673 | call s:HL('PmenuThumb', s:none, s:orange) 674 | endif 675 | 676 | " }}} 677 | " Diffs: {{{ 678 | 679 | call s:HL('DiffDelete', s:red, g:srcery_bg) 680 | call s:HL('DiffAdd', s:green, g:srcery_bg) 681 | call s:HL('DiffChange', s:cyan, g:srcery_bg) 682 | call s:HL('DiffText', s:yellow, g:srcery_bg) 683 | 684 | " }}} 685 | " Spelling: {{{ 686 | 687 | if has('spell') 688 | " Not capitalised word, or compile warnings 689 | call s:HL('SpellCap', s:green, s:none, s:bold . s:italic) 690 | " Not recognized word 691 | call s:HL('SpellBad', s:none, s:none, s:undercurl, s:blue) 692 | " Wrong spelling for selected region 693 | call s:HL('SpellLocal', s:none, s:none, s:undercurl, s:cyan) 694 | " Rare word 695 | call s:HL('SpellRare', s:none, s:none, s:undercurl, s:magenta) 696 | endif 697 | 698 | " }}} 699 | " Terminal: {{{ 700 | 701 | if g:srcery_hard_black_terminal_bg == 1 && has('terminal') 702 | " Must set an explicit background as NONE won't work 703 | " Therefore not useful with transparent background option 704 | call s:HL('Terminal', s:bright_white, s:hard_black) 705 | endif 706 | " }}} 707 | " Neovim LSP: {{{ 708 | 709 | if has('nvim') 710 | " for backward compatibility with neovim v0.5.x 711 | hi! link LspDiagnosticsDefaultError DiagnosticError 712 | hi! link LspDiagnosticsDefaultWarning DiagnosticWarn 713 | hi! link LspDiagnosticsDefaultInformation DiagnosticInfo 714 | hi! link LspDiagnosticsDefaultHint DiagnosticHint 715 | hi! link LspDiagnosticsUnderlineError DiagnosticUnderlineError 716 | hi! link LspDiagnosticsUnderlineHint DiagnosticUnderlineHint 717 | hi! link LspDiagnosticsUnderlineInformation DiagnosticUnderlineInfo 718 | hi! link LspDiagnosticsUnderlineWarning DiagnosticUnderlineWarn 719 | 720 | " latest hl groups 721 | hi! link DiagnosticError SrceryBrightRed 722 | hi! link DiagnosticWarn SrceryBrightYellow 723 | hi! link DiagnosticInfo SrceryBrightGreen 724 | hi! link DiagnosticHint SrceryBrightCyan 725 | call s:HL('DiagnosticUnderlineError', s:bright_red, s:none, s:undercurl) 726 | call s:HL('DiagnosticUnderlineWarn', s:bright_yellow, s:none, s:undercurl) 727 | call s:HL('DiagnosticUnderlineInfo', s:bright_green, s:none, s:undercurl) 728 | call s:HL('DiagnosticUnderlineHint', s:bright_cyan, s:none, s:undercurl) 729 | endif 730 | 731 | " }}} 732 | 733 | " }}} 734 | 735 | " Languages: {{{ 736 | 737 | " C: {{{ 738 | 739 | hi! link cOperator SrceryMagenta 740 | hi! link cStructure SrceryYellow 741 | 742 | " }}} 743 | " CoffeeScript: {{{ 744 | 745 | hi! link coffeeExtendedOp SrceryBrightWhite 746 | hi! link coffeeSpecialOp SrceryBrightWhite 747 | hi! link coffeeCurly SrceryYellow 748 | hi! link coffeeParen SrceryBrightWhite 749 | hi! link coffeeBracket SrceryYellow 750 | 751 | " }}} 752 | " CSS: {{{ 753 | 754 | hi! link cssBraces SrceryBrightWhite 755 | hi! link cssFunctionName SrceryYellow 756 | hi! link cssIdentifier SrceryBlue 757 | hi! link cssClassName SrceryBlue 758 | hi! link cssClassNameDot SrceryBlue 759 | hi! link cssColor SrceryBrightMagenta 760 | hi! link cssSelectorOp SrceryBlue 761 | hi! link cssSelectorOp2 SrceryBlue 762 | hi! link cssImportant SrceryGreen 763 | hi! link cssVendor SrceryBlue 764 | hi! link cssMediaProp SrceryYellow 765 | hi! link cssBorderProp SrceryYellow 766 | hi! link cssAttrComma SrceryBrightWhite 767 | 768 | hi! link cssTextProp SrceryYellow 769 | hi! link cssAnimationProp SrceryYellow 770 | hi! link cssUIProp SrceryYellow 771 | hi! link cssTransformProp SrceryYellow 772 | hi! link cssTransitionProp SrceryYellow 773 | hi! link cssPrintProp SrceryYellow 774 | hi! link cssPositioningProp SrceryYellow 775 | hi! link cssBoxProp SrceryYellow 776 | hi! link cssFontDescriptorProp SrceryYellow 777 | hi! link cssFlexibleBoxProp SrceryYellow 778 | hi! link cssBorderOutlineProp SrceryYellow 779 | hi! link cssBackgroundProp SrceryYellow 780 | hi! link cssMarginProp SrceryYellow 781 | hi! link cssListProp SrceryYellow 782 | hi! link cssTableProp SrceryYellow 783 | hi! link cssFontProp SrceryYellow 784 | hi! link cssPaddingProp SrceryYellow 785 | hi! link cssDimensionProp SrceryYellow 786 | hi! link cssRenderProp SrceryYellow 787 | hi! link cssColorProp SrceryYellow 788 | hi! link cssGeneratedContentProp SrceryYellow 789 | hi! link cssTagName SrceryBrightBlue 790 | 791 | " }}} 792 | " Elixir: {{{ 793 | 794 | hi! link elixirDocString Comment 795 | 796 | hi! link elixirStringDelimiter SrceryGreen 797 | hi! link elixirInterpolationDelimiter SrceryCyan 798 | 799 | " }}} 800 | " Go: {{{ 801 | 802 | hi! link goDirective SrceryCyan 803 | hi! link goConstants SrceryMagenta 804 | hi! link goDeclaration SrceryRed 805 | hi! link goDeclType SrceryBlue 806 | hi! link goBuiltins SrceryYellow 807 | 808 | " }}} 809 | " Diff: {{{ 810 | 811 | hi! link diffAdded SrceryGreen 812 | hi! link diffRemoved SrceryRed 813 | hi! link diffChanged SrceryCyan 814 | 815 | hi! link diffFile SrceryOrange 816 | hi! link diffNewFile SrceryYellow 817 | 818 | hi! link diffLine SrceryBlue 819 | 820 | " }}} 821 | " Haskell: {{{ 822 | 823 | " hi! link haskellType SrceryYellow 824 | " hi! link haskellOperators SrceryYellow 825 | " hi! link haskellConditional SrceryCyan 826 | " hi! link haskellLet SrceryYellow 827 | 828 | hi! link haskellType SrceryBlue 829 | hi! link haskellIdentifier SrceryBlue 830 | hi! link haskellSeparator SrceryBlue 831 | hi! link haskellDelimiter SrceryBrightWhite 832 | hi! link haskellOperators SrceryBlue 833 | 834 | hi! link haskellBacktick SrceryYellow 835 | hi! link haskellStatement SrceryYellow 836 | hi! link haskellConditional SrceryYellow 837 | 838 | hi! link haskellLet SrceryCyan 839 | hi! link haskellDefault SrceryCyan 840 | hi! link haskellWhere SrceryCyan 841 | hi! link haskellBottom SrceryCyan 842 | hi! link haskellBlockKeywords SrceryCyan 843 | hi! link haskellImportKeywords SrceryCyan 844 | hi! link haskellDeclKeyword SrceryCyan 845 | hi! link haskellDeriving SrceryCyan 846 | hi! link haskellAssocType SrceryCyan 847 | 848 | hi! link haskellNumber SrceryMagenta 849 | hi! link haskellPragma SrceryMagenta 850 | 851 | hi! link haskellString SrceryGreen 852 | hi! link haskellChar SrceryGreen 853 | 854 | " }}} 855 | " HTML: {{{ 856 | 857 | hi! link htmlTagName SrceryBlue 858 | hi! link htmlTag SrceryBrightBlack 859 | hi! link htmlEndTag SrceryBrightBlack 860 | hi! link htmlArg SrceryYellow 861 | 862 | hi! link htmlScriptTag SrceryRed 863 | hi! link htmlTagN SrceryBlue 864 | hi! link htmlSpecialTagName SrceryBlue 865 | 866 | hi! link javaScript Normal 867 | 868 | call s:HL('htmlLink', s:bright_white, s:none, s:underline) 869 | 870 | hi! link htmlSpecialChar SrceryYellow 871 | 872 | call s:HL('htmlBold', s:bright_white, g:srcery_bg, s:bold) 873 | call s:HL('htmlBoldUnderline', s:bright_white, g:srcery_bg, s:bold . s:underline) 874 | call s:HL('htmlBoldItalic', s:bright_white, g:srcery_bg, s:bold . s:italic) 875 | call s:HL('htmlBoldUnderlineItalic', s:bright_white, g:srcery_bg, s:bold . s:underline . s:italic) 876 | call s:HL('htmlUnderline', s:bright_white, g:srcery_bg, s:underline) 877 | call s:HL('htmlUnderlineItalic', s:bright_white, g:srcery_bg, s:underline . s:italic) 878 | call s:HL('htmlItalic', s:bright_white, g:srcery_bg, s:italic) 879 | 880 | " }}} 881 | " Java: {{{ 882 | 883 | hi! link javaAnnotation SrceryBlue 884 | hi! link javaDocTags SrceryCyan 885 | hi! link javaCommentTitle vimCommentTitle 886 | hi! link javaParen SrceryBrightWhite 887 | hi! link javaParen1 SrceryBrightWhite 888 | hi! link javaParen2 SrceryBrightWhite 889 | hi! link javaParen3 SrceryBrightWhite 890 | hi! link javaParen4 SrceryBrightWhite 891 | hi! link javaParen5 SrceryBrightWhite 892 | hi! link javaOperator SrceryYellow 893 | 894 | hi! link javaVarArg SrceryGreen 895 | 896 | " }}} 897 | " JavaScript: {{{ 898 | 899 | " Vanilla 900 | " ------- 901 | hi! link javaScriptMember SrceryBlue 902 | hi! link javaScriptNull SrceryMagenta 903 | hi! link javasCriptParens SrceryWhite 904 | hi! link javaScriptBraces SrceryWhite 905 | hi! link javaScriptReserved SrceryOrange 906 | 907 | " YAJS 908 | " ---- 909 | hi! link javascriptFuncArg Normal 910 | hi! link javascriptDocComment SrceryGreen 911 | hi! link javascriptArrayMethod Function 912 | hi! link javascriptReflectMethod Function 913 | hi! link javascriptStringMethod Function 914 | hi! link javascriptObjectMethod Function 915 | hi! link javascriptObjectStaticMethod Function 916 | hi! link javascriptObjectLabel SrceryBlue 917 | hi! link javascriptProp SrceryBlue 918 | hi! link javascriptVariable SrceryBrightBlue 919 | hi! link javascriptFuncKeyword SrceryBrightRed 920 | hi! link javascriptFunctionMethod SrceryYellow 921 | hi! link javascriptReturn SrceryBrightRed 922 | hi! link javascriptEndColons SrceryWhite 923 | 924 | " pangloss/vim-javascript 925 | " ----------------------- 926 | hi! link jsFunction SrceryRed 927 | hi! link jsImport SrceryRed 928 | hi! link jsObjectSeparator SrceryWhite 929 | hi! link jsParens SrceryWhite 930 | hi! link jsFuncParens SrceryWhite 931 | hi! link jsNoise SrceryWhite 932 | hi! link jsEnvComment SrceryBrightBlack 933 | hi! link jsOperator SrceryBrightCyan 934 | 935 | " }}} 936 | " JSON: {{{ 937 | 938 | hi! link jsonKeyword SrceryGreen 939 | hi! link jsonQuote SrceryGreen 940 | hi! link jsonBraces SrceryBlue 941 | hi! link jsonString SrceryBlue 942 | 943 | " }}} 944 | " Lisp Dialects: {{{ 945 | 946 | if g:srcery_dim_lisp_paren == 1 947 | hi! link schemeParentheses SrceryXgray6 948 | hi! link clojureParen SrceryXgray6 949 | else 950 | hi! link schemeParentheses SrceryWhite 951 | hi! link clojureParen SrceryWhite 952 | endif 953 | 954 | hi! link clojureKeyword SrceryBlue 955 | hi! link clojureCond SrceryRed 956 | hi! link clojureSpecial SrceryRed 957 | hi! link clojureDefine SrceryRed 958 | 959 | hi! link clojureFunc SrceryYellow 960 | hi! link clojureRepeat SrceryYellow 961 | hi! link clojureCharacter SrceryCyan 962 | hi! link clojureStringEscape SrceryCyan 963 | hi! link clojureException SrceryRed 964 | 965 | hi! link clojureRegexp SrceryCyan 966 | hi! link clojureRegexpEscape SrceryCyan 967 | call s:HL('clojureRegexpCharClass', s:bright_white, s:none, s:bold) 968 | hi! link clojureRegexpMod clojureRegexpCharClass 969 | hi! link clojureRegexpQuantifier clojureRegexpCharClass 970 | 971 | hi! link clojureAnonArg SrceryYellow 972 | hi! link clojureVariable SrceryBlue 973 | hi! link clojureMacro SrceryOrangeBold 974 | 975 | hi! link clojureMeta SrceryYellow 976 | hi! link clojureDeref SrceryYellow 977 | hi! link clojureQuote SrceryYellow 978 | hi! link clojureUnquote SrceryYellow 979 | 980 | " }}} 981 | " Lua: {{{ 982 | 983 | hi! link luain srceryred 984 | hi! link luafunction srcerycyan 985 | hi! link luatable srceryyellow 986 | 987 | " }}} 988 | " Make: {{{ 989 | 990 | hi! link makePreCondit SrceryRed 991 | hi! link makeCommands SrceryBrightWhite 992 | hi! link makeTarget SrceryYellow 993 | 994 | " }}} 995 | " Markdown: {{{ 996 | 997 | call s:HL('markdownBold', s:bright_white, s:none, s:bold) 998 | call s:HL('markdownItalic', s:bright_white, s:none, s:italic) 999 | 1000 | hi! link markdownH1 SrceryBrightBlueBold 1001 | hi! link markdownH2 SrceryBrightBlueBold 1002 | hi! link markdownH3 SrceryBrightYellowBold 1003 | hi! link markdownH4 SrceryBrightYellowBold 1004 | hi! link markdownH5 SrceryYellowBold 1005 | hi! link markdownH6 SrceryYellowBold 1006 | 1007 | hi! link markdownCode SrceryWhite 1008 | hi! link markdownCodeBlock SrceryWhite 1009 | hi! link markdownCodeDelimiter SrceryWhite 1010 | 1011 | hi! link markdownBlockquote SrceryBrightBlack 1012 | hi! link markdownListMarker SrceryBrightBlack 1013 | hi! link markdownOrderedListMarker SrceryBrightBlack 1014 | hi! link markdownRule SrceryBrightBlack 1015 | hi! link markdownHeadingRule SrceryBrightBlack 1016 | 1017 | hi! link markdownUrlDelimiter SrceryBrightBlack 1018 | hi! link markdownLinkDelimiter SrceryBrightBlack 1019 | hi! link markdownLinkTextDelimiter SrceryBrightBlack 1020 | 1021 | hi! link markdownHeadingDelimiter SrceryBrightBlack 1022 | hi! link markdownUrl SrceryBrightGreen 1023 | hi! link markdownUrlTitleDelimiter SrceryGreen 1024 | 1025 | call s:HL('markdownLinkText', s:bright_white, s:none, s:underline) 1026 | hi! link markdownIdDeclaration markdownLinkText 1027 | 1028 | " }}} 1029 | " MoonScript: {{{ 1030 | 1031 | hi! link moonSpecialOp SrceryBrightWhite 1032 | hi! link moonExtendedOp SrceryBrightWhite 1033 | hi! link moonFunction SrceryBrightWhite 1034 | hi! link moonObject SrceryYellow 1035 | 1036 | " }}} 1037 | " ObjectiveC: {{{ 1038 | 1039 | hi! link objcTypeModifier SrceryRed 1040 | hi! link objcDirective SrceryBlue 1041 | 1042 | " }}} 1043 | " Python: {{{ 1044 | 1045 | hi! link pythonBuiltin SrceryYellow 1046 | hi! link pythonBuiltinObj SrceryYellow 1047 | hi! link pythonBuiltinFunc SrceryYellow 1048 | hi! link pythonFunction SrceryCyan 1049 | hi! link pythonDecorator SrceryRed 1050 | hi! link pythonInclude SrceryBlue 1051 | hi! link pythonImport SrceryBlue 1052 | hi! link pythonRun SrceryBlue 1053 | hi! link pythonCoding SrceryBlue 1054 | hi! link pythonOperator SrceryRed 1055 | hi! link pythonExceptions SrceryMagenta 1056 | hi! link pythonBoolean SrceryMagenta 1057 | hi! link pythonDot SrceryBrightWhite 1058 | 1059 | " }}} 1060 | " Ruby: {{{ 1061 | 1062 | hi! link rubyStringDelimiter SrceryGreen 1063 | hi! link rubyInterpolationDelimiter SrceryCyan 1064 | hi! link rubyDefine Keyword 1065 | 1066 | " }}} 1067 | " Rust: {{{ 1068 | 1069 | "https://github.com/rust-lang/rust.vim/blob/master/syntax/rust.vim 1070 | hi! link rustCommentLineDoc SrceryGreen 1071 | hi! link rustModPathSep SrceryBrightBlack 1072 | 1073 | " }}} 1074 | " Scala: {{{ 1075 | 1076 | " NB: scala vim syntax file is kinda horrible 1077 | hi! link scalaNameDefinition SrceryBlue 1078 | hi! link scalaCaseFollowing SrceryBlue 1079 | hi! link scalaCapitalWord SrceryBlue 1080 | hi! link scalaTypeExtension SrceryBlue 1081 | 1082 | hi! link scalaKeyword SrceryRed 1083 | hi! link scalaKeywordModifier SrceryRed 1084 | 1085 | hi! link scalaSpecial SrceryCyan 1086 | hi! link scalaOperator SrceryBlue 1087 | 1088 | hi! link scalaTypeDeclaration SrceryYellow 1089 | hi! link scalaTypeTypePostDeclaration SrceryYellow 1090 | 1091 | hi! link scalaInstanceDeclaration SrceryBlue 1092 | hi! link scalaInterpolation SrceryCyan 1093 | 1094 | " }}} 1095 | " SASS: {{{ 1096 | 1097 | hi! link sassClass SrceryBlue 1098 | hi! link sassClassChar SrceryBlue 1099 | hi! link sassVariable SrceryCyan 1100 | hi! link sassIdChar SrceryBrightBlue 1101 | hi! link sassId SrceryBrightBlue 1102 | 1103 | " }}} 1104 | " Shellscript: {{{ 1105 | 1106 | call s:HL('shParenError', s:bright_white, s:bright_red) 1107 | hi! link shCmdSubRegion SrceryWhite 1108 | hi! link shArithRegion SrceryWhite 1109 | hi! link shArithRegion SrceryWhite 1110 | hi! link shQuote SrceryWhite 1111 | hi! link shRedir SrceryMagenta 1112 | hi! link shOption SrceryBrightYellow 1113 | hi! link shCommandSub SrceryBrightRed 1114 | 1115 | " }}} 1116 | " Vim: {{{ 1117 | 1118 | call s:HL('vimCommentTitle', s:bright_white, s:none, s:bold . s:italic) 1119 | 1120 | hi! link vimNotation SrceryYellow 1121 | hi! link vimBracket SrceryYellow 1122 | hi! link vimMapModKey SrceryYellow 1123 | hi! link vimFuncSID SrceryBrightWhite 1124 | hi! link vimSetSep SrceryBrightWhite 1125 | hi! link vimSep SrceryBrightWhite 1126 | hi! link vimContinue SrceryBrightWhite 1127 | 1128 | " }}} 1129 | " XML: {{{ 1130 | 1131 | hi! link xmlTag SrceryBlue 1132 | hi! link xmlEndTag SrceryBlue 1133 | hi! link xmlTagName SrceryBlue 1134 | hi! link xmlEqual SrceryBlue 1135 | hi! link docbkKeyword SrceryCyanBold 1136 | 1137 | hi! link xmlDocTypeDecl SrceryBrightBlack 1138 | hi! link xmlDocTypeKeyword SrceryMagenta 1139 | hi! link xmlCdataStart SrceryBrightBlack 1140 | hi! link xmlCdataCdata SrceryMagenta 1141 | hi! link dtdFunction SrceryBrightBlack 1142 | hi! link dtdTagName SrceryMagenta 1143 | 1144 | hi! link xmlAttrib SrceryCyan 1145 | hi! link xmlProcessingDelim SrceryBrightBlack 1146 | hi! link dtdParamEntityPunct SrceryBrightBlack 1147 | hi! link dtdParamEntityDPunct SrceryBrightBlack 1148 | hi! link xmlAttribPunct SrceryBrightBlack 1149 | 1150 | hi! link xmlEntity SrceryYellow 1151 | hi! link xmlEntityPunct SrceryYellow 1152 | 1153 | " }}} 1154 | 1155 | " }}} 1156 | 1157 | " Plugins: {{{ 1158 | 1159 | " Sneak: {{{ 1160 | 1161 | hi! link Sneak Search 1162 | call s:HL('SneakScope', s:none, s:hard_black) 1163 | hi! link SneakLabel Search 1164 | 1165 | " }}} 1166 | " Rainbow Parentheses: {{{ 1167 | 1168 | if !exists('g:rbpt_colorpairs') 1169 | let g:rbpt_colorpairs = 1170 | \ [ 1171 | \ ['blue', '#2C78BF'], ['202', '#FF5F00'], 1172 | \ ['red', '#EF2F27'], ['magenta', '#E02C6D'] 1173 | \ ] 1174 | endif 1175 | 1176 | let g:rainbow_guifgs = [ '#E02C6D', '#EF2F27', '#D75F00', '#2C78BF'] 1177 | let g:rainbow_ctermfgs = [ 'magenta', 'red', '202', 'blue' ] 1178 | 1179 | if !exists('g:rainbow_conf') 1180 | let g:rainbow_conf = {} 1181 | endif 1182 | if !has_key(g:rainbow_conf, 'guifgs') 1183 | let g:rainbow_conf['guifgs'] = g:rainbow_guifgs 1184 | endif 1185 | if !has_key(g:rainbow_conf, 'ctermfgs') 1186 | let g:rainbow_conf['ctermfgs'] = g:rainbow_ctermfgs 1187 | endif 1188 | 1189 | let g:niji_dark_colours = g:rbpt_colorpairs 1190 | let g:niji_light_colours = g:rbpt_colorpairs 1191 | 1192 | "}}} 1193 | " GitGutter: {{{ 1194 | 1195 | hi! link GitGutterAdd SrceryGreen 1196 | hi! link GitGutterChange SrceryYellow 1197 | hi! link GitGutterDelete SrceryRed 1198 | hi! link GitGutterChangeDelete SrceryYellow 1199 | 1200 | " }}} 1201 | " Asynchronous Lint Engine: {{{ 1202 | 1203 | call s:HL('ALEError', s:none, s:none, s:undercurl, s:red) 1204 | call s:HL('ALEWarning', s:none, s:none, s:undercurl, s:yellow) 1205 | call s:HL('ALEInfo', s:none, s:none, s:undercurl, s:blue) 1206 | 1207 | hi! link ALEErrorSign SrceryRed 1208 | hi! link ALEWarningSign SrceryYellow 1209 | hi! link ALEInfoSign SrceryBlue 1210 | 1211 | " }}} 1212 | 1213 | " vim-indent-guides: {{{ 1214 | call s:HL('IndentGuidesEven', s:none, s:xgray3) 1215 | call s:HL('IndentGuidesOdd', s:none, s:xgray4) 1216 | 1217 | " }}} 1218 | " vim-startify: {{{ 1219 | 1220 | hi! link StartifyNumber Statement 1221 | hi! link StartifyFile Normal 1222 | hi! link StartifyPath String 1223 | hi! link StartifySlash Normal 1224 | hi! link StartifyBracket Comment 1225 | hi! link StartifyHeader Type 1226 | hi! link StartifyFooter Normal 1227 | hi! link StartifySpecial Comment 1228 | hi! link StartifySection Identifier 1229 | 1230 | " }}} 1231 | " fzf: {{{ 1232 | 1233 | call s:HL('fzf1', s:magenta, s:xgray2) 1234 | call s:HL('fzf2', s:bright_green, s:xgray2) 1235 | call s:HL('fzf3', s:bright_white, s:xgray2) 1236 | 1237 | "}}} 1238 | 1239 | " Netrw: {{{ 1240 | 1241 | hi! link netrwDir SrceryBlue 1242 | hi! link netrwClassify SrceryCyan 1243 | hi! link netrwLink SrceryBrightBlack 1244 | hi! link netrwSymLink SrceryCyan 1245 | hi! link netrwExe SrceryYellow 1246 | hi! link netrwComment SrceryBrightBlack 1247 | hi! link netrwList SrceryBrightBlue 1248 | hi! link netrwTreeBar SrceryBrightBlack 1249 | hi! link netrwHelpCmd SrceryCyan 1250 | hi! link netrwVersion SrceryGreen 1251 | hi! link netrwCmdSep SrceryBrightBlack 1252 | 1253 | "}}} 1254 | " coc.nvim: {{{ 1255 | 1256 | hi! link CocErrorSign SrceryRed 1257 | hi! link CocWarningSign SrceryBrightOrange 1258 | hi! link CocInfoSign SrceryYellow 1259 | hi! link CocHintSign SrceryBlue 1260 | hi! link CocErrorFloat SrceryRed 1261 | hi! link CocWarningFloat SrceryOrange 1262 | hi! link CocInfoFloat SrceryYellow 1263 | hi! link CocHintFloat SrceryBlue 1264 | hi! link CocDiagnosticsError SrceryRed 1265 | hi! link CocDiagnosticsWarning SrceryOrange 1266 | hi! link CocDiagnosticsInfo SrceryYellow 1267 | hi! link CocDiagnosticsHint SrceryBlue 1268 | 1269 | hi! link CocSelectedText SrceryRed 1270 | hi! link CocCodeLens SrceryWhite 1271 | 1272 | call s:HL('CocErrorHighlight', s:none, s:none, s:undercurl, s:red) 1273 | call s:HL('CocWarningHighlight', s:none, s:none, s:undercurl, s:bright_orange) 1274 | call s:HL('CocInfoHighlight', s:none, s:none, s:undercurl, s:yellow) 1275 | call s:HL('CocHintHighlight', s:none, s:none, s:undercurl, s:blue) 1276 | 1277 | " }}} 1278 | " CtrlP: "{{{ 1279 | 1280 | hi! link CtrlPMatch SrceryMagenta 1281 | hi! link CtrlPLinePre SrceryBrightGreen 1282 | call s:HL('CtrlPMode1', s:bright_white, s:xgray3) 1283 | call s:HL('CtrlPMode2', s:bright_white, s:xgray5) 1284 | call s:HL('CtrlPStats', s:yellow, s:xgray2) 1285 | 1286 | " }}} 1287 | " NERDTree: "{{{ 1288 | 1289 | hi! link NERDTreeDir SrceryBlue 1290 | hi! link NERDTreeDirSlash SrceryCyan 1291 | hi! link NERDTreeOpenable SrceryBlue 1292 | hi! link NERDTreeClosable SrceryBlue 1293 | hi! link NERDTreeFile SrceryWhite 1294 | hi! link NERDTreeExecFile SrceryYellow 1295 | hi! link NERDTreeUp SrceryOrange 1296 | hi! link NERDTreeCWD SrceryGreen 1297 | hi! link NERDTreeHelp SrceryCyan 1298 | hi! link NERDTreeFlags SrceryCyan 1299 | hi! link NERDTreeLinkFile SrceryBrightBlack 1300 | hi! link NERDTreeLinkTarget SrceryBrightBlack 1301 | 1302 | " }}} 1303 | " Telescope: "{{{ 1304 | 1305 | call s:HL('TelescopeNormal', s:white, s:none) 1306 | call s:HL('TelescopeSelection', s:green, s:none, s:bold) 1307 | call s:HL('TelescopeMatching', s:magenta) 1308 | call s:HL('TelescopeSelectionCaret', s:magenta) 1309 | call s:HL('TelescopePromptPrefix', s:bright_yellow) 1310 | 1311 | " }}} 1312 | " nvim-cmp: "{{{ 1313 | 1314 | hi! link CmpItemAbbr Pmenu 1315 | hi! link CmpItemAbbrDeprecated Comment 1316 | hi! link CmpItemAbbrMatch Pmenu 1317 | hi! link CmpItemAbbrMatchFuzzy Pmenu 1318 | hi! link CmpItemKind Special 1319 | hi! link CmpItemMenu Pmenu 1320 | 1321 | " }}} 1322 | " nvim: {{{ 1323 | 1324 | if has('nvim') 1325 | " nvim-treesitter: {{{ 1326 | 1327 | " This is deprecated in new nvim releases 1328 | call s:HL('TSStrong', s:none, s:none, s:bold) 1329 | call s:HL('TSEmphasis', s:none, s:none, s:bold) 1330 | call s:HL('TSUnderline', s:none, s:none, s:underline) 1331 | 1332 | highlight! link TSWarning SrceryOrangeBold 1333 | highlight! link TSDanger SrceryRedBold 1334 | highlight! link TSConstBuiltin SrceryCyan 1335 | highlight! link TSField SrceryGreen 1336 | highlight! link TSFuncBuiltin SrceryYellow 1337 | highlight! link TSFuncMacro SrceryOrange 1338 | highlight! link TSFunction SrceryYellow 1339 | call s:HL('TSNamespace', s:white, s:none, s:italic) 1340 | call s:HL('TSParameter', s:cyan, s:none, s:italic) 1341 | highlight! link TSProperty SrceryBrightBlue 1342 | highlight! link TSSymbol SrceryBlue 1343 | highlight! link TSTag SrceryBlue 1344 | highlight! link TSTagAttribute SrceryYellow 1345 | highlight! link TSVariableBuiltin SrceryCyan 1346 | highlight! link TSType SrceryWhite 1347 | highlight! link TSDelimiter SrceryWhite 1348 | highlight! link TSURI SrceryGreen 1349 | highlight! link TSVariable SrceryBrightWhite 1350 | 1351 | if has('nvim-0.8') 1352 | highlight! link @text.strong TSStrong 1353 | highlight! link @text.emphasis TSEmphasis 1354 | highlight! link @text.underline TSUnderline 1355 | highlight! link @text.warning TSWarning 1356 | highlight! link @text.danger TSDanger 1357 | highlight! link @constant.builtin TSConstBuiltin 1358 | highlight! link @field TSField 1359 | highlight! link @function.builtin TSFuncBuiltin 1360 | highlight! link @function.macro TSFuncMacro 1361 | highlight! link @function TSFunction 1362 | highlight! link @namespace TSNamespace 1363 | highlight! link @parameter TSParameter 1364 | highlight! link @property TSProperty 1365 | highlight! link @symbol TSSymbol 1366 | highlight! link @tag TSTag 1367 | highlight! link @tag.attribute TSTagAttribute 1368 | highlight! link @variable.builtin TSVariableBuiltin 1369 | highlight! link @type TSType 1370 | highlight! link @delimiter TSDelimiter 1371 | highlight! link @text.uri TSURI 1372 | highlight! link @variable TSVariable 1373 | 1374 | call s:HL('@markup.strong', s:none, s:none, s:bold) 1375 | call s:HL('@markup.italic', s:none, s:none, s:italic) 1376 | call s:HL('@markup.underline', s:none, s:none, s:underline) 1377 | call s:HL('@markup.strikethrough', s:none, s:none, s:strikethrough) 1378 | 1379 | endif 1380 | 1381 | " }}} 1382 | " snacks.nvim {{{ 1383 | 1384 | highlight! link SnacksNormal Normal 1385 | highlight! link SnacksNormalNC Normal 1386 | highlight! link SnacksPicker Normal 1387 | highlight! link SnacksPickerDir Comment 1388 | highlight! link SnacksPickerGitStatusIgnored Comment 1389 | highlight! link SnacksPickerGitStatusUntracked Comment 1390 | highlight! link SnacksPickerPathHidden Comment 1391 | highlight! link SnacksPickerPathIgnored Comment 1392 | highlight! link SnacksPickerTotals Comment 1393 | 1394 | " }}} 1395 | " trouble.nvim {{{ 1396 | 1397 | highlight! link TroubleNormal Normal 1398 | highlight! link TroubleNormalNC Normal 1399 | 1400 | " }}} 1401 | " which-key.nvim {{{ 1402 | 1403 | highlight! link WhichKeyNormal Normal 1404 | 1405 | " }}} 1406 | endif 1407 | 1408 | " }}} 1409 | 1410 | " GitCommit: "{{{ 1411 | 1412 | hi! link gitcommitSelectedFile SrceryGreen 1413 | hi! link gitcommitDiscardedFile SrceryRed 1414 | 1415 | " }}} 1416 | " Better whitespace: {{{ 1417 | 1418 | call s:HL('ExtraWhitespace', s:none, s:red) 1419 | 1420 | " }}} 1421 | 1422 | " }}} 1423 | 1424 | " vim: set sw=2 ts=2 sts=2 et tw=80 ft=vim fdm=marker : 1425 | -------------------------------------------------------------------------------- /doc/srcery.txt: -------------------------------------------------------------------------------- 1 | *srcery.txt* Color scheme with clearly defined contrasting colors *srcery* 2 | and a slightly earthy tone. 3 | 4 | Version: 1.0.0 5 | Author: Daniel Berg 6 | w/ contributers 7 | License: MIT license 8 | 9 | CONTENTS *srcery-contents* 10 | 11 | Introduction |srcery-introduction| 12 | Installation |srcery-installation| 13 | Vim 8 |srcery-install-vim8| 14 | Dein |srcery-install-dein| 15 | Pathogen |srcery-install-pathogen| 16 | Plug |srcery-install-plug| 17 | Color Table |srcery-color-table| 18 | Options |srcery-options| 19 | g:srcery_[color] |srcery-option-color| 20 | g:srcery_bold |srcery-option-bold| 21 | g:srcery_italic |srcery-option-italic| 22 | g:srcery_underline |srcery-option-underline| 23 | g:srcery_undercurl |srcery-option-undercurl| 24 | g:srcery_strikethrough |srcery-option-strikethrough| 25 | g:srcery_inverse |srcery-option-inverse| 26 | g:srcery_inverse_matche |srcery-option-inverse-matches| 27 | g:srcery_inverse_match_paren |srcery-option-inverse-match-paren| 28 | g:srcery_dim_lisp_paren |srcery-option-dim-lisp-paren| 29 | g:srcery_guisp_fallback |srcery-option-guisp-fallback| 30 | g:srcery_italic_types |srcery-option-italic-types| 31 | g:srcery_bg |srcery-option-bg| 32 | g:srcery_hard_black_terminal_bg |srcery-option-hard-black-terminal-bg| 33 | 34 | ============================================================================== 35 | INTRODUCTION *srcery-introduction* 36 | 37 | Created using colors that logically adheres to the 16 color base palette of a 38 | given terminal, while trying to retain its own identity. The colors are 39 | designed to be easy on the eyes yet contrast well with the background for long 40 | sessions using an editor or terminal emulator. 41 | 42 | ============================================================================== 43 | INSTALLATION *srcery-installation* 44 | 45 | Download or clone srcery's repository to a location of your choosing and set 46 | your 'runtimepath' correctly, otherwise srcery will not work as it relies on 47 | 'autoload' functionality. 48 | 49 | You can also install with your favourite plugin manager. 50 | 51 | *srcery-install-vim8* 52 | 53 | Vim 8 has native support for loading plugins by using |packages|. All you need 54 | to do to, is to clone this repository into `~/.vim/pack/themes/opt`. 55 | > 56 | git clone https://github.com/srcery-colors/srcery-vim \ 57 | ~/.vim/pack/themes/opt 58 | < 59 | And then set your `.vimrc` accordingly. 60 | > 61 | packadd! srcery-vim 62 | colorscheme srcery 63 | < 64 | 65 | The same works for Neovim, but you have to clone it into a path where Neovim 66 | can find it. 67 | > 68 | git clone https://github.com/srcery-colors/srcery-vim \ 69 | $XDG_CONFIG_HOME/nvim/pack/themes/opt 70 | < 71 | 72 | *srcery-install-dein* 73 | https://github.com/Shougo/dein.vim 74 | > 75 | call dein#add('srcery-colors/srcery-vim') 76 | < 77 | *srcery-install-pathogen* 78 | https://github.com/tpope/vim-pathogen 79 | > 80 | cd ~/.vim/bundle 81 | git clone https://github.com/srcery-colors/srcery-vim 82 | < 83 | *srcery-install-plug* 84 | https://github.com/junegunn/vim-plug 85 | > 86 | Plug 'srcery-colors/srcery-vim' 87 | < 88 | 89 | ============================================================================== 90 | COLOR TABLE *srcery-color-table* 91 | 92 | | TERMCOL | NR | VAR | HEX | RGB | 93 | | ------------- | -- | ----------------------- | ------- | ------------- | 94 | | black | 0 | g:srcery_black | #1C1B19 | 28, 27, 25 | 95 | | red | 1 | g:srcery_red | #EF2F27 | 239, 47, 39 | 96 | | green | 2 | g:srcery_green | #519F50 | 81, 159, 80 | 97 | | yellow | 3 | g:srcery_yellow | #FBB829 | 251, 184, 41 | 98 | | blue | 4 | g:srcery_blue | #2C78BF | 44, 120, 191 | 99 | | magenta | 5 | g:srcery_magenta | #E02C6D | 224, 44, 109 | 100 | | cyan | 6 | g:srcery_cyan | #0AAEB3 | 10, 174, 179 | 101 | | white | 7 | g:srcery_white | #BAA67F | 186, 166, 127 | 102 | | brightblack | 8 | g:srcery_bright_black | #918175 | 145, 129, 117 | 103 | | brightred | 9 | g:srcery_bright_red | #F75341 | 247, 83, 65 | 104 | | brightgreen | 10 | g:srcery_bright_green | #98BC37 | 152, 188, 55 | 105 | | brightyellow | 11 | g:srcery_bright_yellow | #FED06E | 254, 208, 110 | 106 | | brightblue | 12 | g:srcery_bright_blue | #68A8E4 | 104, 168, 228 | 107 | | brightmagenta | 13 | g:srcery_bright_magenta | #FF5C8F | 255, 92, 143 | 108 | | brightcyan | 14 | g:srcery_bright_cyan | #2BE4D0 | 43, 228, 208 | 109 | | brightwhite | 15 | g:srcery_bright_white | #FCE8C3 | 252, 232, 195 | 110 | 111 | Additionally Srcery uses some xterm 256 colors to pad out the color selection, 112 | no extra configuration needed. 113 | 114 | | NAME | NR | VAR | HEX | RGB | 115 | | ------------- | --- | ---------------------- | ------- | ----------- | 116 | | orange | 202 | g:srcery_orange | #FF5F00 | 255, 95, 0 | 117 | | bright_orange | 208 | g:srcery_bright_orange | #FF8700 | 255, 135, 0 | 118 | | hard_black | 233 | g:srcery_hard_black | #121212 | 18, 18, 18 | 119 | | xgray1 | 235 | g:srcery_xgray1 | #262626 | 38, 38, 38 | 120 | | xgray2 | 236 | g:srcery_xgray2 | #303030 | 48, 48, 48 | 121 | | xgray3 | 237 | g:srcery_xgray3 | #3A3A3A | 58, 58, 58 | 122 | | xgray4 | 238 | g:srcery_xgray4 | #444444 | 68, 68, 68 | 123 | | xgray5 | 239 | g:srcery_xgray5 | #4E4E4E | 78, 78, 78 | 124 | | xgray6 | 240 | g:srcery_xgray6 | #585858 | 88, 88, 88 | 125 | 126 | ============================================================================== 127 | OPTIONS *srcery-options* 128 | 129 | Srcery includes a few toggles due to discrepancies in the various setups 130 | possible. To change any of these you’d put something like this in your .vimrc: 131 | > 132 | let g:srcery_italic = 1 133 | < 134 | Make sure that you set these variables before assigning colorscheme. 135 | 136 | g:srcery_[color] *srcery-option-color* 137 | 138 | You can customize each of Srcery’s colors, to customize say the red color: 139 | > 140 | let g:srcery_red = '#FF0000' 141 | < 142 | Inside a 256-color terminal emulator, additional colors are configurable 143 | via setting the corresponding variable with the _cterm suffix, e.g. 144 | > 145 | let g:srcery_hard_black_cterm = 232 146 | < 147 | Refer to the |srcery-color-table| for a full list of color variables, hexes 148 | and more. 149 | 150 | *srcery-option-bold* 151 | g:srcery_bold 152 | 153 | Enables bold text. 154 | 155 | Default: 1 156 | 157 | *srcery-option-italic* 158 | g:srcery_italic 159 | 160 | Enables italic text. 161 | 162 | Default: gui 1, term 0 163 | 164 | *srcery-option-underline* 165 | g:srcery_underline 166 | 167 | Enables underlined text. 168 | 169 | Default: 1 170 | 171 | *srcery-option-undercurl* 172 | g:srcery_undercurl 173 | 174 | Enables undercurled text. 175 | 176 | Default: 1 177 | 178 | *srcery-option-strikethrough* 179 | g:srcery_strikethrough 180 | 181 | Enables strikethrough text. 182 | 183 | Default: 1 184 | 185 | *srcery-option-inverse* 186 | g:srcery_inverse 187 | 188 | Enable or disable inverse highlighting (foreground becomes background, 189 | vice versa). This is used for visual selection, search highlights and 190 | some other things. 191 | 192 | Srcery will fall back to other methods of highlighting if this is 193 | disabled. 194 | 195 | Default: 1 196 | 197 | *srcery-option-inverse-matches* 198 | g:srcery_inverse_matches 199 | 200 | Highlight search matches using inverse colors. 201 | 202 | Default: 0 203 | 204 | *srcery-option-inverse-match-paren* 205 | g:srcery_inverse_match_paren 206 | 207 | When enabled will highlight matching delimiters using inverse colors. 208 | (`:DoMatchParen`) 209 | 210 | Works best with Rainbow parenthesis. 211 | 212 | Default: 0 213 | 214 | *srcery-option-dim-lisp-paren* 215 | g:srcery_dim_lisp_paren 216 | 217 | Dims lisp dialects delimiters to a fairly dark gray (xgray5 218 | specifically). 219 | 220 | Default: 0 221 | 222 | *srcery-option-guisp-fallback* 223 | g:srcery_guisp_fallback 224 | 225 | Sets up alternate highlighting for colored underline/undercurl. Some 226 | environments are unable to color underline, so this setting will set 227 | either the background or foreground to whatever color the underline is 228 | supposed to be. 229 | 230 | This comes in handy if colored underline doesn’t work, or underline is 231 | disabled entirely. 232 | 233 | Default: `NONE` 234 | 235 | Possible Values: `fg`, `bg` 236 | 237 | *srcery-option-italic-types* 238 | g:srcery_italic_types 239 | 240 | Italicize types if italic is enabled. 241 | 242 | Default: 0 243 | 244 | *srcery-option-bg* 245 | g:srcery_bg 246 | 247 | Let's you customize the background color. This var takes a list with 248 | two values, with a quoted HEX in the first position, and a terminal 249 | color index for the second position. This lets you set both a 24-bit 250 | color, and a 8bit terminal color index. 251 | 252 | You can specify `'NONE'` as one of the values to make it transparent, 253 | as such `['NONE', 'NONE']` would be the same as the previous option 254 | `g:srcery_bg_passthrough = 1`. 255 | 256 | 257 | You can specify `'DEFAULT'` as one of the values in order to use that 258 | position's default value. 259 | 260 | Default: `[g:srcery_black, 0]` 261 | 262 | *srcery-option-hard-black-terminal-bg* 263 | g:srcery_hard_black_terminal_bg 264 | 265 | If enabled, will set the terminal background in vim to hard black. 266 | Note that this currently only works in Vim, not Neovim. 267 | 268 | Default: 1 269 | 270 | ============================================================================== 271 | vim: tw=78:ts=8:ft=help:norl:noet:fen:noet : 272 | -------------------------------------------------------------------------------- /lua/lualine/themes/srcery.lua: -------------------------------------------------------------------------------- 1 | -- Port of Srcery's airline theme to lualine 2 | local colors = { 3 | black = vim.api.nvim_eval('g:srcery_black'), 4 | red = vim.api.nvim_eval('g:srcery_red'), 5 | green = vim.api.nvim_eval('g:srcery_green'), 6 | yellow = vim.api.nvim_eval('g:srcery_yellow'), 7 | blue = vim.api.nvim_eval('g:srcery_blue'), 8 | magenta = vim.api.nvim_eval('g:srcery_magenta'), 9 | cyan = vim.api.nvim_eval('g:srcery_cyan'), 10 | white = vim.api.nvim_eval('g:srcery_white'), 11 | brightblack = vim.api.nvim_eval('g:srcery_bright_black'), 12 | brightred = vim.api.nvim_eval('g:srcery_bright_red'), 13 | brightgreen = vim.api.nvim_eval('g:srcery_bright_green'), 14 | brightyellow = vim.api.nvim_eval('g:srcery_bright_yellow'), 15 | brightblue = vim.api.nvim_eval('g:srcery_bright_blue'), 16 | brightmagenta = vim.api.nvim_eval('g:srcery_bright_magenta'), 17 | brightcyan = vim.api.nvim_eval('g:srcery_bright_cyan'), 18 | brightwhite = vim.api.nvim_eval('g:srcery_bright_white'), 19 | -- Srcery's xterm 256 colors 20 | orange = vim.api.nvim_eval('g:srcery_red'), 21 | brightorange = vim.api.nvim_eval('g:srcery_red'), 22 | hardblack = vim.api.nvim_eval('g:srcery_red'), 23 | xgray1 = vim.api.nvim_eval('g:srcery_xgray1'), 24 | xgray2 = vim.api.nvim_eval('g:srcery_xgray2'), 25 | xgray3 = vim.api.nvim_eval('g:srcery_xgray3'), 26 | xgray4 = vim.api.nvim_eval('g:srcery_xgray4'), 27 | xgray5 = vim.api.nvim_eval('g:srcery_xgray5'), 28 | xgray6 = vim.api.nvim_eval('g:srcery_xgray6'), 29 | } 30 | 31 | return { 32 | normal = { 33 | a = {bg = colors.xgray4, fg = colors.brightwhite, gui = 'bold'}, 34 | b = {bg = colors.xgray3, fg = colors.brightwhite}, 35 | c = {bg = colors.xgray1, fg = colors.brightwhite} 36 | }, 37 | insert = { 38 | a = {bg = colors.brightwhite, fg = colors.black, gui = 'bold'}, 39 | b = {bg = colors.brightblack, fg = colors.black}, 40 | c = {bg = colors.xgray1, fg = colors.brightwhite} 41 | }, 42 | visual = { 43 | a = {bg = colors.cyan, fg = colors.black, gui = 'bold'}, 44 | b = {bg = colors.xgray5, fg = colors.brightwhite}, 45 | c = {bg = colors.xgray1, fg = colors.brightwhite} 46 | }, 47 | replace = { 48 | a = {bg = colors.brightred, fg = colors.brightwhite, gui = 'bold'}, 49 | b = {bg = colors.brightblack, fg = colors.black}, 50 | c = {bg = colors.xgray1, fg = colors.brightwhite} 51 | }, 52 | command = { 53 | a = {bg = colors.yellow, fg = colors.black, gui = 'bold'}, 54 | b = {bg = colors.xgray3, fg = colors.brightwhite}, 55 | c = {bg = colors.xgray1, fg = colors.brightwhite} 56 | }, 57 | terminal = { 58 | a = {bg = colors.green, fg = colors.black, gui = 'bold'}, 59 | b = {bg = colors.xgray3, fg = colors.brightwhite}, 60 | c = {bg = colors.xgray1, fg = colors.brightwhite} 61 | }, 62 | inactive = { 63 | a = {bg = colors.xgray4, fg = colors.xgray6, gui = 'bold'}, 64 | b = {bg = colors.xgray3, fg = colors.xgray6}, 65 | c = {bg = colors.xgray2, fg = colors.xgray6} 66 | } 67 | } 68 | --------------------------------------------------------------------------------