@ng-util/monaco-editor 12.1.2 → 14.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/README.md +1 -0
- package/esm2020/monaco-editor-base.component.mjs +153 -0
- package/esm2020/monaco-editor-diff.component.mjs +48 -0
- package/esm2020/monaco-editor.component.mjs +103 -0
- package/{esm2015/monaco-editor.config.js → esm2020/monaco-editor.config.mjs} +0 -0
- package/esm2020/monaco-editor.module.mjs +26 -0
- package/{esm2015/monaco-editor.types.js → esm2020/monaco-editor.types.mjs} +0 -0
- package/esm2020/ng-util-monaco-editor.mjs +5 -0
- package/{esm2015/public-api.js → esm2020/public-api.mjs} +0 -0
- package/fesm2015/{ng-util-monaco-editor.js → ng-util-monaco-editor.mjs} +103 -87
- package/fesm2015/ng-util-monaco-editor.mjs.map +1 -0
- package/fesm2020/ng-util-monaco-editor.mjs +328 -0
- package/fesm2020/ng-util-monaco-editor.mjs.map +1 -0
- package/{ng-util-monaco-editor.d.ts → index.d.ts} +1 -1
- package/monaco-editor-base.component.d.ts +5 -2
- package/monaco-editor-diff.component.d.ts +5 -2
- package/monaco-editor.component.d.ts +5 -1
- package/monaco-editor.module.d.ts +7 -0
- package/monaco.d.ts +1603 -997
- package/package.json +23 -10
- package/bundles/ng-util-monaco-editor.umd.js +0 -676
- package/bundles/ng-util-monaco-editor.umd.js.map +0 -1
- package/esm2015/monaco-editor-base.component.js +0 -155
- package/esm2015/monaco-editor-diff.component.js +0 -45
- package/esm2015/monaco-editor.component.js +0 -88
- package/esm2015/monaco-editor.module.js +0 -24
- package/esm2015/ng-util-monaco-editor.js +0 -6
- package/fesm2015/ng-util-monaco-editor.js.map +0 -1
- package/ng-util-monaco-editor.metadata.json +0 -1
package/monaco.d.ts
CHANGED
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
|
|
11
11
|
declare let MonacoEnvironment: monaco.Environment | undefined;
|
|
12
12
|
|
|
13
|
+
interface Window {
|
|
14
|
+
MonacoEnvironment?: monaco.Environment | undefined;
|
|
15
|
+
}
|
|
16
|
+
|
|
13
17
|
declare namespace monaco {
|
|
14
18
|
|
|
15
19
|
export type Thenable<T> = PromiseLike<T>;
|
|
@@ -17,7 +21,7 @@ declare namespace monaco {
|
|
|
17
21
|
export interface Environment {
|
|
18
22
|
globalAPI?: boolean;
|
|
19
23
|
baseUrl?: string;
|
|
20
|
-
getWorker?(workerId: string, label: string): Worker;
|
|
24
|
+
getWorker?(workerId: string, label: string): Promise<Worker> | Worker;
|
|
21
25
|
getWorkerUrl?(workerId: string, label: string): string;
|
|
22
26
|
}
|
|
23
27
|
|
|
@@ -93,25 +97,25 @@ declare namespace monaco {
|
|
|
93
97
|
export class Uri implements UriComponents {
|
|
94
98
|
static isUri(thing: any): thing is Uri;
|
|
95
99
|
/**
|
|
96
|
-
* scheme is the 'http' part of 'http://www.
|
|
100
|
+
* scheme is the 'http' part of 'http://www.example.com/some/path?query#fragment'.
|
|
97
101
|
* The part before the first colon.
|
|
98
102
|
*/
|
|
99
103
|
readonly scheme: string;
|
|
100
104
|
/**
|
|
101
|
-
* authority is the 'www.
|
|
105
|
+
* authority is the 'www.example.com' part of 'http://www.example.com/some/path?query#fragment'.
|
|
102
106
|
* The part between the first double slashes and the next slash.
|
|
103
107
|
*/
|
|
104
108
|
readonly authority: string;
|
|
105
109
|
/**
|
|
106
|
-
* path is the '/some/path' part of 'http://www.
|
|
110
|
+
* path is the '/some/path' part of 'http://www.example.com/some/path?query#fragment'.
|
|
107
111
|
*/
|
|
108
112
|
readonly path: string;
|
|
109
113
|
/**
|
|
110
|
-
* query is the 'query' part of 'http://www.
|
|
114
|
+
* query is the 'query' part of 'http://www.example.com/some/path?query#fragment'.
|
|
111
115
|
*/
|
|
112
116
|
readonly query: string;
|
|
113
117
|
/**
|
|
114
|
-
* fragment is the 'fragment' part of 'http://www.
|
|
118
|
+
* fragment is the 'fragment' part of 'http://www.example.com/some/path?query#fragment'.
|
|
115
119
|
*/
|
|
116
120
|
readonly fragment: string;
|
|
117
121
|
/**
|
|
@@ -147,7 +151,7 @@ declare namespace monaco {
|
|
|
147
151
|
fragment?: string | null;
|
|
148
152
|
}): Uri;
|
|
149
153
|
/**
|
|
150
|
-
* Creates a new Uri from a string, e.g. `http://www.
|
|
154
|
+
* Creates a new Uri from a string, e.g. `http://www.example.com/some/path`,
|
|
151
155
|
* `file:///usr/home`, or `scheme:with/path`.
|
|
152
156
|
*
|
|
153
157
|
* @param value A string which represents an Uri (see `Uri#toString`).
|
|
@@ -216,7 +220,6 @@ declare namespace monaco {
|
|
|
216
220
|
query: string;
|
|
217
221
|
fragment: string;
|
|
218
222
|
}
|
|
219
|
-
|
|
220
223
|
/**
|
|
221
224
|
* Virtual Key Codes, the value does not hold any inherent meaning.
|
|
222
225
|
* Inspired somewhat from https://msdn.microsoft.com/en-us/library/windows/desktop/dd375731(v=vs.85).aspx
|
|
@@ -248,42 +251,42 @@ declare namespace monaco {
|
|
|
248
251
|
DownArrow = 18,
|
|
249
252
|
Insert = 19,
|
|
250
253
|
Delete = 20,
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
254
|
+
Digit0 = 21,
|
|
255
|
+
Digit1 = 22,
|
|
256
|
+
Digit2 = 23,
|
|
257
|
+
Digit3 = 24,
|
|
258
|
+
Digit4 = 25,
|
|
259
|
+
Digit5 = 26,
|
|
260
|
+
Digit6 = 27,
|
|
261
|
+
Digit7 = 28,
|
|
262
|
+
Digit8 = 29,
|
|
263
|
+
Digit9 = 30,
|
|
264
|
+
KeyA = 31,
|
|
265
|
+
KeyB = 32,
|
|
266
|
+
KeyC = 33,
|
|
267
|
+
KeyD = 34,
|
|
268
|
+
KeyE = 35,
|
|
269
|
+
KeyF = 36,
|
|
270
|
+
KeyG = 37,
|
|
271
|
+
KeyH = 38,
|
|
272
|
+
KeyI = 39,
|
|
273
|
+
KeyJ = 40,
|
|
274
|
+
KeyK = 41,
|
|
275
|
+
KeyL = 42,
|
|
276
|
+
KeyM = 43,
|
|
277
|
+
KeyN = 44,
|
|
278
|
+
KeyO = 45,
|
|
279
|
+
KeyP = 46,
|
|
280
|
+
KeyQ = 47,
|
|
281
|
+
KeyR = 48,
|
|
282
|
+
KeyS = 49,
|
|
283
|
+
KeyT = 50,
|
|
284
|
+
KeyU = 51,
|
|
285
|
+
KeyV = 52,
|
|
286
|
+
KeyW = 53,
|
|
287
|
+
KeyX = 54,
|
|
288
|
+
KeyY = 55,
|
|
289
|
+
KeyZ = 56,
|
|
287
290
|
Meta = 57,
|
|
288
291
|
ContextMenu = 58,
|
|
289
292
|
F1 = 59,
|
|
@@ -311,57 +314,57 @@ declare namespace monaco {
|
|
|
311
314
|
* Used for miscellaneous characters; it can vary by keyboard.
|
|
312
315
|
* For the US standard keyboard, the ';:' key
|
|
313
316
|
*/
|
|
314
|
-
|
|
317
|
+
Semicolon = 80,
|
|
315
318
|
/**
|
|
316
319
|
* For any country/region, the '+' key
|
|
317
320
|
* For the US standard keyboard, the '=+' key
|
|
318
321
|
*/
|
|
319
|
-
|
|
322
|
+
Equal = 81,
|
|
320
323
|
/**
|
|
321
324
|
* For any country/region, the ',' key
|
|
322
325
|
* For the US standard keyboard, the ',<' key
|
|
323
326
|
*/
|
|
324
|
-
|
|
327
|
+
Comma = 82,
|
|
325
328
|
/**
|
|
326
329
|
* For any country/region, the '-' key
|
|
327
330
|
* For the US standard keyboard, the '-_' key
|
|
328
331
|
*/
|
|
329
|
-
|
|
332
|
+
Minus = 83,
|
|
330
333
|
/**
|
|
331
334
|
* For any country/region, the '.' key
|
|
332
335
|
* For the US standard keyboard, the '.>' key
|
|
333
336
|
*/
|
|
334
|
-
|
|
337
|
+
Period = 84,
|
|
335
338
|
/**
|
|
336
339
|
* Used for miscellaneous characters; it can vary by keyboard.
|
|
337
340
|
* For the US standard keyboard, the '/?' key
|
|
338
341
|
*/
|
|
339
|
-
|
|
342
|
+
Slash = 85,
|
|
340
343
|
/**
|
|
341
344
|
* Used for miscellaneous characters; it can vary by keyboard.
|
|
342
345
|
* For the US standard keyboard, the '`~' key
|
|
343
346
|
*/
|
|
344
|
-
|
|
347
|
+
Backquote = 86,
|
|
345
348
|
/**
|
|
346
349
|
* Used for miscellaneous characters; it can vary by keyboard.
|
|
347
350
|
* For the US standard keyboard, the '[{' key
|
|
348
351
|
*/
|
|
349
|
-
|
|
352
|
+
BracketLeft = 87,
|
|
350
353
|
/**
|
|
351
354
|
* Used for miscellaneous characters; it can vary by keyboard.
|
|
352
355
|
* For the US standard keyboard, the '\|' key
|
|
353
356
|
*/
|
|
354
|
-
|
|
357
|
+
Backslash = 88,
|
|
355
358
|
/**
|
|
356
359
|
* Used for miscellaneous characters; it can vary by keyboard.
|
|
357
360
|
* For the US standard keyboard, the ']}' key
|
|
358
361
|
*/
|
|
359
|
-
|
|
362
|
+
BracketRight = 89,
|
|
360
363
|
/**
|
|
361
364
|
* Used for miscellaneous characters; it can vary by keyboard.
|
|
362
365
|
* For the US standard keyboard, the ''"' key
|
|
363
366
|
*/
|
|
364
|
-
|
|
367
|
+
Quote = 90,
|
|
365
368
|
/**
|
|
366
369
|
* Used for miscellaneous characters; it can vary by keyboard.
|
|
367
370
|
*/
|
|
@@ -369,34 +372,52 @@ declare namespace monaco {
|
|
|
369
372
|
/**
|
|
370
373
|
* Either the angle bracket key or the backslash key on the RT 102-key keyboard.
|
|
371
374
|
*/
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
375
|
+
IntlBackslash = 92,
|
|
376
|
+
Numpad0 = 93,
|
|
377
|
+
Numpad1 = 94,
|
|
378
|
+
Numpad2 = 95,
|
|
379
|
+
Numpad3 = 96,
|
|
380
|
+
Numpad4 = 97,
|
|
381
|
+
Numpad5 = 98,
|
|
382
|
+
Numpad6 = 99,
|
|
383
|
+
Numpad7 = 100,
|
|
384
|
+
Numpad8 = 101,
|
|
385
|
+
Numpad9 = 102,
|
|
386
|
+
NumpadMultiply = 103,
|
|
387
|
+
NumpadAdd = 104,
|
|
385
388
|
NUMPAD_SEPARATOR = 105,
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
+
NumpadSubtract = 106,
|
|
390
|
+
NumpadDecimal = 107,
|
|
391
|
+
NumpadDivide = 108,
|
|
389
392
|
/**
|
|
390
393
|
* Cover all key codes when IME is processing input.
|
|
391
394
|
*/
|
|
392
395
|
KEY_IN_COMPOSITION = 109,
|
|
393
396
|
ABNT_C1 = 110,
|
|
394
397
|
ABNT_C2 = 111,
|
|
398
|
+
AudioVolumeMute = 112,
|
|
399
|
+
AudioVolumeUp = 113,
|
|
400
|
+
AudioVolumeDown = 114,
|
|
401
|
+
BrowserSearch = 115,
|
|
402
|
+
BrowserHome = 116,
|
|
403
|
+
BrowserBack = 117,
|
|
404
|
+
BrowserForward = 118,
|
|
405
|
+
MediaTrackNext = 119,
|
|
406
|
+
MediaTrackPrevious = 120,
|
|
407
|
+
MediaStop = 121,
|
|
408
|
+
MediaPlayPause = 122,
|
|
409
|
+
LaunchMediaPlayer = 123,
|
|
410
|
+
LaunchMail = 124,
|
|
411
|
+
LaunchApp2 = 125,
|
|
412
|
+
/**
|
|
413
|
+
* VK_CLEAR, 0x0C, CLEAR key
|
|
414
|
+
*/
|
|
415
|
+
Clear = 126,
|
|
395
416
|
/**
|
|
396
417
|
* Placed last to cover the length of the enum.
|
|
397
418
|
* Please do not depend on this value!
|
|
398
419
|
*/
|
|
399
|
-
MAX_VALUE =
|
|
420
|
+
MAX_VALUE = 127
|
|
400
421
|
}
|
|
401
422
|
export class KeyMod {
|
|
402
423
|
static readonly CtrlCmd: number;
|
|
@@ -410,6 +431,8 @@ declare namespace monaco {
|
|
|
410
431
|
readonly value: string;
|
|
411
432
|
readonly isTrusted?: boolean;
|
|
412
433
|
readonly supportThemeIcons?: boolean;
|
|
434
|
+
readonly supportHtml?: boolean;
|
|
435
|
+
readonly baseUri?: UriComponents;
|
|
413
436
|
uris?: {
|
|
414
437
|
[href: string]: UriComponents;
|
|
415
438
|
};
|
|
@@ -621,7 +644,7 @@ declare namespace monaco {
|
|
|
621
644
|
*/
|
|
622
645
|
strictContainsRange(range: IRange): boolean;
|
|
623
646
|
/**
|
|
624
|
-
* Test if `otherRange` is
|
|
647
|
+
* Test if `otherRange` is strictly in `range` (must start after, and end before). If the ranges are equal, will return false.
|
|
625
648
|
*/
|
|
626
649
|
static strictContainsRange(range: IRange, otherRange: IRange): boolean;
|
|
627
650
|
/**
|
|
@@ -692,6 +715,7 @@ declare namespace monaco {
|
|
|
692
715
|
*/
|
|
693
716
|
static lift(range: undefined | null): null;
|
|
694
717
|
static lift(range: IRange): Range;
|
|
718
|
+
static lift(range: IRange | undefined | null): Range | null;
|
|
695
719
|
/**
|
|
696
720
|
* Test if `obj` is an `IRange`.
|
|
697
721
|
*/
|
|
@@ -718,6 +742,7 @@ declare namespace monaco {
|
|
|
718
742
|
* Test if the range spans multiple lines.
|
|
719
743
|
*/
|
|
720
744
|
static spansMultipleLines(range: IRange): boolean;
|
|
745
|
+
toJSON(): IRange;
|
|
721
746
|
}
|
|
722
747
|
|
|
723
748
|
/**
|
|
@@ -789,6 +814,10 @@ declare namespace monaco {
|
|
|
789
814
|
* Get the position at `positionLineNumber` and `positionColumn`.
|
|
790
815
|
*/
|
|
791
816
|
getPosition(): Position;
|
|
817
|
+
/**
|
|
818
|
+
* Get the position at the start of the selection.
|
|
819
|
+
*/
|
|
820
|
+
getSelectionStart(): Position;
|
|
792
821
|
/**
|
|
793
822
|
* Create a new selection with a different `selectionStartLineNumber` and `selectionStartColumn`.
|
|
794
823
|
*/
|
|
@@ -797,6 +826,10 @@ declare namespace monaco {
|
|
|
797
826
|
* Create a `Selection` from one or two positions
|
|
798
827
|
*/
|
|
799
828
|
static fromPositions(start: IPosition, end?: IPosition): Selection;
|
|
829
|
+
/**
|
|
830
|
+
* Creates a `Selection` from a range, given a direction.
|
|
831
|
+
*/
|
|
832
|
+
static fromRange(range: Range, direction: SelectionDirection): Selection;
|
|
800
833
|
/**
|
|
801
834
|
* Create a `Selection` from an `ISelection`.
|
|
802
835
|
*/
|
|
@@ -867,7 +900,7 @@ declare namespace monaco.editor {
|
|
|
867
900
|
* `domElement` should be empty (not contain other dom nodes).
|
|
868
901
|
* The editor will read the size of `domElement`.
|
|
869
902
|
*/
|
|
870
|
-
export function createDiffEditor(domElement: HTMLElement, options?:
|
|
903
|
+
export function createDiffEditor(domElement: HTMLElement, options?: IStandaloneDiffEditorConstructionOptions, override?: IEditorOverrideServices): IStandaloneDiffEditor;
|
|
871
904
|
|
|
872
905
|
export interface IDiffNavigatorOptions {
|
|
873
906
|
readonly followsCaret?: boolean;
|
|
@@ -1180,12 +1213,12 @@ declare namespace monaco.editor {
|
|
|
1180
1213
|
model?: ITextModel | null;
|
|
1181
1214
|
/**
|
|
1182
1215
|
* The initial value of the auto created model in the editor.
|
|
1183
|
-
* To not create
|
|
1216
|
+
* To not automatically create a model, use `model: null`.
|
|
1184
1217
|
*/
|
|
1185
1218
|
value?: string;
|
|
1186
1219
|
/**
|
|
1187
1220
|
* The initial language of the auto created model in the editor.
|
|
1188
|
-
* To not create
|
|
1221
|
+
* To not automatically create a model, use `model: null`.
|
|
1189
1222
|
*/
|
|
1190
1223
|
language?: string;
|
|
1191
1224
|
/**
|
|
@@ -1208,12 +1241,17 @@ declare namespace monaco.editor {
|
|
|
1208
1241
|
* Defaults to "https://go.microsoft.com/fwlink/?linkid=852450"
|
|
1209
1242
|
*/
|
|
1210
1243
|
accessibilityHelpUrl?: string;
|
|
1244
|
+
/**
|
|
1245
|
+
* Container element to use for ARIA messages.
|
|
1246
|
+
* Defaults to document.body.
|
|
1247
|
+
*/
|
|
1248
|
+
ariaContainerElement?: HTMLElement;
|
|
1211
1249
|
}
|
|
1212
1250
|
|
|
1213
1251
|
/**
|
|
1214
1252
|
* The options to create a diff editor.
|
|
1215
1253
|
*/
|
|
1216
|
-
export interface
|
|
1254
|
+
export interface IStandaloneDiffEditorConstructionOptions extends IDiffEditorConstructionOptions {
|
|
1217
1255
|
/**
|
|
1218
1256
|
* Initial theme to be used for rendering.
|
|
1219
1257
|
* The current out-of-the-box available themes are: 'vs' (default), 'vs-dark', 'hc-black'.
|
|
@@ -1325,6 +1363,44 @@ declare namespace monaco.editor {
|
|
|
1325
1363
|
id: string;
|
|
1326
1364
|
}
|
|
1327
1365
|
|
|
1366
|
+
/**
|
|
1367
|
+
* A single edit operation, that acts as a simple replace.
|
|
1368
|
+
* i.e. Replace text at `range` with `text` in model.
|
|
1369
|
+
*/
|
|
1370
|
+
export interface ISingleEditOperation {
|
|
1371
|
+
/**
|
|
1372
|
+
* The range to replace. This can be empty to emulate a simple insert.
|
|
1373
|
+
*/
|
|
1374
|
+
range: IRange;
|
|
1375
|
+
/**
|
|
1376
|
+
* The text to replace with. This can be null to emulate a simple delete.
|
|
1377
|
+
*/
|
|
1378
|
+
text: string | null;
|
|
1379
|
+
/**
|
|
1380
|
+
* This indicates that this operation has "insert" semantics.
|
|
1381
|
+
* i.e. forceMoveMarkers = true => if `range` is collapsed, all markers at the position will be moved.
|
|
1382
|
+
*/
|
|
1383
|
+
forceMoveMarkers?: boolean;
|
|
1384
|
+
}
|
|
1385
|
+
|
|
1386
|
+
/**
|
|
1387
|
+
* Word inside a model.
|
|
1388
|
+
*/
|
|
1389
|
+
export interface IWordAtPosition {
|
|
1390
|
+
/**
|
|
1391
|
+
* The word.
|
|
1392
|
+
*/
|
|
1393
|
+
readonly word: string;
|
|
1394
|
+
/**
|
|
1395
|
+
* The column where the word starts.
|
|
1396
|
+
*/
|
|
1397
|
+
readonly startColumn: number;
|
|
1398
|
+
/**
|
|
1399
|
+
* The column where the word ends.
|
|
1400
|
+
*/
|
|
1401
|
+
readonly endColumn: number;
|
|
1402
|
+
}
|
|
1403
|
+
|
|
1328
1404
|
/**
|
|
1329
1405
|
* Vertical Lane in the overview ruler of the editor.
|
|
1330
1406
|
*/
|
|
@@ -1403,7 +1479,8 @@ declare namespace monaco.editor {
|
|
|
1403
1479
|
isWholeLine?: boolean;
|
|
1404
1480
|
/**
|
|
1405
1481
|
* Specifies the stack order of a decoration.
|
|
1406
|
-
* A decoration with greater stack order is always in front of a decoration with
|
|
1482
|
+
* A decoration with greater stack order is always in front of a decoration with
|
|
1483
|
+
* a lower stack order when the decorations are on the same line.
|
|
1407
1484
|
*/
|
|
1408
1485
|
zIndex?: number;
|
|
1409
1486
|
/**
|
|
@@ -1448,6 +1525,49 @@ declare namespace monaco.editor {
|
|
|
1448
1525
|
* If set, the decoration will be rendered after the text with this CSS class name.
|
|
1449
1526
|
*/
|
|
1450
1527
|
afterContentClassName?: string | null;
|
|
1528
|
+
/**
|
|
1529
|
+
* If set, text will be injected in the view after the range.
|
|
1530
|
+
*/
|
|
1531
|
+
after?: InjectedTextOptions | null;
|
|
1532
|
+
/**
|
|
1533
|
+
* If set, text will be injected in the view before the range.
|
|
1534
|
+
*/
|
|
1535
|
+
before?: InjectedTextOptions | null;
|
|
1536
|
+
}
|
|
1537
|
+
|
|
1538
|
+
/**
|
|
1539
|
+
* Configures text that is injected into the view without changing the underlying document.
|
|
1540
|
+
*/
|
|
1541
|
+
export interface InjectedTextOptions {
|
|
1542
|
+
/**
|
|
1543
|
+
* Sets the text to inject. Must be a single line.
|
|
1544
|
+
*/
|
|
1545
|
+
readonly content: string;
|
|
1546
|
+
/**
|
|
1547
|
+
* If set, the decoration will be rendered inline with the text with this CSS class name.
|
|
1548
|
+
*/
|
|
1549
|
+
readonly inlineClassName?: string | null;
|
|
1550
|
+
/**
|
|
1551
|
+
* If there is an `inlineClassName` which affects letter spacing.
|
|
1552
|
+
*/
|
|
1553
|
+
readonly inlineClassNameAffectsLetterSpacing?: boolean;
|
|
1554
|
+
/**
|
|
1555
|
+
* This field allows to attach data to this injected text.
|
|
1556
|
+
* The data can be read when injected texts at a given position are queried.
|
|
1557
|
+
*/
|
|
1558
|
+
readonly attachedData?: unknown;
|
|
1559
|
+
/**
|
|
1560
|
+
* Configures cursor stops around injected text.
|
|
1561
|
+
* Defaults to {@link InjectedTextCursorStops.Both}.
|
|
1562
|
+
*/
|
|
1563
|
+
readonly cursorStops?: InjectedTextCursorStops | null;
|
|
1564
|
+
}
|
|
1565
|
+
|
|
1566
|
+
export enum InjectedTextCursorStops {
|
|
1567
|
+
Both = 0,
|
|
1568
|
+
Right = 1,
|
|
1569
|
+
Left = 2,
|
|
1570
|
+
None = 3
|
|
1451
1571
|
}
|
|
1452
1572
|
|
|
1453
1573
|
/**
|
|
@@ -1486,24 +1606,6 @@ declare namespace monaco.editor {
|
|
|
1486
1606
|
readonly options: IModelDecorationOptions;
|
|
1487
1607
|
}
|
|
1488
1608
|
|
|
1489
|
-
/**
|
|
1490
|
-
* Word inside a model.
|
|
1491
|
-
*/
|
|
1492
|
-
export interface IWordAtPosition {
|
|
1493
|
-
/**
|
|
1494
|
-
* The word.
|
|
1495
|
-
*/
|
|
1496
|
-
readonly word: string;
|
|
1497
|
-
/**
|
|
1498
|
-
* The column where the word starts.
|
|
1499
|
-
*/
|
|
1500
|
-
readonly startColumn: number;
|
|
1501
|
-
/**
|
|
1502
|
-
* The column where the word ends.
|
|
1503
|
-
*/
|
|
1504
|
-
readonly endColumn: number;
|
|
1505
|
-
}
|
|
1506
|
-
|
|
1507
1609
|
/**
|
|
1508
1610
|
* End of line character preference.
|
|
1509
1611
|
*/
|
|
@@ -1550,43 +1652,10 @@ declare namespace monaco.editor {
|
|
|
1550
1652
|
CRLF = 1
|
|
1551
1653
|
}
|
|
1552
1654
|
|
|
1553
|
-
/**
|
|
1554
|
-
* A single edit operation, that acts as a simple replace.
|
|
1555
|
-
* i.e. Replace text at `range` with `text` in model.
|
|
1556
|
-
*/
|
|
1557
|
-
export interface ISingleEditOperation {
|
|
1558
|
-
/**
|
|
1559
|
-
* The range to replace. This can be empty to emulate a simple insert.
|
|
1560
|
-
*/
|
|
1561
|
-
range: IRange;
|
|
1562
|
-
/**
|
|
1563
|
-
* The text to replace with. This can be null to emulate a simple delete.
|
|
1564
|
-
*/
|
|
1565
|
-
text: string | null;
|
|
1566
|
-
/**
|
|
1567
|
-
* This indicates that this operation has "insert" semantics.
|
|
1568
|
-
* i.e. forceMoveMarkers = true => if `range` is collapsed, all markers at the position will be moved.
|
|
1569
|
-
*/
|
|
1570
|
-
forceMoveMarkers?: boolean;
|
|
1571
|
-
}
|
|
1572
|
-
|
|
1573
1655
|
/**
|
|
1574
1656
|
* A single edit operation, that has an identifier.
|
|
1575
1657
|
*/
|
|
1576
|
-
export interface IIdentifiedSingleEditOperation {
|
|
1577
|
-
/**
|
|
1578
|
-
* The range to replace. This can be empty to emulate a simple insert.
|
|
1579
|
-
*/
|
|
1580
|
-
range: IRange;
|
|
1581
|
-
/**
|
|
1582
|
-
* The text to replace with. This can be null to emulate a simple delete.
|
|
1583
|
-
*/
|
|
1584
|
-
text: string | null;
|
|
1585
|
-
/**
|
|
1586
|
-
* This indicates that this operation has "insert" semantics.
|
|
1587
|
-
* i.e. forceMoveMarkers = true => if `range` is collapsed, all markers at the position will be moved.
|
|
1588
|
-
*/
|
|
1589
|
-
forceMoveMarkers?: boolean;
|
|
1658
|
+
export interface IIdentifiedSingleEditOperation extends ISingleEditOperation {
|
|
1590
1659
|
}
|
|
1591
1660
|
|
|
1592
1661
|
export interface IValidEditOperation {
|
|
@@ -1617,6 +1686,11 @@ declare namespace monaco.editor {
|
|
|
1617
1686
|
readonly insertSpaces: boolean;
|
|
1618
1687
|
readonly defaultEOL: DefaultEndOfLine;
|
|
1619
1688
|
readonly trimAutoWhitespace: boolean;
|
|
1689
|
+
readonly bracketPairColorizationOptions: BracketPairColorizationOptions;
|
|
1690
|
+
}
|
|
1691
|
+
|
|
1692
|
+
export interface BracketPairColorizationOptions {
|
|
1693
|
+
enabled: boolean;
|
|
1620
1694
|
}
|
|
1621
1695
|
|
|
1622
1696
|
export interface ITextModelUpdateOptions {
|
|
@@ -1624,6 +1698,7 @@ declare namespace monaco.editor {
|
|
|
1624
1698
|
indentSize?: number;
|
|
1625
1699
|
insertSpaces?: boolean;
|
|
1626
1700
|
trimAutoWhitespace?: boolean;
|
|
1701
|
+
bracketColorizationOptions?: BracketPairColorizationOptions;
|
|
1627
1702
|
}
|
|
1628
1703
|
|
|
1629
1704
|
export class FindMatch {
|
|
@@ -1748,7 +1823,7 @@ declare namespace monaco.editor {
|
|
|
1748
1823
|
*/
|
|
1749
1824
|
getLineLastNonWhitespaceColumn(lineNumber: number): number;
|
|
1750
1825
|
/**
|
|
1751
|
-
* Create a valid position
|
|
1826
|
+
* Create a valid position.
|
|
1752
1827
|
*/
|
|
1753
1828
|
validatePosition(position: IPosition): Position;
|
|
1754
1829
|
/**
|
|
@@ -1783,7 +1858,7 @@ declare namespace monaco.editor {
|
|
|
1783
1858
|
*/
|
|
1784
1859
|
getPositionAt(offset: number): Position;
|
|
1785
1860
|
/**
|
|
1786
|
-
* Get a range covering the entire model
|
|
1861
|
+
* Get a range covering the entire model.
|
|
1787
1862
|
*/
|
|
1788
1863
|
getFullModelRange(): Range;
|
|
1789
1864
|
/**
|
|
@@ -1839,7 +1914,7 @@ declare namespace monaco.editor {
|
|
|
1839
1914
|
/**
|
|
1840
1915
|
* Get the language associated with this model.
|
|
1841
1916
|
*/
|
|
1842
|
-
|
|
1917
|
+
getLanguageId(): string;
|
|
1843
1918
|
/**
|
|
1844
1919
|
* Get the word under or besides `position`.
|
|
1845
1920
|
* @param position The position to look for a word.
|
|
@@ -1913,6 +1988,11 @@ declare namespace monaco.editor {
|
|
|
1913
1988
|
* @param filterOutValidation If set, it will ignore decorations specific to validation (i.e. warnings, errors).
|
|
1914
1989
|
*/
|
|
1915
1990
|
getOverviewRulerDecorations(ownerId?: number, filterOutValidation?: boolean): IModelDecoration[];
|
|
1991
|
+
/**
|
|
1992
|
+
* Gets all the decorations that contain injected text.
|
|
1993
|
+
* @param ownerId If set, it will ignore decorations belonging to other owners.
|
|
1994
|
+
*/
|
|
1995
|
+
getInjectedTextDecorations(ownerId?: number): IModelDecoration[];
|
|
1916
1996
|
/**
|
|
1917
1997
|
* Normalize a string containing whitespace according to indentation rules (converts to spaces or to tabs).
|
|
1918
1998
|
*/
|
|
@@ -1972,35 +2052,34 @@ declare namespace monaco.editor {
|
|
|
1972
2052
|
* An event emitted when decorations of the model have changed.
|
|
1973
2053
|
* @event
|
|
1974
2054
|
*/
|
|
1975
|
-
onDidChangeDecorations
|
|
2055
|
+
readonly onDidChangeDecorations: IEvent<IModelDecorationsChangedEvent>;
|
|
1976
2056
|
/**
|
|
1977
2057
|
* An event emitted when the model options have changed.
|
|
1978
2058
|
* @event
|
|
1979
2059
|
*/
|
|
1980
|
-
onDidChangeOptions
|
|
2060
|
+
readonly onDidChangeOptions: IEvent<IModelOptionsChangedEvent>;
|
|
1981
2061
|
/**
|
|
1982
2062
|
* An event emitted when the language associated with the model has changed.
|
|
1983
2063
|
* @event
|
|
1984
2064
|
*/
|
|
1985
|
-
onDidChangeLanguage
|
|
2065
|
+
readonly onDidChangeLanguage: IEvent<IModelLanguageChangedEvent>;
|
|
1986
2066
|
/**
|
|
1987
2067
|
* An event emitted when the language configuration associated with the model has changed.
|
|
1988
2068
|
* @event
|
|
1989
2069
|
*/
|
|
1990
|
-
onDidChangeLanguageConfiguration
|
|
2070
|
+
readonly onDidChangeLanguageConfiguration: IEvent<IModelLanguageConfigurationChangedEvent>;
|
|
1991
2071
|
/**
|
|
1992
2072
|
* An event emitted when the model has been attached to the first editor or detached from the last editor.
|
|
1993
2073
|
* @event
|
|
1994
2074
|
*/
|
|
1995
|
-
onDidChangeAttached
|
|
2075
|
+
readonly onDidChangeAttached: IEvent<void>;
|
|
1996
2076
|
/**
|
|
1997
2077
|
* An event emitted right before disposing the model.
|
|
1998
2078
|
* @event
|
|
1999
2079
|
*/
|
|
2000
|
-
onWillDispose
|
|
2080
|
+
readonly onWillDispose: IEvent<void>;
|
|
2001
2081
|
/**
|
|
2002
|
-
* Destroy this model.
|
|
2003
|
-
* and make all necessary clean-up to release this object to the GC.
|
|
2082
|
+
* Destroy this model.
|
|
2004
2083
|
*/
|
|
2005
2084
|
dispose(): void;
|
|
2006
2085
|
/**
|
|
@@ -2009,6 +2088,52 @@ declare namespace monaco.editor {
|
|
|
2009
2088
|
isAttachedToEditor(): boolean;
|
|
2010
2089
|
}
|
|
2011
2090
|
|
|
2091
|
+
export enum PositionAffinity {
|
|
2092
|
+
/**
|
|
2093
|
+
* Prefers the left most position.
|
|
2094
|
+
*/
|
|
2095
|
+
Left = 0,
|
|
2096
|
+
/**
|
|
2097
|
+
* Prefers the right most position.
|
|
2098
|
+
*/
|
|
2099
|
+
Right = 1,
|
|
2100
|
+
/**
|
|
2101
|
+
* No preference.
|
|
2102
|
+
*/
|
|
2103
|
+
None = 2
|
|
2104
|
+
}
|
|
2105
|
+
|
|
2106
|
+
/**
|
|
2107
|
+
* A change
|
|
2108
|
+
*/
|
|
2109
|
+
export interface IChange {
|
|
2110
|
+
readonly originalStartLineNumber: number;
|
|
2111
|
+
readonly originalEndLineNumber: number;
|
|
2112
|
+
readonly modifiedStartLineNumber: number;
|
|
2113
|
+
readonly modifiedEndLineNumber: number;
|
|
2114
|
+
}
|
|
2115
|
+
|
|
2116
|
+
/**
|
|
2117
|
+
* A character level change.
|
|
2118
|
+
*/
|
|
2119
|
+
export interface ICharChange extends IChange {
|
|
2120
|
+
readonly originalStartColumn: number;
|
|
2121
|
+
readonly originalEndColumn: number;
|
|
2122
|
+
readonly modifiedStartColumn: number;
|
|
2123
|
+
readonly modifiedEndColumn: number;
|
|
2124
|
+
}
|
|
2125
|
+
|
|
2126
|
+
/**
|
|
2127
|
+
* A line change
|
|
2128
|
+
*/
|
|
2129
|
+
export interface ILineChange extends IChange {
|
|
2130
|
+
readonly charChanges: ICharChange[] | undefined;
|
|
2131
|
+
}
|
|
2132
|
+
export interface IDimension {
|
|
2133
|
+
width: number;
|
|
2134
|
+
height: number;
|
|
2135
|
+
}
|
|
2136
|
+
|
|
2012
2137
|
/**
|
|
2013
2138
|
* A builder and helper for edit operations for a command.
|
|
2014
2139
|
*/
|
|
@@ -2101,38 +2226,6 @@ declare namespace monaco.editor {
|
|
|
2101
2226
|
readonly newModelUrl: Uri | null;
|
|
2102
2227
|
}
|
|
2103
2228
|
|
|
2104
|
-
export interface IDimension {
|
|
2105
|
-
width: number;
|
|
2106
|
-
height: number;
|
|
2107
|
-
}
|
|
2108
|
-
|
|
2109
|
-
/**
|
|
2110
|
-
* A change
|
|
2111
|
-
*/
|
|
2112
|
-
export interface IChange {
|
|
2113
|
-
readonly originalStartLineNumber: number;
|
|
2114
|
-
readonly originalEndLineNumber: number;
|
|
2115
|
-
readonly modifiedStartLineNumber: number;
|
|
2116
|
-
readonly modifiedEndLineNumber: number;
|
|
2117
|
-
}
|
|
2118
|
-
|
|
2119
|
-
/**
|
|
2120
|
-
* A character level change.
|
|
2121
|
-
*/
|
|
2122
|
-
export interface ICharChange extends IChange {
|
|
2123
|
-
readonly originalStartColumn: number;
|
|
2124
|
-
readonly originalEndColumn: number;
|
|
2125
|
-
readonly modifiedStartColumn: number;
|
|
2126
|
-
readonly modifiedEndColumn: number;
|
|
2127
|
-
}
|
|
2128
|
-
|
|
2129
|
-
/**
|
|
2130
|
-
* A line change
|
|
2131
|
-
*/
|
|
2132
|
-
export interface ILineChange extends IChange {
|
|
2133
|
-
readonly charChanges: ICharChange[] | undefined;
|
|
2134
|
-
}
|
|
2135
|
-
|
|
2136
2229
|
export interface IContentSizeChangedEvent {
|
|
2137
2230
|
readonly contentWidth: number;
|
|
2138
2231
|
readonly contentHeight: number;
|
|
@@ -2270,8 +2363,9 @@ declare namespace monaco.editor {
|
|
|
2270
2363
|
/**
|
|
2271
2364
|
* Set the primary position of the cursor. This will remove any secondary cursors.
|
|
2272
2365
|
* @param position New primary cursor's position
|
|
2366
|
+
* @param source Source of the call that caused the position
|
|
2273
2367
|
*/
|
|
2274
|
-
setPosition(position: IPosition): void;
|
|
2368
|
+
setPosition(position: IPosition, source?: string): void;
|
|
2275
2369
|
/**
|
|
2276
2370
|
* Scroll vertically as necessary and reveal a line.
|
|
2277
2371
|
*/
|
|
@@ -2317,28 +2411,34 @@ declare namespace monaco.editor {
|
|
|
2317
2411
|
/**
|
|
2318
2412
|
* Set the primary selection of the editor. This will remove any secondary cursors.
|
|
2319
2413
|
* @param selection The new selection
|
|
2414
|
+
* @param source Source of the call that caused the selection
|
|
2320
2415
|
*/
|
|
2321
|
-
setSelection(selection: IRange): void;
|
|
2416
|
+
setSelection(selection: IRange, source?: string): void;
|
|
2322
2417
|
/**
|
|
2323
2418
|
* Set the primary selection of the editor. This will remove any secondary cursors.
|
|
2324
2419
|
* @param selection The new selection
|
|
2420
|
+
* @param source Source of the call that caused the selection
|
|
2325
2421
|
*/
|
|
2326
|
-
setSelection(selection: Range): void;
|
|
2422
|
+
setSelection(selection: Range, source?: string): void;
|
|
2327
2423
|
/**
|
|
2328
2424
|
* Set the primary selection of the editor. This will remove any secondary cursors.
|
|
2329
2425
|
* @param selection The new selection
|
|
2426
|
+
* @param source Source of the call that caused the selection
|
|
2330
2427
|
*/
|
|
2331
|
-
setSelection(selection: ISelection): void;
|
|
2428
|
+
setSelection(selection: ISelection, source?: string): void;
|
|
2332
2429
|
/**
|
|
2333
2430
|
* Set the primary selection of the editor. This will remove any secondary cursors.
|
|
2334
2431
|
* @param selection The new selection
|
|
2432
|
+
* @param source Source of the call that caused the selection
|
|
2335
2433
|
*/
|
|
2336
|
-
setSelection(selection: Selection): void;
|
|
2434
|
+
setSelection(selection: Selection, source?: string): void;
|
|
2337
2435
|
/**
|
|
2338
2436
|
* Set the selections for all the cursors of the editor.
|
|
2339
2437
|
* Cursors will be removed or added, as necessary.
|
|
2438
|
+
* @param selections The new selection
|
|
2439
|
+
* @param source Source of the call that caused the selection
|
|
2340
2440
|
*/
|
|
2341
|
-
setSelections(selections: readonly ISelection[]): void;
|
|
2441
|
+
setSelections(selections: readonly ISelection[], source?: string): void;
|
|
2342
2442
|
/**
|
|
2343
2443
|
* Scroll vertically as necessary and reveal lines.
|
|
2344
2444
|
*/
|
|
@@ -2431,7 +2531,7 @@ declare namespace monaco.editor {
|
|
|
2431
2531
|
};
|
|
2432
2532
|
|
|
2433
2533
|
/**
|
|
2434
|
-
* An event describing that the current
|
|
2534
|
+
* An event describing that the current language associated with a model has changed.
|
|
2435
2535
|
*/
|
|
2436
2536
|
export interface IModelLanguageChangedEvent {
|
|
2437
2537
|
/**
|
|
@@ -2671,7 +2771,7 @@ declare namespace monaco.editor {
|
|
|
2671
2771
|
/**
|
|
2672
2772
|
* Control the rendering of line numbers.
|
|
2673
2773
|
* If it is a function, it will be invoked when rendering a line number and the return value will be rendered.
|
|
2674
|
-
* Otherwise, if it is a
|
|
2774
|
+
* Otherwise, if it is a truthy, line numbers will be rendered normally (equivalent of using an identity function).
|
|
2675
2775
|
* Otherwise, line numbers will not be rendered.
|
|
2676
2776
|
* Defaults to `on`.
|
|
2677
2777
|
*/
|
|
@@ -2894,12 +2994,10 @@ declare namespace monaco.editor {
|
|
|
2894
2994
|
wrappingStrategy?: 'simple' | 'advanced';
|
|
2895
2995
|
/**
|
|
2896
2996
|
* Configure word wrapping characters. A break will be introduced before these characters.
|
|
2897
|
-
* Defaults to '([{‘“〈《「『【〔([{「£¥$£¥++'.
|
|
2898
2997
|
*/
|
|
2899
2998
|
wordWrapBreakBeforeCharacters?: string;
|
|
2900
2999
|
/**
|
|
2901
3000
|
* Configure word wrapping characters. A break will be introduced after these characters.
|
|
2902
|
-
* Defaults to ' \t})]?|/&.,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」'.
|
|
2903
3001
|
*/
|
|
2904
3002
|
wordWrapBreakAfterCharacters?: string;
|
|
2905
3003
|
/**
|
|
@@ -2978,6 +3076,7 @@ declare namespace monaco.editor {
|
|
|
2978
3076
|
* Suggest options.
|
|
2979
3077
|
*/
|
|
2980
3078
|
suggest?: ISuggestOptions;
|
|
3079
|
+
inlineSuggest?: IInlineSuggestOptions;
|
|
2981
3080
|
/**
|
|
2982
3081
|
* Smart select options.
|
|
2983
3082
|
*/
|
|
@@ -3143,6 +3242,16 @@ declare namespace monaco.editor {
|
|
|
3143
3242
|
* Defaults to true.
|
|
3144
3243
|
*/
|
|
3145
3244
|
foldingHighlight?: boolean;
|
|
3245
|
+
/**
|
|
3246
|
+
* Auto fold imports folding regions.
|
|
3247
|
+
* Defaults to true.
|
|
3248
|
+
*/
|
|
3249
|
+
foldingImportsByDefault?: boolean;
|
|
3250
|
+
/**
|
|
3251
|
+
* Maximum number of foldable regions.
|
|
3252
|
+
* Defaults to 5000.
|
|
3253
|
+
*/
|
|
3254
|
+
foldingMaximumRegions?: number;
|
|
3146
3255
|
/**
|
|
3147
3256
|
* Controls whether the fold actions in the gutter stay always visible or hide unless the mouse is over the gutter.
|
|
3148
3257
|
* Defaults to 'mouseover'.
|
|
@@ -3160,24 +3269,14 @@ declare namespace monaco.editor {
|
|
|
3160
3269
|
matchBrackets?: 'never' | 'near' | 'always';
|
|
3161
3270
|
/**
|
|
3162
3271
|
* Enable rendering of whitespace.
|
|
3163
|
-
* Defaults to
|
|
3272
|
+
* Defaults to 'selection'.
|
|
3164
3273
|
*/
|
|
3165
3274
|
renderWhitespace?: 'none' | 'boundary' | 'selection' | 'trailing' | 'all';
|
|
3166
3275
|
/**
|
|
3167
3276
|
* Enable rendering of control characters.
|
|
3168
|
-
* Defaults to false.
|
|
3169
|
-
*/
|
|
3170
|
-
renderControlCharacters?: boolean;
|
|
3171
|
-
/**
|
|
3172
|
-
* Enable rendering of indent guides.
|
|
3173
|
-
* Defaults to true.
|
|
3174
|
-
*/
|
|
3175
|
-
renderIndentGuides?: boolean;
|
|
3176
|
-
/**
|
|
3177
|
-
* Enable highlighting of the active indent guide.
|
|
3178
3277
|
* Defaults to true.
|
|
3179
3278
|
*/
|
|
3180
|
-
|
|
3279
|
+
renderControlCharacters?: boolean;
|
|
3181
3280
|
/**
|
|
3182
3281
|
* Enable rendering of current line highlight.
|
|
3183
3282
|
* Defaults to all.
|
|
@@ -3233,17 +3332,27 @@ declare namespace monaco.editor {
|
|
|
3233
3332
|
/**
|
|
3234
3333
|
* Control the behavior and rendering of the inline hints.
|
|
3235
3334
|
*/
|
|
3236
|
-
|
|
3335
|
+
inlayHints?: IEditorInlayHintsOptions;
|
|
3237
3336
|
/**
|
|
3238
3337
|
* Control if the editor should use shadow DOM.
|
|
3239
3338
|
*/
|
|
3240
3339
|
useShadowDOM?: boolean;
|
|
3340
|
+
/**
|
|
3341
|
+
* Controls the behavior of editor guides.
|
|
3342
|
+
*/
|
|
3343
|
+
guides?: IGuidesOptions;
|
|
3344
|
+
/**
|
|
3345
|
+
* Controls the behavior of the unicode highlight feature
|
|
3346
|
+
* (by default, ambiguous and invisible characters are highlighted).
|
|
3347
|
+
*/
|
|
3348
|
+
unicodeHighlight?: IUnicodeHighlightOptions;
|
|
3349
|
+
/**
|
|
3350
|
+
* Configures bracket pair colorization (disabled by default).
|
|
3351
|
+
*/
|
|
3352
|
+
bracketPairColorization?: IBracketPairColorizationOptions;
|
|
3241
3353
|
}
|
|
3242
3354
|
|
|
3243
|
-
|
|
3244
|
-
* Configuration options for the diff editor.
|
|
3245
|
-
*/
|
|
3246
|
-
export interface IDiffEditorOptions extends IEditorOptions {
|
|
3355
|
+
export interface IDiffEditorBaseOptions {
|
|
3247
3356
|
/**
|
|
3248
3357
|
* Allow the user to resize the diff editor split view.
|
|
3249
3358
|
* Defaults to true.
|
|
@@ -3259,6 +3368,11 @@ declare namespace monaco.editor {
|
|
|
3259
3368
|
* Defaults to 5000.
|
|
3260
3369
|
*/
|
|
3261
3370
|
maxComputationTime?: number;
|
|
3371
|
+
/**
|
|
3372
|
+
* Maximum supported file size in MB.
|
|
3373
|
+
* Defaults to 50.
|
|
3374
|
+
*/
|
|
3375
|
+
maxFileSize?: number;
|
|
3262
3376
|
/**
|
|
3263
3377
|
* Compute the diff by ignoring leading/trailing whitespace
|
|
3264
3378
|
* Defaults to true.
|
|
@@ -3279,11 +3393,6 @@ declare namespace monaco.editor {
|
|
|
3279
3393
|
* Defaults to false.
|
|
3280
3394
|
*/
|
|
3281
3395
|
diffCodeLens?: boolean;
|
|
3282
|
-
/**
|
|
3283
|
-
* Is the diff editor inside another editor
|
|
3284
|
-
* Defaults to false
|
|
3285
|
-
*/
|
|
3286
|
-
isInEmbeddedEditor?: boolean;
|
|
3287
3396
|
/**
|
|
3288
3397
|
* Is the diff editor should render overview ruler
|
|
3289
3398
|
* Defaults to true
|
|
@@ -3293,14 +3402,12 @@ declare namespace monaco.editor {
|
|
|
3293
3402
|
* Control the wrapping of the diff editor.
|
|
3294
3403
|
*/
|
|
3295
3404
|
diffWordWrap?: 'off' | 'on' | 'inherit';
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
*/
|
|
3303
|
-
modifiedAriaLabel?: string;
|
|
3405
|
+
}
|
|
3406
|
+
|
|
3407
|
+
/**
|
|
3408
|
+
* Configuration options for the diff editor.
|
|
3409
|
+
*/
|
|
3410
|
+
export interface IDiffEditorOptions extends IEditorOptions, IDiffEditorBaseOptions {
|
|
3304
3411
|
}
|
|
3305
3412
|
|
|
3306
3413
|
/**
|
|
@@ -3317,10 +3424,20 @@ declare namespace monaco.editor {
|
|
|
3317
3424
|
get<T extends EditorOption>(id: T): FindComputedEditorOptionValueById<T>;
|
|
3318
3425
|
}
|
|
3319
3426
|
|
|
3320
|
-
export interface IEditorOption<
|
|
3321
|
-
readonly id:
|
|
3427
|
+
export interface IEditorOption<K extends EditorOption, V> {
|
|
3428
|
+
readonly id: K;
|
|
3322
3429
|
readonly name: string;
|
|
3323
3430
|
defaultValue: V;
|
|
3431
|
+
/**
|
|
3432
|
+
* Might modify `value`.
|
|
3433
|
+
*/
|
|
3434
|
+
applyUpdate(value: V, update: V): ApplyUpdateResult<V>;
|
|
3435
|
+
}
|
|
3436
|
+
|
|
3437
|
+
export class ApplyUpdateResult<T> {
|
|
3438
|
+
readonly newValue: T;
|
|
3439
|
+
readonly didChange: boolean;
|
|
3440
|
+
constructor(newValue: T, didChange: boolean);
|
|
3324
3441
|
}
|
|
3325
3442
|
|
|
3326
3443
|
/**
|
|
@@ -3339,8 +3456,6 @@ declare namespace monaco.editor {
|
|
|
3339
3456
|
ignoreEmptyLines?: boolean;
|
|
3340
3457
|
}
|
|
3341
3458
|
|
|
3342
|
-
export type EditorCommentsOptions = Readonly<Required<IEditorCommentsOptions>>;
|
|
3343
|
-
|
|
3344
3459
|
/**
|
|
3345
3460
|
* The kind of animation in which the editor's cursor should be rendered.
|
|
3346
3461
|
*/
|
|
@@ -3412,7 +3527,7 @@ declare namespace monaco.editor {
|
|
|
3412
3527
|
/**
|
|
3413
3528
|
* Controls if we seed search string in the Find Widget with editor selection.
|
|
3414
3529
|
*/
|
|
3415
|
-
seedSearchStringFromSelection?:
|
|
3530
|
+
seedSearchStringFromSelection?: 'never' | 'always' | 'selection';
|
|
3416
3531
|
/**
|
|
3417
3532
|
* Controls if Find in Selection flag is turned on in the editor.
|
|
3418
3533
|
*/
|
|
@@ -3424,8 +3539,6 @@ declare namespace monaco.editor {
|
|
|
3424
3539
|
loop?: boolean;
|
|
3425
3540
|
}
|
|
3426
3541
|
|
|
3427
|
-
export type EditorFindOptions = Readonly<Required<IEditorFindOptions>>;
|
|
3428
|
-
|
|
3429
3542
|
export type GoToLocationValues = 'peek' | 'gotoAndPeek' | 'goto';
|
|
3430
3543
|
|
|
3431
3544
|
/**
|
|
@@ -3445,8 +3558,6 @@ declare namespace monaco.editor {
|
|
|
3445
3558
|
alternativeReferenceCommand?: string;
|
|
3446
3559
|
}
|
|
3447
3560
|
|
|
3448
|
-
export type GoToLocationOptions = Readonly<Required<IGotoLocationOptions>>;
|
|
3449
|
-
|
|
3450
3561
|
/**
|
|
3451
3562
|
* Configuration options for editor hover
|
|
3452
3563
|
*/
|
|
@@ -3466,10 +3577,13 @@ declare namespace monaco.editor {
|
|
|
3466
3577
|
* Defaults to true.
|
|
3467
3578
|
*/
|
|
3468
3579
|
sticky?: boolean;
|
|
3580
|
+
/**
|
|
3581
|
+
* Should the hover be shown above the line if possible?
|
|
3582
|
+
* Defaults to false.
|
|
3583
|
+
*/
|
|
3584
|
+
above?: boolean;
|
|
3469
3585
|
}
|
|
3470
3586
|
|
|
3471
|
-
export type EditorHoverOptions = Readonly<Required<IEditorHoverOptions>>;
|
|
3472
|
-
|
|
3473
3587
|
/**
|
|
3474
3588
|
* A description for the overview ruler position.
|
|
3475
3589
|
*/
|
|
@@ -3595,12 +3709,10 @@ declare namespace monaco.editor {
|
|
|
3595
3709
|
enabled?: boolean;
|
|
3596
3710
|
}
|
|
3597
3711
|
|
|
3598
|
-
export type EditorLightbulbOptions = Readonly<Required<IEditorLightbulbOptions>>;
|
|
3599
|
-
|
|
3600
3712
|
/**
|
|
3601
|
-
* Configuration options for editor
|
|
3713
|
+
* Configuration options for editor inlayHints
|
|
3602
3714
|
*/
|
|
3603
|
-
export interface
|
|
3715
|
+
export interface IEditorInlayHintsOptions {
|
|
3604
3716
|
/**
|
|
3605
3717
|
* Enable the inline hints.
|
|
3606
3718
|
* Defaults to true.
|
|
@@ -3618,8 +3730,6 @@ declare namespace monaco.editor {
|
|
|
3618
3730
|
fontFamily?: string;
|
|
3619
3731
|
}
|
|
3620
3732
|
|
|
3621
|
-
export type EditorInlineHintsOptions = Readonly<Required<IEditorInlineHintsOptions>>;
|
|
3622
|
-
|
|
3623
3733
|
/**
|
|
3624
3734
|
* Configuration options for editor minimap
|
|
3625
3735
|
*/
|
|
@@ -3660,8 +3770,6 @@ declare namespace monaco.editor {
|
|
|
3660
3770
|
scale?: number;
|
|
3661
3771
|
}
|
|
3662
3772
|
|
|
3663
|
-
export type EditorMinimapOptions = Readonly<Required<IEditorMinimapOptions>>;
|
|
3664
|
-
|
|
3665
3773
|
/**
|
|
3666
3774
|
* Configuration options for editor padding
|
|
3667
3775
|
*/
|
|
@@ -3676,11 +3784,6 @@ declare namespace monaco.editor {
|
|
|
3676
3784
|
bottom?: number;
|
|
3677
3785
|
}
|
|
3678
3786
|
|
|
3679
|
-
export interface InternalEditorPaddingOptions {
|
|
3680
|
-
readonly top: number;
|
|
3681
|
-
readonly bottom: number;
|
|
3682
|
-
}
|
|
3683
|
-
|
|
3684
3787
|
/**
|
|
3685
3788
|
* Configuration options for parameter hints
|
|
3686
3789
|
*/
|
|
@@ -3697,8 +3800,6 @@ declare namespace monaco.editor {
|
|
|
3697
3800
|
cycle?: boolean;
|
|
3698
3801
|
}
|
|
3699
3802
|
|
|
3700
|
-
export type InternalParameterHintOptions = Readonly<Required<IEditorParameterHintOptions>>;
|
|
3701
|
-
|
|
3702
3803
|
/**
|
|
3703
3804
|
* Configuration options for quick suggestions
|
|
3704
3805
|
*/
|
|
@@ -3708,8 +3809,6 @@ declare namespace monaco.editor {
|
|
|
3708
3809
|
strings?: boolean;
|
|
3709
3810
|
}
|
|
3710
3811
|
|
|
3711
|
-
export type ValidQuickSuggestionsOptions = boolean | Readonly<Required<IQuickSuggestionsOptions>>;
|
|
3712
|
-
|
|
3713
3812
|
export type LineNumbersType = 'on' | 'off' | 'relative' | 'interval' | ((lineNumber: number) => string);
|
|
3714
3813
|
|
|
3715
3814
|
export enum RenderLineNumbersType {
|
|
@@ -3737,6 +3836,7 @@ declare namespace monaco.editor {
|
|
|
3737
3836
|
/**
|
|
3738
3837
|
* The size of arrows (if displayed).
|
|
3739
3838
|
* Defaults to 11.
|
|
3839
|
+
* **NOTE**: This option cannot be updated using `updateOptions()`
|
|
3740
3840
|
*/
|
|
3741
3841
|
arrowSize?: number;
|
|
3742
3842
|
/**
|
|
@@ -3752,16 +3852,19 @@ declare namespace monaco.editor {
|
|
|
3752
3852
|
/**
|
|
3753
3853
|
* Cast horizontal and vertical shadows when the content is scrolled.
|
|
3754
3854
|
* Defaults to true.
|
|
3855
|
+
* **NOTE**: This option cannot be updated using `updateOptions()`
|
|
3755
3856
|
*/
|
|
3756
3857
|
useShadows?: boolean;
|
|
3757
3858
|
/**
|
|
3758
3859
|
* Render arrows at the top and bottom of the vertical scrollbar.
|
|
3759
3860
|
* Defaults to false.
|
|
3861
|
+
* **NOTE**: This option cannot be updated using `updateOptions()`
|
|
3760
3862
|
*/
|
|
3761
3863
|
verticalHasArrows?: boolean;
|
|
3762
3864
|
/**
|
|
3763
3865
|
* Render arrows at the left and right of the horizontal scrollbar.
|
|
3764
3866
|
* Defaults to false.
|
|
3867
|
+
* **NOTE**: This option cannot be updated using `updateOptions()`
|
|
3765
3868
|
*/
|
|
3766
3869
|
horizontalHasArrows?: boolean;
|
|
3767
3870
|
/**
|
|
@@ -3772,6 +3875,7 @@ declare namespace monaco.editor {
|
|
|
3772
3875
|
/**
|
|
3773
3876
|
* Always consume mouse wheel events (always call preventDefault() and stopPropagation() on the browser events).
|
|
3774
3877
|
* Defaults to true.
|
|
3878
|
+
* **NOTE**: This option cannot be updated using `updateOptions()`
|
|
3775
3879
|
*/
|
|
3776
3880
|
alwaysConsumeMouseWheel?: boolean;
|
|
3777
3881
|
/**
|
|
@@ -3787,11 +3891,13 @@ declare namespace monaco.editor {
|
|
|
3787
3891
|
/**
|
|
3788
3892
|
* Width in pixels for the vertical slider.
|
|
3789
3893
|
* Defaults to `verticalScrollbarSize`.
|
|
3894
|
+
* **NOTE**: This option cannot be updated using `updateOptions()`
|
|
3790
3895
|
*/
|
|
3791
3896
|
verticalSliderSize?: number;
|
|
3792
3897
|
/**
|
|
3793
3898
|
* Height in pixels for the horizontal slider.
|
|
3794
3899
|
* Defaults to `horizontalScrollbarSize`.
|
|
3900
|
+
* **NOTE**: This option cannot be updated using `updateOptions()`
|
|
3795
3901
|
*/
|
|
3796
3902
|
horizontalSliderSize?: number;
|
|
3797
3903
|
/**
|
|
@@ -3817,6 +3923,92 @@ declare namespace monaco.editor {
|
|
|
3817
3923
|
readonly scrollByPage: boolean;
|
|
3818
3924
|
}
|
|
3819
3925
|
|
|
3926
|
+
export type InUntrustedWorkspace = 'inUntrustedWorkspace';
|
|
3927
|
+
|
|
3928
|
+
/**
|
|
3929
|
+
* Configuration options for unicode highlighting.
|
|
3930
|
+
*/
|
|
3931
|
+
export interface IUnicodeHighlightOptions {
|
|
3932
|
+
/**
|
|
3933
|
+
* Controls whether all non-basic ASCII characters are highlighted. Only characters between U+0020 and U+007E, tab, line-feed and carriage-return are considered basic ASCII.
|
|
3934
|
+
*/
|
|
3935
|
+
nonBasicASCII?: boolean | InUntrustedWorkspace;
|
|
3936
|
+
/**
|
|
3937
|
+
* Controls whether characters that just reserve space or have no width at all are highlighted.
|
|
3938
|
+
*/
|
|
3939
|
+
invisibleCharacters?: boolean;
|
|
3940
|
+
/**
|
|
3941
|
+
* Controls whether characters are highlighted that can be confused with basic ASCII characters, except those that are common in the current user locale.
|
|
3942
|
+
*/
|
|
3943
|
+
ambiguousCharacters?: boolean;
|
|
3944
|
+
/**
|
|
3945
|
+
* Controls whether characters in comments should also be subject to unicode highlighting.
|
|
3946
|
+
*/
|
|
3947
|
+
includeComments?: boolean | InUntrustedWorkspace;
|
|
3948
|
+
/**
|
|
3949
|
+
* Controls whether characters in strings should also be subject to unicode highlighting.
|
|
3950
|
+
*/
|
|
3951
|
+
includeStrings?: boolean | InUntrustedWorkspace;
|
|
3952
|
+
/**
|
|
3953
|
+
* Defines allowed characters that are not being highlighted.
|
|
3954
|
+
*/
|
|
3955
|
+
allowedCharacters?: Record<string, true>;
|
|
3956
|
+
/**
|
|
3957
|
+
* Unicode characters that are common in allowed locales are not being highlighted.
|
|
3958
|
+
*/
|
|
3959
|
+
allowedLocales?: Record<string | '_os' | '_vscode', true>;
|
|
3960
|
+
}
|
|
3961
|
+
|
|
3962
|
+
export interface IInlineSuggestOptions {
|
|
3963
|
+
/**
|
|
3964
|
+
* Enable or disable the rendering of automatic inline completions.
|
|
3965
|
+
*/
|
|
3966
|
+
enabled?: boolean;
|
|
3967
|
+
/**
|
|
3968
|
+
* Configures the mode.
|
|
3969
|
+
* Use `prefix` to only show ghost text if the text to replace is a prefix of the suggestion text.
|
|
3970
|
+
* Use `subword` to only show ghost text if the replace text is a subword of the suggestion text.
|
|
3971
|
+
* Use `subwordSmart` to only show ghost text if the replace text is a subword of the suggestion text, but the subword must start after the cursor position.
|
|
3972
|
+
* Defaults to `prefix`.
|
|
3973
|
+
*/
|
|
3974
|
+
mode?: 'prefix' | 'subword' | 'subwordSmart';
|
|
3975
|
+
}
|
|
3976
|
+
|
|
3977
|
+
export interface IBracketPairColorizationOptions {
|
|
3978
|
+
/**
|
|
3979
|
+
* Enable or disable bracket pair colorization.
|
|
3980
|
+
*/
|
|
3981
|
+
enabled?: boolean;
|
|
3982
|
+
}
|
|
3983
|
+
|
|
3984
|
+
export interface IGuidesOptions {
|
|
3985
|
+
/**
|
|
3986
|
+
* Enable rendering of bracket pair guides.
|
|
3987
|
+
* Defaults to false.
|
|
3988
|
+
*/
|
|
3989
|
+
bracketPairs?: boolean | 'active';
|
|
3990
|
+
/**
|
|
3991
|
+
* Enable rendering of vertical bracket pair guides.
|
|
3992
|
+
* Defaults to 'active'.
|
|
3993
|
+
*/
|
|
3994
|
+
bracketPairsHorizontal?: boolean | 'active';
|
|
3995
|
+
/**
|
|
3996
|
+
* Enable highlighting of the active bracket pair.
|
|
3997
|
+
* Defaults to true.
|
|
3998
|
+
*/
|
|
3999
|
+
highlightActiveBracketPair?: boolean;
|
|
4000
|
+
/**
|
|
4001
|
+
* Enable rendering of indent guides.
|
|
4002
|
+
* Defaults to true.
|
|
4003
|
+
*/
|
|
4004
|
+
indentation?: boolean;
|
|
4005
|
+
/**
|
|
4006
|
+
* Enable highlighting of the active indent guide.
|
|
4007
|
+
* Defaults to true.
|
|
4008
|
+
*/
|
|
4009
|
+
highlightActiveIndentation?: boolean;
|
|
4010
|
+
}
|
|
4011
|
+
|
|
3820
4012
|
/**
|
|
3821
4013
|
* Configuration options for editor suggest widget
|
|
3822
4014
|
*/
|
|
@@ -3849,6 +4041,14 @@ declare namespace monaco.editor {
|
|
|
3849
4041
|
* Enable or disable the suggest status bar.
|
|
3850
4042
|
*/
|
|
3851
4043
|
showStatusBar?: boolean;
|
|
4044
|
+
/**
|
|
4045
|
+
* Enable or disable the rendering of the suggestion preview.
|
|
4046
|
+
*/
|
|
4047
|
+
preview?: boolean;
|
|
4048
|
+
/**
|
|
4049
|
+
* Configures the mode of the preview.
|
|
4050
|
+
*/
|
|
4051
|
+
previewMode?: 'prefix' | 'subword' | 'subwordSmart';
|
|
3852
4052
|
/**
|
|
3853
4053
|
* Show details inline with the label. Defaults to true.
|
|
3854
4054
|
*/
|
|
@@ -3865,6 +4065,10 @@ declare namespace monaco.editor {
|
|
|
3865
4065
|
* Show constructor-suggestions.
|
|
3866
4066
|
*/
|
|
3867
4067
|
showConstructors?: boolean;
|
|
4068
|
+
/**
|
|
4069
|
+
* Show deprecated-suggestions.
|
|
4070
|
+
*/
|
|
4071
|
+
showDeprecated?: boolean;
|
|
3868
4072
|
/**
|
|
3869
4073
|
* Show field-suggestions.
|
|
3870
4074
|
*/
|
|
@@ -3963,14 +4167,10 @@ declare namespace monaco.editor {
|
|
|
3963
4167
|
showSnippets?: boolean;
|
|
3964
4168
|
}
|
|
3965
4169
|
|
|
3966
|
-
export type InternalSuggestOptions = Readonly<Required<ISuggestOptions>>;
|
|
3967
|
-
|
|
3968
4170
|
export interface ISmartSelectOptions {
|
|
3969
4171
|
selectLeadingAndTrailingWhitespace?: boolean;
|
|
3970
4172
|
}
|
|
3971
4173
|
|
|
3972
|
-
export type SmartSelectOptions = Readonly<Required<ISmartSelectOptions>>;
|
|
3973
|
-
|
|
3974
4174
|
/**
|
|
3975
4175
|
* Describes how to indent wrapped lines.
|
|
3976
4176
|
*/
|
|
@@ -4013,124 +4213,129 @@ declare namespace monaco.editor {
|
|
|
4013
4213
|
autoIndent = 9,
|
|
4014
4214
|
automaticLayout = 10,
|
|
4015
4215
|
autoSurround = 11,
|
|
4016
|
-
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
|
|
4020
|
-
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
|
|
4047
|
-
|
|
4048
|
-
|
|
4049
|
-
|
|
4050
|
-
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
|
|
4057
|
-
|
|
4058
|
-
|
|
4059
|
-
|
|
4060
|
-
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
|
|
4084
|
-
|
|
4085
|
-
|
|
4086
|
-
|
|
4087
|
-
|
|
4088
|
-
|
|
4089
|
-
|
|
4090
|
-
|
|
4091
|
-
|
|
4092
|
-
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
|
|
4216
|
+
bracketPairColorization = 12,
|
|
4217
|
+
guides = 13,
|
|
4218
|
+
codeLens = 14,
|
|
4219
|
+
codeLensFontFamily = 15,
|
|
4220
|
+
codeLensFontSize = 16,
|
|
4221
|
+
colorDecorators = 17,
|
|
4222
|
+
columnSelection = 18,
|
|
4223
|
+
comments = 19,
|
|
4224
|
+
contextmenu = 20,
|
|
4225
|
+
copyWithSyntaxHighlighting = 21,
|
|
4226
|
+
cursorBlinking = 22,
|
|
4227
|
+
cursorSmoothCaretAnimation = 23,
|
|
4228
|
+
cursorStyle = 24,
|
|
4229
|
+
cursorSurroundingLines = 25,
|
|
4230
|
+
cursorSurroundingLinesStyle = 26,
|
|
4231
|
+
cursorWidth = 27,
|
|
4232
|
+
disableLayerHinting = 28,
|
|
4233
|
+
disableMonospaceOptimizations = 29,
|
|
4234
|
+
domReadOnly = 30,
|
|
4235
|
+
dragAndDrop = 31,
|
|
4236
|
+
emptySelectionClipboard = 32,
|
|
4237
|
+
extraEditorClassName = 33,
|
|
4238
|
+
fastScrollSensitivity = 34,
|
|
4239
|
+
find = 35,
|
|
4240
|
+
fixedOverflowWidgets = 36,
|
|
4241
|
+
folding = 37,
|
|
4242
|
+
foldingStrategy = 38,
|
|
4243
|
+
foldingHighlight = 39,
|
|
4244
|
+
foldingImportsByDefault = 40,
|
|
4245
|
+
foldingMaximumRegions = 41,
|
|
4246
|
+
unfoldOnClickAfterEndOfLine = 42,
|
|
4247
|
+
fontFamily = 43,
|
|
4248
|
+
fontInfo = 44,
|
|
4249
|
+
fontLigatures = 45,
|
|
4250
|
+
fontSize = 46,
|
|
4251
|
+
fontWeight = 47,
|
|
4252
|
+
formatOnPaste = 48,
|
|
4253
|
+
formatOnType = 49,
|
|
4254
|
+
glyphMargin = 50,
|
|
4255
|
+
gotoLocation = 51,
|
|
4256
|
+
hideCursorInOverviewRuler = 52,
|
|
4257
|
+
hover = 53,
|
|
4258
|
+
inDiffEditor = 54,
|
|
4259
|
+
inlineSuggest = 55,
|
|
4260
|
+
letterSpacing = 56,
|
|
4261
|
+
lightbulb = 57,
|
|
4262
|
+
lineDecorationsWidth = 58,
|
|
4263
|
+
lineHeight = 59,
|
|
4264
|
+
lineNumbers = 60,
|
|
4265
|
+
lineNumbersMinChars = 61,
|
|
4266
|
+
linkedEditing = 62,
|
|
4267
|
+
links = 63,
|
|
4268
|
+
matchBrackets = 64,
|
|
4269
|
+
minimap = 65,
|
|
4270
|
+
mouseStyle = 66,
|
|
4271
|
+
mouseWheelScrollSensitivity = 67,
|
|
4272
|
+
mouseWheelZoom = 68,
|
|
4273
|
+
multiCursorMergeOverlapping = 69,
|
|
4274
|
+
multiCursorModifier = 70,
|
|
4275
|
+
multiCursorPaste = 71,
|
|
4276
|
+
occurrencesHighlight = 72,
|
|
4277
|
+
overviewRulerBorder = 73,
|
|
4278
|
+
overviewRulerLanes = 74,
|
|
4279
|
+
padding = 75,
|
|
4280
|
+
parameterHints = 76,
|
|
4281
|
+
peekWidgetDefaultFocus = 77,
|
|
4282
|
+
definitionLinkOpensInPeek = 78,
|
|
4283
|
+
quickSuggestions = 79,
|
|
4284
|
+
quickSuggestionsDelay = 80,
|
|
4285
|
+
readOnly = 81,
|
|
4286
|
+
renameOnType = 82,
|
|
4287
|
+
renderControlCharacters = 83,
|
|
4288
|
+
renderFinalNewline = 84,
|
|
4289
|
+
renderLineHighlight = 85,
|
|
4290
|
+
renderLineHighlightOnlyWhenFocus = 86,
|
|
4291
|
+
renderValidationDecorations = 87,
|
|
4292
|
+
renderWhitespace = 88,
|
|
4293
|
+
revealHorizontalRightPadding = 89,
|
|
4294
|
+
roundedSelection = 90,
|
|
4295
|
+
rulers = 91,
|
|
4296
|
+
scrollbar = 92,
|
|
4297
|
+
scrollBeyondLastColumn = 93,
|
|
4298
|
+
scrollBeyondLastLine = 94,
|
|
4299
|
+
scrollPredominantAxis = 95,
|
|
4300
|
+
selectionClipboard = 96,
|
|
4301
|
+
selectionHighlight = 97,
|
|
4302
|
+
selectOnLineNumbers = 98,
|
|
4303
|
+
showFoldingControls = 99,
|
|
4304
|
+
showUnused = 100,
|
|
4305
|
+
snippetSuggestions = 101,
|
|
4306
|
+
smartSelect = 102,
|
|
4307
|
+
smoothScrolling = 103,
|
|
4308
|
+
stickyTabStops = 104,
|
|
4309
|
+
stopRenderingLineAfter = 105,
|
|
4310
|
+
suggest = 106,
|
|
4311
|
+
suggestFontSize = 107,
|
|
4312
|
+
suggestLineHeight = 108,
|
|
4313
|
+
suggestOnTriggerCharacters = 109,
|
|
4314
|
+
suggestSelection = 110,
|
|
4315
|
+
tabCompletion = 111,
|
|
4316
|
+
tabIndex = 112,
|
|
4317
|
+
unicodeHighlighting = 113,
|
|
4318
|
+
unusualLineTerminators = 114,
|
|
4319
|
+
useShadowDOM = 115,
|
|
4320
|
+
useTabStops = 116,
|
|
4321
|
+
wordSeparators = 117,
|
|
4322
|
+
wordWrap = 118,
|
|
4323
|
+
wordWrapBreakAfterCharacters = 119,
|
|
4324
|
+
wordWrapBreakBeforeCharacters = 120,
|
|
4325
|
+
wordWrapColumn = 121,
|
|
4326
|
+
wordWrapOverride1 = 122,
|
|
4327
|
+
wordWrapOverride2 = 123,
|
|
4328
|
+
wrappingIndent = 124,
|
|
4329
|
+
wrappingStrategy = 125,
|
|
4330
|
+
showDeprecated = 126,
|
|
4331
|
+
inlayHints = 127,
|
|
4332
|
+
editorClassName = 128,
|
|
4333
|
+
pixelRatio = 129,
|
|
4334
|
+
tabFocusMode = 130,
|
|
4335
|
+
layoutInfo = 131,
|
|
4336
|
+
wrappingInfo = 132
|
|
4133
4337
|
}
|
|
4338
|
+
|
|
4134
4339
|
export const EditorOptions: {
|
|
4135
4340
|
acceptSuggestionOnCommitCharacter: IEditorOption<EditorOption.acceptSuggestionOnCommitCharacter, boolean>;
|
|
4136
4341
|
acceptSuggestionOnEnter: IEditorOption<EditorOption.acceptSuggestionOnEnter, 'on' | 'off' | 'smart'>;
|
|
@@ -4144,13 +4349,15 @@ declare namespace monaco.editor {
|
|
|
4144
4349
|
autoIndent: IEditorOption<EditorOption.autoIndent, EditorAutoIndentStrategy>;
|
|
4145
4350
|
automaticLayout: IEditorOption<EditorOption.automaticLayout, boolean>;
|
|
4146
4351
|
autoSurround: IEditorOption<EditorOption.autoSurround, 'languageDefined' | 'never' | 'quotes' | 'brackets'>;
|
|
4352
|
+
bracketPairColorization: IEditorOption<EditorOption.bracketPairColorization, Readonly<Required<IBracketPairColorizationOptions>>>;
|
|
4353
|
+
bracketPairGuides: IEditorOption<EditorOption.guides, Readonly<Required<IGuidesOptions>>>;
|
|
4147
4354
|
stickyTabStops: IEditorOption<EditorOption.stickyTabStops, boolean>;
|
|
4148
4355
|
codeLens: IEditorOption<EditorOption.codeLens, boolean>;
|
|
4149
4356
|
codeLensFontFamily: IEditorOption<EditorOption.codeLensFontFamily, string>;
|
|
4150
4357
|
codeLensFontSize: IEditorOption<EditorOption.codeLensFontSize, number>;
|
|
4151
4358
|
colorDecorators: IEditorOption<EditorOption.colorDecorators, boolean>;
|
|
4152
4359
|
columnSelection: IEditorOption<EditorOption.columnSelection, boolean>;
|
|
4153
|
-
comments: IEditorOption<EditorOption.comments,
|
|
4360
|
+
comments: IEditorOption<EditorOption.comments, Readonly<Required<IEditorCommentsOptions>>>;
|
|
4154
4361
|
contextmenu: IEditorOption<EditorOption.contextmenu, boolean>;
|
|
4155
4362
|
copyWithSyntaxHighlighting: IEditorOption<EditorOption.copyWithSyntaxHighlighting, boolean>;
|
|
4156
4363
|
cursorBlinking: IEditorOption<EditorOption.cursorBlinking, TextEditorCursorBlinkingStyle>;
|
|
@@ -4166,11 +4373,13 @@ declare namespace monaco.editor {
|
|
|
4166
4373
|
emptySelectionClipboard: IEditorOption<EditorOption.emptySelectionClipboard, boolean>;
|
|
4167
4374
|
extraEditorClassName: IEditorOption<EditorOption.extraEditorClassName, string>;
|
|
4168
4375
|
fastScrollSensitivity: IEditorOption<EditorOption.fastScrollSensitivity, number>;
|
|
4169
|
-
find: IEditorOption<EditorOption.find,
|
|
4376
|
+
find: IEditorOption<EditorOption.find, Readonly<Required<IEditorFindOptions>>>;
|
|
4170
4377
|
fixedOverflowWidgets: IEditorOption<EditorOption.fixedOverflowWidgets, boolean>;
|
|
4171
4378
|
folding: IEditorOption<EditorOption.folding, boolean>;
|
|
4172
4379
|
foldingStrategy: IEditorOption<EditorOption.foldingStrategy, 'auto' | 'indentation'>;
|
|
4173
4380
|
foldingHighlight: IEditorOption<EditorOption.foldingHighlight, boolean>;
|
|
4381
|
+
foldingImportsByDefault: IEditorOption<EditorOption.foldingImportsByDefault, boolean>;
|
|
4382
|
+
foldingMaximumRegions: IEditorOption<EditorOption.foldingMaximumRegions, number>;
|
|
4174
4383
|
unfoldOnClickAfterEndOfLine: IEditorOption<EditorOption.unfoldOnClickAfterEndOfLine, boolean>;
|
|
4175
4384
|
fontFamily: IEditorOption<EditorOption.fontFamily, string>;
|
|
4176
4385
|
fontInfo: IEditorOption<EditorOption.fontInfo, FontInfo>;
|
|
@@ -4180,13 +4389,12 @@ declare namespace monaco.editor {
|
|
|
4180
4389
|
formatOnPaste: IEditorOption<EditorOption.formatOnPaste, boolean>;
|
|
4181
4390
|
formatOnType: IEditorOption<EditorOption.formatOnType, boolean>;
|
|
4182
4391
|
glyphMargin: IEditorOption<EditorOption.glyphMargin, boolean>;
|
|
4183
|
-
gotoLocation: IEditorOption<EditorOption.gotoLocation,
|
|
4392
|
+
gotoLocation: IEditorOption<EditorOption.gotoLocation, Readonly<Required<IGotoLocationOptions>>>;
|
|
4184
4393
|
hideCursorInOverviewRuler: IEditorOption<EditorOption.hideCursorInOverviewRuler, boolean>;
|
|
4185
|
-
|
|
4186
|
-
hover: IEditorOption<EditorOption.hover, EditorHoverOptions>;
|
|
4394
|
+
hover: IEditorOption<EditorOption.hover, Readonly<Required<IEditorHoverOptions>>>;
|
|
4187
4395
|
inDiffEditor: IEditorOption<EditorOption.inDiffEditor, boolean>;
|
|
4188
4396
|
letterSpacing: IEditorOption<EditorOption.letterSpacing, number>;
|
|
4189
|
-
lightbulb: IEditorOption<EditorOption.lightbulb,
|
|
4397
|
+
lightbulb: IEditorOption<EditorOption.lightbulb, Readonly<Required<IEditorLightbulbOptions>>>;
|
|
4190
4398
|
lineDecorationsWidth: IEditorOption<EditorOption.lineDecorationsWidth, string | number>;
|
|
4191
4399
|
lineHeight: IEditorOption<EditorOption.lineHeight, number>;
|
|
4192
4400
|
lineNumbers: IEditorOption<EditorOption.lineNumbers, InternalEditorRenderLineNumbersOptions>;
|
|
@@ -4194,7 +4402,7 @@ declare namespace monaco.editor {
|
|
|
4194
4402
|
linkedEditing: IEditorOption<EditorOption.linkedEditing, boolean>;
|
|
4195
4403
|
links: IEditorOption<EditorOption.links, boolean>;
|
|
4196
4404
|
matchBrackets: IEditorOption<EditorOption.matchBrackets, 'always' | 'never' | 'near'>;
|
|
4197
|
-
minimap: IEditorOption<EditorOption.minimap,
|
|
4405
|
+
minimap: IEditorOption<EditorOption.minimap, Readonly<Required<IEditorMinimapOptions>>>;
|
|
4198
4406
|
mouseStyle: IEditorOption<EditorOption.mouseStyle, 'default' | 'text' | 'copy'>;
|
|
4199
4407
|
mouseWheelScrollSensitivity: IEditorOption<EditorOption.mouseWheelScrollSensitivity, number>;
|
|
4200
4408
|
mouseWheelZoom: IEditorOption<EditorOption.mouseWheelZoom, boolean>;
|
|
@@ -4204,16 +4412,15 @@ declare namespace monaco.editor {
|
|
|
4204
4412
|
occurrencesHighlight: IEditorOption<EditorOption.occurrencesHighlight, boolean>;
|
|
4205
4413
|
overviewRulerBorder: IEditorOption<EditorOption.overviewRulerBorder, boolean>;
|
|
4206
4414
|
overviewRulerLanes: IEditorOption<EditorOption.overviewRulerLanes, number>;
|
|
4207
|
-
padding: IEditorOption<EditorOption.padding,
|
|
4208
|
-
parameterHints: IEditorOption<EditorOption.parameterHints,
|
|
4415
|
+
padding: IEditorOption<EditorOption.padding, Readonly<Required<IEditorPaddingOptions>>>;
|
|
4416
|
+
parameterHints: IEditorOption<EditorOption.parameterHints, Readonly<Required<IEditorParameterHintOptions>>>;
|
|
4209
4417
|
peekWidgetDefaultFocus: IEditorOption<EditorOption.peekWidgetDefaultFocus, 'tree' | 'editor'>;
|
|
4210
4418
|
definitionLinkOpensInPeek: IEditorOption<EditorOption.definitionLinkOpensInPeek, boolean>;
|
|
4211
|
-
quickSuggestions: IEditorOption<EditorOption.quickSuggestions,
|
|
4419
|
+
quickSuggestions: IEditorOption<EditorOption.quickSuggestions, any>;
|
|
4212
4420
|
quickSuggestionsDelay: IEditorOption<EditorOption.quickSuggestionsDelay, number>;
|
|
4213
4421
|
readOnly: IEditorOption<EditorOption.readOnly, boolean>;
|
|
4214
4422
|
renameOnType: IEditorOption<EditorOption.renameOnType, boolean>;
|
|
4215
4423
|
renderControlCharacters: IEditorOption<EditorOption.renderControlCharacters, boolean>;
|
|
4216
|
-
renderIndentGuides: IEditorOption<EditorOption.renderIndentGuides, boolean>;
|
|
4217
4424
|
renderFinalNewline: IEditorOption<EditorOption.renderFinalNewline, boolean>;
|
|
4218
4425
|
renderLineHighlight: IEditorOption<EditorOption.renderLineHighlight, 'all' | 'line' | 'none' | 'gutter'>;
|
|
4219
4426
|
renderLineHighlightOnlyWhenFocus: IEditorOption<EditorOption.renderLineHighlightOnlyWhenFocus, boolean>;
|
|
@@ -4232,18 +4439,20 @@ declare namespace monaco.editor {
|
|
|
4232
4439
|
showFoldingControls: IEditorOption<EditorOption.showFoldingControls, 'always' | 'mouseover'>;
|
|
4233
4440
|
showUnused: IEditorOption<EditorOption.showUnused, boolean>;
|
|
4234
4441
|
showDeprecated: IEditorOption<EditorOption.showDeprecated, boolean>;
|
|
4235
|
-
|
|
4442
|
+
inlayHints: IEditorOption<EditorOption.inlayHints, Readonly<Required<IEditorInlayHintsOptions>>>;
|
|
4236
4443
|
snippetSuggestions: IEditorOption<EditorOption.snippetSuggestions, 'none' | 'top' | 'bottom' | 'inline'>;
|
|
4237
|
-
smartSelect: IEditorOption<EditorOption.smartSelect,
|
|
4444
|
+
smartSelect: IEditorOption<EditorOption.smartSelect, Readonly<Required<ISmartSelectOptions>>>;
|
|
4238
4445
|
smoothScrolling: IEditorOption<EditorOption.smoothScrolling, boolean>;
|
|
4239
4446
|
stopRenderingLineAfter: IEditorOption<EditorOption.stopRenderingLineAfter, number>;
|
|
4240
|
-
suggest: IEditorOption<EditorOption.suggest,
|
|
4447
|
+
suggest: IEditorOption<EditorOption.suggest, Readonly<Required<ISuggestOptions>>>;
|
|
4448
|
+
inlineSuggest: IEditorOption<EditorOption.inlineSuggest, Readonly<Required<IInlineSuggestOptions>>>;
|
|
4241
4449
|
suggestFontSize: IEditorOption<EditorOption.suggestFontSize, number>;
|
|
4242
4450
|
suggestLineHeight: IEditorOption<EditorOption.suggestLineHeight, number>;
|
|
4243
4451
|
suggestOnTriggerCharacters: IEditorOption<EditorOption.suggestOnTriggerCharacters, boolean>;
|
|
4244
4452
|
suggestSelection: IEditorOption<EditorOption.suggestSelection, 'first' | 'recentlyUsed' | 'recentlyUsedByPrefix'>;
|
|
4245
4453
|
tabCompletion: IEditorOption<EditorOption.tabCompletion, 'on' | 'off' | 'onlySnippets'>;
|
|
4246
4454
|
tabIndex: IEditorOption<EditorOption.tabIndex, number>;
|
|
4455
|
+
unicodeHighlight: IEditorOption<EditorOption.unicodeHighlighting, Required<Readonly<IUnicodeHighlightOptions>>>;
|
|
4247
4456
|
unusualLineTerminators: IEditorOption<EditorOption.unusualLineTerminators, 'auto' | 'off' | 'prompt'>;
|
|
4248
4457
|
useShadowDOM: IEditorOption<EditorOption.useShadowDOM, boolean>;
|
|
4249
4458
|
useTabStops: IEditorOption<EditorOption.useTabStops, boolean>;
|
|
@@ -4273,6 +4482,18 @@ declare namespace monaco.editor {
|
|
|
4273
4482
|
|
|
4274
4483
|
export type FindComputedEditorOptionValueById<T extends EditorOption> = NonNullable<ComputedEditorOptionValue<EditorOptionsType[FindEditorOptionsKeyById<T>]>>;
|
|
4275
4484
|
|
|
4485
|
+
export interface IEditorConstructionOptions extends IEditorOptions {
|
|
4486
|
+
/**
|
|
4487
|
+
* The initial editor dimension (to avoid measuring the container).
|
|
4488
|
+
*/
|
|
4489
|
+
dimension?: IDimension;
|
|
4490
|
+
/**
|
|
4491
|
+
* Place overflow widgets inside an external DOM node.
|
|
4492
|
+
* Defaults to an internal DOM node.
|
|
4493
|
+
*/
|
|
4494
|
+
overflowWidgetsDomNode?: HTMLElement;
|
|
4495
|
+
}
|
|
4496
|
+
|
|
4276
4497
|
/**
|
|
4277
4498
|
* A view zone is a full horizontal rectangle that 'pushes' text down.
|
|
4278
4499
|
* The editor reserves space for view zones when rendering.
|
|
@@ -4286,8 +4507,13 @@ declare namespace monaco.editor {
|
|
|
4286
4507
|
/**
|
|
4287
4508
|
* The column after which this zone should appear.
|
|
4288
4509
|
* If not set, the maxLineColumn of `afterLineNumber` will be used.
|
|
4510
|
+
* This is relevant for wrapped lines.
|
|
4289
4511
|
*/
|
|
4290
4512
|
afterColumn?: number;
|
|
4513
|
+
/**
|
|
4514
|
+
* If the `afterColumn` has multiple view columns, the affinity specifies which one to use. Defaults to `none`.
|
|
4515
|
+
*/
|
|
4516
|
+
afterColumnAffinity?: PositionAffinity;
|
|
4291
4517
|
/**
|
|
4292
4518
|
* Suppress mouse down events.
|
|
4293
4519
|
* If set, the editor will attach a mouse down listener to the view zone and .preventDefault on it.
|
|
@@ -4397,6 +4623,9 @@ declare namespace monaco.editor {
|
|
|
4397
4623
|
* Render this content widget in a location where it could overflow the editor's view dom node.
|
|
4398
4624
|
*/
|
|
4399
4625
|
allowEditorOverflow?: boolean;
|
|
4626
|
+
/**
|
|
4627
|
+
* Call preventDefault() on mousedown events that target the content widget.
|
|
4628
|
+
*/
|
|
4400
4629
|
suppressMouseDown?: boolean;
|
|
4401
4630
|
/**
|
|
4402
4631
|
* Get a unique identifier of the content widget.
|
|
@@ -4534,18 +4763,11 @@ declare namespace monaco.editor {
|
|
|
4534
4763
|
OUTSIDE_EDITOR = 13
|
|
4535
4764
|
}
|
|
4536
4765
|
|
|
4537
|
-
|
|
4538
|
-
* Target hit with the mouse in the editor.
|
|
4539
|
-
*/
|
|
4540
|
-
export interface IMouseTarget {
|
|
4766
|
+
export interface IBaseMouseTarget {
|
|
4541
4767
|
/**
|
|
4542
4768
|
* The target element
|
|
4543
4769
|
*/
|
|
4544
4770
|
readonly element: Element | null;
|
|
4545
|
-
/**
|
|
4546
|
-
* The target type
|
|
4547
|
-
*/
|
|
4548
|
-
readonly type: MouseTargetType;
|
|
4549
4771
|
/**
|
|
4550
4772
|
* The 'approximate' editor position
|
|
4551
4773
|
*/
|
|
@@ -4558,12 +4780,104 @@ declare namespace monaco.editor {
|
|
|
4558
4780
|
* The 'approximate' editor range
|
|
4559
4781
|
*/
|
|
4560
4782
|
readonly range: Range | null;
|
|
4561
|
-
/**
|
|
4562
|
-
* Some extra detail.
|
|
4563
|
-
*/
|
|
4564
|
-
readonly detail: any;
|
|
4565
4783
|
}
|
|
4566
4784
|
|
|
4785
|
+
export interface IMouseTargetUnknown extends IBaseMouseTarget {
|
|
4786
|
+
readonly type: MouseTargetType.UNKNOWN;
|
|
4787
|
+
}
|
|
4788
|
+
|
|
4789
|
+
export interface IMouseTargetTextarea extends IBaseMouseTarget {
|
|
4790
|
+
readonly type: MouseTargetType.TEXTAREA;
|
|
4791
|
+
readonly position: null;
|
|
4792
|
+
readonly range: null;
|
|
4793
|
+
}
|
|
4794
|
+
|
|
4795
|
+
export interface IMouseTargetMarginData {
|
|
4796
|
+
readonly isAfterLines: boolean;
|
|
4797
|
+
readonly glyphMarginLeft: number;
|
|
4798
|
+
readonly glyphMarginWidth: number;
|
|
4799
|
+
readonly lineNumbersWidth: number;
|
|
4800
|
+
readonly offsetX: number;
|
|
4801
|
+
}
|
|
4802
|
+
|
|
4803
|
+
export interface IMouseTargetMargin extends IBaseMouseTarget {
|
|
4804
|
+
readonly type: MouseTargetType.GUTTER_GLYPH_MARGIN | MouseTargetType.GUTTER_LINE_NUMBERS | MouseTargetType.GUTTER_LINE_DECORATIONS;
|
|
4805
|
+
readonly position: Position;
|
|
4806
|
+
readonly range: Range;
|
|
4807
|
+
readonly detail: IMouseTargetMarginData;
|
|
4808
|
+
}
|
|
4809
|
+
|
|
4810
|
+
export interface IMouseTargetViewZoneData {
|
|
4811
|
+
readonly viewZoneId: string;
|
|
4812
|
+
readonly positionBefore: Position | null;
|
|
4813
|
+
readonly positionAfter: Position | null;
|
|
4814
|
+
readonly position: Position;
|
|
4815
|
+
readonly afterLineNumber: number;
|
|
4816
|
+
}
|
|
4817
|
+
|
|
4818
|
+
export interface IMouseTargetViewZone extends IBaseMouseTarget {
|
|
4819
|
+
readonly type: MouseTargetType.GUTTER_VIEW_ZONE | MouseTargetType.CONTENT_VIEW_ZONE;
|
|
4820
|
+
readonly position: Position;
|
|
4821
|
+
readonly range: Range;
|
|
4822
|
+
readonly detail: IMouseTargetViewZoneData;
|
|
4823
|
+
}
|
|
4824
|
+
|
|
4825
|
+
export interface IMouseTargetContentTextData {
|
|
4826
|
+
readonly mightBeForeignElement: boolean;
|
|
4827
|
+
}
|
|
4828
|
+
|
|
4829
|
+
export interface IMouseTargetContentText extends IBaseMouseTarget {
|
|
4830
|
+
readonly type: MouseTargetType.CONTENT_TEXT;
|
|
4831
|
+
readonly position: Position;
|
|
4832
|
+
readonly range: Range;
|
|
4833
|
+
readonly detail: IMouseTargetContentTextData;
|
|
4834
|
+
}
|
|
4835
|
+
|
|
4836
|
+
export interface IMouseTargetContentEmptyData {
|
|
4837
|
+
readonly isAfterLines: boolean;
|
|
4838
|
+
readonly horizontalDistanceToText?: number;
|
|
4839
|
+
}
|
|
4840
|
+
|
|
4841
|
+
export interface IMouseTargetContentEmpty extends IBaseMouseTarget {
|
|
4842
|
+
readonly type: MouseTargetType.CONTENT_EMPTY;
|
|
4843
|
+
readonly position: Position;
|
|
4844
|
+
readonly range: Range;
|
|
4845
|
+
readonly detail: IMouseTargetContentEmptyData;
|
|
4846
|
+
}
|
|
4847
|
+
|
|
4848
|
+
export interface IMouseTargetContentWidget extends IBaseMouseTarget {
|
|
4849
|
+
readonly type: MouseTargetType.CONTENT_WIDGET;
|
|
4850
|
+
readonly position: null;
|
|
4851
|
+
readonly range: null;
|
|
4852
|
+
readonly detail: string;
|
|
4853
|
+
}
|
|
4854
|
+
|
|
4855
|
+
export interface IMouseTargetOverlayWidget extends IBaseMouseTarget {
|
|
4856
|
+
readonly type: MouseTargetType.OVERLAY_WIDGET;
|
|
4857
|
+
readonly position: null;
|
|
4858
|
+
readonly range: null;
|
|
4859
|
+
readonly detail: string;
|
|
4860
|
+
}
|
|
4861
|
+
|
|
4862
|
+
export interface IMouseTargetScrollbar extends IBaseMouseTarget {
|
|
4863
|
+
readonly type: MouseTargetType.SCROLLBAR;
|
|
4864
|
+
readonly position: Position;
|
|
4865
|
+
readonly range: Range;
|
|
4866
|
+
}
|
|
4867
|
+
|
|
4868
|
+
export interface IMouseTargetOverviewRuler extends IBaseMouseTarget {
|
|
4869
|
+
readonly type: MouseTargetType.OVERVIEW_RULER;
|
|
4870
|
+
}
|
|
4871
|
+
|
|
4872
|
+
export interface IMouseTargetOutsideEditor extends IBaseMouseTarget {
|
|
4873
|
+
readonly type: MouseTargetType.OUTSIDE_EDITOR;
|
|
4874
|
+
}
|
|
4875
|
+
|
|
4876
|
+
/**
|
|
4877
|
+
* Target hit with the mouse in the editor.
|
|
4878
|
+
*/
|
|
4879
|
+
export type IMouseTarget = (IMouseTargetUnknown | IMouseTargetTextarea | IMouseTargetMargin | IMouseTargetViewZone | IMouseTargetContentText | IMouseTargetContentEmpty | IMouseTargetContentWidget | IMouseTargetOverlayWidget | IMouseTargetScrollbar | IMouseTargetOverviewRuler | IMouseTargetOutsideEditor);
|
|
4880
|
+
|
|
4567
4881
|
/**
|
|
4568
4882
|
* A mouse event originating from the editor.
|
|
4569
4883
|
*/
|
|
@@ -4582,10 +4896,10 @@ declare namespace monaco.editor {
|
|
|
4582
4896
|
*/
|
|
4583
4897
|
export interface IPasteEvent {
|
|
4584
4898
|
readonly range: Range;
|
|
4585
|
-
readonly
|
|
4899
|
+
readonly languageId: string | null;
|
|
4586
4900
|
}
|
|
4587
4901
|
|
|
4588
|
-
export interface
|
|
4902
|
+
export interface IDiffEditorConstructionOptions extends IDiffEditorOptions {
|
|
4589
4903
|
/**
|
|
4590
4904
|
* The initial editor dimension (to avoid measuring the container).
|
|
4591
4905
|
*/
|
|
@@ -4595,18 +4909,19 @@ declare namespace monaco.editor {
|
|
|
4595
4909
|
* Defaults to an internal DOM node.
|
|
4596
4910
|
*/
|
|
4597
4911
|
overflowWidgetsDomNode?: HTMLElement;
|
|
4598
|
-
}
|
|
4599
|
-
|
|
4600
|
-
export interface IDiffEditorConstructionOptions extends IDiffEditorOptions {
|
|
4601
4912
|
/**
|
|
4602
|
-
*
|
|
4913
|
+
* Aria label for original editor.
|
|
4603
4914
|
*/
|
|
4604
|
-
|
|
4915
|
+
originalAriaLabel?: string;
|
|
4605
4916
|
/**
|
|
4606
|
-
*
|
|
4607
|
-
* Defaults to an internal DOM node.
|
|
4917
|
+
* Aria label for modified editor.
|
|
4608
4918
|
*/
|
|
4609
|
-
|
|
4919
|
+
modifiedAriaLabel?: string;
|
|
4920
|
+
/**
|
|
4921
|
+
* Is the diff editor inside another editor
|
|
4922
|
+
* Defaults to false
|
|
4923
|
+
*/
|
|
4924
|
+
isInEmbeddedEditor?: boolean;
|
|
4610
4925
|
}
|
|
4611
4926
|
|
|
4612
4927
|
/**
|
|
@@ -4617,135 +4932,140 @@ declare namespace monaco.editor {
|
|
|
4617
4932
|
* An event emitted when the content of the current model has changed.
|
|
4618
4933
|
* @event
|
|
4619
4934
|
*/
|
|
4620
|
-
onDidChangeModelContent
|
|
4935
|
+
readonly onDidChangeModelContent: IEvent<IModelContentChangedEvent>;
|
|
4621
4936
|
/**
|
|
4622
4937
|
* An event emitted when the language of the current model has changed.
|
|
4623
4938
|
* @event
|
|
4624
4939
|
*/
|
|
4625
|
-
onDidChangeModelLanguage
|
|
4940
|
+
readonly onDidChangeModelLanguage: IEvent<IModelLanguageChangedEvent>;
|
|
4626
4941
|
/**
|
|
4627
4942
|
* An event emitted when the language configuration of the current model has changed.
|
|
4628
4943
|
* @event
|
|
4629
4944
|
*/
|
|
4630
|
-
onDidChangeModelLanguageConfiguration
|
|
4945
|
+
readonly onDidChangeModelLanguageConfiguration: IEvent<IModelLanguageConfigurationChangedEvent>;
|
|
4631
4946
|
/**
|
|
4632
4947
|
* An event emitted when the options of the current model has changed.
|
|
4633
4948
|
* @event
|
|
4634
4949
|
*/
|
|
4635
|
-
onDidChangeModelOptions
|
|
4950
|
+
readonly onDidChangeModelOptions: IEvent<IModelOptionsChangedEvent>;
|
|
4636
4951
|
/**
|
|
4637
4952
|
* An event emitted when the configuration of the editor has changed. (e.g. `editor.updateOptions()`)
|
|
4638
4953
|
* @event
|
|
4639
4954
|
*/
|
|
4640
|
-
onDidChangeConfiguration
|
|
4955
|
+
readonly onDidChangeConfiguration: IEvent<ConfigurationChangedEvent>;
|
|
4641
4956
|
/**
|
|
4642
4957
|
* An event emitted when the cursor position has changed.
|
|
4643
4958
|
* @event
|
|
4644
4959
|
*/
|
|
4645
|
-
onDidChangeCursorPosition
|
|
4960
|
+
readonly onDidChangeCursorPosition: IEvent<ICursorPositionChangedEvent>;
|
|
4646
4961
|
/**
|
|
4647
4962
|
* An event emitted when the cursor selection has changed.
|
|
4648
4963
|
* @event
|
|
4649
4964
|
*/
|
|
4650
|
-
onDidChangeCursorSelection
|
|
4965
|
+
readonly onDidChangeCursorSelection: IEvent<ICursorSelectionChangedEvent>;
|
|
4651
4966
|
/**
|
|
4652
4967
|
* An event emitted when the model of this editor has changed (e.g. `editor.setModel()`).
|
|
4653
4968
|
* @event
|
|
4654
4969
|
*/
|
|
4655
|
-
onDidChangeModel
|
|
4970
|
+
readonly onDidChangeModel: IEvent<IModelChangedEvent>;
|
|
4656
4971
|
/**
|
|
4657
4972
|
* An event emitted when the decorations of the current model have changed.
|
|
4658
4973
|
* @event
|
|
4659
4974
|
*/
|
|
4660
|
-
onDidChangeModelDecorations
|
|
4975
|
+
readonly onDidChangeModelDecorations: IEvent<IModelDecorationsChangedEvent>;
|
|
4661
4976
|
/**
|
|
4662
4977
|
* An event emitted when the text inside this editor gained focus (i.e. cursor starts blinking).
|
|
4663
4978
|
* @event
|
|
4664
4979
|
*/
|
|
4665
|
-
onDidFocusEditorText
|
|
4980
|
+
readonly onDidFocusEditorText: IEvent<void>;
|
|
4666
4981
|
/**
|
|
4667
4982
|
* An event emitted when the text inside this editor lost focus (i.e. cursor stops blinking).
|
|
4668
4983
|
* @event
|
|
4669
4984
|
*/
|
|
4670
|
-
onDidBlurEditorText
|
|
4985
|
+
readonly onDidBlurEditorText: IEvent<void>;
|
|
4671
4986
|
/**
|
|
4672
4987
|
* An event emitted when the text inside this editor or an editor widget gained focus.
|
|
4673
4988
|
* @event
|
|
4674
4989
|
*/
|
|
4675
|
-
onDidFocusEditorWidget
|
|
4990
|
+
readonly onDidFocusEditorWidget: IEvent<void>;
|
|
4676
4991
|
/**
|
|
4677
4992
|
* An event emitted when the text inside this editor or an editor widget lost focus.
|
|
4678
4993
|
* @event
|
|
4679
4994
|
*/
|
|
4680
|
-
onDidBlurEditorWidget
|
|
4995
|
+
readonly onDidBlurEditorWidget: IEvent<void>;
|
|
4681
4996
|
/**
|
|
4682
4997
|
* An event emitted after composition has started.
|
|
4683
4998
|
*/
|
|
4684
|
-
onDidCompositionStart
|
|
4999
|
+
readonly onDidCompositionStart: IEvent<void>;
|
|
4685
5000
|
/**
|
|
4686
5001
|
* An event emitted after composition has ended.
|
|
4687
5002
|
*/
|
|
4688
|
-
onDidCompositionEnd
|
|
5003
|
+
readonly onDidCompositionEnd: IEvent<void>;
|
|
4689
5004
|
/**
|
|
4690
5005
|
* An event emitted when editing failed because the editor is read-only.
|
|
4691
5006
|
* @event
|
|
4692
5007
|
*/
|
|
4693
|
-
onDidAttemptReadOnlyEdit
|
|
5008
|
+
readonly onDidAttemptReadOnlyEdit: IEvent<void>;
|
|
4694
5009
|
/**
|
|
4695
5010
|
* An event emitted when users paste text in the editor.
|
|
4696
5011
|
* @event
|
|
4697
5012
|
*/
|
|
4698
|
-
onDidPaste
|
|
5013
|
+
readonly onDidPaste: IEvent<IPasteEvent>;
|
|
4699
5014
|
/**
|
|
4700
5015
|
* An event emitted on a "mouseup".
|
|
4701
5016
|
* @event
|
|
4702
5017
|
*/
|
|
4703
|
-
onMouseUp
|
|
5018
|
+
readonly onMouseUp: IEvent<IEditorMouseEvent>;
|
|
4704
5019
|
/**
|
|
4705
5020
|
* An event emitted on a "mousedown".
|
|
4706
5021
|
* @event
|
|
4707
5022
|
*/
|
|
4708
|
-
onMouseDown
|
|
5023
|
+
readonly onMouseDown: IEvent<IEditorMouseEvent>;
|
|
4709
5024
|
/**
|
|
4710
5025
|
* An event emitted on a "contextmenu".
|
|
4711
5026
|
* @event
|
|
4712
5027
|
*/
|
|
4713
|
-
onContextMenu
|
|
5028
|
+
readonly onContextMenu: IEvent<IEditorMouseEvent>;
|
|
4714
5029
|
/**
|
|
4715
5030
|
* An event emitted on a "mousemove".
|
|
4716
5031
|
* @event
|
|
4717
5032
|
*/
|
|
4718
|
-
onMouseMove
|
|
5033
|
+
readonly onMouseMove: IEvent<IEditorMouseEvent>;
|
|
4719
5034
|
/**
|
|
4720
5035
|
* An event emitted on a "mouseleave".
|
|
4721
5036
|
* @event
|
|
4722
5037
|
*/
|
|
4723
|
-
onMouseLeave
|
|
5038
|
+
readonly onMouseLeave: IEvent<IPartialEditorMouseEvent>;
|
|
4724
5039
|
/**
|
|
4725
5040
|
* An event emitted on a "keyup".
|
|
4726
5041
|
* @event
|
|
4727
5042
|
*/
|
|
4728
|
-
onKeyUp
|
|
5043
|
+
readonly onKeyUp: IEvent<IKeyboardEvent>;
|
|
4729
5044
|
/**
|
|
4730
5045
|
* An event emitted on a "keydown".
|
|
4731
5046
|
* @event
|
|
4732
5047
|
*/
|
|
4733
|
-
onKeyDown
|
|
5048
|
+
readonly onKeyDown: IEvent<IKeyboardEvent>;
|
|
4734
5049
|
/**
|
|
4735
5050
|
* An event emitted when the layout of the editor has changed.
|
|
4736
5051
|
* @event
|
|
4737
5052
|
*/
|
|
4738
|
-
onDidLayoutChange
|
|
5053
|
+
readonly onDidLayoutChange: IEvent<EditorLayoutInfo>;
|
|
4739
5054
|
/**
|
|
4740
5055
|
* An event emitted when the content width or content height in the editor has changed.
|
|
4741
5056
|
* @event
|
|
4742
5057
|
*/
|
|
4743
|
-
onDidContentSizeChange
|
|
5058
|
+
readonly onDidContentSizeChange: IEvent<IContentSizeChangedEvent>;
|
|
4744
5059
|
/**
|
|
4745
5060
|
* An event emitted when the scroll in the editor has changed.
|
|
4746
5061
|
* @event
|
|
4747
5062
|
*/
|
|
4748
|
-
onDidScrollChange
|
|
5063
|
+
readonly onDidScrollChange: IEvent<IScrollEvent>;
|
|
5064
|
+
/**
|
|
5065
|
+
* An event emitted when hidden areas change in the editor (e.g. due to folding).
|
|
5066
|
+
* @event
|
|
5067
|
+
*/
|
|
5068
|
+
readonly onDidChangeHiddenAreas: IEvent<void>;
|
|
4749
5069
|
/**
|
|
4750
5070
|
* Saves current view state of the editor in a serializable object.
|
|
4751
5071
|
*/
|
|
@@ -4763,7 +5083,7 @@ declare namespace monaco.editor {
|
|
|
4763
5083
|
* @id Unique identifier of the contribution.
|
|
4764
5084
|
* @return The contribution or null if contribution not found.
|
|
4765
5085
|
*/
|
|
4766
|
-
getContribution<T extends IEditorContribution>(id: string): T;
|
|
5086
|
+
getContribution<T extends IEditorContribution>(id: string): T | null;
|
|
4767
5087
|
/**
|
|
4768
5088
|
* Type the getModel() of IEditor.
|
|
4769
5089
|
*/
|
|
@@ -4791,7 +5111,7 @@ declare namespace monaco.editor {
|
|
|
4791
5111
|
getRawOptions(): IEditorOptions;
|
|
4792
5112
|
/**
|
|
4793
5113
|
* Get value of the current model attached to this editor.
|
|
4794
|
-
* @see
|
|
5114
|
+
* @see {@link ITextModel.getValue}
|
|
4795
5115
|
*/
|
|
4796
5116
|
getValue(options?: {
|
|
4797
5117
|
preserveBOM: boolean;
|
|
@@ -4799,7 +5119,7 @@ declare namespace monaco.editor {
|
|
|
4799
5119
|
}): string;
|
|
4800
5120
|
/**
|
|
4801
5121
|
* Set the value of the current model attached to this editor.
|
|
4802
|
-
* @see
|
|
5122
|
+
* @see {@link ITextModel.setValue}
|
|
4803
5123
|
*/
|
|
4804
5124
|
setValue(newValue: string): void;
|
|
4805
5125
|
/**
|
|
@@ -4879,9 +5199,13 @@ declare namespace monaco.editor {
|
|
|
4879
5199
|
* Get all the decorations on a line (filtering out decorations from other editors).
|
|
4880
5200
|
*/
|
|
4881
5201
|
getLineDecorations(lineNumber: number): IModelDecoration[] | null;
|
|
5202
|
+
/**
|
|
5203
|
+
* Get all the decorations for a range (filtering out decorations from other editors).
|
|
5204
|
+
*/
|
|
5205
|
+
getDecorationsInRange(range: Range): IModelDecoration[] | null;
|
|
4882
5206
|
/**
|
|
4883
5207
|
* All decorations added through this call will get the ownerId of this editor.
|
|
4884
|
-
* @see
|
|
5208
|
+
* @see {@link ITextModel.deltaDecorations}
|
|
4885
5209
|
*/
|
|
4886
5210
|
deltaDecorations(oldDecorations: string[], newDecorations: IModelDeltaDecoration[]): string[];
|
|
4887
5211
|
/**
|
|
@@ -4972,6 +5296,7 @@ declare namespace monaco.editor {
|
|
|
4972
5296
|
* Apply the same font settings as the editor to `target`.
|
|
4973
5297
|
*/
|
|
4974
5298
|
applyFontInfo(target: HTMLElement): void;
|
|
5299
|
+
setBanner(bannerDomNode: HTMLElement | null, height: number): void;
|
|
4975
5300
|
}
|
|
4976
5301
|
|
|
4977
5302
|
/**
|
|
@@ -4986,14 +5311,14 @@ declare namespace monaco.editor {
|
|
|
4986
5311
|
*/
|
|
4987
5312
|
export interface IDiffEditor extends IEditor {
|
|
4988
5313
|
/**
|
|
4989
|
-
* @see ICodeEditor.
|
|
5314
|
+
* @see {@link ICodeEditor.getContainerDomNode}
|
|
4990
5315
|
*/
|
|
4991
|
-
|
|
5316
|
+
getContainerDomNode(): HTMLElement;
|
|
4992
5317
|
/**
|
|
4993
5318
|
* An event emitted when the diff information computed by this diff editor has been updated.
|
|
4994
5319
|
* @event
|
|
4995
5320
|
*/
|
|
4996
|
-
onDidUpdateDiff
|
|
5321
|
+
readonly onDidUpdateDiff: IEvent<void>;
|
|
4997
5322
|
/**
|
|
4998
5323
|
* Saves current view state of the editor in a serializable object.
|
|
4999
5324
|
*/
|
|
@@ -5059,7 +5384,6 @@ declare namespace monaco.editor {
|
|
|
5059
5384
|
|
|
5060
5385
|
export class BareFontInfo {
|
|
5061
5386
|
readonly _bareFontInfoBrand: void;
|
|
5062
|
-
readonly zoomLevel: number;
|
|
5063
5387
|
readonly pixelRatio: number;
|
|
5064
5388
|
readonly fontFamily: string;
|
|
5065
5389
|
readonly fontWeight: string;
|
|
@@ -5077,6 +5401,35 @@ declare namespace monaco.editor {
|
|
|
5077
5401
|
declare namespace monaco.languages {
|
|
5078
5402
|
|
|
5079
5403
|
|
|
5404
|
+
export interface IRelativePattern {
|
|
5405
|
+
/**
|
|
5406
|
+
* A base file path to which this pattern will be matched against relatively.
|
|
5407
|
+
*/
|
|
5408
|
+
readonly base: string;
|
|
5409
|
+
/**
|
|
5410
|
+
* A file glob pattern like `*.{ts,js}` that will be matched on file paths
|
|
5411
|
+
* relative to the base path.
|
|
5412
|
+
*
|
|
5413
|
+
* Example: Given a base of `/home/work/folder` and a file path of `/home/work/folder/index.js`,
|
|
5414
|
+
* the file glob pattern will match on `index.js`.
|
|
5415
|
+
*/
|
|
5416
|
+
readonly pattern: string;
|
|
5417
|
+
}
|
|
5418
|
+
|
|
5419
|
+
export type LanguageSelector = string | LanguageFilter | ReadonlyArray<string | LanguageFilter>;
|
|
5420
|
+
|
|
5421
|
+
export interface LanguageFilter {
|
|
5422
|
+
readonly language?: string;
|
|
5423
|
+
readonly scheme?: string;
|
|
5424
|
+
readonly pattern?: string | IRelativePattern;
|
|
5425
|
+
readonly notebookType?: string;
|
|
5426
|
+
/**
|
|
5427
|
+
* This provider is implemented in the UI thread.
|
|
5428
|
+
*/
|
|
5429
|
+
readonly hasAccessToAllModels?: boolean;
|
|
5430
|
+
readonly exclusive?: boolean;
|
|
5431
|
+
}
|
|
5432
|
+
|
|
5080
5433
|
/**
|
|
5081
5434
|
* Register information about a new language.
|
|
5082
5435
|
*/
|
|
@@ -5090,7 +5443,7 @@ declare namespace monaco.languages {
|
|
|
5090
5443
|
export function getEncodedLanguageId(languageId: string): number;
|
|
5091
5444
|
|
|
5092
5445
|
/**
|
|
5093
|
-
* An event emitted when a language is first time
|
|
5446
|
+
* An event emitted when a language is needed for the first time (e.g. a model has it set).
|
|
5094
5447
|
* @event
|
|
5095
5448
|
*/
|
|
5096
5449
|
export function onLanguage(languageId: string, callback: () => void): IDisposable;
|
|
@@ -5136,11 +5489,11 @@ declare namespace monaco.languages {
|
|
|
5136
5489
|
* 3322 2222 2222 1111 1111 1100 0000 0000
|
|
5137
5490
|
* 1098 7654 3210 9876 5432 1098 7654 3210
|
|
5138
5491
|
* - -------------------------------------------
|
|
5139
|
-
* bbbb bbbb bfff ffff ffFF
|
|
5492
|
+
* bbbb bbbb bfff ffff ffFF FFTT LLLL LLLL
|
|
5140
5493
|
* - -------------------------------------------
|
|
5141
5494
|
* - L = EncodedLanguageId (8 bits): Use `getEncodedLanguageId` to get the encoded ID of a language.
|
|
5142
|
-
* - T = StandardTokenType (
|
|
5143
|
-
* - F = FontStyle (
|
|
5495
|
+
* - T = StandardTokenType (2 bits): Other = 0, Comment = 1, String = 2, RegEx = 3.
|
|
5496
|
+
* - F = FontStyle (4 bits): None = 0, Italic = 1, Bold = 2, Underline = 4, Strikethrough = 8.
|
|
5144
5497
|
* - f = foreground ColorId (9 bits)
|
|
5145
5498
|
* - b = background ColorId (9 bits)
|
|
5146
5499
|
* - The color value for each colorId is defined in IStandaloneThemeData.customTokenColors:
|
|
@@ -5155,6 +5508,13 @@ declare namespace monaco.languages {
|
|
|
5155
5508
|
endState: IState;
|
|
5156
5509
|
}
|
|
5157
5510
|
|
|
5511
|
+
/**
|
|
5512
|
+
* A factory for token providers.
|
|
5513
|
+
*/
|
|
5514
|
+
export interface TokensProviderFactory {
|
|
5515
|
+
create(): ProviderResult<TokensProvider | EncodedTokensProvider | IMonarchLanguage>;
|
|
5516
|
+
}
|
|
5517
|
+
|
|
5158
5518
|
/**
|
|
5159
5519
|
* A "manual" provider of tokens.
|
|
5160
5520
|
*/
|
|
@@ -5194,129 +5554,160 @@ declare namespace monaco.languages {
|
|
|
5194
5554
|
export function setColorMap(colorMap: string[] | null): void;
|
|
5195
5555
|
|
|
5196
5556
|
/**
|
|
5197
|
-
*
|
|
5557
|
+
* Register a tokens provider factory for a language. This tokenizer will be exclusive with a tokenizer
|
|
5558
|
+
* set using `setTokensProvider` or one created using `setMonarchTokensProvider`, but will work together
|
|
5559
|
+
* with a tokens provider set using `registerDocumentSemanticTokensProvider` or `registerDocumentRangeSemanticTokensProvider`.
|
|
5560
|
+
*/
|
|
5561
|
+
export function registerTokensProviderFactory(languageId: string, factory: TokensProviderFactory): IDisposable;
|
|
5562
|
+
|
|
5563
|
+
/**
|
|
5564
|
+
* Set the tokens provider for a language (manual implementation). This tokenizer will be exclusive
|
|
5565
|
+
* with a tokenizer created using `setMonarchTokensProvider`, or with `registerTokensProviderFactory`,
|
|
5566
|
+
* but will work together with a tokens provider set using `registerDocumentSemanticTokensProvider`
|
|
5567
|
+
* or `registerDocumentRangeSemanticTokensProvider`.
|
|
5198
5568
|
*/
|
|
5199
5569
|
export function setTokensProvider(languageId: string, provider: TokensProvider | EncodedTokensProvider | Thenable<TokensProvider | EncodedTokensProvider>): IDisposable;
|
|
5200
5570
|
|
|
5201
5571
|
/**
|
|
5202
|
-
* Set the tokens provider for a language (monarch implementation).
|
|
5572
|
+
* Set the tokens provider for a language (monarch implementation). This tokenizer will be exclusive
|
|
5573
|
+
* with a tokenizer set using `setTokensProvider`, or with `registerTokensProviderFactory`, but will
|
|
5574
|
+
* work together with a tokens provider set using `registerDocumentSemanticTokensProvider` or
|
|
5575
|
+
* `registerDocumentRangeSemanticTokensProvider`.
|
|
5203
5576
|
*/
|
|
5204
5577
|
export function setMonarchTokensProvider(languageId: string, languageDef: IMonarchLanguage | Thenable<IMonarchLanguage>): IDisposable;
|
|
5205
5578
|
|
|
5206
5579
|
/**
|
|
5207
5580
|
* Register a reference provider (used by e.g. reference search).
|
|
5208
5581
|
*/
|
|
5209
|
-
export function registerReferenceProvider(
|
|
5582
|
+
export function registerReferenceProvider(languageSelector: LanguageSelector, provider: ReferenceProvider): IDisposable;
|
|
5210
5583
|
|
|
5211
5584
|
/**
|
|
5212
5585
|
* Register a rename provider (used by e.g. rename symbol).
|
|
5213
5586
|
*/
|
|
5214
|
-
export function registerRenameProvider(
|
|
5587
|
+
export function registerRenameProvider(languageSelector: LanguageSelector, provider: RenameProvider): IDisposable;
|
|
5215
5588
|
|
|
5216
5589
|
/**
|
|
5217
5590
|
* Register a signature help provider (used by e.g. parameter hints).
|
|
5218
5591
|
*/
|
|
5219
|
-
export function registerSignatureHelpProvider(
|
|
5592
|
+
export function registerSignatureHelpProvider(languageSelector: LanguageSelector, provider: SignatureHelpProvider): IDisposable;
|
|
5220
5593
|
|
|
5221
5594
|
/**
|
|
5222
5595
|
* Register a hover provider (used by e.g. editor hover).
|
|
5223
5596
|
*/
|
|
5224
|
-
export function registerHoverProvider(
|
|
5597
|
+
export function registerHoverProvider(languageSelector: LanguageSelector, provider: HoverProvider): IDisposable;
|
|
5225
5598
|
|
|
5226
5599
|
/**
|
|
5227
5600
|
* Register a document symbol provider (used by e.g. outline).
|
|
5228
5601
|
*/
|
|
5229
|
-
export function registerDocumentSymbolProvider(
|
|
5602
|
+
export function registerDocumentSymbolProvider(languageSelector: LanguageSelector, provider: DocumentSymbolProvider): IDisposable;
|
|
5230
5603
|
|
|
5231
5604
|
/**
|
|
5232
5605
|
* Register a document highlight provider (used by e.g. highlight occurrences).
|
|
5233
5606
|
*/
|
|
5234
|
-
export function registerDocumentHighlightProvider(
|
|
5607
|
+
export function registerDocumentHighlightProvider(languageSelector: LanguageSelector, provider: DocumentHighlightProvider): IDisposable;
|
|
5235
5608
|
|
|
5236
5609
|
/**
|
|
5237
5610
|
* Register an linked editing range provider.
|
|
5238
5611
|
*/
|
|
5239
|
-
export function registerLinkedEditingRangeProvider(
|
|
5612
|
+
export function registerLinkedEditingRangeProvider(languageSelector: LanguageSelector, provider: LinkedEditingRangeProvider): IDisposable;
|
|
5240
5613
|
|
|
5241
5614
|
/**
|
|
5242
5615
|
* Register a definition provider (used by e.g. go to definition).
|
|
5243
5616
|
*/
|
|
5244
|
-
export function registerDefinitionProvider(
|
|
5617
|
+
export function registerDefinitionProvider(languageSelector: LanguageSelector, provider: DefinitionProvider): IDisposable;
|
|
5245
5618
|
|
|
5246
5619
|
/**
|
|
5247
5620
|
* Register a implementation provider (used by e.g. go to implementation).
|
|
5248
5621
|
*/
|
|
5249
|
-
export function registerImplementationProvider(
|
|
5622
|
+
export function registerImplementationProvider(languageSelector: LanguageSelector, provider: ImplementationProvider): IDisposable;
|
|
5250
5623
|
|
|
5251
5624
|
/**
|
|
5252
5625
|
* Register a type definition provider (used by e.g. go to type definition).
|
|
5253
5626
|
*/
|
|
5254
|
-
export function registerTypeDefinitionProvider(
|
|
5627
|
+
export function registerTypeDefinitionProvider(languageSelector: LanguageSelector, provider: TypeDefinitionProvider): IDisposable;
|
|
5255
5628
|
|
|
5256
5629
|
/**
|
|
5257
5630
|
* Register a code lens provider (used by e.g. inline code lenses).
|
|
5258
5631
|
*/
|
|
5259
|
-
export function registerCodeLensProvider(
|
|
5632
|
+
export function registerCodeLensProvider(languageSelector: LanguageSelector, provider: CodeLensProvider): IDisposable;
|
|
5260
5633
|
|
|
5261
5634
|
/**
|
|
5262
5635
|
* Register a code action provider (used by e.g. quick fix).
|
|
5263
5636
|
*/
|
|
5264
|
-
export function registerCodeActionProvider(
|
|
5637
|
+
export function registerCodeActionProvider(languageSelector: LanguageSelector, provider: CodeActionProvider, metadata?: CodeActionProviderMetadata): IDisposable;
|
|
5265
5638
|
|
|
5266
5639
|
/**
|
|
5267
5640
|
* Register a formatter that can handle only entire models.
|
|
5268
5641
|
*/
|
|
5269
|
-
export function registerDocumentFormattingEditProvider(
|
|
5642
|
+
export function registerDocumentFormattingEditProvider(languageSelector: LanguageSelector, provider: DocumentFormattingEditProvider): IDisposable;
|
|
5270
5643
|
|
|
5271
5644
|
/**
|
|
5272
5645
|
* Register a formatter that can handle a range inside a model.
|
|
5273
5646
|
*/
|
|
5274
|
-
export function registerDocumentRangeFormattingEditProvider(
|
|
5647
|
+
export function registerDocumentRangeFormattingEditProvider(languageSelector: LanguageSelector, provider: DocumentRangeFormattingEditProvider): IDisposable;
|
|
5275
5648
|
|
|
5276
5649
|
/**
|
|
5277
5650
|
* Register a formatter than can do formatting as the user types.
|
|
5278
5651
|
*/
|
|
5279
|
-
export function registerOnTypeFormattingEditProvider(
|
|
5652
|
+
export function registerOnTypeFormattingEditProvider(languageSelector: LanguageSelector, provider: OnTypeFormattingEditProvider): IDisposable;
|
|
5280
5653
|
|
|
5281
5654
|
/**
|
|
5282
5655
|
* Register a link provider that can find links in text.
|
|
5283
5656
|
*/
|
|
5284
|
-
export function registerLinkProvider(
|
|
5657
|
+
export function registerLinkProvider(languageSelector: LanguageSelector, provider: LinkProvider): IDisposable;
|
|
5285
5658
|
|
|
5286
5659
|
/**
|
|
5287
5660
|
* Register a completion item provider (use by e.g. suggestions).
|
|
5288
5661
|
*/
|
|
5289
|
-
export function registerCompletionItemProvider(
|
|
5662
|
+
export function registerCompletionItemProvider(languageSelector: LanguageSelector, provider: CompletionItemProvider): IDisposable;
|
|
5290
5663
|
|
|
5291
5664
|
/**
|
|
5292
5665
|
* Register a document color provider (used by Color Picker, Color Decorator).
|
|
5293
5666
|
*/
|
|
5294
|
-
export function registerColorProvider(
|
|
5667
|
+
export function registerColorProvider(languageSelector: LanguageSelector, provider: DocumentColorProvider): IDisposable;
|
|
5295
5668
|
|
|
5296
5669
|
/**
|
|
5297
5670
|
* Register a folding range provider
|
|
5298
5671
|
*/
|
|
5299
|
-
export function registerFoldingRangeProvider(
|
|
5672
|
+
export function registerFoldingRangeProvider(languageSelector: LanguageSelector, provider: FoldingRangeProvider): IDisposable;
|
|
5300
5673
|
|
|
5301
5674
|
/**
|
|
5302
5675
|
* Register a declaration provider
|
|
5303
5676
|
*/
|
|
5304
|
-
export function registerDeclarationProvider(
|
|
5677
|
+
export function registerDeclarationProvider(languageSelector: LanguageSelector, provider: DeclarationProvider): IDisposable;
|
|
5305
5678
|
|
|
5306
5679
|
/**
|
|
5307
5680
|
* Register a selection range provider
|
|
5308
5681
|
*/
|
|
5309
|
-
export function registerSelectionRangeProvider(
|
|
5682
|
+
export function registerSelectionRangeProvider(languageSelector: LanguageSelector, provider: SelectionRangeProvider): IDisposable;
|
|
5683
|
+
|
|
5684
|
+
/**
|
|
5685
|
+
* Register a document semantic tokens provider. A semantic tokens provider will complement and enhance a
|
|
5686
|
+
* simple top-down tokenizer. Simple top-down tokenizers can be set either via `setMonarchTokensProvider`
|
|
5687
|
+
* or `setTokensProvider`.
|
|
5688
|
+
*
|
|
5689
|
+
* For the best user experience, register both a semantic tokens provider and a top-down tokenizer.
|
|
5690
|
+
*/
|
|
5691
|
+
export function registerDocumentSemanticTokensProvider(languageSelector: LanguageSelector, provider: DocumentSemanticTokensProvider): IDisposable;
|
|
5692
|
+
|
|
5693
|
+
/**
|
|
5694
|
+
* Register a document range semantic tokens provider. A semantic tokens provider will complement and enhance a
|
|
5695
|
+
* simple top-down tokenizer. Simple top-down tokenizers can be set either via `setMonarchTokensProvider`
|
|
5696
|
+
* or `setTokensProvider`.
|
|
5697
|
+
*
|
|
5698
|
+
* For the best user experience, register both a semantic tokens provider and a top-down tokenizer.
|
|
5699
|
+
*/
|
|
5700
|
+
export function registerDocumentRangeSemanticTokensProvider(languageSelector: LanguageSelector, provider: DocumentRangeSemanticTokensProvider): IDisposable;
|
|
5310
5701
|
|
|
5311
5702
|
/**
|
|
5312
|
-
* Register
|
|
5703
|
+
* Register an inline completions provider.
|
|
5313
5704
|
*/
|
|
5314
|
-
export function
|
|
5705
|
+
export function registerInlineCompletionsProvider(languageSelector: LanguageSelector, provider: InlineCompletionsProvider): IDisposable;
|
|
5315
5706
|
|
|
5316
5707
|
/**
|
|
5317
|
-
* Register
|
|
5708
|
+
* Register an inlay hints provider.
|
|
5318
5709
|
*/
|
|
5319
|
-
export function
|
|
5710
|
+
export function registerInlayHintsProvider(languageSelector: LanguageSelector, provider: InlayHintsProvider): IDisposable;
|
|
5320
5711
|
|
|
5321
5712
|
/**
|
|
5322
5713
|
* Contains additional diagnostic information about the context in which
|
|
@@ -5342,6 +5733,25 @@ declare namespace monaco.languages {
|
|
|
5342
5733
|
* Provide commands for the given document and range.
|
|
5343
5734
|
*/
|
|
5344
5735
|
provideCodeActions(model: editor.ITextModel, range: Range, context: CodeActionContext, token: CancellationToken): ProviderResult<CodeActionList>;
|
|
5736
|
+
/**
|
|
5737
|
+
* Given a code action fill in the edit. Will only invoked when missing.
|
|
5738
|
+
*/
|
|
5739
|
+
resolveCodeAction?(codeAction: CodeAction, token: CancellationToken): ProviderResult<CodeAction>;
|
|
5740
|
+
}
|
|
5741
|
+
|
|
5742
|
+
/**
|
|
5743
|
+
* Metadata about the type of code actions that a {@link CodeActionProvider} provides.
|
|
5744
|
+
*/
|
|
5745
|
+
export interface CodeActionProviderMetadata {
|
|
5746
|
+
/**
|
|
5747
|
+
* List of code action kinds that a {@link CodeActionProvider} may return.
|
|
5748
|
+
*
|
|
5749
|
+
* This list is used to determine if a given `CodeActionProvider` should be invoked or not.
|
|
5750
|
+
* To avoid unnecessary computation, every `CodeActionProvider` should list use `providedCodeActionKinds`. The
|
|
5751
|
+
* list of kinds may either be generic, such as `["quickfix", "refactor", "source"]`, or list out every kind provided,
|
|
5752
|
+
* such as `["quickfix.removeLine", "source.fixAll" ...]`.
|
|
5753
|
+
*/
|
|
5754
|
+
readonly providedCodeActionKinds?: readonly string[];
|
|
5345
5755
|
}
|
|
5346
5756
|
|
|
5347
5757
|
/**
|
|
@@ -5399,6 +5809,11 @@ declare namespace monaco.languages {
|
|
|
5399
5809
|
* settings will be used.
|
|
5400
5810
|
*/
|
|
5401
5811
|
surroundingPairs?: IAutoClosingPair[];
|
|
5812
|
+
/**
|
|
5813
|
+
* Defines a list of bracket pairs that are colorized depending on their nesting level.
|
|
5814
|
+
* If not set, the configured brackets will be used.
|
|
5815
|
+
*/
|
|
5816
|
+
colorizedBracketPairs?: CharacterPair[];
|
|
5402
5817
|
/**
|
|
5403
5818
|
* Defines what characters must be after the cursor for bracket or quote autoclosing to occur when using the \'languageDefined\' autoclosing setting.
|
|
5404
5819
|
*
|
|
@@ -5573,7 +5988,7 @@ declare namespace monaco.languages {
|
|
|
5573
5988
|
}
|
|
5574
5989
|
|
|
5575
5990
|
/**
|
|
5576
|
-
* A provider result represents the values a provider, like the
|
|
5991
|
+
* A provider result represents the values a provider, like the {@link HoverProvider},
|
|
5577
5992
|
* may return. For once this is the actual result type `T`, like `Hover`, or a thenable that resolves
|
|
5578
5993
|
* to that type `T`. In addition, `null` and `undefined` can be returned - either directly or from a
|
|
5579
5994
|
* thenable.
|
|
@@ -5642,22 +6057,9 @@ declare namespace monaco.languages {
|
|
|
5642
6057
|
}
|
|
5643
6058
|
|
|
5644
6059
|
export interface CompletionItemLabel {
|
|
5645
|
-
|
|
5646
|
-
|
|
5647
|
-
|
|
5648
|
-
name: string;
|
|
5649
|
-
/**
|
|
5650
|
-
* The parameters without the return type. Render after `name`.
|
|
5651
|
-
*/
|
|
5652
|
-
parameters?: string;
|
|
5653
|
-
/**
|
|
5654
|
-
* The fully qualified name, like package name or file path. Rendered after `signature`.
|
|
5655
|
-
*/
|
|
5656
|
-
qualifier?: string;
|
|
5657
|
-
/**
|
|
5658
|
-
* The return-type of a function or type of a property/variable. Rendered rightmost.
|
|
5659
|
-
*/
|
|
5660
|
-
type?: string;
|
|
6060
|
+
label: string;
|
|
6061
|
+
detail?: string;
|
|
6062
|
+
description?: string;
|
|
5661
6063
|
}
|
|
5662
6064
|
|
|
5663
6065
|
export enum CompletionItemTag {
|
|
@@ -5676,6 +6078,11 @@ declare namespace monaco.languages {
|
|
|
5676
6078
|
InsertAsSnippet = 4
|
|
5677
6079
|
}
|
|
5678
6080
|
|
|
6081
|
+
export interface CompletionItemRanges {
|
|
6082
|
+
insert: IRange;
|
|
6083
|
+
replace: IRange;
|
|
6084
|
+
}
|
|
6085
|
+
|
|
5679
6086
|
/**
|
|
5680
6087
|
* A completion item represents a text snippet that is
|
|
5681
6088
|
* proposed to complete text that is being typed.
|
|
@@ -5708,13 +6115,13 @@ declare namespace monaco.languages {
|
|
|
5708
6115
|
documentation?: string | IMarkdownString;
|
|
5709
6116
|
/**
|
|
5710
6117
|
* A string that should be used when comparing this item
|
|
5711
|
-
* with other items. When `falsy` the
|
|
6118
|
+
* with other items. When `falsy` the {@link CompletionItem.label label}
|
|
5712
6119
|
* is used.
|
|
5713
6120
|
*/
|
|
5714
6121
|
sortText?: string;
|
|
5715
6122
|
/**
|
|
5716
6123
|
* A string that should be used when filtering a set of
|
|
5717
|
-
* completion items. When `falsy` the
|
|
6124
|
+
* completion items. When `falsy` the {@link CompletionItem.label label}
|
|
5718
6125
|
* is used.
|
|
5719
6126
|
*/
|
|
5720
6127
|
filterText?: string;
|
|
@@ -5727,27 +6134,23 @@ declare namespace monaco.languages {
|
|
|
5727
6134
|
/**
|
|
5728
6135
|
* A string or snippet that should be inserted in a document when selecting
|
|
5729
6136
|
* this completion.
|
|
5730
|
-
* is used.
|
|
5731
6137
|
*/
|
|
5732
6138
|
insertText: string;
|
|
5733
6139
|
/**
|
|
5734
|
-
*
|
|
6140
|
+
* Additional rules (as bitmask) that should be applied when inserting
|
|
5735
6141
|
* this completion.
|
|
5736
6142
|
*/
|
|
5737
6143
|
insertTextRules?: CompletionItemInsertTextRule;
|
|
5738
6144
|
/**
|
|
5739
6145
|
* A range of text that should be replaced by this completion item.
|
|
5740
6146
|
*
|
|
5741
|
-
* Defaults to a range from the start of the
|
|
6147
|
+
* Defaults to a range from the start of the {@link TextDocument.getWordRangeAtPosition current word} to the
|
|
5742
6148
|
* current position.
|
|
5743
6149
|
*
|
|
5744
|
-
* *Note:* The range must be a
|
|
5745
|
-
*
|
|
6150
|
+
* *Note:* The range must be a {@link Range.isSingleLine single line} and it must
|
|
6151
|
+
* {@link Range.contains contain} the position at which completion has been {@link CompletionItemProvider.provideCompletionItems requested}.
|
|
5746
6152
|
*/
|
|
5747
|
-
range: IRange |
|
|
5748
|
-
insert: IRange;
|
|
5749
|
-
replace: IRange;
|
|
5750
|
-
};
|
|
6153
|
+
range: IRange | CompletionItemRanges;
|
|
5751
6154
|
/**
|
|
5752
6155
|
* An optional set of characters that when pressed while this completion is active will accept it first and
|
|
5753
6156
|
* then type that character. *Note* that all commit characters should have `length=1` and that superfluous
|
|
@@ -5783,7 +6186,7 @@ declare namespace monaco.languages {
|
|
|
5783
6186
|
|
|
5784
6187
|
/**
|
|
5785
6188
|
* Contains additional information about the context in which
|
|
5786
|
-
*
|
|
6189
|
+
* {@link CompletionItemProvider.provideCompletionItems completion provider} is triggered.
|
|
5787
6190
|
*/
|
|
5788
6191
|
export interface CompletionContext {
|
|
5789
6192
|
/**
|
|
@@ -5804,10 +6207,10 @@ declare namespace monaco.languages {
|
|
|
5804
6207
|
*
|
|
5805
6208
|
* When computing *complete* completion items is expensive, providers can optionally implement
|
|
5806
6209
|
* the `resolveCompletionItem`-function. In that case it is enough to return completion
|
|
5807
|
-
* items with a
|
|
5808
|
-
*
|
|
6210
|
+
* items with a {@link CompletionItem.label label} from the
|
|
6211
|
+
* {@link CompletionItemProvider.provideCompletionItems provideCompletionItems}-function. Subsequently,
|
|
5809
6212
|
* when a completion item is shown in the UI and gains focus this provider is asked to resolve
|
|
5810
|
-
* the item, like adding
|
|
6213
|
+
* the item, like adding {@link CompletionItem.documentation doc-comment} or {@link CompletionItem.detail details}.
|
|
5811
6214
|
*/
|
|
5812
6215
|
export interface CompletionItemProvider {
|
|
5813
6216
|
triggerCharacters?: string[];
|
|
@@ -5816,14 +6219,81 @@ declare namespace monaco.languages {
|
|
|
5816
6219
|
*/
|
|
5817
6220
|
provideCompletionItems(model: editor.ITextModel, position: Position, context: CompletionContext, token: CancellationToken): ProviderResult<CompletionList>;
|
|
5818
6221
|
/**
|
|
5819
|
-
* Given a completion item fill in more data, like
|
|
5820
|
-
* or
|
|
6222
|
+
* Given a completion item fill in more data, like {@link CompletionItem.documentation doc-comment}
|
|
6223
|
+
* or {@link CompletionItem.detail details}.
|
|
5821
6224
|
*
|
|
5822
6225
|
* The editor will only resolve a completion item once.
|
|
5823
6226
|
*/
|
|
5824
6227
|
resolveCompletionItem?(item: CompletionItem, token: CancellationToken): ProviderResult<CompletionItem>;
|
|
5825
6228
|
}
|
|
5826
6229
|
|
|
6230
|
+
/**
|
|
6231
|
+
* How an {@link InlineCompletionsProvider inline completion provider} was triggered.
|
|
6232
|
+
*/
|
|
6233
|
+
export enum InlineCompletionTriggerKind {
|
|
6234
|
+
/**
|
|
6235
|
+
* Completion was triggered automatically while editing.
|
|
6236
|
+
* It is sufficient to return a single completion item in this case.
|
|
6237
|
+
*/
|
|
6238
|
+
Automatic = 0,
|
|
6239
|
+
/**
|
|
6240
|
+
* Completion was triggered explicitly by a user gesture.
|
|
6241
|
+
* Return multiple completion items to enable cycling through them.
|
|
6242
|
+
*/
|
|
6243
|
+
Explicit = 1
|
|
6244
|
+
}
|
|
6245
|
+
|
|
6246
|
+
export interface InlineCompletionContext {
|
|
6247
|
+
/**
|
|
6248
|
+
* How the completion was triggered.
|
|
6249
|
+
*/
|
|
6250
|
+
readonly triggerKind: InlineCompletionTriggerKind;
|
|
6251
|
+
readonly selectedSuggestionInfo: SelectedSuggestionInfo | undefined;
|
|
6252
|
+
}
|
|
6253
|
+
|
|
6254
|
+
export interface SelectedSuggestionInfo {
|
|
6255
|
+
range: IRange;
|
|
6256
|
+
text: string;
|
|
6257
|
+
isSnippetText: boolean;
|
|
6258
|
+
completionKind: CompletionItemKind;
|
|
6259
|
+
}
|
|
6260
|
+
|
|
6261
|
+
export interface InlineCompletion {
|
|
6262
|
+
/**
|
|
6263
|
+
* The text to insert.
|
|
6264
|
+
* If the text contains a line break, the range must end at the end of a line.
|
|
6265
|
+
* If existing text should be replaced, the existing text must be a prefix of the text to insert.
|
|
6266
|
+
*/
|
|
6267
|
+
readonly text: string;
|
|
6268
|
+
/**
|
|
6269
|
+
* The range to replace.
|
|
6270
|
+
* Must begin and end on the same line.
|
|
6271
|
+
*/
|
|
6272
|
+
readonly range?: IRange;
|
|
6273
|
+
readonly command?: Command;
|
|
6274
|
+
/**
|
|
6275
|
+
* If set to `true`, unopened closing brackets are removed and unclosed opening brackets are closed.
|
|
6276
|
+
* Defaults to `false`.
|
|
6277
|
+
*/
|
|
6278
|
+
readonly completeBracketPairs?: boolean;
|
|
6279
|
+
}
|
|
6280
|
+
|
|
6281
|
+
export interface InlineCompletions<TItem extends InlineCompletion = InlineCompletion> {
|
|
6282
|
+
readonly items: readonly TItem[];
|
|
6283
|
+
}
|
|
6284
|
+
|
|
6285
|
+
export interface InlineCompletionsProvider<T extends InlineCompletions = InlineCompletions> {
|
|
6286
|
+
provideInlineCompletions(model: editor.ITextModel, position: Position, context: InlineCompletionContext, token: CancellationToken): ProviderResult<T>;
|
|
6287
|
+
/**
|
|
6288
|
+
* Will be called when an item is shown.
|
|
6289
|
+
*/
|
|
6290
|
+
handleItemDidShow?(completions: T, item: T['items'][number]): void;
|
|
6291
|
+
/**
|
|
6292
|
+
* Will be called when a completions list is no longer in use and can be garbage-collected.
|
|
6293
|
+
*/
|
|
6294
|
+
freeInlineCompletions(completions: T): void;
|
|
6295
|
+
}
|
|
6296
|
+
|
|
5827
6297
|
export interface CodeAction {
|
|
5828
6298
|
title: string;
|
|
5829
6299
|
command?: Command;
|
|
@@ -5962,7 +6432,7 @@ declare namespace monaco.languages {
|
|
|
5962
6432
|
*/
|
|
5963
6433
|
range: IRange;
|
|
5964
6434
|
/**
|
|
5965
|
-
* The highlight kind, default is
|
|
6435
|
+
* The highlight kind, default is {@link DocumentHighlightKind.Text text}.
|
|
5966
6436
|
*/
|
|
5967
6437
|
kind?: DocumentHighlightKind;
|
|
5968
6438
|
}
|
|
@@ -6289,12 +6759,12 @@ declare namespace monaco.languages {
|
|
|
6289
6759
|
*/
|
|
6290
6760
|
label: string;
|
|
6291
6761
|
/**
|
|
6292
|
-
* An
|
|
6762
|
+
* An {@link TextEdit edit} which is applied to a document when selecting
|
|
6293
6763
|
* this presentation for the color.
|
|
6294
6764
|
*/
|
|
6295
6765
|
textEdit?: TextEdit;
|
|
6296
6766
|
/**
|
|
6297
|
-
* An optional array of additional
|
|
6767
|
+
* An optional array of additional {@link TextEdit text edits} that are applied when
|
|
6298
6768
|
* selecting this color presentation.
|
|
6299
6769
|
*/
|
|
6300
6770
|
additionalTextEdits?: TextEdit[];
|
|
@@ -6366,10 +6836,10 @@ declare namespace monaco.languages {
|
|
|
6366
6836
|
*/
|
|
6367
6837
|
end: number;
|
|
6368
6838
|
/**
|
|
6369
|
-
* Describes the
|
|
6370
|
-
*
|
|
6839
|
+
* Describes the {@link FoldingRangeKind Kind} of the folding range such as {@link FoldingRangeKind.Comment Comment} or
|
|
6840
|
+
* {@link FoldingRangeKind.Region Region}. The kind is used to categorize folding ranges and used by commands
|
|
6371
6841
|
* like 'Fold all comments'. See
|
|
6372
|
-
*
|
|
6842
|
+
* {@link FoldingRangeKind} for an enumeration of standardized kinds.
|
|
6373
6843
|
*/
|
|
6374
6844
|
kind?: FoldingRangeKind;
|
|
6375
6845
|
}
|
|
@@ -6390,7 +6860,7 @@ declare namespace monaco.languages {
|
|
|
6390
6860
|
*/
|
|
6391
6861
|
static readonly Region: FoldingRangeKind;
|
|
6392
6862
|
/**
|
|
6393
|
-
* Creates a new
|
|
6863
|
+
* Creates a new {@link FoldingRangeKind}.
|
|
6394
6864
|
*
|
|
6395
6865
|
* @param value of the kind.
|
|
6396
6866
|
*/
|
|
@@ -6470,29 +6940,43 @@ declare namespace monaco.languages {
|
|
|
6470
6940
|
resolveCodeLens?(model: editor.ITextModel, codeLens: CodeLens, token: CancellationToken): ProviderResult<CodeLens>;
|
|
6471
6941
|
}
|
|
6472
6942
|
|
|
6473
|
-
export enum
|
|
6474
|
-
Other = 0,
|
|
6943
|
+
export enum InlayHintKind {
|
|
6475
6944
|
Type = 1,
|
|
6476
6945
|
Parameter = 2
|
|
6477
6946
|
}
|
|
6478
6947
|
|
|
6479
|
-
export interface
|
|
6480
|
-
|
|
6481
|
-
|
|
6482
|
-
|
|
6483
|
-
|
|
6484
|
-
whitespaceBefore?: boolean;
|
|
6485
|
-
whitespaceAfter?: boolean;
|
|
6948
|
+
export interface InlayHintLabelPart {
|
|
6949
|
+
label: string;
|
|
6950
|
+
tooltip?: string | IMarkdownString;
|
|
6951
|
+
command?: Command;
|
|
6952
|
+
location?: Location;
|
|
6486
6953
|
}
|
|
6487
6954
|
|
|
6488
|
-
export interface
|
|
6489
|
-
|
|
6490
|
-
|
|
6955
|
+
export interface InlayHint {
|
|
6956
|
+
label: string | InlayHintLabelPart[];
|
|
6957
|
+
tooltip?: string | IMarkdownString;
|
|
6958
|
+
command?: Command;
|
|
6959
|
+
position: IPosition;
|
|
6960
|
+
kind?: InlayHintKind;
|
|
6961
|
+
paddingLeft?: boolean;
|
|
6962
|
+
paddingRight?: boolean;
|
|
6491
6963
|
}
|
|
6492
6964
|
|
|
6493
|
-
export interface
|
|
6494
|
-
|
|
6495
|
-
|
|
6965
|
+
export interface InlayHintList {
|
|
6966
|
+
hints: InlayHint[];
|
|
6967
|
+
dispose(): void;
|
|
6968
|
+
}
|
|
6969
|
+
|
|
6970
|
+
export interface InlayHintsProvider {
|
|
6971
|
+
displayName?: string;
|
|
6972
|
+
onDidChangeInlayHints?: IEvent<void>;
|
|
6973
|
+
provideInlayHints(model: editor.ITextModel, range: Range, token: CancellationToken): ProviderResult<InlayHintList>;
|
|
6974
|
+
resolveInlayHint?(hint: InlayHint, token: CancellationToken): ProviderResult<InlayHint>;
|
|
6975
|
+
}
|
|
6976
|
+
|
|
6977
|
+
export interface SemanticTokensLegend {
|
|
6978
|
+
readonly tokenTypes: string[];
|
|
6979
|
+
readonly tokenModifiers: string[];
|
|
6496
6980
|
}
|
|
6497
6981
|
|
|
6498
6982
|
export interface SemanticTokens {
|
|
@@ -6705,421 +7189,169 @@ declare namespace monaco.worker {
|
|
|
6705
7189
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
6706
7190
|
*--------------------------------------------------------------------------------------------*/
|
|
6707
7191
|
|
|
6708
|
-
|
|
6709
|
-
|
|
6710
|
-
|
|
6711
|
-
|
|
6712
|
-
|
|
6713
|
-
|
|
6714
|
-
|
|
6715
|
-
|
|
6716
|
-
|
|
6717
|
-
|
|
6718
|
-
|
|
6719
|
-
|
|
6720
|
-
|
|
6721
|
-
|
|
6722
|
-
|
|
6723
|
-
|
|
6724
|
-
|
|
6725
|
-
|
|
6726
|
-
|
|
6727
|
-
|
|
6728
|
-
|
|
6729
|
-
|
|
6730
|
-
|
|
6731
|
-
export enum ScriptTarget {
|
|
6732
|
-
ES3 = 0,
|
|
6733
|
-
ES5 = 1,
|
|
6734
|
-
ES2015 = 2,
|
|
6735
|
-
ES2016 = 3,
|
|
6736
|
-
ES2017 = 4,
|
|
6737
|
-
ES2018 = 5,
|
|
6738
|
-
ES2019 = 6,
|
|
6739
|
-
ES2020 = 7,
|
|
6740
|
-
ESNext = 99,
|
|
6741
|
-
JSON = 100,
|
|
6742
|
-
Latest = 99
|
|
6743
|
-
}
|
|
6744
|
-
export enum ModuleResolutionKind {
|
|
6745
|
-
Classic = 1,
|
|
6746
|
-
NodeJs = 2
|
|
6747
|
-
}
|
|
6748
|
-
interface MapLike<T> {
|
|
6749
|
-
[index: string]: T;
|
|
6750
|
-
}
|
|
6751
|
-
type CompilerOptionsValue =
|
|
6752
|
-
| string
|
|
6753
|
-
| number
|
|
6754
|
-
| boolean
|
|
6755
|
-
| (string | number)[]
|
|
6756
|
-
| string[]
|
|
6757
|
-
| MapLike<string[]>
|
|
6758
|
-
| null
|
|
6759
|
-
| undefined;
|
|
6760
|
-
interface CompilerOptions {
|
|
6761
|
-
allowJs?: boolean;
|
|
6762
|
-
allowSyntheticDefaultImports?: boolean;
|
|
6763
|
-
allowUmdGlobalAccess?: boolean;
|
|
6764
|
-
allowUnreachableCode?: boolean;
|
|
6765
|
-
allowUnusedLabels?: boolean;
|
|
6766
|
-
alwaysStrict?: boolean;
|
|
6767
|
-
baseUrl?: string;
|
|
6768
|
-
charset?: string;
|
|
6769
|
-
checkJs?: boolean;
|
|
6770
|
-
declaration?: boolean;
|
|
6771
|
-
declarationMap?: boolean;
|
|
6772
|
-
emitDeclarationOnly?: boolean;
|
|
6773
|
-
declarationDir?: string;
|
|
6774
|
-
disableSizeLimit?: boolean;
|
|
6775
|
-
disableSourceOfProjectReferenceRedirect?: boolean;
|
|
6776
|
-
downlevelIteration?: boolean;
|
|
6777
|
-
emitBOM?: boolean;
|
|
6778
|
-
emitDecoratorMetadata?: boolean;
|
|
6779
|
-
experimentalDecorators?: boolean;
|
|
6780
|
-
forceConsistentCasingInFileNames?: boolean;
|
|
6781
|
-
importHelpers?: boolean;
|
|
6782
|
-
inlineSourceMap?: boolean;
|
|
6783
|
-
inlineSources?: boolean;
|
|
6784
|
-
isolatedModules?: boolean;
|
|
6785
|
-
jsx?: JsxEmit;
|
|
6786
|
-
keyofStringsOnly?: boolean;
|
|
6787
|
-
lib?: string[];
|
|
6788
|
-
locale?: string;
|
|
6789
|
-
mapRoot?: string;
|
|
6790
|
-
maxNodeModuleJsDepth?: number;
|
|
6791
|
-
module?: ModuleKind;
|
|
6792
|
-
moduleResolution?: ModuleResolutionKind;
|
|
6793
|
-
newLine?: NewLineKind;
|
|
6794
|
-
noEmit?: boolean;
|
|
6795
|
-
noEmitHelpers?: boolean;
|
|
6796
|
-
noEmitOnError?: boolean;
|
|
6797
|
-
noErrorTruncation?: boolean;
|
|
6798
|
-
noFallthroughCasesInSwitch?: boolean;
|
|
6799
|
-
noImplicitAny?: boolean;
|
|
6800
|
-
noImplicitReturns?: boolean;
|
|
6801
|
-
noImplicitThis?: boolean;
|
|
6802
|
-
noStrictGenericChecks?: boolean;
|
|
6803
|
-
noUnusedLocals?: boolean;
|
|
6804
|
-
noUnusedParameters?: boolean;
|
|
6805
|
-
noImplicitUseStrict?: boolean;
|
|
6806
|
-
noLib?: boolean;
|
|
6807
|
-
noResolve?: boolean;
|
|
6808
|
-
out?: string;
|
|
6809
|
-
outDir?: string;
|
|
6810
|
-
outFile?: string;
|
|
6811
|
-
paths?: MapLike<string[]>;
|
|
6812
|
-
preserveConstEnums?: boolean;
|
|
6813
|
-
preserveSymlinks?: boolean;
|
|
6814
|
-
project?: string;
|
|
6815
|
-
reactNamespace?: string;
|
|
6816
|
-
jsxFactory?: string;
|
|
6817
|
-
composite?: boolean;
|
|
6818
|
-
removeComments?: boolean;
|
|
6819
|
-
rootDir?: string;
|
|
6820
|
-
rootDirs?: string[];
|
|
6821
|
-
skipLibCheck?: boolean;
|
|
6822
|
-
skipDefaultLibCheck?: boolean;
|
|
6823
|
-
sourceMap?: boolean;
|
|
6824
|
-
sourceRoot?: string;
|
|
6825
|
-
strict?: boolean;
|
|
6826
|
-
strictFunctionTypes?: boolean;
|
|
6827
|
-
strictBindCallApply?: boolean;
|
|
6828
|
-
strictNullChecks?: boolean;
|
|
6829
|
-
strictPropertyInitialization?: boolean;
|
|
6830
|
-
stripInternal?: boolean;
|
|
6831
|
-
suppressExcessPropertyErrors?: boolean;
|
|
6832
|
-
suppressImplicitAnyIndexErrors?: boolean;
|
|
6833
|
-
target?: ScriptTarget;
|
|
6834
|
-
traceResolution?: boolean;
|
|
6835
|
-
resolveJsonModule?: boolean;
|
|
6836
|
-
types?: string[];
|
|
6837
|
-
/** Paths used to compute primary types search locations */
|
|
6838
|
-
typeRoots?: string[];
|
|
6839
|
-
esModuleInterop?: boolean;
|
|
6840
|
-
useDefineForClassFields?: boolean;
|
|
6841
|
-
[option: string]: CompilerOptionsValue | undefined;
|
|
6842
|
-
}
|
|
6843
|
-
export interface DiagnosticsOptions {
|
|
6844
|
-
noSemanticValidation?: boolean;
|
|
6845
|
-
noSyntaxValidation?: boolean;
|
|
6846
|
-
noSuggestionDiagnostics?: boolean;
|
|
7192
|
+
declare namespace monaco.languages.css {
|
|
7193
|
+
export interface Options {
|
|
7194
|
+
readonly validate?: boolean;
|
|
7195
|
+
readonly lint?: {
|
|
7196
|
+
readonly compatibleVendorPrefixes?: 'ignore' | 'warning' | 'error';
|
|
7197
|
+
readonly vendorPrefix?: 'ignore' | 'warning' | 'error';
|
|
7198
|
+
readonly duplicateProperties?: 'ignore' | 'warning' | 'error';
|
|
7199
|
+
readonly emptyRules?: 'ignore' | 'warning' | 'error';
|
|
7200
|
+
readonly importStatement?: 'ignore' | 'warning' | 'error';
|
|
7201
|
+
readonly boxModel?: 'ignore' | 'warning' | 'error';
|
|
7202
|
+
readonly universalSelector?: 'ignore' | 'warning' | 'error';
|
|
7203
|
+
readonly zeroUnits?: 'ignore' | 'warning' | 'error';
|
|
7204
|
+
readonly fontFaceProperties?: 'ignore' | 'warning' | 'error';
|
|
7205
|
+
readonly hexColorLength?: 'ignore' | 'warning' | 'error';
|
|
7206
|
+
readonly argumentsInColorFunction?: 'ignore' | 'warning' | 'error';
|
|
7207
|
+
readonly unknownProperties?: 'ignore' | 'warning' | 'error';
|
|
7208
|
+
readonly ieHack?: 'ignore' | 'warning' | 'error';
|
|
7209
|
+
readonly unknownVendorSpecificProperties?: 'ignore' | 'warning' | 'error';
|
|
7210
|
+
readonly propertyIgnoredDueToDisplay?: 'ignore' | 'warning' | 'error';
|
|
7211
|
+
readonly important?: 'ignore' | 'warning' | 'error';
|
|
7212
|
+
readonly float?: 'ignore' | 'warning' | 'error';
|
|
7213
|
+
readonly idSelector?: 'ignore' | 'warning' | 'error';
|
|
7214
|
+
};
|
|
6847
7215
|
/**
|
|
6848
|
-
*
|
|
6849
|
-
* Defaults to false.
|
|
7216
|
+
* Configures the CSS data types known by the langauge service.
|
|
6850
7217
|
*/
|
|
6851
|
-
|
|
6852
|
-
diagnosticCodesToIgnore?: number[];
|
|
6853
|
-
}
|
|
6854
|
-
export interface WorkerOptions {
|
|
6855
|
-
/** A full HTTP path to a JavaScript file which adds a function `customTSWorkerFactory` to the self inside a web-worker */
|
|
6856
|
-
customWorkerPath?: string;
|
|
6857
|
-
}
|
|
6858
|
-
interface IExtraLib {
|
|
6859
|
-
content: string;
|
|
6860
|
-
version: number;
|
|
6861
|
-
}
|
|
6862
|
-
export interface IExtraLibs {
|
|
6863
|
-
[path: string]: IExtraLib;
|
|
6864
|
-
}
|
|
6865
|
-
/**
|
|
6866
|
-
* A linked list of formatted diagnostic messages to be used as part of a multiline message.
|
|
6867
|
-
* It is built from the bottom up, leaving the head to be the "main" diagnostic.
|
|
6868
|
-
*/
|
|
6869
|
-
interface DiagnosticMessageChain {
|
|
6870
|
-
messageText: string;
|
|
6871
|
-
/** Diagnostic category: warning = 0, error = 1, suggestion = 2, message = 3 */
|
|
6872
|
-
category: 0 | 1 | 2 | 3;
|
|
6873
|
-
code: number;
|
|
6874
|
-
next?: DiagnosticMessageChain[];
|
|
6875
|
-
}
|
|
6876
|
-
export interface Diagnostic extends DiagnosticRelatedInformation {
|
|
6877
|
-
/** May store more in future. For now, this will simply be `true` to indicate when a diagnostic is an unused-identifier diagnostic. */
|
|
6878
|
-
reportsUnnecessary?: {};
|
|
6879
|
-
reportsDeprecated?: {};
|
|
6880
|
-
source?: string;
|
|
6881
|
-
relatedInformation?: DiagnosticRelatedInformation[];
|
|
6882
|
-
}
|
|
6883
|
-
export interface DiagnosticRelatedInformation {
|
|
6884
|
-
/** Diagnostic category: warning = 0, error = 1, suggestion = 2, message = 3 */
|
|
6885
|
-
category: 0 | 1 | 2 | 3;
|
|
6886
|
-
code: number;
|
|
6887
|
-
/** TypeScriptWorker removes all but the `fileName` property to avoid serializing circular JSON structures. */
|
|
6888
|
-
file:
|
|
6889
|
-
| {
|
|
6890
|
-
fileName: string;
|
|
6891
|
-
}
|
|
6892
|
-
| undefined;
|
|
6893
|
-
start: number | undefined;
|
|
6894
|
-
length: number | undefined;
|
|
6895
|
-
messageText: string | DiagnosticMessageChain;
|
|
6896
|
-
}
|
|
6897
|
-
interface EmitOutput {
|
|
6898
|
-
outputFiles: OutputFile[];
|
|
6899
|
-
emitSkipped: boolean;
|
|
7218
|
+
readonly data?: CSSDataConfiguration;
|
|
6900
7219
|
}
|
|
6901
|
-
interface
|
|
6902
|
-
name: string;
|
|
6903
|
-
writeByteOrderMark: boolean;
|
|
6904
|
-
text: string;
|
|
6905
|
-
}
|
|
6906
|
-
export interface LanguageServiceDefaults {
|
|
7220
|
+
export interface ModeConfiguration {
|
|
6907
7221
|
/**
|
|
6908
|
-
*
|
|
7222
|
+
* Defines whether the built-in completionItemProvider is enabled.
|
|
6909
7223
|
*/
|
|
6910
|
-
readonly
|
|
7224
|
+
readonly completionItems?: boolean;
|
|
6911
7225
|
/**
|
|
6912
|
-
*
|
|
7226
|
+
* Defines whether the built-in hoverProvider is enabled.
|
|
6913
7227
|
*/
|
|
6914
|
-
readonly
|
|
6915
|
-
readonly workerOptions: WorkerOptions;
|
|
7228
|
+
readonly hovers?: boolean;
|
|
6916
7229
|
/**
|
|
6917
|
-
*
|
|
7230
|
+
* Defines whether the built-in documentSymbolProvider is enabled.
|
|
6918
7231
|
*/
|
|
6919
|
-
|
|
7232
|
+
readonly documentSymbols?: boolean;
|
|
6920
7233
|
/**
|
|
6921
|
-
*
|
|
6922
|
-
* for typescript (definition) files that won't be loaded as editor
|
|
6923
|
-
* documents, like `jquery.d.ts`.
|
|
6924
|
-
*
|
|
6925
|
-
* @param content The file content
|
|
6926
|
-
* @param filePath An optional file path
|
|
6927
|
-
* @returns A disposable which will remove the file from the
|
|
6928
|
-
* language service upon disposal.
|
|
7234
|
+
* Defines whether the built-in definitions provider is enabled.
|
|
6929
7235
|
*/
|
|
6930
|
-
|
|
7236
|
+
readonly definitions?: boolean;
|
|
6931
7237
|
/**
|
|
6932
|
-
*
|
|
6933
|
-
* files to the language service. Use this for typescript definition
|
|
6934
|
-
* files that won't be loaded as editor documents, like `jquery.d.ts`.
|
|
6935
|
-
* @param libs An array of entries to register.
|
|
7238
|
+
* Defines whether the built-in references provider is enabled.
|
|
6936
7239
|
*/
|
|
6937
|
-
|
|
6938
|
-
libs: {
|
|
6939
|
-
content: string;
|
|
6940
|
-
filePath?: string;
|
|
6941
|
-
}[]
|
|
6942
|
-
): void;
|
|
7240
|
+
readonly references?: boolean;
|
|
6943
7241
|
/**
|
|
6944
|
-
*
|
|
7242
|
+
* Defines whether the built-in references provider is enabled.
|
|
6945
7243
|
*/
|
|
6946
|
-
|
|
7244
|
+
readonly documentHighlights?: boolean;
|
|
6947
7245
|
/**
|
|
6948
|
-
*
|
|
7246
|
+
* Defines whether the built-in rename provider is enabled.
|
|
6949
7247
|
*/
|
|
6950
|
-
|
|
7248
|
+
readonly rename?: boolean;
|
|
6951
7249
|
/**
|
|
6952
|
-
*
|
|
7250
|
+
* Defines whether the built-in color provider is enabled.
|
|
6953
7251
|
*/
|
|
6954
|
-
|
|
6955
|
-
/**
|
|
6956
|
-
* Configure whether syntactic and/or semantic validation should
|
|
6957
|
-
* be performed
|
|
6958
|
-
*/
|
|
6959
|
-
setDiagnosticsOptions(options: DiagnosticsOptions): void;
|
|
6960
|
-
/**
|
|
6961
|
-
* Configure webworker options
|
|
6962
|
-
*/
|
|
6963
|
-
setWorkerOptions(options: WorkerOptions): void;
|
|
7252
|
+
readonly colors?: boolean;
|
|
6964
7253
|
/**
|
|
6965
|
-
*
|
|
7254
|
+
* Defines whether the built-in foldingRange provider is enabled.
|
|
6966
7255
|
*/
|
|
6967
|
-
|
|
7256
|
+
readonly foldingRanges?: boolean;
|
|
6968
7257
|
/**
|
|
6969
|
-
*
|
|
6970
|
-
* to the worker on start or restart.
|
|
7258
|
+
* Defines whether the built-in diagnostic provider is enabled.
|
|
6971
7259
|
*/
|
|
6972
|
-
|
|
7260
|
+
readonly diagnostics?: boolean;
|
|
6973
7261
|
/**
|
|
6974
|
-
*
|
|
6975
|
-
* to the worker on start or restart.
|
|
7262
|
+
* Defines whether the built-in selection range provider is enabled.
|
|
6976
7263
|
*/
|
|
6977
|
-
|
|
7264
|
+
readonly selectionRanges?: boolean;
|
|
6978
7265
|
}
|
|
6979
|
-
export interface
|
|
6980
|
-
|
|
6981
|
-
|
|
6982
|
-
|
|
6983
|
-
|
|
6984
|
-
|
|
6985
|
-
|
|
6986
|
-
|
|
6987
|
-
|
|
6988
|
-
/**
|
|
6989
|
-
|
|
6990
|
-
|
|
6991
|
-
|
|
6992
|
-
|
|
6993
|
-
|
|
6994
|
-
|
|
6995
|
-
|
|
6996
|
-
|
|
6997
|
-
* Get diagnostic messages related to the current compiler options.
|
|
6998
|
-
* @param fileName Not used
|
|
6999
|
-
*/
|
|
7000
|
-
getCompilerOptionsDiagnostics(fileName: string): Promise<Diagnostic[]>;
|
|
7001
|
-
/**
|
|
7002
|
-
* Get code completions for the given file and position.
|
|
7003
|
-
* @returns `Promise<typescript.CompletionInfo | undefined>`
|
|
7004
|
-
*/
|
|
7005
|
-
getCompletionsAtPosition(fileName: string, position: number): Promise<any | undefined>;
|
|
7006
|
-
/**
|
|
7007
|
-
* Get code completion details for the given file, position, and entry.
|
|
7008
|
-
* @returns `Promise<typescript.CompletionEntryDetails | undefined>`
|
|
7009
|
-
*/
|
|
7010
|
-
getCompletionEntryDetails(
|
|
7011
|
-
fileName: string,
|
|
7012
|
-
position: number,
|
|
7013
|
-
entry: string
|
|
7014
|
-
): Promise<any | undefined>;
|
|
7015
|
-
/**
|
|
7016
|
-
* Get signature help items for the item at the given file and position.
|
|
7017
|
-
* @returns `Promise<typescript.SignatureHelpItems | undefined>`
|
|
7018
|
-
*/
|
|
7019
|
-
getSignatureHelpItems(
|
|
7020
|
-
fileName: string,
|
|
7021
|
-
position: number,
|
|
7022
|
-
options: any
|
|
7023
|
-
): Promise<any | undefined>;
|
|
7024
|
-
/**
|
|
7025
|
-
* Get quick info for the item at the given position in the file.
|
|
7026
|
-
* @returns `Promise<typescript.QuickInfo | undefined>`
|
|
7027
|
-
*/
|
|
7028
|
-
getQuickInfoAtPosition(fileName: string, position: number): Promise<any | undefined>;
|
|
7029
|
-
/**
|
|
7030
|
-
* Get other ranges which are related to the item at the given position in the file (often used for highlighting).
|
|
7031
|
-
* @returns `Promise<ReadonlyArray<typescript.ReferenceEntry> | undefined>`
|
|
7032
|
-
*/
|
|
7033
|
-
getOccurrencesAtPosition(
|
|
7034
|
-
fileName: string,
|
|
7035
|
-
position: number
|
|
7036
|
-
): Promise<ReadonlyArray<any> | undefined>;
|
|
7037
|
-
/**
|
|
7038
|
-
* Get the definition of the item at the given position in the file.
|
|
7039
|
-
* @returns `Promise<ReadonlyArray<typescript.DefinitionInfo> | undefined>`
|
|
7040
|
-
*/
|
|
7041
|
-
getDefinitionAtPosition(
|
|
7042
|
-
fileName: string,
|
|
7043
|
-
position: number
|
|
7044
|
-
): Promise<ReadonlyArray<any> | undefined>;
|
|
7045
|
-
/**
|
|
7046
|
-
* Get references to the item at the given position in the file.
|
|
7047
|
-
* @returns `Promise<typescript.ReferenceEntry[] | undefined>`
|
|
7048
|
-
*/
|
|
7049
|
-
getReferencesAtPosition(fileName: string, position: number): Promise<any[] | undefined>;
|
|
7050
|
-
/**
|
|
7051
|
-
* Get outline entries for the item at the given position in the file.
|
|
7052
|
-
* @returns `Promise<typescript.NavigationBarItem[]>`
|
|
7053
|
-
*/
|
|
7054
|
-
getNavigationBarItems(fileName: string): Promise<any[]>;
|
|
7055
|
-
/**
|
|
7056
|
-
* Get changes which should be applied to format the given file.
|
|
7057
|
-
* @param options `typescript.FormatCodeOptions`
|
|
7058
|
-
* @returns `Promise<typescript.TextChange[]>`
|
|
7059
|
-
*/
|
|
7060
|
-
getFormattingEditsForDocument(fileName: string, options: any): Promise<any[]>;
|
|
7061
|
-
/**
|
|
7062
|
-
* Get changes which should be applied to format the given range in the file.
|
|
7063
|
-
* @param options `typescript.FormatCodeOptions`
|
|
7064
|
-
* @returns `Promise<typescript.TextChange[]>`
|
|
7065
|
-
*/
|
|
7066
|
-
getFormattingEditsForRange(
|
|
7067
|
-
fileName: string,
|
|
7068
|
-
start: number,
|
|
7069
|
-
end: number,
|
|
7070
|
-
options: any
|
|
7071
|
-
): Promise<any[]>;
|
|
7072
|
-
/**
|
|
7073
|
-
* Get formatting changes which should be applied after the given keystroke.
|
|
7074
|
-
* @param options `typescript.FormatCodeOptions`
|
|
7075
|
-
* @returns `Promise<typescript.TextChange[]>`
|
|
7076
|
-
*/
|
|
7077
|
-
getFormattingEditsAfterKeystroke(
|
|
7078
|
-
fileName: string,
|
|
7079
|
-
postion: number,
|
|
7080
|
-
ch: string,
|
|
7081
|
-
options: any
|
|
7082
|
-
): Promise<any[]>;
|
|
7083
|
-
/**
|
|
7084
|
-
* Get other occurrences which should be updated when renaming the item at the given file and position.
|
|
7085
|
-
* @returns `Promise<readonly typescript.RenameLocation[] | undefined>`
|
|
7086
|
-
*/
|
|
7087
|
-
findRenameLocations(
|
|
7088
|
-
fileName: string,
|
|
7089
|
-
positon: number,
|
|
7090
|
-
findInStrings: boolean,
|
|
7091
|
-
findInComments: boolean,
|
|
7092
|
-
providePrefixAndSuffixTextForRename: boolean
|
|
7093
|
-
): Promise<readonly any[] | undefined>;
|
|
7094
|
-
/**
|
|
7095
|
-
* Get edits which should be applied to rename the item at the given file and position (or a failure reason).
|
|
7096
|
-
* @param options `typescript.RenameInfoOptions`
|
|
7097
|
-
* @returns `Promise<typescript.RenameInfo>`
|
|
7098
|
-
*/
|
|
7099
|
-
getRenameInfo(fileName: string, positon: number, options: any): Promise<any>;
|
|
7266
|
+
export interface LanguageServiceDefaults {
|
|
7267
|
+
readonly languageId: string;
|
|
7268
|
+
readonly onDidChange: IEvent<LanguageServiceDefaults>;
|
|
7269
|
+
readonly modeConfiguration: ModeConfiguration;
|
|
7270
|
+
readonly options: Options;
|
|
7271
|
+
setOptions(options: Options): void;
|
|
7272
|
+
setModeConfiguration(modeConfiguration: ModeConfiguration): void;
|
|
7273
|
+
/** @deprecated Use options instead */
|
|
7274
|
+
readonly diagnosticsOptions: DiagnosticsOptions;
|
|
7275
|
+
/** @deprecated Use setOptions instead */
|
|
7276
|
+
setDiagnosticsOptions(options: DiagnosticsOptions): void;
|
|
7277
|
+
}
|
|
7278
|
+
/** @deprecated Use Options instead */
|
|
7279
|
+
export type DiagnosticsOptions = Options;
|
|
7280
|
+
export const cssDefaults: LanguageServiceDefaults;
|
|
7281
|
+
export const scssDefaults: LanguageServiceDefaults;
|
|
7282
|
+
export const lessDefaults: LanguageServiceDefaults;
|
|
7283
|
+
export interface CSSDataConfiguration {
|
|
7100
7284
|
/**
|
|
7101
|
-
*
|
|
7102
|
-
* @returns `typescript.EmitOutput`
|
|
7285
|
+
* Defines whether the standard CSS properties, at-directives, pseudoClasses and pseudoElements are shown.
|
|
7103
7286
|
*/
|
|
7104
|
-
|
|
7287
|
+
useDefaultDataProvider?: boolean;
|
|
7105
7288
|
/**
|
|
7106
|
-
*
|
|
7107
|
-
* @param formatOptions `typescript.FormatCodeOptions`
|
|
7108
|
-
* @returns `Promise<ReadonlyArray<typescript.CodeFixAction>>`
|
|
7289
|
+
* Provides a set of custom data providers.
|
|
7109
7290
|
*/
|
|
7110
|
-
|
|
7111
|
-
|
|
7112
|
-
|
|
7113
|
-
end: number,
|
|
7114
|
-
errorCodes: number[],
|
|
7115
|
-
formatOptions: any
|
|
7116
|
-
): Promise<ReadonlyArray<any>>;
|
|
7291
|
+
dataProviders?: {
|
|
7292
|
+
[providerId: string]: CSSDataV1;
|
|
7293
|
+
};
|
|
7117
7294
|
}
|
|
7118
|
-
|
|
7119
|
-
|
|
7120
|
-
|
|
7121
|
-
|
|
7122
|
-
export
|
|
7295
|
+
/**
|
|
7296
|
+
* Custom CSS properties, at-directives, pseudoClasses and pseudoElements
|
|
7297
|
+
* https://github.com/microsoft/vscode-css-languageservice/blob/main/docs/customData.md
|
|
7298
|
+
*/
|
|
7299
|
+
export interface CSSDataV1 {
|
|
7300
|
+
version: 1 | 1.1;
|
|
7301
|
+
properties?: IPropertyData[];
|
|
7302
|
+
atDirectives?: IAtDirectiveData[];
|
|
7303
|
+
pseudoClasses?: IPseudoClassData[];
|
|
7304
|
+
pseudoElements?: IPseudoElementData[];
|
|
7305
|
+
}
|
|
7306
|
+
export type EntryStatus = 'standard' | 'experimental' | 'nonstandard' | 'obsolete';
|
|
7307
|
+
export interface IReference {
|
|
7308
|
+
name: string;
|
|
7309
|
+
url: string;
|
|
7310
|
+
}
|
|
7311
|
+
export interface IPropertyData {
|
|
7312
|
+
name: string;
|
|
7313
|
+
description?: string | MarkupContent;
|
|
7314
|
+
browsers?: string[];
|
|
7315
|
+
restrictions?: string[];
|
|
7316
|
+
status?: EntryStatus;
|
|
7317
|
+
syntax?: string;
|
|
7318
|
+
values?: IValueData[];
|
|
7319
|
+
references?: IReference[];
|
|
7320
|
+
relevance?: number;
|
|
7321
|
+
}
|
|
7322
|
+
export interface IAtDirectiveData {
|
|
7323
|
+
name: string;
|
|
7324
|
+
description?: string | MarkupContent;
|
|
7325
|
+
browsers?: string[];
|
|
7326
|
+
status?: EntryStatus;
|
|
7327
|
+
references?: IReference[];
|
|
7328
|
+
}
|
|
7329
|
+
export interface IPseudoClassData {
|
|
7330
|
+
name: string;
|
|
7331
|
+
description?: string | MarkupContent;
|
|
7332
|
+
browsers?: string[];
|
|
7333
|
+
status?: EntryStatus;
|
|
7334
|
+
references?: IReference[];
|
|
7335
|
+
}
|
|
7336
|
+
export interface IPseudoElementData {
|
|
7337
|
+
name: string;
|
|
7338
|
+
description?: string | MarkupContent;
|
|
7339
|
+
browsers?: string[];
|
|
7340
|
+
status?: EntryStatus;
|
|
7341
|
+
references?: IReference[];
|
|
7342
|
+
}
|
|
7343
|
+
export interface IValueData {
|
|
7344
|
+
name: string;
|
|
7345
|
+
description?: string | MarkupContent;
|
|
7346
|
+
browsers?: string[];
|
|
7347
|
+
status?: EntryStatus;
|
|
7348
|
+
references?: IReference[];
|
|
7349
|
+
}
|
|
7350
|
+
export interface MarkupContent {
|
|
7351
|
+
kind: MarkupKind;
|
|
7352
|
+
value: string;
|
|
7353
|
+
}
|
|
7354
|
+
export type MarkupKind = 'plaintext' | 'markdown';
|
|
7123
7355
|
}
|
|
7124
7356
|
|
|
7125
7357
|
/*---------------------------------------------------------------------------------------------
|
|
@@ -7127,30 +7359,37 @@ declare namespace monaco.languages.typescript {
|
|
|
7127
7359
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
7128
7360
|
*--------------------------------------------------------------------------------------------*/
|
|
7129
7361
|
|
|
7130
|
-
|
|
7131
|
-
|
|
7132
|
-
|
|
7133
|
-
readonly
|
|
7134
|
-
readonly
|
|
7135
|
-
|
|
7136
|
-
|
|
7137
|
-
|
|
7138
|
-
|
|
7139
|
-
|
|
7140
|
-
|
|
7141
|
-
|
|
7142
|
-
|
|
7143
|
-
|
|
7144
|
-
|
|
7145
|
-
|
|
7146
|
-
|
|
7147
|
-
|
|
7148
|
-
|
|
7149
|
-
|
|
7150
|
-
|
|
7151
|
-
|
|
7152
|
-
|
|
7153
|
-
|
|
7362
|
+
declare namespace monaco.languages.html {
|
|
7363
|
+
export interface HTMLFormatConfiguration {
|
|
7364
|
+
readonly tabSize: number;
|
|
7365
|
+
readonly insertSpaces: boolean;
|
|
7366
|
+
readonly wrapLineLength: number;
|
|
7367
|
+
readonly unformatted: string;
|
|
7368
|
+
readonly contentUnformatted: string;
|
|
7369
|
+
readonly indentInnerHtml: boolean;
|
|
7370
|
+
readonly preserveNewLines: boolean;
|
|
7371
|
+
readonly maxPreserveNewLines: number | undefined;
|
|
7372
|
+
readonly indentHandlebars: boolean;
|
|
7373
|
+
readonly endWithNewline: boolean;
|
|
7374
|
+
readonly extraLiners: string;
|
|
7375
|
+
readonly wrapAttributes: 'auto' | 'force' | 'force-aligned' | 'force-expand-multiline';
|
|
7376
|
+
}
|
|
7377
|
+
export interface CompletionConfiguration {
|
|
7378
|
+
readonly [providerId: string]: boolean;
|
|
7379
|
+
}
|
|
7380
|
+
export interface Options {
|
|
7381
|
+
/**
|
|
7382
|
+
* If set, comments are tolerated. If set to false, syntax errors will be emitted for comments.
|
|
7383
|
+
*/
|
|
7384
|
+
readonly format?: HTMLFormatConfiguration;
|
|
7385
|
+
/**
|
|
7386
|
+
* A list of known schemas and/or associations of schemas to file names.
|
|
7387
|
+
*/
|
|
7388
|
+
readonly suggest?: CompletionConfiguration;
|
|
7389
|
+
/**
|
|
7390
|
+
* Configures the HTML data types known by the HTML langauge service.
|
|
7391
|
+
*/
|
|
7392
|
+
readonly data?: HTMLDataConfiguration;
|
|
7154
7393
|
}
|
|
7155
7394
|
export interface ModeConfiguration {
|
|
7156
7395
|
/**
|
|
@@ -7168,11 +7407,7 @@ declare namespace monaco.languages.css {
|
|
|
7168
7407
|
/**
|
|
7169
7408
|
* Defines whether the built-in definitions provider is enabled.
|
|
7170
7409
|
*/
|
|
7171
|
-
readonly
|
|
7172
|
-
/**
|
|
7173
|
-
* Defines whether the built-in references provider is enabled.
|
|
7174
|
-
*/
|
|
7175
|
-
readonly references?: boolean;
|
|
7410
|
+
readonly links?: boolean;
|
|
7176
7411
|
/**
|
|
7177
7412
|
* Defines whether the built-in references provider is enabled.
|
|
7178
7413
|
*/
|
|
@@ -7197,18 +7432,93 @@ declare namespace monaco.languages.css {
|
|
|
7197
7432
|
* Defines whether the built-in selection range provider is enabled.
|
|
7198
7433
|
*/
|
|
7199
7434
|
readonly selectionRanges?: boolean;
|
|
7435
|
+
/**
|
|
7436
|
+
* Defines whether the built-in documentFormattingEdit provider is enabled.
|
|
7437
|
+
*/
|
|
7438
|
+
readonly documentFormattingEdits?: boolean;
|
|
7439
|
+
/**
|
|
7440
|
+
* Defines whether the built-in documentRangeFormattingEdit provider is enabled.
|
|
7441
|
+
*/
|
|
7442
|
+
readonly documentRangeFormattingEdits?: boolean;
|
|
7200
7443
|
}
|
|
7201
7444
|
export interface LanguageServiceDefaults {
|
|
7202
7445
|
readonly languageId: string;
|
|
7203
|
-
readonly onDidChange: IEvent<LanguageServiceDefaults>;
|
|
7204
|
-
readonly diagnosticsOptions: DiagnosticsOptions;
|
|
7205
7446
|
readonly modeConfiguration: ModeConfiguration;
|
|
7206
|
-
|
|
7447
|
+
readonly onDidChange: IEvent<LanguageServiceDefaults>;
|
|
7448
|
+
readonly options: Options;
|
|
7449
|
+
setOptions(options: Options): void;
|
|
7207
7450
|
setModeConfiguration(modeConfiguration: ModeConfiguration): void;
|
|
7208
7451
|
}
|
|
7209
|
-
export const
|
|
7210
|
-
export const
|
|
7211
|
-
export const
|
|
7452
|
+
export const htmlLanguageService: LanguageServiceRegistration;
|
|
7453
|
+
export const htmlDefaults: LanguageServiceDefaults;
|
|
7454
|
+
export const handlebarLanguageService: LanguageServiceRegistration;
|
|
7455
|
+
export const handlebarDefaults: LanguageServiceDefaults;
|
|
7456
|
+
export const razorLanguageService: LanguageServiceRegistration;
|
|
7457
|
+
export const razorDefaults: LanguageServiceDefaults;
|
|
7458
|
+
export interface LanguageServiceRegistration extends IDisposable {
|
|
7459
|
+
readonly defaults: LanguageServiceDefaults;
|
|
7460
|
+
}
|
|
7461
|
+
/**
|
|
7462
|
+
* Registers a new HTML language service for the languageId.
|
|
7463
|
+
* Note: 'html', 'handlebar' and 'razor' are registered by default.
|
|
7464
|
+
*
|
|
7465
|
+
* Use this method to register additional language ids with a HTML service.
|
|
7466
|
+
* The language server has to be registered before an editor model is opened.
|
|
7467
|
+
*/
|
|
7468
|
+
export function registerHTMLLanguageService(languageId: string, options?: Options, modeConfiguration?: ModeConfiguration): LanguageServiceRegistration;
|
|
7469
|
+
export interface HTMLDataConfiguration {
|
|
7470
|
+
/**
|
|
7471
|
+
* Defines whether the standard HTML tags and attributes are shown
|
|
7472
|
+
*/
|
|
7473
|
+
readonly useDefaultDataProvider?: boolean;
|
|
7474
|
+
/**
|
|
7475
|
+
* Provides a set of custom data providers.
|
|
7476
|
+
*/
|
|
7477
|
+
readonly dataProviders?: {
|
|
7478
|
+
[providerId: string]: HTMLDataV1;
|
|
7479
|
+
};
|
|
7480
|
+
}
|
|
7481
|
+
/**
|
|
7482
|
+
* Custom HTML tags attributes and attribute values
|
|
7483
|
+
* https://github.com/microsoft/vscode-html-languageservice/blob/main/docs/customData.md
|
|
7484
|
+
*/
|
|
7485
|
+
export interface HTMLDataV1 {
|
|
7486
|
+
readonly version: 1 | 1.1;
|
|
7487
|
+
readonly tags?: ITagData[];
|
|
7488
|
+
readonly globalAttributes?: IAttributeData[];
|
|
7489
|
+
readonly valueSets?: IValueSet[];
|
|
7490
|
+
}
|
|
7491
|
+
export interface IReference {
|
|
7492
|
+
readonly name: string;
|
|
7493
|
+
readonly url: string;
|
|
7494
|
+
}
|
|
7495
|
+
export interface ITagData {
|
|
7496
|
+
readonly name: string;
|
|
7497
|
+
readonly description?: string | MarkupContent;
|
|
7498
|
+
readonly attributes: IAttributeData[];
|
|
7499
|
+
readonly references?: IReference[];
|
|
7500
|
+
}
|
|
7501
|
+
export interface IAttributeData {
|
|
7502
|
+
readonly name: string;
|
|
7503
|
+
readonly description?: string | MarkupContent;
|
|
7504
|
+
readonly valueSet?: string;
|
|
7505
|
+
readonly values?: IValueData[];
|
|
7506
|
+
readonly references?: IReference[];
|
|
7507
|
+
}
|
|
7508
|
+
export interface IValueData {
|
|
7509
|
+
readonly name: string;
|
|
7510
|
+
readonly description?: string | MarkupContent;
|
|
7511
|
+
readonly references?: IReference[];
|
|
7512
|
+
}
|
|
7513
|
+
export interface IValueSet {
|
|
7514
|
+
readonly name: string;
|
|
7515
|
+
readonly values: IValueData[];
|
|
7516
|
+
}
|
|
7517
|
+
export interface MarkupContent {
|
|
7518
|
+
readonly kind: MarkupKind;
|
|
7519
|
+
readonly value: string;
|
|
7520
|
+
}
|
|
7521
|
+
export type MarkupKind = 'plaintext' | 'markdown';
|
|
7212
7522
|
}
|
|
7213
7523
|
|
|
7214
7524
|
/*---------------------------------------------------------------------------------------------
|
|
@@ -7216,7 +7526,6 @@ declare namespace monaco.languages.css {
|
|
|
7216
7526
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
7217
7527
|
*--------------------------------------------------------------------------------------------*/
|
|
7218
7528
|
|
|
7219
|
-
|
|
7220
7529
|
declare namespace monaco.languages.json {
|
|
7221
7530
|
export interface DiagnosticsOptions {
|
|
7222
7531
|
/**
|
|
@@ -7329,93 +7638,390 @@ declare namespace monaco.languages.json {
|
|
|
7329
7638
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
7330
7639
|
*--------------------------------------------------------------------------------------------*/
|
|
7331
7640
|
|
|
7332
|
-
|
|
7333
|
-
|
|
7334
|
-
|
|
7335
|
-
|
|
7336
|
-
|
|
7337
|
-
|
|
7338
|
-
|
|
7339
|
-
|
|
7340
|
-
|
|
7341
|
-
readonly preserveNewLines: boolean;
|
|
7342
|
-
readonly maxPreserveNewLines: number;
|
|
7343
|
-
readonly indentHandlebars: boolean;
|
|
7344
|
-
readonly endWithNewline: boolean;
|
|
7345
|
-
readonly extraLiners: string;
|
|
7346
|
-
readonly wrapAttributes: 'auto' | 'force' | 'force-aligned' | 'force-expand-multiline';
|
|
7641
|
+
declare namespace monaco.languages.typescript {
|
|
7642
|
+
export enum ModuleKind {
|
|
7643
|
+
None = 0,
|
|
7644
|
+
CommonJS = 1,
|
|
7645
|
+
AMD = 2,
|
|
7646
|
+
UMD = 3,
|
|
7647
|
+
System = 4,
|
|
7648
|
+
ES2015 = 5,
|
|
7649
|
+
ESNext = 99
|
|
7347
7650
|
}
|
|
7348
|
-
export
|
|
7349
|
-
|
|
7651
|
+
export enum JsxEmit {
|
|
7652
|
+
None = 0,
|
|
7653
|
+
Preserve = 1,
|
|
7654
|
+
React = 2,
|
|
7655
|
+
ReactNative = 3,
|
|
7656
|
+
ReactJSX = 4,
|
|
7657
|
+
ReactJSXDev = 5
|
|
7350
7658
|
}
|
|
7351
|
-
export
|
|
7659
|
+
export enum NewLineKind {
|
|
7660
|
+
CarriageReturnLineFeed = 0,
|
|
7661
|
+
LineFeed = 1
|
|
7662
|
+
}
|
|
7663
|
+
export enum ScriptTarget {
|
|
7664
|
+
ES3 = 0,
|
|
7665
|
+
ES5 = 1,
|
|
7666
|
+
ES2015 = 2,
|
|
7667
|
+
ES2016 = 3,
|
|
7668
|
+
ES2017 = 4,
|
|
7669
|
+
ES2018 = 5,
|
|
7670
|
+
ES2019 = 6,
|
|
7671
|
+
ES2020 = 7,
|
|
7672
|
+
ESNext = 99,
|
|
7673
|
+
JSON = 100,
|
|
7674
|
+
Latest = 99
|
|
7675
|
+
}
|
|
7676
|
+
export enum ModuleResolutionKind {
|
|
7677
|
+
Classic = 1,
|
|
7678
|
+
NodeJs = 2
|
|
7679
|
+
}
|
|
7680
|
+
interface MapLike<T> {
|
|
7681
|
+
[index: string]: T;
|
|
7682
|
+
}
|
|
7683
|
+
type CompilerOptionsValue = string | number | boolean | (string | number)[] | string[] | MapLike<string[]> | null | undefined;
|
|
7684
|
+
interface CompilerOptions {
|
|
7685
|
+
allowJs?: boolean;
|
|
7686
|
+
allowSyntheticDefaultImports?: boolean;
|
|
7687
|
+
allowUmdGlobalAccess?: boolean;
|
|
7688
|
+
allowUnreachableCode?: boolean;
|
|
7689
|
+
allowUnusedLabels?: boolean;
|
|
7690
|
+
alwaysStrict?: boolean;
|
|
7691
|
+
baseUrl?: string;
|
|
7692
|
+
charset?: string;
|
|
7693
|
+
checkJs?: boolean;
|
|
7694
|
+
declaration?: boolean;
|
|
7695
|
+
declarationMap?: boolean;
|
|
7696
|
+
emitDeclarationOnly?: boolean;
|
|
7697
|
+
declarationDir?: string;
|
|
7698
|
+
disableSizeLimit?: boolean;
|
|
7699
|
+
disableSourceOfProjectReferenceRedirect?: boolean;
|
|
7700
|
+
downlevelIteration?: boolean;
|
|
7701
|
+
emitBOM?: boolean;
|
|
7702
|
+
emitDecoratorMetadata?: boolean;
|
|
7703
|
+
experimentalDecorators?: boolean;
|
|
7704
|
+
forceConsistentCasingInFileNames?: boolean;
|
|
7705
|
+
importHelpers?: boolean;
|
|
7706
|
+
inlineSourceMap?: boolean;
|
|
7707
|
+
inlineSources?: boolean;
|
|
7708
|
+
isolatedModules?: boolean;
|
|
7709
|
+
jsx?: JsxEmit;
|
|
7710
|
+
keyofStringsOnly?: boolean;
|
|
7711
|
+
lib?: string[];
|
|
7712
|
+
locale?: string;
|
|
7713
|
+
mapRoot?: string;
|
|
7714
|
+
maxNodeModuleJsDepth?: number;
|
|
7715
|
+
module?: ModuleKind;
|
|
7716
|
+
moduleResolution?: ModuleResolutionKind;
|
|
7717
|
+
newLine?: NewLineKind;
|
|
7718
|
+
noEmit?: boolean;
|
|
7719
|
+
noEmitHelpers?: boolean;
|
|
7720
|
+
noEmitOnError?: boolean;
|
|
7721
|
+
noErrorTruncation?: boolean;
|
|
7722
|
+
noFallthroughCasesInSwitch?: boolean;
|
|
7723
|
+
noImplicitAny?: boolean;
|
|
7724
|
+
noImplicitReturns?: boolean;
|
|
7725
|
+
noImplicitThis?: boolean;
|
|
7726
|
+
noStrictGenericChecks?: boolean;
|
|
7727
|
+
noUnusedLocals?: boolean;
|
|
7728
|
+
noUnusedParameters?: boolean;
|
|
7729
|
+
noImplicitUseStrict?: boolean;
|
|
7730
|
+
noLib?: boolean;
|
|
7731
|
+
noResolve?: boolean;
|
|
7732
|
+
out?: string;
|
|
7733
|
+
outDir?: string;
|
|
7734
|
+
outFile?: string;
|
|
7735
|
+
paths?: MapLike<string[]>;
|
|
7736
|
+
preserveConstEnums?: boolean;
|
|
7737
|
+
preserveSymlinks?: boolean;
|
|
7738
|
+
project?: string;
|
|
7739
|
+
reactNamespace?: string;
|
|
7740
|
+
jsxFactory?: string;
|
|
7741
|
+
composite?: boolean;
|
|
7742
|
+
removeComments?: boolean;
|
|
7743
|
+
rootDir?: string;
|
|
7744
|
+
rootDirs?: string[];
|
|
7745
|
+
skipLibCheck?: boolean;
|
|
7746
|
+
skipDefaultLibCheck?: boolean;
|
|
7747
|
+
sourceMap?: boolean;
|
|
7748
|
+
sourceRoot?: string;
|
|
7749
|
+
strict?: boolean;
|
|
7750
|
+
strictFunctionTypes?: boolean;
|
|
7751
|
+
strictBindCallApply?: boolean;
|
|
7752
|
+
strictNullChecks?: boolean;
|
|
7753
|
+
strictPropertyInitialization?: boolean;
|
|
7754
|
+
stripInternal?: boolean;
|
|
7755
|
+
suppressExcessPropertyErrors?: boolean;
|
|
7756
|
+
suppressImplicitAnyIndexErrors?: boolean;
|
|
7757
|
+
target?: ScriptTarget;
|
|
7758
|
+
traceResolution?: boolean;
|
|
7759
|
+
resolveJsonModule?: boolean;
|
|
7760
|
+
types?: string[];
|
|
7761
|
+
/** Paths used to compute primary types search locations */
|
|
7762
|
+
typeRoots?: string[];
|
|
7763
|
+
esModuleInterop?: boolean;
|
|
7764
|
+
useDefineForClassFields?: boolean;
|
|
7765
|
+
[option: string]: CompilerOptionsValue | undefined;
|
|
7766
|
+
}
|
|
7767
|
+
export interface DiagnosticsOptions {
|
|
7768
|
+
noSemanticValidation?: boolean;
|
|
7769
|
+
noSyntaxValidation?: boolean;
|
|
7770
|
+
noSuggestionDiagnostics?: boolean;
|
|
7352
7771
|
/**
|
|
7353
|
-
*
|
|
7772
|
+
* Limit diagnostic computation to only visible files.
|
|
7773
|
+
* Defaults to false.
|
|
7354
7774
|
*/
|
|
7355
|
-
|
|
7775
|
+
onlyVisible?: boolean;
|
|
7776
|
+
diagnosticCodesToIgnore?: number[];
|
|
7777
|
+
}
|
|
7778
|
+
export interface WorkerOptions {
|
|
7779
|
+
/** A full HTTP path to a JavaScript file which adds a function `customTSWorkerFactory` to the self inside a web-worker */
|
|
7780
|
+
customWorkerPath?: string;
|
|
7781
|
+
}
|
|
7782
|
+
interface InlayHintsOptions {
|
|
7783
|
+
readonly includeInlayParameterNameHints?: 'none' | 'literals' | 'all';
|
|
7784
|
+
readonly includeInlayParameterNameHintsWhenArgumentMatchesName?: boolean;
|
|
7785
|
+
readonly includeInlayFunctionParameterTypeHints?: boolean;
|
|
7786
|
+
readonly includeInlayVariableTypeHints?: boolean;
|
|
7787
|
+
readonly includeInlayPropertyDeclarationTypeHints?: boolean;
|
|
7788
|
+
readonly includeInlayFunctionLikeReturnTypeHints?: boolean;
|
|
7789
|
+
readonly includeInlayEnumMemberValueHints?: boolean;
|
|
7790
|
+
}
|
|
7791
|
+
interface IExtraLib {
|
|
7792
|
+
content: string;
|
|
7793
|
+
version: number;
|
|
7794
|
+
}
|
|
7795
|
+
export interface IExtraLibs {
|
|
7796
|
+
[path: string]: IExtraLib;
|
|
7797
|
+
}
|
|
7798
|
+
/**
|
|
7799
|
+
* A linked list of formatted diagnostic messages to be used as part of a multiline message.
|
|
7800
|
+
* It is built from the bottom up, leaving the head to be the "main" diagnostic.
|
|
7801
|
+
*/
|
|
7802
|
+
interface DiagnosticMessageChain {
|
|
7803
|
+
messageText: string;
|
|
7804
|
+
/** Diagnostic category: warning = 0, error = 1, suggestion = 2, message = 3 */
|
|
7805
|
+
category: 0 | 1 | 2 | 3;
|
|
7806
|
+
code: number;
|
|
7807
|
+
next?: DiagnosticMessageChain[];
|
|
7808
|
+
}
|
|
7809
|
+
export interface Diagnostic extends DiagnosticRelatedInformation {
|
|
7810
|
+
/** May store more in future. For now, this will simply be `true` to indicate when a diagnostic is an unused-identifier diagnostic. */
|
|
7811
|
+
reportsUnnecessary?: {};
|
|
7812
|
+
reportsDeprecated?: {};
|
|
7813
|
+
source?: string;
|
|
7814
|
+
relatedInformation?: DiagnosticRelatedInformation[];
|
|
7815
|
+
}
|
|
7816
|
+
export interface DiagnosticRelatedInformation {
|
|
7817
|
+
/** Diagnostic category: warning = 0, error = 1, suggestion = 2, message = 3 */
|
|
7818
|
+
category: 0 | 1 | 2 | 3;
|
|
7819
|
+
code: number;
|
|
7820
|
+
/** TypeScriptWorker removes all but the `fileName` property to avoid serializing circular JSON structures. */
|
|
7821
|
+
file: {
|
|
7822
|
+
fileName: string;
|
|
7823
|
+
} | undefined;
|
|
7824
|
+
start: number | undefined;
|
|
7825
|
+
length: number | undefined;
|
|
7826
|
+
messageText: string | DiagnosticMessageChain;
|
|
7827
|
+
}
|
|
7828
|
+
interface EmitOutput {
|
|
7829
|
+
outputFiles: OutputFile[];
|
|
7830
|
+
emitSkipped: boolean;
|
|
7831
|
+
}
|
|
7832
|
+
interface OutputFile {
|
|
7833
|
+
name: string;
|
|
7834
|
+
writeByteOrderMark: boolean;
|
|
7835
|
+
text: string;
|
|
7836
|
+
}
|
|
7837
|
+
export interface LanguageServiceDefaults {
|
|
7356
7838
|
/**
|
|
7357
|
-
*
|
|
7839
|
+
* Event fired when compiler options or diagnostics options are changed.
|
|
7358
7840
|
*/
|
|
7359
|
-
readonly
|
|
7360
|
-
}
|
|
7361
|
-
export interface ModeConfiguration {
|
|
7841
|
+
readonly onDidChange: IEvent<void>;
|
|
7362
7842
|
/**
|
|
7363
|
-
*
|
|
7843
|
+
* Event fired when extra libraries registered with the language service change.
|
|
7364
7844
|
*/
|
|
7365
|
-
readonly
|
|
7845
|
+
readonly onDidExtraLibsChange: IEvent<void>;
|
|
7846
|
+
readonly workerOptions: WorkerOptions;
|
|
7847
|
+
readonly inlayHintsOptions: InlayHintsOptions;
|
|
7366
7848
|
/**
|
|
7367
|
-
*
|
|
7849
|
+
* Get the current extra libs registered with the language service.
|
|
7368
7850
|
*/
|
|
7369
|
-
|
|
7851
|
+
getExtraLibs(): IExtraLibs;
|
|
7370
7852
|
/**
|
|
7371
|
-
*
|
|
7853
|
+
* Add an additional source file to the language service. Use this
|
|
7854
|
+
* for typescript (definition) files that won't be loaded as editor
|
|
7855
|
+
* documents, like `jquery.d.ts`.
|
|
7856
|
+
*
|
|
7857
|
+
* @param content The file content
|
|
7858
|
+
* @param filePath An optional file path
|
|
7859
|
+
* @returns A disposable which will remove the file from the
|
|
7860
|
+
* language service upon disposal.
|
|
7372
7861
|
*/
|
|
7373
|
-
|
|
7862
|
+
addExtraLib(content: string, filePath?: string): IDisposable;
|
|
7374
7863
|
/**
|
|
7375
|
-
*
|
|
7864
|
+
* Remove all existing extra libs and set the additional source
|
|
7865
|
+
* files to the language service. Use this for typescript definition
|
|
7866
|
+
* files that won't be loaded as editor documents, like `jquery.d.ts`.
|
|
7867
|
+
* @param libs An array of entries to register.
|
|
7376
7868
|
*/
|
|
7377
|
-
|
|
7869
|
+
setExtraLibs(libs: {
|
|
7870
|
+
content: string;
|
|
7871
|
+
filePath?: string;
|
|
7872
|
+
}[]): void;
|
|
7378
7873
|
/**
|
|
7379
|
-
*
|
|
7874
|
+
* Get current TypeScript compiler options for the language service.
|
|
7380
7875
|
*/
|
|
7381
|
-
|
|
7876
|
+
getCompilerOptions(): CompilerOptions;
|
|
7382
7877
|
/**
|
|
7383
|
-
*
|
|
7878
|
+
* Set TypeScript compiler options.
|
|
7384
7879
|
*/
|
|
7385
|
-
|
|
7880
|
+
setCompilerOptions(options: CompilerOptions): void;
|
|
7386
7881
|
/**
|
|
7387
|
-
*
|
|
7882
|
+
* Get the current diagnostics options for the language service.
|
|
7388
7883
|
*/
|
|
7389
|
-
|
|
7884
|
+
getDiagnosticsOptions(): DiagnosticsOptions;
|
|
7390
7885
|
/**
|
|
7391
|
-
*
|
|
7886
|
+
* Configure whether syntactic and/or semantic validation should
|
|
7887
|
+
* be performed
|
|
7392
7888
|
*/
|
|
7393
|
-
|
|
7889
|
+
setDiagnosticsOptions(options: DiagnosticsOptions): void;
|
|
7394
7890
|
/**
|
|
7395
|
-
*
|
|
7891
|
+
* Configure webworker options
|
|
7396
7892
|
*/
|
|
7397
|
-
|
|
7893
|
+
setWorkerOptions(options: WorkerOptions): void;
|
|
7398
7894
|
/**
|
|
7399
|
-
*
|
|
7895
|
+
* No-op.
|
|
7400
7896
|
*/
|
|
7401
|
-
|
|
7897
|
+
setMaximumWorkerIdleTime(value: number): void;
|
|
7402
7898
|
/**
|
|
7403
|
-
*
|
|
7899
|
+
* Configure if all existing models should be eagerly sync'd
|
|
7900
|
+
* to the worker on start or restart.
|
|
7404
7901
|
*/
|
|
7405
|
-
|
|
7902
|
+
setEagerModelSync(value: boolean): void;
|
|
7406
7903
|
/**
|
|
7407
|
-
*
|
|
7904
|
+
* Get the current setting for whether all existing models should be eagerly sync'd
|
|
7905
|
+
* to the worker on start or restart.
|
|
7408
7906
|
*/
|
|
7409
|
-
|
|
7907
|
+
getEagerModelSync(): boolean;
|
|
7908
|
+
/**
|
|
7909
|
+
* Configure inlay hints options.
|
|
7910
|
+
*/
|
|
7911
|
+
setInlayHintsOptions(options: InlayHintsOptions): void;
|
|
7410
7912
|
}
|
|
7411
|
-
export interface
|
|
7412
|
-
|
|
7413
|
-
|
|
7414
|
-
|
|
7415
|
-
|
|
7416
|
-
|
|
7913
|
+
export interface TypeScriptWorker {
|
|
7914
|
+
/**
|
|
7915
|
+
* Get diagnostic messages for any syntax issues in the given file.
|
|
7916
|
+
*/
|
|
7917
|
+
getSyntacticDiagnostics(fileName: string): Promise<Diagnostic[]>;
|
|
7918
|
+
/**
|
|
7919
|
+
* Get diagnostic messages for any semantic issues in the given file.
|
|
7920
|
+
*/
|
|
7921
|
+
getSemanticDiagnostics(fileName: string): Promise<Diagnostic[]>;
|
|
7922
|
+
/**
|
|
7923
|
+
* Get diagnostic messages for any suggestions related to the given file.
|
|
7924
|
+
*/
|
|
7925
|
+
getSuggestionDiagnostics(fileName: string): Promise<Diagnostic[]>;
|
|
7926
|
+
/**
|
|
7927
|
+
* Get the content of a given file.
|
|
7928
|
+
*/
|
|
7929
|
+
getScriptText(fileName: string): Promise<string | undefined>;
|
|
7930
|
+
/**
|
|
7931
|
+
* Get diagnostic messages related to the current compiler options.
|
|
7932
|
+
* @param fileName Not used
|
|
7933
|
+
*/
|
|
7934
|
+
getCompilerOptionsDiagnostics(fileName: string): Promise<Diagnostic[]>;
|
|
7935
|
+
/**
|
|
7936
|
+
* Get code completions for the given file and position.
|
|
7937
|
+
* @returns `Promise<typescript.CompletionInfo | undefined>`
|
|
7938
|
+
*/
|
|
7939
|
+
getCompletionsAtPosition(fileName: string, position: number): Promise<any | undefined>;
|
|
7940
|
+
/**
|
|
7941
|
+
* Get code completion details for the given file, position, and entry.
|
|
7942
|
+
* @returns `Promise<typescript.CompletionEntryDetails | undefined>`
|
|
7943
|
+
*/
|
|
7944
|
+
getCompletionEntryDetails(fileName: string, position: number, entry: string): Promise<any | undefined>;
|
|
7945
|
+
/**
|
|
7946
|
+
* Get signature help items for the item at the given file and position.
|
|
7947
|
+
* @returns `Promise<typescript.SignatureHelpItems | undefined>`
|
|
7948
|
+
*/
|
|
7949
|
+
getSignatureHelpItems(fileName: string, position: number, options: any): Promise<any | undefined>;
|
|
7950
|
+
/**
|
|
7951
|
+
* Get quick info for the item at the given position in the file.
|
|
7952
|
+
* @returns `Promise<typescript.QuickInfo | undefined>`
|
|
7953
|
+
*/
|
|
7954
|
+
getQuickInfoAtPosition(fileName: string, position: number): Promise<any | undefined>;
|
|
7955
|
+
/**
|
|
7956
|
+
* Get other ranges which are related to the item at the given position in the file (often used for highlighting).
|
|
7957
|
+
* @returns `Promise<ReadonlyArray<typescript.ReferenceEntry> | undefined>`
|
|
7958
|
+
*/
|
|
7959
|
+
getOccurrencesAtPosition(fileName: string, position: number): Promise<ReadonlyArray<any> | undefined>;
|
|
7960
|
+
/**
|
|
7961
|
+
* Get the definition of the item at the given position in the file.
|
|
7962
|
+
* @returns `Promise<ReadonlyArray<typescript.DefinitionInfo> | undefined>`
|
|
7963
|
+
*/
|
|
7964
|
+
getDefinitionAtPosition(fileName: string, position: number): Promise<ReadonlyArray<any> | undefined>;
|
|
7965
|
+
/**
|
|
7966
|
+
* Get references to the item at the given position in the file.
|
|
7967
|
+
* @returns `Promise<typescript.ReferenceEntry[] | undefined>`
|
|
7968
|
+
*/
|
|
7969
|
+
getReferencesAtPosition(fileName: string, position: number): Promise<any[] | undefined>;
|
|
7970
|
+
/**
|
|
7971
|
+
* Get outline entries for the item at the given position in the file.
|
|
7972
|
+
* @returns `Promise<typescript.NavigationBarItem[]>`
|
|
7973
|
+
*/
|
|
7974
|
+
getNavigationBarItems(fileName: string): Promise<any[]>;
|
|
7975
|
+
/**
|
|
7976
|
+
* Get changes which should be applied to format the given file.
|
|
7977
|
+
* @param options `typescript.FormatCodeOptions`
|
|
7978
|
+
* @returns `Promise<typescript.TextChange[]>`
|
|
7979
|
+
*/
|
|
7980
|
+
getFormattingEditsForDocument(fileName: string, options: any): Promise<any[]>;
|
|
7981
|
+
/**
|
|
7982
|
+
* Get changes which should be applied to format the given range in the file.
|
|
7983
|
+
* @param options `typescript.FormatCodeOptions`
|
|
7984
|
+
* @returns `Promise<typescript.TextChange[]>`
|
|
7985
|
+
*/
|
|
7986
|
+
getFormattingEditsForRange(fileName: string, start: number, end: number, options: any): Promise<any[]>;
|
|
7987
|
+
/**
|
|
7988
|
+
* Get formatting changes which should be applied after the given keystroke.
|
|
7989
|
+
* @param options `typescript.FormatCodeOptions`
|
|
7990
|
+
* @returns `Promise<typescript.TextChange[]>`
|
|
7991
|
+
*/
|
|
7992
|
+
getFormattingEditsAfterKeystroke(fileName: string, postion: number, ch: string, options: any): Promise<any[]>;
|
|
7993
|
+
/**
|
|
7994
|
+
* Get other occurrences which should be updated when renaming the item at the given file and position.
|
|
7995
|
+
* @returns `Promise<readonly typescript.RenameLocation[] | undefined>`
|
|
7996
|
+
*/
|
|
7997
|
+
findRenameLocations(fileName: string, positon: number, findInStrings: boolean, findInComments: boolean, providePrefixAndSuffixTextForRename: boolean): Promise<readonly any[] | undefined>;
|
|
7998
|
+
/**
|
|
7999
|
+
* Get edits which should be applied to rename the item at the given file and position (or a failure reason).
|
|
8000
|
+
* @param options `typescript.RenameInfoOptions`
|
|
8001
|
+
* @returns `Promise<typescript.RenameInfo>`
|
|
8002
|
+
*/
|
|
8003
|
+
getRenameInfo(fileName: string, positon: number, options: any): Promise<any>;
|
|
8004
|
+
/**
|
|
8005
|
+
* Get transpiled output for the given file.
|
|
8006
|
+
* @returns `typescript.EmitOutput`
|
|
8007
|
+
*/
|
|
8008
|
+
getEmitOutput(fileName: string): Promise<EmitOutput>;
|
|
8009
|
+
/**
|
|
8010
|
+
* Get possible code fixes at the given position in the file.
|
|
8011
|
+
* @param formatOptions `typescript.FormatCodeOptions`
|
|
8012
|
+
* @returns `Promise<ReadonlyArray<typescript.CodeFixAction>>`
|
|
8013
|
+
*/
|
|
8014
|
+
getCodeFixesAtPosition(fileName: string, start: number, end: number, errorCodes: number[], formatOptions: any): Promise<ReadonlyArray<any>>;
|
|
8015
|
+
/**
|
|
8016
|
+
* Get inlay hints in the range of the file.
|
|
8017
|
+
* @param fileName
|
|
8018
|
+
* @returns `Promise<typescript.InlayHint[]>`
|
|
8019
|
+
*/
|
|
8020
|
+
provideInlayHints(fileName: string, start: number, end: number): Promise<ReadonlyArray<any>>;
|
|
7417
8021
|
}
|
|
7418
|
-
export const
|
|
7419
|
-
export const
|
|
7420
|
-
export const
|
|
8022
|
+
export const typescriptVersion: string;
|
|
8023
|
+
export const typescriptDefaults: LanguageServiceDefaults;
|
|
8024
|
+
export const javascriptDefaults: LanguageServiceDefaults;
|
|
8025
|
+
export const getTypeScriptWorker: () => Promise<(...uris: Uri[]) => Promise<TypeScriptWorker>>;
|
|
8026
|
+
export const getJavaScriptWorker: () => Promise<(...uris: Uri[]) => Promise<TypeScriptWorker>>;
|
|
7421
8027
|
}
|