Mercurial > ec-dotfiles
comparison vendor/vim-syntax/typescript.vim @ 672:2febdacae5b4
Use base vim typescript syntax
Colorscheme seems fine now.
author | nanaya <me@nanaya.pro> |
---|---|
date | Tue, 05 Apr 2022 13:54:42 +0900 |
parents | 5bd223d5a97f |
children | 17cacf387f7c |
comparison
equal
deleted
inserted
replaced
671:b7929dbc5bfe | 672:2febdacae5b4 |
---|---|
1 " Vim syntax file | 1 " Vim syntax file |
2 " Language: typescript | 2 " Language: TypeScript |
3 " Author: MicroSoft Open Technologies Inc. | 3 " Maintainer: Bram Moolenaar, Herrington Darkholme |
4 " Version: 0.1 | 4 " Last Change: 2019 Nov 30 |
5 " Credits: Zhao Yi, Claudio Fleiner, Scott Shattuck, Jose Elera Campana | 5 " Based On: Herrington Darkholme's yats.vim |
6 " Changes: Go to https:github.com/HerringtonDarkholme/yats.vim for recent changes. | |
7 " Origin: https://github.com/othree/yajs | |
8 " Credits: Kao Wei-Ko(othree), Jose Elera Campana, Zhao Yi, Claudio Fleiner, Scott Shattuck | |
9 " (This file is based on their hard work), gumnos (From the #vim | |
10 " IRC Channel in Freenode) | |
11 | |
12 " This is the same syntax that is in yats.vim, but: | |
13 " - flattened into one file | |
14 " - HiLink commands changed to "hi def link" | |
15 " - Setting 'cpo' to the Vim value | |
6 | 16 |
7 if !exists("main_syntax") | 17 if !exists("main_syntax") |
8 if version < 600 | 18 if exists("b:current_syntax") |
9 syntax clear | |
10 elseif exists("b:current_syntax") | |
11 finish | 19 finish |
12 endif | 20 endif |
13 let main_syntax = "typescript" | 21 let main_syntax = 'typescript' |
14 endif | 22 endif |
15 | 23 |
16 " Drop fold if it set but vim doesn't support it. | 24 let s:cpo_save = &cpo |
17 if version < 600 && exists("typescript_fold") | 25 set cpo&vim |
18 unlet typescript_fold | |
19 endif | |
20 | 26 |
21 "" dollar sign is permitted anywhere in an identifier | 27 " this region is NOT used in TypeScriptReact |
22 setlocal iskeyword+=$ | 28 " nextgroup doesn't contain objectLiteral, let outer region contains it |
23 | 29 syntax region typescriptTypeCast matchgroup=typescriptTypeBrackets |
24 syntax sync fromstart | 30 \ start=/< \@!/ end=/>/ |
25 | 31 \ contains=@typescriptType |
26 "" syntax coloring for Node.js shebang line | 32 \ nextgroup=@typescriptExpression |
27 syn match shebang "^#!.*/bin/env\s\+node\>" | 33 \ contained skipwhite oneline |
28 hi link shebang Comment | |
29 | |
30 "" typescript comments"{{{ | |
31 syn keyword typescriptCommentTodo TODO FIXME XXX TBD contained | |
32 syn match typescriptLineComment "\/\/.*" contains=@Spell,typescriptCommentTodo,typescriptRef | |
33 syn match typescriptRefComment /\/\/\/<\(reference\|amd-\(dependency\|module\)\)\s\+.*\/>$/ contains=typescriptRefD,typescriptRefS | |
34 syn region typescriptRefD start=+"+ skip=+\\\\\|\\"+ end=+"\|$+ | |
35 syn region typescriptRefS start=+'+ skip=+\\\\\|\\'+ end=+'\|$+ | |
36 | |
37 syn match typescriptCommentSkip "^[ \t]*\*\($\|[ \t]\+\)" | |
38 syn region typescriptComment start="/\*" end="\*/" contains=@Spell,typescriptCommentTodo extend | |
39 "}}} | |
40 "" JSDoc support start"{{{ | |
41 if !exists("typescript_ignore_typescriptdoc") | |
42 syntax case ignore | |
43 | |
44 " syntax coloring for JSDoc comments (HTML) | |
45 "unlet b:current_syntax | |
46 | |
47 syntax region typescriptDocComment start="/\*\*\s*$" end="\*/" contains=typescriptDocTags,typescriptCommentTodo,typescriptCvsTag,@typescriptHtml,@Spell fold extend | |
48 syntax match typescriptDocTags contained "@\(param\|argument\|requires\|exception\|throws\|type\|class\|extends\|see\|link\|member\|module\|method\|title\|namespace\|optional\|default\|base\|file\|returns\=\)\>" nextgroup=typescriptDocParam,typescriptDocSeeTag skipwhite | |
49 syntax match typescriptDocTags contained "@\(beta\|deprecated\|description\|fileoverview\|author\|license\|version\|constructor\|private\|protected\|final\|ignore\|addon\|exec\)\>" | |
50 syntax match typescriptDocParam contained "\%(#\|\w\|\.\|:\|\/\)\+" | |
51 syntax region typescriptDocSeeTag contained matchgroup=typescriptDocSeeTag start="{" end="}" contains=typescriptDocTags | |
52 | |
53 syntax case match | |
54 endif "" JSDoc end | |
55 "}}} | |
56 syntax case match | |
57 | |
58 "" Syntax in the typescript code"{{{ | |
59 syn match typescriptSpecial "\\\d\d\d\|\\x\x\{2\}\|\\u\x\{4\}" contained containedin=typescriptStringD,typescriptStringS,typescriptStringB display | |
60 syn region typescriptStringD start=+"+ skip=+\\\\\|\\"+ end=+"\|$+ contains=typescriptSpecial,@htmlPreproc extend | |
61 syn region typescriptStringS start=+'+ skip=+\\\\\|\\'+ end=+'\|$+ contains=typescriptSpecial,@htmlPreproc extend | |
62 syn region typescriptStringB start=+`+ skip=+\\\\\|\\`+ end=+`+ contains=typescriptInterpolation,typescriptSpecial,@htmlPreproc extend | |
63 | |
64 syn region typescriptInterpolation matchgroup=typescriptInterpolationDelimiter | |
65 \ start=/${/ end=/}/ contained | |
66 \ contains=@typescriptExpression | |
67 | |
68 syn match typescriptNumber "-\=\<\d[0-9_]*L\=\>" display | |
69 syn match typescriptNumber "-\=\<0[xX][0-9a-fA-F][0-9a-fA-F_]*\>" display | |
70 syn match typescriptNumber "-\=\<0[bB][01][01_]*\>" display | |
71 syn match typescriptNumber "-\=\<0[oO]\o[0-7_]*\>" display | |
72 syn region typescriptRegexpString start=+/[^/*]+me=e-1 skip=+\\\\\|\\/+ end=+/[gimsuy]\{0,2\}\s*$+ end=+/[gimsuy]\{0,2\}\s*[;.,)\]}]+me=e-1 contains=@htmlPreproc oneline | |
73 " syntax match typescriptSpecial "\\\d\d\d\|\\x\x\{2\}\|\\u\x\{4\}\|\\." | |
74 " syntax region typescriptStringD start=+"+ skip=+\\\\\|\\$"+ end=+"+ contains=typescriptSpecial,@htmlPreproc | |
75 " syntax region typescriptStringS start=+'+ skip=+\\\\\|\\$'+ end=+'+ contains=typescriptSpecial,@htmlPreproc | |
76 " syntax region typescriptRegexpString start=+/\(\*\|/\)\@!+ skip=+\\\\\|\\/+ end=+/[gimsuy]\{,3}+ contains=typescriptSpecial,@htmlPreproc oneline | |
77 " syntax match typescriptNumber /\<-\=\d\+L\=\>\|\<0[xX]\x\+\>/ | |
78 syntax match typescriptFloat /\<-\=\%(\d[0-9_]*\.\d[0-9_]*\|\d[0-9_]*\.\|\.\d[0-9]*\)\%([eE][+-]\=\d[0-9_]*\)\=\>/ | |
79 " syntax match typescriptLabel /\(?\s*\)\@<!\<\w\+\(\s*:\)\@=/ | |
80 | |
81 syn match typescriptDecorators /@\([_$a-zA-Z][_$a-zA-Z0-9]*\.\)*[_$a-zA-Z][_$a-zA-Z0-9]*\>/ | |
82 "}}} | |
83 "" typescript Prototype"{{{ | |
84 syntax keyword typescriptPrototype contained prototype | |
85 "}}} | |
86 " DOM, Browser and Ajax Support {{{ | |
87 """""""""""""""""""""""" | |
88 if get(g:, 'typescript_ignore_browserwords', 0) | |
89 syntax keyword typescriptBrowserObjects window navigator screen history location | |
90 | |
91 syntax keyword typescriptDOMObjects document event HTMLElement Anchor Area Base Body Button Form Frame Frameset Image Link Meta Option Select Style Table TableCell TableRow Textarea | |
92 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 | |
93 syntax keyword typescriptDOMProperties contained nodeName nodeValue nodeType parentNode childNodes firstChild lastChild previousSibling nextSibling attributes ownerDocument namespaceURI prefix localName tagName | |
94 | |
95 syntax keyword typescriptAjaxObjects XMLHttpRequest | |
96 syntax keyword typescriptAjaxProperties contained readyState responseText responseXML statusText | |
97 syntax keyword typescriptAjaxMethods contained onreadystatechange abort getAllResponseHeaders getResponseHeader open send setRequestHeader | |
98 | |
99 syntax keyword typescriptPropietaryObjects ActiveXObject | |
100 syntax keyword typescriptPropietaryMethods contained attachEvent detachEvent cancelBubble returnValue | |
101 | |
102 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 | |
103 | |
104 syntax keyword typescriptEventListenerKeywords contained blur click focus mouseover mouseout load item | |
105 | |
106 syntax keyword typescriptEventListenerMethods contained scrollIntoView addEventListener dispatchEvent removeEventListener preventDefault stopPropagation | |
107 endif | |
108 " }}} | |
109 "" Programm Keywords"{{{ | |
110 syntax keyword typescriptSource import export from as | |
111 syntax keyword typescriptIdentifier arguments this void | |
112 syntax keyword typescriptStorageClass let var const | |
113 syntax keyword typescriptOperator delete new instanceof typeof | |
114 syntax keyword typescriptBoolean true false | |
115 syntax keyword typescriptNull null undefined | |
116 syntax keyword typescriptMessage alert confirm prompt status | |
117 syntax keyword typescriptGlobal self top parent | |
118 syntax keyword typescriptDeprecated escape unescape all applets alinkColor bgColor fgColor linkColor vlinkColor xmlEncoding | |
119 "}}} | |
120 "" Statement Keywords"{{{ | |
121 syntax keyword typescriptConditional if else switch | |
122 syntax keyword typescriptRepeat do while for in of | |
123 syntax keyword typescriptBranch break continue yield await | |
124 syntax keyword typescriptLabel case default async readonly | |
125 syntax keyword typescriptStatement return with | |
126 | |
127 syntax keyword typescriptGlobalObjects Array Boolean Date Function Infinity JSON Math Number NaN Object Packages RegExp String Symbol netscape ArrayBuffer BigInt64Array BigUint64Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray Buffer Collator DataView DateTimeFormat Intl Iterator Map Set WeakMap WeakSet NumberFormat ParallelArray Promise Proxy Reflect Uint8ClampedArray WebAssembly console document fetch window | |
128 syntax keyword typescriptGlobalNodeObjects module exports global process __dirname __filename | |
129 | |
130 syntax keyword typescriptExceptions try catch throw finally Error EvalError RangeError ReferenceError SyntaxError TypeError URIError | |
131 | |
132 syntax keyword typescriptReserved constructor declare as interface module abstract enum int short export interface static byte extends long super char final native synchronized class float package throws goto private transient debugger implements protected volatile double import public type namespace from get set keyof | |
133 "}}} | |
134 "" typescript/DOM/HTML/CSS specified things"{{{ | |
135 | |
136 " typescript Objects"{{{ | |
137 syn match typescriptFunction "(super\s*|constructor\s*)" contained nextgroup=typescriptVars | |
138 syn region typescriptVars start="(" end=")" contained contains=typescriptParameters transparent keepend | |
139 syn match typescriptParameters "([a-zA-Z0-9_?.$][\w?.$]*)\s*:\s*([a-zA-Z0-9_?.$][\w?.$]*)" contained skipwhite | |
140 "}}} | |
141 " DOM2 Objects"{{{ | |
142 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 | |
143 syntax keyword typescriptExceptions DOMException | |
144 "}}} | |
145 " DOM2 CONSTANT"{{{ | |
146 syntax keyword typescriptDomErrNo INDEX_SIZE_ERR DOMSTRING_SIZE_ERR HIERARCHY_REQUEST_ERR WRONG_DOCUMENT_ERR INVALID_CHARACTER_ERR NO_DATA_ALLOWED_ERR NO_MODIFICATION_ALLOWED_ERR NOT_FOUND_ERR NOT_SUPPORTED_ERR INUSE_ATTRIBUTE_ERR INVALID_STATE_ERR SYNTAX_ERR INVALID_MODIFICATION_ERR NAMESPACE_ERR INVALID_ACCESS_ERR | |
147 syntax keyword typescriptDomNodeConsts ELEMENT_NODE ATTRIBUTE_NODE TEXT_NODE CDATA_SECTION_NODE ENTITY_REFERENCE_NODE ENTITY_NODE PROCESSING_INSTRUCTION_NODE COMMENT_NODE DOCUMENT_NODE DOCUMENT_TYPE_NODE DOCUMENT_FRAGMENT_NODE NOTATION_NODE | |
148 "}}} | |
149 " HTML events and internal variables"{{{ | |
150 syntax case ignore | |
151 syntax keyword typescriptHtmlEvents onblur onclick oncontextmenu ondblclick onfocus onkeydown onkeypress onkeyup onmousedown onmousemove onmouseout onmouseover onmouseup onresize onload onsubmit | |
152 syntax case match | |
153 "}}} | |
154 | |
155 " Follow stuff should be highligh within a special context | |
156 " While it can't be handled with context depended with Regex based highlight | |
157 " So, turn it off by default | |
158 if exists("typescript_enable_domhtmlcss") | |
159 | |
160 " DOM2 things"{{{ | |
161 syntax match typescriptDomElemAttrs contained /\%(nodeName\|nodeValue\|nodeType\|parentNode\|childNodes\|firstChild\|lastChild\|previousSibling\|nextSibling\|attributes\|ownerDocument\|namespaceURI\|prefix\|localName\|tagName\)\>/ | |
162 syntax match typescriptDomElemFuncs contained /\%(insertBefore\|replaceChild\|removeChild\|appendChild\|hasChildNodes\|cloneNode\|normalize\|isSupported\|hasAttributes\|getAttribute\|setAttribute\|removeAttribute\|getAttributeNode\|setAttributeNode\|removeAttributeNode\|getElementsByTagName\|getAttributeNS\|setAttributeNS\|removeAttributeNS\|getAttributeNodeNS\|setAttributeNodeNS\|getElementsByTagNameNS\|hasAttribute\|hasAttributeNS\)\>/ nextgroup=typescriptParen skipwhite | |
163 "}}} | |
164 " HTML things"{{{ | |
165 syntax match typescriptHtmlElemAttrs contained /\%(className\|clientHeight\|clientLeft\|clientTop\|clientWidth\|dir\|id\|innerHTML\|lang\|length\|offsetHeight\|offsetLeft\|offsetParent\|offsetTop\|offsetWidth\|scrollHeight\|scrollLeft\|scrollTop\|scrollWidth\|style\|tabIndex\|title\)\>/ | |
166 syntax match typescriptHtmlElemFuncs contained /\%(blur\|click\|focus\|scrollIntoView\|addEventListener\|dispatchEvent\|removeEventListener\|item\)\>/ nextgroup=typescriptParen skipwhite | |
167 "}}} | |
168 " CSS Styles in typescript"{{{ | |
169 syntax keyword typescriptCssStyles contained color font fontFamily fontSize fontSizeAdjust fontStretch fontStyle fontVariant fontWeight letterSpacing lineBreak lineHeight quotes rubyAlign rubyOverhang rubyPosition | |
170 syntax keyword typescriptCssStyles contained textAlign textAlignLast textAutospace textDecoration textIndent textJustify textJustifyTrim textKashidaSpace textOverflowW6 textShadow textTransform textUnderlinePosition | |
171 syntax keyword typescriptCssStyles contained unicodeBidi whiteSpace wordBreak wordSpacing wordWrap writingMode | |
172 syntax keyword typescriptCssStyles contained bottom height left position right top width zIndex | |
173 syntax keyword typescriptCssStyles contained border borderBottom borderLeft borderRight borderTop borderBottomColor borderLeftColor borderTopColor borderBottomStyle borderLeftStyle borderRightStyle borderTopStyle borderBottomWidth borderLeftWidth borderRightWidth borderTopWidth borderColor borderStyle borderWidth borderCollapse borderSpacing captionSide emptyCells tableLayout | |
174 syntax keyword typescriptCssStyles contained margin marginBottom marginLeft marginRight marginTop outline outlineColor outlineStyle outlineWidth padding paddingBottom paddingLeft paddingRight paddingTop | |
175 syntax keyword typescriptCssStyles contained listStyle listStyleImage listStylePosition listStyleType | |
176 syntax keyword typescriptCssStyles contained background backgroundAttachment backgroundColor backgroundImage backgroundPosition backgroundPositionX backgroundPositionY backgroundRepeat | |
177 syntax keyword typescriptCssStyles contained clear clip clipBottom clipLeft clipRight clipTop content counterIncrement counterReset cssFloat cursor direction display filter layoutGrid layoutGridChar layoutGridLine layoutGridMode layoutGridType | |
178 syntax keyword typescriptCssStyles contained marks maxHeight maxWidth minHeight minWidth opacity MozOpacity overflow overflowX overflowY verticalAlign visibility zoom cssText | |
179 syntax keyword typescriptCssStyles contained scrollbar3dLightColor scrollbarArrowColor scrollbarBaseColor scrollbarDarkShadowColor scrollbarFaceColor scrollbarHighlightColor scrollbarShadowColor scrollbarTrackColor | |
180 "}}} | |
181 endif "DOM/HTML/CSS | |
182 | |
183 " Highlight ways"{{{ | |
184 syntax match typescriptDotNotation "\." nextgroup=typescriptPrototype,typescriptDomElemAttrs,typescriptDomElemFuncs,typescriptDOMMethods,typescriptDOMProperties,typescriptHtmlElemAttrs,typescriptHtmlElemFuncs,typescriptHtmlElemProperties,typescriptAjaxProperties,typescriptAjaxMethods,typescriptPropietaryMethods,typescriptEventListenerMethods skipwhite skipnl | |
185 syntax match typescriptDotNotation "\.style\." nextgroup=typescriptCssStyles | |
186 "}}} | |
187 | |
188 "" end DOM/HTML/CSS specified things""}}} | |
189 | 34 |
190 | 35 |
191 "" Code blocks | 36 """"""""""""""""""""""""""""""""""""""""""""""""""" |
192 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,typescriptGlobalNodeObjects | 37 " Source the part common with typescriptreact.vim |
38 source <sfile>:h/typescriptcommon.vim | |
193 | 39 |
194 if main_syntax == "typescript" | |
195 syntax sync clear | |
196 syntax sync ccomment typescriptComment minlines=200 | |
197 " syntax sync match typescriptHighlight grouphere typescriptBlock /{/ | |
198 endif | |
199 | |
200 syntax keyword typescriptFuncKeyword function | |
201 "syntax region typescriptFuncDef start="function" end="\(.*\)" contains=typescriptFuncKeyword,typescriptFuncArg keepend | |
202 "syntax match typescriptFuncArg "\(([^()]*)\)" contains=typescriptParens,typescriptFuncComma contained | |
203 "syntax match typescriptFuncComma /,/ contained | |
204 " syntax region typescriptFuncBlock contained matchgroup=typescriptFuncBlock start="{" end="}" contains=@typescriptAll,typescriptParensErrA,typescriptParensErrB,typescriptParen,typescriptBracket,typescriptBlock fold | |
205 | |
206 syn match typescriptBraces "[{}\[\]]" | |
207 syn match typescriptParens "[()]" | |
208 syn match typescriptEndColons "[;,]" | |
209 syn match typescriptLogicSymbols "\(&&\)\|\(||\)\|\(!\)" | |
210 syn match typescriptOpSymbols "=\{1,3}\|!==\|!=\|<\|>\|>=\|<=\|++\|+=\|--\|-=" | |
211 | |
212 " typescriptFold Function {{{ | |
213 | |
214 " function! typescriptFold() | |
215 | |
216 " skip curly braces inside RegEx's and comments | |
217 syn region foldBraces start=/{/ skip=/\(\/\/.*\)\|\(\/.*\/\)/ end=/}/ transparent fold keepend extend | |
218 | |
219 " setl foldtext=FoldText() | |
220 " endfunction | |
221 | |
222 " au FileType typescript call typescriptFold() | |
223 | |
224 " }}} | |
225 | |
226 " Define the default highlighting. | |
227 " For version 5.7 and earlier: only when not done already by this script | |
228 " For version 5.8 and later: only when an item doesn't have highlighting yet | |
229 " For version 8.1.1486 and later: only when not done already by this script (need to override vim's new typescript support) | |
230 if version >= 508 || !exists("did_typescript_syn_inits") | |
231 if version < 508 || has('patch-8.1.1486') | |
232 let did_typescript_syn_inits = 1 | |
233 command -nargs=+ HiLink hi link <args> | |
234 else | |
235 command -nargs=+ HiLink hi def link <args> | |
236 endif | |
237 | |
238 "typescript highlighting | |
239 HiLink typescriptParameters Operator | |
240 HiLink typescriptSuperBlock Operator | |
241 | |
242 HiLink typescriptEndColons Exception | |
243 HiLink typescriptOpSymbols Operator | |
244 HiLink typescriptLogicSymbols Boolean | |
245 HiLink typescriptBraces Function | |
246 HiLink typescriptParens Operator | |
247 HiLink typescriptComment Comment | |
248 HiLink typescriptLineComment Comment | |
249 HiLink typescriptRefComment Include | |
250 HiLink typescriptRefS String | |
251 HiLink typescriptRefD String | |
252 HiLink typescriptDocComment Comment | |
253 HiLink typescriptCommentTodo Todo | |
254 HiLink typescriptCvsTag Function | |
255 HiLink typescriptDocTags Special | |
256 HiLink typescriptDocSeeTag Function | |
257 HiLink typescriptDocParam Function | |
258 HiLink typescriptStringS String | |
259 HiLink typescriptStringD String | |
260 HiLink typescriptStringB String | |
261 HiLink typescriptInterpolationDelimiter Delimiter | |
262 HiLink typescriptRegexpString String | |
263 HiLink typescriptGlobal Constant | |
264 HiLink typescriptCharacter Character | |
265 HiLink typescriptPrototype Type | |
266 HiLink typescriptConditional Conditional | |
267 HiLink typescriptBranch Conditional | |
268 HiLink typescriptIdentifier Identifier | |
269 HiLink typescriptStorageClass StorageClass | |
270 HiLink typescriptRepeat Repeat | |
271 HiLink typescriptStatement Statement | |
272 HiLink typescriptFuncKeyword Keyword | |
273 HiLink typescriptMessage Keyword | |
274 HiLink typescriptDeprecated Exception | |
275 HiLink typescriptError Error | |
276 HiLink typescriptParensError Error | |
277 HiLink typescriptParensErrA Error | |
278 HiLink typescriptParensErrB Error | |
279 HiLink typescriptParensErrC Error | |
280 HiLink typescriptReserved Keyword | |
281 HiLink typescriptOperator Operator | |
282 HiLink typescriptType Type | |
283 HiLink typescriptNull Type | |
284 HiLink typescriptNumber Number | |
285 HiLink typescriptFloat Number | |
286 HiLink typescriptDecorators Special | |
287 HiLink typescriptBoolean Boolean | |
288 HiLink typescriptLabel Label | |
289 HiLink typescriptSpecial Special | |
290 HiLink typescriptSource Special | |
291 HiLink typescriptGlobalObjects Special | |
292 HiLink typescriptGlobalNodeObjects Special | |
293 HiLink typescriptExceptions Special | |
294 | |
295 HiLink typescriptDomErrNo Constant | |
296 HiLink typescriptDomNodeConsts Constant | |
297 HiLink typescriptDomElemAttrs Label | |
298 HiLink typescriptDomElemFuncs PreProc | |
299 | |
300 HiLink typescriptHtmlElemAttrs Label | |
301 HiLink typescriptHtmlElemFuncs PreProc | |
302 | |
303 HiLink typescriptCssStyles Label | |
304 | |
305 " Ajax Highlighting | |
306 HiLink typescriptBrowserObjects Constant | |
307 | |
308 HiLink typescriptDOMObjects Constant | |
309 HiLink typescriptDOMMethods Function | |
310 HiLink typescriptDOMProperties Special | |
311 | |
312 HiLink typescriptAjaxObjects Constant | |
313 HiLink typescriptAjaxMethods Function | |
314 HiLink typescriptAjaxProperties Special | |
315 | |
316 HiLink typescriptFuncDef Title | |
317 HiLink typescriptFuncArg Special | |
318 HiLink typescriptFuncComma Operator | |
319 | |
320 HiLink typescriptHtmlEvents Special | |
321 HiLink typescriptHtmlElemProperties Special | |
322 | |
323 HiLink typescriptEventListenerKeywords Keyword | |
324 | |
325 HiLink typescriptNumber Number | |
326 HiLink typescriptPropietaryObjects Constant | |
327 | |
328 delcommand HiLink | |
329 endif | |
330 | |
331 " Define the htmltypescript for HTML syntax html.vim | |
332 "syntax clear htmltypescript | |
333 "syntax clear typescriptExpression | |
334 syntax cluster htmltypescript contains=@typescriptAll,typescriptBracket,typescriptParen,typescriptBlock,typescriptParenError | |
335 syntax cluster typescriptExpression contains=@typescriptAll,typescriptBracket,typescriptParen,typescriptBlock,typescriptParenError,@htmlPreproc | |
336 | 40 |
337 let b:current_syntax = "typescript" | 41 let b:current_syntax = "typescript" |
338 if main_syntax == 'typescript' | 42 if main_syntax == 'typescript' |
339 unlet main_syntax | 43 unlet main_syntax |
340 endif | 44 endif |
341 | 45 |
342 " vim: ts=4 | 46 let &cpo = s:cpo_save |
47 unlet s:cpo_save |