Merge pull request #2313 from DunZzzz/patch-1

Support Vue.js file extension in jsformatter
This commit is contained in:
Christian Brabandt 2021-01-10 19:36:20 +01:00 committed by GitHub
commit 0ca9576331
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 filename = fnamemodify(buf, ':t')
if filename == 'index.js' || filename == 'index.jsx' || filename == 'index.ts' || filename == 'index.tsx'
if filename ==# 'index.js' || filename ==# 'index.jsx' || filename ==# 'index.ts' || filename ==# 'index.tsx' || filename ==# 'index.vue'
return fnamemodify(buf, ':p:h:t') . '/i'
else
return airline#extensions#tabline#formatters#unique_tail_improved#format(a:bufnr, a:buffers)