Wed, 13 May 2020 15:19:10 -0500
Fix: do not override default LaTeX language
0 | 1 | { |
2 | "fileTypes": [ | |
3 | "sty", | |
4 | "cls", | |
5 | "bbx", | |
6 | "cbx", | |
7 | "ltx" | |
8 | ], | |
9 | "name": "TeX+", | |
10 | "patterns": [ | |
11 | { | |
12 | "captures": { | |
13 | "1": { | |
14 | "name": "punctuation.definition.keyword.tex" | |
15 | } | |
16 | }, | |
17 | "match": "(\\\\)(backmatter|else|fi|frontmatter|ftrue|mainmatter|if(case|cat|dim|eof|false|hbox|hmode|inner|mmode|num|odd|undefined|vbox|vmode|void|x)?)\\b", | |
18 | "name": "keyword.control.tex" | |
19 | }, | |
20 | { | |
21 | "captures": { | |
22 | "1": { | |
23 | "name": "keyword.control.catcode.tex" | |
24 | }, | |
25 | "2": { | |
26 | "name": "punctuation.definition.keyword.tex" | |
27 | }, | |
28 | "3": { | |
29 | "name": "punctuation.separator.key-value.tex" | |
30 | }, | |
31 | "4": { | |
32 | "name": "constant.numeric.category.tex" | |
33 | } | |
34 | }, | |
35 | "match": "((\\\\)catcode)`(?:\\\\)?.(=)(\\d+)", | |
36 | "name": "meta.catcode.tex" | |
37 | }, | |
38 | { | |
39 | "begin": "(^[ \\t]+)?(?=%)", | |
40 | "beginCaptures": { | |
41 | "1": { | |
42 | "name": "punctuation.whitespace.comment.leading.tex" | |
43 | } | |
44 | }, | |
45 | "end": "(?!\\G)", | |
46 | "patterns": [ | |
47 | { | |
48 | "begin": "%:", | |
49 | "beginCaptures": { | |
50 | "0": { | |
51 | "name": "punctuation.definition.comment.tex" | |
52 | } | |
53 | }, | |
54 | "end": "$\\n?", | |
55 | "name": "comment.line.percentage.semicolon.texshop.tex" | |
56 | }, | |
57 | { | |
58 | "begin": "^(%!TEX) (\\S*) =", | |
59 | "beginCaptures": { | |
60 | "1": { | |
61 | "name": "punctuation.definition.comment.tex" | |
62 | } | |
63 | }, | |
64 | "end": "$\\n?", | |
65 | "name": "comment.line.percentage.directive.texshop.tex" | |
66 | }, | |
67 | { | |
68 | "begin": "%", | |
69 | "beginCaptures": { | |
70 | "0": { | |
71 | "name": "punctuation.definition.comment.tex" | |
72 | } | |
73 | }, | |
74 | "end": "$\\n?", | |
75 | "name": "comment.line.percentage.tex" | |
76 | } | |
77 | ] | |
78 | }, | |
79 | { | |
80 | "match": "[\\[\\]]", | |
81 | "name": "punctuation.definition.brackets.tex" | |
82 | }, | |
83 | { | |
84 | "begin": "(\\$\\$|\\$)", | |
85 | "beginCaptures": { | |
86 | "1": { | |
87 | "name": "punctuation.definition.string.begin.tex" | |
88 | } | |
89 | }, | |
90 | "end": "(\\1)", | |
91 | "endCaptures": { | |
92 | "1": { | |
93 | "name": "punctuation.definition.string.end.tex" | |
94 | } | |
95 | }, | |
96 | "name": "support.class.math.block.tex", | |
97 | "patterns": [ | |
98 | { | |
99 | "match": "\\\\\\$", | |
100 | "name": "constant.character.escape.tex" | |
101 | }, | |
102 | { | |
103 | "include": "#math" | |
104 | }, | |
105 | { | |
106 | "include": "$self" | |
107 | } | |
108 | ] | |
109 | }, | |
110 | { | |
111 | "match": "\\\\\\\\", | |
112 | "name": "keyword.control.newline.tex" | |
113 | }, | |
114 | { | |
115 | "captures": { | |
116 | "1": { | |
117 | "name": "punctuation.definition.function.tex" | |
118 | } | |
119 | }, | |
120 | "match": "(\\\\)[A-Za-z@]+", | |
121 | "name": "support.function.general.tex" | |
122 | }, | |
123 | { | |
124 | "captures": { | |
125 | "1": { | |
126 | "name": "punctuation.definition.keyword.tex" | |
127 | } | |
128 | }, | |
129 | "match": "(\\\\)[^a-zA-Z@]", | |
130 | "name": "constant.character.escape.tex" | |
131 | }, | |
132 | { | |
133 | "match": "«press a-z and space for greek letter»[a-zA-Z]*", | |
134 | "name": "meta.placeholder.greek.tex" | |
135 | } | |
136 | ], | |
137 | "repository": { | |
138 | "math": { | |
139 | "patterns": [ | |
140 | { | |
141 | "captures": { | |
142 | "1": { | |
143 | "name": "punctuation.definition.constant.math.tex" | |
144 | } | |
145 | }, | |
146 | "match": "(\\\\)(s(s(earrow|warrow|lash)|h(ort(downarrow|uparrow|parallel|leftarrow|rightarrow|mid)|arp)|tar|i(gma|m(eq)?)|u(cc(sim|n(sim|approx)|curlyeq|eq|approx)?|pset(neq(q)?|plus(eq)?|eq(q)?)?|rd|m|bset(neq(q)?|plus(eq)?|eq(q)?)?)|p(hericalangle|adesuit)|e(tminus|arrow)|q(su(pset(eq)?|bset(eq)?)|c(up|ap)|uare)|warrow|m(ile|all(s(etminus|mile)|frown)))|h(slash|ook(leftarrow|rightarrow)|eartsuit|bar)|R(sh|ightarrow|e|bag)|Gam(e|ma)|n(s(hort(parallel|mid)|im|u(cc(eq)?|pseteq(q)?|bseteq))|Rightarrow|n(earrow|warrow)|cong|triangle(left(eq(slant)?)?|right(eq(slant)?)?)|i(plus)?|u|p(lus|arallel|rec(eq)?)|e(q|arrow|g|xists)|v(dash|Dash)|warrow|le(ss|q(slant|q)?|ft(arrow|rightarrow))|a(tural|bla)|VDash|rightarrow|g(tr|eq(slant|q)?)|mid|Left(arrow|rightarrow))|c(hi|irc(eq|le(d(circ|S|dash|ast)|arrow(left|right)))?|o(ng|prod|lon|mplement)|dot(s|p)?|u(p|r(vearrow(left|right)|ly(eq(succ|prec)|vee(downarrow|uparrow)?|wedge(downarrow|uparrow)?)))|enterdot|lubsuit|ap)|Xi|Maps(to(char)?|from(char)?)|B(ox|umpeq|bbk)|t(h(ick(sim|approx)|e(ta|refore))|imes|op|wohead(leftarrow|rightarrow)|a(u|lloblong)|riangle(down|q|left(eq(slant)?)?|right(eq(slant)?)?)?)|i(n(t(er(cal|leave))?|plus|fty)?|ota|math)|S(igma|u(pset|bset))|zeta|o(slash|times|int|dot|plus|vee|wedge|lessthan|greaterthan|m(inus|ega)|b(slash|long|ar))|d(i(v(ideontimes)?|a(g(down|up)|mond(suit)?)|gamma)|o(t(plus|eq(dot)?)|ublebarwedge|wn(harpoon(left|right)|downarrows|arrow))|d(ots|agger)|elta|a(sh(v|leftarrow|rightarrow)|leth|gger))|Y(down|up|left|right)|C(up|ap)|u(n(lhd|rhd)|p(silon|harpoon(left|right)|downarrow|uparrows|lus|arrow)|lcorner|rcorner)|jmath|Theta|Im|p(si|hi|i(tchfork)?|erp|ar(tial|allel)|r(ime|o(d|pto)|ec(sim|n(sim|approx)|curlyeq|eq|approx)?)|m)|e(t(h|a)|psilon|q(slant(less|gtr)|circ|uiv)|ll|xists|mptyset)|Omega|D(iamond|ownarrow|elta)|v(d(ots|ash)|ee(bar)?|Dash|ar(s(igma|u(psetneq(q)?|bsetneq(q)?))|nothing|curly(vee|wedge)|t(heta|imes|riangle(left|right)?)|o(slash|circle|times|dot|plus|vee|wedge|lessthan|ast|greaterthan|minus|b(slash|ar))|p(hi|i|ropto)|epsilon|kappa|rho|bigcirc))|kappa|Up(silon|downarrow|arrow)|Join|f(orall|lat|a(t(s(emi|lash)|bslash)|llingdotseq)|rown)|P(si|hi|i)|w(p|edge|r)|l(hd|n(sim|eq(q)?|approx)|ceil|times|ightning|o(ng(left(arrow|rightarrow)|rightarrow|maps(to|from))|zenge|oparrow(left|right))|dot(s|p)|e(ss(sim|dot|eq(qgtr|gtr)|approx|gtr)|q(slant|q)?|ft(slice|harpoon(down|up)|threetimes|leftarrows|arrow(t(ail|riangle))?|right(squigarrow|harpoons|arrow(s|triangle|eq)?))|adsto)|vertneqq|floor|l(c(orner|eil)|floor|l|bracket)?|a(ngle|mbda)|rcorner|bag)|a(s(ymp|t)|ngle|pprox(eq)?|l(pha|eph)|rrownot|malg)|V(dash|vdash)|r(h(o|d)|ceil|times|i(singdotseq|ght(s(quigarrow|lice)|harpoon(down|up)|threetimes|left(harpoons|arrows)|arrow(t(ail|riangle))?|rightarrows))|floor|angle|r(ceil|parenthesis|floor|bracket)|bag)|g(n(sim|eq(q)?|approx)|tr(sim|dot|eq(qless|less)|less|approx)|imel|eq(slant|q)?|vertneqq|amma|g(g)?)|Finv|xi|m(ho|i(nuso|d)|o(o|dels)|u(ltimap)?|p|e(asuredangle|rge)|aps(to|from(char)?))|b(i(n(dnasrepma|ampersand)|g(s(tar|qc(up|ap))|nplus|c(irc|u(p|rly(vee|wedge))|ap)|triangle(down|up)|interleave|o(times|dot|plus)|uplus|parallel|vee|wedge|box))|o(t|wtie|x(slash|circle|times|dot|plus|empty|ast|minus|b(slash|ox|ar)))|u(llet|mpeq)|e(cause|t(h|ween|a))|lack(square|triangle(down|left|right)?|lozenge)|a(ck(s(im(eq)?|lash)|prime|epsilon)|r(o|wedge))|bslash)|L(sh|ong(left(arrow|rightarrow)|rightarrow|maps(to|from))|eft(arrow|rightarrow)|leftarrow|ambda|bag)|Arrownot)(?=\\b|_)", | |
147 | "name": "constant.character.math.tex" | |
148 | }, | |
149 | { | |
150 | "captures": { | |
151 | "1": { | |
152 | "name": "punctuation.definition.constant.math.tex" | |
153 | } | |
154 | }, | |
155 | "match": "(\\\\)(sum|prod|coprod|int|oint|bigcap|bigcup|bigsqcup|bigvee|bigwedge|bigodot|bigotimes|bogoplus|biguplus)\\b", | |
156 | "name": "constant.character.math.tex" | |
157 | }, | |
158 | { | |
159 | "captures": { | |
160 | "1": { | |
161 | "name": "punctuation.definition.constant.math.tex" | |
162 | } | |
163 | }, | |
164 | "match": "(\\\\)(arccos|arcsin|arctan|arg|cos|cosh|cot|coth|csc|deg|det|dim|exp|gcd|hom|inf|ker|lg|lim|liminf|limsup|ln|log|max|min|pr|sec|sin|sinh|sup|tan|tanh)\\b", | |
165 | "name": "constant.other.math.tex" | |
166 | }, | |
167 | { | |
168 | "begin": "((\\\\)Sexpr(\\{))", | |
169 | "beginCaptures": { | |
170 | "1": { | |
171 | "name": "support.function.sexpr.math.tex" | |
172 | }, | |
173 | "2": { | |
174 | "name": "punctuation.definition.function.math.tex" | |
175 | }, | |
176 | "3": { | |
177 | "name": "punctuation.section.embedded.begin.math.tex" | |
178 | } | |
179 | }, | |
180 | "contentName": "support.function.sexpr.math.tex", | |
181 | "end": "(((\\})))", | |
182 | "endCaptures": { | |
183 | "1": { | |
184 | "name": "support.function.sexpr.math.tex" | |
185 | }, | |
186 | "2": { | |
187 | "name": "punctuation.section.embedded.end.math.tex" | |
188 | }, | |
189 | "3": { | |
190 | "name": "source.r" | |
191 | } | |
192 | }, | |
193 | "name": "meta.embedded.line.r", | |
194 | "patterns": [ | |
195 | { | |
196 | "begin": "\\G(?!\\})", | |
197 | "end": "(?=\\})", | |
198 | "name": "source.r", | |
199 | "patterns": [ | |
200 | { | |
201 | "include": "source.r" | |
202 | } | |
203 | ] | |
204 | } | |
205 | ] | |
206 | }, | |
207 | { | |
208 | "captures": { | |
209 | "1": { | |
210 | "name": "punctuation.definition.constant.math.tex" | |
211 | } | |
212 | }, | |
213 | "match": "(\\\\)(?!begin\\{|verb)([A-Za-z]+)", | |
214 | "name": "constant.other.general.math.tex" | |
215 | }, | |
216 | { | |
217 | "match": "(?<!\\\\)\\{", | |
218 | "name": "punctuation.math.begin.bracket.curly" | |
219 | }, | |
220 | { | |
221 | "match": "(?<!\\\\)\\}", | |
222 | "name": "punctuation.math.end.bracket.curly" | |
223 | }, | |
224 | { | |
225 | "match": "\\(", | |
226 | "name": "punctuation.math.begin.bracket.round" | |
227 | }, | |
228 | { | |
229 | "match": "\\)", | |
230 | "name": "punctuation.math.end.bracket.round" | |
231 | }, | |
232 | { | |
233 | "match": "(([0-9]*[\\.][0-9]+)|[0-9]+)", | |
234 | "name": "constant.numeric.math.tex" | |
235 | }, | |
236 | { | |
237 | "match": "«press a-z and space for greek letter»[a-zA-Z]*", | |
238 | "name": "meta.placeholder.greek.math.tex" | |
239 | } | |
240 | ] | |
241 | }, | |
242 | "braces": { | |
243 | "begin": "(?<!\\\\)\\{", | |
244 | "beginCaptures": { | |
245 | "0": { | |
246 | "name": "punctuation.group.begin.tex" | |
247 | } | |
248 | }, | |
249 | "end": "(?<!\\\\)\\}", | |
250 | "endCaptures": { | |
251 | "0": { | |
252 | "name": "punctuation.group.end.tex" | |
253 | } | |
254 | }, | |
255 | "name": "meta.group.braces.tex", | |
256 | "patterns": [ | |
257 | { | |
258 | "include": "#braces" | |
259 | } | |
260 | ] | |
261 | } | |
262 | }, | |
263 | "scopeName": "text.tex" | |
264 | } |