tm-grammars 0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (181) hide show
  1. package/LICENSE +22 -0
  2. package/NOTICE +6565 -0
  3. package/README.md +211 -0
  4. package/grammars/abap.json +380 -0
  5. package/grammars/actionscript-3.json +951 -0
  6. package/grammars/ada.json +3874 -0
  7. package/grammars/apache.json +562 -0
  8. package/grammars/apex.json +3203 -0
  9. package/grammars/apl.json +1479 -0
  10. package/grammars/applescript.json +1406 -0
  11. package/grammars/ara.json +428 -0
  12. package/grammars/asm.json +1741 -0
  13. package/grammars/astro.json +776 -0
  14. package/grammars/awk.json +388 -0
  15. package/grammars/ballerina.json +3768 -0
  16. package/grammars/bat.json +783 -0
  17. package/grammars/beancount.json +831 -0
  18. package/grammars/berry.json +172 -0
  19. package/grammars/bibtex.json +315 -0
  20. package/grammars/bicep.json +239 -0
  21. package/grammars/blade.json +3870 -0
  22. package/grammars/c.json +3552 -0
  23. package/grammars/cadence.json +738 -0
  24. package/grammars/clarity.json +877 -0
  25. package/grammars/clojure.json +426 -0
  26. package/grammars/cmake.json +143 -0
  27. package/grammars/cobol.json +1124 -0
  28. package/grammars/codeql.json +1540 -0
  29. package/grammars/coffee.json +1311 -0
  30. package/grammars/cpp-macro.json +9498 -0
  31. package/grammars/cpp.json +16635 -0
  32. package/grammars/crystal.json +1866 -0
  33. package/grammars/csharp.json +5722 -0
  34. package/grammars/css.json +1860 -0
  35. package/grammars/csv.json +46 -0
  36. package/grammars/cue.json +1128 -0
  37. package/grammars/cypher.json +353 -0
  38. package/grammars/d.json +3185 -0
  39. package/grammars/dart.json +522 -0
  40. package/grammars/dax.json +185 -0
  41. package/grammars/diff.json +155 -0
  42. package/grammars/docker.json +97 -0
  43. package/grammars/dream-maker.json +640 -0
  44. package/grammars/elixir.json +1014 -0
  45. package/grammars/elm.json +751 -0
  46. package/grammars/erb.json +156 -0
  47. package/grammars/erlang.json +1757 -0
  48. package/grammars/fish.json +189 -0
  49. package/grammars/fsharp.json +1831 -0
  50. package/grammars/gdresource.json +290 -0
  51. package/grammars/gdscript.json +969 -0
  52. package/grammars/gdshader.json +405 -0
  53. package/grammars/gherkin.json +133 -0
  54. package/grammars/git-commit.json +85 -0
  55. package/grammars/git-rebase.json +56 -0
  56. package/grammars/glimmer-js.json +98 -0
  57. package/grammars/glimmer-ts.json +98 -0
  58. package/grammars/glsl.json +57 -0
  59. package/grammars/gnuplot.json +892 -0
  60. package/grammars/go.json +1012 -0
  61. package/grammars/graphql.json +1295 -0
  62. package/grammars/groovy.json +1378 -0
  63. package/grammars/hack.json +2650 -0
  64. package/grammars/haml.json +598 -0
  65. package/grammars/handlebars.json +848 -0
  66. package/grammars/haskell.json +2431 -0
  67. package/grammars/hcl.json +787 -0
  68. package/grammars/hjson.json +821 -0
  69. package/grammars/hlsl.json +212 -0
  70. package/grammars/html.json +93 -0
  71. package/grammars/imba.json +2696 -0
  72. package/grammars/ini.json +108 -0
  73. package/grammars/java.json +1885 -0
  74. package/grammars/javascript.json +5984 -0
  75. package/grammars/jinja-html.json +16 -0
  76. package/grammars/jinja.json +345 -0
  77. package/grammars/jison.json +715 -0
  78. package/grammars/jsdoc.json +21 -0
  79. package/grammars/json.json +208 -0
  80. package/grammars/json5.json +244 -0
  81. package/grammars/jsonc.json +208 -0
  82. package/grammars/jsonl.json +208 -0
  83. package/grammars/jsonnet.json +211 -0
  84. package/grammars/jssm.json +159 -0
  85. package/grammars/jsx.json +5984 -0
  86. package/grammars/julia.json +1061 -0
  87. package/grammars/kotlin.json +580 -0
  88. package/grammars/kusto.json +687 -0
  89. package/grammars/latex.json +2395 -0
  90. package/grammars/less.json +5012 -0
  91. package/grammars/liquid.json +990 -0
  92. package/grammars/lisp.json +121 -0
  93. package/grammars/logo.json +55 -0
  94. package/grammars/lua.json +956 -0
  95. package/grammars/make.json +629 -0
  96. package/grammars/markdown.json +3066 -0
  97. package/grammars/marko.json +1344 -0
  98. package/grammars/matlab.json +1131 -0
  99. package/grammars/mdc.json +571 -0
  100. package/grammars/mdx.json +5629 -0
  101. package/grammars/mermaid.json +1382 -0
  102. package/grammars/mojo.json +4153 -0
  103. package/grammars/narrat.json +227 -0
  104. package/grammars/nextflow.json +298 -0
  105. package/grammars/nginx.json +2121 -0
  106. package/grammars/nim.json +1522 -0
  107. package/grammars/nix.json +1200 -0
  108. package/grammars/nushell.json +1047 -0
  109. package/grammars/objective-c.json +3750 -0
  110. package/grammars/objective-cpp.json +7242 -0
  111. package/grammars/ocaml.json +2967 -0
  112. package/grammars/pascal.json +154 -0
  113. package/grammars/perl.json +2971 -0
  114. package/grammars/php.json +4024 -0
  115. package/grammars/plsql.json +241 -0
  116. package/grammars/postcss.json +377 -0
  117. package/grammars/powerquery.json +349 -0
  118. package/grammars/powershell.json +1024 -0
  119. package/grammars/prisma.json +443 -0
  120. package/grammars/prolog.json +298 -0
  121. package/grammars/proto.json +507 -0
  122. package/grammars/pug.json +1033 -0
  123. package/grammars/puppet.json +777 -0
  124. package/grammars/purescript.json +871 -0
  125. package/grammars/python.json +4208 -0
  126. package/grammars/r.json +637 -0
  127. package/grammars/raku.json +310 -0
  128. package/grammars/razor.json +1813 -0
  129. package/grammars/reg.json +136 -0
  130. package/grammars/rel.json +200 -0
  131. package/grammars/riscv.json +298 -0
  132. package/grammars/rst.json +734 -0
  133. package/grammars/ruby.json +2769 -0
  134. package/grammars/rust.json +1171 -0
  135. package/grammars/sas.json +302 -0
  136. package/grammars/sass.json +618 -0
  137. package/grammars/scala.json +1313 -0
  138. package/grammars/scheme.json +384 -0
  139. package/grammars/scss.json +1874 -0
  140. package/grammars/shaderlab.json +199 -0
  141. package/grammars/shellscript.json +2025 -0
  142. package/grammars/shellsession.json +33 -0
  143. package/grammars/smalltalk.json +235 -0
  144. package/grammars/solidity.json +1210 -0
  145. package/grammars/sparql.json +45 -0
  146. package/grammars/splunk.json +91 -0
  147. package/grammars/sql.json +631 -0
  148. package/grammars/ssh-config.json +88 -0
  149. package/grammars/stata.json +3050 -0
  150. package/grammars/stylus.json +1208 -0
  151. package/grammars/svelte.json +1171 -0
  152. package/grammars/swift.json +4203 -0
  153. package/grammars/system-verilog.json +1063 -0
  154. package/grammars/tasl.json +292 -0
  155. package/grammars/tcl.json +291 -0
  156. package/grammars/tex.json +281 -0
  157. package/grammars/toml.json +431 -0
  158. package/grammars/tsx.json +5984 -0
  159. package/grammars/turtle.json +261 -0
  160. package/grammars/twig.json +1394 -0
  161. package/grammars/typescript.json +5735 -0
  162. package/grammars/v.json +1001 -0
  163. package/grammars/vb.json +232 -0
  164. package/grammars/verilog.json +305 -0
  165. package/grammars/vhdl.json +1484 -0
  166. package/grammars/viml.json +445 -0
  167. package/grammars/vue-html.json +559 -0
  168. package/grammars/vue.json +1237 -0
  169. package/grammars/vyper.json +5415 -0
  170. package/grammars/wasm.json +831 -0
  171. package/grammars/wenyan.json +129 -0
  172. package/grammars/wgsl.json +391 -0
  173. package/grammars/wolfram.json +2370 -0
  174. package/grammars/xml.json +382 -0
  175. package/grammars/xsl.json +89 -0
  176. package/grammars/yaml.json +616 -0
  177. package/grammars/zenscript.json +257 -0
  178. package/grammars/zig.json +312 -0
  179. package/index.d.ts +18 -0
  180. package/index.js +2165 -0
  181. package/package.json +46 -0
