diff options
Diffstat (limited to 'syntax/basic')
| -rw-r--r-- | syntax/basic/class.vim | 2 | ||||
| -rw-r--r-- | syntax/basic/cluster.vim | 2 | ||||
| -rw-r--r-- | syntax/basic/decorator.vim | 2 | ||||
| -rw-r--r-- | syntax/basic/doc.vim | 2 | ||||
| -rw-r--r-- | syntax/basic/function.vim | 2 | ||||
| -rw-r--r-- | syntax/basic/identifiers.vim | 2 | ||||
| -rw-r--r-- | syntax/basic/keyword.vim | 2 | ||||
| -rw-r--r-- | syntax/basic/literal.vim | 2 | ||||
| -rw-r--r-- | syntax/basic/members.vim | 2 | ||||
| -rw-r--r-- | syntax/basic/object.vim | 2 | ||||
| -rw-r--r-- | syntax/basic/patch.vim | 2 | ||||
| -rw-r--r-- | syntax/basic/reserved.vim | 2 | ||||
| -rw-r--r-- | syntax/basic/symbols.vim | 2 | ||||
| -rw-r--r-- | syntax/basic/type.vim | 2 | 
14 files changed, 28 insertions, 0 deletions
| diff --git a/syntax/basic/class.vim b/syntax/basic/class.vim index 2cefe76d..73f63468 100644 --- a/syntax/basic/class.vim +++ b/syntax/basic/class.vim @@ -1,4 +1,5 @@  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 @@ -64,4 +65,5 @@ 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 07775a18..8538c517 100644 --- a/syntax/basic/cluster.vim +++ b/syntax/basic/cluster.vim @@ -1,4 +1,5 @@  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, @@ -37,4 +38,5 @@ 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 c61ca643..1a8fc2c7 100644 --- a/syntax/basic/decorator.vim +++ b/syntax/basic/decorator.vim @@ -1,5 +1,7 @@  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 88a2c08d..dfba989a 100644 --- a/syntax/basic/doc.vim +++ b/syntax/basic/doc.vim @@ -1,4 +1,5 @@  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\>" @@ -82,4 +83,5 @@ if main_syntax == "typescript"  endif  syntax case match +  endif diff --git a/syntax/basic/function.vim b/syntax/basic/function.vim index 782a58aa..ac1c4a4c 100644 --- a/syntax/basic/function.vim +++ b/syntax/basic/function.vim @@ -1,4 +1,5 @@  if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 +  syntax keyword typescriptAsyncFuncKeyword      async    \ nextgroup=typescriptFuncKeyword,typescriptArrowFuncDef    \ skipwhite @@ -66,4 +67,5 @@ 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 6a774f1b..027fbde5 100644 --- a/syntax/basic/identifiers.vim +++ b/syntax/basic/identifiers.vim @@ -1,4 +1,5 @@  if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 +  syntax cluster afterIdentifier contains=    \ typescriptDotNotation,    \ typescriptFuncCallArg, @@ -28,4 +29,5 @@ 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 b658b334..ff1e169a 100644 --- a/syntax/basic/keyword.vim +++ b/syntax/basic/keyword.vim @@ -1,4 +1,5 @@  if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 +  "Import  syntax keyword typescriptImport                from as import  syntax keyword typescriptExport                export @@ -90,4 +91,5 @@ syntax cluster typescriptAmbients contains=    \ typescriptAbstract,    \ typescriptEnumKeyword,typescriptEnum,    \ typescriptModule +  endif diff --git a/syntax/basic/literal.vim b/syntax/basic/literal.vim index fca1b54f..533b228a 100644 --- a/syntax/basic/literal.vim +++ b/syntax/basic/literal.vim @@ -1,4 +1,5 @@  if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 +  "Syntax in the JavaScript code  " String @@ -42,4 +43,5 @@ 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 17465093..267bd110 100644 --- a/syntax/basic/members.vim +++ b/syntax/basic/members.vim @@ -1,4 +1,5 @@  if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 +  syntax keyword typescriptConstructor           contained constructor    \ nextgroup=@typescriptCallSignature    \ skipwhite skipempty @@ -45,4 +46,5 @@ 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 eadaba0a..a0d69c53 100644 --- a/syntax/basic/object.vim +++ b/syntax/basic/object.vim @@ -1,4 +1,5 @@  if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 +  syntax region  typescriptObjectLiteral         matchgroup=typescriptBraces    \ start=/{/ end=/}/    \ contains=@typescriptComments,typescriptObjectLabel,typescriptStringProperty,typescriptComputedPropertyName @@ -27,4 +28,5 @@ 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 127059d5..5531db79 100644 --- a/syntax/basic/patch.vim +++ b/syntax/basic/patch.vim @@ -1,7 +1,9 @@  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 b5940510..14ea7565 100644 --- a/syntax/basic/reserved.vim +++ b/syntax/basic/reserved.vim @@ -1,4 +1,5 @@  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= @@ -30,4 +31,5 @@ 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 93adb687..5728316a 100644 --- a/syntax/basic/symbols.vim +++ b/syntax/basic/symbols.vim @@ -1,4 +1,5 @@  if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 +  " + - ^ ~  syntax match typescriptUnaryOp /[+\-~!]/   \ nextgroup=@typescriptValue @@ -37,4 +38,5 @@ 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 b2f849fc..d8992429 100644 --- a/syntax/basic/type.vim +++ b/syntax/basic/type.vim @@ -1,4 +1,5 @@  if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 +  " Types  syntax match typescriptOptionalMark /?/ contained @@ -186,4 +187,5 @@ syntax region typescriptAliasDeclaration matchgroup=typescriptUnion  syntax keyword typescriptReadonlyArrayKeyword readonly    \ nextgroup=@typescriptPrimaryType    \ skipwhite +  endif | 
