@ng-util/monaco-editor 15.0.0 → 16.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/esm2022/monaco-editor-base.component.mjs +153 -0
- package/esm2022/monaco-editor-diff.component.mjs +49 -0
- package/esm2022/monaco-editor.component.mjs +104 -0
- package/esm2022/monaco-editor.module.mjs +27 -0
- package/{fesm2020 → fesm2022}/ng-util-monaco-editor.mjs +30 -31
- package/{fesm2020 → fesm2022}/ng-util-monaco-editor.mjs.map +1 -1
- package/monaco-editor-base.component.d.ts +1 -1
- package/monaco-editor-diff.component.d.ts +1 -1
- package/monaco-editor.component.d.ts +1 -1
- package/monaco-editor.types.d.ts +1 -1
- package/monaco.d.ts +705 -245
- package/package.json +5 -11
- package/esm2020/monaco-editor-base.component.mjs +0 -153
- package/esm2020/monaco-editor-diff.component.mjs +0 -48
- package/esm2020/monaco-editor.component.mjs +0 -103
- package/esm2020/monaco-editor.module.mjs +0 -26
- package/fesm2015/ng-util-monaco-editor.mjs +0 -329
- package/fesm2015/ng-util-monaco-editor.mjs.map +0 -1
- /package/{esm2020 → esm2022}/monaco-editor.config.mjs +0 -0
- /package/{esm2020 → esm2022}/monaco-editor.types.mjs +0 -0
- /package/{esm2020 → esm2022}/ng-util-monaco-editor.mjs +0 -0
- /package/{esm2020 → esm2022}/public-api.mjs +0 -0
package/monaco.d.ts
CHANGED
|
@@ -308,116 +308,121 @@ declare namespace monaco {
|
|
|
308
308
|
F17 = 75,
|
|
309
309
|
F18 = 76,
|
|
310
310
|
F19 = 77,
|
|
311
|
-
|
|
312
|
-
|
|
311
|
+
F20 = 78,
|
|
312
|
+
F21 = 79,
|
|
313
|
+
F22 = 80,
|
|
314
|
+
F23 = 81,
|
|
315
|
+
F24 = 82,
|
|
316
|
+
NumLock = 83,
|
|
317
|
+
ScrollLock = 84,
|
|
313
318
|
/**
|
|
314
319
|
* Used for miscellaneous characters; it can vary by keyboard.
|
|
315
320
|
* For the US standard keyboard, the ';:' key
|
|
316
321
|
*/
|
|
317
|
-
Semicolon =
|
|
322
|
+
Semicolon = 85,
|
|
318
323
|
/**
|
|
319
324
|
* For any country/region, the '+' key
|
|
320
325
|
* For the US standard keyboard, the '=+' key
|
|
321
326
|
*/
|
|
322
|
-
Equal =
|
|
327
|
+
Equal = 86,
|
|
323
328
|
/**
|
|
324
329
|
* For any country/region, the ',' key
|
|
325
330
|
* For the US standard keyboard, the ',<' key
|
|
326
331
|
*/
|
|
327
|
-
Comma =
|
|
332
|
+
Comma = 87,
|
|
328
333
|
/**
|
|
329
334
|
* For any country/region, the '-' key
|
|
330
335
|
* For the US standard keyboard, the '-_' key
|
|
331
336
|
*/
|
|
332
|
-
Minus =
|
|
337
|
+
Minus = 88,
|
|
333
338
|
/**
|
|
334
339
|
* For any country/region, the '.' key
|
|
335
340
|
* For the US standard keyboard, the '.>' key
|
|
336
341
|
*/
|
|
337
|
-
Period =
|
|
342
|
+
Period = 89,
|
|
338
343
|
/**
|
|
339
344
|
* Used for miscellaneous characters; it can vary by keyboard.
|
|
340
345
|
* For the US standard keyboard, the '/?' key
|
|
341
346
|
*/
|
|
342
|
-
Slash =
|
|
347
|
+
Slash = 90,
|
|
343
348
|
/**
|
|
344
349
|
* Used for miscellaneous characters; it can vary by keyboard.
|
|
345
350
|
* For the US standard keyboard, the '`~' key
|
|
346
351
|
*/
|
|
347
|
-
Backquote =
|
|
352
|
+
Backquote = 91,
|
|
348
353
|
/**
|
|
349
354
|
* Used for miscellaneous characters; it can vary by keyboard.
|
|
350
355
|
* For the US standard keyboard, the '[{' key
|
|
351
356
|
*/
|
|
352
|
-
BracketLeft =
|
|
357
|
+
BracketLeft = 92,
|
|
353
358
|
/**
|
|
354
359
|
* Used for miscellaneous characters; it can vary by keyboard.
|
|
355
360
|
* For the US standard keyboard, the '\|' key
|
|
356
361
|
*/
|
|
357
|
-
Backslash =
|
|
362
|
+
Backslash = 93,
|
|
358
363
|
/**
|
|
359
364
|
* Used for miscellaneous characters; it can vary by keyboard.
|
|
360
365
|
* For the US standard keyboard, the ']}' key
|
|
361
366
|
*/
|
|
362
|
-
BracketRight =
|
|
367
|
+
BracketRight = 94,
|
|
363
368
|
/**
|
|
364
369
|
* Used for miscellaneous characters; it can vary by keyboard.
|
|
365
370
|
* For the US standard keyboard, the ''"' key
|
|
366
371
|
*/
|
|
367
|
-
Quote =
|
|
372
|
+
Quote = 95,
|
|
368
373
|
/**
|
|
369
374
|
* Used for miscellaneous characters; it can vary by keyboard.
|
|
370
375
|
*/
|
|
371
|
-
OEM_8 =
|
|
376
|
+
OEM_8 = 96,
|
|
372
377
|
/**
|
|
373
378
|
* Either the angle bracket key or the backslash key on the RT 102-key keyboard.
|
|
374
379
|
*/
|
|
375
|
-
IntlBackslash =
|
|
376
|
-
Numpad0 =
|
|
377
|
-
Numpad1 =
|
|
378
|
-
Numpad2 =
|
|
379
|
-
Numpad3 =
|
|
380
|
-
Numpad4 =
|
|
381
|
-
Numpad5 =
|
|
382
|
-
Numpad6 =
|
|
383
|
-
Numpad7 =
|
|
384
|
-
Numpad8 =
|
|
385
|
-
Numpad9 =
|
|
386
|
-
NumpadMultiply =
|
|
387
|
-
NumpadAdd =
|
|
388
|
-
NUMPAD_SEPARATOR =
|
|
389
|
-
NumpadSubtract =
|
|
390
|
-
NumpadDecimal =
|
|
391
|
-
NumpadDivide =
|
|
380
|
+
IntlBackslash = 97,
|
|
381
|
+
Numpad0 = 98,
|
|
382
|
+
Numpad1 = 99,
|
|
383
|
+
Numpad2 = 100,
|
|
384
|
+
Numpad3 = 101,
|
|
385
|
+
Numpad4 = 102,
|
|
386
|
+
Numpad5 = 103,
|
|
387
|
+
Numpad6 = 104,
|
|
388
|
+
Numpad7 = 105,
|
|
389
|
+
Numpad8 = 106,
|
|
390
|
+
Numpad9 = 107,
|
|
391
|
+
NumpadMultiply = 108,
|
|
392
|
+
NumpadAdd = 109,
|
|
393
|
+
NUMPAD_SEPARATOR = 110,
|
|
394
|
+
NumpadSubtract = 111,
|
|
395
|
+
NumpadDecimal = 112,
|
|
396
|
+
NumpadDivide = 113,
|
|
392
397
|
/**
|
|
393
398
|
* Cover all key codes when IME is processing input.
|
|
394
399
|
*/
|
|
395
|
-
KEY_IN_COMPOSITION =
|
|
396
|
-
ABNT_C1 =
|
|
397
|
-
ABNT_C2 =
|
|
398
|
-
AudioVolumeMute =
|
|
399
|
-
AudioVolumeUp =
|
|
400
|
-
AudioVolumeDown =
|
|
401
|
-
BrowserSearch =
|
|
402
|
-
BrowserHome =
|
|
403
|
-
BrowserBack =
|
|
404
|
-
BrowserForward =
|
|
405
|
-
MediaTrackNext =
|
|
406
|
-
MediaTrackPrevious =
|
|
407
|
-
MediaStop =
|
|
408
|
-
MediaPlayPause =
|
|
409
|
-
LaunchMediaPlayer =
|
|
410
|
-
LaunchMail =
|
|
411
|
-
LaunchApp2 =
|
|
400
|
+
KEY_IN_COMPOSITION = 114,
|
|
401
|
+
ABNT_C1 = 115,
|
|
402
|
+
ABNT_C2 = 116,
|
|
403
|
+
AudioVolumeMute = 117,
|
|
404
|
+
AudioVolumeUp = 118,
|
|
405
|
+
AudioVolumeDown = 119,
|
|
406
|
+
BrowserSearch = 120,
|
|
407
|
+
BrowserHome = 121,
|
|
408
|
+
BrowserBack = 122,
|
|
409
|
+
BrowserForward = 123,
|
|
410
|
+
MediaTrackNext = 124,
|
|
411
|
+
MediaTrackPrevious = 125,
|
|
412
|
+
MediaStop = 126,
|
|
413
|
+
MediaPlayPause = 127,
|
|
414
|
+
LaunchMediaPlayer = 128,
|
|
415
|
+
LaunchMail = 129,
|
|
416
|
+
LaunchApp2 = 130,
|
|
412
417
|
/**
|
|
413
418
|
* VK_CLEAR, 0x0C, CLEAR key
|
|
414
419
|
*/
|
|
415
|
-
Clear =
|
|
420
|
+
Clear = 131,
|
|
416
421
|
/**
|
|
417
422
|
* Placed last to cover the length of the enum.
|
|
418
423
|
* Please do not depend on this value!
|
|
419
424
|
*/
|
|
420
|
-
MAX_VALUE =
|
|
425
|
+
MAX_VALUE = 132
|
|
421
426
|
}
|
|
422
427
|
export class KeyMod {
|
|
423
428
|
static readonly CtrlCmd: number;
|
|
@@ -429,7 +434,7 @@ declare namespace monaco {
|
|
|
429
434
|
|
|
430
435
|
export interface IMarkdownString {
|
|
431
436
|
readonly value: string;
|
|
432
|
-
readonly isTrusted?: boolean;
|
|
437
|
+
readonly isTrusted?: boolean | MarkdownStringTrustedOptions;
|
|
433
438
|
readonly supportThemeIcons?: boolean;
|
|
434
439
|
readonly supportHtml?: boolean;
|
|
435
440
|
readonly baseUri?: UriComponents;
|
|
@@ -438,6 +443,10 @@ declare namespace monaco {
|
|
|
438
443
|
};
|
|
439
444
|
}
|
|
440
445
|
|
|
446
|
+
export interface MarkdownStringTrustedOptions {
|
|
447
|
+
readonly enabledCommands: readonly string[];
|
|
448
|
+
}
|
|
449
|
+
|
|
441
450
|
export interface IKeyboardEvent {
|
|
442
451
|
readonly _standardKeyboardEventBrand: true;
|
|
443
452
|
readonly browserEvent: KeyboardEvent;
|
|
@@ -446,6 +455,7 @@ declare namespace monaco {
|
|
|
446
455
|
readonly shiftKey: boolean;
|
|
447
456
|
readonly altKey: boolean;
|
|
448
457
|
readonly metaKey: boolean;
|
|
458
|
+
readonly altGraphKey: boolean;
|
|
449
459
|
readonly keyCode: KeyCode;
|
|
450
460
|
readonly code: string;
|
|
451
461
|
equals(keybinding: number): boolean;
|
|
@@ -668,11 +678,11 @@ declare namespace monaco {
|
|
|
668
678
|
/**
|
|
669
679
|
* Test if this range equals other.
|
|
670
680
|
*/
|
|
671
|
-
equalsRange(other: IRange | null): boolean;
|
|
681
|
+
equalsRange(other: IRange | null | undefined): boolean;
|
|
672
682
|
/**
|
|
673
683
|
* Test if range `a` equals `b`.
|
|
674
684
|
*/
|
|
675
|
-
static equalsRange(a: IRange | null, b: IRange | null): boolean;
|
|
685
|
+
static equalsRange(a: IRange | null | undefined, b: IRange | null | undefined): boolean;
|
|
676
686
|
/**
|
|
677
687
|
* Return the end position (which will be after or equal to the start position)
|
|
678
688
|
*/
|
|
@@ -709,6 +719,18 @@ declare namespace monaco {
|
|
|
709
719
|
* Create a new empty range using this range's start position.
|
|
710
720
|
*/
|
|
711
721
|
static collapseToStart(range: IRange): Range;
|
|
722
|
+
/**
|
|
723
|
+
* Create a new empty range using this range's end position.
|
|
724
|
+
*/
|
|
725
|
+
collapseToEnd(): Range;
|
|
726
|
+
/**
|
|
727
|
+
* Create a new empty range using this range's end position.
|
|
728
|
+
*/
|
|
729
|
+
static collapseToEnd(range: IRange): Range;
|
|
730
|
+
/**
|
|
731
|
+
* Moves the range by the given amount of lines.
|
|
732
|
+
*/
|
|
733
|
+
delta(lineCount: number): Range;
|
|
712
734
|
static fromPositions(start: IPosition, end?: IPosition): Range;
|
|
713
735
|
/**
|
|
714
736
|
* Create a `Range` from an `IRange`.
|
|
@@ -863,10 +885,10 @@ declare namespace monaco {
|
|
|
863
885
|
}
|
|
864
886
|
|
|
865
887
|
export class Token {
|
|
866
|
-
_tokenBrand: void;
|
|
867
888
|
readonly offset: number;
|
|
868
889
|
readonly type: string;
|
|
869
890
|
readonly language: string;
|
|
891
|
+
_tokenBrand: void;
|
|
870
892
|
constructor(offset: number, type: string, language: string);
|
|
871
893
|
toString(): string;
|
|
872
894
|
}
|
|
@@ -979,7 +1001,7 @@ declare namespace monaco.editor {
|
|
|
979
1001
|
/**
|
|
980
1002
|
* Change the language for a model.
|
|
981
1003
|
*/
|
|
982
|
-
export function setModelLanguage(model: ITextModel,
|
|
1004
|
+
export function setModelLanguage(model: ITextModel, mimeTypeOrLanguageId: string): void;
|
|
983
1005
|
|
|
984
1006
|
/**
|
|
985
1007
|
* Set the markers for a model.
|
|
@@ -1085,6 +1107,43 @@ declare namespace monaco.editor {
|
|
|
1085
1107
|
*/
|
|
1086
1108
|
export function registerCommand(id: string, handler: (accessor: any, ...args: any[]) => void): IDisposable;
|
|
1087
1109
|
|
|
1110
|
+
export interface ILinkOpener {
|
|
1111
|
+
open(resource: Uri): boolean | Promise<boolean>;
|
|
1112
|
+
}
|
|
1113
|
+
|
|
1114
|
+
/**
|
|
1115
|
+
* Registers a handler that is called when a link is opened in any editor. The handler callback should return `true` if the link was handled and `false` otherwise.
|
|
1116
|
+
* The handler that was registered last will be called first when a link is opened.
|
|
1117
|
+
*
|
|
1118
|
+
* Returns a disposable that can unregister the opener again.
|
|
1119
|
+
*/
|
|
1120
|
+
export function registerLinkOpener(opener: ILinkOpener): IDisposable;
|
|
1121
|
+
|
|
1122
|
+
/**
|
|
1123
|
+
* Represents an object that can handle editor open operations (e.g. when "go to definition" is called
|
|
1124
|
+
* with a resource other than the current model).
|
|
1125
|
+
*/
|
|
1126
|
+
export interface ICodeEditorOpener {
|
|
1127
|
+
/**
|
|
1128
|
+
* Callback that is invoked when a resource other than the current model should be opened (e.g. when "go to definition" is called).
|
|
1129
|
+
* The callback should return `true` if the request was handled and `false` otherwise.
|
|
1130
|
+
* @param source The code editor instance that initiated the request.
|
|
1131
|
+
* @param resource The Uri of the resource that should be opened.
|
|
1132
|
+
* @param selectionOrPosition An optional position or selection inside the model corresponding to `resource` that can be used to set the cursor.
|
|
1133
|
+
*/
|
|
1134
|
+
openCodeEditor(source: ICodeEditor, resource: Uri, selectionOrPosition?: IRange | IPosition): boolean | Promise<boolean>;
|
|
1135
|
+
}
|
|
1136
|
+
|
|
1137
|
+
/**
|
|
1138
|
+
* Registers a handler that is called when a resource other than the current model should be opened in the editor (e.g. "go to definition").
|
|
1139
|
+
* The handler callback should return `true` if the request was handled and `false` otherwise.
|
|
1140
|
+
*
|
|
1141
|
+
* Returns a disposable that can unregister the opener again.
|
|
1142
|
+
*
|
|
1143
|
+
* If no handler is registered the default behavior is to do nothing for models other than the currently attached one.
|
|
1144
|
+
*/
|
|
1145
|
+
export function registerEditorOpener(opener: ICodeEditorOpener): IDisposable;
|
|
1146
|
+
|
|
1088
1147
|
export type BuiltinTheme = 'vs' | 'vs-dark' | 'hc-black' | 'hc-light';
|
|
1089
1148
|
|
|
1090
1149
|
export interface IStandaloneThemeData {
|
|
@@ -1244,7 +1303,7 @@ declare namespace monaco.editor {
|
|
|
1244
1303
|
*/
|
|
1245
1304
|
'semanticHighlighting.enabled'?: true | false | 'configuredByTheme';
|
|
1246
1305
|
/**
|
|
1247
|
-
* Keep peek editors open even when double
|
|
1306
|
+
* Keep peek editors open even when double-clicking their content or when hitting `Escape`.
|
|
1248
1307
|
* Defaults to false.
|
|
1249
1308
|
*/
|
|
1250
1309
|
stablePeek?: boolean;
|
|
@@ -1376,6 +1435,7 @@ declare namespace monaco.editor {
|
|
|
1376
1435
|
startColumn: number;
|
|
1377
1436
|
endLineNumber: number;
|
|
1378
1437
|
endColumn: number;
|
|
1438
|
+
modelVersionId?: number;
|
|
1379
1439
|
relatedInformation?: IRelatedInformation[];
|
|
1380
1440
|
tags?: MarkerTag[];
|
|
1381
1441
|
}
|
|
@@ -1395,6 +1455,7 @@ declare namespace monaco.editor {
|
|
|
1395
1455
|
startColumn: number;
|
|
1396
1456
|
endLineNumber: number;
|
|
1397
1457
|
endColumn: number;
|
|
1458
|
+
modelVersionId?: number;
|
|
1398
1459
|
relatedInformation?: IRelatedInformation[];
|
|
1399
1460
|
tags?: MarkerTag[];
|
|
1400
1461
|
}
|
|
@@ -1478,6 +1539,14 @@ declare namespace monaco.editor {
|
|
|
1478
1539
|
Full = 7
|
|
1479
1540
|
}
|
|
1480
1541
|
|
|
1542
|
+
/**
|
|
1543
|
+
* Vertical Lane in the glyph margin of the editor.
|
|
1544
|
+
*/
|
|
1545
|
+
export enum GlyphMarginLane {
|
|
1546
|
+
Left = 1,
|
|
1547
|
+
Right = 2
|
|
1548
|
+
}
|
|
1549
|
+
|
|
1481
1550
|
/**
|
|
1482
1551
|
* Position in the minimap to render the decoration.
|
|
1483
1552
|
*/
|
|
@@ -1499,6 +1568,13 @@ declare namespace monaco.editor {
|
|
|
1499
1568
|
darkColor?: string | ThemeColor;
|
|
1500
1569
|
}
|
|
1501
1570
|
|
|
1571
|
+
export interface IModelDecorationGlyphMarginOptions {
|
|
1572
|
+
/**
|
|
1573
|
+
* The position in the glyph margin.
|
|
1574
|
+
*/
|
|
1575
|
+
position: GlyphMarginLane;
|
|
1576
|
+
}
|
|
1577
|
+
|
|
1502
1578
|
/**
|
|
1503
1579
|
* Options for rendering a model decoration in the overview ruler.
|
|
1504
1580
|
*/
|
|
@@ -1510,11 +1586,11 @@ declare namespace monaco.editor {
|
|
|
1510
1586
|
}
|
|
1511
1587
|
|
|
1512
1588
|
/**
|
|
1513
|
-
* Options for rendering a model decoration in the
|
|
1589
|
+
* Options for rendering a model decoration in the minimap.
|
|
1514
1590
|
*/
|
|
1515
1591
|
export interface IModelDecorationMinimapOptions extends IDecorationOptions {
|
|
1516
1592
|
/**
|
|
1517
|
-
* The position in the
|
|
1593
|
+
* The position in the minimap.
|
|
1518
1594
|
*/
|
|
1519
1595
|
position: MinimapPosition;
|
|
1520
1596
|
}
|
|
@@ -1533,6 +1609,13 @@ declare namespace monaco.editor {
|
|
|
1533
1609
|
*/
|
|
1534
1610
|
className?: string | null;
|
|
1535
1611
|
blockClassName?: string | null;
|
|
1612
|
+
/**
|
|
1613
|
+
* Indicates if this block should be rendered after the last line.
|
|
1614
|
+
* In this case, the range must be empty and set to the last line.
|
|
1615
|
+
*/
|
|
1616
|
+
blockIsAfterEnd?: boolean | null;
|
|
1617
|
+
blockDoesNotCollapse?: boolean | null;
|
|
1618
|
+
blockPadding?: [top: number, right: number, bottom: number, left: number] | null;
|
|
1536
1619
|
/**
|
|
1537
1620
|
* Message to be rendered when hovering over the glyph margin decoration.
|
|
1538
1621
|
*/
|
|
@@ -1567,6 +1650,11 @@ declare namespace monaco.editor {
|
|
|
1567
1650
|
* If set, the decoration will be rendered in the glyph margin with this CSS class name.
|
|
1568
1651
|
*/
|
|
1569
1652
|
glyphMarginClassName?: string | null;
|
|
1653
|
+
/**
|
|
1654
|
+
* If set and the decoration has {@link glyphMarginClassName} set, render this decoration
|
|
1655
|
+
* with the specified {@link IModelDecorationGlyphMarginOptions} in the glyph margin.
|
|
1656
|
+
*/
|
|
1657
|
+
glyphMargin?: IModelDecorationGlyphMarginOptions | null;
|
|
1570
1658
|
/**
|
|
1571
1659
|
* If set, the decoration will be rendered in the lines decorations with this CSS class name.
|
|
1572
1660
|
*/
|
|
@@ -1759,6 +1847,7 @@ declare namespace monaco.editor {
|
|
|
1759
1847
|
readonly defaultEOL: DefaultEndOfLine;
|
|
1760
1848
|
readonly trimAutoWhitespace: boolean;
|
|
1761
1849
|
readonly bracketPairColorizationOptions: BracketPairColorizationOptions;
|
|
1850
|
+
get originalIndentSize(): number | 'tabSize';
|
|
1762
1851
|
}
|
|
1763
1852
|
|
|
1764
1853
|
export interface BracketPairColorizationOptions {
|
|
@@ -1768,7 +1857,7 @@ declare namespace monaco.editor {
|
|
|
1768
1857
|
|
|
1769
1858
|
export interface ITextModelUpdateOptions {
|
|
1770
1859
|
tabSize?: number;
|
|
1771
|
-
indentSize?: number;
|
|
1860
|
+
indentSize?: number | 'tabSize';
|
|
1772
1861
|
insertSpaces?: boolean;
|
|
1773
1862
|
trimAutoWhitespace?: boolean;
|
|
1774
1863
|
bracketColorizationOptions?: BracketPairColorizationOptions;
|
|
@@ -1861,12 +1950,12 @@ declare namespace monaco.editor {
|
|
|
1861
1950
|
* @param range The range describing what text length to get.
|
|
1862
1951
|
* @return The text length.
|
|
1863
1952
|
*/
|
|
1864
|
-
getValueLengthInRange(range: IRange): number;
|
|
1953
|
+
getValueLengthInRange(range: IRange, eol?: EndOfLinePreference): number;
|
|
1865
1954
|
/**
|
|
1866
1955
|
* Get the character count of text in a certain range.
|
|
1867
1956
|
* @param range The range describing what text length to get.
|
|
1868
1957
|
*/
|
|
1869
|
-
getCharacterCountInRange(range: IRange): number;
|
|
1958
|
+
getCharacterCountInRange(range: IRange, eol?: EndOfLinePreference): number;
|
|
1870
1959
|
/**
|
|
1871
1960
|
* Get the number of lines in the model.
|
|
1872
1961
|
*/
|
|
@@ -2061,15 +2150,22 @@ declare namespace monaco.editor {
|
|
|
2061
2150
|
* @param range The range to search in
|
|
2062
2151
|
* @param ownerId If set, it will ignore decorations belonging to other owners.
|
|
2063
2152
|
* @param filterOutValidation If set, it will ignore decorations specific to validation (i.e. warnings, errors).
|
|
2153
|
+
* @param onlyMinimapDecorations If set, it will return only decorations that render in the minimap.
|
|
2154
|
+
* @param onlyMarginDecorations If set, it will return only decorations that render in the glyph margin.
|
|
2064
2155
|
* @return An array with the decorations
|
|
2065
2156
|
*/
|
|
2066
|
-
getDecorationsInRange(range: IRange, ownerId?: number, filterOutValidation?: boolean): IModelDecoration[];
|
|
2157
|
+
getDecorationsInRange(range: IRange, ownerId?: number, filterOutValidation?: boolean, onlyMinimapDecorations?: boolean, onlyMarginDecorations?: boolean): IModelDecoration[];
|
|
2067
2158
|
/**
|
|
2068
2159
|
* Gets all the decorations as an array.
|
|
2069
2160
|
* @param ownerId If set, it will ignore decorations belonging to other owners.
|
|
2070
2161
|
* @param filterOutValidation If set, it will ignore decorations specific to validation (i.e. warnings, errors).
|
|
2071
2162
|
*/
|
|
2072
2163
|
getAllDecorations(ownerId?: number, filterOutValidation?: boolean): IModelDecoration[];
|
|
2164
|
+
/**
|
|
2165
|
+
* Gets all decorations that render in the glyph margin as an array.
|
|
2166
|
+
* @param ownerId If set, it will ignore decorations belonging to other owners.
|
|
2167
|
+
*/
|
|
2168
|
+
getAllMarginDecorations(ownerId?: number): IModelDecoration[];
|
|
2073
2169
|
/**
|
|
2074
2170
|
* Gets all the decorations that should be rendered in the overview ruler as an array.
|
|
2075
2171
|
* @param ownerId If set, it will ignore decorations belonging to other owners.
|
|
@@ -2225,6 +2321,144 @@ declare namespace monaco.editor {
|
|
|
2225
2321
|
export interface ILineChange extends IChange {
|
|
2226
2322
|
readonly charChanges: ICharChange[] | undefined;
|
|
2227
2323
|
}
|
|
2324
|
+
|
|
2325
|
+
/**
|
|
2326
|
+
* A document diff provider computes the diff between two text models.
|
|
2327
|
+
*/
|
|
2328
|
+
export interface IDocumentDiffProvider {
|
|
2329
|
+
/**
|
|
2330
|
+
* Computes the diff between the text models `original` and `modified`.
|
|
2331
|
+
*/
|
|
2332
|
+
computeDiff(original: ITextModel, modified: ITextModel, options: IDocumentDiffProviderOptions): Promise<IDocumentDiff>;
|
|
2333
|
+
/**
|
|
2334
|
+
* Is fired when settings of the diff algorithm change that could alter the result of the diffing computation.
|
|
2335
|
+
* Any user of this provider should recompute the diff when this event is fired.
|
|
2336
|
+
*/
|
|
2337
|
+
onDidChange: IEvent<void>;
|
|
2338
|
+
}
|
|
2339
|
+
|
|
2340
|
+
/**
|
|
2341
|
+
* Options for the diff computation.
|
|
2342
|
+
*/
|
|
2343
|
+
export interface IDocumentDiffProviderOptions {
|
|
2344
|
+
/**
|
|
2345
|
+
* When set to true, the diff should ignore whitespace changes.i
|
|
2346
|
+
*/
|
|
2347
|
+
ignoreTrimWhitespace: boolean;
|
|
2348
|
+
/**
|
|
2349
|
+
* A diff computation should throw if it takes longer than this value.
|
|
2350
|
+
*/
|
|
2351
|
+
maxComputationTimeMs: number;
|
|
2352
|
+
}
|
|
2353
|
+
|
|
2354
|
+
/**
|
|
2355
|
+
* Represents a diff between two text models.
|
|
2356
|
+
*/
|
|
2357
|
+
export interface IDocumentDiff {
|
|
2358
|
+
/**
|
|
2359
|
+
* If true, both text models are identical (byte-wise).
|
|
2360
|
+
*/
|
|
2361
|
+
readonly identical: boolean;
|
|
2362
|
+
/**
|
|
2363
|
+
* If true, the diff computation timed out and the diff might not be accurate.
|
|
2364
|
+
*/
|
|
2365
|
+
readonly quitEarly: boolean;
|
|
2366
|
+
/**
|
|
2367
|
+
* Maps all modified line ranges in the original to the corresponding line ranges in the modified text model.
|
|
2368
|
+
*/
|
|
2369
|
+
readonly changes: LineRangeMapping[];
|
|
2370
|
+
}
|
|
2371
|
+
/**
|
|
2372
|
+
* A range of lines (1-based).
|
|
2373
|
+
*/
|
|
2374
|
+
export class LineRange {
|
|
2375
|
+
/**
|
|
2376
|
+
* @param lineRanges An array of sorted line ranges.
|
|
2377
|
+
*/
|
|
2378
|
+
static joinMany(lineRanges: readonly (readonly LineRange[])[]): readonly LineRange[];
|
|
2379
|
+
/**
|
|
2380
|
+
* @param lineRanges1 Must be sorted.
|
|
2381
|
+
* @param lineRanges2 Must be sorted.
|
|
2382
|
+
*/
|
|
2383
|
+
static join(lineRanges1: readonly LineRange[], lineRanges2: readonly LineRange[]): readonly LineRange[];
|
|
2384
|
+
/**
|
|
2385
|
+
* The start line number.
|
|
2386
|
+
*/
|
|
2387
|
+
readonly startLineNumber: number;
|
|
2388
|
+
/**
|
|
2389
|
+
* The end line number (exclusive).
|
|
2390
|
+
*/
|
|
2391
|
+
readonly endLineNumberExclusive: number;
|
|
2392
|
+
constructor(startLineNumber: number, endLineNumberExclusive: number);
|
|
2393
|
+
/**
|
|
2394
|
+
* Indicates if this line range contains the given line number.
|
|
2395
|
+
*/
|
|
2396
|
+
contains(lineNumber: number): boolean;
|
|
2397
|
+
/**
|
|
2398
|
+
* Indicates if this line range is empty.
|
|
2399
|
+
*/
|
|
2400
|
+
get isEmpty(): boolean;
|
|
2401
|
+
/**
|
|
2402
|
+
* Moves this line range by the given offset of line numbers.
|
|
2403
|
+
*/
|
|
2404
|
+
delta(offset: number): LineRange;
|
|
2405
|
+
/**
|
|
2406
|
+
* The number of lines this line range spans.
|
|
2407
|
+
*/
|
|
2408
|
+
get length(): number;
|
|
2409
|
+
/**
|
|
2410
|
+
* Creates a line range that combines this and the given line range.
|
|
2411
|
+
*/
|
|
2412
|
+
join(other: LineRange): LineRange;
|
|
2413
|
+
toString(): string;
|
|
2414
|
+
/**
|
|
2415
|
+
* The resulting range is empty if the ranges do not intersect, but touch.
|
|
2416
|
+
* If the ranges don't even touch, the result is undefined.
|
|
2417
|
+
*/
|
|
2418
|
+
intersect(other: LineRange): LineRange | undefined;
|
|
2419
|
+
overlapOrTouch(other: LineRange): boolean;
|
|
2420
|
+
equals(b: LineRange): boolean;
|
|
2421
|
+
}
|
|
2422
|
+
|
|
2423
|
+
/**
|
|
2424
|
+
* Maps a line range in the original text model to a line range in the modified text model.
|
|
2425
|
+
*/
|
|
2426
|
+
export class LineRangeMapping {
|
|
2427
|
+
/**
|
|
2428
|
+
* The line range in the original text model.
|
|
2429
|
+
*/
|
|
2430
|
+
readonly originalRange: LineRange;
|
|
2431
|
+
/**
|
|
2432
|
+
* The line range in the modified text model.
|
|
2433
|
+
*/
|
|
2434
|
+
readonly modifiedRange: LineRange;
|
|
2435
|
+
/**
|
|
2436
|
+
* If inner changes have not been computed, this is set to undefined.
|
|
2437
|
+
* Otherwise, it represents the character-level diff in this line range.
|
|
2438
|
+
* The original range of each range mapping should be contained in the original line range (same for modified), exceptions are new-lines.
|
|
2439
|
+
* Must not be an empty array.
|
|
2440
|
+
*/
|
|
2441
|
+
readonly innerChanges: RangeMapping[] | undefined;
|
|
2442
|
+
constructor(originalRange: LineRange, modifiedRange: LineRange, innerChanges: RangeMapping[] | undefined);
|
|
2443
|
+
toString(): string;
|
|
2444
|
+
get changedLineCount(): any;
|
|
2445
|
+
}
|
|
2446
|
+
|
|
2447
|
+
/**
|
|
2448
|
+
* Maps a range in the original text model to a range in the modified text model.
|
|
2449
|
+
*/
|
|
2450
|
+
export class RangeMapping {
|
|
2451
|
+
/**
|
|
2452
|
+
* The original range.
|
|
2453
|
+
*/
|
|
2454
|
+
readonly originalRange: Range;
|
|
2455
|
+
/**
|
|
2456
|
+
* The modified range.
|
|
2457
|
+
*/
|
|
2458
|
+
readonly modifiedRange: Range;
|
|
2459
|
+
constructor(originalRange: Range, modifiedRange: Range);
|
|
2460
|
+
toString(): string;
|
|
2461
|
+
}
|
|
2228
2462
|
export interface IDimension {
|
|
2229
2463
|
width: number;
|
|
2230
2464
|
height: number;
|
|
@@ -2339,7 +2573,7 @@ declare namespace monaco.editor {
|
|
|
2339
2573
|
readonly label: string;
|
|
2340
2574
|
readonly alias: string;
|
|
2341
2575
|
isSupported(): boolean;
|
|
2342
|
-
run(): Promise<void>;
|
|
2576
|
+
run(args?: unknown): Promise<void>;
|
|
2343
2577
|
}
|
|
2344
2578
|
|
|
2345
2579
|
export type IEditorModel = ITextModel | IDiffEditorModel;
|
|
@@ -2634,7 +2868,7 @@ declare namespace monaco.editor {
|
|
|
2634
2868
|
/**
|
|
2635
2869
|
* Replace all previous decorations with `newDecorations`.
|
|
2636
2870
|
*/
|
|
2637
|
-
set(newDecorations: IModelDeltaDecoration[]):
|
|
2871
|
+
set(newDecorations: readonly IModelDeltaDecoration[]): string[];
|
|
2638
2872
|
/**
|
|
2639
2873
|
* Remove all previous decorations.
|
|
2640
2874
|
*/
|
|
@@ -2679,6 +2913,10 @@ declare namespace monaco.editor {
|
|
|
2679
2913
|
* New language
|
|
2680
2914
|
*/
|
|
2681
2915
|
readonly newLanguage: string;
|
|
2916
|
+
/**
|
|
2917
|
+
* Source of the call that caused the event.
|
|
2918
|
+
*/
|
|
2919
|
+
readonly source: string;
|
|
2682
2920
|
}
|
|
2683
2921
|
|
|
2684
2922
|
/**
|
|
@@ -2732,6 +2970,10 @@ declare namespace monaco.editor {
|
|
|
2732
2970
|
* The model has been reset to a new value.
|
|
2733
2971
|
*/
|
|
2734
2972
|
readonly isFlush: boolean;
|
|
2973
|
+
/**
|
|
2974
|
+
* Flag that indicates that this event describes an eol change.
|
|
2975
|
+
*/
|
|
2976
|
+
readonly isEolChange: boolean;
|
|
2735
2977
|
}
|
|
2736
2978
|
|
|
2737
2979
|
/**
|
|
@@ -2740,6 +2982,7 @@ declare namespace monaco.editor {
|
|
|
2740
2982
|
export interface IModelDecorationsChangedEvent {
|
|
2741
2983
|
readonly affectsMinimap: boolean;
|
|
2742
2984
|
readonly affectsOverviewRuler: boolean;
|
|
2985
|
+
readonly affectsGlyphMargin: boolean;
|
|
2743
2986
|
}
|
|
2744
2987
|
|
|
2745
2988
|
export interface IModelOptionsChangedEvent {
|
|
@@ -2886,6 +3129,10 @@ declare namespace monaco.editor {
|
|
|
2886
3129
|
* The aria label for the editor's textarea (when it is focused).
|
|
2887
3130
|
*/
|
|
2888
3131
|
ariaLabel?: string;
|
|
3132
|
+
/**
|
|
3133
|
+
* Control whether a screen reader announces inline suggestion content immediately.
|
|
3134
|
+
*/
|
|
3135
|
+
screenReaderAnnounceInlineSuggestion?: boolean;
|
|
2889
3136
|
/**
|
|
2890
3137
|
* The `tabindex` property of the editor's textarea
|
|
2891
3138
|
*/
|
|
@@ -2926,9 +3173,9 @@ declare namespace monaco.editor {
|
|
|
2926
3173
|
cursorSurroundingLinesStyle?: 'default' | 'all';
|
|
2927
3174
|
/**
|
|
2928
3175
|
* Render last line number when the file ends with a newline.
|
|
2929
|
-
* Defaults to
|
|
3176
|
+
* Defaults to 'on' for Windows and macOS and 'dimmed' for Linux.
|
|
2930
3177
|
*/
|
|
2931
|
-
renderFinalNewline?:
|
|
3178
|
+
renderFinalNewline?: 'on' | 'off' | 'dimmed';
|
|
2932
3179
|
/**
|
|
2933
3180
|
* Remove unusual line terminators like LINE SEPARATOR (LS), PARAGRAPH SEPARATOR (PS).
|
|
2934
3181
|
* Defaults to 'prompt'.
|
|
@@ -3000,9 +3247,9 @@ declare namespace monaco.editor {
|
|
|
3000
3247
|
*/
|
|
3001
3248
|
scrollbar?: IEditorScrollbarOptions;
|
|
3002
3249
|
/**
|
|
3003
|
-
* Control the behavior of
|
|
3250
|
+
* Control the behavior of sticky scroll options
|
|
3004
3251
|
*/
|
|
3005
|
-
|
|
3252
|
+
stickyScroll?: IEditorStickyScrollOptions;
|
|
3006
3253
|
/**
|
|
3007
3254
|
* Control the behavior and rendering of the minimap.
|
|
3008
3255
|
*/
|
|
@@ -3043,9 +3290,9 @@ declare namespace monaco.editor {
|
|
|
3043
3290
|
mouseStyle?: 'text' | 'default' | 'copy';
|
|
3044
3291
|
/**
|
|
3045
3292
|
* Enable smooth caret animation.
|
|
3046
|
-
* Defaults to
|
|
3293
|
+
* Defaults to 'off'.
|
|
3047
3294
|
*/
|
|
3048
|
-
cursorSmoothCaretAnimation?:
|
|
3295
|
+
cursorSmoothCaretAnimation?: 'off' | 'explicit' | 'on';
|
|
3049
3296
|
/**
|
|
3050
3297
|
* Control the cursor style, either 'block' or 'line'.
|
|
3051
3298
|
* Defaults to 'line'.
|
|
@@ -3060,6 +3307,15 @@ declare namespace monaco.editor {
|
|
|
3060
3307
|
* Defaults to false.
|
|
3061
3308
|
*/
|
|
3062
3309
|
fontLigatures?: boolean | string;
|
|
3310
|
+
/**
|
|
3311
|
+
* Enable font variations.
|
|
3312
|
+
* Defaults to false.
|
|
3313
|
+
*/
|
|
3314
|
+
fontVariations?: boolean | string;
|
|
3315
|
+
/**
|
|
3316
|
+
* Controls whether to use default color decorations or not using the default document color provider
|
|
3317
|
+
*/
|
|
3318
|
+
defaultColorDecorators?: boolean;
|
|
3063
3319
|
/**
|
|
3064
3320
|
* Disable the use of `transform: translate3d(0px, 0px, 0px)` for the editor margin and lines layers.
|
|
3065
3321
|
* The usage of `transform: translate3d(0px, 0px, 0px)` acts as a hint for browsers to create an extra layer.
|
|
@@ -3092,8 +3348,7 @@ declare namespace monaco.editor {
|
|
|
3092
3348
|
*/
|
|
3093
3349
|
smoothScrolling?: boolean;
|
|
3094
3350
|
/**
|
|
3095
|
-
* Enable that the editor will install
|
|
3096
|
-
* Enabling this might have a severe performance impact.
|
|
3351
|
+
* Enable that the editor will install a ResizeObserver to check if its container dom node size has changed.
|
|
3097
3352
|
* Defaults to false.
|
|
3098
3353
|
*/
|
|
3099
3354
|
automaticLayout?: boolean;
|
|
@@ -3141,6 +3396,12 @@ declare namespace monaco.editor {
|
|
|
3141
3396
|
* Configure word wrapping characters. A break will be introduced after these characters.
|
|
3142
3397
|
*/
|
|
3143
3398
|
wordWrapBreakAfterCharacters?: string;
|
|
3399
|
+
/**
|
|
3400
|
+
* Sets whether line breaks appear wherever the text would otherwise overflow its content box.
|
|
3401
|
+
* When wordBreak = 'normal', Use the default line break rule.
|
|
3402
|
+
* When wordBreak = 'keepAll', Word breaks should not be used for Chinese/Japanese/Korean (CJK) text. Non-CJK text behavior is the same as for normal.
|
|
3403
|
+
*/
|
|
3404
|
+
wordBreak?: 'normal' | 'keepAll';
|
|
3144
3405
|
/**
|
|
3145
3406
|
* Performance guard: Stop rendering a line after x characters.
|
|
3146
3407
|
* Defaults to 10000.
|
|
@@ -3160,6 +3421,10 @@ declare namespace monaco.editor {
|
|
|
3160
3421
|
* Enable inline color decorators and color picker rendering.
|
|
3161
3422
|
*/
|
|
3162
3423
|
colorDecorators?: boolean;
|
|
3424
|
+
/**
|
|
3425
|
+
* Controls the max number of color decorators that can be rendered in an editor at once.
|
|
3426
|
+
*/
|
|
3427
|
+
colorDecoratorsLimit?: number;
|
|
3163
3428
|
/**
|
|
3164
3429
|
* Control the behaviour of comments in the editor.
|
|
3165
3430
|
*/
|
|
@@ -3204,6 +3469,10 @@ declare namespace monaco.editor {
|
|
|
3204
3469
|
* Defaults to 'spread'.
|
|
3205
3470
|
*/
|
|
3206
3471
|
multiCursorPaste?: 'spread' | 'full';
|
|
3472
|
+
/**
|
|
3473
|
+
* Controls the max number of text cursors that can be in an active editor at once.
|
|
3474
|
+
*/
|
|
3475
|
+
multiCursorLimit?: number;
|
|
3207
3476
|
/**
|
|
3208
3477
|
* Configure the editor's accessibility support.
|
|
3209
3478
|
* Defaults to 'auto'. It is best to leave this to 'auto'.
|
|
@@ -3408,6 +3677,11 @@ declare namespace monaco.editor {
|
|
|
3408
3677
|
* Defaults to 'always'.
|
|
3409
3678
|
*/
|
|
3410
3679
|
matchBrackets?: 'never' | 'near' | 'always';
|
|
3680
|
+
/**
|
|
3681
|
+
* Enable experimental whitespace rendering.
|
|
3682
|
+
* Defaults to 'svg'.
|
|
3683
|
+
*/
|
|
3684
|
+
experimentalWhitespaceRendering?: 'svg' | 'font' | 'off';
|
|
3411
3685
|
/**
|
|
3412
3686
|
* Enable rendering of whitespace.
|
|
3413
3687
|
* Defaults to 'selection'.
|
|
@@ -3470,6 +3744,10 @@ declare namespace monaco.editor {
|
|
|
3470
3744
|
* Controls strikethrough deprecated variables.
|
|
3471
3745
|
*/
|
|
3472
3746
|
showDeprecated?: boolean;
|
|
3747
|
+
/**
|
|
3748
|
+
* Controls whether suggestions allow matches in the middle of the word instead of only at the beginning
|
|
3749
|
+
*/
|
|
3750
|
+
matchOnWordStartOnly?: boolean;
|
|
3473
3751
|
/**
|
|
3474
3752
|
* Control the behavior and rendering of the inline hints.
|
|
3475
3753
|
*/
|
|
@@ -3497,6 +3775,10 @@ declare namespace monaco.editor {
|
|
|
3497
3775
|
* When enabled, this shows a preview of the drop location and triggers an `onDropIntoEditor` event.
|
|
3498
3776
|
*/
|
|
3499
3777
|
dropIntoEditor?: IDropIntoEditorOptions;
|
|
3778
|
+
/**
|
|
3779
|
+
* Controls whether the editor receives tabs or defers them to the workbench for navigation.
|
|
3780
|
+
*/
|
|
3781
|
+
tabFocusMode?: boolean;
|
|
3500
3782
|
}
|
|
3501
3783
|
|
|
3502
3784
|
export interface IDiffEditorBaseOptions {
|
|
@@ -3505,6 +3787,12 @@ declare namespace monaco.editor {
|
|
|
3505
3787
|
* Defaults to true.
|
|
3506
3788
|
*/
|
|
3507
3789
|
enableSplitViewResizing?: boolean;
|
|
3790
|
+
/**
|
|
3791
|
+
* The default ratio when rendering side-by-side editors.
|
|
3792
|
+
* Must be a number between 0 and 1, min sizes apply.
|
|
3793
|
+
* Defaults to 0.5
|
|
3794
|
+
*/
|
|
3795
|
+
splitViewDefaultRatio?: number;
|
|
3508
3796
|
/**
|
|
3509
3797
|
* Render the differences in two side-by-side editors.
|
|
3510
3798
|
* Defaults to true.
|
|
@@ -3554,6 +3842,14 @@ declare namespace monaco.editor {
|
|
|
3554
3842
|
* Control the wrapping of the diff editor.
|
|
3555
3843
|
*/
|
|
3556
3844
|
diffWordWrap?: 'off' | 'on' | 'inherit';
|
|
3845
|
+
/**
|
|
3846
|
+
* Diff Algorithm
|
|
3847
|
+
*/
|
|
3848
|
+
diffAlgorithm?: 'legacy' | 'advanced' | IDocumentDiffProvider;
|
|
3849
|
+
/**
|
|
3850
|
+
* Whether the diff editor aria label should be verbose.
|
|
3851
|
+
*/
|
|
3852
|
+
accessibilityVerbose?: boolean;
|
|
3557
3853
|
}
|
|
3558
3854
|
|
|
3559
3855
|
/**
|
|
@@ -3686,7 +3982,7 @@ declare namespace monaco.editor {
|
|
|
3686
3982
|
autoFindInSelection?: 'never' | 'always' | 'multiline';
|
|
3687
3983
|
addExtraSpaceOnTop?: boolean;
|
|
3688
3984
|
/**
|
|
3689
|
-
* Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found
|
|
3985
|
+
* Controls whether the search result and diff result automatically restarts from the beginning (or the end) when no further matches can be found
|
|
3690
3986
|
*/
|
|
3691
3987
|
loop?: boolean;
|
|
3692
3988
|
}
|
|
@@ -3784,6 +4080,10 @@ declare namespace monaco.editor {
|
|
|
3784
4080
|
* The width of the glyph margin.
|
|
3785
4081
|
*/
|
|
3786
4082
|
readonly glyphMarginWidth: number;
|
|
4083
|
+
/**
|
|
4084
|
+
* The number of decoration lanes to render in the glyph margin.
|
|
4085
|
+
*/
|
|
4086
|
+
readonly glyphMarginDecorationLaneCount: number;
|
|
3787
4087
|
/**
|
|
3788
4088
|
* Left position for the line numbers.
|
|
3789
4089
|
*/
|
|
@@ -3861,22 +4161,19 @@ declare namespace monaco.editor {
|
|
|
3861
4161
|
enabled?: boolean;
|
|
3862
4162
|
}
|
|
3863
4163
|
|
|
3864
|
-
export interface
|
|
4164
|
+
export interface IEditorStickyScrollOptions {
|
|
3865
4165
|
/**
|
|
3866
|
-
*
|
|
4166
|
+
* Enable the sticky scroll
|
|
3867
4167
|
*/
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
|
|
3877
|
-
stickyScroll: {
|
|
3878
|
-
enabled: boolean;
|
|
3879
|
-
};
|
|
4168
|
+
enabled?: boolean;
|
|
4169
|
+
/**
|
|
4170
|
+
* Maximum number of sticky lines to show
|
|
4171
|
+
*/
|
|
4172
|
+
maxLineCount?: number;
|
|
4173
|
+
/**
|
|
4174
|
+
* Model to choose for sticky scroll by default
|
|
4175
|
+
*/
|
|
4176
|
+
defaultModel?: 'outlineModel' | 'foldingProviderModel' | 'indentationModel';
|
|
3880
4177
|
}
|
|
3881
4178
|
|
|
3882
4179
|
/**
|
|
@@ -4159,6 +4456,12 @@ declare namespace monaco.editor {
|
|
|
4159
4456
|
* Defaults to `prefix`.
|
|
4160
4457
|
*/
|
|
4161
4458
|
mode?: 'prefix' | 'subword' | 'subwordSmart';
|
|
4459
|
+
showToolbar?: 'always' | 'onHover';
|
|
4460
|
+
suppressSuggestions?: boolean;
|
|
4461
|
+
/**
|
|
4462
|
+
* Does not clear active inline suggestions when the editor loses focus.
|
|
4463
|
+
*/
|
|
4464
|
+
keepOnBlur?: boolean;
|
|
4162
4465
|
}
|
|
4163
4466
|
|
|
4164
4467
|
export interface IBracketPairColorizationOptions {
|
|
@@ -4224,6 +4527,10 @@ declare namespace monaco.editor {
|
|
|
4224
4527
|
* Enable using global storage for remembering suggestions.
|
|
4225
4528
|
*/
|
|
4226
4529
|
shareSuggestSelections?: boolean;
|
|
4530
|
+
/**
|
|
4531
|
+
* Select suggestions when triggered via quick suggest or trigger characters
|
|
4532
|
+
*/
|
|
4533
|
+
selectionMode?: 'always' | 'never' | 'whenTriggerCharacter' | 'whenQuickSuggestion';
|
|
4227
4534
|
/**
|
|
4228
4535
|
* Enable or disable icons in suggestions. Defaults to true.
|
|
4229
4536
|
*/
|
|
@@ -4260,6 +4567,10 @@ declare namespace monaco.editor {
|
|
|
4260
4567
|
* Show deprecated-suggestions.
|
|
4261
4568
|
*/
|
|
4262
4569
|
showDeprecated?: boolean;
|
|
4570
|
+
/**
|
|
4571
|
+
* Controls whether suggestions allow matches in the middle of the word instead of only at the beginning
|
|
4572
|
+
*/
|
|
4573
|
+
matchOnWordStartOnly?: boolean;
|
|
4263
4574
|
/**
|
|
4264
4575
|
* Show field-suggestions.
|
|
4265
4576
|
*/
|
|
@@ -4396,10 +4707,15 @@ declare namespace monaco.editor {
|
|
|
4396
4707
|
*/
|
|
4397
4708
|
export interface IDropIntoEditorOptions {
|
|
4398
4709
|
/**
|
|
4399
|
-
* Enable
|
|
4710
|
+
* Enable dropping into editor.
|
|
4400
4711
|
* Defaults to true.
|
|
4401
4712
|
*/
|
|
4402
4713
|
enabled?: boolean;
|
|
4714
|
+
/**
|
|
4715
|
+
* Controls if a widget is shown after a drop.
|
|
4716
|
+
* Defaults to 'afterDrop'.
|
|
4717
|
+
*/
|
|
4718
|
+
showDropSelector?: 'afterDrop' | 'never';
|
|
4403
4719
|
}
|
|
4404
4720
|
|
|
4405
4721
|
export enum EditorOption {
|
|
@@ -4409,135 +4725,142 @@ declare namespace monaco.editor {
|
|
|
4409
4725
|
accessibilityPageSize = 3,
|
|
4410
4726
|
ariaLabel = 4,
|
|
4411
4727
|
autoClosingBrackets = 5,
|
|
4412
|
-
|
|
4413
|
-
|
|
4414
|
-
|
|
4415
|
-
|
|
4416
|
-
|
|
4417
|
-
|
|
4418
|
-
|
|
4419
|
-
|
|
4420
|
-
|
|
4421
|
-
|
|
4422
|
-
|
|
4423
|
-
|
|
4424
|
-
|
|
4425
|
-
|
|
4426
|
-
|
|
4427
|
-
|
|
4428
|
-
|
|
4429
|
-
|
|
4430
|
-
|
|
4431
|
-
|
|
4432
|
-
|
|
4433
|
-
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
4444
|
-
|
|
4445
|
-
|
|
4446
|
-
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
|
|
4450
|
-
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
|
|
4465
|
-
|
|
4466
|
-
|
|
4467
|
-
|
|
4468
|
-
|
|
4469
|
-
|
|
4470
|
-
|
|
4471
|
-
|
|
4472
|
-
|
|
4473
|
-
|
|
4474
|
-
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
|
|
4478
|
-
|
|
4479
|
-
|
|
4480
|
-
|
|
4481
|
-
|
|
4482
|
-
|
|
4483
|
-
|
|
4484
|
-
|
|
4485
|
-
|
|
4486
|
-
|
|
4487
|
-
|
|
4488
|
-
|
|
4489
|
-
|
|
4490
|
-
|
|
4491
|
-
|
|
4492
|
-
|
|
4493
|
-
|
|
4494
|
-
|
|
4495
|
-
|
|
4496
|
-
|
|
4497
|
-
|
|
4498
|
-
|
|
4499
|
-
|
|
4500
|
-
|
|
4501
|
-
|
|
4502
|
-
|
|
4503
|
-
|
|
4504
|
-
|
|
4505
|
-
|
|
4506
|
-
|
|
4507
|
-
|
|
4508
|
-
|
|
4509
|
-
|
|
4510
|
-
|
|
4511
|
-
|
|
4512
|
-
|
|
4513
|
-
|
|
4514
|
-
|
|
4515
|
-
|
|
4516
|
-
|
|
4517
|
-
|
|
4518
|
-
|
|
4519
|
-
|
|
4520
|
-
|
|
4521
|
-
|
|
4522
|
-
|
|
4523
|
-
|
|
4524
|
-
|
|
4525
|
-
|
|
4526
|
-
|
|
4527
|
-
|
|
4528
|
-
|
|
4529
|
-
|
|
4530
|
-
|
|
4531
|
-
|
|
4532
|
-
|
|
4533
|
-
|
|
4534
|
-
|
|
4535
|
-
|
|
4536
|
-
|
|
4537
|
-
|
|
4538
|
-
|
|
4539
|
-
|
|
4540
|
-
|
|
4728
|
+
screenReaderAnnounceInlineSuggestion = 6,
|
|
4729
|
+
autoClosingDelete = 7,
|
|
4730
|
+
autoClosingOvertype = 8,
|
|
4731
|
+
autoClosingQuotes = 9,
|
|
4732
|
+
autoIndent = 10,
|
|
4733
|
+
automaticLayout = 11,
|
|
4734
|
+
autoSurround = 12,
|
|
4735
|
+
bracketPairColorization = 13,
|
|
4736
|
+
guides = 14,
|
|
4737
|
+
codeLens = 15,
|
|
4738
|
+
codeLensFontFamily = 16,
|
|
4739
|
+
codeLensFontSize = 17,
|
|
4740
|
+
colorDecorators = 18,
|
|
4741
|
+
colorDecoratorsLimit = 19,
|
|
4742
|
+
columnSelection = 20,
|
|
4743
|
+
comments = 21,
|
|
4744
|
+
contextmenu = 22,
|
|
4745
|
+
copyWithSyntaxHighlighting = 23,
|
|
4746
|
+
cursorBlinking = 24,
|
|
4747
|
+
cursorSmoothCaretAnimation = 25,
|
|
4748
|
+
cursorStyle = 26,
|
|
4749
|
+
cursorSurroundingLines = 27,
|
|
4750
|
+
cursorSurroundingLinesStyle = 28,
|
|
4751
|
+
cursorWidth = 29,
|
|
4752
|
+
disableLayerHinting = 30,
|
|
4753
|
+
disableMonospaceOptimizations = 31,
|
|
4754
|
+
domReadOnly = 32,
|
|
4755
|
+
dragAndDrop = 33,
|
|
4756
|
+
dropIntoEditor = 34,
|
|
4757
|
+
emptySelectionClipboard = 35,
|
|
4758
|
+
experimentalWhitespaceRendering = 36,
|
|
4759
|
+
extraEditorClassName = 37,
|
|
4760
|
+
fastScrollSensitivity = 38,
|
|
4761
|
+
find = 39,
|
|
4762
|
+
fixedOverflowWidgets = 40,
|
|
4763
|
+
folding = 41,
|
|
4764
|
+
foldingStrategy = 42,
|
|
4765
|
+
foldingHighlight = 43,
|
|
4766
|
+
foldingImportsByDefault = 44,
|
|
4767
|
+
foldingMaximumRegions = 45,
|
|
4768
|
+
unfoldOnClickAfterEndOfLine = 46,
|
|
4769
|
+
fontFamily = 47,
|
|
4770
|
+
fontInfo = 48,
|
|
4771
|
+
fontLigatures = 49,
|
|
4772
|
+
fontSize = 50,
|
|
4773
|
+
fontWeight = 51,
|
|
4774
|
+
fontVariations = 52,
|
|
4775
|
+
formatOnPaste = 53,
|
|
4776
|
+
formatOnType = 54,
|
|
4777
|
+
glyphMargin = 55,
|
|
4778
|
+
gotoLocation = 56,
|
|
4779
|
+
hideCursorInOverviewRuler = 57,
|
|
4780
|
+
hover = 58,
|
|
4781
|
+
inDiffEditor = 59,
|
|
4782
|
+
inlineSuggest = 60,
|
|
4783
|
+
letterSpacing = 61,
|
|
4784
|
+
lightbulb = 62,
|
|
4785
|
+
lineDecorationsWidth = 63,
|
|
4786
|
+
lineHeight = 64,
|
|
4787
|
+
lineNumbers = 65,
|
|
4788
|
+
lineNumbersMinChars = 66,
|
|
4789
|
+
linkedEditing = 67,
|
|
4790
|
+
links = 68,
|
|
4791
|
+
matchBrackets = 69,
|
|
4792
|
+
minimap = 70,
|
|
4793
|
+
mouseStyle = 71,
|
|
4794
|
+
mouseWheelScrollSensitivity = 72,
|
|
4795
|
+
mouseWheelZoom = 73,
|
|
4796
|
+
multiCursorMergeOverlapping = 74,
|
|
4797
|
+
multiCursorModifier = 75,
|
|
4798
|
+
multiCursorPaste = 76,
|
|
4799
|
+
multiCursorLimit = 77,
|
|
4800
|
+
occurrencesHighlight = 78,
|
|
4801
|
+
overviewRulerBorder = 79,
|
|
4802
|
+
overviewRulerLanes = 80,
|
|
4803
|
+
padding = 81,
|
|
4804
|
+
parameterHints = 82,
|
|
4805
|
+
peekWidgetDefaultFocus = 83,
|
|
4806
|
+
definitionLinkOpensInPeek = 84,
|
|
4807
|
+
quickSuggestions = 85,
|
|
4808
|
+
quickSuggestionsDelay = 86,
|
|
4809
|
+
readOnly = 87,
|
|
4810
|
+
renameOnType = 88,
|
|
4811
|
+
renderControlCharacters = 89,
|
|
4812
|
+
renderFinalNewline = 90,
|
|
4813
|
+
renderLineHighlight = 91,
|
|
4814
|
+
renderLineHighlightOnlyWhenFocus = 92,
|
|
4815
|
+
renderValidationDecorations = 93,
|
|
4816
|
+
renderWhitespace = 94,
|
|
4817
|
+
revealHorizontalRightPadding = 95,
|
|
4818
|
+
roundedSelection = 96,
|
|
4819
|
+
rulers = 97,
|
|
4820
|
+
scrollbar = 98,
|
|
4821
|
+
scrollBeyondLastColumn = 99,
|
|
4822
|
+
scrollBeyondLastLine = 100,
|
|
4823
|
+
scrollPredominantAxis = 101,
|
|
4824
|
+
selectionClipboard = 102,
|
|
4825
|
+
selectionHighlight = 103,
|
|
4826
|
+
selectOnLineNumbers = 104,
|
|
4827
|
+
showFoldingControls = 105,
|
|
4828
|
+
showUnused = 106,
|
|
4829
|
+
snippetSuggestions = 107,
|
|
4830
|
+
smartSelect = 108,
|
|
4831
|
+
smoothScrolling = 109,
|
|
4832
|
+
stickyScroll = 110,
|
|
4833
|
+
stickyTabStops = 111,
|
|
4834
|
+
stopRenderingLineAfter = 112,
|
|
4835
|
+
suggest = 113,
|
|
4836
|
+
suggestFontSize = 114,
|
|
4837
|
+
suggestLineHeight = 115,
|
|
4838
|
+
suggestOnTriggerCharacters = 116,
|
|
4839
|
+
suggestSelection = 117,
|
|
4840
|
+
tabCompletion = 118,
|
|
4841
|
+
tabIndex = 119,
|
|
4842
|
+
unicodeHighlighting = 120,
|
|
4843
|
+
unusualLineTerminators = 121,
|
|
4844
|
+
useShadowDOM = 122,
|
|
4845
|
+
useTabStops = 123,
|
|
4846
|
+
wordBreak = 124,
|
|
4847
|
+
wordSeparators = 125,
|
|
4848
|
+
wordWrap = 126,
|
|
4849
|
+
wordWrapBreakAfterCharacters = 127,
|
|
4850
|
+
wordWrapBreakBeforeCharacters = 128,
|
|
4851
|
+
wordWrapColumn = 129,
|
|
4852
|
+
wordWrapOverride1 = 130,
|
|
4853
|
+
wordWrapOverride2 = 131,
|
|
4854
|
+
wrappingIndent = 132,
|
|
4855
|
+
wrappingStrategy = 133,
|
|
4856
|
+
showDeprecated = 134,
|
|
4857
|
+
inlayHints = 135,
|
|
4858
|
+
editorClassName = 136,
|
|
4859
|
+
pixelRatio = 137,
|
|
4860
|
+
tabFocusMode = 138,
|
|
4861
|
+
layoutInfo = 139,
|
|
4862
|
+
wrappingInfo = 140,
|
|
4863
|
+
defaultColorDecorators = 141
|
|
4541
4864
|
}
|
|
4542
4865
|
|
|
4543
4866
|
export const EditorOptions: {
|
|
@@ -4546,6 +4869,7 @@ declare namespace monaco.editor {
|
|
|
4546
4869
|
accessibilitySupport: IEditorOption<EditorOption.accessibilitySupport, AccessibilitySupport>;
|
|
4547
4870
|
accessibilityPageSize: IEditorOption<EditorOption.accessibilityPageSize, number>;
|
|
4548
4871
|
ariaLabel: IEditorOption<EditorOption.ariaLabel, string>;
|
|
4872
|
+
screenReaderAnnounceInlineSuggestion: IEditorOption<EditorOption.screenReaderAnnounceInlineSuggestion, boolean>;
|
|
4549
4873
|
autoClosingBrackets: IEditorOption<EditorOption.autoClosingBrackets, 'always' | 'languageDefined' | 'beforeWhitespace' | 'never'>;
|
|
4550
4874
|
autoClosingDelete: IEditorOption<EditorOption.autoClosingDelete, 'always' | 'never' | 'auto'>;
|
|
4551
4875
|
autoClosingOvertype: IEditorOption<EditorOption.autoClosingOvertype, 'always' | 'never' | 'auto'>;
|
|
@@ -4560,12 +4884,13 @@ declare namespace monaco.editor {
|
|
|
4560
4884
|
codeLensFontFamily: IEditorOption<EditorOption.codeLensFontFamily, string>;
|
|
4561
4885
|
codeLensFontSize: IEditorOption<EditorOption.codeLensFontSize, number>;
|
|
4562
4886
|
colorDecorators: IEditorOption<EditorOption.colorDecorators, boolean>;
|
|
4887
|
+
colorDecoratorsLimit: IEditorOption<EditorOption.colorDecoratorsLimit, number>;
|
|
4563
4888
|
columnSelection: IEditorOption<EditorOption.columnSelection, boolean>;
|
|
4564
4889
|
comments: IEditorOption<EditorOption.comments, Readonly<Required<IEditorCommentsOptions>>>;
|
|
4565
4890
|
contextmenu: IEditorOption<EditorOption.contextmenu, boolean>;
|
|
4566
4891
|
copyWithSyntaxHighlighting: IEditorOption<EditorOption.copyWithSyntaxHighlighting, boolean>;
|
|
4567
4892
|
cursorBlinking: IEditorOption<EditorOption.cursorBlinking, TextEditorCursorBlinkingStyle>;
|
|
4568
|
-
cursorSmoothCaretAnimation: IEditorOption<EditorOption.cursorSmoothCaretAnimation,
|
|
4893
|
+
cursorSmoothCaretAnimation: IEditorOption<EditorOption.cursorSmoothCaretAnimation, 'on' | 'off' | 'explicit'>;
|
|
4569
4894
|
cursorStyle: IEditorOption<EditorOption.cursorStyle, TextEditorCursorStyle>;
|
|
4570
4895
|
cursorSurroundingLines: IEditorOption<EditorOption.cursorSurroundingLines, number>;
|
|
4571
4896
|
cursorSurroundingLinesStyle: IEditorOption<EditorOption.cursorSurroundingLinesStyle, 'default' | 'all'>;
|
|
@@ -4576,7 +4901,8 @@ declare namespace monaco.editor {
|
|
|
4576
4901
|
dragAndDrop: IEditorOption<EditorOption.dragAndDrop, boolean>;
|
|
4577
4902
|
emptySelectionClipboard: IEditorOption<EditorOption.emptySelectionClipboard, boolean>;
|
|
4578
4903
|
dropIntoEditor: IEditorOption<EditorOption.dropIntoEditor, Readonly<Required<IDropIntoEditorOptions>>>;
|
|
4579
|
-
|
|
4904
|
+
stickyScroll: IEditorOption<EditorOption.stickyScroll, Readonly<Required<IEditorStickyScrollOptions>>>;
|
|
4905
|
+
experimentalWhitespaceRendering: IEditorOption<EditorOption.experimentalWhitespaceRendering, 'off' | 'svg' | 'font'>;
|
|
4580
4906
|
extraEditorClassName: IEditorOption<EditorOption.extraEditorClassName, string>;
|
|
4581
4907
|
fastScrollSensitivity: IEditorOption<EditorOption.fastScrollSensitivity, number>;
|
|
4582
4908
|
find: IEditorOption<EditorOption.find, Readonly<Required<IEditorFindOptions>>>;
|
|
@@ -4592,6 +4918,7 @@ declare namespace monaco.editor {
|
|
|
4592
4918
|
fontLigatures2: IEditorOption<EditorOption.fontLigatures, string>;
|
|
4593
4919
|
fontSize: IEditorOption<EditorOption.fontSize, number>;
|
|
4594
4920
|
fontWeight: IEditorOption<EditorOption.fontWeight, string>;
|
|
4921
|
+
fontVariations: IEditorOption<EditorOption.fontVariations, string>;
|
|
4595
4922
|
formatOnPaste: IEditorOption<EditorOption.formatOnPaste, boolean>;
|
|
4596
4923
|
formatOnType: IEditorOption<EditorOption.formatOnType, boolean>;
|
|
4597
4924
|
glyphMargin: IEditorOption<EditorOption.glyphMargin, boolean>;
|
|
@@ -4601,7 +4928,7 @@ declare namespace monaco.editor {
|
|
|
4601
4928
|
inDiffEditor: IEditorOption<EditorOption.inDiffEditor, boolean>;
|
|
4602
4929
|
letterSpacing: IEditorOption<EditorOption.letterSpacing, number>;
|
|
4603
4930
|
lightbulb: IEditorOption<EditorOption.lightbulb, Readonly<Required<IEditorLightbulbOptions>>>;
|
|
4604
|
-
lineDecorationsWidth: IEditorOption<EditorOption.lineDecorationsWidth,
|
|
4931
|
+
lineDecorationsWidth: IEditorOption<EditorOption.lineDecorationsWidth, number>;
|
|
4605
4932
|
lineHeight: IEditorOption<EditorOption.lineHeight, number>;
|
|
4606
4933
|
lineNumbers: IEditorOption<EditorOption.lineNumbers, InternalEditorRenderLineNumbersOptions>;
|
|
4607
4934
|
lineNumbersMinChars: IEditorOption<EditorOption.lineNumbersMinChars, number>;
|
|
@@ -4615,6 +4942,7 @@ declare namespace monaco.editor {
|
|
|
4615
4942
|
multiCursorMergeOverlapping: IEditorOption<EditorOption.multiCursorMergeOverlapping, boolean>;
|
|
4616
4943
|
multiCursorModifier: IEditorOption<EditorOption.multiCursorModifier, 'altKey' | 'metaKey' | 'ctrlKey'>;
|
|
4617
4944
|
multiCursorPaste: IEditorOption<EditorOption.multiCursorPaste, 'spread' | 'full'>;
|
|
4945
|
+
multiCursorLimit: IEditorOption<EditorOption.multiCursorLimit, number>;
|
|
4618
4946
|
occurrencesHighlight: IEditorOption<EditorOption.occurrencesHighlight, boolean>;
|
|
4619
4947
|
overviewRulerBorder: IEditorOption<EditorOption.overviewRulerBorder, boolean>;
|
|
4620
4948
|
overviewRulerLanes: IEditorOption<EditorOption.overviewRulerLanes, number>;
|
|
@@ -4627,7 +4955,7 @@ declare namespace monaco.editor {
|
|
|
4627
4955
|
readOnly: IEditorOption<EditorOption.readOnly, boolean>;
|
|
4628
4956
|
renameOnType: IEditorOption<EditorOption.renameOnType, boolean>;
|
|
4629
4957
|
renderControlCharacters: IEditorOption<EditorOption.renderControlCharacters, boolean>;
|
|
4630
|
-
renderFinalNewline: IEditorOption<EditorOption.renderFinalNewline,
|
|
4958
|
+
renderFinalNewline: IEditorOption<EditorOption.renderFinalNewline, 'on' | 'off' | 'dimmed'>;
|
|
4631
4959
|
renderLineHighlight: IEditorOption<EditorOption.renderLineHighlight, 'all' | 'line' | 'none' | 'gutter'>;
|
|
4632
4960
|
renderLineHighlightOnlyWhenFocus: IEditorOption<EditorOption.renderLineHighlightOnlyWhenFocus, boolean>;
|
|
4633
4961
|
renderValidationDecorations: IEditorOption<EditorOption.renderValidationDecorations, 'on' | 'off' | 'editable'>;
|
|
@@ -4662,6 +4990,7 @@ declare namespace monaco.editor {
|
|
|
4662
4990
|
unusualLineTerminators: IEditorOption<EditorOption.unusualLineTerminators, 'auto' | 'off' | 'prompt'>;
|
|
4663
4991
|
useShadowDOM: IEditorOption<EditorOption.useShadowDOM, boolean>;
|
|
4664
4992
|
useTabStops: IEditorOption<EditorOption.useTabStops, boolean>;
|
|
4993
|
+
wordBreak: IEditorOption<EditorOption.wordBreak, 'normal' | 'keepAll'>;
|
|
4665
4994
|
wordSeparators: IEditorOption<EditorOption.wordSeparators, string>;
|
|
4666
4995
|
wordWrap: IEditorOption<EditorOption.wordWrap, 'on' | 'off' | 'wordWrapColumn' | 'bounded'>;
|
|
4667
4996
|
wordWrapBreakAfterCharacters: IEditorOption<EditorOption.wordWrapBreakAfterCharacters, string>;
|
|
@@ -4669,13 +4998,14 @@ declare namespace monaco.editor {
|
|
|
4669
4998
|
wordWrapColumn: IEditorOption<EditorOption.wordWrapColumn, number>;
|
|
4670
4999
|
wordWrapOverride1: IEditorOption<EditorOption.wordWrapOverride1, 'on' | 'off' | 'inherit'>;
|
|
4671
5000
|
wordWrapOverride2: IEditorOption<EditorOption.wordWrapOverride2, 'on' | 'off' | 'inherit'>;
|
|
4672
|
-
wrappingIndent: IEditorOption<EditorOption.wrappingIndent, WrappingIndent>;
|
|
4673
|
-
wrappingStrategy: IEditorOption<EditorOption.wrappingStrategy, 'simple' | 'advanced'>;
|
|
4674
5001
|
editorClassName: IEditorOption<EditorOption.editorClassName, string>;
|
|
5002
|
+
defaultColorDecorators: IEditorOption<EditorOption.defaultColorDecorators, boolean>;
|
|
4675
5003
|
pixelRatio: IEditorOption<EditorOption.pixelRatio, number>;
|
|
4676
5004
|
tabFocusMode: IEditorOption<EditorOption.tabFocusMode, boolean>;
|
|
4677
5005
|
layoutInfo: IEditorOption<EditorOption.layoutInfo, EditorLayoutInfo>;
|
|
4678
5006
|
wrappingInfo: IEditorOption<EditorOption.wrappingInfo, EditorWrappingInfo>;
|
|
5007
|
+
wrappingIndent: IEditorOption<EditorOption.wrappingIndent, WrappingIndent>;
|
|
5008
|
+
wrappingStrategy: IEditorOption<EditorOption.wrappingStrategy, 'simple' | 'advanced'>;
|
|
4679
5009
|
};
|
|
4680
5010
|
|
|
4681
5011
|
type EditorOptionsType = typeof EditorOptions;
|
|
@@ -4720,6 +5050,15 @@ declare namespace monaco.editor {
|
|
|
4720
5050
|
* If the `afterColumn` has multiple view columns, the affinity specifies which one to use. Defaults to `none`.
|
|
4721
5051
|
*/
|
|
4722
5052
|
afterColumnAffinity?: PositionAffinity;
|
|
5053
|
+
/**
|
|
5054
|
+
* Render the zone even when its line is hidden.
|
|
5055
|
+
*/
|
|
5056
|
+
showInHiddenAreas?: boolean;
|
|
5057
|
+
/**
|
|
5058
|
+
* Tiebreaker that is used when multiple view zones want to be after the same line.
|
|
5059
|
+
* Defaults to `afterColumn` otherwise 10000;
|
|
5060
|
+
*/
|
|
5061
|
+
ordinal?: number;
|
|
4723
5062
|
/**
|
|
4724
5063
|
* Suppress mouse down events.
|
|
4725
5064
|
* If set, the editor will attach a mouse down listener to the view zone and .preventDefault on it.
|
|
@@ -4806,15 +5145,24 @@ declare namespace monaco.editor {
|
|
|
4806
5145
|
*/
|
|
4807
5146
|
export interface IContentWidgetPosition {
|
|
4808
5147
|
/**
|
|
4809
|
-
* Desired position for the content widget.
|
|
4810
|
-
*
|
|
5148
|
+
* Desired position which serves as an anchor for placing the content widget.
|
|
5149
|
+
* The widget will be placed above, at, or below the specified position, based on the
|
|
5150
|
+
* provided preference. The widget will always touch this position.
|
|
5151
|
+
*
|
|
5152
|
+
* Given sufficient horizontal space, the widget will be placed to the right of the
|
|
5153
|
+
* passed in position. This can be tweaked by providing a `secondaryPosition`.
|
|
5154
|
+
*
|
|
5155
|
+
* @see preference
|
|
5156
|
+
* @see secondaryPosition
|
|
4811
5157
|
*/
|
|
4812
5158
|
position: IPosition | null;
|
|
4813
5159
|
/**
|
|
4814
|
-
* Optionally, a
|
|
4815
|
-
*
|
|
5160
|
+
* Optionally, a secondary position can be provided to further define the placing of
|
|
5161
|
+
* the content widget. The secondary position must have the same line number as the
|
|
5162
|
+
* primary position. If possible, the widget will be placed such that it also touches
|
|
5163
|
+
* the secondary position.
|
|
4816
5164
|
*/
|
|
4817
|
-
|
|
5165
|
+
secondaryPosition?: IPosition | null;
|
|
4818
5166
|
/**
|
|
4819
5167
|
* Placement preference for position, in order of preference.
|
|
4820
5168
|
*/
|
|
@@ -5082,6 +5430,8 @@ declare namespace monaco.editor {
|
|
|
5082
5430
|
|
|
5083
5431
|
export interface IMouseTargetOutsideEditor extends IBaseMouseTarget {
|
|
5084
5432
|
readonly type: MouseTargetType.OUTSIDE_EDITOR;
|
|
5433
|
+
readonly outsidePosition: 'above' | 'below' | 'left' | 'right';
|
|
5434
|
+
readonly outsideDistance: number;
|
|
5085
5435
|
}
|
|
5086
5436
|
|
|
5087
5437
|
/**
|
|
@@ -5371,12 +5721,16 @@ declare namespace monaco.editor {
|
|
|
5371
5721
|
* Change the scroll position of the editor's viewport.
|
|
5372
5722
|
*/
|
|
5373
5723
|
setScrollPosition(position: INewScrollPosition, scrollType?: ScrollType): void;
|
|
5724
|
+
/**
|
|
5725
|
+
* Check if the editor is currently scrolling towards a different scroll position.
|
|
5726
|
+
*/
|
|
5727
|
+
hasPendingScrollAnimation(): boolean;
|
|
5374
5728
|
/**
|
|
5375
5729
|
* Get an action that is a contribution to this editor.
|
|
5376
5730
|
* @id Unique identifier of the contribution.
|
|
5377
5731
|
* @return The action or null if action not found.
|
|
5378
5732
|
*/
|
|
5379
|
-
getAction(id: string): IEditorAction;
|
|
5733
|
+
getAction(id: string): IEditorAction | null;
|
|
5380
5734
|
/**
|
|
5381
5735
|
* Execute a command on the editor.
|
|
5382
5736
|
* The edits will land on the undo-redo stack, but no "undo stop" will be pushed.
|
|
@@ -5416,7 +5770,8 @@ declare namespace monaco.editor {
|
|
|
5416
5770
|
getDecorationsInRange(range: Range): IModelDecoration[] | null;
|
|
5417
5771
|
/**
|
|
5418
5772
|
* All decorations added through this call will get the ownerId of this editor.
|
|
5419
|
-
* @deprecated
|
|
5773
|
+
* @deprecated Use `createDecorationsCollection`
|
|
5774
|
+
* @see createDecorationsCollection
|
|
5420
5775
|
*/
|
|
5421
5776
|
deltaDecorations(oldDecorations: string[], newDecorations: IModelDeltaDecoration[]): string[];
|
|
5422
5777
|
/**
|
|
@@ -5444,6 +5799,10 @@ declare namespace monaco.editor {
|
|
|
5444
5799
|
* Get the vertical position (top offset) for the position w.r.t. to the first line.
|
|
5445
5800
|
*/
|
|
5446
5801
|
getTopForPosition(lineNumber: number, column: number): number;
|
|
5802
|
+
/**
|
|
5803
|
+
* Write the screen reader content to be the current selection
|
|
5804
|
+
*/
|
|
5805
|
+
writeScreenReaderContent(reason: string): void;
|
|
5447
5806
|
/**
|
|
5448
5807
|
* Returns the editor's container dom node
|
|
5449
5808
|
*/
|
|
@@ -5538,6 +5897,11 @@ declare namespace monaco.editor {
|
|
|
5538
5897
|
* @event
|
|
5539
5898
|
*/
|
|
5540
5899
|
readonly onDidUpdateDiff: IEvent<void>;
|
|
5900
|
+
/**
|
|
5901
|
+
* An event emitted when the diff model is changed (i.e. the diff editor shows new content).
|
|
5902
|
+
* @event
|
|
5903
|
+
*/
|
|
5904
|
+
readonly onDidChangeModel: IEvent<void>;
|
|
5541
5905
|
/**
|
|
5542
5906
|
* Saves current view state of the editor in a serializable object.
|
|
5543
5907
|
*/
|
|
@@ -5608,10 +5972,19 @@ declare namespace monaco.editor {
|
|
|
5608
5972
|
readonly fontWeight: string;
|
|
5609
5973
|
readonly fontSize: number;
|
|
5610
5974
|
readonly fontFeatureSettings: string;
|
|
5975
|
+
readonly fontVariationSettings: string;
|
|
5611
5976
|
readonly lineHeight: number;
|
|
5612
5977
|
readonly letterSpacing: number;
|
|
5613
5978
|
}
|
|
5614
5979
|
|
|
5980
|
+
export const EditorZoom: IEditorZoom;
|
|
5981
|
+
|
|
5982
|
+
export interface IEditorZoom {
|
|
5983
|
+
onDidChangeZoomLevel: IEvent<number>;
|
|
5984
|
+
getZoomLevel(): number;
|
|
5985
|
+
setZoomLevel(zoomLevel: number): void;
|
|
5986
|
+
}
|
|
5987
|
+
|
|
5615
5988
|
//compatibility:
|
|
5616
5989
|
export type IReadOnlyModel = ITextModel;
|
|
5617
5990
|
export type IModel = ITextModel;
|
|
@@ -5646,6 +6019,10 @@ declare namespace monaco.languages {
|
|
|
5646
6019
|
*/
|
|
5647
6020
|
readonly hasAccessToAllModels?: boolean;
|
|
5648
6021
|
readonly exclusive?: boolean;
|
|
6022
|
+
/**
|
|
6023
|
+
* This provider comes from a builtin extension.
|
|
6024
|
+
*/
|
|
6025
|
+
readonly isBuiltin?: boolean;
|
|
5649
6026
|
}
|
|
5650
6027
|
|
|
5651
6028
|
/**
|
|
@@ -5661,11 +6038,18 @@ declare namespace monaco.languages {
|
|
|
5661
6038
|
export function getEncodedLanguageId(languageId: string): number;
|
|
5662
6039
|
|
|
5663
6040
|
/**
|
|
5664
|
-
* An event emitted when a language is
|
|
6041
|
+
* An event emitted when a language is associated for the first time with a text model.
|
|
5665
6042
|
* @event
|
|
5666
6043
|
*/
|
|
5667
6044
|
export function onLanguage(languageId: string, callback: () => void): IDisposable;
|
|
5668
6045
|
|
|
6046
|
+
/**
|
|
6047
|
+
* An event emitted when a language is associated for the first time with a text model or
|
|
6048
|
+
* whena language is encountered during the tokenization of another language.
|
|
6049
|
+
* @event
|
|
6050
|
+
*/
|
|
6051
|
+
export function onLanguageEncountered(languageId: string, callback: () => void): IDisposable;
|
|
6052
|
+
|
|
5669
6053
|
/**
|
|
5670
6054
|
* Set the editing configuration for a language.
|
|
5671
6055
|
*/
|
|
@@ -6293,6 +6677,7 @@ declare namespace monaco.languages {
|
|
|
6293
6677
|
}
|
|
6294
6678
|
|
|
6295
6679
|
export enum CompletionItemInsertTextRule {
|
|
6680
|
+
None = 0,
|
|
6296
6681
|
/**
|
|
6297
6682
|
* Adjust whitespace/indentation of multiline insert texts to
|
|
6298
6683
|
* match the current line indentation.
|
|
@@ -6477,11 +6862,13 @@ declare namespace monaco.languages {
|
|
|
6477
6862
|
readonly selectedSuggestionInfo: SelectedSuggestionInfo | undefined;
|
|
6478
6863
|
}
|
|
6479
6864
|
|
|
6480
|
-
export
|
|
6481
|
-
range: IRange;
|
|
6482
|
-
text: string;
|
|
6483
|
-
|
|
6484
|
-
|
|
6865
|
+
export class SelectedSuggestionInfo {
|
|
6866
|
+
readonly range: IRange;
|
|
6867
|
+
readonly text: string;
|
|
6868
|
+
readonly completionKind: CompletionItemKind;
|
|
6869
|
+
readonly isSnippetText: boolean;
|
|
6870
|
+
constructor(range: IRange, text: string, completionKind: CompletionItemKind, isSnippetText: boolean);
|
|
6871
|
+
equals(other: SelectedSuggestionInfo): boolean;
|
|
6485
6872
|
}
|
|
6486
6873
|
|
|
6487
6874
|
export interface InlineCompletion {
|
|
@@ -6526,14 +6913,24 @@ declare namespace monaco.languages {
|
|
|
6526
6913
|
* A list of commands associated with the inline completions of this list.
|
|
6527
6914
|
*/
|
|
6528
6915
|
readonly commands?: Command[];
|
|
6916
|
+
readonly suppressSuggestions?: boolean | undefined;
|
|
6917
|
+
/**
|
|
6918
|
+
* When set and the user types a suggestion without derivating from it, the inline suggestion is not updated.
|
|
6919
|
+
*/
|
|
6920
|
+
readonly enableForwardStability?: boolean | undefined;
|
|
6529
6921
|
}
|
|
6530
6922
|
|
|
6531
6923
|
export interface InlineCompletionsProvider<T extends InlineCompletions = InlineCompletions> {
|
|
6532
6924
|
provideInlineCompletions(model: editor.ITextModel, position: Position, context: InlineCompletionContext, token: CancellationToken): ProviderResult<T>;
|
|
6533
6925
|
/**
|
|
6534
6926
|
* Will be called when an item is shown.
|
|
6927
|
+
* @param updatedInsertText Is useful to understand bracket completion.
|
|
6535
6928
|
*/
|
|
6536
|
-
handleItemDidShow?(completions: T, item: T['items'][number]): void;
|
|
6929
|
+
handleItemDidShow?(completions: T, item: T['items'][number], updatedInsertText: string): void;
|
|
6930
|
+
/**
|
|
6931
|
+
* Will be called when an item is partially accepted.
|
|
6932
|
+
*/
|
|
6933
|
+
handlePartialAccept?(completions: T, item: T['items'][number], acceptedCharacters: number): void;
|
|
6537
6934
|
/**
|
|
6538
6935
|
* Will be called when a completions list is no longer in use and can be garbage-collected.
|
|
6539
6936
|
*/
|
|
@@ -6909,6 +7306,10 @@ declare namespace monaco.languages {
|
|
|
6909
7306
|
* Prefer spaces over tabs.
|
|
6910
7307
|
*/
|
|
6911
7308
|
insertSpaces: boolean;
|
|
7309
|
+
/**
|
|
7310
|
+
* The list of multiple ranges to format at once, if the provider supports it.
|
|
7311
|
+
*/
|
|
7312
|
+
ranges?: Range[];
|
|
6912
7313
|
}
|
|
6913
7314
|
|
|
6914
7315
|
/**
|
|
@@ -6937,6 +7338,7 @@ declare namespace monaco.languages {
|
|
|
6937
7338
|
* of the range to full syntax nodes.
|
|
6938
7339
|
*/
|
|
6939
7340
|
provideDocumentRangeFormattingEdits(model: editor.ITextModel, range: Range, options: FormattingOptions, token: CancellationToken): ProviderResult<TextEdit[]>;
|
|
7341
|
+
provideDocumentRangesFormattingEdits?(model: editor.ITextModel, ranges: Range[], options: FormattingOptions, token: CancellationToken): ProviderResult<TextEdit[]>;
|
|
6940
7342
|
}
|
|
6941
7343
|
|
|
6942
7344
|
/**
|
|
@@ -7110,6 +7512,12 @@ declare namespace monaco.languages {
|
|
|
7110
7512
|
* The value of the kind is 'region'.
|
|
7111
7513
|
*/
|
|
7112
7514
|
static readonly Region: FoldingRangeKind;
|
|
7515
|
+
/**
|
|
7516
|
+
* Returns a {@link FoldingRangeKind} for the given value.
|
|
7517
|
+
*
|
|
7518
|
+
* @param value of the kind.
|
|
7519
|
+
*/
|
|
7520
|
+
static fromValue(value: string): FoldingRangeKind;
|
|
7113
7521
|
/**
|
|
7114
7522
|
* Creates a new {@link FoldingRangeKind}.
|
|
7115
7523
|
*
|
|
@@ -7387,7 +7795,7 @@ declare namespace monaco.languages {
|
|
|
7387
7795
|
log?: string;
|
|
7388
7796
|
}
|
|
7389
7797
|
|
|
7390
|
-
export type IMonarchLanguageAction = IShortMonarchLanguageAction | IExpandedMonarchLanguageAction | IShortMonarchLanguageAction
|
|
7798
|
+
export type IMonarchLanguageAction = IShortMonarchLanguageAction | IExpandedMonarchLanguageAction | (IShortMonarchLanguageAction | IExpandedMonarchLanguageAction)[];
|
|
7391
7799
|
|
|
7392
7800
|
/**
|
|
7393
7801
|
* This interface can be shortened as an array, ie. ['{','}','delimiter.curly']
|
|
@@ -8113,6 +8521,60 @@ declare namespace monaco.languages.typescript {
|
|
|
8113
8521
|
writeByteOrderMark: boolean;
|
|
8114
8522
|
text: string;
|
|
8115
8523
|
}
|
|
8524
|
+
export interface ModeConfiguration {
|
|
8525
|
+
/**
|
|
8526
|
+
* Defines whether the built-in completionItemProvider is enabled.
|
|
8527
|
+
*/
|
|
8528
|
+
readonly completionItems?: boolean;
|
|
8529
|
+
/**
|
|
8530
|
+
* Defines whether the built-in hoverProvider is enabled.
|
|
8531
|
+
*/
|
|
8532
|
+
readonly hovers?: boolean;
|
|
8533
|
+
/**
|
|
8534
|
+
* Defines whether the built-in documentSymbolProvider is enabled.
|
|
8535
|
+
*/
|
|
8536
|
+
readonly documentSymbols?: boolean;
|
|
8537
|
+
/**
|
|
8538
|
+
* Defines whether the built-in definitions provider is enabled.
|
|
8539
|
+
*/
|
|
8540
|
+
readonly definitions?: boolean;
|
|
8541
|
+
/**
|
|
8542
|
+
* Defines whether the built-in references provider is enabled.
|
|
8543
|
+
*/
|
|
8544
|
+
readonly references?: boolean;
|
|
8545
|
+
/**
|
|
8546
|
+
* Defines whether the built-in references provider is enabled.
|
|
8547
|
+
*/
|
|
8548
|
+
readonly documentHighlights?: boolean;
|
|
8549
|
+
/**
|
|
8550
|
+
* Defines whether the built-in rename provider is enabled.
|
|
8551
|
+
*/
|
|
8552
|
+
readonly rename?: boolean;
|
|
8553
|
+
/**
|
|
8554
|
+
* Defines whether the built-in diagnostic provider is enabled.
|
|
8555
|
+
*/
|
|
8556
|
+
readonly diagnostics?: boolean;
|
|
8557
|
+
/**
|
|
8558
|
+
* Defines whether the built-in document formatting range edit provider is enabled.
|
|
8559
|
+
*/
|
|
8560
|
+
readonly documentRangeFormattingEdits?: boolean;
|
|
8561
|
+
/**
|
|
8562
|
+
* Defines whether the built-in signature help provider is enabled.
|
|
8563
|
+
*/
|
|
8564
|
+
readonly signatureHelp?: boolean;
|
|
8565
|
+
/**
|
|
8566
|
+
* Defines whether the built-in onType formatting edit provider is enabled.
|
|
8567
|
+
*/
|
|
8568
|
+
readonly onTypeFormattingEdits?: boolean;
|
|
8569
|
+
/**
|
|
8570
|
+
* Defines whether the built-in code actions provider is enabled.
|
|
8571
|
+
*/
|
|
8572
|
+
readonly codeActions?: boolean;
|
|
8573
|
+
/**
|
|
8574
|
+
* Defines whether the built-in inlay hints provider is enabled.
|
|
8575
|
+
*/
|
|
8576
|
+
readonly inlayHints?: boolean;
|
|
8577
|
+
}
|
|
8116
8578
|
export interface LanguageServiceDefaults {
|
|
8117
8579
|
/**
|
|
8118
8580
|
* Event fired when compiler options or diagnostics options are changed.
|
|
@@ -8124,6 +8586,8 @@ declare namespace monaco.languages.typescript {
|
|
|
8124
8586
|
readonly onDidExtraLibsChange: IEvent<void>;
|
|
8125
8587
|
readonly workerOptions: WorkerOptions;
|
|
8126
8588
|
readonly inlayHintsOptions: InlayHintsOptions;
|
|
8589
|
+
readonly modeConfiguration: ModeConfiguration;
|
|
8590
|
+
setModeConfiguration(modeConfiguration: ModeConfiguration): void;
|
|
8127
8591
|
/**
|
|
8128
8592
|
* Get the current extra libs registered with the language service.
|
|
8129
8593
|
*/
|
|
@@ -8231,11 +8695,7 @@ declare namespace monaco.languages.typescript {
|
|
|
8231
8695
|
* @returns `Promise<typescript.QuickInfo | undefined>`
|
|
8232
8696
|
*/
|
|
8233
8697
|
getQuickInfoAtPosition(fileName: string, position: number): Promise<any | undefined>;
|
|
8234
|
-
|
|
8235
|
-
* Get other ranges which are related to the item at the given position in the file (often used for highlighting).
|
|
8236
|
-
* @returns `Promise<ReadonlyArray<typescript.ReferenceEntry> | undefined>`
|
|
8237
|
-
*/
|
|
8238
|
-
getOccurrencesAtPosition(fileName: string, position: number): Promise<ReadonlyArray<any> | undefined>;
|
|
8698
|
+
getDocumentHighlights(fileName: string, position: number, filesToSearch: string[]): Promise<ReadonlyArray<any> | undefined>;
|
|
8239
8699
|
/**
|
|
8240
8700
|
* Get the definition of the item at the given position in the file.
|
|
8241
8701
|
* @returns `Promise<ReadonlyArray<typescript.DefinitionInfo> | undefined>`
|
|
@@ -8248,9 +8708,9 @@ declare namespace monaco.languages.typescript {
|
|
|
8248
8708
|
getReferencesAtPosition(fileName: string, position: number): Promise<any[] | undefined>;
|
|
8249
8709
|
/**
|
|
8250
8710
|
* Get outline entries for the item at the given position in the file.
|
|
8251
|
-
* @returns `Promise<typescript.
|
|
8711
|
+
* @returns `Promise<typescript.NavigationTree | undefined>`
|
|
8252
8712
|
*/
|
|
8253
|
-
|
|
8713
|
+
getNavigationTree(fileName: string): Promise<any | undefined>;
|
|
8254
8714
|
/**
|
|
8255
8715
|
* Get changes which should be applied to format the given file.
|
|
8256
8716
|
* @param options `typescript.FormatCodeOptions`
|