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:
Christian 2020-11-18 08:12:58 +01:00 committed by Christian Brabandt
parent b0d4a44f0c
commit a8afa434e3
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09

View File

@ -13,6 +13,8 @@ let s:separators = {}
let s:accents = {}
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
if a:rgb == ''
return a:fallback
@ -308,3 +310,8 @@ function! airline#highlighter#highlight(modes, ...) abort " {{{2
endif
endfor
endfunction
finish
else
" This is using Vim9 script " {{{1
endif