From 2edc785a5e21cf41960223b09bba8efc9276e777 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Sun, 9 Jun 2019 00:08:31 +0200 Subject: [PATCH] Make typescript.tsx default filetype for tsx, fixes #409 --- config.vim | 4 ++++ ftdetect/polyglot.vim | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/config.vim b/config.vim index 21be71b..1a5d14a 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 6e779c9..7300fc1 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