summaryrefslogtreecommitdiffstats
path: root/ftdetect
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2019-06-08 13:03:18 +0200
committerAdam Stankiewicz <sheerun@sher.pl>2019-06-08 13:03:32 +0200
commit0217fb50fe40a631cc220462520249e36dbc919a (patch)
tree804a36631e33f021c81660de57b38c67bac5b237 /ftdetect
parent5023da62ecb8a008a9dc67b29516ac707f07f3a0 (diff)
downloadvim-polyglot-0217fb50fe40a631cc220462520249e36dbc919a.tar.gz
vim-polyglot-0217fb50fe40a631cc220462520249e36dbc919a.zip
Add tsx provider, closes #330
Diffstat (limited to 'ftdetect')
-rw-r--r--ftdetect/polyglot.vim19
1 files changed, 16 insertions, 3 deletions
diff --git a/ftdetect/polyglot.vim b/ftdetect/polyglot.vim
index 5ff50332..3fb51075 100644
--- a/ftdetect/polyglot.vim
+++ b/ftdetect/polyglot.vim
@@ -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