mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-07-27 07:54:44 +02:00
Add null accent, to allow accents to be removed
This commit is contained in:
parent
168b18ff0a
commit
0b1df0c524
@ -45,6 +45,7 @@ function! airline#themes#patch(palette)
|
|||||||
endfor
|
endfor
|
||||||
|
|
||||||
let a:palette.accents = get(a:palette, 'accents', {})
|
let a:palette.accents = get(a:palette, 'accents', {})
|
||||||
|
let a:palette.accents.none = [ '', '', '', '', '' ]
|
||||||
let a:palette.accents.bold = [ '', '', '', '', 'bold' ]
|
let a:palette.accents.bold = [ '', '', '', '', 'bold' ]
|
||||||
let a:palette.accents.italic = [ '', '', '', '', 'italic' ]
|
let a:palette.accents.italic = [ '', '', '', '', 'italic' ]
|
||||||
|
|
||||||
|
@ -837,11 +837,19 @@ colors instead of the section's default foreground color.
|
|||||||
|
|
||||||
The following accents are defined by default. Themes can define their variants
|
The following accents are defined by default. Themes can define their variants
|
||||||
of the colors, but defaults will be provided if missing. >
|
of the colors, but defaults will be provided if missing. >
|
||||||
bold, italic, red, green, blue, yellow, orange, purple
|
bold, italic, red, green, blue, yellow, orange, purple, none
|
||||||
<
|
<
|
||||||
The defaults configure the mode and line number parts to be bold, and the
|
The defaults configure the mode and line number parts to be bold, and the
|
||||||
readonly part to be red.
|
readonly part to be red.
|
||||||
|
|
||||||
|
"none" is special. This can be used, to remove a bold accent from an existing
|
||||||
|
theme. For example, usually the mode part of the statusline is usually defined
|
||||||
|
to be bold. However, it can be hard to remove an existing bold accent from the
|
||||||
|
default configuration. Therefore, you can use the none accent to remove
|
||||||
|
existing accents, so if you put >
|
||||||
|
call airline#parts#define_accent('mode', 'none')
|
||||||
|
the mode section will be set to non-bold font style.
|
||||||
|
|
||||||
------------------------------------- *airline-sections*
|
------------------------------------- *airline-sections*
|
||||||
Once a part is defined, you can use helper functions to generate the
|
Once a part is defined, you can use helper functions to generate the
|
||||||
statuslines for each section. For example, to use the part above, we could
|
statuslines for each section. For example, to use the part above, we could
|
||||||
|
Loading…
x
Reference in New Issue
Block a user