-
Notifications
You must be signed in to change notification settings - Fork 57
/
edge.txt
627 lines (466 loc) · 21.6 KB
/
edge.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
*edge.txt* Clean & Elegant Color Scheme inspired by Atom One and Material
*edge*
>
______ __
/ ____/___/ /___ ____
/ __/ / __ / __ `/ _ \
/ /___/ /_/ / /_/ / __/
/_____/\__,_/\__, /\___/
/____/
<
==============================================================================
CONTENTS *edge-contents*
Introduction |edge-introduction|
Installation |edge-installation|
Usage |edge-usage|
Configuration |edge-configuration|
FAQ |edge-faq|
Note: Type |gO| in neovim to show the outline of contents.
==============================================================================
INTRODUCTION *edge-introduction*
This color scheme is heavily inspired by Atom One and Material, I'm trying to
combine my favorite designs of them in this color scheme.
Features~
- Vivid colors.
- Designed to have a soft contrast for eye protection.
- Customizable.
- Rich support for common file types and plugins.
- Tree-sitter support.
- Semantic highlighting support.
- Italic support 🎉
==============================================================================
INSTALLATION *edge-installation*
Note: For better syntax highlighting support, consider installing one of the
following plugins additionally to this colorscheme:
https://github.com/sheerun/vim-polyglot
https://github.com/nvim-treesitter/nvim-treesitter.
------------------------------------------------------------------------------
Via a Plugin Manager
VIM-PLUG
>
Plug 'sainnhe/edge'
<
Refer to https://github.com/junegunn/vim-plug for further information.
LAZY.NVIM
In Neovim (Lua configuration):
>
{
'sainnhe/edge',
lazy = false,
priority = 1000,
config = function()
-- Optionally configure and load the colorscheme
-- directly inside the plugin declaration.
vim.g.edge_enable_italic = true
vim.cmd.colorscheme('edge')
end
}
<
Refer to https://github.com/folke/lazy.nvim for further information.
------------------------------------------------------------------------------
As a Native Vim Package
Users of Vim 8 and greater may leverage Vim's native |packages| system.
1. Create a new directory: `$ mkdir -p ~/.vim/pack/colors/opt`
2. Clone this repository: `$ git clone --depth 1 https://github.com/sainnhe/edge.git ~/.vim/pack/colors/opt/edge`
3. Generate help tags: `:helptags ~/.vim/pack/colors/opt/edge/doc/`
4. Add `packadd! edge` to your vimrc.
Note: If you install this color scheme to `pack/*/start` instead of
`pack/*/opt`, you still need to add `packadd! edge` to your vimrc,
as discussed in the following issue:
https://github.com/sainnhe/gruvbox-material/issues/60
------------------------------------------------------------------------------
Manually
Users of Vim 7 and lower may install the colorscheme manually.
1. Clone the repository: `git clone --depth 1 https://github.com/sainnhe/edge.git`
2. Copy `edge/autoload/edge.vim` to `~/.vim/autoload/`.
3. Copy `edge/colors/edge.vim` to `~/.vim/colors/`.
4. Copy `edge/doc/edge.txt` to `~/.vim/doc/` and
execute `:helptags ~/.vim/doc/` to generate help tags.
5. To install the airline theme, copy
`edge/autoload/airline/themes/edge.vim`
to `~/.vim/autoload/airline/themes/`.
https://github.com/vim-airline/vim-airline
6. To install the lightline theme,
copy `edge/autoload/lightline/colorscheme/edge.vim`
to `~/.vim/autoload/lightline/colorscheme/`.
https://github.com/itchyny/lightline.vim
7. To install the lualine theme,
copy `edge/lua/lualine/themes/edge.lua`
to `~/.config/nvim/lua/lualine/themes/`.
https://github.com/nvim-lualine/lualine.nvim
------------------------------------------------------------------------------
AUR
There are some packages available for Arch Linux users in AUR:
https://aur.archlinux.org/pkgbase/vim-edge-git (Vim)
https://aur.archlinux.org/pkgbase/neovim-edge-git (Neovim)
==============================================================================
USAGE *edge-usage*
------------------------------------------------------------------------------
Vim~
Put something like this in your vimrc:
>
" Important!!
if has('termguicolors')
set termguicolors
endif
" The configuration options should be placed before `colorscheme edge`.
let g:edge_style = 'aura'
let g:edge_better_performance = 1
colorscheme edge
<
See |edge-configuration| for more configuration options.
If you want to apply this color scheme temporarily, run this command in
vim(this may cause broken colors):
>
:colorscheme edge
<
------------------------------------------------------------------------------
Airline~
To enable [airline](https://github.com/vim-airline/vim-airline) color
scheme, put this in your vimrc:
>
let g:airline_theme = 'edge'
<
To apply it without reloading:
>
:AirlineTheme edge
<
------------------------------------------------------------------------------
Lightline~
To enable [lightline](https://github.com/itchyny/lightline.vim) color
scheme, put this in your vimrc:
>
let g:lightline = {}
let g:lightline.colorscheme = 'edge'
" Or this line:
let g:lightline = {'colorscheme' : 'edge'}
<
To apply it without reloading:
>
:let g:lightline.colorscheme = 'edge'
:call lightline#init()
:call lightline#colorscheme()
<
------------------------------------------------------------------------------
Lualine~
To enable [lualine](https://github.com/nvim-lualine/lualine.nvim) color
scheme, put this in your init.lua:
>
require'lualine'.setup {
options = {
theme = 'edge'
}
}
<
To apply it without reloading:
>
:lua require'lualine'.setup {options = {theme = 'edge'}}
<
==============================================================================
CONFIGURATION *edge-configuration*
Note: the configuration options should be placed before `colorscheme edge`
E.g.
>
if has('termguicolors')
set termguicolors
endif
let g:edge_style = 'aura'
let g:edge_better_performance = 1
colorscheme edge
let g:lightline = {'colorscheme' : 'edge'}
<
------------------------------------------------------------------------------
*g:edge_style*
g:edge_style~
The style of this color scheme.
Type: |String|
Available values: `'default'`, `'aura'`, `'neon'`
Default value: `'default'`
------------------------------------------------------------------------------
*g:edge_dim_foreground*
g:edge_dim_foreground~
By default, the foreground color of the dark variants is white. If you want to
use dark grey foreground, set this option to `1`.
Type: |Number|
Available values: `0`, `1`
Default value: `0`
------------------------------------------------------------------------------
*g:edge_disable_italic_comment*
g:edge_disable_italic_comment~
By default, italic is enabled in `Comment`. To disable italic in `Comment`, set
this option to `1`.
Type: |Number|
Available values: `0`, `1`
Default value: `0`
------------------------------------------------------------------------------
*g:edge_enable_italic*
g:edge_enable_italic~
To enable italic in this color scheme, set this option to `1`.
Type: |Number|
Available values: `0`, `1`
Default value: `0`
Note: This option is designed to use with fonts that support cursive italics.
See |edge-faq| for more information.
------------------------------------------------------------------------------
*g:edge_cursor*
g:edge_cursor~
Customize the cursor color, only works in GUI clients.
Type: |String|
Available values: `'auto'`, `'red'`, `'yellow'`, `'green'`, `'cyan'`,
`'blue'`, `'purple'`
Default value: `'auto'`
------------------------------------------------------------------------------
*g:edge_transparent_background*
g:edge_transparent_background~
To use transparent background, set this option to `1`.
If you want more ui components to be transparent (for example, status line
background), set this option to `2`.
Type: |Number|
Available values: `0`, `1`, `2`
Default value: `0`
------------------------------------------------------------------------------
*g:edge_dim_inactive_windows*
g:edge_dim_inactive_windows~
Dim inactive windows. Only works in Neovim currently.
When this option is used in conjunction with |g:edge_show_eob| set to 0, the
end of the buffer will only be hidden inside the active window. Inside
inactive windows, the end of buffer filler characters will be visible in
dimmed symbols. This is due to the way Vim and Neovim handle |hl-EndOfBuffer|.
Type: |Number|
Available values: `0`, `1`
Default value: `0`
------------------------------------------------------------------------------
*g:edge_menu_selection_background*
g:edge_menu_selection_background~
Customize the background color of |hl-PmenuSel| and |hl-WildMenu|.
Type: |String|
Available values: `'blue'`, `'green'`, `'purple'`
Default value: `'blue'`
------------------------------------------------------------------------------
*g:edge_spell_foreground*
g:edge_spell_foreground~
By default, this color scheme won't color the foreground of |spell|, instead
colored under curls will be used. If you also want to color the foreground,
set this option to `'colored'`.
Type: |String|
Available values: `'none'`, `'colored'`
Default value: `'none'`
------------------------------------------------------------------------------
*g:edge_show_eob*
g:edge_show_eob~
Whether to show |hl-EndOfBuffer|.
Type: |Number|
Available values: `1`, `0`
Default value: `1`
------------------------------------------------------------------------------
*g:edge_float_style*
g:edge_float_style~
Style used to make floating windows stand out from other windows. `'bright'`
makes the background of these windows lighter than |hl-Normal|, whereas
`'dim'` makes it darker.
Floating windows include for instance diagnostic pop-ups, scrollable
documentation windows from completion engines, overlay windows from
installers, etc.
Type: |String|
Available values: `'bright'`, `'dim'`
Default value: `'bright'`
------------------------------------------------------------------------------
*g:edge_diagnostic_text_highlight*
g:edge_diagnostic_text_highlight~
Some plugins support highlighting error/warning/info/hint texts, by default
these texts are only underlined, but you can use this option to also highlight
the background of them.
Type: |Number|
Available values: `0`, `1`
Default value: `0`
Currently, the following plugins are supported:
- neovim's built-in language server client
- https://github.com/neoclide/coc.nvim
- https://github.com/prabirshrestha/vim-lsp
- https://github.com/ycm-core/YouCompleteMe
- https://github.com/dense-analysis/ale
- https://github.com/neomake/neomake
- https://github.com/vim-syntastic/syntastic
------------------------------------------------------------------------------
*g:edge_diagnostic_line_highlight*
g:edge_diagnostic_line_highlight~
Some plugins support highlighting error/warning/info/hint lines, but this
feature is disabled by default in this color scheme. To enable this feature,
set this option to `1`.
Type: |Number|
Available values: `0`, `1`
Default value: `0`
Currently, the following plugins are supported:
- https://github.com/neoclide/coc.nvim
- https://github.com/ycm-core/YouCompleteMe
- https://github.com/dense-analysis/ale
- https://github.com/vim-syntastic/syntastic
------------------------------------------------------------------------------
*g:edge_diagnostic_virtual_text*
g:edge_diagnostic_virtual_text~
Some plugins can use the virtual text feature of Neovim to display
error/warning/info/hint information. You can use this option to adjust the
way these virtual texts are highlighted.
Type: |String|
Available values: `'grey'`, `'colored'`, `'highlighted'`
Default value: `'grey'`
Currently, the following plugins are supported:
- Neovim's built-in language server client
- https://github.com/neoclide/coc.nvim
- https://github.com/prabirshrestha/vim-lsp
- https://github.com/dense-analysis/ale
- https://github.com/neomake/neomake
- https://github.com/ycm-core/YouCompleteMe
------------------------------------------------------------------------------
*g:edge_current_word*
g:edge_current_word~
Some plugins can highlight the word under current cursor, you can use this
option to control their behavior.
Type: |String|
Available values: `'grey background'`, `'high contrast background'`, `'bold'`,
`'underline'`, `'italic'`
Default value: `'grey background'` when not in transparent mode, `'bold'`
when in transparent mode.
Currently, the following plugins are supported:
- https://github.com/neoclide/coc-highlight
- https://github.com/dominikduda/vim_current_word
- https://github.com/RRethy/vim-illuminate
- https://github.com/itchyny/vim-cursorword
- https://github.com/prabirshrestha/vim-lsp
------------------------------------------------------------------------------
*g:edge_inlay_hints_background*
g:edge_inlay_hints_background~
Inlay hints are special markers that are displayed inline with the code to
provide you with additional information. You can use this option to customize
the background color of inlay hints.
Type: |String|
Available values: `'none'`, `'dimmed'`
Default value: `'none'`
Currently, the following LSP clients are supported:
- neovim's built-in language server client
- https://github.com/neoclide/coc.nvim
- https://github.com/prabirshrestha/vim-lsp
- https://github.com/ycm-core/YouCompleteMe
------------------------------------------------------------------------------
*g:edge_disable_terminal_colors*
g:edge_disable_terminal_colors~
Setting this option to `1` will disable terminal colors provided by this color
scheme so you can remain terminal colors the same when using |:terminal| in
vim and outside of vim.
Type: |Number|
Available values: `0`, `1`
Default value: `0`
------------------------------------------------------------------------------
*g:edge_lightline_disable_bold*
g:edge_lightline_disable_bold~
By default, bold is enabled in lightline color scheme. To disable bold in
lightline color scheme, set this option to `1`.
Type: |Number|
Available values: `0`, `1`
Default value: `0`
Note: this configuration option doesn't need to be placed before `colorscheme edge`
------------------------------------------------------------------------------
*g:edge_better_performance*
g:edge_better_performance~
The loading time of this color scheme is very long because too many file types
and plugins are optimized. This feature allows you to load part of the code on
demand by placing them in the `after/syntax` directory.
Enabling this option will reduce loading time by approximately 50%.
Type: |Number|
Available values: `0`, `1`
Default value: `0`
------------------------------------------------------------------------------
*g:edge_colors_override*
g:edge_colors_override~
Override color palette. The available keys can be found in
`/path/to/edge/autoload/edge.vim`.
E.g.
>
let g:edge_colors_override = {'bg0': ['#202020', '234'], 'bg2': ['#282828', '235']}
colorscheme edge
<
Type: |Dictionary|
Default value: `{}`
==============================================================================
FAQ *edge-faq*
------------------------------------------------------------------------------
The colors don't match those in the screenshots.~
1. This color scheme is mainly designed for true colors, `set termguicolors`
is required. Check output of `vim --version`, maybe your vim doesn't support
`termguicolors`.
2. Maybe your terminal emulator doesn't support true colors, you can test it
using [this script](https://unix.stackexchange.com/questions/404414/print-true-color-24-bit-test-pattern).
3. If you are running vim in tmux, you need to override default true colors of
tmux, as tmux cannot display true colors properly:
[#1246 How to use true colors in vim under tmux?](https://github.com/tmux/tmux/issues/1246)
------------------------------------------------------------------------------
The configuration options don't work.~
You should place them before `colorscheme edge` .
------------------------------------------------------------------------------
A lot of errors are detected if I install with pack feature.~
You'll need to add `packadd! edge` before applying this color scheme.
Check [sainnhe/gruvbox-material#60](https://github.com/sainnhe/gruvbox-material/issues/60)
------------------------------------------------------------------------------
How to enable cursive italic keywords?~
1. Install a font that supports cursive italics, for example https://aka.sainnhe.dev/fonts
2. Enable italic keywords in this color scheme: `let g:edge_enable_italic = 1`
3. (Optional) Disable italic comment: `let g:edge_disable_italic_comment = 1`
------------------------------------------------------------------------------
The comment color looks weird.~
Some terminal emulators don't support italics, which may cause the comment
color looks weird. See https://github.com/sainnhe/gruvbox-material/issues/5#issuecomment-729586348
A temporary solution is to disable italic comments via
|g:edge_disable_italic_comment|.
If you are using tmux, you may also need to override default true colors of
tmux: https://github.com/tmux/tmux/issues/1246
------------------------------------------------------------------------------
How to use custom colors?~
>
function! s:edge_custom() abort
" Link a highlight group to a predefined highlight group.
" See `colors/edge.vim` for all predefined highlight groups.
highlight! link groupA groupB
highlight! link groupC groupD
" Initialize the color palette.
" The first parameter is a valid value for `g:edge_style`,
" the second parameter is a valid value for `g:edge_dim_foreground`,
" and the third parameter is a valid value for `g:edge_colors_override`.
let l:palette = edge#get_palette('aura', 0, {})
" Define a highlight group.
" The first parameter is the name of a highlight group,
" the second parameter is the foreground color,
" the third parameter is the background color,
" the fourth parameter is for UI highlighting which is optional,
" and the last parameter is for `guisp` which is also optional.
" See `autoload/edge.vim` for the format of `l:palette`.
call edge#highlight('groupE', l:palette.red, l:palette.none, 'undercurl', l:palette.red)
endfunction
augroup EdgeCustom
autocmd!
autocmd ColorScheme edge call s:edge_custom()
augroup END
colorscheme edge
<
Or in Neovim (Lua configuration):
>
vim.api.nvim_create_autocmd('ColorScheme', {
group = vim.api.nvim_create_augroup('custom_highlights_edge', {}),
pattern = 'edge',
callback = function()
local config = vim.fn['edge#get_configuration']()
local palette = vim.fn['edge#get_palette'](config.style, config.dim_foreground, config.colors_override)
local set_hl = vim.fn['edge#highlight']
set_hl('Search', palette.none, palette.diff_blue)
set_hl('IncSearch', palette.none, palette.diff_green)
end
})
<
Note: Make sure to define the `augroup` before calling `colorscheme`.
------------------------------------------------------------------------------
What's your status line configuration?~
See this post: https://aka.sainnhe.dev/statusline
------------------------------------------------------------------------------
What's the font used here?~
See this post: https://aka.sainnhe.dev/fonts
==============================================================================
vim:tw=78:nosta:noet:ts=8:sts=0:ft=help:et:sw=4:fen:fdm=marker:fmr={{{,}}}: