summaryrefslogtreecommitdiffstats
path: root/syntax/basic/patch.vim
diff options
context:
space:
mode:
Diffstat (limited to 'syntax/basic/patch.vim')
-rw-r--r--syntax/basic/patch.vim9
1 files changed, 1 insertions, 8 deletions
diff --git a/syntax/basic/patch.vim b/syntax/basic/patch.vim
index 9d97817c..669cd8e0 100644
--- a/syntax/basic/patch.vim
+++ b/syntax/basic/patch.vim
@@ -1,16 +1,9 @@
-let s:base = expand("<sfile>:h:h")
-let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" }
-let files = filter(globpath(&rtp, 'syntax/basic/patch.vim', 1, 1), Filter)
-if len(files) > 0
- exec 'source ' . files[0]
+if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p'))
finish
endif
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
" patch for generated code
syntax keyword typescriptGlobal Promise
\ nextgroup=typescriptGlobalPromiseDot,typescriptFuncCallArg,typescriptTypeArguments oneline
syntax keyword typescriptGlobal Map WeakMap
\ nextgroup=typescriptGlobalPromiseDot,typescriptFuncCallArg,typescriptTypeArguments oneline
-
-endif