Add tsx provider, closes #330

This commit is contained in:
Adam Stankiewicz
2019-06-08 13:03:18 +02:00
parent 5023da62ec
commit 0217fb50fe
7 changed files with 222 additions and 7 deletions

View File

@@ -79,9 +79,6 @@ augroup filetypedetect
"jinja
autocmd BufNewFile,BufRead *.jinja2,*.j2,*.jinja,*.nunjucks,*.nunjs,*.njk set ft=jinja
"tsx
autocmd BufNewFile,BufRead *.tsx setfiletype typescript.jsx
augroup END
" Fix for https://github.com/sheerun/vim-polyglot/issues/236#issuecomment-387984954
@@ -1374,6 +1371,22 @@ au BufRead,BufNewFile *.ax set syntax=tptp
augroup end
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'tsx') == -1
augroup filetypedetect
" tsx, from typescript.vim in ianks/vim-tsx
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Vim ftdetect file
"
" Language: TSX (JavaScript)
" Maintainer: Ian Ker-Seymer <i.kerseymer@gmail.com>
"
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
autocmd BufNewFile,BufRead *.tsx let b:tsx_ext_found = 1
autocmd BufNewFile,BufRead *.tsx set filetype=typescript.tsx
augroup end
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'twig') == -1
augroup filetypedetect
" twig, from twig.vim in lumiliet/vim-twig