-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
588 lines (447 loc) Β· 17.1 KB
/
.vimrc
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
set nocompatible
syntax on
set hidden
set expandtab
set smarttab
set et
set tabstop=4
set softtabstop=4
set shiftwidth=4
set autoindent
set number
set relativenumber
autocmd InsertEnter * :set norelativenumber
autocmd InsertLeave * :set relativenumber
augroup numbertoggle
autocmd!
autocmd BufEnter,FocusGained,InsertLeave * set relativenumber
autocmd BufLeave,FocusLost,InsertEnter * set norelativenumber
augroup END
if !exists('g:loaded_matchit') && findfile('plugin/matchit.vim', &rtp) ==# ''
runtime! macros/matchit.vim
endif
set autoread
if &history < 1000
set history=1000
endif
if &tabpagemax < 50
set tabpagemax=50
endif
if &encoding ==# 'latin1' && has('gui_running')
set encoding=utf-8
endif
if &listchars ==# 'eol:$'
set listchars=tab:>\ ,trail:-,extends:>,precedes:<,nbsp:+
endif
if !&scrolloff
set scrolloff=1
endif
if !&sidescrolloff
set sidescrolloff=5
endif
set display+=lastline
set noswapfile
set nobackup
set nowb
set encoding=utf8
set ffs=unix,dos,mac
" Search
set incsearch
set hlsearch
set ignorecase
set smartcase
set showmatch
" Error bells
set noerrorbells
set novisualbell
set pastetoggle=<F10>
set backspace=indent,eol,start
set cindent
set nomodeline
set mouse=a
set wildignore=*.swp,*.bak,*.pyc,*/.git/**/*,*/.hg/**/*,*/.svn/**/*
set foldmethod=indent
set nuw=4
set ai
set cin
set lz
set list
set listchars=eol:β,tab:Β·Β·,nbsp:β΅
filetype plugin indent on
syntax enable
source ~/.vim/mappings.vim
source ~/.vim/plugs.vim
" ================ Persistent Undo ==================
" Keep undo history across sessions, by storing in file.
" Only works all the time.
if has('persistent_undo')
silent !mkdir ~/.vim/backups > /dev/null 2>&1
set undodir=~/.vim/backups
set undofile
endif
let s:hidden_all = 0
function! ToggleHiddenAll()
if s:hidden_all == 0
let s:hidden_all = 1
set noshowmode
set noruler
set laststatus=0
set noshowcmd
else
let s:hidden_all = 0
set showmode
set ruler
set laststatus=2
set showcmd
endif
endfunction
set splitbelow
set splitright
" Auto-open NERDTree
" autocmd CursorHold,CursorHoldI * call NERDTreeFocus() | call g:NERDTree.ForCurrentTab().getRoot().refresh() | call g:NERDTree.ForCurrentTab().render() | wincmd w
if 0 != argc()
silent! autocmd VimEnter * NERDTree %
silent! autocmd BufWinEnter * NERDTree %:p:h
silent! autocmd VimEnter * wincmd w
end
let NERDTreeShowHidden=1
let g:NERDTreeGitStatusUseNerdFonts = 1 " you should install nerdfonts by yourself. default: 0
let g:NERDTreeGitStatusShowIgnored = 1 " a heavy feature may cost much more time. default: 0
" Comments
autocmd FileType javascript,javascriptreact,typescript,typescriptreact setlocal commentstring={/*\ %s\ */}
" Airline
let g:airline_powerline_fonts = 1
let g:airline#extensions#keymap#enabled = 0
let g:airline_section_z = "\ue0a1:%l/%L Col:%c"
let g:Powerline_symbols='unicode'
let g:airline#extensions#xkblayout#enabled = 0
let g:airline#extensions#tabline#enabled = 1
let g:tablineclosebutton=1
let g:airline#extensions#clock#format = '%H:%M:%S'
let g:airline#extensions#clock#updatetime = 1000
let g:ale_linters = {
\ 'python': ['flake8', 'pylint'],
\ 'ruby' : ['rubocop', 'prettier', 'rufo', 'standardrb'],
\ 'javascript': ['eslint'],
\ 'vue': ['eslint']
\}
let g:ale_fixers = {
\ 'javascript': ['eslint'],
\ 'typescript': ['prettier', 'tslint'],
\ 'vue': ['eslint'],
\ 'ruby' : ['rubocop', 'standardrb', 'prettier', 'sorbet', 'rufo'],
\ 'scss': ['prettier'],
\ 'html': ['prettier'],
\ 'reason': ['refmt']
\}
let g:ale_fix_on_save = 1
let g:airline#extensions#ale#enabled = 1
let g:ale_sign_column_always = 1
let g:vimrubocop_config = '~/prog/ruby/rubocop.yml'
set autoread
let g:syntastic_javascript_checkers = ['eslint']
" autofix with eslint
let g:syntastic_javascript_eslint_args = ['--fix']
function! SyntasticCheckHook(errors)
checktime
endfunction
" disable syntastic on the statusline
let g:statline_syntastic = 1
let g:javascript_plugin_jsdoc = 1
let g:javascript_plugin_ngdoc = 1
let g:javascript_plugin_flow = 1
let g:formatprg_args_javascript = "-j -q -B -f -"
let g:ale_sign_error = 'β'
let g:ale_sign_warning = '.'
highlight clear ALEErrorSign
highlight clear ALEWarningSign
let g:airline#extensions#ale#enabled = 1
let g:ale_echo_msg_error_str = 'E'
let g:ale_echo_msg_warning_str = 'W'
let g:ale_echo_msg_format = '[%linter%] %s [%severity%]'
let g:ale_list_window_size = 5
let b:ale_fixers = {'javascript': ['prettier', 'eslint']}
" Fix files automatically on save
let g:ale_fix_on_save = 1
let g:syntastic_auto_jump = 1
let g:syntastic_error_symbol = 'β'
let g:syntastic_warning_symbol = 'βΊ'
let g:syntastic_javascript_checkers = ['jshint' ] " sudo npm install -g jshint
let g:syntastic_html_checkers = ['jshint' ] " sudo npm install -g jshint
let g:syntastic_ruby_checkers = ['rubylint' ] " gem install ruby-lint
let g:syntastic_haml_checkers = ['haml-lint'] " gem install haml-lint
let g:syntastic_css_checkers = ['csslint' ] " sudo npm install -g csslint
let g:syntastic_css_csslint_args = "--ignore=zero-units"
let g:javascript_conceal_function = "Ζ"
let g:javascript_conceal_null = "ΓΈ"
" let g:javascript_conceal_this = "@"
let g:javascript_conceal_return = "β"
let g:javascript_conceal_undefined = "ΒΏ"
" let g:javascript_conceal_NaN = "β"
" let g:javascript_conceal_prototype = "ΒΆ"
" let g:javascript_conceal_static = "β’"
" let g:javascript_conceal_super = "Ξ©"
let g:javascript_conceal_arrow_function = "β"
augroup javascript_folding
au!
au FileType javascript setlocal foldmethod=syntax
augroup END
let javascript_enable_domhtmlcss = 1
let g:html_indent_inctags = "html,body,head,tbody"
let g:html_indent_script1 = "inc"
let g:html_indent_style1 = "inc"
" let g:indentLine_setColors = 0
" let g:indentLine_char_list = ['|', 'Β¦', 'β', 'β']
let g:indentLine_enabled = 1
let g:indentLine_char = 'Β¦'
" let g:indentLine_color_term = 239
" let g:indentLine_color_gui = '#A4E57E'
let b:current_syntax = 'javascript'
let g:used_javascript_libs = 'angularjs'
augroup VimCSS3Syntax
autocmd!
autocmd FileType css setlocal iskeyword+=-
augroup END
au FileType javascript setlocal formatprg=prettier
au FileType javascript.jsx setlocal formatprg=prettier
au FileType typescript setlocal formatprg=prettier\ --parser\ typescript
au FileType html setlocal formatprg=js-beautify\ --type\ html
au FileType scss setlocal formatprg=prettier\ --parser\ css
au FileType css setlocal formatprg=prettier\ --parser\ css
set conceallevel=3
" Function: display errors from Ale in statusline
function! LinterStatus() abort
let l:counts = ale#statusline#Count(bufnr(''))
let l:all_errors = l:counts.error + l:counts.style_error
let l:all_non_errors = l:counts.total - l:all_errors
return l:counts.total == 0 ? 'OK' : printf(
\ '%dβ¨ %dβ ',
\ all_non_errors,
\ all_errors
\)
endfunction
let g:deoplete#enable_at_startup = 1
set laststatus=2
set statusline=
set statusline+=\ %l
set statusline+=\ %*
set statusline+=\ βΉβΉ
set statusline+=\ %f\ %*
set statusline+=\ βΊβΊ
set statusline+=\ %m
set statusline+=\ %F
set statusline+=%=
set statusline+=\ %{LinterStatus()}
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%{get(b:,'gitsigns_status','')}
set statusline+=\ βΉβΉ
"set statusline+=\ %{strftime('%R', getftime(expand('%')))}
set statusline+=\ ::
set statusline+=\ %n
set statusline+=\ βΊβΊ\ %*
function! Transparent()
hi Normal guibg=NONE ctermbg=NONE
hi CursorLine guibg=NONE ctermbg=NONE
hi StatusLine ctermbg=NONE guibg=NONE
hi airline_c ctermbg=NONE guibg=NONE
hi airline_tabfill ctermbg=NONE guibg=NONE
endfunction
set guioptions= "ΠΡΠΊΠ»ΡΡΠ°Π΅ΠΌ ΠΏΠ°Π½Π΅Π»ΠΈ ΠΏΡΠΎΠΊΡΡΡΠΊΠΈ Π² GUI
set showtabline=0 "ΠΡΠΊΠ»ΡΡΠ°Π΅ΠΌ ΠΏΠ°Π½Π΅Π»Ρ ΡΠ°Π±ΠΎΠ² (ΠΎΠΊΠΎΡΠΊΠΈ FTW)
"Π‘Π°ΠΌ ΠΏΠΎ ΡΠ΅Π±Π΅ number ΠΏΠΎΠΊΠ°Π·ΡΠ²Π°Π΅Ρ ΡΠΏΡΠ°Π²Π° Π½ΠΎΠΌΠ΅ΡΠ° ΡΡΡΠΎΠΊ
"relativenumber - Π½ΡΠΌΠ΅ΡΠ°ΡΠΈΡ ΡΡΡΠΎΠΊ ΠΎΡΠ½ΠΎΡΠΈΡΠ΅Π»ΡΠ½ΠΎ ΠΏΠΎΠ»ΠΎΠΆΠ΅Π½ΠΈΡ ΠΊΡΡΡΠΎΡ
"wrap Π·Π°ΡΡΠ°Π²Π»ΡΠ΅Ρ ΠΏΠ΅ΡΠ΅Π½ΠΎΡΠΈΡΡ ΡΡΡΠΎΡΠΊΠΈ Π±Π΅Π· ΠΈΡ
ΡΠ°Π·Π΄Π΅Π»Π΅Π½ΠΈΡ
"Π‘ΠΎΠΎΡΠ²Π΅ΡΡΠ²Π΅Π½Π½ΠΎ nowrap ΡΠ΅Π½Π΄Π΅ΡΠΈΡ ΡΡΡΠΎΡΠΊΠΈ Π·Π° Π³ΡΠ°Π½ΠΈΡΠ°ΠΌΠΈ ΡΠΊΡΠ°Π½Π°
set wrap linebreak nolist "ΠΠ°Π½Π½Π°Ρ Π²Π°ΡΠΈΠ°ΡΠΈΡ ΡΠ°Π±ΠΎΡΠ°Π΅Ρ ΠΊΠ°ΠΊ wrap...
"... Π½ΠΎ ΠΏΠ΅ΡΠ΅Π½ΠΎΡΠΈΡ ΡΡΡΠΎΡΠΊΠΈ Π½Π΅ ΠΏΠΎΡΠΈΠΌΠ²ΠΎΠ»ΡΠ½ΠΎ, Π° ΠΏΠΎ ΡΠ»ΠΎΠ²Π°ΠΌ
"ΠΡΠ΅Π΄ΡΠ΄ΡΡΠΈΠΉ ΡΠΏΠΎΡΠΎΠ± ΠΈΠ·Π²Π΅ΡΡΠ΅Π½ ΠΊΠ°ΠΊ soft
"wrapping
""ΠΡΠΈ ΠΆΠ΅Π»Π°Π½ΠΈΠΈ Π²Ρ ΠΌΠΎΠΆΠ΅ΡΠ΅ Π·Π°ΡΡΠ°Π²ΠΈΡΡ ΠΠΈΠΌ Π½Π°ΡΠΈΠ»ΡΠ½ΠΎ ΡΠ°Π·Π΄Π΅Π»ΡΡΡ...
"... ΡΡΡΠΎΡΠΊΠΈ Π² ΡΠ°ΠΌΠΎΠΌ ΡΠ΅ΠΊΡΡΠ΅ Π²ΠΎΡ ΡΠ°ΠΊ:
set textwidth=80 "ΠΠ΄Π΅ 80 ΡΡΠΎΠΈΡ Π·Π°ΠΌΠ΅Π½ΠΈΡΡ Π½Π° Π½ΡΠΆΠ½ΡΡ Π²Π°ΠΌ Π΄Π»ΠΈΠ½Ρ ΡΡΡΠΎΠΊΠΈ
set cursorline "Π ΡΠ°ΠΊ ΠΌΡ ΠΌΠΎΠΆΠ΅ΠΌ ΠΏΠΎΠ΄ΡΠ²Π΅ΡΠΈΠ²Π°ΡΡ ΡΡΡΠΎΠΊΡ Ρ ΠΊΡΡΡΠΎΡΠΎΠΌ
"ΠΡΠ»ΠΈ Π²Ρ ΠΈΡΠΏΠΎΠ»ΡΠ·ΡΠ΅ΡΠ΅ ΠΎΠ±ΡΡΠ½ΡΠΉ ΡΠ΅ΡΠΌΠΈΠ½Π°Π»ΡΠ½ΡΠΉ ΠΠΈΠΌ, Π° Π½Π΅ NeoVim, ΡΠΎ...
"... Π΄Π»Ρ ΠΈΠ·ΠΌΠ΅Π½Π΅Π½ΠΈΡ ΠΊΡΡΡΠΎΡΠ° Π² ΡΠ°Π·Π½ΡΡ
ΡΠ΅ΠΆΠΈΠΌΠ°Ρ
ΠΈΡΠΏΠΎΠ»ΡΠ·ΡΠΉΡΠ΅ ΡΡΠΎ:
set ttimeoutlen=10 "ΠΠΎΠ½ΠΈΠΆΠ°Π΅ΠΌ Π·Π°Π΄Π΅ΡΠΆΠΊΡ Π²Π²ΠΎΠ΄Π° escape ΠΏΠΎΡΠ»Π΅Π΄ΠΎΠ²Π°ΡΠ΅Π»ΡΠ½ΠΎΡΡΠ΅ΠΉ
let &t_SI.="\e[5 q" "SI = ΡΠ΅ΠΆΠΈΠΌ Π²ΡΡΠ°Π²ΠΊΠΈ
let &t_SR.="\e[3 q" "SR = ΡΠ΅ΠΆΠΈΠΌ Π·Π°ΠΌΠ΅Π½Ρ
let &t_EI.="\e[1 q" "EI = Π½ΠΎΡΠΌΠ°Π»ΡΠ½ΡΠΉ ΡΠ΅ΠΆΠΈΠΌ
"ΠΠ΄Π΅ 1 - ΡΡΠΎ ΠΌΠΈΠ³Π°ΡΡΠΈΠΉ ΠΏΡΡΠΌΠΎΡΠ³ΠΎΠ»ΡΠ½ΠΈΠΊ
"2 - ΠΎΠ±ΡΡΠ½ΡΠΉ ΠΏΡΡΠΌΠΎΡΠ³ΠΎΠ»ΡΠ½ΠΈΠΊ
"3 - ΠΌΠΈΠ³Π°ΡΡΠ΅Π΅ ΠΏΠΎΠ΄ΡΡΡΠΊΠΈΠ²Π°Π½ΠΈΠ΅
"4 - ΠΏΡΠΎΡΡΠΎ ΠΏΠΎΠ΄ΡΡΡΠΊΠΈΠ²Π°Π½ΠΈΠ΅
"5 - ΠΌΠΈΠ³Π°ΡΡΠ°Ρ Π²Π΅ΡΡΠΈΠΊΠ°Π»ΡΠ½Π°Ρ ΡΠ΅ΡΡΠ°
"6 - ΠΏΡΠΎΡΡΠΎ Π²Π΅ΡΡΠΈΠΊΠ°Π»ΡΠ½Π°Ρ ΡΠ΅ΡΡΠ°
let g:ruby_path = '.rvm/rubies/ruby-2.7.2/bin/ruby'
let g:LanguageClient_serverCommands = {
\ 'javascript': ['javascript-typescript-stdio'],
\ 'ruby': ['~/.rvm/gems/ruby-2.7.2@global/gems/rubocop-1.12.1', 'stdio'],
\ }
let g:slime_target = "vimterminal"
let g:kite_supported_languages = ['*']
" COC NVIM CONFIG
" if hidden is not set, TextEdit might fail.
set hidden
" Some servers have issues with backup files, see #649
set nobackup
set nowritebackup
" Better display for messages
set cmdheight=2
" You will have bad experience for diagnostic messages when it's default 4000.
set updatetime=300
" don't give |ins-completion-menu| messages.
set shortmess+=c
" always show signcolumns
set signcolumn=yes
autocmd FileType tagbar,nerdtree setlocal signcolumn=no
function! s:check_back_space() abort
let col = col('.') - 1
return !col || getline('.')[col - 1] =~# '\s'
endfunction
function! s:show_documentation()
if (index(['vim','help'], &filetype) >= 0)
execute 'h '.expand('<cword>')
else
call CocAction('doHover')
endif
endfunction
" TODO
" Highlight symbol under cursor on CursorHold
silent autocmd CursorHold * silent call CocActionAsync('highlight')
augroup mygroup
autocmd!
" Setup formatexpr specified filetype(s).
autocmd FileType typescript,json setl formatexpr=CocAction('formatSelected')
" Update signature help on jump placeholder
autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp')
augroup end
" Use `:Format` to format current buffer
command! -nargs=0 Format :call CocAction('format')
" Use `:Fold` to fold current buffer
command! -nargs=? Fold :call CocAction('fold', <f-args>)
" use `:OR` for organize import of current buffer
command! -nargs=0 OR :call CocAction('runCommand', 'editor.action.organizeImport')
" Add status line support, for integration with other plugin, checkout `:h coc-status`
set statusline^=%{coc#status()}%{get(b:,'coc_current_function','')}
" Color highlighting
let g:Hexokinase_highlighters = ['backgroundfull']
" Ranger settings
let g:ranger_command_override = 'ranger --cmd "set show_hidden=true"'
" DEOPLATE
" For conceal markers.
if has('conceal')
set conceallevel=3 concealcursor=niv
endif
let g:startify_custom_header = [
\ '',
\ '| ββ ',
\ '| ββ ',
\ '| βββ βββ ββ ββββββββββ',
\ '| βββ βββ ββ ββββββββββ',
\ '| ββββββ ββ ββ ββ ββ',
\ '| ββββββ ββ ββ ββ ββ',
\ '| ββ ββ ββ ββ ββ',
\ '|',
\ '',
\ '',
\]
" \' __ __ ____',
" \' / / / /__ / / /___ ____ ___ ____ __ __',
" \' / /_/ / _ \/ / / __ \ / __ `__ \/ __ `/ |/_/',
" \' / __ / __/ / / /_/ / / / / / / / /_/ /> <',
" \'/_/ /_/\___/_/_/\____( ) /_/ /_/ /_/\__,_/_/|_|',
" \' |/',
" \'',
" \'',
" \]
" \ '',
" \ ' ββ ',
" \ ' ββ ',
" \ ' ββββ
ββββ ββββββββ ββββββ βββ βββ ββ ββββββββββ',
" \ ' ββββ βββ ββββββββ ββββββββ βββ βββ ββ ββββββββββ',
" \ ' ββ ββ ββββββββ βββ βββ ββββββ ββ ββ ββ ββ',
" \ ' ββ ββ ββββββββ ββββββββ ββββββ ββ ββ ββ ββ',
" \ ' ββ ββ ββββββ ββββ ββ ββ ββ ββ ββ',
" \ '',
" \ '',
" \ '',
" \]
" Colorscheme
set t_Co=256
set termguicolors
" colorscheme onedark
" colorscheme afterglow
set termguicolors
" let g:tokyonight_style = 'night' " available: night, storm
let g:tokyonight_enable_italic = 1
colorscheme tokyonight
" let g:tokyonight_transparent_background = 1
" let g:tokyonight_cursor = 'red'
" let g:tokyonight_menu_selection_background = 'blue'
" let g:tokyonight_current_word = 'bold'
" put to colors/afterglow.vim let s:selection = "353535"
" colorscheme onedark
set background=dark
" set background=light
"let g:airline_theme='onedark'
let g:airline_theme='tokyonight'
" let g:airline_theme='afterglow'
"let g:afterglow_blackout=1
" let g:afterglow_italic_comments=1
" let g:afterglow_inherit_background=1
" hi normal guibg=none ctermbg=n'ne
function! Colorscheme1()
set termguicolors
" let g:tokyonight_style = 'night' " available: night, storm
let g:tokyonight_enable_italic = 1
colorscheme tokyonight
" let g:tokyonight_transparent_background = 1
" let g:tokyonight_cursor = 'red'
" let g:tokyonight_menu_selection_background = 'blue'
" let g:tokyonight_current_word = 'bold'
set background=dark
let g:airline_theme='tokyonight'
endfunction
function! Colorscheme2()
colorscheme onedark
let g:airline_theme='onedark'
endfunction
function! Colorscheme3()
colorscheme afterglow
let g:airline_theme='afterglow'
let g:afterglow_blackout=1
let g:afterglow_italic_comments=1
" let g:afterglow_inherit_background=1
endfunction
" Font
" Also need Meslo for icons https://github.com/andreberg/Meslo-Font
set guifont=JetBrains\ Mono\ 13
" Exit Vim if NERDTree is the only window left.
autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() |
\ quit | endif
autocmd BufNewFile,BufRead *.tsx,*.jsx set filetype=typescriptreact
highlight ALEError ctermbg=none cterm=underline
highlight ALEWarning ctermbg=none cterm=underline
let g:ale_completion_autoimport = 1
" Emoji
set completefunc=emoji#complete
" let g:gitgutter_sign_added = emoji#for('small_blue_diamond')
" let g:gitgutter_sign_modified = emoji#for('small_orange_diamond')
" let g:gitgutter_sign_removed = emoji#for('small_red_triangle')
" let g:gitgutter_sign_modified_removed = emoji#for('collision')
let g:gitgutter_set_sign_backgrounds = 0
let g:gitgutter_sign_allow_clobber = 0
" function! SetColors()
" " hi DiffAdd term=bold ctermfg=235 ctermbg=114 guifg=#282C34 guibg=#98C379
" hi DiffAdd term=bold ctermfg=114 ctermbg=235 guifg=#98C379 guibg=#282C34
" " hi DiffChange term=bold cterm=underline ctermfg=180 gui=underline guifg=#E5C07B
" " hi DiffDelete term=bold ctermfg=235 ctermbg=204 guifg=#282C34 guibg=#E06C75
" " hi DiffText term=reverse ctermfg=235 ctermbg=180 guifg=#282C34 guibg=#E5C07B
" hi DiffDelete term=bold ctermfg=204 ctermbg=235 guifg=#E06C75 guibg=#282C34
" hi DiffText term=reverse ctermfg=180 ctermbg=235 guifg=#E5C07B guibg=#282C34
" hi DiffChange term=bold cterm=NONE ctermfg=180 gui=NONE guifg=#E5C07B
" hi Search term=reverse ctermfg=235 ctermbg=38 guifg=#282C34 guibg=#38b3cc
" hi IncSearch term=reverse ctermfg=38 ctermbg=59 guifg=#38b3cc guibg=#5C6370
" endfunction
" call SetColors()