Merge pull request #1704 from gf3/jsformatter-typescript

Support typescript in jsformatter
This commit is contained in:
Christian Brabandt 2018-04-03 03:16:19 +02:00 committed by GitHub
commit 2876715b56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,7 +7,7 @@ function! airline#extensions#tabline#formatters#jsformatter#format(bufnr, buffer
let buf = bufname(a:bufnr) let buf = bufname(a:bufnr)
let filename = fnamemodify(buf, ':t') let filename = fnamemodify(buf, ':t')
if filename == 'index.js' || filename == 'index.jsx' if filename == 'index.js' || filename == 'index.jsx' || filename == 'index.ts' || filename == 'index.tsx'
return fnamemodify(buf, ':p:h:t') . '/i' return fnamemodify(buf, ':p:h:t') . '/i'
else else
return airline#extensions#tabline#formatters#unique_tail_improved#format(a:bufnr, a:buffers) return airline#extensions#tabline#formatters#unique_tail_improved#format(a:bufnr, a:buffers)