comparison vendor/vim-packs/srcery-vim/README.md @ 704:1e0f578f6752

Update vendor and add support for vim packs
author nanaya <me@nanaya.net>
date Sun, 18 Dec 2022 20:06:46 +0900
parents
children 78469331407e
comparison
equal deleted inserted replaced
703:b7cd7465cc26 704:1e0f578f6752
1 ![logo](https://raw.githubusercontent.com/srcery-colors/srcery-assets/master/title.png)
2
3 [![Check Them Vim Files](https://github.com/srcery-colors/srcery-vim/workflows/Check%20Them%20Vim%20Files/badge.svg)](https://github.com/srcery-colors/srcery-vim/actions)
4
5 Color scheme with clearly defined contrasting colors and a slightly earthy tone.
6
7 ## Requirements
8
9 ### GUI
10
11 You don’t need to do anything for this colorscheme to work in gVim or MacVim.
12
13 ### TUI
14
15 To use Srcery in the terminal you need to change your terminal emulator’s
16 so-called “ASCII” colors to the ones in the table below. There's a list of
17 terminal configurations in the
18 [srcery-terminal](https://github.com/srcery-colors/srcery-terminal) repository.
19
20 | TERMCOL | NR | VAR | HEX | RGB | IMG |
21 |---------------|----|---------------------------|---------|---------------|----------------------------------------------------------------|
22 | black | 0 | `g:srcery_black` | #1C1B19 | 28, 27, 25 | ![black](https://place-hold.it/100x24/1C1B19?text=+) |
23 | red | 1 | `g:srcery_red` | #EF2F27 | 239, 47, 39 | ![red](https://place-hold.it/100x24/EF2F27?text=+) |
24 | green | 2 | `g:srcery_green` | #519F50 | 81, 159, 80 | ![green](https://place-hold.it/100x24/519F50?text=+) |
25 | yellow | 3 | `g:srcery_yellow` | #FBB829 | 251, 184, 41 | ![yellow](https://place-hold.it/100x24/FBB829?text=+) |
26 | blue | 4 | `g:srcery_blue` | #2C78BF | 44, 120, 191 | ![blue](https://place-hold.it/100x24/2C78BF?text=+) |
27 | magenta | 5 | `g:srcery_magenta` | #E02C6D | 224, 44, 109 | ![magenta](https://place-hold.it/100x24/E02C6D?text=+) |
28 | cyan | 6 | `g:srcery_cyan` | #0AAEB3 | 10, 174, 179 | ![cyan](https://place-hold.it/100x24/0AAEB3?text=+) |
29 | white | 7 | `g:srcery_white` | #BAA67F | 186, 166, 127 | ![white](https://place-hold.it/100x24/BAA67F?text=+) |
30 | brightblack | 8 | `g:srcery_bright_black` | #918175 | 145, 129, 117 | ![bright\_black](https://place-hold.it/100x24/918175?text=+) |
31 | brightred | 9 | `g:srcery_bright_red` | #F75341 | 247, 83, 65 | ![bright\_red](https://place-hold.it/100x24/F75341?text=+) |
32 | brightgreen | 10 | `g:srcery_bright_green` | #98BC37 | 152, 188, 55 | ![bright\_green](https://place-hold.it/100x24/98BC37?text=+) |
33 | brightyellow | 11 | `g:srcery_bright_yellow` | #FED06E | 254, 208, 110 | ![bright\_yellow](https://place-hold.it/100x24/FED06E?text=+) |
34 | brightblue | 12 | `g:srcery_bright_blue` | #68A8E4 | 104, 168, 228 | ![bright\_blue](https://place-hold.it/100x24/68A8E4?text=+) |
35 | brightmagenta | 13 | `g:srcery_bright_magenta` | #FF5C8F | 255, 92, 143 | ![bright\_magenta](https://place-hold.it/100x24/FF5C8F?text=+) |
36 | brightcyan | 14 | `g:srcery_bright_cyan` | #2BE4D0 | 43, 228, 208 | ![bright\_cyan](https://place-hold.it/100x24/2BE4D0?text=+) |
37 | brightwhite | 15 | `g:srcery_bright_white` | #FCE8C3 | 252, 232, 195 | ![bright\_white](https://place-hold.it/100x24/FCE8C3?text=+) |
38
39 Additionally Srcery uses some [xterm 256
40 colors](https://en.wikipedia.org/wiki/Xterm#/media/File:Xterm_256color_chart.svg)
41 to pad out the color selection, no extra configuration needed.
42
43 | NAME | NR | VAR | HEX | RGB | IMG |
44 |----------------|-----|--------------------------|---------|-------------|---------------------------------------------------------------|
45 | orange | 202 | `g:srcery_orange` | #FF5F00 | 255, 95, 0 | ![orange](https://place-hold.it/100x24/FF5F00?text=+) |
46 | bright\_orange | 208 | `g:srcery_bright_orange` | #FF8700 | 255, 135, 0 | ![bright\_orange](https://place-hold.it/100x24/FF8700?text=+) |
47 | hard\_black | 233 | `g:srcery_hard_black` | #121212 | 18, 18, 18 | ![hard\_black](https://place-hold.it/100x24/121212?text=+) |
48 | xgray1 | 235 | `g:srcery_xgray1` | #262626 | 38, 38, 38 | ![xgray1](https://place-hold.it/100x24/262626?text=+) |
49 | xgray2 | 236 | `g:srcery_xgray2` | #303030 | 48, 48, 48 | ![xgray2](https://place-hold.it/100x24/303030?text=+) |
50 | xgray3 | 237 | `g:srcery_xgray3` | #3A3A3A | 58, 58, 58 | ![xgray3](https://place-hold.it/100x24/3A3A3A?text=+) |
51 | xgray4 | 238 | `g:srcery_xgray4` | #444444 | 68, 68, 68 | ![xgray4](https://place-hold.it/100x24/444444?text=+) |
52 | xgray5 | 239 | `g:srcery_xgray5` | #4E4E4E | 78, 78, 78 | ![xgray5](https://place-hold.it/100x24/4E4E4E?text=+) |
53 | xgray6 | 240 | `g:srcery_xgray6` | #585858 | 88, 88, 88 | ![xgray6](https://place-hold.it/100x24/585858?text=+) |
54
55 ## Installation
56
57 ### Manually
58
59 Put `srcery.vim` in `~/.vim/colors/` (on unix-like systems) or `%userprofile%\vimfiles\colors\` (on Windows).
60
61 ### Vim 8
62
63 Vim 8 has native support for loading plugins. All you need to do to is to clone
64 this repository into `~/.vim/pack/default/opt`.
65
66 git clone https://github.com/srcery-colors/srcery-vim ~/.vim/pack/default/opt/srcery-vim
67
68 The same works for Neovim, but you have to clone it into a path where Neovim can
69 find it.
70
71 git clone https://github.com/srcery-colors/srcery-vim ~/.config/nvim/plug/default/opt/srcery-vim
72
73 ### [dein.vim](https://github.com/Shougo/dein.vim)
74
75 ```vim
76 call dein#add('srcery-colors/srcery-vim')
77 ```
78
79 ### [vim-pathogen](https://github.com/tpope/vim-pathogen)
80
81 ```shell
82 cd ~/.vim/bundle
83 git clone https://github.com/srcery-colors/srcery-vim
84 ```
85
86 ### [vim-plug](https://github.com/junegunn/vim-plug)
87
88 ```vim
89 Plug 'srcery-colors/srcery-vim'
90 ```
91 ### [packer](https://github.com/wbthomason/packer.nvim)
92 ```lua
93 use {'srcery-colors/srcery-vim', as = 'srcery'}
94 ```
95
96 ## Usage
97
98 ```
99 :color srcery
100 ```
101
102 If you like what you see and decide to make srcery your default colorscheme, add the relevant line to your `.vimrc`:
103
104 ```vim
105 colorscheme srcery
106 ```
107
108 ## Configuration
109
110 Srcery includes a few toggles due to discrepancies in the various setups possible.
111 To change any of these you'd put something like this in your `.vimrc`
112
113 ```vim
114 let g:srcery_italic = 1
115 ```
116
117 Make sure that you set these variables before assigning `colorscheme`.
118
119 ### Colors
120
121 You can customize each of Srcery's colors, to customize say the red color:
122
123 ```vim
124 let g:srcery_red = '#FF0000'
125 ```
126
127 Refer to the [table](#TUI) for a full list of color variables, hexes and more.
128
129 This will only work on `set termguicolors` and in gVim, to override terminal
130 colors, do so in your [terminal
131 configuration](https://github.com/srcery-colors/srcery-terminal).
132
133 ### Options
134
135 #### g:srcery\_bold
136
137 Enables bold text.
138
139 Default: 1
140
141 #### g:srcery\_italic
142
143 Enables italic text.
144
145 Default: gui 1, term 0
146
147 #### g:srcery\_underline
148
149 Enables underlined text.
150
151 Default: 1
152
153 #### g:srcery\_undercurl
154
155 Enables undercurled text.
156
157 Default: 1
158
159 #### g:srcery\_inverse
160
161 Enable or disable inverse highlighting (foreground becomes background,
162 vice versa). This is used for visual selection, search highlights and
163 some other things.
164
165 Srcery will fall back to other methods of highlighting if this is
166 disabled.
167
168 Default: 1
169
170 #### g:srcery\_inverse\_matches
171
172 Highlight search matches using inverse colors.
173
174 Default: 0
175
176 #### g:srcery\_inverse\_match\_paren
177
178 When enabled will highlight matching delimiters using inverse colors.
179 (`:DoMatchParen`)
180
181 Works best with [Rainbow parenthesis](https://github.com/kien/rainbow_parentheses.vim).
182
183 Default: 0
184
185 #### g:srcery\_dim\_lisp\_paren
186
187 Dims lisp dialects delimiters to a fairly dark gray (xgray5 specifically).
188
189 Default: 0
190
191 #### g:srcery\_bg\_passthrough
192
193 Lets the terminal control the background color in Vim by setting the background to `NONE`.
194
195 A possible use case for this could be you want to manipulate the background
196 color in the terminal, and let the results bubble up to Vim, like [this](https://github.com/roosta/tmux-pop).
197
198 This is a bit of an experimental option, and can cause issues in certain
199 terminals.
200
201 Default: 0
202
203 #### g:srcery\_guisp\_fallback
204
205 Sets up alternate highlighting for colored underline/undercurl. Some
206 environments are unable to color underline, so this setting will set either the
207 background or foreground to whatever color the underline is supposed to be.
208
209 This comes in handy if colored underline doesn't work, or underline is disabled
210 entirely.
211
212 Default: 'NONE'
213
214 Possible Values: 'fg', 'bg'
215
216 #### g:srcery\_italic\_types
217
218 Italicize types if italic is enabled.
219
220 Default: 0
221
222 #### g:srcery\_hard\_black\_terminal\_bg
223
224 If enabled, will set the terminal background in vim to hard black.
225 Note that this currently only works in Vim, not Neovim.
226
227 Default: 1
228
229 ## Screenshots
230
231 viml, bash
232 ![viml\_bash](https://raw.githubusercontent.com/srcery-colors/srcery-assets/master/vim/viml_bash.png)
233
234 clojure, elisp
235 ![lisp](https://raw.githubusercontent.com/srcery-colors/srcery-assets/master/vim/lisp.png)
236
237 c, rust
238 ![c\_rust](https://raw.githubusercontent.com/srcery-colors/srcery-assets/master/vim/c_rust.png)
239
240 python, js
241 ![py\_js](https://raw.githubusercontent.com/srcery-colors/srcery-assets/master/vim/py_js.png)
242
243 git, terminal
244 ![git\_term](https://raw.githubusercontent.com/srcery-colors/srcery-assets/master/vim/git_term.png)
245
246 Typeface used in screenshots is [Iosevka](https://github.com/be5invis/Iosevka)
247
248 ## Plugin support
249
250 ### Lightline
251
252 ![lightline](https://raw.githubusercontent.com/srcery-colors/srcery-assets/master/vim/lightline.png)
253
254 [Lightline](https://github.com/itchyny/lightline.vim) colorscheme.
255 To use it, include 'srcery' value in lightline configuration, like so:
256
257 ```vim
258 let g:lightline = {
259 \ 'colorscheme': 'srcery',
260 \ }
261 ```
262
263 ### Airline
264
265 ![airline](https://raw.githubusercontent.com/srcery-colors/srcery-assets/master/vim/airline.png)
266
267 Thanks to [MindTooth](https://github.com/MindTooth), Srcery now includes an [Airline](https://github.com/vim-airline/vim-airline) theme.
268
269 ### Other
270
271 These don't require any additional configuration.
272
273 * [ale](https://github.com/w0rp/ale)
274 * [coc.nvim](https://github.com/neoclide/coc.nvim)
275 * [ctrlp.vim](https://github.com/ctrlpvim/ctrlp.vim)
276 * [fzf.vim](https://github.com/junegunn/fzf.vim)
277 * [vim-clap](https://github.com/liuchengxu/vim-clap)
278 * [vim-gitgutter](https://github.com/airblade/vim-gitgutter)
279 * [vim-indent-guides](https://github.com/nathanaelkane/vim-indent-guides)
280 * [vim-sneak](https://github.com/justinmk/vim-sneak)
281 * [vim-startify](https://github.com/mhinz/vim-startify)
282
283 Plugin support is still a work in progress and more will come, if there is
284 anything missing that you'd like to add please open an issue and let me know.
285
286 ## Attribution
287
288 This project started as essentially a palette swap of
289 [Gruvbox](https://github.com/morhetz/gruvbox) and all credit goes to the
290 maintainers of that fantastic color scheme. I wanted something a bit sharper, but
291 I loved the syntax color choices of Gruvbox. I also tried to make the theme as
292 simple to use as possible, which was inspired by
293 [Flattened](https://github.com/romainl/flattened). Other themes that influenced
294 Srcery:
295
296 * [Base16](http://chriskempson.com/projects/base16/)
297 * [Badwolf](https://github.com/sjl/badwolf)
298 * [Jellybeans](https://github.com/nanotech/jellybeans.vim)
299 * [Molokai](https://github.com/tomasr/molokai)
300
301 ## Troubleshooting
302
303 ### Colors don't look right
304
305 Ensure that 256 colors are enabled in vim by setting this option **before** setting the colorscheme.
306
307 ```viml
308 set t_Co=256
309 ```
310
311 ### 24-bit color, tmux and Neovim
312
313 If you want to use GUI colors in terminal make sure that tmux pass
314 through 24-bit color codes. For example, if you use
315 [Termite](https://github.com/thestinger/termite) add it to the
316 terminal overrides setting:
317
318 ```tmux
319 set -ga terminal-overrides ",xterm-termite:Tc"
320 ```
321
322 For other terminals, replace `xterm-termite` with the relevant
323 terminal type. (stored in `$TERM`).
324
325 See [Arch wiki](https://wiki.archlinux.org/index.php/Tmux#24-bit_color)
326 and this [issue](https://github.com/srcery-colors/srcery-vim/issues/36).
327
328 ## Extra
329
330 ### Emacs
331
332 Check out [srcery-emacs](https://github.com/srcery-colors/srcery-emacs)