mirror of
https://github.com/keanuplayz/dotfiles.git
synced 2024-08-15 02:33:12 +00:00
[nvim] remove airline-themes and use a custom theme instead
This commit is contained in:
parent
bdfdba8e88
commit
857276d35e
3 changed files with 45 additions and 1 deletions
43
nvim/autoload/airline/themes/dotfiles.vim
Normal file
43
nvim/autoload/airline/themes/dotfiles.vim
Normal file
|
@ -0,0 +1,43 @@
|
|||
let s:palette = {}
|
||||
|
||||
let s:colors = g:dotfiles_colorscheme_base16_colors
|
||||
function! s:base16_color(fg, bg)
|
||||
let l:fg = s:colors[a:fg]
|
||||
let l:bg = s:colors[a:bg]
|
||||
return [l:fg.gui, l:bg.gui, l:fg.cterm, l:bg.cterm]
|
||||
endfunction
|
||||
|
||||
let s:section_a = s:base16_color(0x1, 0xB)
|
||||
let s:section_b = s:base16_color(0x6, 0x2)
|
||||
let s:section_c = s:base16_color(0x9, 0x1)
|
||||
let s:palette.normal = airline#themes#generate_color_map(
|
||||
\ s:section_a,
|
||||
\ s:section_b,
|
||||
\ s:section_c)
|
||||
|
||||
let s:section_a_overrides = {
|
||||
\ 'insert' : s:base16_color(0x1, 0xD),
|
||||
\ 'replace': s:base16_color(0x1, 0x8),
|
||||
\ 'visual' : s:base16_color(0x1, 0xE),
|
||||
\ }
|
||||
for [s:mode, s:color] in items(s:section_a_overrides)
|
||||
let s:palette[s:mode] = { 'airline_a': s:color, 'airline_z': s:color }
|
||||
endfor
|
||||
|
||||
let s:section_inactive = s:base16_color(0x5, 0x1)
|
||||
let s:palette.inactive = airline#themes#generate_color_map(
|
||||
\ s:section_inactive,
|
||||
\ s:section_inactive,
|
||||
\ s:section_inactive)
|
||||
|
||||
if get(g:, 'loaded_ctrlp', 0)
|
||||
let s:ctrlp_dark = s:base16_color(0x7, 0x2)
|
||||
let s:ctrlp_light = s:base16_color(0x7, 0x4)
|
||||
let s:ctrlp_white = s:base16_color(0x5, 0x1) + ['bold']
|
||||
let s:palette.ctrlp = airline#extensions#ctrlp#generate_color_map(
|
||||
\ s:ctrlp_dark,
|
||||
\ s:ctrlp_light,
|
||||
\ s:ctrlp_white)
|
||||
endif
|
||||
|
||||
let airline#themes#dotfiles#palette = s:palette
|
|
@ -94,6 +94,8 @@ endif
|
|||
|
||||
" Airline (statusline) {{{
|
||||
|
||||
let g:airline_theme = 'dotfiles'
|
||||
|
||||
let g:airline_symbols = {
|
||||
\ 'readonly': 'RO',
|
||||
\ 'whitespace': "\u21e5 ",
|
||||
|
|
|
@ -46,7 +46,6 @@ Plug 'junegunn/vim-plug'
|
|||
Plug 'moll/vim-bbye'
|
||||
Plug 'gerw/vim-HiLinkTrace'
|
||||
Plug 'vim-airline/vim-airline'
|
||||
Plug 'vim-airline/vim-airline-themes'
|
||||
Plug 'tpope/vim-obsession'
|
||||
Plug 'romainl/vim-qf'
|
||||
if g:vim_ide
|
||||
|
|
Loading…
Reference in a new issue