Merge pull request #1785 from smancill/conditional-vimtex-loading

Load vimtex only when the extension is enabled
This commit is contained in:
Christian Brabandt 2018-09-07 08:01:33 +02:00 committed by GitHub
commit d342c3cb1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -334,10 +334,12 @@ function! airline#extensions#load()
call add(loaded_ext, 'obsession') call add(loaded_ext, 'obsession')
endif endif
runtime autoload/vimtex.vim if get(g:, 'airline#extensions#vimtex#enabled', 1)
if (get(g:, 'airline#extensions#vimtex#enabled', 1)) && exists('*vimtex#init') runtime autoload/vimtex.vim
call airline#extensions#vimtex#init(s:ext) if exists('*vimtex#init')
call add(loaded_ext, 'vimtex') call airline#extensions#vimtex#init(s:ext)
call add(loaded_ext, 'vimtex')
endif
endif endif
if (get(g:, 'airline#extensions#cursormode#enabled', 0)) if (get(g:, 'airline#extensions#cursormode#enabled', 0))