summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2019-06-09 00:08:31 +0200
committerAdam Stankiewicz <sheerun@sher.pl>2019-06-09 00:08:31 +0200
commit2edc785a5e21cf41960223b09bba8efc9276e777 (patch)
treea302d801e008a202171de6e7ad2c465a6b80c123
parent445e0260108fbc5745d77b6e15b290eb55d4f1b2 (diff)
downloadvim-polyglot-3.9.1.tar.gz
vim-polyglot-3.9.1.zip
Make typescript.tsx default filetype for tsx, fixes #409v3.9.1
-rw-r--r--config.vim4
-rw-r--r--ftdetect/polyglot.vim4
2 files changed, 8 insertions, 0 deletions
diff --git a/config.vim b/config.vim
index 21be71bb..1a5d14ac 100644
--- a/config.vim
+++ b/config.vim
@@ -91,3 +91,7 @@ augroup END
if (!exists('g:graphql_javascript_tags'))
let g:graphql_javascript_tags = ['gql', 'graphql', 'Relay.QL']
endif
+
+augroup filetypedetect
+ autocmd BufNewFile,BufReadPost *.tsx setlocal filetype=typescript.tsx
+augroup END
diff --git a/ftdetect/polyglot.vim b/ftdetect/polyglot.vim
index 6e779c99..7300fc1f 100644
--- a/ftdetect/polyglot.vim
+++ b/ftdetect/polyglot.vim
@@ -91,6 +91,10 @@ augroup END
if (!exists('g:graphql_javascript_tags'))
let g:graphql_javascript_tags = ['gql', 'graphql', 'Relay.QL']
endif
+
+augroup filetypedetect
+ autocmd BufNewFile,BufReadPost *.tsx setlocal filetype=typescript.tsx
+augroup END
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'acpiasl') == -1
augroup filetypedetect
" acpiasl, from asl.vim in martinlroth/vim-acpi-asl