| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
(identifier) @variable |
| 6 |
|
| 7 |
(operator_identifier) @operator |
| 8 |
|
| 9 |
((identifier) @variable.builtin |
| 10 |
(#match? @variable.builtin "^this$")) |
| 11 |
|
| 12 |
(interpolation) @none |
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
((identifier) @constant (#match? @constant "^[A-Z]")) |
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
(type_identifier) @type |
| 26 |
|
| 27 |
(class_definition |
| 28 |
name: (identifier) @type) |
| 29 |
|
| 30 |
(object_definition |
| 31 |
name: (identifier) @type) |
| 32 |
|
| 33 |
(trait_definition |
| 34 |
name: (identifier) @type) |
| 35 |
|
| 36 |
(type_definition |
| 37 |
name: (type_identifier) @type) |
| 38 |
|
| 39 |
(full_enum_case |
| 40 |
name: (identifier) @type) |
| 41 |
|
| 42 |
(simple_enum_case |
| 43 |
name: (identifier) @type) |
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
(val_definition |
| 48 |
pattern: (identifier) @variable) |
| 49 |
|
| 50 |
(var_definition |
| 51 |
pattern: (identifier) @variable) |
| 52 |
|
| 53 |
(val_declaration |
| 54 |
name: (identifier) @variable) |
| 55 |
|
| 56 |
(var_declaration |
| 57 |
name: (identifier) @variable) |
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
(function_declaration |
| 62 |
name: (identifier) @function.method) |
| 63 |
|
| 64 |
(function_definition |
| 65 |
name: (identifier) @function.method) |
| 66 |
|
| 67 |
|
| 68 |
|
| 69 |
(import_declaration |
| 70 |
path: (identifier) @namespace) |
| 71 |
((stable_identifier (identifier) @namespace)) |
| 72 |
|
| 73 |
((import_declaration |
| 74 |
path: (identifier) @type) (#match? @type "^[A-Z]")) |
| 75 |
((stable_identifier (identifier) @type) (#match? @type "^[A-Z]")) |
| 76 |
|
| 77 |
(export_declaration |
| 78 |
path: (identifier) @namespace) |
| 79 |
((stable_identifier (identifier) @namespace)) |
| 80 |
|
| 81 |
((export_declaration |
| 82 |
path: (identifier) @type) (#match? @type "^[A-Z]")) |
| 83 |
((stable_identifier (identifier) @type) (#match? @type "^[A-Z]")) |
| 84 |
|
| 85 |
((namespace_selectors (identifier) @type) (#match? @type "^[A-Z]")) |
| 86 |
|
| 87 |
|
| 88 |
|
| 89 |
|
| 90 |
(field_expression field: (identifier) @variable.other.member) |
| 91 |
(field_expression value: (identifier) @type |
| 92 |
(#match? @type "^[A-Z]")) |
| 93 |
|
| 94 |
(call_expression |
| 95 |
function: (identifier) @function) |
| 96 |
|
| 97 |
(call_expression |
| 98 |
function: (operator_identifier) @function) |
| 99 |
|
| 100 |
(call_expression |
| 101 |
function: (field_expression |
| 102 |
field: (identifier) @function.method)) |
| 103 |
|
| 104 |
(call_expression |
| 105 |
function: (field_expression |
| 106 |
field: (operator_identifier) @function.method)) |
| 107 |
|
| 108 |
((call_expression |
| 109 |
function: (identifier) @variable.other.member) |
| 110 |
(#match? @variable.other.member "^[A-Z]")) |
| 111 |
|
| 112 |
(generic_function |
| 113 |
function: (identifier) @function) |
| 114 |
|
| 115 |
(interpolated_string_expression |
| 116 |
interpolator: (identifier) @function) |
| 117 |
|
| 118 |
( |
| 119 |
(identifier) @function.builtin |
| 120 |
(#match? @function.builtin "^super$") |
| 121 |
) |
| 122 |
|
| 123 |
|
| 124 |
|
| 125 |
(function_definition |
| 126 |
name: (identifier) @function) |
| 127 |
|
| 128 |
(function_definition |
| 129 |
name: (operator_identifier) @function) |
| 130 |
|
| 131 |
(parameter |
| 132 |
name: (identifier) @variable.parameter) |
| 133 |
|
| 134 |
(binding |
| 135 |
name: (identifier) @variable.parameter) |
| 136 |
|
| 137 |
|
| 138 |
|
| 139 |
|
| 140 |
(infix_expression operator: (identifier) @operator) |
| 141 |
(infix_expression operator: (operator_identifier) @operator) |
| 142 |
(infix_type operator: (operator_identifier) @operator) |
| 143 |
(infix_type operator: (operator_identifier) @operator) |
| 144 |
|
| 145 |
|
| 146 |
(boolean_literal) @constant.builtin.boolean |
| 147 |
(integer_literal) @constant.numeric.integer |
| 148 |
(floating_point_literal) @constant.numeric.float |
| 149 |
|
| 150 |
[ |
| 151 |
(string) |
| 152 |
(character_literal) |
| 153 |
(interpolated_string_expression) |
| 154 |
] @string |
| 155 |
|
| 156 |
(interpolation "$" @punctuation.special) |
| 157 |
|
| 158 |
|
| 159 |
|
| 160 |
(annotation) @attribute |
| 161 |
|
| 162 |
|
| 163 |
|
| 164 |
|
| 165 |
[ |
| 166 |
(opaque_modifier) |
| 167 |
(infix_modifier) |
| 168 |
(transparent_modifier) |
| 169 |
(open_modifier) |
| 170 |
(tracked_modifier) |
| 171 |
(into_modifier) |
| 172 |
"abstract" |
| 173 |
"final" |
| 174 |
"implicit" |
| 175 |
"lazy" |
| 176 |
"override" |
| 177 |
"private" |
| 178 |
"protected" |
| 179 |
"sealed" |
| 180 |
] @keyword.storage.modifier |
| 181 |
|
| 182 |
[ |
| 183 |
"class" |
| 184 |
"enum" |
| 185 |
"extension" |
| 186 |
"given" |
| 187 |
"object" |
| 188 |
"package" |
| 189 |
"trait" |
| 190 |
"type" |
| 191 |
"val" |
| 192 |
"var" |
| 193 |
] @keyword.storage.type |
| 194 |
|
| 195 |
[ |
| 196 |
"as" |
| 197 |
"derives" |
| 198 |
"end" |
| 199 |
"extends" |
| 200 |
|
| 201 |
|
| 202 |
|
| 203 |
"using" |
| 204 |
"with" |
| 205 |
] @keyword |
| 206 |
|
| 207 |
(null_literal) @constant.builtin |
| 208 |
(wildcard) @keyword |
| 209 |
|
| 210 |
|
| 211 |
|
| 212 |
"new" @keyword.operator |
| 213 |
|
| 214 |
[ |
| 215 |
"case" |
| 216 |
"catch" |
| 217 |
"else" |
| 218 |
"finally" |
| 219 |
"if" |
| 220 |
"match" |
| 221 |
"then" |
| 222 |
"throw" |
| 223 |
"try" |
| 224 |
] @keyword.control.conditional |
| 225 |
|
| 226 |
[ |
| 227 |
"(" |
| 228 |
")" |
| 229 |
"[" |
| 230 |
"]" |
| 231 |
"{" |
| 232 |
"}" |
| 233 |
] @punctuation.bracket |
| 234 |
|
| 235 |
[ |
| 236 |
"." |
| 237 |
"," |
| 238 |
] @punctuation.delimiter |
| 239 |
|
| 240 |
[ |
| 241 |
"do" |
| 242 |
"for" |
| 243 |
"while" |
| 244 |
"yield" |
| 245 |
] @keyword.control.repeat |
| 246 |
|
| 247 |
"def" @keyword.function |
| 248 |
|
| 249 |
[ |
| 250 |
"=>" |
| 251 |
"<-" |
| 252 |
"@" |
| 253 |
] @keyword.operator |
| 254 |
|
| 255 |
"import" @keyword.control.import |
| 256 |
|
| 257 |
"export" @keyword.control.import |
| 258 |
|
| 259 |
"return" @keyword.control.return |
| 260 |
|
| 261 |
[(comment) (block_comment)] @comment |
| 262 |
|
| 263 |
|
| 264 |
|
| 265 |
(case_block |
| 266 |
(case_clause ("case") @keyword.control.conditional)) |