mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-07-22 21:45:06 +02:00
themes: remove tabs for indenting
This commit is contained in:
parent
7181950501
commit
19360bac63
@ -1,11 +1,11 @@
|
|||||||
" MIT License. Copyright (c) 2013-2021 Bailey Ling et al.
|
" MIT License. Copyright (c) 2013-2021 Bailey Ling et al.
|
||||||
" vim: et ts=2 sts=2 sw=2
|
" vim: et ts=2 sts=2 sw=2 et
|
||||||
|
|
||||||
scriptencoding utf-8
|
scriptencoding utf-8
|
||||||
|
|
||||||
if !exists(":def") || (exists(":def") && get(g:, "airline_experimental", 0) == 0)
|
if !exists(":def") || (exists(":def") && get(g:, "airline_experimental", 0) == 0)
|
||||||
|
|
||||||
" Legacy Vim Script Implementation
|
" Legacy Vim Script Implementation
|
||||||
|
|
||||||
" generates a dictionary which defines the colors for each highlight group
|
" generates a dictionary which defines the colors for each highlight group
|
||||||
function! airline#themes#generate_color_map(sect1, sect2, sect3, ...)
|
function! airline#themes#generate_color_map(sect1, sect2, sect3, ...)
|
||||||
@ -82,26 +82,26 @@ if !exists(":def") || (exists(":def") && get(g:, "airline_experimental", 0) == 0
|
|||||||
endfunction
|
endfunction
|
||||||
else
|
else
|
||||||
" New Vim9 Script Implementation
|
" New Vim9 Script Implementation
|
||||||
def airline#themes#generate_color_map(sect1: list<any>, sect2: list<any>, sect3: list<any>): dict<any>
|
def airline#themes#generate_color_map(sect1: list<any>, sect2: list<any>, sect3: list<any>): dict<any>
|
||||||
# Only allows for 3 arguments currently, because Vim9 Script does not allow for a:000
|
# Only allows for 3 arguments currently, because Vim9 Script does not allow for a:000
|
||||||
|
|
||||||
# all sections should be string
|
# all sections should be string
|
||||||
map(sect2, (_, v) => type(v) != type('') ? string(v) : v)
|
map(sect2, (_, v) => type(v) != type('') ? string(v) : v)
|
||||||
|
|
||||||
var palette = {
|
var palette = {
|
||||||
'airline_a': [ sect1[0], sect1[1], sect1[2], sect1[3], get(sect1, 4, '') ],
|
'airline_a': [ sect1[0], sect1[1], sect1[2], sect1[3], get(sect1, 4, '') ],
|
||||||
'airline_b': [ sect2[0], sect2[1], sect2[2], sect2[3], get(sect2, 4, '') ],
|
'airline_b': [ sect2[0], sect2[1], sect2[2], sect2[3], get(sect2, 4, '') ],
|
||||||
'airline_c': [ sect3[0], sect3[1], sect3[2], sect3[3], get(sect3, 4, '') ],
|
'airline_c': [ sect3[0], sect3[1], sect3[2], sect3[3], get(sect3, 4, '') ],
|
||||||
}
|
}
|
||||||
|
|
||||||
extend(palette, {
|
extend(palette, {
|
||||||
'airline_x': [ sect3[0], sect3[1], sect3[2], sect3[3], '' ],
|
'airline_x': [ sect3[0], sect3[1], sect3[2], sect3[3], '' ],
|
||||||
'airline_y': [ sect2[0], sect2[1], sect2[2], sect2[3], '' ],
|
'airline_y': [ sect2[0], sect2[1], sect2[2], sect2[3], '' ],
|
||||||
'airline_z': [ sect1[0], sect1[1], sect1[2], sect1[3], '' ],
|
'airline_z': [ sect1[0], sect1[1], sect1[2], sect1[3], '' ],
|
||||||
})
|
})
|
||||||
|
|
||||||
return palette
|
return palette
|
||||||
enddef
|
enddef
|
||||||
|
|
||||||
def airline#themes#get_highlight(group: string): list<string>
|
def airline#themes#get_highlight(group: string): list<string>
|
||||||
return call('airline#highlighter#get_highlight', [group])
|
return call('airline#highlighter#get_highlight', [group])
|
||||||
@ -150,5 +150,5 @@ else
|
|||||||
if !has_key(palette.accents, 'purple')
|
if !has_key(palette.accents, 'purple')
|
||||||
extend(palette.accents, {purple: [ '#af00df', '', '128', '' ]})
|
extend(palette.accents, {purple: [ '#af00df', '', '128', '' ]})
|
||||||
endif
|
endif
|
||||||
enddef
|
enddef
|
||||||
endif
|
endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user