@@ -0,0 +1,687 @@
1
+ {
2
+ "displayName": "Kusto",
3
+ "fileTypes": [
4
+ "csl",
5
+ "kusto",
6
+ "kql"
7
+ ],
8
+ "name": "kusto",
9
+ "patterns": [
10
+ {
11
+ "comment": "Tabular operators: common helper operators",
12
+ "match": "\\b(by|from|of|to|step|with)\\b",
13
+ "name": "keyword.other.operator.kusto"
14
+ },
15
+ {
16
+ "comment": "Query statements: https://docs.microsoft.com/en-us/azure/kusto/query/statements",
17
+ "match": "\\b(let|set|alias|declare|pattern|query_parameters|restrict|access|set)\\b",
18
+ "name": "keyword.control.kusto"
19
+ },
20
+ {
21
+ "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/datatypes-string-operators",
22
+ "match": "\\b(and|or|has_all|has_any|matches|regex)\\b",
23
+ "name": "keyword.other.operator.kusto"
24
+ },
25
+ {
26
+ "captures": {
27
+ "1": {
28
+ "name": "support.function.kusto"
29
+ },
30
+ "2": {
31
+ "patterns": [
32
+ {
33
+ "include": "#Strings"
34
+ }
35
+ ]
36
+ }
37
+ },
38
+ "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/clusterfunction",
39
+ "match": "\\b(cluster|database)(?:\\s*\\(\\s*(.+?)\\s*\\))?(?!\\w)",
40
+ "name": "meta.special.database.kusto"
41
+ },
42
+ {
43
+ "comment": "Special functions: https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/tablefunction",
44
+ "match": "\\b(external_table|materialized_view|materialize|table|toscalar)\\b",
45
+ "name": "support.function.kusto"
46
+ },
47
+ {
48
+ "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/betweenoperator",
49
+ "match": "(?<!\\w)(!?between)\\b",
50
+ "name": "keyword.other.operator.kusto"
51
+ },
52
+ {
53
+ "captures": {
54
+ "1": {
55
+ "name": "support.function.kusto"
56
+ },
57
+ "2": {
58
+ "patterns": [
59
+ {
60
+ "include": "#Numeric"
61
+ }
62
+ ]
63
+ },
64
+ "3": {
65
+ "patterns": [
66
+ {
67
+ "include": "#Numeric"
68
+ }
69
+ ]
70
+ }
71
+ },
72
+ "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/binoperators",
73
+ "match": "\\b(binary_and|binary_or|binary_shift_left|binary_shift_right|binary_xor)(?:\\s*\\(\\s*(\\w+)\\s*,\\s*(\\w+)\\s*\\))?(?!\\w)",
74
+ "name": "meta.scalar.bitwise.kusto"
75
+ },
76
+ {
77
+ "captures": {
78
+ "1": {
79
+ "name": "support.function.kusto"
80
+ },
81
+ "2": {
82
+ "patterns": [
83
+ {
84
+ "include": "#Numeric"
85
+ }
86
+ ]
87
+ }
88
+ },
89
+ "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/binary-notfunction",
90
+ "match": "\\b(binary_not|bitset_count_ones)(?:\\s*\\(\\s*(\\w+)\\s*\\))?(?!\\w)",
91
+ "name": "meta.scalar.bitwise.kusto"
92
+ },
93
+ {
94
+ "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/in-cs-operator",
95
+ "match": "(?<!\\w)(!?in~?)(?!\\w)",
96
+ "name": "keyword.other.operator.kusto"
97
+ },
98
+ {
99
+ "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/datatypes-string-operators",
100
+ "match": "(?<!\\w)(!?(?:contains|endswith|hasprefix|hassuffix|has|startswith)(?:_cs)?)(?!\\w)",
101
+ "name": "keyword.other.operator.kusto"
102
+ },
103
+ {
104
+ "captures": {
105
+ "1": {
106
+ "name": "support.function.kusto"
107
+ },
108
+ "2": {
109
+ "patterns": [
110
+ {
111
+ "include": "#DateTimeTimeSpanDataTypes"
112
+ },
113
+ {
114
+ "include": "#TimeSpanLiterals"
115
+ },
116
+ {
117
+ "include": "#DateTimeTimeSpanFunctions"
118
+ },
119
+ {
120
+ "include": "#Numeric"
121
+ }
122
+ ]
123
+ },
124
+ "3": {
125
+ "patterns": [
126
+ {
127
+ "include": "#DateTimeTimeSpanDataTypes"
128
+ },
129
+ {
130
+ "include": "#TimeSpanLiterals"
131
+ },
132
+ {
133
+ "include": "#DateTimeTimeSpanFunctions"
134
+ },
135
+ {
136
+ "include": "#Numeric"
137
+ }
138
+ ]
139
+ },
140
+ "4": {
141
+ "patterns": [
142
+ {
143
+ "include": "#DateTimeTimeSpanDataTypes"
144
+ },
145
+ {
146
+ "include": "#TimeSpanLiterals"
147
+ },
148
+ {
149
+ "include": "#DateTimeTimeSpanFunctions"
150
+ },
151
+ {
152
+ "include": "#Numeric"
153
+ }
154
+ ]
155
+ }
156
+ },
157
+ "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/rangefunction",
158
+ "match": "\\b(range)\\s*\\((?:\\s*(\\w+(?:\\(.*?\\))?)\\s*,\\s*(\\w+(?:\\(.*?\\))?)\\s*,?(?:\\s*)?(\\w+(?:\\(.*?\\))?)?\\s*\\))?(?!\\w)",
159
+ "name": "meta.scalar.function.range.kusto"
160
+ },
161
+ {
162
+ "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/scalarfunctions",
163
+ "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",
164
+ "name": "support.function.kusto"
165
+ },
166
+ {
167
+ "captures": {
168
+ "1": {
169
+ "name": "support.function.kusto"
170
+ },
171
+ "2": {
172
+ "patterns": [
173
+ {
174
+ "include": "#DateTimeTimeSpanDataTypes"
175
+ },
176
+ {
177
+ "include": "#TimeSpanLiterals"
178
+ },
179
+ {
180
+ "include": "#DateTimeTimeSpanFunctions"
181
+ },
182
+ {
183
+ "include": "#Numeric"
184
+ }
185
+ ]
186
+ },
187
+ "3": {
188
+ "patterns": [
189
+ {
190
+ "include": "#TimeSpanLiterals"
191
+ },
192
+ {
193
+ "include": "#Numeric"
194
+ }
195
+ ]
196
+ }
197
+ },
198
+ "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/binfunction",
199
+ "match": "\\b(bin)(?:\\s*\\(\\s*(.+?)\\s*,\\s*(.+?)\\s*\\))?(?!\\w)",
200
+ "name": "meta.scalar.function.bin.kusto"
201
+ },
202
+ {
203
+ "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/count-aggfunction",
204
+ "match": "\\b(count)\\s*\\(\\s*\\)(?!\\w)",
205
+ "name": "support.function.kusto"
206
+ },
207
+ {
208
+ "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/aggregation-functions",
209
+ "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",
210
+ "name": "support.function.kusto"
211
+ },
212
+ {
213
+ "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/geospatial-grid-systems",
214
+ "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",
215
+ "name": "support.function.kusto"
216
+ },
217
+ {
218
+ "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/windowsfunctions",
219
+ "match": "\\b(next|prev|row_cumsum|row_number|row_rank|row_window_session)\\b",
220
+ "name": "support.function.kusto"
221
+ },
222
+ {
223
+ "comment": "User-defined functions: https://docs.microsoft.com/en-us/azure/kusto/query/functions/user-defined-functions",
224
+ "match": "\\.(create-or-alter|replace)",
225
+ "name": "keyword.control.kusto"
226
+ },
227
+ {
228
+ "comment": "User-defined functions: https://docs.microsoft.com/en-us/azure/kusto/query/functions/user-defined-functions",
229
+ "match": "(?<=let ).+(?=\\W*=)",
230
+ "name": "entity.function.name.lambda.kusto"
231
+ },
232
+ {
233
+ "comment": "User-defined functions: https://docs.microsoft.com/en-us/azure/kusto/query/functions/user-defined-functions",
234
+ "match": "\\b(folder|docstring|skipvalidation)\\b",
235
+ "name": "keyword.other.operator.kusto"
236
+ },
237
+ {
238
+ "match": "\\b(function)\\b",
239
+ "name": "storage.type.kusto"
240
+ },
241
+ {
242
+ "comment": "Data types: https://docs.microsoft.com/en-us/azure/kusto/query/scalar-data-types",
243
+ "match": "\\b(bool|decimal|dynamic|guid|int|long|real|string)\\b",
244
+ "name": "storage.type.kusto"
245
+ },
246
+ {
247
+ "captures": {
248
+ "1": {
249
+ "name": "keyword.other.query.kusto"
250
+ },
251
+ "2": {
252
+ "name": "variable.other.kusto"
253
+ }
254
+ },
255
+ "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/asoperator",
256
+ "match": "\\b(as)\\s+(\\w+)\\b",
257
+ "name": "meta.query.as.kusto"
258
+ },
259
+ {
260
+ "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/datatableoperator",
261
+ "match": "\\b(datatable)(?=\\W*\\()",
262
+ "name": "keyword.other.query.kusto"
263
+ },
264
+ {
265
+ "captures": {
266
+ "1": {
267
+ "name": "keyword.other.query.kusto"
268
+ },
269
+ "2": {
270
+ "name": "keyword.other.operator.kusto"
271
+ }
272
+ },
273
+ "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/facetoperator",
274
+ "match": "\\b(facet)(?:\\s+(by))?\\b",
275
+ "name": "meta.query.facet.kusto"
276
+ },
277
+ {
278
+ "captures": {
279
+ "1": {
280
+ "name": "keyword.other.query.kusto"
281
+ },
282
+ "2": {
283
+ "name": "entity.name.function.kusto"
284
+ }
285
+ },
286
+ "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/invokeoperator",
287
+ "match": "\\b(invoke)(?:\\s+(\\w+))?\\b",
288
+ "name": "meta.query.invoke.kusto"
289
+ },
290
+ {
291
+ "captures": {
292
+ "1": {
293
+ "name": "keyword.other.query.kusto"
294
+ },
295
+ "2": {
296
+ "name": "keyword.other.operator.kusto"
297
+ },
298
+ "3": {
299
+ "name": "variable.other.column.kusto"
300
+ }
301
+ },
302
+ "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/orderoperator",
303
+ "match": "\\b(order)(?:\\s+(by)\\s+(\\w+))?\\b",
304
+ "name": "meta.query.order.kusto"
305
+ },
306
+ {
307
+ "captures": {
308
+ "1": {
309
+ "name": "keyword.other.query.kusto"
310
+ },
311
+ "2": {
312
+ "name": "variable.other.column.kusto"
313
+ },
314
+ "3": {
315
+ "name": "keyword.other.operator.kusto"
316
+ },
317
+ "4": {
318
+ "patterns": [
319
+ {
320
+ "include": "#TimeSpanLiterals"
321
+ },
322
+ {
323
+ "include": "#DateTimeTimeSpanFunctions"
324
+ },
325
+ {
326
+ "include": "#Numeric"
327
+ }
328
+ ]
329
+ },
330
+ "5": {
331
+ "name": "keyword.other.operator.kusto"
332
+ },
333
+ "6": {
334
+ "patterns": [
335
+ {
336
+ "include": "#TimeSpanLiterals"
337
+ },
338
+ {
339
+ "include": "#DateTimeTimeSpanFunctions"
340
+ },
341
+ {
342
+ "include": "#Numeric"
343
+ }
344
+ ]
345
+ },
346
+ "7": {
347
+ "name": "keyword.other.operator.kusto"
348
+ },
349
+ "8": {
350
+ "patterns": [
351
+ {
352
+ "include": "#TimeSpanLiterals"
353
+ },
354
+ {
355
+ "include": "#DateTimeTimeSpanFunctions"
356
+ },
357
+ {
358
+ "include": "#Numeric"
359
+ }
360
+ ]
361
+ }
362
+ },
363
+ "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/rangeoperator",
364
+ "match": "\\b(range)\\s+(\\w+)\\s+(from)\\s+(\\w+(?:\\(\\w*\\))?)\\s+(to)\\s+(\\w+(?:\\(\\w*\\))?)\\s+(step)\\s+(\\w+(?:\\(\\w*\\))?)\\b",
365
+ "name": "meta.query.range.kusto"
366
+ },
367
+ {
368
+ "captures": {
369
+ "1": {
370
+ "name": "keyword.other.query.kusto"
371
+ },
372
+ "2": {
373
+ "patterns": [
374
+ {
375
+ "include": "#Numeric"
376
+ }
377
+ ]
378
+ }
379
+ },
380
+ "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/sampleoperator",
381
+ "match": "\\b(sample)(?:\\s+(\\d+))?(?![\\w-])",
382
+ "name": "meta.query.sample.kusto"
383
+ },
384
+ {
385
+ "captures": {
386
+ "1": {
387
+ "name": "keyword.other.query.kusto"
388
+ },
389
+ "2": {
390
+ "patterns": [
391
+ {
392
+ "include": "#Numeric"
393
+ }
394
+ ]
395
+ },
396
+ "3": {
397
+ "name": "keyword.other.operator.kusto"
398
+ },
399
+ "4": {
400
+ "name": "variable.other.column.kusto"
401
+ }
402
+ },
403
+ "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/sampledistinctoperator",
404
+ "match": "\\b(sample-distinct)(?:\\s+(\\d+)\\s+(of)\\s+(\\w+))?\\b",
405
+ "name": "meta.query.sample-distinct.kusto"
406
+ },
407
+ {
408
+ "captures": {
409
+ "1": {
410
+ "name": "keyword.other.query.kusto"
411
+ },
412
+ "2": {
413
+ "name": "keyword.other.operator.kusto"
414
+ }
415
+ },
416
+ "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/sortoperator",
417
+ "match": "\\b(sort)(?:\\s+(by))?\\b",
418
+ "name": "meta.query.sort.kusto"
419
+ },
420
+ {
421
+ "captures": {
422
+ "1": {
423
+ "name": "keyword.other.query.kusto"
424
+ },
425
+ "2": {
426
+ "patterns": [
427
+ {
428
+ "include": "#Numeric"
429
+ }
430
+ ]
431
+ }
432
+ },
433
+ "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/takeoperator",
434
+ "match": "\\b(take|limit)(?:\\s+(\\d+))\\b",
435
+ "name": "meta.query.take.kusto"
436
+ },
437
+ {
438
+ "captures": {
439
+ "1": {
440
+ "name": "keyword.other.query.kusto"
441
+ },
442
+ "2": {
443
+ "patterns": [
444
+ {
445
+ "include": "#Numeric"
446
+ }
447
+ ]
448
+ },
449
+ "3": {
450
+ "name": "keyword.other.operator.kusto"
451
+ },
452
+ "4": {
453
+ "name": "variable.other.column.kusto"
454
+ }
455
+ },
456
+ "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/topoperator",
457
+ "match": "\\b(top)(?:\\s+(\\d+)\\s+(by)\\s+(\\w+))?(?![\\w-])\\b",
458
+ "name": "meta.query.top.kusto"
459
+ },
460
+ {
461
+ "captures": {
462
+ "1": {
463
+ "name": "keyword.other.query.kusto"
464
+ },
465
+ "2": {
466
+ "patterns": [
467
+ {
468
+ "include": "#Numeric"
469
+ }
470
+ ]
471
+ },
472
+ "3": {
473
+ "name": "keyword.other.operator.kusto"
474
+ },
475
+ "4": {
476
+ "name": "variable.other.column.kusto"
477
+ },
478
+ "5": {
479
+ "name": "keyword.other.operator.kusto"
480
+ },
481
+ "6": {
482
+ "name": "variable.other.column.kusto"
483
+ }
484
+ },
485
+ "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/tophittersoperator",
486
+ "match": "\\b(top-hitters)(?:\\s+(\\d+)\\s+(of)\\s+(\\w+)(?:\\s+(by)\\s+(\\w+))?)?\\b",
487
+ "name": "meta.query.top-hitters.kusto"
488
+ },
489
+ {
490
+ "comment": "Tabular operators: https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/queries",
491
+ "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",
492
+ "name": "keyword.other.query.kusto"
493
+ },
494
+ {
495
+ "comment": "Tabular operators: evalute (plugins): https://docs.microsoft.com/en-us/azure/kusto/query/evaluateoperator",
496
+ "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",
497
+ "name": "support.function.kusto"
498
+ },
499
+ {
500
+ "comment": "Tabular operators: join: https://docs.microsoft.com/en-us/azure/kusto/query/joinoperator",
501
+ "match": "\\b(on|kind|hint\\.remote|hint\\.strategy)\\b",
502
+ "name": "keyword.other.operator.kusto"
503
+ },
504
+ {
505
+ "comment": "Tabular operators: join ($left, $right): https://docs.microsoft.com/en-us/azure/kusto/query/joinoperator",
506
+ "match": "(\\$left|\\$right)\\b",
507
+ "name": "keyword.other.kusto"
508
+ },
509
+ {
510
+ "comment": "Tabular operators: join (kinds, strategies): https://docs.microsoft.com/en-us/azure/kusto/query/joinoperator",
511
+ "match": "\\b(innerunique|inner|leftouter|rightouter|fullouter|leftanti|anti|leftantisemi|rightanti|rightantisemi|leftsemi|rightsemi|broadcast)\\b",
512
+ "name": "keyword.other.kusto"
513
+ },
514
+ {
515
+ "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/machine-learning-and-tsa",
516
+ "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",
517
+ "name": "support.function.kusto"
518
+ },
519
+ {
520
+ "comment": "Tabular operators: mv-expand (bagexpand options): https://docs.microsoft.com/en-us/azure/kusto/query/mvexpandoperator",
521
+ "match": "\\b(bag|array)\\b",
522
+ "name": "keyword.other.operator.kusto"
523
+ },
524
+ {
525
+ "comment": "Tabular operators: order: https://docs.microsoft.com/en-us/azure/kusto/query/orderoperator",
526
+ "match": "\\b(asc|desc|nulls first|nulls last)\\b",
527
+ "name": "keyword.other.kusto"
528
+ },
529
+ {
530
+ "comment": "Tabular operators: parse: https://docs.microsoft.com/en-us/azure/kusto/query/parseoperator",
531
+ "match": "\\b(regex|simple|relaxed)\\b",
532
+ "name": "keyword.other.kusto"
533
+ },
534
+ {
535
+ "match": "\\b(anomalychart|areachart|barchart|card|columnchart|ladderchart|linechart|piechart|pivotchart|scatterchart|stackedareachart|timechart|timepivot)\\b",
536
+ "name": "support.function.kusto"
537
+ },
538
+ {
539
+ "include": "#Strings"
540
+ },
541
+ {
542
+ "match": "\\{.*?\\}",
543
+ "name": "string.other.kusto"
544
+ },
545
+ {
546
+ "comment": "Comments",
547
+ "match": "//.*",
548
+ "name": "comment.line.kusto"
549
+ },
550
+ {
551
+ "include": "#TimeSpanLiterals"
552
+ },
553
+ {
554
+ "include": "#DateTimeTimeSpanFunctions"
555
+ },
556
+ {
557
+ "include": "#DateTimeTimeSpanDataTypes"
558
+ },
559
+ {
560
+ "include": "#Numeric"
561
+ },
562
+ {
563
+ "match": "\\b(true|false|null)\\b",
564
+ "name": "constant.language.kusto"
565
+ },
566
+ {
567
+ "comment": "Deprecated functions",
568
+ "match": "\\b(anyif|any|array_strcat|base64_decodestring|base64_encodestring|make_dictionary|makelist|makeset|mvexpand|todynamic|parse_json|replace|weekofyear)(?=\\W*\\(|\\b)",
569
+ "name": "invalid.deprecated.kusto"
570
+ }
571
+ ],
572
+ "repository": {
573
+ "DateTimeTimeSpanDataTypes": {
574
+ "patterns": [
575
+ {
576
+ "match": "\\b(datetime|timespan|time)\\b",
577
+ "name": "storage.type.kusto"
578
+ }
579
+ ]
580
+ },
581
+ "DateTimeTimeSpanFunctions": {
582
+ "patterns": [
583
+ {
584
+ "captures": {
585
+ "1": {
586
+ "name": "support.function.kusto"
587
+ },
588
+ "2": {
589
+ "patterns": [
590
+ {
591
+ "include": "#DateTimeTimeSpanDataTypes"
592
+ }
593
+ ]
594
+ },
595
+ "3": {
596
+ "patterns": [
597
+ {
598
+ "include": "#Strings"
599
+ }
600
+ ]
601
+ }
602
+ },
603
+ "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/format-datetimefunction",
604
+ "match": "\\b(format_datetime)(?:\\s*\\(\\s*(.+?)\\s*,\\s*(['\"].*?['\"])\\s*\\))?(?!\\w)",
605
+ "name": "meta.scalar.function.format_datetime.kusto"
606
+ },
607
+ {
608
+ "comment": "Scalar function: DateTime/Timespan Functions: https://docs.microsoft.com/en-us/azure/kusto/query/scalarfunctions#datetimetimespan-functions",
609
+ "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*\\()",
610
+ "name": "support.function.kusto"
611
+ }
612
+ ]
613
+ },
614
+ "Escapes": {
615
+ "patterns": [
616
+ {
617
+ "match": "\\\\['\"]",
618
+ "name": "constant.character.escape.kusto"
619
+ }
620
+ ]
621
+ },
622
+ "Numeric": {
623
+ "patterns": [
624
+ {
625
+ "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)",
626
+ "name": "constant.numeric.kusto"
627
+ }
628
+ ]
629
+ },
630
+ "Strings": {
631
+ "patterns": [
632
+ {
633
+ "begin": "([@h]?\")",
634
+ "beginCaptures": {
635
+ "1": {
636
+ "name": "punctuation.definition.string.kusto"
637
+ }
638
+ },
639
+ "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/scalar-data-types/string",
640
+ "end": "\"",
641
+ "endCaptures": {
642
+ "0": {
643
+ "name": "punctuation.definition.string.kusto"
644
+ }
645
+ },
646
+ "name": "string.quoted.double.kusto",
647
+ "patterns": [
648
+ {
649
+ "include": "#Escapes"
650
+ }
651
+ ]
652
+ },
653
+ {
654
+ "begin": "([@h]?')",
655
+ "beginCaptures": {
656
+ "1": {
657
+ "name": "punctuation.definition.string.kusto"
658
+ }
659
+ },
660
+ "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/scalar-data-types/string",
661
+ "end": "'",
662
+ "endCaptures": {
663
+ "0": {
664
+ "name": "punctuation.definition.string.kusto"
665
+ }
666
+ },
667
+ "name": "string.quoted.single.kusto",
668
+ "patterns": [
669
+ {
670
+ "include": "#Escapes"
671
+ }
672
+ ]
673
+ }
674
+ ]
675
+ },
676
+ "TimeSpanLiterals": {
677
+ "patterns": [
678
+ {
679
+ "comment": "timespan literals: https://docs.microsoft.com/en-us/azure/kusto/query/scalar-data-types/timespan#timespan-literals",
680
+ "match": "[+-]?(?:\\d*\\.)?\\d+(?:microseconds?|ticks?|seconds?|ms|d|h|m|s)\\b",
681
+ "name": "constant.numeric.kusto"
682
+ }
683
+ ]
684
+ }
685
+ },
686
+ "scopeName": "source.kusto"
687
+ }