mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-04-08 19:35:31 +02:00
Support Vue.js file extension in jsformatter
Included `.vue` extension to jsformatter for supporting Vue.js files. Vue files follows the same path resolution as js files: https://vue-loader.vuejs.org/spec.html#src-imports Case sensitive comparison for jsformatter
This commit is contained in:
parent
5601c0928e
commit
36f14c478a
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user