summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2020-03-02 00:59:47 +0100
committerAdam Stankiewicz <sheerun@sher.pl>2020-03-02 00:59:47 +0100
commit16774887a3fe26a09326585f871748ddf158905e (patch)
tree79dcc53d4d31dec0b829b3354a73f9038d0fccab
parente7dc03dc018ccdf48ddac392b65b6c6449a8cd84 (diff)
downloadvim-polyglot-16774887a3fe26a09326585f871748ddf158905e.tar.gz
vim-polyglot-16774887a3fe26a09326585f871748ddf158905e.zip
Force javascript filetype for jsx, fixes #460
Diffstat (limited to '')
-rw-r--r--config.vim3
-rw-r--r--ftdetect/polyglot.vim3
2 files changed, 6 insertions, 0 deletions
diff --git a/config.vim b/config.vim
index 86db52a9..296bed35 100644
--- a/config.vim
+++ b/config.vim
@@ -91,4 +91,7 @@ augroup filetypedetect
"jinja
autocmd BufNewFile,BufRead *.jinja2,*.j2,*.jinja,*.nunjucks,*.nunjs,*.njk set ft=jinja
+
+ "jsx
+ au BufNewFile,BufRead *.jsx setf javascriptreact
augroup END
diff --git a/ftdetect/polyglot.vim b/ftdetect/polyglot.vim
index 2069098a..85259f4f 100644
--- a/ftdetect/polyglot.vim
+++ b/ftdetect/polyglot.vim
@@ -91,6 +91,9 @@ augroup filetypedetect
"jinja
autocmd BufNewFile,BufRead *.jinja2,*.j2,*.jinja,*.nunjucks,*.nunjs,*.njk set ft=jinja
+
+ "jsx
+ au BufNewFile,BufRead *.jsx setf javascriptreact
augroup END
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'acpiasl') == -1
augroup filetypedetect