blob: 7322e55c31cc72fb25f69d4e709a56ce938e821c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
|
(comment) @comment
[
"("
")"
"{"
"}"
"["
"]"
] @punctuation.bracket
[
":"
":until"
"&"
"&as"
"?"
] @punctuation.special
(nil) @constant.builtin
(vararg) @punctuation.special
(boolean) @boolean
(number) @number
(string) @string
(escape_sequence) @string.escape
(symbol) @variable
(multi_symbol
"." @punctuation.delimiter
(symbol) @field)
(multi_symbol_method
":" @punctuation.delimiter
(symbol) @method .)
(list . (symbol) @function)
(list . (multi_symbol (symbol) @function .))
((symbol) @variable.builtin
(#match? @variable.builtin "^[$]"))
(binding) @symbol
[
"fn"
"lambda"
"hashfn"
"#"
] @keyword.function
(fn name: [
(symbol) @function
(multi_symbol (symbol) @function .)
])
(lambda name: [
(symbol) @function
(multi_symbol (symbol) @function .)
])
[
"for"
"each"
] @repeat
((symbol) @repeat
(#any-of? @repeat
"while"))
[
"match"
] @conditional
((symbol) @conditional
(#any-of? @conditional
"if" "when"))
[
"global"
"local"
"let"
"set"
"var"
"where"
"or"
] @keyword
((symbol) @keyword
(#any-of? @keyword
"comment" "do" "doc" "eval-compiler" "lua" "macros" "quote" "tset" "values"))
((symbol) @include
(#any-of? @include
"require" "require-macros" "import-macros" "include"))
[
"collect"
"icollect"
"accumulate"
] @function.macro
((symbol) @function.macro
(#any-of? @function.macro
"->" "->>" "-?>" "-?>>" "?." "doto" "macro" "macrodebug" "partial" "pick-args"
"pick-values" "with-open"))
; Lua builtins
((symbol) @constant.builtin
(#any-of? @constant.builtin
"arg" "_ENV" "_G" "_VERSION"))
((symbol) @function.builtin
(#any-of? @function.builtin
"assert" "collectgarbage" "dofile" "error" "getmetatable" "ipairs"
"load" "loadfile" "next" "pairs" "pcall" "print" "rawequal" "rawget"
"rawlen" "rawset" "require" "select" "setmetatable" "tonumber" "tostring"
"type" "warn" "xpcall"))
((symbol) @function.builtin
(#any-of? @function.builtin
"loadstring" "module" "setfenv" "unpack"))
|