Mercurial > ec-dotfiles
annotate vendor/vim-syntax/typescriptreact.vim @ 645:7e4b3136f55e
More histories and copypaste
author | nanaya <me@nanaya.pro> |
---|---|
date | Wed, 16 Sep 2020 14:19:54 +0900 |
parents | ced2ee9efd9f |
children | 17cacf387f7c |
rev | line source |
---|---|
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
1 " Vim syntax file |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
2 " Language: TypeScript with React (JSX) |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
3 " Maintainer: Bram Moolenaar |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
4 " Last Change: 2019 Nov 30 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
5 " Based On: Herrington Darkholme's yats.vim |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
6 " Changes: See https:github.com/HerringtonDarkholme/yats.vim |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
7 " Credits: See yats.vim on github |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
8 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
9 if !exists("main_syntax") |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
10 if exists("b:current_syntax") |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
11 finish |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
12 endif |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
13 let main_syntax = 'typescriptreact' |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
14 endif |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
15 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
16 let s:cpo_save = &cpo |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
17 set cpo&vim |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
18 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
19 syntax region tsxTag |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
20 \ start=+<\([^/!?<>="':]\+\)\@=+ |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
21 \ skip=+</[^ /!?<>"']\+>+ |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
22 \ end=+/\@<!>+ |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
23 \ end=+\(/>\)\@=+ |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
24 \ contained |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
25 \ contains=tsxTagName,tsxIntrinsicTagName,tsxAttrib,tsxEscJs, |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
26 \tsxCloseString,@tsxComment |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
27 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
28 syntax match tsxTag /<>/ contained |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
29 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
30 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
31 " <tag></tag> |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
32 " s~~~~~~~~~e |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
33 " and self close tag |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
34 " <tag/> |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
35 " s~~~~e |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
36 " A big start regexp borrowed from https://git.io/vDyxc |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
37 syntax region tsxRegion |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
38 \ start=+<\_s*\z([a-zA-Z1-9\$_-]\+\(\.\k\+\)*\)+ |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
39 \ skip=+<!--\_.\{-}-->+ |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
40 \ end=+</\_s*\z1>+ |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
41 \ matchgroup=tsxCloseString end=+/>+ |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
42 \ fold |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
43 \ contains=tsxRegion,tsxCloseString,tsxCloseTag,tsxTag,tsxCommentInvalid,tsxFragment,tsxEscJs,@Spell |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
44 \ keepend |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
45 \ extend |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
46 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
47 " <> </> |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
48 " s~~~~~~e |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
49 " A big start regexp borrowed from https://git.io/vDyxc |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
50 syntax region tsxFragment |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
51 \ start=+\(\((\|{\|}\|\[\|,\|&&\|||\|?\|:\|=\|=>\|\Wreturn\|^return\|\Wdefault\|^\|>\)\_s*\)\@<=<>+ |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
52 \ skip=+<!--\_.\{-}-->+ |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
53 \ end=+</>+ |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
54 \ fold |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
55 \ contains=tsxRegion,tsxCloseString,tsxCloseTag,tsxTag,tsxCommentInvalid,tsxFragment,tsxEscJs,@Spell |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
56 \ keepend |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
57 \ extend |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
58 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
59 " </tag> |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
60 " ~~~~~~ |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
61 syntax match tsxCloseTag |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
62 \ +</\_s*[^/!?<>"']\+>+ |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
63 \ contained |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
64 \ contains=tsxTagName,tsxIntrinsicTagName |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
65 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
66 syntax match tsxCloseTag +</>+ contained |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
67 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
68 syntax match tsxCloseString |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
69 \ +/>+ |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
70 \ contained |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
71 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
72 " <!-- --> |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
73 " ~~~~~~~~ |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
74 syntax match tsxCommentInvalid /<!--\_.\{-}-->/ display |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
75 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
76 syntax region tsxBlockComment |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
77 \ contained |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
78 \ start="/\*" |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
79 \ end="\*/" |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
80 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
81 syntax match tsxLineComment |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
82 \ "//.*$" |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
83 \ contained |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
84 \ display |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
85 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
86 syntax cluster tsxComment contains=tsxBlockComment,tsxLineComment |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
87 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
88 syntax match tsxEntity "&[^; \t]*;" contains=tsxEntityPunct |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
89 syntax match tsxEntityPunct contained "[&.;]" |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
90 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
91 " <tag key={this.props.key}> |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
92 " ~~~ |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
93 syntax match tsxTagName |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
94 \ +[</]\_s*[^/!?<>"'* ]\++hs=s+1 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
95 \ contained |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
96 \ nextgroup=tsxAttrib |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
97 \ skipwhite |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
98 \ display |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
99 syntax match tsxIntrinsicTagName |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
100 \ +[</]\_s*[a-z1-9-]\++hs=s+1 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
101 \ contained |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
102 \ nextgroup=tsxAttrib |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
103 \ skipwhite |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
104 \ display |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
105 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
106 " <tag key={this.props.key}> |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
107 " ~~~ |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
108 syntax match tsxAttrib |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
109 \ +[a-zA-Z_][-0-9a-zA-Z_]*+ |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
110 \ nextgroup=tsxEqual skipwhite |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
111 \ contained |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
112 \ display |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
113 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
114 " <tag id="sample"> |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
115 " ~ |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
116 syntax match tsxEqual +=+ display contained |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
117 \ nextgroup=tsxString skipwhite |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
118 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
119 " <tag id="sample"> |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
120 " s~~~~~~e |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
121 syntax region tsxString contained start=+"+ end=+"+ contains=tsxEntity,@Spell display |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
122 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
123 " <tag key={this.props.key}> |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
124 " s~~~~~~~~~~~~~~e |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
125 syntax region tsxEscJs |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
126 \ contained |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
127 \ contains=@typescriptValue,@tsxComment |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
128 \ matchgroup=typescriptBraces |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
129 \ start=+{+ |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
130 \ end=+}+ |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
131 \ extend |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
132 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
133 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
134 """"""""""""""""""""""""""""""""""""""""""""""""""" |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
135 " Source the part common with typescriptreact.vim |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
136 source <sfile>:h/typescriptcommon.vim |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
137 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
138 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
139 syntax cluster typescriptExpression add=tsxRegion,tsxFragment |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
140 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
141 hi def link tsxTag htmlTag |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
142 hi def link tsxTagName Function |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
143 hi def link tsxIntrinsicTagName htmlTagName |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
144 hi def link tsxString String |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
145 hi def link tsxNameSpace Function |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
146 hi def link tsxCommentInvalid Error |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
147 hi def link tsxBlockComment Comment |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
148 hi def link tsxLineComment Comment |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
149 hi def link tsxAttrib Type |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
150 hi def link tsxEscJs tsxEscapeJs |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
151 hi def link tsxCloseTag htmlTag |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
152 hi def link tsxCloseString Identifier |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
153 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
154 let b:current_syntax = "typescriptreact" |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
155 if main_syntax == 'typescriptreact' |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
156 unlet main_syntax |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
157 endif |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
158 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
159 let &cpo = s:cpo_save |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
diff
changeset
|
160 unlet s:cpo_save |