diff options
Diffstat (limited to 'syntax/basic')
| -rw-r--r-- | syntax/basic/class.vim | 6 | ||||
| -rw-r--r-- | syntax/basic/cluster.vim | 6 | ||||
| -rw-r--r-- | syntax/basic/decorator.vim | 6 | ||||
| -rw-r--r-- | syntax/basic/doc.vim | 6 | ||||
| -rw-r--r-- | syntax/basic/function.vim | 6 | ||||
| -rw-r--r-- | syntax/basic/identifiers.vim | 6 | ||||
| -rw-r--r-- | syntax/basic/keyword.vim | 6 | ||||
| -rw-r--r-- | syntax/basic/literal.vim | 6 | ||||
| -rw-r--r-- | syntax/basic/members.vim | 6 | ||||
| -rw-r--r-- | syntax/basic/object.vim | 6 | ||||
| -rw-r--r-- | syntax/basic/patch.vim | 6 | ||||
| -rw-r--r-- | syntax/basic/reserved.vim | 6 | ||||
| -rw-r--r-- | syntax/basic/symbols.vim | 6 | ||||
| -rw-r--r-- | syntax/basic/type.vim | 6 | 
14 files changed, 28 insertions, 56 deletions
| diff --git a/syntax/basic/class.vim b/syntax/basic/class.vim index ab834390..2cefe76d 100644 --- a/syntax/basic/class.vim +++ b/syntax/basic/class.vim @@ -1,7 +1,4 @@ -if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'typescript') != -1 -  finish -endif - +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1  "don't add typescriptMembers to nextgroup, let outer scope match it  " so we won't match abstract method outside abstract class  syntax keyword typescriptAbstract              abstract @@ -67,3 +64,4 @@ syntax region typescriptInterfaceTypeArguments matchgroup=typescriptTypeBrackets    \ contained skipwhite  syntax match typescriptInterfaceComma /,/ contained nextgroup=typescriptInterfaceHeritage skipwhite skipnl +endif diff --git a/syntax/basic/cluster.vim b/syntax/basic/cluster.vim index 0188aa98..07775a18 100644 --- a/syntax/basic/cluster.vim +++ b/syntax/basic/cluster.vim @@ -1,7 +1,4 @@ -if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'typescript') != -1 -  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  syntax cluster typescriptStatement    \ contains=typescriptBlock,typescriptVariable, @@ -40,3 +37,4 @@ syntax cluster typescriptValue    \ contains=@typescriptExpression,typescriptObjectLiteral  syntax cluster typescriptEventExpression       contains=typescriptArrowFuncDef,typescriptParenExp,@typescriptValue,typescriptRegexpString,@typescriptEventTypes,typescriptOperator,typescriptGlobal,jsxRegion +endif diff --git a/syntax/basic/decorator.vim b/syntax/basic/decorator.vim index c27b9b7e..c61ca643 100644 --- a/syntax/basic/decorator.vim +++ b/syntax/basic/decorator.vim @@ -1,7 +1,5 @@ -if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'typescript') != -1 -  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]*\>/    \ nextgroup=typescriptArgumentList,typescriptTypeArguments    \ contains=@_semantic,typescriptDotNotation +endif diff --git a/syntax/basic/doc.vim b/syntax/basic/doc.vim index d5e43e34..88a2c08d 100644 --- a/syntax/basic/doc.vim +++ b/syntax/basic/doc.vim @@ -1,7 +1,4 @@ -if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'typescript') != -1 -  finish -endif - +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1  "Syntax coloring for Node.js shebang line  syntax match   shellbang "^#!.*node\>"  syntax match   shellbang "^#!.*iojs\>" @@ -85,3 +82,4 @@ if main_syntax == "typescript"  endif  syntax case match +endif diff --git a/syntax/basic/function.vim b/syntax/basic/function.vim index db93b368..782a58aa 100644 --- a/syntax/basic/function.vim +++ b/syntax/basic/function.vim @@ -1,7 +1,4 @@ -if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'typescript') != -1 -  finish -endif - +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1  syntax keyword typescriptAsyncFuncKeyword      async    \ nextgroup=typescriptFuncKeyword,typescriptArrowFuncDef    \ skipwhite @@ -69,3 +66,4 @@ syntax region typescriptParamImpl matchgroup=typescriptParens    \ contains=typescriptDecorator,@typescriptParameterList,@typescriptComments    \ nextgroup=typescriptReturnAnnotation,typescriptBlock    \ contained skipwhite skipnl +endif diff --git a/syntax/basic/identifiers.vim b/syntax/basic/identifiers.vim index 2a88102c..6a774f1b 100644 --- a/syntax/basic/identifiers.vim +++ b/syntax/basic/identifiers.vim @@ -1,7 +1,4 @@ -if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'typescript') != -1 -  finish -endif - +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1  syntax cluster afterIdentifier contains=    \ typescriptDotNotation,    \ typescriptFuncCallArg, @@ -31,3 +28,4 @@ syntax region  typescriptParenExp              matchgroup=typescriptParens start  syntax region  typescriptFuncCallArg           contained matchgroup=typescriptParens start=/(/ end=/)/ contains=@typescriptValue,@typescriptComments nextgroup=@typescriptSymbols,typescriptDotNotation skipwhite skipempty skipnl  syntax region  typescriptEventFuncCallArg      contained matchgroup=typescriptParens start=/(/ end=/)/ contains=@typescriptEventExpression  syntax region  typescriptEventString           contained start=/\z(["']\)/  skip=/\\\\\|\\\z1\|\\\n/  end=/\z1\|$/ contains=typescriptASCII,@events +endif diff --git a/syntax/basic/keyword.vim b/syntax/basic/keyword.vim index 999dca07..b658b334 100644 --- a/syntax/basic/keyword.vim +++ b/syntax/basic/keyword.vim @@ -1,7 +1,4 @@ -if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'typescript') != -1 -  finish -endif - +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1  "Import  syntax keyword typescriptImport                from as import  syntax keyword typescriptExport                export @@ -93,3 +90,4 @@ syntax cluster typescriptAmbients contains=    \ typescriptAbstract,    \ typescriptEnumKeyword,typescriptEnum,    \ typescriptModule +endif diff --git a/syntax/basic/literal.vim b/syntax/basic/literal.vim index 315d6123..fca1b54f 100644 --- a/syntax/basic/literal.vim +++ b/syntax/basic/literal.vim @@ -1,7 +1,4 @@ -if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'typescript') != -1 -  finish -endif - +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1  "Syntax in the JavaScript code  " String @@ -45,3 +42,4 @@ syntax match typescriptNumber /\d[0-9_]*\.\d[0-9_]*\|\d[0-9_]*\|\.\d[0-9]*/    \ nextgroup=typescriptExponent,@typescriptSymbols skipwhite skipempty  syntax match typescriptExponent /[eE][+-]\=\d[0-9]*\>/    \ nextgroup=@typescriptSymbols skipwhite skipempty contained +endif diff --git a/syntax/basic/members.vim b/syntax/basic/members.vim index 45fafbcc..17465093 100644 --- a/syntax/basic/members.vim +++ b/syntax/basic/members.vim @@ -1,7 +1,4 @@ -if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'typescript') != -1 -  finish -endif - +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1  syntax keyword typescriptConstructor           contained constructor    \ nextgroup=@typescriptCallSignature    \ skipwhite skipempty @@ -48,3 +45,4 @@ syntax region  typescriptComputedMember   contained matchgroup=typescriptPropert    \ contains=@typescriptValue,typescriptMember,typescriptMappedIn    \ nextgroup=@memberNextGroup    \ skipwhite skipempty +endif diff --git a/syntax/basic/object.vim b/syntax/basic/object.vim index 533201c3..eadaba0a 100644 --- a/syntax/basic/object.vim +++ b/syntax/basic/object.vim @@ -1,7 +1,4 @@ -if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'typescript') != -1 -  finish -endif - +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1  syntax region  typescriptObjectLiteral         matchgroup=typescriptBraces    \ start=/{/ end=/}/    \ contains=@typescriptComments,typescriptObjectLabel,typescriptStringProperty,typescriptComputedPropertyName @@ -30,3 +27,4 @@ syntax match typescriptRestOrSpread /\.\.\./ contained  syntax match typescriptObjectSpread /\.\.\./ contained containedin=typescriptObjectLiteral,typescriptArray nextgroup=@typescriptValue  syntax match typescriptObjectColon contained /:/ nextgroup=@typescriptValue skipwhite skipempty +endif diff --git a/syntax/basic/patch.vim b/syntax/basic/patch.vim index ea4adfa2..127059d5 100644 --- a/syntax/basic/patch.vim +++ b/syntax/basic/patch.vim @@ -1,9 +1,7 @@ -if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'typescript') != -1 -  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 diff --git a/syntax/basic/reserved.vim b/syntax/basic/reserved.vim index cf6467c2..b5940510 100644 --- a/syntax/basic/reserved.vim +++ b/syntax/basic/reserved.vim @@ -1,7 +1,4 @@ -if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'typescript') != -1 -  finish -endif - +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1  syntax cluster typescriptStrings               contains=typescriptProp,typescriptString,typescriptTemplate,@typescriptComments,typescriptDocComment,typescriptRegexpString,typescriptPropertyName  syntax cluster typescriptNoReserved contains= @@ -33,3 +30,4 @@ syntax keyword typescriptReserved containedin=ALLBUT,@typescriptNoReserved volat  syntax keyword typescriptReserved containedin=ALLBUT,@typescriptNoReserved class  syntax keyword typescriptReserved containedin=ALLBUT,@typescriptNoReserved var  syntax keyword typescriptReserved containedin=ALLBUT,@typescriptNoReserved function +endif diff --git a/syntax/basic/symbols.vim b/syntax/basic/symbols.vim index 978694e1..93adb687 100644 --- a/syntax/basic/symbols.vim +++ b/syntax/basic/symbols.vim @@ -1,7 +1,4 @@ -if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'typescript') != -1 -  finish -endif - +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1  " + - ^ ~  syntax match typescriptUnaryOp /[+\-~!]/   \ nextgroup=@typescriptValue @@ -40,3 +37,4 @@ syntax match   typescriptBinaryOp contained /-\(-\|=\)\?/ nextgroup=@typescriptV  syntax match typescriptBinaryOp contained /\*\*=\?/ nextgroup=@typescriptValue  syntax cluster typescriptSymbols               contains=typescriptBinaryOp,typescriptKeywordOp,typescriptTernary,typescriptAssign,typescriptCastKeyword +endif diff --git a/syntax/basic/type.vim b/syntax/basic/type.vim index 6f9097b0..b2f849fc 100644 --- a/syntax/basic/type.vim +++ b/syntax/basic/type.vim @@ -1,7 +1,4 @@ -if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'typescript') != -1 -  finish -endif - +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1  " Types  syntax match typescriptOptionalMark /?/ contained @@ -189,3 +186,4 @@ syntax region typescriptAliasDeclaration matchgroup=typescriptUnion  syntax keyword typescriptReadonlyArrayKeyword readonly    \ nextgroup=@typescriptPrimaryType    \ skipwhite +endif | 
