mirror of
https://github.com/vim-airline/vim-airline-themes.git
synced 2025-01-20 03:32:44 +08:00
commit
8df2a565bd
109
autoload/airline/themes/onedark.vim
Normal file
109
autoload/airline/themes/onedark.vim
Normal file
|
@ -0,0 +1,109 @@
|
|||
" [onedark.vim](https://github.com/joshdick/onedark.vim/)
|
||||
|
||||
" This is a [vim-airline](https://github.com/vim-airline/vim-airline) theme for use with
|
||||
" the [onedark.vim](https://github.com/joshdick/onedark.vim) colorscheme.
|
||||
|
||||
" It is based on vim-airline's ["tomorrow" theme](https://github.com/vim-airline/vim-airline-themes/blob/master/autoload/airline/themes/tomorrow.vim).
|
||||
function! airline#themes#onedark#refresh()
|
||||
|
||||
let g:airline#themes#onedark#palette = {}
|
||||
|
||||
let g:airline#themes#onedark#palette.accents = {
|
||||
\ 'red': [ '#E06C75', '', 204, 0 ]
|
||||
\ }
|
||||
|
||||
let s:N1 = [ '#282C34', '#98C379', 235, 114 ]
|
||||
let s:N2 = [ '#ABB2BF', '#3E4452', 145, 237 ]
|
||||
let s:N3 = [ '#98C379', '#282C34', 114, 235 ]
|
||||
let g:airline#themes#onedark#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3)
|
||||
|
||||
let group = airline#themes#get_highlight('vimCommand')
|
||||
let g:airline#themes#onedark#palette.normal_modified = {
|
||||
\ 'airline_c': [ group[0], '', group[2], '', '' ]
|
||||
\ }
|
||||
|
||||
let s:I1 = [ '#282C34', '#61AFEF', 235, 39 ]
|
||||
let s:I2 = s:N2
|
||||
let s:I3 = [ '#61AFEF', '#282C34', 39, 235 ]
|
||||
let g:airline#themes#onedark#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3)
|
||||
let g:airline#themes#onedark#palette.insert_modified = g:airline#themes#onedark#palette.normal_modified
|
||||
|
||||
let s:R1 = [ '#282C34', '#E06C75', 235, 204 ]
|
||||
let s:R2 = s:N2
|
||||
let s:R3 = [ '#E06C75', '#282C34', 204, 235 ]
|
||||
let g:airline#themes#onedark#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3)
|
||||
let g:airline#themes#onedark#palette.replace_modified = g:airline#themes#onedark#palette.normal_modified
|
||||
|
||||
let s:V1 = [ '#282C34', '#C678DD', 235, 170 ]
|
||||
let s:V2 = s:N2
|
||||
let s:V3 = [ '#C678DD', '#282C34', 170, 235 ]
|
||||
let g:airline#themes#onedark#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3)
|
||||
let g:airline#themes#onedark#palette.visual_modified = g:airline#themes#onedark#palette.normal_modified
|
||||
|
||||
let s:IA1 = [ '#282C34', '#ABB2BF', 235, 145 ]
|
||||
let s:IA2 = [ '#ABB2BF', '#3E4452', 145, 237 ]
|
||||
let s:IA3 = s:N2
|
||||
let g:airline#themes#onedark#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3)
|
||||
let g:airline#themes#onedark#palette.inactive_modified = {
|
||||
\ 'airline_c': [ group[0], '', group[2], '', '' ]
|
||||
\ }
|
||||
|
||||
" Warning/Error styling code from vim-airline's ["base16" theme](https://github.com/vim-airline/vim-airline-themes/blob/master/autoload/airline/themes/base16.vim)
|
||||
|
||||
" Warnings
|
||||
let s:WI = [ '#282C34', '#E5C07B', 235, 180 ]
|
||||
let g:airline#themes#onedark#palette.normal.airline_warning = [
|
||||
\ s:WI[0], s:WI[1], s:WI[2], s:WI[3]
|
||||
\ ]
|
||||
|
||||
let g:airline#themes#onedark#palette.normal_modified.airline_warning =
|
||||
\ g:airline#themes#onedark#palette.normal.airline_warning
|
||||
|
||||
let g:airline#themes#onedark#palette.insert.airline_warning =
|
||||
\ g:airline#themes#onedark#palette.normal.airline_warning
|
||||
|
||||
let g:airline#themes#onedark#palette.insert_modified.airline_warning =
|
||||
\ g:airline#themes#onedark#palette.normal.airline_warning
|
||||
|
||||
let g:airline#themes#onedark#palette.visual.airline_warning =
|
||||
\ g:airline#themes#onedark#palette.normal.airline_warning
|
||||
|
||||
let g:airline#themes#onedark#palette.visual_modified.airline_warning =
|
||||
\ g:airline#themes#onedark#palette.normal.airline_warning
|
||||
|
||||
let g:airline#themes#onedark#palette.replace.airline_warning =
|
||||
\ g:airline#themes#onedark#palette.normal.airline_warning
|
||||
|
||||
let g:airline#themes#onedark#palette.replace_modified.airline_warning =
|
||||
\ g:airline#themes#onedark#palette.normal.airline_warning
|
||||
|
||||
" Errors
|
||||
let s:ER = [ '#282C34', '#E06C75', 235, 204 ]
|
||||
let g:airline#themes#onedark#palette.normal.airline_error = [
|
||||
\ s:ER[0], s:ER[1], s:ER[2], s:ER[3]
|
||||
\ ]
|
||||
|
||||
let g:airline#themes#onedark#palette.normal_modified.airline_error =
|
||||
\ g:airline#themes#onedark#palette.normal.airline_error
|
||||
|
||||
let g:airline#themes#onedark#palette.insert.airline_error =
|
||||
\ g:airline#themes#onedark#palette.normal.airline_error
|
||||
|
||||
let g:airline#themes#onedark#palette.insert_modified.airline_error =
|
||||
\ g:airline#themes#onedark#palette.normal.airline_error
|
||||
|
||||
let g:airline#themes#onedark#palette.visual.airline_error =
|
||||
\ g:airline#themes#onedark#palette.normal.airline_error
|
||||
|
||||
let g:airline#themes#onedark#palette.visual_modified.airline_error =
|
||||
\ g:airline#themes#onedark#palette.normal.airline_error
|
||||
|
||||
let g:airline#themes#onedark#palette.replace.airline_error =
|
||||
\ g:airline#themes#onedark#palette.normal.airline_error
|
||||
|
||||
let g:airline#themes#onedark#palette.replace_modified.airline_error =
|
||||
\ g:airline#themes#onedark#palette.normal.airline_error
|
||||
|
||||
endfunction
|
||||
|
||||
call airline#themes#onedark#refresh()
|
|
@ -88,6 +88,7 @@ Currently this repository contains the following themes:
|
|||
* molokai
|
||||
* monochrome
|
||||
* murmur
|
||||
* onedark
|
||||
* papercolor
|
||||
* powerlineish
|
||||
* qwq
|
||||
|
|
Loading…
Reference in New Issue
Block a user