Extensions: indicate, if an extension is external

Show in :AirlineExtensions if the extension comes bundled with airline
or from an external source.

closes #1890
This commit is contained in:
Christian Brabandt
2019-03-26 08:41:36 +01:00
parent 1fb184305b
commit a6fb6d9da0
3 changed files with 7 additions and 2 deletions

View File

@@ -205,11 +205,13 @@ function! s:airline_extensions()
call map(files, 'fnamemodify(v:val, ":t:r")')
if !empty(files)
echohl Title
echo printf("%-15s\t%s", "Extension", "Status")
echo printf("%-15s\t%s\t%s", "Extension", "Extern", "Status")
echohl Normal
endif
for ext in sort(files)
echo printf("%-15s\t%sloaded", ext, (index(loaded, ext) == -1 ? 'not ' : ''))
let indx=match(loaded, '^'.ext.'\*\?$')
let external = (indx > -1 && loaded[indx] =~ '\*$')
echo printf("%-15s\t%s\t%sloaded", ext, external, indx == -1 ? 'not ' : '')
endfor
endfunction