mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-10 12:33:51 -05:00
Use vim-polyglot only as fallback to other plugins, fixes #580
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
let files = filter(globpath(&rtp, 'syntax/basic/class.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" })
|
||||
if len(files) > 0
|
||||
exec 'source ' . files[0]
|
||||
finish
|
||||
endif
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
|
||||
|
||||
"don't add typescriptMembers to nextgroup, let outer scope match it
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
let files = filter(globpath(&rtp, 'syntax/basic/cluster.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" })
|
||||
if len(files) > 0
|
||||
exec 'source ' . files[0]
|
||||
finish
|
||||
endif
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
|
||||
|
||||
"Block VariableStatement EmptyStatement ExpressionStatement IfStatement IterationStatement ContinueStatement BreakStatement ReturnStatement WithStatement LabelledStatement SwitchStatement ThrowStatement TryStatement DebuggerStatement
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
let files = filter(globpath(&rtp, 'syntax/basic/decorator.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" })
|
||||
if len(files) > 0
|
||||
exec 'source ' . files[0]
|
||||
finish
|
||||
endif
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
|
||||
|
||||
syntax match typescriptDecorator /@\([_$a-zA-Z][_$a-zA-Z0-9]*\.\)*[_$a-zA-Z][_$a-zA-Z0-9]*\>/
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
let files = filter(globpath(&rtp, 'syntax/basic/doc.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" })
|
||||
if len(files) > 0
|
||||
exec 'source ' . files[0]
|
||||
finish
|
||||
endif
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
|
||||
|
||||
"Syntax coloring for Node.js shebang line
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
let files = filter(globpath(&rtp, 'syntax/basic/function.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" })
|
||||
if len(files) > 0
|
||||
exec 'source ' . files[0]
|
||||
finish
|
||||
endif
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
|
||||
|
||||
syntax keyword typescriptAsyncFuncKeyword async
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
let files = filter(globpath(&rtp, 'syntax/basic/identifiers.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" })
|
||||
if len(files) > 0
|
||||
exec 'source ' . files[0]
|
||||
finish
|
||||
endif
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
|
||||
|
||||
syntax cluster afterIdentifier contains=
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
let files = filter(globpath(&rtp, 'syntax/basic/keyword.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" })
|
||||
if len(files) > 0
|
||||
exec 'source ' . files[0]
|
||||
finish
|
||||
endif
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
|
||||
|
||||
"Import
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
let files = filter(globpath(&rtp, 'syntax/basic/literal.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" })
|
||||
if len(files) > 0
|
||||
exec 'source ' . files[0]
|
||||
finish
|
||||
endif
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
|
||||
|
||||
"Syntax in the JavaScript code
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
let files = filter(globpath(&rtp, 'syntax/basic/members.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" })
|
||||
if len(files) > 0
|
||||
exec 'source ' . files[0]
|
||||
finish
|
||||
endif
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
|
||||
|
||||
syntax keyword typescriptConstructor contained constructor
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
let files = filter(globpath(&rtp, 'syntax/basic/object.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" })
|
||||
if len(files) > 0
|
||||
exec 'source ' . files[0]
|
||||
finish
|
||||
endif
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
|
||||
|
||||
syntax region typescriptObjectLiteral matchgroup=typescriptBraces
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
let files = filter(globpath(&rtp, 'syntax/basic/patch.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" })
|
||||
if len(files) > 0
|
||||
exec 'source ' . files[0]
|
||||
finish
|
||||
endif
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
|
||||
|
||||
" patch for generated code
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
let files = filter(globpath(&rtp, 'syntax/basic/reserved.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" })
|
||||
if len(files) > 0
|
||||
exec 'source ' . files[0]
|
||||
finish
|
||||
endif
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
|
||||
|
||||
syntax cluster typescriptStrings contains=typescriptProp,typescriptString,typescriptTemplate,@typescriptComments,typescriptDocComment,typescriptRegexpString,typescriptPropertyName
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
let files = filter(globpath(&rtp, 'syntax/basic/symbols.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" })
|
||||
if len(files) > 0
|
||||
exec 'source ' . files[0]
|
||||
finish
|
||||
endif
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
|
||||
|
||||
" + - ^ ~
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
let files = filter(globpath(&rtp, 'syntax/basic/type.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" })
|
||||
if len(files) > 0
|
||||
exec 'source ' . files[0]
|
||||
finish
|
||||
endif
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
|
||||
|
||||
" Types
|
||||
|
||||
Reference in New Issue
Block a user