@kusto/monaco-kusto 4.1.8 → 5.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.
- package/package.json +6 -6
- package/release/dev/kustoMode.js +1954 -1570
- package/release/dev/kustoWorker.js +1936 -1552
- package/release/dev/monaco.contribution.js +16 -16
- package/release/esm/_deps/vscode-languageserver-types/main.js +1908 -1527
- package/release/esm/commandFormatter.js +5 -3
- package/release/esm/commandHighlighter.js +9 -5
- package/release/esm/languageFeatures.js +33 -31
- package/release/esm/languageService/kustoLanguageService.js +15 -13
- package/release/esm/monaco.contribution.js +2 -8
- package/release/min/kustoMode.js +3 -3
- package/release/min/kustoWorker.js +6 -6
- package/release/min/monaco.contribution.js +2 -2
|
@@ -17,7 +17,7 @@ define('vs/language/kusto/commandHighlighter',["require", "exports"], function (
|
|
|
17
17
|
// Note that selection update is triggered not only for selection changes, but also just when no text selection is occuring and cursor just moves around.
|
|
18
18
|
// This case is counted as a 0-length selection starting and ending on the cursor position.
|
|
19
19
|
this.editor.onDidChangeCursorSelection(function (changeEvent) {
|
|
20
|
-
if (_this.editor.getModel().
|
|
20
|
+
if (_this.editor.getModel().getLanguageId() !== 'kusto') {
|
|
21
21
|
return;
|
|
22
22
|
}
|
|
23
23
|
_this.highlightCommandUnderCursor(changeEvent);
|
|
@@ -37,14 +37,18 @@ define('vs/language/kusto/commandHighlighter',["require", "exports"], function (
|
|
|
37
37
|
return;
|
|
38
38
|
}
|
|
39
39
|
var commandRange = this.editor.getCurrentCommandRange(changeEvent.selection.getStartPosition());
|
|
40
|
-
var decorations = [
|
|
40
|
+
var decorations = [
|
|
41
|
+
{
|
|
41
42
|
range: commandRange,
|
|
42
|
-
options: KustoCommandHighlighter.CURRENT_COMMAND_HIGHLIGHT
|
|
43
|
-
}
|
|
43
|
+
options: KustoCommandHighlighter.CURRENT_COMMAND_HIGHLIGHT,
|
|
44
|
+
},
|
|
45
|
+
];
|
|
44
46
|
this.decorations = this.editor.deltaDecorations(this.decorations, decorations);
|
|
45
47
|
};
|
|
46
48
|
KustoCommandHighlighter.ID = 'editor.contrib.kustoCommandHighliter';
|
|
47
|
-
KustoCommandHighlighter.CURRENT_COMMAND_HIGHLIGHT = {
|
|
49
|
+
KustoCommandHighlighter.CURRENT_COMMAND_HIGHLIGHT = {
|
|
50
|
+
className: 'selectionHighlight',
|
|
51
|
+
};
|
|
48
52
|
return KustoCommandHighlighter;
|
|
49
53
|
}());
|
|
50
54
|
exports.default = KustoCommandHighlighter;
|
|
@@ -61,7 +65,7 @@ define('vs/language/kusto/commandFormatter',["require", "exports"], function (re
|
|
|
61
65
|
// selection also represents no selection - for example the event gets triggered when moving cursor from point
|
|
62
66
|
// a to point b. in the case start position will equal end position.
|
|
63
67
|
editor.onDidChangeCursorSelection(function (changeEvent) {
|
|
64
|
-
if (_this.editor.getModel().
|
|
68
|
+
if (_this.editor.getModel().getLanguageId() !== 'kusto') {
|
|
65
69
|
return;
|
|
66
70
|
}
|
|
67
71
|
// Theoretically you would expect this code to run only once in onDidCreateEditor.
|
|
@@ -74,11 +78,13 @@ define('vs/language/kusto/commandFormatter',["require", "exports"], function (re
|
|
|
74
78
|
editor.addAction({
|
|
75
79
|
id: 'editor.action.kusto.formatCurrentCommand',
|
|
76
80
|
label: 'Format Command Under Cursor',
|
|
77
|
-
keybindings: [
|
|
81
|
+
keybindings: [
|
|
82
|
+
monaco.KeyMod.chord(monaco.KeyMod.CtrlCmd | monaco.KeyCode.KeyK, monaco.KeyMod.CtrlCmd | monaco.KeyCode.KeyF),
|
|
83
|
+
],
|
|
78
84
|
run: function (ed) {
|
|
79
85
|
editor.trigger('KustoCommandFormatter', 'editor.action.formatSelection', null);
|
|
80
86
|
},
|
|
81
|
-
contextMenuGroupId: '1_modification'
|
|
87
|
+
contextMenuGroupId: '1_modification',
|
|
82
88
|
});
|
|
83
89
|
_this.actionAdded = true;
|
|
84
90
|
}
|
|
@@ -248,11 +254,7 @@ define('vs/language/kusto/monaco.contribution',["require", "exports", "./command
|
|
|
248
254
|
{ token: 'annotation', foreground: '9400D3' },
|
|
249
255
|
{ token: 'invalid', background: 'cd3131' },
|
|
250
256
|
],
|
|
251
|
-
colors: {
|
|
252
|
-
// see: https://code.visualstudio.com/api/references/theme-color#editor-widget-colors
|
|
253
|
-
'editorSuggestWidget.selectedBackground': '#93CFFB',
|
|
254
|
-
'editorSuggestWidget.background': '#FAF9F8',
|
|
255
|
-
},
|
|
257
|
+
colors: {},
|
|
256
258
|
});
|
|
257
259
|
monacoInstance.editor.defineTheme('kusto-dark', {
|
|
258
260
|
base: 'vs-dark',
|
|
@@ -276,9 +278,7 @@ define('vs/language/kusto/monaco.contribution',["require", "exports", "./command
|
|
|
276
278
|
{ token: 'invalid', background: 'cd3131' },
|
|
277
279
|
],
|
|
278
280
|
colors: {
|
|
279
|
-
|
|
280
|
-
'editor.background': '#1B1A19',
|
|
281
|
-
'editorSuggestWidget.selectedBackground': '#004E8C',
|
|
281
|
+
// see: https://code.visualstudio.com/api/references/theme-color#editor-widget-colors
|
|
282
282
|
},
|
|
283
283
|
});
|
|
284
284
|
monacoInstance.editor.defineTheme('kusto-dark2', {
|