mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-07-23 05:55:38 +02:00
highlighter: Add condition for new vim9 script implementation
Add a new condition that will contain the new vim9script implementation of the highlighter logic. Not done yet. To test it out, you need a recent Vim 8.2 and in addition set the configuration variable :let g:airline_experimental=1 Implementation for all the functions will follow.
This commit is contained in:
parent
b0d4a44f0c
commit
a8afa434e3
@ -13,6 +13,8 @@ let s:separators = {}
|
|||||||
let s:accents = {}
|
let s:accents = {}
|
||||||
let s:hl_groups = {}
|
let s:hl_groups = {}
|
||||||
|
|
||||||
|
if !exists(":def") || (exists(":def") && get(g:, "airline_experimental", 0)==0)
|
||||||
|
" Legacy VimScript implementation {{{1
|
||||||
function! s:gui2cui(rgb, fallback) abort " {{{2
|
function! s:gui2cui(rgb, fallback) abort " {{{2
|
||||||
if a:rgb == ''
|
if a:rgb == ''
|
||||||
return a:fallback
|
return a:fallback
|
||||||
@ -308,3 +310,8 @@ function! airline#highlighter#highlight(modes, ...) abort " {{{2
|
|||||||
endif
|
endif
|
||||||
endfor
|
endfor
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
finish
|
||||||
|
else
|
||||||
|
" This is using Vim9 script " {{{1
|
||||||
|
endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user