PluginProbe
Code Block Pro – Beautiful Syntax Highlighting / 1.28.0
Code Block Pro – Beautiful Syntax Highlighting v1.28.0
1.27.1 1.27.2 1.27.3 1.27.4 1.27.5 1.27.6 1.27.7 1.28.0 1.3.0 1.4.0 1.5.0 1.5.1 1.5.2 1.6.0 1.7.0 1.8.0 1.9.0 1.9.1 1.9.2 1.9.3 trunk 1.1.0 1.10.0 1.11.0 1.11.1 All 63 releases
code-block-pro / build / shiki / languages / kusto.tmLanguage.json

kusto.tmLanguage.json in Code Block Pro – Beautiful Syntax Highlighting 1.28.0, at build/shiki/languages/kusto.tmLanguage.json

685 lines 25.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 {
2 "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
3 "scopeName": "source.kusto",
4 "fileTypes": ["csl", "kusto", "kql"],
5 "name": "kusto",
6 "patterns": [
7 {
8 "match": "\\b(by|from|of|to|step|with)\\b",
9 "name": "keyword.other.operator.kusto",
10 "comment": "Tabular operators: common helper operators"
11 },
12 {
13 "match": "\\b(let|set|alias|declare|pattern|query_parameters|restrict|access|set)\\b",
14 "name": "keyword.control.kusto",
15 "comment": "Query statements: https://docs.microsoft.com/en-us/azure/kusto/query/statements"
16 },
17 {
18 "match": "\\b(and|or|has_all|has_any|matches|regex)\\b",
19 "name": "keyword.other.operator.kusto",
20 "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/datatypes-string-operators"
21 },
22 {
23 "match": "\\b(cluster|database)(?:\\s*\\(\\s*(.+?)\\s*\\))?(?!\\w)",
24 "captures": {
25 "1": {
26 "name": "support.function.kusto"
27 },
28 "2": {
29 "patterns": [
30 {
31 "include": "#Strings"
32 }
33 ]
34 }
35 },
36 "name": "meta.special.database.kusto",
37 "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/clusterfunction"
38 },
39 {
40 "match": "\\b(external_table|materialized_view|materialize|table|toscalar)\\b",
41 "name": "support.function.kusto",
42 "comment": "Special functions: https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/tablefunction"
43 },
44 {
45 "match": "(?<!\\w)(!?between)\\b",
46 "name": "keyword.other.operator.kusto",
47 "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/betweenoperator"
48 },
49 {
50 "match": "\\b(binary_and|binary_or|binary_shift_left|binary_shift_right|binary_xor)(?:\\s*\\(\\s*(\\w+)\\s*,\\s*(\\w+)\\s*\\))?(?!\\w)",
51 "captures": {
52 "1": {
53 "name": "support.function.kusto"
54 },
55 "2": {
56 "patterns": [
57 {
58 "include": "#Numeric"
59 }
60 ]
61 },
62 "3": {
63 "patterns": [
64 {
65 "include": "#Numeric"
66 }
67 ]
68 }
69 },
70 "name": "meta.scalar.bitwise.kusto",
71 "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/binoperators"
72 },
73 {
74 "match": "\\b(binary_not|bitset_count_ones)(?:\\s*\\(\\s*(\\w+)\\s*\\))?(?!\\w)",
75 "captures": {
76 "1": {
77 "name": "support.function.kusto"
78 },
79 "2": {
80 "patterns": [
81 {
82 "include": "#Numeric"
83 }
84 ]
85 }
86 },
87 "name": "meta.scalar.bitwise.kusto",
88 "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/binary-notfunction"
89 },
90 {
91 "match": "(?<!\\w)(!?in~?)(?!\\w)",
92 "name": "keyword.other.operator.kusto",
93 "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/in-cs-operator"
94 },
95 {
96 "match": "(?<!\\w)(!?(?:contains|endswith|hasprefix|hassuffix|has|startswith)(?:_cs)?)(?!\\w)",
97 "name": "keyword.other.operator.kusto",
98 "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/datatypes-string-operators"
99 },
100 {
101 "match": "\\b(range)\\s*\\((?:\\s*(\\w+(?:\\(.*?\\))?)\\s*,\\s*(\\w+(?:\\(.*?\\))?)\\s*,?(?:\\s*)?(\\w+(?:\\(.*?\\))?)?\\s*\\))?(?!\\w)",
102 "captures": {
103 "1": {
104 "name": "support.function.kusto"
105 },
106 "2": {
107 "patterns": [
108 {
109 "include": "#DateTimeTimeSpanDataTypes"
110 },
111 {
112 "include": "#TimeSpanLiterals"
113 },
114 {
115 "include": "#DateTimeTimeSpanFunctions"
116 },
117 {
118 "include": "#Numeric"
119 }
120 ]
121 },
122 "3": {
123 "patterns": [
124 {
125 "include": "#DateTimeTimeSpanDataTypes"
126 },
127 {
128 "include": "#TimeSpanLiterals"
129 },
130 {
131 "include": "#DateTimeTimeSpanFunctions"
132 },
133 {
134 "include": "#Numeric"
135 }
136 ]
137 },
138 "4": {
139 "patterns": [
140 {
141 "include": "#DateTimeTimeSpanDataTypes"
142 },
143 {
144 "include": "#TimeSpanLiterals"
145 },
146 {
147 "include": "#DateTimeTimeSpanFunctions"
148 },
149 {
150 "include": "#Numeric"
151 }
152 ]
153 }
154 },
155 "name": "meta.scalar.function.range.kusto",
156 "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/rangefunction"
157 },
158 {
159 "match": "\\b(abs|acos|around|array_concat|array_iff|array_index_of|array_length|array_reverse|array_rotate_left|array_rotate_right|array_shift_left|array_shift_right|array_slice|array_sort_asc|array_sort_desc|array_split|array_sum|asin|assert|atan2|atan|bag_has_key|bag_keys|bag_merge|bag_remove_keys|base64_decode_toarray|base64_decode_tostring|base64_decode_toguid|base64_encode_fromarray|base64_encode_tostring|base64_encode_fromguid|beta_cdf|beta_inv|beta_pdf|bin_at|bin_auto|case|ceiling|coalesce|column_ifexists|convert_angle|convert_energy|convert_force|convert_length|convert_mass|convert_speed|convert_temperature|convert_volume|cos|cot|countof|current_cluster_endpoint|current_database|current_principal_details|current_principal_is_member_of|current_principal|cursor_after|cursor_before_or_at|cursor_current|current_cursor|dcount_hll|degrees|dynamic_to_json|estimate_data_size|exp10|exp2|exp|extent_id|extent_tags|extract_all|extract_json|extractjson|extract|floor|format_bytes|format_ipv4_mask|format_ipv4|gamma|gettype|gzip_compress_to_base64_string|gzip_decompress_from_base64_string|has_any_index|has_any_ipv4_prefix|has_any_ipv4|has_ipv4_prefix|has_ipv4|hash_combine|hash_many|hash_md5|hash_sha1|hash_sha256|hash_xxhash64|hash|iff|iif|indexof_regex|indexof|ingestion_time|ipv4_compare|ipv4_is_in_range|ipv4_is_in_any_range|ipv4_is_match|ipv4_is_private|ipv4_netmask_suffix|ipv6_compare|ipv6_is_match|isascii|isempty|isfinite|isinf|isnan|isnotempty|notempty|isnotnull|notnull|isnull|isutf8|jaccard_index|log10|log2|loggamma|log|make_string|max_of|min_of|new_guid|not|bag_pack|pack_all|pack_array|pack_dictionary|pack|parse_command_line|parse_csv|parse_ipv4_mask|parse_ipv4|parse_ipv6_mask|parse_ipv6|parse_path|parse_urlquery|parse_url|parse_user_agent|parse_version|parse_xml|percentile_tdigest|percentile_array_tdigest|percentrank_tdigest|pi|pow|radians|rand|rank_tdigest|regex_quote|repeat|replace_regex|replace_string|reverse|round|set_difference|set_has_element|set_intersect|set_union|sign|sin|split|sqrt|strcat_array|strcat_delim|strcmp|strcat|string_size|strlen|strrep|substring|tan|to_utf8|tobool|todecimal|todouble|toreal|toguid|tohex|toint|tolong|tolower|tostring|toupper|translate|treepath|trim_end|trim_start|trim|unixtime_microseconds_todatetime|unixtime_milliseconds_todatetime|unixtime_nanoseconds_todatetime|unixtime_seconds_todatetime|url_decode|url_encode_component|url_encode|welch_test|zip|zlib_compress_to_base64_string|zlib_decompress_from_base64_string)\\b",
160 "name": "support.function.kusto",
161 "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/scalarfunctions"
162 },
163 {
164 "match": "\\b(bin)(?:\\s*\\(\\s*(.+?)\\s*,\\s*(.+?)\\s*\\))?(?!\\w)",
165 "captures": {
166 "1": {
167 "name": "support.function.kusto"
168 },
169 "2": {
170 "patterns": [
171 {
172 "include": "#DateTimeTimeSpanDataTypes"
173 },
174 {
175 "include": "#TimeSpanLiterals"
176 },
177 {
178 "include": "#DateTimeTimeSpanFunctions"
179 },
180 {
181 "include": "#Numeric"
182 }
183 ]
184 },
185 "3": {
186 "patterns": [
187 {
188 "include": "#TimeSpanLiterals"
189 },
190 {
191 "include": "#Numeric"
192 }
193 ]
194 }
195 },
196 "name": "meta.scalar.function.bin.kusto",
197 "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/binfunction"
198 },
199 {
200 "match": "\\b(count)\\s*\\(\\s*\\)(?!\\w)",
201 "name": "support.function.kusto",
202 "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/count-aggfunction"
203 },
204 {
205 "match": "\\b(arg_max|arg_min|avgif|avg|binary_all_and|binary_all_or|binary_all_xor|buildschema|countif|dcount|dcountif|hll|hll_merge|make_bag_if|make_bag|make_list_with_nulls|make_list_if|make_list|make_set_if|make_set|maxif|max|minif|min|percentilesw_array|percentiles_array|percentilesw|percentilew|percentiles|percentile|stdevif|stdevp|stdev|sumif|sum|take_anyif|take_any|tdigest_merge|merge_tdigest|tdigest|varianceif|variancep|variance)\\b",
206 "name": "support.function.kusto",
207 "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/aggregation-functions"
208 },
209 {
210 "match": "\\b(geo_distance_2points|geo_distance_point_to_line|geo_distance_point_to_polygon|geo_intersects_2lines|geo_intersects_2polygons|geo_intersects_line_with_polygon|geo_intersection_2lines|geo_intersection_2polygons|geo_intersection_line_with_polygon|geo_line_centroid|geo_line_densify|geo_line_length|geo_line_simplify|geo_polygon_area|geo_polygon_centroid|geo_polygon_densify|geo_polygon_perimeter|geo_polygon_simplify|geo_polygon_to_s2cells|geo_point_in_circle|geo_point_in_polygon|geo_point_to_geohash|geo_point_to_h3cell|geo_point_to_s2cell|geo_geohash_to_central_point|geo_geohash_neighbors|geo_geohash_to_polygon|geo_s2cell_to_central_point|geo_s2cell_neighbors|geo_s2cell_to_polygon|geo_h3cell_to_central_point|geo_h3cell_neighbors|geo_h3cell_to_polygon|geo_h3cell_parent|geo_h3cell_children|geo_h3cell_level|geo_h3cell_rings|geo_simplify_polygons_array|geo_union_lines_array|geo_union_polygons_array)\\b",
211 "name": "support.function.kusto",
212 "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/geospatial-grid-systems"
213 },
214 {
215 "match": "\\b(next|prev|row_cumsum|row_number|row_rank|row_window_session)\\b",
216 "name": "support.function.kusto",
217 "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/windowsfunctions"
218 },
219 {
220 "match": "\\.(create-or-alter|replace)",
221 "name": "keyword.control.kusto",
222 "comment": "User-defined functions: https://docs.microsoft.com/en-us/azure/kusto/query/functions/user-defined-functions"
223 },
224 {
225 "match": "(?<=let ).+(?=\\W*=)",
226 "name": "entity.function.name.lambda.kusto",
227 "comment": "User-defined functions: https://docs.microsoft.com/en-us/azure/kusto/query/functions/user-defined-functions"
228 },
229 {
230 "match": "\\b(folder|docstring|skipvalidation)\\b",
231 "name": "keyword.other.operator.kusto",
232 "comment": "User-defined functions: https://docs.microsoft.com/en-us/azure/kusto/query/functions/user-defined-functions"
233 },
234 {
235 "match": "\\b(function)\\b",
236 "name": "storage.type.kusto"
237 },
238 {
239 "match": "\\b(bool|decimal|dynamic|guid|int|long|real|string)\\b",
240 "name": "storage.type.kusto",
241 "comment": "Data types: https://docs.microsoft.com/en-us/azure/kusto/query/scalar-data-types"
242 },
243 {
244 "match": "\\b(as)\\s+(\\w+)\\b",
245 "captures": {
246 "1": {
247 "name": "keyword.other.query.kusto"
248 },
249 "2": {
250 "name": "variable.other.kusto"
251 }
252 },
253 "name": "meta.query.as.kusto",
254 "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/asoperator"
255 },
256 {
257 "match": "\\b(datatable)(?=\\W*\\()",
258 "name": "keyword.other.query.kusto",
259 "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/datatableoperator"
260 },
261 {
262 "match": "\\b(facet)(?:\\s+(by))?\\b",
263 "captures": {
264 "1": {
265 "name": "keyword.other.query.kusto"
266 },
267 "2": {
268 "name": "keyword.other.operator.kusto"
269 }
270 },
271 "name": "meta.query.facet.kusto",
272 "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/facetoperator"
273 },
274 {
275 "match": "\\b(invoke)(?:\\s+(\\w+))?\\b",
276 "captures": {
277 "1": {
278 "name": "keyword.other.query.kusto"
279 },
280 "2": {
281 "name": "entity.name.function.kusto"
282 }
283 },
284 "name": "meta.query.invoke.kusto",
285 "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/invokeoperator"
286 },
287 {
288 "match": "\\b(order)(?:\\s+(by)\\s+(\\w+))?\\b",
289 "captures": {
290 "1": {
291 "name": "keyword.other.query.kusto"
292 },
293 "2": {
294 "name": "keyword.other.operator.kusto"
295 },
296 "3": {
297 "name": "variable.other.column.kusto"
298 }
299 },
300 "name": "meta.query.order.kusto",
301 "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/orderoperator"
302 },
303 {
304 "match": "\\b(range)\\s+(\\w+)\\s+(from)\\s+(\\w+(?:\\(\\w*\\))?)\\s+(to)\\s+(\\w+(?:\\(\\w*\\))?)\\s+(step)\\s+(\\w+(?:\\(\\w*\\))?)\\b",
305 "captures": {
306 "1": {
307 "name": "keyword.other.query.kusto"
308 },
309 "2": {
310 "name": "variable.other.column.kusto"
311 },
312 "3": {
313 "name": "keyword.other.operator.kusto"
314 },
315 "4": {
316 "patterns": [
317 {
318 "include": "#TimeSpanLiterals"
319 },
320 {
321 "include": "#DateTimeTimeSpanFunctions"
322 },
323 {
324 "include": "#Numeric"
325 }
326 ]
327 },
328 "5": {
329 "name": "keyword.other.operator.kusto"
330 },
331 "6": {
332 "patterns": [
333 {
334 "include": "#TimeSpanLiterals"
335 },
336 {
337 "include": "#DateTimeTimeSpanFunctions"
338 },
339 {
340 "include": "#Numeric"
341 }
342 ]
343 },
344 "7": {
345 "name": "keyword.other.operator.kusto"
346 },
347 "8": {
348 "patterns": [
349 {
350 "include": "#TimeSpanLiterals"
351 },
352 {
353 "include": "#DateTimeTimeSpanFunctions"
354 },
355 {
356 "include": "#Numeric"
357 }
358 ]
359 }
360 },
361 "name": "meta.query.range.kusto",
362 "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/rangeoperator"
363 },
364 {
365 "match": "\\b(sample)(?:\\s+(\\d+))?(?![\\w-])",
366 "captures": {
367 "1": {
368 "name": "keyword.other.query.kusto"
369 },
370 "2": {
371 "patterns": [
372 {
373 "include": "#Numeric"
374 }
375 ]
376 }
377 },
378 "name": "meta.query.sample.kusto",
379 "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/sampleoperator"
380 },
381 {
382 "match": "\\b(sample-distinct)(?:\\s+(\\d+)\\s+(of)\\s+(\\w+))?\\b",
383 "captures": {
384 "1": {
385 "name": "keyword.other.query.kusto"
386 },
387 "2": {
388 "patterns": [
389 {
390 "include": "#Numeric"
391 }
392 ]
393 },
394 "3": {
395 "name": "keyword.other.operator.kusto"
396 },
397 "4": {
398 "name": "variable.other.column.kusto"
399 }
400 },
401 "name": "meta.query.sample-distinct.kusto",
402 "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/sampledistinctoperator"
403 },
404 {
405 "match": "\\b(sort)(?:\\s+(by))?\\b",
406 "captures": {
407 "1": {
408 "name": "keyword.other.query.kusto"
409 },
410 "2": {
411 "name": "keyword.other.operator.kusto"
412 }
413 },
414 "name": "meta.query.sort.kusto",
415 "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/sortoperator"
416 },
417 {
418 "match": "\\b(take|limit)(?:\\s+(\\d+))\\b",
419 "captures": {
420 "1": {
421 "name": "keyword.other.query.kusto"
422 },
423 "2": {
424 "patterns": [
425 {
426 "include": "#Numeric"
427 }
428 ]
429 }
430 },
431 "name": "meta.query.take.kusto",
432 "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/takeoperator"
433 },
434 {
435 "match": "\\b(top)(?:\\s+(\\d+)\\s+(by)\\s+(\\w+))?(?![\\w-])\\b",
436 "captures": {
437 "1": {
438 "name": "keyword.other.query.kusto"
439 },
440 "2": {
441 "patterns": [
442 {
443 "include": "#Numeric"
444 }
445 ]
446 },
447 "3": {
448 "name": "keyword.other.operator.kusto"
449 },
450 "4": {
451 "name": "variable.other.column.kusto"
452 }
453 },
454 "name": "meta.query.top.kusto",
455 "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/topoperator"
456 },
457 {
458 "match": "\\b(top-hitters)(?:\\s+(\\d+)\\s+(of)\\s+(\\w+)(?:\\s+(by)\\s+(\\w+))?)?\\b",
459 "captures": {
460 "1": {
461 "name": "keyword.other.query.kusto"
462 },
463 "2": {
464 "patterns": [
465 {
466 "include": "#Numeric"
467 }
468 ]
469 },
470 "3": {
471 "name": "keyword.other.operator.kusto"
472 },
473 "4": {
474 "name": "variable.other.column.kusto"
475 },
476 "5": {
477 "name": "keyword.other.operator.kusto"
478 },
479 "6": {
480 "name": "variable.other.column.kusto"
481 }
482 },
483 "name": "meta.query.top-hitters.kusto",
484 "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/tophittersoperator"
485 },
486 {
487 "match": "\\b(consume|count|distinct|evaluate|extend|externaldata|find|fork|getschema|join|lookup|make-series|mv-apply|mv-expand|project-away|project-keep|project-rename|project-reorder|project|parse|parse-where|parse-kv|partition|print|reduce|render|scan|search|serialize|shuffle|summarize|top-nested|union|where)\\b",
488 "name": "keyword.other.query.kusto",
489 "comment": "Tabular operators: https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/queries"
490 },
491 {
492 "match": "\\b(active_users_count|activity_counts_metrics|activity_engagement|new_activity_metrics|activity_metrics|autocluster|azure_digital_twins_query_request|bag_unpack|basket|cosmosdb_sql_request|dcount_intersect|diffpatterns|funnel_sequence_completion|funnel_sequence|http_request_post|http_request|infer_storage_schema|ipv4_lookup|mysql_request|narrow|pivot|preview|rolling_percentile|rows_near|schema_merge|session_count|sequence_detect|sliding_window_counts|sql_request)\\b",
493 "name": "support.function.kusto",
494 "comment": "Tabular operators: evalute (plugins): https://docs.microsoft.com/en-us/azure/kusto/query/evaluateoperator"
495 },
496 {
497 "match": "\\b(on|kind|hint\\.remote|hint\\.strategy)\\b",
498 "name": "keyword.other.operator.kusto",
499 "comment": "Tabular operators: join: https://docs.microsoft.com/en-us/azure/kusto/query/joinoperator"
500 },
501 {
502 "match": "(\\$left|\\$right)\\b",
503 "name": "keyword.other.kusto",
504 "comment": "Tabular operators: join ($left, $right): https://docs.microsoft.com/en-us/azure/kusto/query/joinoperator"
505 },
506 {
507 "match": "\\b(innerunique|inner|leftouter|rightouter|fullouter|leftanti|anti|leftantisemi|rightanti|rightantisemi|leftsemi|rightsemi|broadcast)\\b",
508 "name": "keyword.other.kusto",
509 "comment": "Tabular operators: join (kinds, strategies): https://docs.microsoft.com/en-us/azure/kusto/query/joinoperator"
510 },
511 {
512 "match": "\\b(series_abs|series_acos|series_add|series_asin|series_atan|series_cos|series_decompose|series_decompose_anomalies|series_decompose_forecast|series_divide|series_equals|series_exp|series_fft|series_fill_backward|series_fill_const|series_fill_forward|series_fill_linear|series_fir|series_fit_2lines_dynamic|series_fit_2lines|series_fit_line_dynamic|series_fit_line|series_fit_poly|series_greater_equals|series_greater|series_ifft|series_iir|series_less_equals|series_less|series_multiply|series_not_equals|series_outliers|series_pearson_correlation|series_periods_detect|series_periods_validate|series_pow|series_seasonal|series_sign|series_sin|series_stats|series_stats_dynamic|series_subtract|series_tan)\\b",
513 "name": "support.function.kusto",
514 "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/machine-learning-and-tsa"
515 },
516 {
517 "match": "\\b(bag|array)\\b",
518 "name": "keyword.other.operator.kusto",
519 "comment": "Tabular operators: mv-expand (bagexpand options): https://docs.microsoft.com/en-us/azure/kusto/query/mvexpandoperator"
520 },
521 {
522 "match": "\\b(asc|desc|nulls first|nulls last)\\b",
523 "name": "keyword.other.kusto",
524 "comment": "Tabular operators: order: https://docs.microsoft.com/en-us/azure/kusto/query/orderoperator"
525 },
526 {
527 "match": "\\b(regex|simple|relaxed)\\b",
528 "name": "keyword.other.kusto",
529 "comment": "Tabular operators: parse: https://docs.microsoft.com/en-us/azure/kusto/query/parseoperator"
530 },
531 {
532 "match": "\\b(anomalychart|areachart|barchart|card|columnchart|ladderchart|linechart|piechart|pivotchart|scatterchart|stackedareachart|timechart|timepivot)\\b",
533 "name": "support.function.kusto"
534 },
535 {
536 "include": "#Strings"
537 },
538 {
539 "match": "\\{.*?\\}",
540 "name": "string.other.kusto"
541 },
542 {
543 "match": "//.*",
544 "name": "comment.line.kusto",
545 "comment": "Comments"
546 },
547 {
548 "include": "#TimeSpanLiterals"
549 },
550 {
551 "include": "#DateTimeTimeSpanFunctions"
552 },
553 {
554 "include": "#DateTimeTimeSpanDataTypes"
555 },
556 {
557 "include": "#Numeric"
558 },
559 {
560 "match": "\\b(true|false|null)\\b",
561 "name": "constant.language.kusto"
562 },
563 {
564 "match": "\\b(anyif|any|array_strcat|base64_decodestring|base64_encodestring|make_dictionary|makelist|makeset|mvexpand|todynamic|parse_json|replace|weekofyear)(?=\\W*\\(|\\b)",
565 "name": "invalid.deprecated.kusto",
566 "comment": "Deprecated functions"
567 }
568 ],
569 "repository": {
570 "Strings": {
571 "patterns": [
572 {
573 "begin": "([@h]?\")",
574 "beginCaptures": {
575 "1": {
576 "name": "punctuation.definition.string.kusto"
577 }
578 },
579 "end": "\"",
580 "endCaptures": {
581 "0": {
582 "name": "punctuation.definition.string.kusto"
583 }
584 },
585 "patterns": [
586 {
587 "include": "#Escapes"
588 }
589 ],
590 "name": "string.quoted.double.kusto",
591 "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/scalar-data-types/string"
592 },
593 {
594 "begin": "([@h]?')",
595 "beginCaptures": {
596 "1": {
597 "name": "punctuation.definition.string.kusto"
598 }
599 },
600 "end": "'",
601 "endCaptures": {
602 "0": {
603 "name": "punctuation.definition.string.kusto"
604 }
605 },
606 "patterns": [
607 {
608 "include": "#Escapes"
609 }
610 ],
611 "name": "string.quoted.single.kusto",
612 "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/scalar-data-types/string"
613 }
614 ]
615 },
616 "Escapes": {
617 "patterns": [
618 {
619 "match": "\\\\['\"]",
620 "name": "constant.character.escape.kusto"
621 }
622 ]
623 },
624 "Numeric": {
625 "patterns": [
626 {
627 "match": "\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*+)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?(?=\\b|\\w)",
628 "name": "constant.numeric.kusto"
629 }
630 ]
631 },
632 "TimeSpanLiterals": {
633 "patterns": [
634 {
635 "match": "[+-]?(?:\\d*\\.)?\\d+(?:microseconds?|ticks?|seconds?|ms|d|h|m|s)\\b",
636 "name": "constant.numeric.kusto",
637 "comment": "timespan literals: https://docs.microsoft.com/en-us/azure/kusto/query/scalar-data-types/timespan#timespan-literals"
638 }
639 ]
640 },
641 "DateTimeTimeSpanFunctions": {
642 "patterns": [
643 {
644 "match": "\\b(format_datetime)(?:\\s*\\(\\s*(.+?)\\s*,\\s*(['\"].*?['\"])\\s*\\))?(?!\\w)",
645 "captures": {
646 "1": {
647 "name": "support.function.kusto"
648 },
649 "2": {
650 "patterns": [
651 {
652 "include": "#DateTimeTimeSpanDataTypes"
653 }
654 ]
655 },
656 "3": {
657 "patterns": [
658 {
659 "include": "#Strings"
660 }
661 ]
662 }
663 },
664 "name": "meta.scalar.function.format_datetime.kusto",
665 "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/format-datetimefunction"
666 },
667 {
668 "match": "\\b(ago|datetime_add|datetime_diff|datetime_local_to_utc|datetime_part|datetime_utc_to_local|dayofmonth|dayofweek|dayofyear|endofday|endofmonth|endofweek|endofyear|format_timespan|getmonth|getyear|hourofday|make_datetime|make_timespan|monthofyear|now|startofday|startofmonth|startofweek|startofyear|todatetime|totimespan|week_of_year)(?=\\W*\\()",
669 "name": "support.function.kusto",
670 "comment": "Scalar function: DateTime/Timespan Functions: https://docs.microsoft.com/en-us/azure/kusto/query/scalarfunctions#datetimetimespan-functions"
671 }
672 ]
673 },
674 "DateTimeTimeSpanDataTypes": {
675 "patterns": [
676 {
677 "match": "\\b(datetime|timespan|time)\\b",
678 "name": "storage.type.kusto"
679 }
680 ]
681 }
682 },
683 "uuid": "FF0550E0-3A29-11E3-AA6E-0800200C9B77"
684 }
685