diff options
Diffstat (limited to 'after')
-rw-r--r-- | after/ftplugin/typescript.vim | 5 | ||||
-rw-r--r-- | after/indent/typescript.vim | 4 | ||||
-rw-r--r-- | after/syntax/jsx_pretty.vim | 2 | ||||
-rw-r--r-- | after/syntax/typescript.vim | 4 |
4 files changed, 14 insertions, 1 deletions
diff --git a/after/ftplugin/typescript.vim b/after/ftplugin/typescript.vim index b5deef84..e29d1e41 100644 --- a/after/ftplugin/typescript.vim +++ b/after/ftplugin/typescript.vim @@ -2,6 +2,11 @@ if !exists('g:polyglot_disabled') || !(index(g:polyglot_disabled, 'typescript') " modified from html.vim " For matchit plugin + +if get(g:, 'vim_jsx_pretty_disable_tsx', 0) + finish +endif + if exists("loaded_matchit") let b:match_ignorecase = 0 let b:match_words = '(:),\[:\],{:},<:>,' . diff --git a/after/indent/typescript.vim b/after/indent/typescript.vim index cc722f15..03705bbf 100644 --- a/after/indent/typescript.vim +++ b/after/indent/typescript.vim @@ -9,6 +9,10 @@ if !exists('g:polyglot_disabled') || !(index(g:polyglot_disabled, 'typescript') " """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +if get(g:, 'vim_jsx_pretty_disable_tsx', 0) + finish +endif + if exists('b:did_indent') let s:did_indent = b:did_indent unlet b:did_indent diff --git a/after/syntax/jsx_pretty.vim b/after/syntax/jsx_pretty.vim index b4d0e0f0..3c13b41f 100644 --- a/after/syntax/jsx_pretty.vim +++ b/after/syntax/jsx_pretty.vim @@ -38,7 +38,7 @@ syntax region jsxElement " detect jsx region syntax region jsxRegion - \ start=+\(\(\_[([,?:=+\-*/<>{}]\|&&\|||\|=>\|\<return\|\<default\|\<await\|\<yield\)\_s*\)\@<=<\_s*\(>\|\z(\(script\)\@!\<[_\$A-Za-z][-:_\.\$0-9A-Za-z]*\>\)\(\_s*\([-+*)\]}&|?,]\|/\([/*]\|\_s*>\)\@!\)\)\@!\)+ + \ start=+\(\(\_[([,?:=+\-*/>{}]\|<\s\+\|&&\|||\|=>\|\<return\|\<default\|\<await\|\<yield\)\_s*\)\@<=<\_s*\(>\|\z(\(script\|T\s*>\s*(\)\@!\<[_\$A-Za-z][-:_\.\$0-9A-Za-z]*\>\)\(\_s*\([-+*)\]}&|?,]\|/\([/*]\|\_s*>\)\@!\)\)\@!\)+ \ end=++ \ contains=jsxElement diff --git a/after/syntax/typescript.vim b/after/syntax/typescript.vim index ba90c5d5..9f52ed21 100644 --- a/after/syntax/typescript.vim +++ b/after/syntax/typescript.vim @@ -9,6 +9,10 @@ if !exists('g:polyglot_disabled') || !(index(g:polyglot_disabled, 'typescript') " """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +if get(g:, 'vim_jsx_pretty_disable_tsx', 0) + finish +endif + let s:jsx_cpo = &cpo set cpo&vim |