From 0217fb50fe40a631cc220462520249e36dbc919a Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Sat, 8 Jun 2019 13:03:18 +0200 Subject: Add tsx provider, closes #330 --- ftdetect/polyglot.vim | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'ftdetect') 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 +" +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +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 -- cgit v1.2.3