This commit is contained in:
Adam Stankiewicz
2018-10-08 19:00:59 +02:00
parent 055f7710b6
commit fd74d8b2b1
59 changed files with 2570 additions and 1908 deletions

View File

@@ -58,7 +58,7 @@ endif "" JSDoc end
syntax case match
"" Syntax in the typescript code"{{{
syn match typescriptSpecial "\\\d\d\d\|\\."
syn match typescriptSpecial "\\\d\d\d\|\\x\x\{2\}\|\\u\x\{4\}" contained containedin=typescriptStringD,typescriptStringS,typescriptStringB display
syn region typescriptStringD start=+"+ skip=+\\\\\|\\"+ end=+"\|$+ contains=typescriptSpecial,@htmlPreproc extend
syn region typescriptStringS start=+'+ skip=+\\\\\|\\'+ end=+'\|$+ contains=typescriptSpecial,@htmlPreproc extend
syn region typescriptStringB start=+`+ skip=+\\\\\|\\`+ end=+`+ contains=typescriptInterpolation,typescriptSpecial,@htmlPreproc extend
@@ -87,28 +87,31 @@ syntax keyword typescriptPrototype contained prototype
"}}}
" DOM, Browser and Ajax Support {{{
""""""""""""""""""""""""
syntax keyword typescriptBrowserObjects window navigator screen history location
syntax keyword typescriptDOMObjects document event HTMLElement Anchor Area Base Body Button Form Frame Frameset Image Link Meta Option Select Style Table TableCell TableRow Textarea
syntax keyword typescriptDOMMethods contained createTextNode createElement insertBefore replaceChild removeChild appendChild hasChildNodes cloneNode normalize isSupported hasAttributes getAttribute setAttribute removeAttribute getAttributeNode setAttributeNode removeAttributeNode getElementsByTagName hasAttribute getElementById adoptNode close compareDocumentPosition createAttribute createCDATASection createComment createDocumentFragment createElementNS createEvent createExpression createNSResolver createProcessingInstruction createRange createTreeWalker elementFromPoint evaluate getBoxObjectFor getElementsByClassName getSelection getUserData hasFocus importNode
syntax keyword typescriptDOMProperties contained nodeName nodeValue nodeType parentNode childNodes firstChild lastChild previousSibling nextSibling attributes ownerDocument namespaceURI prefix localName tagName
syntax keyword typescriptAjaxObjects XMLHttpRequest
syntax keyword typescriptAjaxProperties contained readyState responseText responseXML statusText
syntax keyword typescriptAjaxMethods contained onreadystatechange abort getAllResponseHeaders getResponseHeader open send setRequestHeader
syntax keyword typescriptPropietaryObjects ActiveXObject
syntax keyword typescriptPropietaryMethods contained attachEvent detachEvent cancelBubble returnValue
syntax keyword typescriptHtmlElemProperties contained className clientHeight clientLeft clientTop clientWidth dir href id innerHTML lang length offsetHeight offsetLeft offsetParent offsetTop offsetWidth scrollHeight scrollLeft scrollTop scrollWidth style tabIndex target title
syntax keyword typescriptEventListenerKeywords contained blur click focus mouseover mouseout load item
syntax keyword typescriptEventListenerMethods contained scrollIntoView addEventListener dispatchEvent removeEventListener preventDefault stopPropagation
if get(g:, 'typescript_ignore_browserwords', 0)
syntax keyword typescriptBrowserObjects window navigator screen history location
syntax keyword typescriptDOMObjects document event HTMLElement Anchor Area Base Body Button Form Frame Frameset Image Link Meta Option Select Style Table TableCell TableRow Textarea
syntax keyword typescriptDOMMethods contained createTextNode createElement insertBefore replaceChild removeChild appendChild hasChildNodes cloneNode normalize isSupported hasAttributes getAttribute setAttribute removeAttribute getAttributeNode setAttributeNode removeAttributeNode getElementsByTagName hasAttribute getElementById adoptNode close compareDocumentPosition createAttribute createCDATASection createComment createDocumentFragment createElementNS createEvent createExpression createNSResolver createProcessingInstruction createRange createTreeWalker elementFromPoint evaluate getBoxObjectFor getElementsByClassName getSelection getUserData hasFocus importNode
syntax keyword typescriptDOMProperties contained nodeName nodeValue nodeType parentNode childNodes firstChild lastChild previousSibling nextSibling attributes ownerDocument namespaceURI prefix localName tagName
syntax keyword typescriptAjaxObjects XMLHttpRequest
syntax keyword typescriptAjaxProperties contained readyState responseText responseXML statusText
syntax keyword typescriptAjaxMethods contained onreadystatechange abort getAllResponseHeaders getResponseHeader open send setRequestHeader
syntax keyword typescriptPropietaryObjects ActiveXObject
syntax keyword typescriptPropietaryMethods contained attachEvent detachEvent cancelBubble returnValue
syntax keyword typescriptHtmlElemProperties contained className clientHeight clientLeft clientTop clientWidth dir href id innerHTML lang length offsetHeight offsetLeft offsetParent offsetTop offsetWidth scrollHeight scrollLeft scrollTop scrollWidth style tabIndex target title
syntax keyword typescriptEventListenerKeywords contained blur click focus mouseover mouseout load item
syntax keyword typescriptEventListenerMethods contained scrollIntoView addEventListener dispatchEvent removeEventListener preventDefault stopPropagation
endif
" }}}
"" Programm Keywords"{{{
syntax keyword typescriptSource import export from as
syntax keyword typescriptIdentifier arguments this let var void const
syntax keyword typescriptIdentifier arguments this void
syntax keyword typescriptStorageClass let var const
syntax keyword typescriptOperator delete new instanceof typeof
syntax keyword typescriptBoolean true false
syntax keyword typescriptNull null undefined
@@ -137,7 +140,7 @@ syntax keyword typescriptReserved constructor declare as interface module abstra
syn match typescriptParameters "([a-zA-Z0-9_?.$][\w?.$]*)\s*:\s*([a-zA-Z0-9_?.$][\w?.$]*)" contained skipwhite
"}}}
" DOM2 Objects"{{{
syntax keyword typescriptType DOMImplementation DocumentFragment Node NodeList NamedNodeMap CharacterData Attr Element Text Comment CDATASection DocumentType Notation Entity EntityReference ProcessingInstruction void any string boolean number symbol never object
syntax keyword typescriptType DOMImplementation DocumentFragment Node NodeList NamedNodeMap CharacterData Attr Element Text Comment CDATASection DocumentType Notation Entity EntityReference ProcessingInstruction void any string boolean number symbol never object unknown
syntax keyword typescriptExceptions DOMException
"}}}
" DOM2 CONSTANT"{{{
@@ -187,7 +190,7 @@ syntax match typescriptDotNotation "\.style\." nextgroup=typescriptCssStyles
"" Code blocks
syntax cluster typescriptAll contains=typescriptComment,typescriptLineComment,typescriptDocComment,typescriptStringD,typescriptStringS,typescriptStringB,typescriptRegexpString,typescriptNumber,typescriptFloat,typescriptDecorators,typescriptLabel,typescriptSource,typescriptType,typescriptOperator,typescriptBoolean,typescriptNull,typescriptFuncKeyword,typescriptConditional,typescriptGlobal,typescriptRepeat,typescriptBranch,typescriptStatement,typescriptGlobalObjects,typescriptMessage,typescriptIdentifier,typescriptExceptions,typescriptReserved,typescriptDeprecated,typescriptDomErrNo,typescriptDomNodeConsts,typescriptHtmlEvents,typescriptDotNotation,typescriptBrowserObjects,typescriptDOMObjects,typescriptAjaxObjects,typescriptPropietaryObjects,typescriptDOMMethods,typescriptHtmlElemProperties,typescriptDOMProperties,typescriptEventListenerKeywords,typescriptEventListenerMethods,typescriptAjaxProperties,typescriptAjaxMethods,typescriptFuncArg
syntax cluster typescriptAll contains=typescriptComment,typescriptLineComment,typescriptDocComment,typescriptStringD,typescriptStringS,typescriptStringB,typescriptRegexpString,typescriptNumber,typescriptFloat,typescriptDecorators,typescriptLabel,typescriptSource,typescriptType,typescriptOperator,typescriptBoolean,typescriptNull,typescriptFuncKeyword,typescriptConditional,typescriptGlobal,typescriptRepeat,typescriptBranch,typescriptStatement,typescriptGlobalObjects,typescriptMessage,typescriptIdentifier,typescriptStorageClass,typescriptExceptions,typescriptReserved,typescriptDeprecated,typescriptDomErrNo,typescriptDomNodeConsts,typescriptHtmlEvents,typescriptDotNotation,typescriptBrowserObjects,typescriptDOMObjects,typescriptAjaxObjects,typescriptPropietaryObjects,typescriptDOMMethods,typescriptHtmlElemProperties,typescriptDOMProperties,typescriptEventListenerKeywords,typescriptEventListenerMethods,typescriptAjaxProperties,typescriptAjaxMethods,typescriptFuncArg
if main_syntax == "typescript"
syntax sync clear
@@ -263,6 +266,7 @@ if version >= 508 || !exists("did_typescript_syn_inits")
HiLink typescriptConditional Conditional
HiLink typescriptBranch Conditional
HiLink typescriptIdentifier Identifier
HiLink typescriptStorageClass StorageClass
HiLink typescriptRepeat Repeat
HiLink typescriptStatement Statement
HiLink typescriptFuncKeyword Function