3# http://www.sublimetext.com/docs/3/syntax.html
5comment: "LiveScript Syntax: version 1"
10first_line_match: ^#!.*\bls
11scope: source.livescript
18 |\(\s* (?= instanceof[\s)]|and[\s)]|or[\s)]|is[\s)]|isnt[\s)]|in[\s)]|import[\s)]|import\ all[\s)] |\.|[-+/*%^&<>=|][\b\s)\w$]|\*\*|\%\%)
19 | (?<=[\s(]instanceof|[\s(]and|[\s(]or|[\s(]is|[\s(]isnt|[\s(]in|[\s(]import|[\s(]import\ all|[\s(]do|\.|\*\*|\%\%|[\b\s(\w$][-+/*%^&<>=|]) \s*\)
20 scope: storage.type.function.livescript
23 0: punctuation.definition.comment.livescript
25 - meta_scope: comment.block.livescript
28 0: punctuation.definition.comment.livescript
31 scope: storage.type.annotation.livescriptscript
32 - match: '(#)(?!\{).*$\n?'
33 scope: comment.line.number-sign.livescript
35 1: punctuation.definition.comment.livescript
36 - match: '((?:!|~|!~|~!)?function\*?)\s+([$\w\-]*[$\w]+)'
38 1: storage.type.function.livescript
39 2: entity.name.function.livescript
40 - match: (new)\s+(\w+(?:\.\w*)*)
42 1: keyword.operator.new.livescript
43 2: entity.name.type.instance.livescript
44 - match: \b(package|private|protected|public|interface|enum|static)(?!-)\b
45 scope: keyword.illegal.livescript
48 0: punctuation.definition.string.begin.livescript
50 - meta_scope: string.quoted.heredoc.livescript
53 0: punctuation.definition.string.end.livescript
57 0: punctuation.definition.string.begin.livescript
59 - meta_scope: string.quoted.double.heredoc.livescript
62 0: punctuation.definition.string.end.livescript
65 scope: constant.character.escape.livescript
66 - include: interpolated_livescript
69 0: punctuation.definition.string.begin.livescript
71 - meta_scope: string.quoted.script.livescript
74 0: punctuation.definition.string.end.livescript
76 - match: '\\(x[0-9A-Fa-f]{2}|[0-2][0-7]{0,2}|3[0-6][0-7]|37[0-7]?|[4-7][0-7]?|.)'
77 scope: constant.character.escape.livescript
80 - meta_scope: string.array-literal.livescript
83 - match: '/{2}(?![\s=/*+{}?]).*?[^\\]/[igmy]{0,4}(?![a-zA-Z0-9])/{2}'
84 scope: string.regexp.livescript
87 - meta_scope: string.regexp.livescript
88 - match: "/{2}[imgy]{0,4}"
90 - include: embedded_spaced_comment
91 - include: interpolated_livescript
94 - meta_scope: string.regexp.livescript
95 - match: "/{2}[imgy]{0,4}"
97 - match: '\\(x[0-9A-Fa-f]{2}|[0-2][0-7]{0,2}|3[0-6][0-7]|37[0-7]?|[4-7][0-7]?|.)'
98 scope: constant.character.escape.livescript
99 - include: interpolated_livescript
100 - match: '/(?![\s=/*+{}?]).*?[^\\]/[igmy]{0,4}(?![a-zA-Z0-9])'
101 scope: string.regexp.livescript
105 instanceof|new|delete|typeof|and|or|is|isnt|not
107 scope: keyword.operator.livescript
109 scope: keyword.operator.livescript
111 scope: keyword.control.livescript
115 return|break|continue|throw
116 |try|if|while|for|for\s+own|switch|unless|until
117 |catch|finally|else|nobreak|case|default|fallthrough|when|otherwise|then
120 scope: keyword.control.livescript
123 and=|or=|%|&|\^|\*|\/|(?<![a-zA-Z$_])(\-)?\-(?!\-?>)|\+\+|\+|
124 ~(?!~?>)|==|=|!=|<=|>=|<<=|>>=|
125 >>>=|<>|<(?!\[)|(?<!\])>|(?<!\w)!(?!([~\-]+)?>)|&&|\.\.(\.)?|\s\.\s|\?|\|\||\:|\*=|(?<!\()/=|%=|\+=|\-=|\.=|&=
127 scope: keyword.operator.livescript
133 scope: storage.type.function.livescript
137 this|throw|then|try|typeof!?|til|to
138 |continue|const|case|catch|class
139 |in|instanceof|import|import\s+all|implements|if|is
140 |default|delete|debugger|do
141 |for|for\s+own|finally|function|from|fallthrough
143 |else|nobreak|extends|export|eval
153 scope: keyword.other.livescript
154 - match: '([a-zA-Z\$_](?:[\w$.-])*)\s*(?!\::)((:)|(=(?!>)))\s*(?!(\s*!?\s*\(.*\))?\s*(!?[~-]{1,2}>\*?))'
156 1: variable.assignment.livescript
157 3: punctuation.separator.key-value, keyword.operator.livescript
158 4: keyword.operator.livescript
159 - match: '(?<=\s|^)([\[\{])(?=.*?[\]\}]\s+[:=])'
161 0: keyword.operator.livescript
163 - meta_scope: meta.variable.assignment.destructured.livescript
164 - match: '([\]\}]\s*[:=])'
166 0: keyword.operator.livescript
168 - include: variable_name
169 - include: instance_variable
170 - include: single_quoted_string
171 - include: double_quoted_string
177 ([a-zA-Z\$_]([\w$.:-])*)\s*
178 (?=[:=](\s*!?\s*\(.*\))?\s*(!?[~-]{1,2}>\*?))
179 scope: meta.function.livescript
181 2: entity.name.function.livescript
182 3: entity.name.function.livescript
183 4: variable.parameter.function.livescript
184 5: storage.type.function.livescript
185 - match: \b(?<!\.)(true|on|yes)(?!\s*:)\b
186 scope: constant.language.boolean.true.livescript
187 - match: \b(?<!\.)(false|off|no)(?!\s*:)\b
188 scope: constant.language.boolean.false.livescript
189 - match: \b(?<!\.)(null|void)(?!\s*:)\b
190 scope: constant.language.null.livescript
191 - match: \b(?<!\.)(super|this|extends)(?!\s*:)\b
192 scope: variable.language.livescript
193 - match: '(class\b)\s+(@?[a-zA-Z$_][\w$.-]*)?(?:\s+(extends)\s+(@?[a-zA-Z$_][\w$.-]*))?'
194 scope: meta.class.livescript
196 1: storage.type.class.livescript
197 2: entity.name.type.class.livescript
198 3: keyword.control.inheritance.livescript
199 4: entity.other.inherited-class.livescript
200 - match: \b(debugger|\\)\b
201 scope: keyword.other.livescript
204 Array|ArrayBuffer|Blob|Boolean|Date|document|event|Function|
205 Int(8|16|32|64)Array|Math|Map|Number|
206 Object|Proxy|RegExp|Set|String|WeakMap|
207 window|Uint(8|16|32|64)Array|XMLHttpRequest
209 scope: support.class.livescript
210 - match: \b(console)\b
211 scope: entity.name.type.object.livescript
212 - match: \b(Infinity|NaN|undefined)\b
213 scope: constant.language.livescript
215 scope: punctuation.terminator.statement.livescript
217 scope: meta.delimiter.object.comma.livescript
219 scope: meta.delimiter.method.period.livescript
221 scope: meta.brace.curly.livescript
223 scope: meta.brace.round.livescript
225 scope: meta.brace.square.livescript
226 - include: instance_variable
227 - include: backslash_string
228 - include: single_quoted_string
229 - include: double_quoted_string
231 - match: '()(@|@@|[$\w\-]*[$\w]+)\s*(`)'
233 1: keyword.operator.livescript
234 2: meta.function-call.livescript
235 3: keyword.operator.livescript
237 scope: keyword.operator.livescript
238 - match: '()(@|@@|[$\w\-]*[$\w]+)(?:(\??\!)|[(])'
240 1: keyword.operator.livescript
241 2: meta.function-call.livescript
242 3: keyword.operator.livescript
243 - match: '(@|@@|[$\w\-]*[$\w]+)(\?)? (?!\s*(((by|of|and|or|with|when|unless|if|is|isnt|else|nobreak|for|from|not in|in|catch|til|to|then|import|extends|implements|instanceof)\b)|[=:.*\/+\-%\^<>][ =)]|[`}%*)]|/(?!.*?/)|&&|[.][^.]|=>|\/ +|\||\|\||\-\-|\+\+|\|>|<|\||$|\n|\#|/\*))'
245 1: meta.function-call.livescript
246 2: keyword.operator.livescript
248 scope: keyword.control.livescript
250 scope: keyword.control.livescript
252 scope: keyword.operator.livescript
253 - match: ((?<=console\.)(debug|warn|info|log|error|time(End|-end)|assert))\b
254 scope: support.function.console.livescript
257 decodeURI(Component)?|encodeURI(Component)?|eval|parse(Float|Int)|require
259 scope: support.function.livescript
262 map|filter|reject|partition|find|each|head|tail|last|initial|empty|
263 values|keys|length|cons|append|join|reverse|fold(l|r)?1?|unfoldr|
264 and(List|-list)|or(List|-list)|any|all|unique|sum|product|mean|compact|
265 concat(Map|-map)?|maximum|minimum|scan(l|r)?1?|replicate|slice|apply|
266 split(At|-at)?|take(While|-while)?|drop(While|-while)?|span|first|
267 break(It|-it)|list(ToObj|-to-obj)|obj(ToFunc|-to-func)|
268 pairs(ToObj|-to-obj)|obj(ToPairs|-to-pairs|ToLists|-to-lists)|
269 zip(All|-all)?(With|-with)?|compose|curry|partial|flip|fix|
270 sort(With|-with|By|-by)?|group(By|-by)|break(List|-list|Str|-str)|
271 difference|intersection|union|average|flatten|chars|unchars|repeat|
272 lines|unlines|words|unwords|max|min|negate|abs|signum|quot|rem|div|mod|
273 recip|pi|tau|exp|sqrt|ln|pow|sin|cos|tan|asin|acos|atan|atan2|truncate|
274 round|ceiling|floor|is(It|-it)NaN|even|odd|gcd|lcm|disabled__id
277 Generated by DOM query from http://gkz.github.com/prelude-ls/:
279 .call(document.querySelectorAll(".nav-pills li a"))
280 .map(function(_) {return _.innerText})
281 .filter(function(_) {return _.trim() !== '})
284 scope: support.function.prelude.livescript
285 - match: '(?x)(?<![.-])\b(that|it|e|_)\b'
286 scope: support.function.semireserved.livescript
288 (?x)((?<=(\.|\]|\)))(
289 apply|call|concat|every|filter|for(Each|-each)|
290 from|has(Own|-own)(Property|-property)|index(Of|-of)|
291 is(Prototype|-prototype)(Of|-of)|join|last(Index|-index)(Of|-of)|
292 map|of|pop|property(Is|-is)(Enumerable|-enumerable)|push|
293 reduce(Right|-right)?|reverse|shift|slice|some|sort|
294 splice|to(Locale|-locale)?(String|-string)|unshift|valueOf
296 scope: support.function.method.array.livescript
301 scope: support.function.static.array.livescript
304 create|define(Propert|-propert)(ies|y)|freeze|
305 get(Own|-own)(Property|-property)(Descriptors?|Names)|
306 get(Property|-property)(Descriptor|Names)|getPrototypeOf|
307 is((Extensible|-extensible)|(Frozen|-frozen)|(Sealed|-sealed))?|
308 keys|prevent(Extensions|-extensions)|seal
310 scope: support.function.static.object.livescript
313 abs|acos|acosh|asin|asinh|atan|atan2|atanh|ceil|cos|cosh|exp|expm1|floor|
314 hypot|log|log10|log1p|log2|max|min|pow|random|round|sign|sin|sinh|sqrt|
317 scope: support.function.static.math.livescript
320 is(Finite|Integer|NaN)|to(Integer|-integer)
322 scope: support.function.static.number.livescript
323 - match: '[\$\w][\w-]*'
324 scope: variable.other.livescript
326 - match: '\\([\\)\s,\};\]])?'
328 0: string.quoted.single.livescript
330 - meta_content_scope: string.quoted.single.livescript
331 - match: '([\\)\s,\};\]])'
333 0: punctuation.definition.string.end.livescript
335 constructor_variable:
336 - match: '([a-zA-Z$_][\w$-]*)(@{2})([a-zA-Z$_][\w$-]*)?'
337 scope: variable.other.readwrite.constructor.livescript
338 double_quoted_string:
341 0: punctuation.definition.string.begin.livescript
343 - meta_scope: string.quoted.double.livescript
346 0: punctuation.definition.string.end.livescript
348 - match: '\\(x[0-9A-Fa-f]{2}|[0-2][0-7]{0,2}|3[0-6][0-7]|37[0-7]?|[4-7][0-7]?|.)'
349 scope: constant.character.escape.livescript
350 - include: interpolated_livescript
352 - match: (?<!\\)(#).*$\n
353 scope: comment.line.number-sign.livescript
355 1: punctuation.definition.comment.livescript
356 embedded_spaced_comment:
357 - match: (?<!\\)(#\s).*$\n
358 scope: comment.line.number-sign.livescript
360 1: punctuation.definition.comment.livescript
362 - match: '(?<![$\w\-])(@)'
363 scope: variable.other.readwrite.instance.livescript
364 interpolated_livescript:
367 0: punctuation.section.embedded.livescript
369 - meta_scope: source.livescript.embedded.source
372 0: punctuation.section.embedded.livescript
377 - meta_scope: source.livescript.embedded.source.simple
382 - match: '(?<![\$@a-zA-Z_])(([0-9]+r[0-9_]+)|((16r|0[xX])[0-9a-fA-F_]+)|([0-9]+(\.[0-9]+[0-9_]*)?(e[+\-]?[0-9_]+)?)[_a-zA-Z0-9]*)'
383 scope: constant.numeric.livescript
384 single_quoted_string:
387 0: punctuation.definition.string.begin.livescript
389 - meta_scope: string.quoted.single.livescript
392 0: punctuation.definition.string.end.livescript
394 - match: '\\(x[0-9A-Fa-f]{2}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)'
395 scope: constant.character.escape.livescript
397 - match: '([a-zA-Z\$_][\w$-]*(\.\w+)*)(?!\-)'
398 scope: variable.assignment.livescript
400 1: variable.assignment.livescript
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list