Custom spell check command support

- Add an option `g:airline_spell_check_command`
This commit is contained in:
yasuda 2021-11-12 11:45:58 +09:00
parent 6e5439126f
commit 646dd0a1c2

View File

@ -66,7 +66,7 @@ endfunction
function! airline#parts#spell() function! airline#parts#spell()
let spelllang = g:airline_detect_spelllang ? printf(" [%s]", toupper(substitute(&spelllang, ',', '/', 'g'))) : '' let spelllang = g:airline_detect_spelllang ? printf(" [%s]", toupper(substitute(&spelllang, ',', '/', 'g'))) : ''
if g:airline_detect_spell && &spell if g:airline_detect_spell && (&spell || (exists('g:airline_spell_check_command') && eval(g:airline_spell_check_command)))
let winwidth = airline#util#winwidth() let winwidth = airline#util#winwidth()
if winwidth >= 90 if winwidth >= 90
return g:airline_symbols.spell . spelllang return g:airline_symbols.spell . spelllang