@kusto/monaco-kusto 11.4.0 → 12.0.1
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.
- package/README.md +25 -1
- package/package.json +3 -1
- package/release/dev/kustoMode-d3f9e09a.js +1818 -0
- package/release/dev/kustoMode.js +4 -2040
- package/release/dev/kustoWorker.js +49 -90
- package/release/dev/{main-1587ba64.js → main-f36cb42f.js} +2 -2
- package/release/dev/monaco.contribution.js +254 -214
- package/release/dev/{schema-a5230652.js → schema-077630e6.js} +13 -2
- package/release/esm/extendedGlobalApi/getRangeHtml.d.ts +2 -0
- package/release/esm/extendedGlobalApi/getRangeHtml.js +11 -0
- package/release/esm/extendedGlobalApi/index.d.ts +1 -0
- package/release/esm/extendedGlobalApi/index.js +1 -0
- package/release/esm/globals.d.ts +1 -0
- package/release/esm/globals.js +1 -0
- package/release/esm/kusto.worker.js +39 -91
- package/release/esm/kustoMode-349f5467.js +957 -0
- package/release/esm/kustoMode.d.ts +4 -8
- package/release/esm/kustoMode.js +94 -104
- package/release/esm/kustoWorker.d.ts +2 -5
- package/release/esm/kustoWorker.js +2 -5
- package/release/esm/languageFeatures.d.ts +1 -14
- package/release/esm/languageFeatures.js +0 -299
- package/release/esm/languageServiceManager/kustoLanguageService.d.ts +2 -4
- package/release/esm/languageServiceManager/kustoLanguageService.js +58 -71
- package/release/esm/languageServiceManager/schema.d.ts +2 -2
- package/release/esm/languageServiceManager/settings.d.ts +0 -2
- package/release/esm/monaco.contribution.d.ts +1 -6
- package/release/esm/monaco.contribution.js +64 -88
- package/release/esm/{schema-c006895b.js → schema-b8f0ba9b.js} +12 -2
- package/release/esm/syntaxHighlighting/SemanticTokensProvider.d.ts +18 -0
- package/release/esm/syntaxHighlighting/SemanticTokensProvider.js +78 -0
- package/release/esm/syntaxHighlighting/kustoMonarchLanguageDefinition.d.ts +2 -0
- package/release/esm/syntaxHighlighting/kustoMonarchLanguageDefinition.js +401 -0
- package/release/esm/syntaxHighlighting/semanticTokensProviderRegistrar.d.ts +6 -0
- package/release/esm/syntaxHighlighting/semanticTokensProviderRegistrar.js +23 -0
- package/release/esm/syntaxHighlighting/themes.d.ts +11 -0
- package/release/esm/syntaxHighlighting/themes.js +103 -0
- package/release/esm/syntaxHighlighting/types.d.ts +41 -0
- package/release/esm/syntaxHighlighting/types.js +55 -0
- package/release/min/kustoMode-2dd4a01e.js +7 -0
- package/release/min/kustoMode.js +2 -2
- package/release/min/kustoWorker.js +4 -4
- package/release/min/{main-75aa3e71.js → main-86d6c837.js} +2 -2
- package/release/min/monaco.contribution.js +2 -2
- package/release/min/schema-a60c216c.js +7 -0
- package/release/esm/languageServiceManager/kustoMonarchLanguageDefinition.d.ts +0 -2
- package/release/esm/languageServiceManager/kustoMonarchLanguageDefinition.js +0 -211
- package/release/min/schema-192b3175.js +0 -7
|
@@ -0,0 +1,401 @@
|
|
|
1
|
+
import { LANGUAGE_ID } from '../globals';
|
|
2
|
+
import { Token } from './types';
|
|
3
|
+
var queryOperators = [
|
|
4
|
+
'as',
|
|
5
|
+
'consume',
|
|
6
|
+
'distinct',
|
|
7
|
+
'evaluate',
|
|
8
|
+
'extend',
|
|
9
|
+
'getschema',
|
|
10
|
+
'graph-match',
|
|
11
|
+
'graph-merge',
|
|
12
|
+
'graph-to-table',
|
|
13
|
+
'invoke',
|
|
14
|
+
'join',
|
|
15
|
+
'limit',
|
|
16
|
+
'lookup',
|
|
17
|
+
'make-graph',
|
|
18
|
+
'make-series',
|
|
19
|
+
'mv-apply',
|
|
20
|
+
'mv-expand',
|
|
21
|
+
'order',
|
|
22
|
+
'parse',
|
|
23
|
+
'parse-kv',
|
|
24
|
+
'parse-where',
|
|
25
|
+
'project',
|
|
26
|
+
'project-away',
|
|
27
|
+
'project-keep',
|
|
28
|
+
'project-rename',
|
|
29
|
+
'project-reorder',
|
|
30
|
+
'range',
|
|
31
|
+
'reduce',
|
|
32
|
+
'render',
|
|
33
|
+
'sample',
|
|
34
|
+
'sample-distinct',
|
|
35
|
+
'scan',
|
|
36
|
+
'serialize',
|
|
37
|
+
'sort',
|
|
38
|
+
'summarize',
|
|
39
|
+
'take',
|
|
40
|
+
'top',
|
|
41
|
+
'top-hitters',
|
|
42
|
+
'top-nested',
|
|
43
|
+
'union',
|
|
44
|
+
'where',
|
|
45
|
+
'filter',
|
|
46
|
+
'fork',
|
|
47
|
+
'facet',
|
|
48
|
+
'range',
|
|
49
|
+
'consume',
|
|
50
|
+
'find',
|
|
51
|
+
'search',
|
|
52
|
+
'print',
|
|
53
|
+
'partition',
|
|
54
|
+
'lookup',
|
|
55
|
+
];
|
|
56
|
+
var queryParameters = ['kind'];
|
|
57
|
+
var types = ['bool', 'datetime', 'decimal', 'double', 'dynamic', 'guid', 'int', 'long', 'real', 'string', 'timespan'];
|
|
58
|
+
var commands = [
|
|
59
|
+
'.add',
|
|
60
|
+
'.alter',
|
|
61
|
+
'.alter-merge',
|
|
62
|
+
'.append',
|
|
63
|
+
'.as',
|
|
64
|
+
'.assert',
|
|
65
|
+
'.attach',
|
|
66
|
+
'.consume',
|
|
67
|
+
'.count',
|
|
68
|
+
'.create',
|
|
69
|
+
'.create-merge',
|
|
70
|
+
'.create-or-alter',
|
|
71
|
+
'.create-set',
|
|
72
|
+
'.datatable',
|
|
73
|
+
'.default',
|
|
74
|
+
'.define',
|
|
75
|
+
'.delete',
|
|
76
|
+
'.detach',
|
|
77
|
+
'.distinct',
|
|
78
|
+
'.drop',
|
|
79
|
+
'.drop-pretend',
|
|
80
|
+
'.dup-next-failed-ingest',
|
|
81
|
+
'.dup-next-ingest',
|
|
82
|
+
'.evaluate',
|
|
83
|
+
'.export',
|
|
84
|
+
'.extend',
|
|
85
|
+
'.externaldata',
|
|
86
|
+
'.filter',
|
|
87
|
+
'.find',
|
|
88
|
+
'.fork',
|
|
89
|
+
'.getschema',
|
|
90
|
+
'.ingest',
|
|
91
|
+
'.join',
|
|
92
|
+
'.limit',
|
|
93
|
+
'.load',
|
|
94
|
+
'.make-series',
|
|
95
|
+
'.materialize',
|
|
96
|
+
'.move',
|
|
97
|
+
'.mv-expand',
|
|
98
|
+
'.order',
|
|
99
|
+
'.parse',
|
|
100
|
+
'.parse-where',
|
|
101
|
+
'.partition',
|
|
102
|
+
'.pivot',
|
|
103
|
+
'.print',
|
|
104
|
+
'.project',
|
|
105
|
+
'.project-away',
|
|
106
|
+
'.project-keep',
|
|
107
|
+
'.project-rename',
|
|
108
|
+
'.reduce',
|
|
109
|
+
'.remove',
|
|
110
|
+
'.rename',
|
|
111
|
+
'.replace',
|
|
112
|
+
'.restrict',
|
|
113
|
+
'.run',
|
|
114
|
+
'.sample',
|
|
115
|
+
'.sample-distinct',
|
|
116
|
+
'.save',
|
|
117
|
+
'.search',
|
|
118
|
+
'.serialize',
|
|
119
|
+
'.set',
|
|
120
|
+
'.set-or-append',
|
|
121
|
+
'.set-or-replace',
|
|
122
|
+
'.show',
|
|
123
|
+
'.sort',
|
|
124
|
+
'.summarize',
|
|
125
|
+
'.take',
|
|
126
|
+
'.top',
|
|
127
|
+
'.top-hitters',
|
|
128
|
+
'.top-nested',
|
|
129
|
+
'.union',
|
|
130
|
+
];
|
|
131
|
+
var functions = [
|
|
132
|
+
'abs',
|
|
133
|
+
'acos',
|
|
134
|
+
'ago',
|
|
135
|
+
'array_concat',
|
|
136
|
+
'array_length',
|
|
137
|
+
'array_slice',
|
|
138
|
+
'array_split',
|
|
139
|
+
'asin',
|
|
140
|
+
'atan',
|
|
141
|
+
'atan2',
|
|
142
|
+
'avg',
|
|
143
|
+
'bag_keys',
|
|
144
|
+
'base64_decodestring',
|
|
145
|
+
'base64_encodestring',
|
|
146
|
+
'bin',
|
|
147
|
+
'bin_at',
|
|
148
|
+
'binary_and',
|
|
149
|
+
'binary_not',
|
|
150
|
+
'binary_or',
|
|
151
|
+
'binary_shift_left',
|
|
152
|
+
'binary_shift_right',
|
|
153
|
+
'binary_xor',
|
|
154
|
+
'case',
|
|
155
|
+
'ceiling',
|
|
156
|
+
'coalesce',
|
|
157
|
+
'columnifexists',
|
|
158
|
+
'cos',
|
|
159
|
+
'count',
|
|
160
|
+
'countof',
|
|
161
|
+
'cot',
|
|
162
|
+
'cursor_after',
|
|
163
|
+
'datatable',
|
|
164
|
+
'datepart',
|
|
165
|
+
'datetime_add',
|
|
166
|
+
'datetime_diff',
|
|
167
|
+
'datetime_part',
|
|
168
|
+
'dayofmonth',
|
|
169
|
+
'dayofweek',
|
|
170
|
+
'dayofyear',
|
|
171
|
+
'dcount',
|
|
172
|
+
'dcount_hll',
|
|
173
|
+
'degrees',
|
|
174
|
+
'endofday',
|
|
175
|
+
'endofmonth',
|
|
176
|
+
'endofweek',
|
|
177
|
+
'endofyear',
|
|
178
|
+
'exp',
|
|
179
|
+
'exp10',
|
|
180
|
+
'exp2',
|
|
181
|
+
'extract',
|
|
182
|
+
'extractall',
|
|
183
|
+
'extractjson',
|
|
184
|
+
'format_datetime',
|
|
185
|
+
'format_timespan',
|
|
186
|
+
'floor',
|
|
187
|
+
'gamma',
|
|
188
|
+
'geo_distance_2points',
|
|
189
|
+
'geo_geohash_to_central_point',
|
|
190
|
+
'geo_point_in_circle',
|
|
191
|
+
'geo_point_in_polygon',
|
|
192
|
+
'geo_point_to_geohash',
|
|
193
|
+
'getmonth',
|
|
194
|
+
'gettype',
|
|
195
|
+
'getyear',
|
|
196
|
+
'hash',
|
|
197
|
+
'hash_sha256',
|
|
198
|
+
'hll_merge',
|
|
199
|
+
'iif',
|
|
200
|
+
'indexof',
|
|
201
|
+
'isempty',
|
|
202
|
+
'isfinite',
|
|
203
|
+
'isinf',
|
|
204
|
+
'isascii',
|
|
205
|
+
'isnan',
|
|
206
|
+
'isnotempty',
|
|
207
|
+
'isnotnull',
|
|
208
|
+
'isnull',
|
|
209
|
+
'isutf8',
|
|
210
|
+
'log',
|
|
211
|
+
'log10',
|
|
212
|
+
'log2',
|
|
213
|
+
'loggamma',
|
|
214
|
+
'make_datetime',
|
|
215
|
+
'make_string',
|
|
216
|
+
'make_timespan',
|
|
217
|
+
'materialize',
|
|
218
|
+
'max',
|
|
219
|
+
'max_of',
|
|
220
|
+
'min',
|
|
221
|
+
'min_of',
|
|
222
|
+
'monthofyear',
|
|
223
|
+
'next',
|
|
224
|
+
'not',
|
|
225
|
+
'pack',
|
|
226
|
+
'pack_array',
|
|
227
|
+
'pack_dictionary',
|
|
228
|
+
'parse_csv',
|
|
229
|
+
'parse_ipv4',
|
|
230
|
+
'parse_json',
|
|
231
|
+
'parse_path',
|
|
232
|
+
'parse_url',
|
|
233
|
+
'parse_urlquery',
|
|
234
|
+
'parse_user_agent',
|
|
235
|
+
'parse_version',
|
|
236
|
+
'parse_xml',
|
|
237
|
+
'parsejson',
|
|
238
|
+
'percentrank_tdigest',
|
|
239
|
+
'percentile_tdigest',
|
|
240
|
+
'pow',
|
|
241
|
+
'prev',
|
|
242
|
+
'radians',
|
|
243
|
+
'rand',
|
|
244
|
+
'rank_tdigest',
|
|
245
|
+
'repeat',
|
|
246
|
+
'replace',
|
|
247
|
+
'reverse',
|
|
248
|
+
'round',
|
|
249
|
+
'row_cumsum',
|
|
250
|
+
'row_window_session',
|
|
251
|
+
'series_add',
|
|
252
|
+
'series_decompose',
|
|
253
|
+
'series_decompose_anomalies',
|
|
254
|
+
'series_decompose_forecast',
|
|
255
|
+
'series_divide',
|
|
256
|
+
'series_equals',
|
|
257
|
+
'series_fill_backward',
|
|
258
|
+
'series_fill_const',
|
|
259
|
+
'series_fill_forward',
|
|
260
|
+
'series_fill_linear',
|
|
261
|
+
'series_fir',
|
|
262
|
+
'series_fit_2lines',
|
|
263
|
+
'series_fit_2lines_dynamic',
|
|
264
|
+
'series_fit_line',
|
|
265
|
+
'series_fit_line_dynamic',
|
|
266
|
+
'series_greater',
|
|
267
|
+
'series_greater_equals',
|
|
268
|
+
'series_iir',
|
|
269
|
+
'series_less',
|
|
270
|
+
'series_less_equals',
|
|
271
|
+
'series_multiply',
|
|
272
|
+
'series_not_equals',
|
|
273
|
+
'series_outliers',
|
|
274
|
+
'series_pearson_correlation',
|
|
275
|
+
'series_periods_detect',
|
|
276
|
+
'series_periods_validate',
|
|
277
|
+
'series_seasonal',
|
|
278
|
+
'series_stats',
|
|
279
|
+
'series_stats_dynamic',
|
|
280
|
+
'series_subtract',
|
|
281
|
+
'sign',
|
|
282
|
+
'sin',
|
|
283
|
+
'split',
|
|
284
|
+
'sqrt',
|
|
285
|
+
'startofday',
|
|
286
|
+
'startofmonth',
|
|
287
|
+
'startofweek',
|
|
288
|
+
'startofyear',
|
|
289
|
+
'strcat',
|
|
290
|
+
'strcat_array',
|
|
291
|
+
'strcat_delim',
|
|
292
|
+
'strcmp',
|
|
293
|
+
'strlen',
|
|
294
|
+
'strrep',
|
|
295
|
+
'string_size',
|
|
296
|
+
'substring',
|
|
297
|
+
'sum',
|
|
298
|
+
'tan',
|
|
299
|
+
'tdigest_merge',
|
|
300
|
+
'tobool',
|
|
301
|
+
'toboolean',
|
|
302
|
+
'todecimal',
|
|
303
|
+
'todouble',
|
|
304
|
+
'todynamic',
|
|
305
|
+
'tofloat',
|
|
306
|
+
'toguid',
|
|
307
|
+
'tohex',
|
|
308
|
+
'toint',
|
|
309
|
+
'tolong',
|
|
310
|
+
'tolower',
|
|
311
|
+
'toobject',
|
|
312
|
+
'toreal',
|
|
313
|
+
'toscalar',
|
|
314
|
+
'tostring',
|
|
315
|
+
'totimespan',
|
|
316
|
+
'toupper',
|
|
317
|
+
'translate',
|
|
318
|
+
'trim',
|
|
319
|
+
'trim_end',
|
|
320
|
+
'trim_start',
|
|
321
|
+
'typeof',
|
|
322
|
+
'url_decode',
|
|
323
|
+
'url_encode',
|
|
324
|
+
'week_of_year',
|
|
325
|
+
'welch_test',
|
|
326
|
+
];
|
|
327
|
+
var keywords = [
|
|
328
|
+
'and',
|
|
329
|
+
'as',
|
|
330
|
+
'asc',
|
|
331
|
+
'between',
|
|
332
|
+
'by',
|
|
333
|
+
'contains',
|
|
334
|
+
'count',
|
|
335
|
+
'desc',
|
|
336
|
+
'extend',
|
|
337
|
+
'false',
|
|
338
|
+
'filter',
|
|
339
|
+
'find',
|
|
340
|
+
'from',
|
|
341
|
+
'has',
|
|
342
|
+
'in',
|
|
343
|
+
'inner',
|
|
344
|
+
'join',
|
|
345
|
+
'leftouter',
|
|
346
|
+
'let',
|
|
347
|
+
'not',
|
|
348
|
+
'on',
|
|
349
|
+
'or',
|
|
350
|
+
'policy',
|
|
351
|
+
'project',
|
|
352
|
+
'project-away',
|
|
353
|
+
'project-rename',
|
|
354
|
+
'project-reorder',
|
|
355
|
+
'project-keep',
|
|
356
|
+
'range',
|
|
357
|
+
'rename',
|
|
358
|
+
'retention',
|
|
359
|
+
'summarize',
|
|
360
|
+
'table',
|
|
361
|
+
'take',
|
|
362
|
+
'to',
|
|
363
|
+
'true',
|
|
364
|
+
'where',
|
|
365
|
+
'with',
|
|
366
|
+
];
|
|
367
|
+
export var kustoLanguageDefinition = {
|
|
368
|
+
name: LANGUAGE_ID,
|
|
369
|
+
mimeTypes: ['text/kusto'],
|
|
370
|
+
displayName: 'Kusto',
|
|
371
|
+
defaultToken: 'invalid',
|
|
372
|
+
queryOperators: queryOperators,
|
|
373
|
+
queryParameters: queryParameters,
|
|
374
|
+
types: types,
|
|
375
|
+
commands: commands,
|
|
376
|
+
functions: functions,
|
|
377
|
+
keywords: keywords,
|
|
378
|
+
tokenizer: {
|
|
379
|
+
root: [
|
|
380
|
+
[/(\/\/.*$)/, Token.Comment],
|
|
381
|
+
[/[\(\)\{\}\|\[\]\:\=\,\<|\.\..]/, Token.Punctuation],
|
|
382
|
+
[/[\+\-\*\/\%\!\<\<=\>\>=\=\==\!=\<>\:\;\,\=~\@\?\=>\!~]/, Token.MathOperator],
|
|
383
|
+
[/"([^"\\]*(\\.[^"\\]*)*)"/, Token.StringLiteral],
|
|
384
|
+
[/'([^"\\]*(\\.[^"\\]*)*)'/, Token.StringLiteral],
|
|
385
|
+
[
|
|
386
|
+
/[\w@#\-$\.]+/,
|
|
387
|
+
{
|
|
388
|
+
cases: {
|
|
389
|
+
'@queryOperators': Token.QueryOperator,
|
|
390
|
+
'@queryParameters': Token.QueryParameter,
|
|
391
|
+
'@types': Token.Type,
|
|
392
|
+
'@commands': Token.Command,
|
|
393
|
+
'@functions': Token.Function,
|
|
394
|
+
'@keywords': Token.Keyword,
|
|
395
|
+
'@default': 'identifier',
|
|
396
|
+
},
|
|
397
|
+
},
|
|
398
|
+
],
|
|
399
|
+
],
|
|
400
|
+
},
|
|
401
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import monaco from 'monaco-editor/esm/vs/editor/editor.api';
|
|
2
|
+
import { SemanticTokensProvider } from './SemanticTokensProvider';
|
|
3
|
+
import { IKustoWorkerImpl } from '../kustoWorker';
|
|
4
|
+
export type SemanticTokensProviderRegistrar = (monacoInstance: typeof monaco, semanticTokensProvider: SemanticTokensProvider) => void;
|
|
5
|
+
export declare function semanticTokensProviderRegistrarCreator(): (monacoInstance: typeof monaco, worker: IKustoWorkerImpl) => void;
|
|
6
|
+
export declare function semanticTokensProviderRegistrarCreatorForTest(): (monacoInstance: typeof monaco, semanticTokensProvider: SemanticTokensProvider) => void;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { LANGUAGE_ID } from '../globals';
|
|
2
|
+
import { SemanticTokensProvider } from './SemanticTokensProvider';
|
|
3
|
+
// Registers semantic token provider that utilizes the language service
|
|
4
|
+
// for more context-relevant syntax highlighting.
|
|
5
|
+
export function semanticTokensProviderRegistrarCreator() {
|
|
6
|
+
var semanticTokensProviderRegistrar = semanticTokensProviderRegistrarCreatorForTest();
|
|
7
|
+
return function (monacoInstance, worker) {
|
|
8
|
+
var semanticTokensProvider = semanticTokensProviderMaker(worker);
|
|
9
|
+
semanticTokensProviderRegistrar(monacoInstance, semanticTokensProvider);
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export function semanticTokensProviderRegistrarCreatorForTest() {
|
|
13
|
+
var semanticTokensDisposable;
|
|
14
|
+
return function (monacoInstance, semanticTokensProvider) {
|
|
15
|
+
if (semanticTokensDisposable) {
|
|
16
|
+
semanticTokensDisposable.dispose();
|
|
17
|
+
}
|
|
18
|
+
semanticTokensDisposable = monacoInstance.languages.registerDocumentSemanticTokensProvider(LANGUAGE_ID, semanticTokensProvider);
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
function semanticTokensProviderMaker(worker) {
|
|
22
|
+
return new SemanticTokensProvider(worker.getClassifications);
|
|
23
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api';
|
|
2
|
+
export declare enum ThemeName {
|
|
3
|
+
light = "kusto-light",
|
|
4
|
+
dark = "kusto-dark"
|
|
5
|
+
}
|
|
6
|
+
interface Theme {
|
|
7
|
+
name: ThemeName;
|
|
8
|
+
data: monaco.editor.IStandaloneThemeData;
|
|
9
|
+
}
|
|
10
|
+
export declare const themes: Theme[];
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { Token } from './types';
|
|
2
|
+
export var ThemeName;
|
|
3
|
+
(function (ThemeName) {
|
|
4
|
+
ThemeName["light"] = "kusto-light";
|
|
5
|
+
ThemeName["dark"] = "kusto-dark";
|
|
6
|
+
})(ThemeName || (ThemeName = {}));
|
|
7
|
+
var colors = {
|
|
8
|
+
white: '#DCDCDC',
|
|
9
|
+
lightGoldenrodYellow: '#FAFAD2',
|
|
10
|
+
softGold: '#D7BA7D',
|
|
11
|
+
paleChestnut: '#D69D85',
|
|
12
|
+
paleVioletRed: '#DB7093',
|
|
13
|
+
firebrick: '#B22222',
|
|
14
|
+
orangeRed: '#FF4500',
|
|
15
|
+
mediumVioletRed: '#C71585',
|
|
16
|
+
magenta: '#FF00FF', // for debugging
|
|
17
|
+
darkOrchid: '#9932CC',
|
|
18
|
+
darkViolet: '#9400D3',
|
|
19
|
+
midnightBlue: '#191970',
|
|
20
|
+
blue: '#0000FF',
|
|
21
|
+
blueSapphire: '#004E8C',
|
|
22
|
+
tealBlue: '#2B91AF',
|
|
23
|
+
skyBlue: '#569CD6',
|
|
24
|
+
lightSkyBlue: '#92CAF4',
|
|
25
|
+
mediumTurquoise: '#4EC9B0',
|
|
26
|
+
oliveDrab: '#608B4E',
|
|
27
|
+
green: '#008000',
|
|
28
|
+
jetBlack: '#1B1A19',
|
|
29
|
+
black: '#000000',
|
|
30
|
+
};
|
|
31
|
+
var light = {
|
|
32
|
+
base: 'vs',
|
|
33
|
+
inherit: true,
|
|
34
|
+
rules: [
|
|
35
|
+
{ token: '', foreground: colors.black },
|
|
36
|
+
{ token: Token.PlainText, foreground: colors.black },
|
|
37
|
+
{ token: Token.Comment, foreground: colors.green },
|
|
38
|
+
{ token: Token.Punctuation, foreground: colors.black },
|
|
39
|
+
{ token: Token.Directive, foreground: colors.darkViolet },
|
|
40
|
+
{ token: Token.Literal, foreground: colors.black },
|
|
41
|
+
{ token: Token.StringLiteral, foreground: colors.firebrick },
|
|
42
|
+
{ token: Token.Type, foreground: colors.blue },
|
|
43
|
+
{ token: Token.Column, foreground: colors.mediumVioletRed },
|
|
44
|
+
{ token: Token.Table, foreground: colors.darkOrchid },
|
|
45
|
+
{ token: Token.Database, foreground: colors.darkOrchid },
|
|
46
|
+
{ token: Token.Function, foreground: colors.blue },
|
|
47
|
+
{ token: Token.Parameter, foreground: colors.midnightBlue },
|
|
48
|
+
{ token: Token.Variable, foreground: colors.midnightBlue },
|
|
49
|
+
{ token: Token.Identifier, foreground: colors.black },
|
|
50
|
+
{ token: Token.ClientParameter, foreground: colors.tealBlue },
|
|
51
|
+
{ token: Token.QueryParameter, foreground: colors.tealBlue },
|
|
52
|
+
{ token: Token.ScalarParameter, foreground: colors.blue },
|
|
53
|
+
{ token: Token.MathOperator, foreground: colors.black },
|
|
54
|
+
{ token: Token.QueryOperator, foreground: colors.orangeRed },
|
|
55
|
+
{ token: Token.Command, foreground: colors.blue },
|
|
56
|
+
{ token: Token.Keyword, foreground: colors.blue },
|
|
57
|
+
{ token: Token.MaterializedView, foreground: colors.darkOrchid },
|
|
58
|
+
{ token: Token.SchemaMember, foreground: colors.black },
|
|
59
|
+
{ token: Token.SignatureParameter, foreground: colors.black },
|
|
60
|
+
{ token: Token.Option, foreground: colors.black },
|
|
61
|
+
],
|
|
62
|
+
colors: {},
|
|
63
|
+
};
|
|
64
|
+
var dark = {
|
|
65
|
+
base: 'vs-dark',
|
|
66
|
+
inherit: true,
|
|
67
|
+
rules: [
|
|
68
|
+
{ token: '', foreground: colors.white },
|
|
69
|
+
{ token: Token.PlainText, foreground: colors.white },
|
|
70
|
+
{ token: Token.Comment, foreground: colors.oliveDrab },
|
|
71
|
+
{ token: Token.Punctuation, foreground: colors.white },
|
|
72
|
+
{ token: Token.Directive, foreground: colors.lightGoldenrodYellow },
|
|
73
|
+
{ token: Token.Literal, foreground: colors.white },
|
|
74
|
+
{ token: Token.StringLiteral, foreground: colors.paleChestnut },
|
|
75
|
+
{ token: Token.Type, foreground: colors.skyBlue },
|
|
76
|
+
{ token: Token.Column, foreground: colors.paleVioletRed },
|
|
77
|
+
{ token: Token.Table, foreground: colors.softGold },
|
|
78
|
+
{ token: Token.Database, foreground: colors.softGold },
|
|
79
|
+
{ token: Token.Function, foreground: colors.skyBlue },
|
|
80
|
+
{ token: Token.Parameter, foreground: colors.lightSkyBlue },
|
|
81
|
+
{ token: Token.Variable, foreground: colors.lightSkyBlue },
|
|
82
|
+
{ token: Token.Identifier, foreground: colors.white },
|
|
83
|
+
{ token: Token.ClientParameter, foreground: colors.tealBlue },
|
|
84
|
+
{ token: Token.QueryParameter, foreground: colors.tealBlue },
|
|
85
|
+
{ token: Token.ScalarParameter, foreground: colors.skyBlue },
|
|
86
|
+
{ token: Token.MathOperator, foreground: colors.white },
|
|
87
|
+
{ token: Token.QueryOperator, foreground: colors.mediumTurquoise },
|
|
88
|
+
{ token: Token.Command, foreground: colors.skyBlue },
|
|
89
|
+
{ token: Token.Keyword, foreground: colors.skyBlue },
|
|
90
|
+
{ token: Token.MaterializedView, foreground: colors.softGold },
|
|
91
|
+
{ token: Token.SchemaMember, foreground: colors.black },
|
|
92
|
+
{ token: Token.SignatureParameter, foreground: colors.black },
|
|
93
|
+
{ token: Token.Option, foreground: colors.black },
|
|
94
|
+
],
|
|
95
|
+
colors: {
|
|
96
|
+
'editor.background': colors.jetBlack,
|
|
97
|
+
'editorSuggestWidget.selectedBackground': colors.blueSapphire,
|
|
98
|
+
},
|
|
99
|
+
};
|
|
100
|
+
export var themes = [
|
|
101
|
+
{ name: ThemeName.light, data: light },
|
|
102
|
+
{ name: ThemeName.dark, data: dark },
|
|
103
|
+
];
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/// <reference types="@kusto/language-service-next/Kusto.Language.Bridge" />
|
|
2
|
+
export type ClassificationKind = Kusto.Language.Editor.ClassificationKind;
|
|
3
|
+
export declare enum Token {
|
|
4
|
+
PlainText = "plainText",
|
|
5
|
+
Comment = "comment",
|
|
6
|
+
Punctuation = "punctuation",
|
|
7
|
+
Directive = "directive",
|
|
8
|
+
Literal = "literal",
|
|
9
|
+
StringLiteral = "stringLiteral",
|
|
10
|
+
Type = "type",
|
|
11
|
+
Column = "column",
|
|
12
|
+
Table = "table",
|
|
13
|
+
Database = "database",
|
|
14
|
+
Function = "function",
|
|
15
|
+
Parameter = "parameter",
|
|
16
|
+
Variable = "variable",
|
|
17
|
+
Identifier = "identifier",
|
|
18
|
+
ClientParameter = "clientParameter",
|
|
19
|
+
QueryParameter = "queryParameter",
|
|
20
|
+
ScalarParameter = "scalarParameter",
|
|
21
|
+
MathOperator = "mathOperator",
|
|
22
|
+
QueryOperator = "queryOperator",
|
|
23
|
+
Command = "command",
|
|
24
|
+
Keyword = "keyword",
|
|
25
|
+
MaterializedView = "materializedView",
|
|
26
|
+
SchemaMember = "schemaMember",
|
|
27
|
+
SignatureParameter = "signatureParameter",
|
|
28
|
+
Option = "option"
|
|
29
|
+
}
|
|
30
|
+
export declare const tokenTypes: Token[];
|
|
31
|
+
export interface ClassificationRange {
|
|
32
|
+
line: number;
|
|
33
|
+
character: number;
|
|
34
|
+
length: number;
|
|
35
|
+
kind: ClassificationKind;
|
|
36
|
+
}
|
|
37
|
+
type DeltaLine = number;
|
|
38
|
+
type DeltaStart = number;
|
|
39
|
+
type Length = number;
|
|
40
|
+
export type DocumentSemanticToken = [DeltaLine, DeltaStart, Length, Kusto.Language.Editor.ClassificationKind, 0];
|
|
41
|
+
export {};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export var Token;
|
|
2
|
+
(function (Token) {
|
|
3
|
+
Token["PlainText"] = "plainText";
|
|
4
|
+
Token["Comment"] = "comment";
|
|
5
|
+
Token["Punctuation"] = "punctuation";
|
|
6
|
+
Token["Directive"] = "directive";
|
|
7
|
+
Token["Literal"] = "literal";
|
|
8
|
+
Token["StringLiteral"] = "stringLiteral";
|
|
9
|
+
Token["Type"] = "type";
|
|
10
|
+
Token["Column"] = "column";
|
|
11
|
+
Token["Table"] = "table";
|
|
12
|
+
Token["Database"] = "database";
|
|
13
|
+
Token["Function"] = "function";
|
|
14
|
+
Token["Parameter"] = "parameter";
|
|
15
|
+
Token["Variable"] = "variable";
|
|
16
|
+
Token["Identifier"] = "identifier";
|
|
17
|
+
Token["ClientParameter"] = "clientParameter";
|
|
18
|
+
Token["QueryParameter"] = "queryParameter";
|
|
19
|
+
Token["ScalarParameter"] = "scalarParameter";
|
|
20
|
+
Token["MathOperator"] = "mathOperator";
|
|
21
|
+
Token["QueryOperator"] = "queryOperator";
|
|
22
|
+
Token["Command"] = "command";
|
|
23
|
+
Token["Keyword"] = "keyword";
|
|
24
|
+
Token["MaterializedView"] = "materializedView";
|
|
25
|
+
Token["SchemaMember"] = "schemaMember";
|
|
26
|
+
Token["SignatureParameter"] = "signatureParameter";
|
|
27
|
+
Token["Option"] = "option";
|
|
28
|
+
})(Token || (Token = {}));
|
|
29
|
+
export var tokenTypes = [
|
|
30
|
+
Token.PlainText,
|
|
31
|
+
Token.Comment,
|
|
32
|
+
Token.Punctuation,
|
|
33
|
+
Token.Directive,
|
|
34
|
+
Token.Literal,
|
|
35
|
+
Token.StringLiteral,
|
|
36
|
+
Token.Type,
|
|
37
|
+
Token.Column,
|
|
38
|
+
Token.Table,
|
|
39
|
+
Token.Database,
|
|
40
|
+
Token.Function,
|
|
41
|
+
Token.Parameter,
|
|
42
|
+
Token.Variable,
|
|
43
|
+
Token.Identifier,
|
|
44
|
+
Token.ClientParameter,
|
|
45
|
+
Token.QueryParameter,
|
|
46
|
+
Token.ScalarParameter,
|
|
47
|
+
Token.MathOperator,
|
|
48
|
+
Token.QueryOperator,
|
|
49
|
+
Token.Command,
|
|
50
|
+
Token.Keyword,
|
|
51
|
+
Token.MaterializedView,
|
|
52
|
+
Token.SchemaMember,
|
|
53
|
+
Token.SignatureParameter,
|
|
54
|
+
Token.Option,
|
|
55
|
+
];
|