@ng-util/monaco-editor 14.0.1 → 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 -30
- 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 +1001 -262
- 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 -328
- 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
|
}
|
|
@@ -895,6 +917,22 @@ declare namespace monaco.editor {
|
|
|
895
917
|
*/
|
|
896
918
|
export function onDidCreateEditor(listener: (codeEditor: ICodeEditor) => void): IDisposable;
|
|
897
919
|
|
|
920
|
+
/**
|
|
921
|
+
* Emitted when an diff editor is created.
|
|
922
|
+
* @event
|
|
923
|
+
*/
|
|
924
|
+
export function onDidCreateDiffEditor(listener: (diffEditor: IDiffEditor) => void): IDisposable;
|
|
925
|
+
|
|
926
|
+
/**
|
|
927
|
+
* Get all the created editors.
|
|
928
|
+
*/
|
|
929
|
+
export function getEditors(): readonly ICodeEditor[];
|
|
930
|
+
|
|
931
|
+
/**
|
|
932
|
+
* Get all the created diff editors.
|
|
933
|
+
*/
|
|
934
|
+
export function getDiffEditors(): readonly IDiffEditor[];
|
|
935
|
+
|
|
898
936
|
/**
|
|
899
937
|
* Create a new diff editor under `domElement`.
|
|
900
938
|
* `domElement` should be empty (not contain other dom nodes).
|
|
@@ -910,6 +948,50 @@ declare namespace monaco.editor {
|
|
|
910
948
|
|
|
911
949
|
export function createDiffNavigator(diffEditor: IStandaloneDiffEditor, opts?: IDiffNavigatorOptions): IDiffNavigator;
|
|
912
950
|
|
|
951
|
+
/**
|
|
952
|
+
* Description of a command contribution
|
|
953
|
+
*/
|
|
954
|
+
export interface ICommandDescriptor {
|
|
955
|
+
/**
|
|
956
|
+
* An unique identifier of the contributed command.
|
|
957
|
+
*/
|
|
958
|
+
id: string;
|
|
959
|
+
/**
|
|
960
|
+
* Callback that will be executed when the command is triggered.
|
|
961
|
+
*/
|
|
962
|
+
run: ICommandHandler;
|
|
963
|
+
}
|
|
964
|
+
|
|
965
|
+
/**
|
|
966
|
+
* Add a command.
|
|
967
|
+
*/
|
|
968
|
+
export function addCommand(descriptor: ICommandDescriptor): IDisposable;
|
|
969
|
+
|
|
970
|
+
/**
|
|
971
|
+
* Add an action to all editors.
|
|
972
|
+
*/
|
|
973
|
+
export function addEditorAction(descriptor: IActionDescriptor): IDisposable;
|
|
974
|
+
|
|
975
|
+
/**
|
|
976
|
+
* A keybinding rule.
|
|
977
|
+
*/
|
|
978
|
+
export interface IKeybindingRule {
|
|
979
|
+
keybinding: number;
|
|
980
|
+
command?: string | null;
|
|
981
|
+
commandArgs?: any;
|
|
982
|
+
when?: string | null;
|
|
983
|
+
}
|
|
984
|
+
|
|
985
|
+
/**
|
|
986
|
+
* Add a keybinding rule.
|
|
987
|
+
*/
|
|
988
|
+
export function addKeybindingRule(rule: IKeybindingRule): IDisposable;
|
|
989
|
+
|
|
990
|
+
/**
|
|
991
|
+
* Add keybinding rules.
|
|
992
|
+
*/
|
|
993
|
+
export function addKeybindingRules(rules: IKeybindingRule[]): IDisposable;
|
|
994
|
+
|
|
913
995
|
/**
|
|
914
996
|
* Create a new editor model.
|
|
915
997
|
* You can specify the language that should be set for this model or let the language be inferred from the `uri`.
|
|
@@ -919,13 +1001,18 @@ declare namespace monaco.editor {
|
|
|
919
1001
|
/**
|
|
920
1002
|
* Change the language for a model.
|
|
921
1003
|
*/
|
|
922
|
-
export function setModelLanguage(model: ITextModel,
|
|
1004
|
+
export function setModelLanguage(model: ITextModel, mimeTypeOrLanguageId: string): void;
|
|
923
1005
|
|
|
924
1006
|
/**
|
|
925
1007
|
* Set the markers for a model.
|
|
926
1008
|
*/
|
|
927
1009
|
export function setModelMarkers(model: ITextModel, owner: string, markers: IMarkerData[]): void;
|
|
928
1010
|
|
|
1011
|
+
/**
|
|
1012
|
+
* Remove all markers of an owner.
|
|
1013
|
+
*/
|
|
1014
|
+
export function removeAllMarkers(owner: string): void;
|
|
1015
|
+
|
|
929
1016
|
/**
|
|
930
1017
|
* Get markers for owner and/or resource
|
|
931
1018
|
*
|
|
@@ -978,7 +1065,7 @@ declare namespace monaco.editor {
|
|
|
978
1065
|
* Create a new web worker that has model syncing capabilities built in.
|
|
979
1066
|
* Specify an AMD module to load that will `create` an object that will be proxied.
|
|
980
1067
|
*/
|
|
981
|
-
export function createWebWorker<T>(opts: IWebWorkerOptions): MonacoWebWorker<T>;
|
|
1068
|
+
export function createWebWorker<T extends object>(opts: IWebWorkerOptions): MonacoWebWorker<T>;
|
|
982
1069
|
|
|
983
1070
|
/**
|
|
984
1071
|
* Colorize the contents of `domNode` using attribute `data-lang`.
|
|
@@ -1020,7 +1107,44 @@ declare namespace monaco.editor {
|
|
|
1020
1107
|
*/
|
|
1021
1108
|
export function registerCommand(id: string, handler: (accessor: any, ...args: any[]) => void): IDisposable;
|
|
1022
1109
|
|
|
1023
|
-
export
|
|
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
|
+
|
|
1147
|
+
export type BuiltinTheme = 'vs' | 'vs-dark' | 'hc-black' | 'hc-light';
|
|
1024
1148
|
|
|
1025
1149
|
export interface IStandaloneThemeData {
|
|
1026
1150
|
base: BuiltinTheme;
|
|
@@ -1179,7 +1303,7 @@ declare namespace monaco.editor {
|
|
|
1179
1303
|
*/
|
|
1180
1304
|
'semanticHighlighting.enabled'?: true | false | 'configuredByTheme';
|
|
1181
1305
|
/**
|
|
1182
|
-
* Keep peek editors open even when double
|
|
1306
|
+
* Keep peek editors open even when double-clicking their content or when hitting `Escape`.
|
|
1183
1307
|
* Defaults to false.
|
|
1184
1308
|
*/
|
|
1185
1309
|
stablePeek?: boolean;
|
|
@@ -1190,7 +1314,7 @@ declare namespace monaco.editor {
|
|
|
1190
1314
|
maxTokenizationLineLength?: number;
|
|
1191
1315
|
/**
|
|
1192
1316
|
* Theme to be used for rendering.
|
|
1193
|
-
* The current out-of-the-box available themes are: 'vs' (default), 'vs-dark', 'hc-black'.
|
|
1317
|
+
* The current out-of-the-box available themes are: 'vs' (default), 'vs-dark', 'hc-black', 'hc-light'.
|
|
1194
1318
|
* You can create custom themes via `monaco.editor.defineTheme`.
|
|
1195
1319
|
* To switch a theme, use `monaco.editor.setTheme`.
|
|
1196
1320
|
* **NOTE**: The theme might be overwritten if the OS is in high contrast mode, unless `autoDetectHighContrast` is set to false.
|
|
@@ -1223,7 +1347,7 @@ declare namespace monaco.editor {
|
|
|
1223
1347
|
language?: string;
|
|
1224
1348
|
/**
|
|
1225
1349
|
* Initial theme to be used for rendering.
|
|
1226
|
-
* The current out-of-the-box available themes are: 'vs' (default), 'vs-dark', 'hc-black'.
|
|
1350
|
+
* The current out-of-the-box available themes are: 'vs' (default), 'vs-dark', 'hc-black', 'hc-light.
|
|
1227
1351
|
* You can create custom themes via `monaco.editor.defineTheme`.
|
|
1228
1352
|
* To switch a theme, use `monaco.editor.setTheme`.
|
|
1229
1353
|
* **NOTE**: The theme might be overwritten if the OS is in high contrast mode, unless `autoDetectHighContrast` is set to false.
|
|
@@ -1254,7 +1378,7 @@ declare namespace monaco.editor {
|
|
|
1254
1378
|
export interface IStandaloneDiffEditorConstructionOptions extends IDiffEditorConstructionOptions {
|
|
1255
1379
|
/**
|
|
1256
1380
|
* Initial theme to be used for rendering.
|
|
1257
|
-
* The current out-of-the-box available themes are: 'vs' (default), 'vs-dark', 'hc-black'.
|
|
1381
|
+
* The current out-of-the-box available themes are: 'vs' (default), 'vs-dark', 'hc-black', 'hc-light.
|
|
1258
1382
|
* You can create custom themes via `monaco.editor.defineTheme`.
|
|
1259
1383
|
* To switch a theme, use `monaco.editor.setTheme`.
|
|
1260
1384
|
* **NOTE**: The theme might be overwritten if the OS is in high contrast mode, unless `autoDetectHighContrast` is set to false.
|
|
@@ -1270,13 +1394,13 @@ declare namespace monaco.editor {
|
|
|
1270
1394
|
export interface IStandaloneCodeEditor extends ICodeEditor {
|
|
1271
1395
|
updateOptions(newOptions: IEditorOptions & IGlobalEditorOptions): void;
|
|
1272
1396
|
addCommand(keybinding: number, handler: ICommandHandler, context?: string): string | null;
|
|
1273
|
-
createContextKey<T>(key: string, defaultValue: T): IContextKey<T>;
|
|
1397
|
+
createContextKey<T extends ContextKeyValue = ContextKeyValue>(key: string, defaultValue: T): IContextKey<T>;
|
|
1274
1398
|
addAction(descriptor: IActionDescriptor): IDisposable;
|
|
1275
1399
|
}
|
|
1276
1400
|
|
|
1277
1401
|
export interface IStandaloneDiffEditor extends IDiffEditor {
|
|
1278
1402
|
addCommand(keybinding: number, handler: ICommandHandler, context?: string): string | null;
|
|
1279
|
-
createContextKey<T>(key: string, defaultValue: T): IContextKey<T>;
|
|
1403
|
+
createContextKey<T extends ContextKeyValue = ContextKeyValue>(key: string, defaultValue: T): IContextKey<T>;
|
|
1280
1404
|
addAction(descriptor: IActionDescriptor): IDisposable;
|
|
1281
1405
|
getOriginalEditor(): IStandaloneCodeEditor;
|
|
1282
1406
|
getModifiedEditor(): IStandaloneCodeEditor;
|
|
@@ -1285,12 +1409,14 @@ declare namespace monaco.editor {
|
|
|
1285
1409
|
(...args: any[]): void;
|
|
1286
1410
|
}
|
|
1287
1411
|
|
|
1288
|
-
export interface IContextKey<T> {
|
|
1412
|
+
export interface IContextKey<T extends ContextKeyValue = ContextKeyValue> {
|
|
1289
1413
|
set(value: T): void;
|
|
1290
1414
|
reset(): void;
|
|
1291
1415
|
get(): T | undefined;
|
|
1292
1416
|
}
|
|
1293
1417
|
|
|
1418
|
+
export type ContextKeyValue = null | undefined | boolean | number | string | Array<null | undefined | boolean | number | string> | Record<string, null | undefined | boolean | number | string>;
|
|
1419
|
+
|
|
1294
1420
|
export interface IEditorOverrideServices {
|
|
1295
1421
|
[index: string]: any;
|
|
1296
1422
|
}
|
|
@@ -1309,6 +1435,7 @@ declare namespace monaco.editor {
|
|
|
1309
1435
|
startColumn: number;
|
|
1310
1436
|
endLineNumber: number;
|
|
1311
1437
|
endColumn: number;
|
|
1438
|
+
modelVersionId?: number;
|
|
1312
1439
|
relatedInformation?: IRelatedInformation[];
|
|
1313
1440
|
tags?: MarkerTag[];
|
|
1314
1441
|
}
|
|
@@ -1328,6 +1455,7 @@ declare namespace monaco.editor {
|
|
|
1328
1455
|
startColumn: number;
|
|
1329
1456
|
endLineNumber: number;
|
|
1330
1457
|
endColumn: number;
|
|
1458
|
+
modelVersionId?: number;
|
|
1331
1459
|
relatedInformation?: IRelatedInformation[];
|
|
1332
1460
|
tags?: MarkerTag[];
|
|
1333
1461
|
}
|
|
@@ -1411,6 +1539,14 @@ declare namespace monaco.editor {
|
|
|
1411
1539
|
Full = 7
|
|
1412
1540
|
}
|
|
1413
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
|
+
|
|
1414
1550
|
/**
|
|
1415
1551
|
* Position in the minimap to render the decoration.
|
|
1416
1552
|
*/
|
|
@@ -1432,6 +1568,13 @@ declare namespace monaco.editor {
|
|
|
1432
1568
|
darkColor?: string | ThemeColor;
|
|
1433
1569
|
}
|
|
1434
1570
|
|
|
1571
|
+
export interface IModelDecorationGlyphMarginOptions {
|
|
1572
|
+
/**
|
|
1573
|
+
* The position in the glyph margin.
|
|
1574
|
+
*/
|
|
1575
|
+
position: GlyphMarginLane;
|
|
1576
|
+
}
|
|
1577
|
+
|
|
1435
1578
|
/**
|
|
1436
1579
|
* Options for rendering a model decoration in the overview ruler.
|
|
1437
1580
|
*/
|
|
@@ -1443,11 +1586,11 @@ declare namespace monaco.editor {
|
|
|
1443
1586
|
}
|
|
1444
1587
|
|
|
1445
1588
|
/**
|
|
1446
|
-
* Options for rendering a model decoration in the
|
|
1589
|
+
* Options for rendering a model decoration in the minimap.
|
|
1447
1590
|
*/
|
|
1448
1591
|
export interface IModelDecorationMinimapOptions extends IDecorationOptions {
|
|
1449
1592
|
/**
|
|
1450
|
-
* The position in the
|
|
1593
|
+
* The position in the minimap.
|
|
1451
1594
|
*/
|
|
1452
1595
|
position: MinimapPosition;
|
|
1453
1596
|
}
|
|
@@ -1465,6 +1608,14 @@ declare namespace monaco.editor {
|
|
|
1465
1608
|
* CSS class name describing the decoration.
|
|
1466
1609
|
*/
|
|
1467
1610
|
className?: string | null;
|
|
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;
|
|
1468
1619
|
/**
|
|
1469
1620
|
* Message to be rendered when hovering over the glyph margin decoration.
|
|
1470
1621
|
*/
|
|
@@ -1477,6 +1628,10 @@ declare namespace monaco.editor {
|
|
|
1477
1628
|
* Should the decoration expand to encompass a whole line.
|
|
1478
1629
|
*/
|
|
1479
1630
|
isWholeLine?: boolean;
|
|
1631
|
+
/**
|
|
1632
|
+
* Always render the decoration (even when the range it encompasses is collapsed).
|
|
1633
|
+
*/
|
|
1634
|
+
showIfCollapsed?: boolean;
|
|
1480
1635
|
/**
|
|
1481
1636
|
* Specifies the stack order of a decoration.
|
|
1482
1637
|
* A decoration with greater stack order is always in front of a decoration with
|
|
@@ -1495,6 +1650,11 @@ declare namespace monaco.editor {
|
|
|
1495
1650
|
* If set, the decoration will be rendered in the glyph margin with this CSS class name.
|
|
1496
1651
|
*/
|
|
1497
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;
|
|
1498
1658
|
/**
|
|
1499
1659
|
* If set, the decoration will be rendered in the lines decorations with this CSS class name.
|
|
1500
1660
|
*/
|
|
@@ -1687,15 +1847,17 @@ declare namespace monaco.editor {
|
|
|
1687
1847
|
readonly defaultEOL: DefaultEndOfLine;
|
|
1688
1848
|
readonly trimAutoWhitespace: boolean;
|
|
1689
1849
|
readonly bracketPairColorizationOptions: BracketPairColorizationOptions;
|
|
1850
|
+
get originalIndentSize(): number | 'tabSize';
|
|
1690
1851
|
}
|
|
1691
1852
|
|
|
1692
1853
|
export interface BracketPairColorizationOptions {
|
|
1693
1854
|
enabled: boolean;
|
|
1855
|
+
independentColorPoolPerBracketType: boolean;
|
|
1694
1856
|
}
|
|
1695
1857
|
|
|
1696
1858
|
export interface ITextModelUpdateOptions {
|
|
1697
1859
|
tabSize?: number;
|
|
1698
|
-
indentSize?: number;
|
|
1860
|
+
indentSize?: number | 'tabSize';
|
|
1699
1861
|
insertSpaces?: boolean;
|
|
1700
1862
|
trimAutoWhitespace?: boolean;
|
|
1701
1863
|
bracketColorizationOptions?: BracketPairColorizationOptions;
|
|
@@ -1718,6 +1880,15 @@ declare namespace monaco.editor {
|
|
|
1718
1880
|
GrowsOnlyWhenTypingAfter = 3
|
|
1719
1881
|
}
|
|
1720
1882
|
|
|
1883
|
+
/**
|
|
1884
|
+
* Text snapshot that works like an iterator.
|
|
1885
|
+
* Will try to return chunks of roughly ~64KB size.
|
|
1886
|
+
* Will return null when finished.
|
|
1887
|
+
*/
|
|
1888
|
+
export interface ITextSnapshot {
|
|
1889
|
+
read(): string | null;
|
|
1890
|
+
}
|
|
1891
|
+
|
|
1721
1892
|
/**
|
|
1722
1893
|
* A model.
|
|
1723
1894
|
*/
|
|
@@ -1749,7 +1920,7 @@ declare namespace monaco.editor {
|
|
|
1749
1920
|
/**
|
|
1750
1921
|
* Replace the entire text buffer value contained in this model.
|
|
1751
1922
|
*/
|
|
1752
|
-
setValue(newValue: string): void;
|
|
1923
|
+
setValue(newValue: string | ITextSnapshot): void;
|
|
1753
1924
|
/**
|
|
1754
1925
|
* Get the text stored in this model.
|
|
1755
1926
|
* @param eol The end of line character preference. Defaults to `EndOfLinePreference.TextDefined`.
|
|
@@ -1757,6 +1928,12 @@ declare namespace monaco.editor {
|
|
|
1757
1928
|
* @return The text.
|
|
1758
1929
|
*/
|
|
1759
1930
|
getValue(eol?: EndOfLinePreference, preserveBOM?: boolean): string;
|
|
1931
|
+
/**
|
|
1932
|
+
* Get the text stored in this model.
|
|
1933
|
+
* @param preserverBOM Preserve a BOM character if it was detected when the model was constructed.
|
|
1934
|
+
* @return The text snapshot (it is safe to consume it asynchronously).
|
|
1935
|
+
*/
|
|
1936
|
+
createSnapshot(preserveBOM?: boolean): ITextSnapshot;
|
|
1760
1937
|
/**
|
|
1761
1938
|
* Get the length of the text stored in this model.
|
|
1762
1939
|
*/
|
|
@@ -1773,12 +1950,12 @@ declare namespace monaco.editor {
|
|
|
1773
1950
|
* @param range The range describing what text length to get.
|
|
1774
1951
|
* @return The text length.
|
|
1775
1952
|
*/
|
|
1776
|
-
getValueLengthInRange(range: IRange): number;
|
|
1953
|
+
getValueLengthInRange(range: IRange, eol?: EndOfLinePreference): number;
|
|
1777
1954
|
/**
|
|
1778
1955
|
* Get the character count of text in a certain range.
|
|
1779
1956
|
* @param range The range describing what text length to get.
|
|
1780
1957
|
*/
|
|
1781
|
-
getCharacterCountInRange(range: IRange): number;
|
|
1958
|
+
getCharacterCountInRange(range: IRange, eol?: EndOfLinePreference): number;
|
|
1782
1959
|
/**
|
|
1783
1960
|
* Get the number of lines in the model.
|
|
1784
1961
|
*/
|
|
@@ -1973,15 +2150,22 @@ declare namespace monaco.editor {
|
|
|
1973
2150
|
* @param range The range to search in
|
|
1974
2151
|
* @param ownerId If set, it will ignore decorations belonging to other owners.
|
|
1975
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.
|
|
1976
2155
|
* @return An array with the decorations
|
|
1977
2156
|
*/
|
|
1978
|
-
getDecorationsInRange(range: IRange, ownerId?: number, filterOutValidation?: boolean): IModelDecoration[];
|
|
2157
|
+
getDecorationsInRange(range: IRange, ownerId?: number, filterOutValidation?: boolean, onlyMinimapDecorations?: boolean, onlyMarginDecorations?: boolean): IModelDecoration[];
|
|
1979
2158
|
/**
|
|
1980
2159
|
* Gets all the decorations as an array.
|
|
1981
2160
|
* @param ownerId If set, it will ignore decorations belonging to other owners.
|
|
1982
2161
|
* @param filterOutValidation If set, it will ignore decorations specific to validation (i.e. warnings, errors).
|
|
1983
2162
|
*/
|
|
1984
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[];
|
|
1985
2169
|
/**
|
|
1986
2170
|
* Gets all the decorations that should be rendered in the overview ruler as an array.
|
|
1987
2171
|
* @param ownerId If set, it will ignore decorations belonging to other owners.
|
|
@@ -2100,7 +2284,15 @@ declare namespace monaco.editor {
|
|
|
2100
2284
|
/**
|
|
2101
2285
|
* No preference.
|
|
2102
2286
|
*/
|
|
2103
|
-
None = 2
|
|
2287
|
+
None = 2,
|
|
2288
|
+
/**
|
|
2289
|
+
* If the given position is on injected text, prefers the position left of it.
|
|
2290
|
+
*/
|
|
2291
|
+
LeftOfInjectedText = 3,
|
|
2292
|
+
/**
|
|
2293
|
+
* If the given position is on injected text, prefers the position right of it.
|
|
2294
|
+
*/
|
|
2295
|
+
RightOfInjectedText = 4
|
|
2104
2296
|
}
|
|
2105
2297
|
|
|
2106
2298
|
/**
|
|
@@ -2129,6 +2321,144 @@ declare namespace monaco.editor {
|
|
|
2129
2321
|
export interface ILineChange extends IChange {
|
|
2130
2322
|
readonly charChanges: ICharChange[] | undefined;
|
|
2131
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
|
+
}
|
|
2132
2462
|
export interface IDimension {
|
|
2133
2463
|
width: number;
|
|
2134
2464
|
height: number;
|
|
@@ -2243,7 +2573,7 @@ declare namespace monaco.editor {
|
|
|
2243
2573
|
readonly label: string;
|
|
2244
2574
|
readonly alias: string;
|
|
2245
2575
|
isSupported(): boolean;
|
|
2246
|
-
run(): Promise<void>;
|
|
2576
|
+
run(args?: unknown): Promise<void>;
|
|
2247
2577
|
}
|
|
2248
2578
|
|
|
2249
2579
|
export type IEditorModel = ITextModel | IDiffEditorModel;
|
|
@@ -2351,7 +2681,7 @@ declare namespace monaco.editor {
|
|
|
2351
2681
|
/**
|
|
2352
2682
|
* Restores the view state of the editor from a serializable object generated by `saveViewState`.
|
|
2353
2683
|
*/
|
|
2354
|
-
restoreViewState(state: IEditorViewState): void;
|
|
2684
|
+
restoreViewState(state: IEditorViewState | null): void;
|
|
2355
2685
|
/**
|
|
2356
2686
|
* Given a position, returns a column number that takes tab-widths into account.
|
|
2357
2687
|
*/
|
|
@@ -2502,6 +2832,47 @@ declare namespace monaco.editor {
|
|
|
2502
2832
|
* It is safe to call setModel(null) to simply detach the current model from the editor.
|
|
2503
2833
|
*/
|
|
2504
2834
|
setModel(model: IEditorModel | null): void;
|
|
2835
|
+
/**
|
|
2836
|
+
* Create a collection of decorations. All decorations added through this collection
|
|
2837
|
+
* will get the ownerId of the editor (meaning they will not show up in other editors).
|
|
2838
|
+
* These decorations will be automatically cleared when the editor's model changes.
|
|
2839
|
+
*/
|
|
2840
|
+
createDecorationsCollection(decorations?: IModelDeltaDecoration[]): IEditorDecorationsCollection;
|
|
2841
|
+
}
|
|
2842
|
+
|
|
2843
|
+
/**
|
|
2844
|
+
* A collection of decorations
|
|
2845
|
+
*/
|
|
2846
|
+
export interface IEditorDecorationsCollection {
|
|
2847
|
+
/**
|
|
2848
|
+
* An event emitted when decorations change in the editor,
|
|
2849
|
+
* but the change is not caused by us setting or clearing the collection.
|
|
2850
|
+
*/
|
|
2851
|
+
onDidChange: IEvent<IModelDecorationsChangedEvent>;
|
|
2852
|
+
/**
|
|
2853
|
+
* Get the decorations count.
|
|
2854
|
+
*/
|
|
2855
|
+
length: number;
|
|
2856
|
+
/**
|
|
2857
|
+
* Get the range for a decoration.
|
|
2858
|
+
*/
|
|
2859
|
+
getRange(index: number): Range | null;
|
|
2860
|
+
/**
|
|
2861
|
+
* Get all ranges for decorations.
|
|
2862
|
+
*/
|
|
2863
|
+
getRanges(): Range[];
|
|
2864
|
+
/**
|
|
2865
|
+
* Determine if a decoration is in this collection.
|
|
2866
|
+
*/
|
|
2867
|
+
has(decoration: IModelDecoration): boolean;
|
|
2868
|
+
/**
|
|
2869
|
+
* Replace all previous decorations with `newDecorations`.
|
|
2870
|
+
*/
|
|
2871
|
+
set(newDecorations: readonly IModelDeltaDecoration[]): string[];
|
|
2872
|
+
/**
|
|
2873
|
+
* Remove all previous decorations.
|
|
2874
|
+
*/
|
|
2875
|
+
clear(): void;
|
|
2505
2876
|
}
|
|
2506
2877
|
|
|
2507
2878
|
/**
|
|
@@ -2542,6 +2913,10 @@ declare namespace monaco.editor {
|
|
|
2542
2913
|
* New language
|
|
2543
2914
|
*/
|
|
2544
2915
|
readonly newLanguage: string;
|
|
2916
|
+
/**
|
|
2917
|
+
* Source of the call that caused the event.
|
|
2918
|
+
*/
|
|
2919
|
+
readonly source: string;
|
|
2545
2920
|
}
|
|
2546
2921
|
|
|
2547
2922
|
/**
|
|
@@ -2595,6 +2970,10 @@ declare namespace monaco.editor {
|
|
|
2595
2970
|
* The model has been reset to a new value.
|
|
2596
2971
|
*/
|
|
2597
2972
|
readonly isFlush: boolean;
|
|
2973
|
+
/**
|
|
2974
|
+
* Flag that indicates that this event describes an eol change.
|
|
2975
|
+
*/
|
|
2976
|
+
readonly isEolChange: boolean;
|
|
2598
2977
|
}
|
|
2599
2978
|
|
|
2600
2979
|
/**
|
|
@@ -2603,6 +2982,7 @@ declare namespace monaco.editor {
|
|
|
2603
2982
|
export interface IModelDecorationsChangedEvent {
|
|
2604
2983
|
readonly affectsMinimap: boolean;
|
|
2605
2984
|
readonly affectsOverviewRuler: boolean;
|
|
2985
|
+
readonly affectsGlyphMargin: boolean;
|
|
2606
2986
|
}
|
|
2607
2987
|
|
|
2608
2988
|
export interface IModelOptionsChangedEvent {
|
|
@@ -2749,6 +3129,10 @@ declare namespace monaco.editor {
|
|
|
2749
3129
|
* The aria label for the editor's textarea (when it is focused).
|
|
2750
3130
|
*/
|
|
2751
3131
|
ariaLabel?: string;
|
|
3132
|
+
/**
|
|
3133
|
+
* Control whether a screen reader announces inline suggestion content immediately.
|
|
3134
|
+
*/
|
|
3135
|
+
screenReaderAnnounceInlineSuggestion?: boolean;
|
|
2752
3136
|
/**
|
|
2753
3137
|
* The `tabindex` property of the editor's textarea
|
|
2754
3138
|
*/
|
|
@@ -2789,9 +3173,9 @@ declare namespace monaco.editor {
|
|
|
2789
3173
|
cursorSurroundingLinesStyle?: 'default' | 'all';
|
|
2790
3174
|
/**
|
|
2791
3175
|
* Render last line number when the file ends with a newline.
|
|
2792
|
-
* Defaults to
|
|
3176
|
+
* Defaults to 'on' for Windows and macOS and 'dimmed' for Linux.
|
|
2793
3177
|
*/
|
|
2794
|
-
renderFinalNewline?:
|
|
3178
|
+
renderFinalNewline?: 'on' | 'off' | 'dimmed';
|
|
2795
3179
|
/**
|
|
2796
3180
|
* Remove unusual line terminators like LINE SEPARATOR (LS), PARAGRAPH SEPARATOR (PS).
|
|
2797
3181
|
* Defaults to 'prompt'.
|
|
@@ -2862,6 +3246,10 @@ declare namespace monaco.editor {
|
|
|
2862
3246
|
* Control the behavior and rendering of the scrollbars.
|
|
2863
3247
|
*/
|
|
2864
3248
|
scrollbar?: IEditorScrollbarOptions;
|
|
3249
|
+
/**
|
|
3250
|
+
* Control the behavior of sticky scroll options
|
|
3251
|
+
*/
|
|
3252
|
+
stickyScroll?: IEditorStickyScrollOptions;
|
|
2865
3253
|
/**
|
|
2866
3254
|
* Control the behavior and rendering of the minimap.
|
|
2867
3255
|
*/
|
|
@@ -2902,9 +3290,9 @@ declare namespace monaco.editor {
|
|
|
2902
3290
|
mouseStyle?: 'text' | 'default' | 'copy';
|
|
2903
3291
|
/**
|
|
2904
3292
|
* Enable smooth caret animation.
|
|
2905
|
-
* Defaults to
|
|
3293
|
+
* Defaults to 'off'.
|
|
2906
3294
|
*/
|
|
2907
|
-
cursorSmoothCaretAnimation?:
|
|
3295
|
+
cursorSmoothCaretAnimation?: 'off' | 'explicit' | 'on';
|
|
2908
3296
|
/**
|
|
2909
3297
|
* Control the cursor style, either 'block' or 'line'.
|
|
2910
3298
|
* Defaults to 'line'.
|
|
@@ -2919,6 +3307,15 @@ declare namespace monaco.editor {
|
|
|
2919
3307
|
* Defaults to false.
|
|
2920
3308
|
*/
|
|
2921
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;
|
|
2922
3319
|
/**
|
|
2923
3320
|
* Disable the use of `transform: translate3d(0px, 0px, 0px)` for the editor margin and lines layers.
|
|
2924
3321
|
* The usage of `transform: translate3d(0px, 0px, 0px)` acts as a hint for browsers to create an extra layer.
|
|
@@ -2951,8 +3348,7 @@ declare namespace monaco.editor {
|
|
|
2951
3348
|
*/
|
|
2952
3349
|
smoothScrolling?: boolean;
|
|
2953
3350
|
/**
|
|
2954
|
-
* Enable that the editor will install
|
|
2955
|
-
* 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.
|
|
2956
3352
|
* Defaults to false.
|
|
2957
3353
|
*/
|
|
2958
3354
|
automaticLayout?: boolean;
|
|
@@ -3000,6 +3396,12 @@ declare namespace monaco.editor {
|
|
|
3000
3396
|
* Configure word wrapping characters. A break will be introduced after these characters.
|
|
3001
3397
|
*/
|
|
3002
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';
|
|
3003
3405
|
/**
|
|
3004
3406
|
* Performance guard: Stop rendering a line after x characters.
|
|
3005
3407
|
* Defaults to 10000.
|
|
@@ -3019,6 +3421,10 @@ declare namespace monaco.editor {
|
|
|
3019
3421
|
* Enable inline color decorators and color picker rendering.
|
|
3020
3422
|
*/
|
|
3021
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;
|
|
3022
3428
|
/**
|
|
3023
3429
|
* Control the behaviour of comments in the editor.
|
|
3024
3430
|
*/
|
|
@@ -3063,6 +3469,10 @@ declare namespace monaco.editor {
|
|
|
3063
3469
|
* Defaults to 'spread'.
|
|
3064
3470
|
*/
|
|
3065
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;
|
|
3066
3476
|
/**
|
|
3067
3477
|
* Configure the editor's accessibility support.
|
|
3068
3478
|
* Defaults to 'auto'. It is best to leave this to 'auto'.
|
|
@@ -3256,7 +3666,7 @@ declare namespace monaco.editor {
|
|
|
3256
3666
|
* Controls whether the fold actions in the gutter stay always visible or hide unless the mouse is over the gutter.
|
|
3257
3667
|
* Defaults to 'mouseover'.
|
|
3258
3668
|
*/
|
|
3259
|
-
showFoldingControls?: 'always' | 'mouseover';
|
|
3669
|
+
showFoldingControls?: 'always' | 'never' | 'mouseover';
|
|
3260
3670
|
/**
|
|
3261
3671
|
* Controls whether clicking on the empty content after a folded line will unfold the line.
|
|
3262
3672
|
* Defaults to false.
|
|
@@ -3267,6 +3677,11 @@ declare namespace monaco.editor {
|
|
|
3267
3677
|
* Defaults to 'always'.
|
|
3268
3678
|
*/
|
|
3269
3679
|
matchBrackets?: 'never' | 'near' | 'always';
|
|
3680
|
+
/**
|
|
3681
|
+
* Enable experimental whitespace rendering.
|
|
3682
|
+
* Defaults to 'svg'.
|
|
3683
|
+
*/
|
|
3684
|
+
experimentalWhitespaceRendering?: 'svg' | 'font' | 'off';
|
|
3270
3685
|
/**
|
|
3271
3686
|
* Enable rendering of whitespace.
|
|
3272
3687
|
* Defaults to 'selection'.
|
|
@@ -3329,6 +3744,10 @@ declare namespace monaco.editor {
|
|
|
3329
3744
|
* Controls strikethrough deprecated variables.
|
|
3330
3745
|
*/
|
|
3331
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;
|
|
3332
3751
|
/**
|
|
3333
3752
|
* Control the behavior and rendering of the inline hints.
|
|
3334
3753
|
*/
|
|
@@ -3350,6 +3769,16 @@ declare namespace monaco.editor {
|
|
|
3350
3769
|
* Configures bracket pair colorization (disabled by default).
|
|
3351
3770
|
*/
|
|
3352
3771
|
bracketPairColorization?: IBracketPairColorizationOptions;
|
|
3772
|
+
/**
|
|
3773
|
+
* Controls dropping into the editor from an external source.
|
|
3774
|
+
*
|
|
3775
|
+
* When enabled, this shows a preview of the drop location and triggers an `onDropIntoEditor` event.
|
|
3776
|
+
*/
|
|
3777
|
+
dropIntoEditor?: IDropIntoEditorOptions;
|
|
3778
|
+
/**
|
|
3779
|
+
* Controls whether the editor receives tabs or defers them to the workbench for navigation.
|
|
3780
|
+
*/
|
|
3781
|
+
tabFocusMode?: boolean;
|
|
3353
3782
|
}
|
|
3354
3783
|
|
|
3355
3784
|
export interface IDiffEditorBaseOptions {
|
|
@@ -3358,6 +3787,12 @@ declare namespace monaco.editor {
|
|
|
3358
3787
|
* Defaults to true.
|
|
3359
3788
|
*/
|
|
3360
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;
|
|
3361
3796
|
/**
|
|
3362
3797
|
* Render the differences in two side-by-side editors.
|
|
3363
3798
|
* Defaults to true.
|
|
@@ -3383,6 +3818,11 @@ declare namespace monaco.editor {
|
|
|
3383
3818
|
* Defaults to true.
|
|
3384
3819
|
*/
|
|
3385
3820
|
renderIndicators?: boolean;
|
|
3821
|
+
/**
|
|
3822
|
+
* Shows icons in the glyph margin to revert changes.
|
|
3823
|
+
* Default to true.
|
|
3824
|
+
*/
|
|
3825
|
+
renderMarginRevertIcon?: boolean;
|
|
3386
3826
|
/**
|
|
3387
3827
|
* Original model should be editable?
|
|
3388
3828
|
* Defaults to false.
|
|
@@ -3402,6 +3842,14 @@ declare namespace monaco.editor {
|
|
|
3402
3842
|
* Control the wrapping of the diff editor.
|
|
3403
3843
|
*/
|
|
3404
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;
|
|
3405
3853
|
}
|
|
3406
3854
|
|
|
3407
3855
|
/**
|
|
@@ -3431,7 +3879,7 @@ declare namespace monaco.editor {
|
|
|
3431
3879
|
/**
|
|
3432
3880
|
* Might modify `value`.
|
|
3433
3881
|
*/
|
|
3434
|
-
applyUpdate(value: V, update: V): ApplyUpdateResult<V>;
|
|
3882
|
+
applyUpdate(value: V | undefined, update: V): ApplyUpdateResult<V>;
|
|
3435
3883
|
}
|
|
3436
3884
|
|
|
3437
3885
|
export class ApplyUpdateResult<T> {
|
|
@@ -3534,7 +3982,7 @@ declare namespace monaco.editor {
|
|
|
3534
3982
|
autoFindInSelection?: 'never' | 'always' | 'multiline';
|
|
3535
3983
|
addExtraSpaceOnTop?: boolean;
|
|
3536
3984
|
/**
|
|
3537
|
-
* 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
|
|
3538
3986
|
*/
|
|
3539
3987
|
loop?: boolean;
|
|
3540
3988
|
}
|
|
@@ -3632,6 +4080,10 @@ declare namespace monaco.editor {
|
|
|
3632
4080
|
* The width of the glyph margin.
|
|
3633
4081
|
*/
|
|
3634
4082
|
readonly glyphMarginWidth: number;
|
|
4083
|
+
/**
|
|
4084
|
+
* The number of decoration lanes to render in the glyph margin.
|
|
4085
|
+
*/
|
|
4086
|
+
readonly glyphMarginDecorationLaneCount: number;
|
|
3635
4087
|
/**
|
|
3636
4088
|
* Left position for the line numbers.
|
|
3637
4089
|
*/
|
|
@@ -3709,6 +4161,21 @@ declare namespace monaco.editor {
|
|
|
3709
4161
|
enabled?: boolean;
|
|
3710
4162
|
}
|
|
3711
4163
|
|
|
4164
|
+
export interface IEditorStickyScrollOptions {
|
|
4165
|
+
/**
|
|
4166
|
+
* Enable the sticky scroll
|
|
4167
|
+
*/
|
|
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';
|
|
4177
|
+
}
|
|
4178
|
+
|
|
3712
4179
|
/**
|
|
3713
4180
|
* Configuration options for editor inlayHints
|
|
3714
4181
|
*/
|
|
@@ -3717,7 +4184,7 @@ declare namespace monaco.editor {
|
|
|
3717
4184
|
* Enable the inline hints.
|
|
3718
4185
|
* Defaults to true.
|
|
3719
4186
|
*/
|
|
3720
|
-
enabled?:
|
|
4187
|
+
enabled?: 'on' | 'off' | 'offUnlessPressed' | 'onUnlessPressed';
|
|
3721
4188
|
/**
|
|
3722
4189
|
* Font size of inline hints.
|
|
3723
4190
|
* Default to 90% of the editor font size.
|
|
@@ -3728,6 +4195,11 @@ declare namespace monaco.editor {
|
|
|
3728
4195
|
* Defaults to editor font family.
|
|
3729
4196
|
*/
|
|
3730
4197
|
fontFamily?: string;
|
|
4198
|
+
/**
|
|
4199
|
+
* Enables the padding around the inlay hint.
|
|
4200
|
+
* Defaults to false.
|
|
4201
|
+
*/
|
|
4202
|
+
padding?: boolean;
|
|
3731
4203
|
}
|
|
3732
4204
|
|
|
3733
4205
|
/**
|
|
@@ -3739,6 +4211,10 @@ declare namespace monaco.editor {
|
|
|
3739
4211
|
* Defaults to true.
|
|
3740
4212
|
*/
|
|
3741
4213
|
enabled?: boolean;
|
|
4214
|
+
/**
|
|
4215
|
+
* Control the rendering of minimap.
|
|
4216
|
+
*/
|
|
4217
|
+
autohide?: boolean;
|
|
3742
4218
|
/**
|
|
3743
4219
|
* Control the side of the minimap in editor.
|
|
3744
4220
|
* Defaults to 'right'.
|
|
@@ -3800,13 +4276,21 @@ declare namespace monaco.editor {
|
|
|
3800
4276
|
cycle?: boolean;
|
|
3801
4277
|
}
|
|
3802
4278
|
|
|
4279
|
+
export type QuickSuggestionsValue = 'on' | 'inline' | 'off';
|
|
4280
|
+
|
|
3803
4281
|
/**
|
|
3804
4282
|
* Configuration options for quick suggestions
|
|
3805
4283
|
*/
|
|
3806
4284
|
export interface IQuickSuggestionsOptions {
|
|
3807
|
-
other?: boolean;
|
|
3808
|
-
comments?: boolean;
|
|
3809
|
-
strings?: boolean;
|
|
4285
|
+
other?: boolean | QuickSuggestionsValue;
|
|
4286
|
+
comments?: boolean | QuickSuggestionsValue;
|
|
4287
|
+
strings?: boolean | QuickSuggestionsValue;
|
|
4288
|
+
}
|
|
4289
|
+
|
|
4290
|
+
export interface InternalQuickSuggestionsOptions {
|
|
4291
|
+
readonly other: QuickSuggestionsValue;
|
|
4292
|
+
readonly comments: QuickSuggestionsValue;
|
|
4293
|
+
readonly strings: QuickSuggestionsValue;
|
|
3810
4294
|
}
|
|
3811
4295
|
|
|
3812
4296
|
export type LineNumbersType = 'on' | 'off' | 'relative' | 'interval' | ((lineNumber: number) => string);
|
|
@@ -3972,6 +4456,12 @@ declare namespace monaco.editor {
|
|
|
3972
4456
|
* Defaults to `prefix`.
|
|
3973
4457
|
*/
|
|
3974
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;
|
|
3975
4465
|
}
|
|
3976
4466
|
|
|
3977
4467
|
export interface IBracketPairColorizationOptions {
|
|
@@ -3979,6 +4469,10 @@ declare namespace monaco.editor {
|
|
|
3979
4469
|
* Enable or disable bracket pair colorization.
|
|
3980
4470
|
*/
|
|
3981
4471
|
enabled?: boolean;
|
|
4472
|
+
/**
|
|
4473
|
+
* Use independent color pool per bracket type.
|
|
4474
|
+
*/
|
|
4475
|
+
independentColorPoolPerBracketType?: boolean;
|
|
3982
4476
|
}
|
|
3983
4477
|
|
|
3984
4478
|
export interface IGuidesOptions {
|
|
@@ -4006,7 +4500,7 @@ declare namespace monaco.editor {
|
|
|
4006
4500
|
* Enable highlighting of the active indent guide.
|
|
4007
4501
|
* Defaults to true.
|
|
4008
4502
|
*/
|
|
4009
|
-
highlightActiveIndentation?: boolean;
|
|
4503
|
+
highlightActiveIndentation?: boolean | 'always';
|
|
4010
4504
|
}
|
|
4011
4505
|
|
|
4012
4506
|
/**
|
|
@@ -4033,6 +4527,10 @@ declare namespace monaco.editor {
|
|
|
4033
4527
|
* Enable using global storage for remembering suggestions.
|
|
4034
4528
|
*/
|
|
4035
4529
|
shareSuggestSelections?: boolean;
|
|
4530
|
+
/**
|
|
4531
|
+
* Select suggestions when triggered via quick suggest or trigger characters
|
|
4532
|
+
*/
|
|
4533
|
+
selectionMode?: 'always' | 'never' | 'whenTriggerCharacter' | 'whenQuickSuggestion';
|
|
4036
4534
|
/**
|
|
4037
4535
|
* Enable or disable icons in suggestions. Defaults to true.
|
|
4038
4536
|
*/
|
|
@@ -4069,6 +4567,10 @@ declare namespace monaco.editor {
|
|
|
4069
4567
|
* Show deprecated-suggestions.
|
|
4070
4568
|
*/
|
|
4071
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;
|
|
4072
4574
|
/**
|
|
4073
4575
|
* Show field-suggestions.
|
|
4074
4576
|
*/
|
|
@@ -4200,6 +4702,22 @@ declare namespace monaco.editor {
|
|
|
4200
4702
|
readonly wrappingColumn: number;
|
|
4201
4703
|
}
|
|
4202
4704
|
|
|
4705
|
+
/**
|
|
4706
|
+
* Configuration options for editor drop into behavior
|
|
4707
|
+
*/
|
|
4708
|
+
export interface IDropIntoEditorOptions {
|
|
4709
|
+
/**
|
|
4710
|
+
* Enable dropping into editor.
|
|
4711
|
+
* Defaults to true.
|
|
4712
|
+
*/
|
|
4713
|
+
enabled?: boolean;
|
|
4714
|
+
/**
|
|
4715
|
+
* Controls if a widget is shown after a drop.
|
|
4716
|
+
* Defaults to 'afterDrop'.
|
|
4717
|
+
*/
|
|
4718
|
+
showDropSelector?: 'afterDrop' | 'never';
|
|
4719
|
+
}
|
|
4720
|
+
|
|
4203
4721
|
export enum EditorOption {
|
|
4204
4722
|
acceptSuggestionOnCommitCharacter = 0,
|
|
4205
4723
|
acceptSuggestionOnEnter = 1,
|
|
@@ -4207,133 +4725,142 @@ declare namespace monaco.editor {
|
|
|
4207
4725
|
accessibilityPageSize = 3,
|
|
4208
4726
|
ariaLabel = 4,
|
|
4209
4727
|
autoClosingBrackets = 5,
|
|
4210
|
-
|
|
4211
|
-
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4216
|
-
|
|
4217
|
-
|
|
4218
|
-
|
|
4219
|
-
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
|
|
4225
|
-
|
|
4226
|
-
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4245
|
-
|
|
4246
|
-
|
|
4247
|
-
|
|
4248
|
-
|
|
4249
|
-
|
|
4250
|
-
|
|
4251
|
-
|
|
4252
|
-
|
|
4253
|
-
|
|
4254
|
-
|
|
4255
|
-
|
|
4256
|
-
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
|
|
4262
|
-
|
|
4263
|
-
|
|
4264
|
-
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
|
|
4286
|
-
|
|
4287
|
-
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
|
|
4291
|
-
|
|
4292
|
-
|
|
4293
|
-
|
|
4294
|
-
|
|
4295
|
-
|
|
4296
|
-
|
|
4297
|
-
|
|
4298
|
-
|
|
4299
|
-
|
|
4300
|
-
|
|
4301
|
-
|
|
4302
|
-
|
|
4303
|
-
|
|
4304
|
-
|
|
4305
|
-
|
|
4306
|
-
|
|
4307
|
-
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
-
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
|
|
4316
|
-
|
|
4317
|
-
|
|
4318
|
-
|
|
4319
|
-
|
|
4320
|
-
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
|
|
4326
|
-
|
|
4327
|
-
|
|
4328
|
-
|
|
4329
|
-
|
|
4330
|
-
|
|
4331
|
-
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
|
|
4336
|
-
|
|
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
|
|
4337
4864
|
}
|
|
4338
4865
|
|
|
4339
4866
|
export const EditorOptions: {
|
|
@@ -4342,6 +4869,7 @@ declare namespace monaco.editor {
|
|
|
4342
4869
|
accessibilitySupport: IEditorOption<EditorOption.accessibilitySupport, AccessibilitySupport>;
|
|
4343
4870
|
accessibilityPageSize: IEditorOption<EditorOption.accessibilityPageSize, number>;
|
|
4344
4871
|
ariaLabel: IEditorOption<EditorOption.ariaLabel, string>;
|
|
4872
|
+
screenReaderAnnounceInlineSuggestion: IEditorOption<EditorOption.screenReaderAnnounceInlineSuggestion, boolean>;
|
|
4345
4873
|
autoClosingBrackets: IEditorOption<EditorOption.autoClosingBrackets, 'always' | 'languageDefined' | 'beforeWhitespace' | 'never'>;
|
|
4346
4874
|
autoClosingDelete: IEditorOption<EditorOption.autoClosingDelete, 'always' | 'never' | 'auto'>;
|
|
4347
4875
|
autoClosingOvertype: IEditorOption<EditorOption.autoClosingOvertype, 'always' | 'never' | 'auto'>;
|
|
@@ -4356,12 +4884,13 @@ declare namespace monaco.editor {
|
|
|
4356
4884
|
codeLensFontFamily: IEditorOption<EditorOption.codeLensFontFamily, string>;
|
|
4357
4885
|
codeLensFontSize: IEditorOption<EditorOption.codeLensFontSize, number>;
|
|
4358
4886
|
colorDecorators: IEditorOption<EditorOption.colorDecorators, boolean>;
|
|
4887
|
+
colorDecoratorsLimit: IEditorOption<EditorOption.colorDecoratorsLimit, number>;
|
|
4359
4888
|
columnSelection: IEditorOption<EditorOption.columnSelection, boolean>;
|
|
4360
4889
|
comments: IEditorOption<EditorOption.comments, Readonly<Required<IEditorCommentsOptions>>>;
|
|
4361
4890
|
contextmenu: IEditorOption<EditorOption.contextmenu, boolean>;
|
|
4362
4891
|
copyWithSyntaxHighlighting: IEditorOption<EditorOption.copyWithSyntaxHighlighting, boolean>;
|
|
4363
4892
|
cursorBlinking: IEditorOption<EditorOption.cursorBlinking, TextEditorCursorBlinkingStyle>;
|
|
4364
|
-
cursorSmoothCaretAnimation: IEditorOption<EditorOption.cursorSmoothCaretAnimation,
|
|
4893
|
+
cursorSmoothCaretAnimation: IEditorOption<EditorOption.cursorSmoothCaretAnimation, 'on' | 'off' | 'explicit'>;
|
|
4365
4894
|
cursorStyle: IEditorOption<EditorOption.cursorStyle, TextEditorCursorStyle>;
|
|
4366
4895
|
cursorSurroundingLines: IEditorOption<EditorOption.cursorSurroundingLines, number>;
|
|
4367
4896
|
cursorSurroundingLinesStyle: IEditorOption<EditorOption.cursorSurroundingLinesStyle, 'default' | 'all'>;
|
|
@@ -4371,6 +4900,9 @@ declare namespace monaco.editor {
|
|
|
4371
4900
|
domReadOnly: IEditorOption<EditorOption.domReadOnly, boolean>;
|
|
4372
4901
|
dragAndDrop: IEditorOption<EditorOption.dragAndDrop, boolean>;
|
|
4373
4902
|
emptySelectionClipboard: IEditorOption<EditorOption.emptySelectionClipboard, boolean>;
|
|
4903
|
+
dropIntoEditor: IEditorOption<EditorOption.dropIntoEditor, Readonly<Required<IDropIntoEditorOptions>>>;
|
|
4904
|
+
stickyScroll: IEditorOption<EditorOption.stickyScroll, Readonly<Required<IEditorStickyScrollOptions>>>;
|
|
4905
|
+
experimentalWhitespaceRendering: IEditorOption<EditorOption.experimentalWhitespaceRendering, 'off' | 'svg' | 'font'>;
|
|
4374
4906
|
extraEditorClassName: IEditorOption<EditorOption.extraEditorClassName, string>;
|
|
4375
4907
|
fastScrollSensitivity: IEditorOption<EditorOption.fastScrollSensitivity, number>;
|
|
4376
4908
|
find: IEditorOption<EditorOption.find, Readonly<Required<IEditorFindOptions>>>;
|
|
@@ -4386,6 +4918,7 @@ declare namespace monaco.editor {
|
|
|
4386
4918
|
fontLigatures2: IEditorOption<EditorOption.fontLigatures, string>;
|
|
4387
4919
|
fontSize: IEditorOption<EditorOption.fontSize, number>;
|
|
4388
4920
|
fontWeight: IEditorOption<EditorOption.fontWeight, string>;
|
|
4921
|
+
fontVariations: IEditorOption<EditorOption.fontVariations, string>;
|
|
4389
4922
|
formatOnPaste: IEditorOption<EditorOption.formatOnPaste, boolean>;
|
|
4390
4923
|
formatOnType: IEditorOption<EditorOption.formatOnType, boolean>;
|
|
4391
4924
|
glyphMargin: IEditorOption<EditorOption.glyphMargin, boolean>;
|
|
@@ -4395,7 +4928,7 @@ declare namespace monaco.editor {
|
|
|
4395
4928
|
inDiffEditor: IEditorOption<EditorOption.inDiffEditor, boolean>;
|
|
4396
4929
|
letterSpacing: IEditorOption<EditorOption.letterSpacing, number>;
|
|
4397
4930
|
lightbulb: IEditorOption<EditorOption.lightbulb, Readonly<Required<IEditorLightbulbOptions>>>;
|
|
4398
|
-
lineDecorationsWidth: IEditorOption<EditorOption.lineDecorationsWidth,
|
|
4931
|
+
lineDecorationsWidth: IEditorOption<EditorOption.lineDecorationsWidth, number>;
|
|
4399
4932
|
lineHeight: IEditorOption<EditorOption.lineHeight, number>;
|
|
4400
4933
|
lineNumbers: IEditorOption<EditorOption.lineNumbers, InternalEditorRenderLineNumbersOptions>;
|
|
4401
4934
|
lineNumbersMinChars: IEditorOption<EditorOption.lineNumbersMinChars, number>;
|
|
@@ -4409,6 +4942,7 @@ declare namespace monaco.editor {
|
|
|
4409
4942
|
multiCursorMergeOverlapping: IEditorOption<EditorOption.multiCursorMergeOverlapping, boolean>;
|
|
4410
4943
|
multiCursorModifier: IEditorOption<EditorOption.multiCursorModifier, 'altKey' | 'metaKey' | 'ctrlKey'>;
|
|
4411
4944
|
multiCursorPaste: IEditorOption<EditorOption.multiCursorPaste, 'spread' | 'full'>;
|
|
4945
|
+
multiCursorLimit: IEditorOption<EditorOption.multiCursorLimit, number>;
|
|
4412
4946
|
occurrencesHighlight: IEditorOption<EditorOption.occurrencesHighlight, boolean>;
|
|
4413
4947
|
overviewRulerBorder: IEditorOption<EditorOption.overviewRulerBorder, boolean>;
|
|
4414
4948
|
overviewRulerLanes: IEditorOption<EditorOption.overviewRulerLanes, number>;
|
|
@@ -4416,12 +4950,12 @@ declare namespace monaco.editor {
|
|
|
4416
4950
|
parameterHints: IEditorOption<EditorOption.parameterHints, Readonly<Required<IEditorParameterHintOptions>>>;
|
|
4417
4951
|
peekWidgetDefaultFocus: IEditorOption<EditorOption.peekWidgetDefaultFocus, 'tree' | 'editor'>;
|
|
4418
4952
|
definitionLinkOpensInPeek: IEditorOption<EditorOption.definitionLinkOpensInPeek, boolean>;
|
|
4419
|
-
quickSuggestions: IEditorOption<EditorOption.quickSuggestions,
|
|
4953
|
+
quickSuggestions: IEditorOption<EditorOption.quickSuggestions, InternalQuickSuggestionsOptions>;
|
|
4420
4954
|
quickSuggestionsDelay: IEditorOption<EditorOption.quickSuggestionsDelay, number>;
|
|
4421
4955
|
readOnly: IEditorOption<EditorOption.readOnly, boolean>;
|
|
4422
4956
|
renameOnType: IEditorOption<EditorOption.renameOnType, boolean>;
|
|
4423
4957
|
renderControlCharacters: IEditorOption<EditorOption.renderControlCharacters, boolean>;
|
|
4424
|
-
renderFinalNewline: IEditorOption<EditorOption.renderFinalNewline,
|
|
4958
|
+
renderFinalNewline: IEditorOption<EditorOption.renderFinalNewline, 'on' | 'off' | 'dimmed'>;
|
|
4425
4959
|
renderLineHighlight: IEditorOption<EditorOption.renderLineHighlight, 'all' | 'line' | 'none' | 'gutter'>;
|
|
4426
4960
|
renderLineHighlightOnlyWhenFocus: IEditorOption<EditorOption.renderLineHighlightOnlyWhenFocus, boolean>;
|
|
4427
4961
|
renderValidationDecorations: IEditorOption<EditorOption.renderValidationDecorations, 'on' | 'off' | 'editable'>;
|
|
@@ -4436,7 +4970,7 @@ declare namespace monaco.editor {
|
|
|
4436
4970
|
selectionClipboard: IEditorOption<EditorOption.selectionClipboard, boolean>;
|
|
4437
4971
|
selectionHighlight: IEditorOption<EditorOption.selectionHighlight, boolean>;
|
|
4438
4972
|
selectOnLineNumbers: IEditorOption<EditorOption.selectOnLineNumbers, boolean>;
|
|
4439
|
-
showFoldingControls: IEditorOption<EditorOption.showFoldingControls, 'always' | 'mouseover'>;
|
|
4973
|
+
showFoldingControls: IEditorOption<EditorOption.showFoldingControls, 'always' | 'never' | 'mouseover'>;
|
|
4440
4974
|
showUnused: IEditorOption<EditorOption.showUnused, boolean>;
|
|
4441
4975
|
showDeprecated: IEditorOption<EditorOption.showDeprecated, boolean>;
|
|
4442
4976
|
inlayHints: IEditorOption<EditorOption.inlayHints, Readonly<Required<IEditorInlayHintsOptions>>>;
|
|
@@ -4452,10 +4986,11 @@ declare namespace monaco.editor {
|
|
|
4452
4986
|
suggestSelection: IEditorOption<EditorOption.suggestSelection, 'first' | 'recentlyUsed' | 'recentlyUsedByPrefix'>;
|
|
4453
4987
|
tabCompletion: IEditorOption<EditorOption.tabCompletion, 'on' | 'off' | 'onlySnippets'>;
|
|
4454
4988
|
tabIndex: IEditorOption<EditorOption.tabIndex, number>;
|
|
4455
|
-
unicodeHighlight: IEditorOption<EditorOption.unicodeHighlighting,
|
|
4989
|
+
unicodeHighlight: IEditorOption<EditorOption.unicodeHighlighting, any>;
|
|
4456
4990
|
unusualLineTerminators: IEditorOption<EditorOption.unusualLineTerminators, 'auto' | 'off' | 'prompt'>;
|
|
4457
4991
|
useShadowDOM: IEditorOption<EditorOption.useShadowDOM, boolean>;
|
|
4458
4992
|
useTabStops: IEditorOption<EditorOption.useTabStops, boolean>;
|
|
4993
|
+
wordBreak: IEditorOption<EditorOption.wordBreak, 'normal' | 'keepAll'>;
|
|
4459
4994
|
wordSeparators: IEditorOption<EditorOption.wordSeparators, string>;
|
|
4460
4995
|
wordWrap: IEditorOption<EditorOption.wordWrap, 'on' | 'off' | 'wordWrapColumn' | 'bounded'>;
|
|
4461
4996
|
wordWrapBreakAfterCharacters: IEditorOption<EditorOption.wordWrapBreakAfterCharacters, string>;
|
|
@@ -4463,13 +4998,14 @@ declare namespace monaco.editor {
|
|
|
4463
4998
|
wordWrapColumn: IEditorOption<EditorOption.wordWrapColumn, number>;
|
|
4464
4999
|
wordWrapOverride1: IEditorOption<EditorOption.wordWrapOverride1, 'on' | 'off' | 'inherit'>;
|
|
4465
5000
|
wordWrapOverride2: IEditorOption<EditorOption.wordWrapOverride2, 'on' | 'off' | 'inherit'>;
|
|
4466
|
-
wrappingIndent: IEditorOption<EditorOption.wrappingIndent, WrappingIndent>;
|
|
4467
|
-
wrappingStrategy: IEditorOption<EditorOption.wrappingStrategy, 'simple' | 'advanced'>;
|
|
4468
5001
|
editorClassName: IEditorOption<EditorOption.editorClassName, string>;
|
|
5002
|
+
defaultColorDecorators: IEditorOption<EditorOption.defaultColorDecorators, boolean>;
|
|
4469
5003
|
pixelRatio: IEditorOption<EditorOption.pixelRatio, number>;
|
|
4470
5004
|
tabFocusMode: IEditorOption<EditorOption.tabFocusMode, boolean>;
|
|
4471
5005
|
layoutInfo: IEditorOption<EditorOption.layoutInfo, EditorLayoutInfo>;
|
|
4472
5006
|
wrappingInfo: IEditorOption<EditorOption.wrappingInfo, EditorWrappingInfo>;
|
|
5007
|
+
wrappingIndent: IEditorOption<EditorOption.wrappingIndent, WrappingIndent>;
|
|
5008
|
+
wrappingStrategy: IEditorOption<EditorOption.wrappingStrategy, 'simple' | 'advanced'>;
|
|
4473
5009
|
};
|
|
4474
5010
|
|
|
4475
5011
|
type EditorOptionsType = typeof EditorOptions;
|
|
@@ -4514,6 +5050,15 @@ declare namespace monaco.editor {
|
|
|
4514
5050
|
* If the `afterColumn` has multiple view columns, the affinity specifies which one to use. Defaults to `none`.
|
|
4515
5051
|
*/
|
|
4516
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;
|
|
4517
5062
|
/**
|
|
4518
5063
|
* Suppress mouse down events.
|
|
4519
5064
|
* If set, the editor will attach a mouse down listener to the view zone and .preventDefault on it.
|
|
@@ -4600,19 +5145,33 @@ declare namespace monaco.editor {
|
|
|
4600
5145
|
*/
|
|
4601
5146
|
export interface IContentWidgetPosition {
|
|
4602
5147
|
/**
|
|
4603
|
-
* Desired position for the content widget.
|
|
4604
|
-
*
|
|
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
|
|
4605
5157
|
*/
|
|
4606
5158
|
position: IPosition | null;
|
|
4607
5159
|
/**
|
|
4608
|
-
* Optionally, a
|
|
4609
|
-
*
|
|
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.
|
|
4610
5164
|
*/
|
|
4611
|
-
|
|
5165
|
+
secondaryPosition?: IPosition | null;
|
|
4612
5166
|
/**
|
|
4613
5167
|
* Placement preference for position, in order of preference.
|
|
4614
5168
|
*/
|
|
4615
5169
|
preference: ContentWidgetPositionPreference[];
|
|
5170
|
+
/**
|
|
5171
|
+
* Placement preference when multiple view positions refer to the same (model) position.
|
|
5172
|
+
* This plays a role when injected text is involved.
|
|
5173
|
+
*/
|
|
5174
|
+
positionAffinity?: PositionAffinity;
|
|
4616
5175
|
}
|
|
4617
5176
|
|
|
4618
5177
|
/**
|
|
@@ -4871,6 +5430,8 @@ declare namespace monaco.editor {
|
|
|
4871
5430
|
|
|
4872
5431
|
export interface IMouseTargetOutsideEditor extends IBaseMouseTarget {
|
|
4873
5432
|
readonly type: MouseTargetType.OUTSIDE_EDITOR;
|
|
5433
|
+
readonly outsidePosition: 'above' | 'below' | 'left' | 'right';
|
|
5434
|
+
readonly outsideDistance: number;
|
|
4874
5435
|
}
|
|
4875
5436
|
|
|
4876
5437
|
/**
|
|
@@ -5073,7 +5634,7 @@ declare namespace monaco.editor {
|
|
|
5073
5634
|
/**
|
|
5074
5635
|
* Restores the view state of the editor from a serializable object generated by `saveViewState`.
|
|
5075
5636
|
*/
|
|
5076
|
-
restoreViewState(state: ICodeEditorViewState): void;
|
|
5637
|
+
restoreViewState(state: ICodeEditorViewState | null): void;
|
|
5077
5638
|
/**
|
|
5078
5639
|
* Returns true if the text inside this editor or an editor widget has focus.
|
|
5079
5640
|
*/
|
|
@@ -5160,12 +5721,16 @@ declare namespace monaco.editor {
|
|
|
5160
5721
|
* Change the scroll position of the editor's viewport.
|
|
5161
5722
|
*/
|
|
5162
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;
|
|
5163
5728
|
/**
|
|
5164
5729
|
* Get an action that is a contribution to this editor.
|
|
5165
5730
|
* @id Unique identifier of the contribution.
|
|
5166
5731
|
* @return The action or null if action not found.
|
|
5167
5732
|
*/
|
|
5168
|
-
getAction(id: string): IEditorAction;
|
|
5733
|
+
getAction(id: string): IEditorAction | null;
|
|
5169
5734
|
/**
|
|
5170
5735
|
* Execute a command on the editor.
|
|
5171
5736
|
* The edits will land on the undo-redo stack, but no "undo stop" will be pushed.
|
|
@@ -5205,9 +5770,14 @@ declare namespace monaco.editor {
|
|
|
5205
5770
|
getDecorationsInRange(range: Range): IModelDecoration[] | null;
|
|
5206
5771
|
/**
|
|
5207
5772
|
* All decorations added through this call will get the ownerId of this editor.
|
|
5208
|
-
* @
|
|
5773
|
+
* @deprecated Use `createDecorationsCollection`
|
|
5774
|
+
* @see createDecorationsCollection
|
|
5209
5775
|
*/
|
|
5210
5776
|
deltaDecorations(oldDecorations: string[], newDecorations: IModelDeltaDecoration[]): string[];
|
|
5777
|
+
/**
|
|
5778
|
+
* Remove previously added decorations.
|
|
5779
|
+
*/
|
|
5780
|
+
removeDecorations(decorationIds: string[]): void;
|
|
5211
5781
|
/**
|
|
5212
5782
|
* Get the layout info for the editor.
|
|
5213
5783
|
*/
|
|
@@ -5218,13 +5788,21 @@ declare namespace monaco.editor {
|
|
|
5218
5788
|
*/
|
|
5219
5789
|
getVisibleRanges(): Range[];
|
|
5220
5790
|
/**
|
|
5221
|
-
* Get the vertical position (top offset) for the line w.r.t. to the first line.
|
|
5791
|
+
* Get the vertical position (top offset) for the line's top w.r.t. to the first line.
|
|
5222
5792
|
*/
|
|
5223
5793
|
getTopForLineNumber(lineNumber: number): number;
|
|
5794
|
+
/**
|
|
5795
|
+
* Get the vertical position (top offset) for the line's bottom w.r.t. to the first line.
|
|
5796
|
+
*/
|
|
5797
|
+
getBottomForLineNumber(lineNumber: number): number;
|
|
5224
5798
|
/**
|
|
5225
5799
|
* Get the vertical position (top offset) for the position w.r.t. to the first line.
|
|
5226
5800
|
*/
|
|
5227
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;
|
|
5228
5806
|
/**
|
|
5229
5807
|
* Returns the editor's container dom node
|
|
5230
5808
|
*/
|
|
@@ -5319,6 +5897,11 @@ declare namespace monaco.editor {
|
|
|
5319
5897
|
* @event
|
|
5320
5898
|
*/
|
|
5321
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>;
|
|
5322
5905
|
/**
|
|
5323
5906
|
* Saves current view state of the editor in a serializable object.
|
|
5324
5907
|
*/
|
|
@@ -5326,7 +5909,7 @@ declare namespace monaco.editor {
|
|
|
5326
5909
|
/**
|
|
5327
5910
|
* Restores the view state of the editor from a serializable object generated by `saveViewState`.
|
|
5328
5911
|
*/
|
|
5329
|
-
restoreViewState(state: IDiffEditorViewState): void;
|
|
5912
|
+
restoreViewState(state: IDiffEditorViewState | null): void;
|
|
5330
5913
|
/**
|
|
5331
5914
|
* Type the getModel() of IEditor.
|
|
5332
5915
|
*/
|
|
@@ -5389,10 +5972,19 @@ declare namespace monaco.editor {
|
|
|
5389
5972
|
readonly fontWeight: string;
|
|
5390
5973
|
readonly fontSize: number;
|
|
5391
5974
|
readonly fontFeatureSettings: string;
|
|
5975
|
+
readonly fontVariationSettings: string;
|
|
5392
5976
|
readonly lineHeight: number;
|
|
5393
5977
|
readonly letterSpacing: number;
|
|
5394
5978
|
}
|
|
5395
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
|
+
|
|
5396
5988
|
//compatibility:
|
|
5397
5989
|
export type IReadOnlyModel = ITextModel;
|
|
5398
5990
|
export type IModel = ITextModel;
|
|
@@ -5400,7 +5992,6 @@ declare namespace monaco.editor {
|
|
|
5400
5992
|
|
|
5401
5993
|
declare namespace monaco.languages {
|
|
5402
5994
|
|
|
5403
|
-
|
|
5404
5995
|
export interface IRelativePattern {
|
|
5405
5996
|
/**
|
|
5406
5997
|
* A base file path to which this pattern will be matched against relatively.
|
|
@@ -5428,6 +6019,10 @@ declare namespace monaco.languages {
|
|
|
5428
6019
|
*/
|
|
5429
6020
|
readonly hasAccessToAllModels?: boolean;
|
|
5430
6021
|
readonly exclusive?: boolean;
|
|
6022
|
+
/**
|
|
6023
|
+
* This provider comes from a builtin extension.
|
|
6024
|
+
*/
|
|
6025
|
+
readonly isBuiltin?: boolean;
|
|
5431
6026
|
}
|
|
5432
6027
|
|
|
5433
6028
|
/**
|
|
@@ -5443,11 +6038,18 @@ declare namespace monaco.languages {
|
|
|
5443
6038
|
export function getEncodedLanguageId(languageId: string): number;
|
|
5444
6039
|
|
|
5445
6040
|
/**
|
|
5446
|
-
* An event emitted when a language is
|
|
6041
|
+
* An event emitted when a language is associated for the first time with a text model.
|
|
5447
6042
|
* @event
|
|
5448
6043
|
*/
|
|
5449
6044
|
export function onLanguage(languageId: string, callback: () => void): IDisposable;
|
|
5450
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
|
+
|
|
5451
6053
|
/**
|
|
5452
6054
|
* Set the editing configuration for a language.
|
|
5453
6055
|
*/
|
|
@@ -5722,6 +6324,10 @@ declare namespace monaco.languages {
|
|
|
5722
6324
|
* Requested kind of actions to return.
|
|
5723
6325
|
*/
|
|
5724
6326
|
readonly only?: string;
|
|
6327
|
+
/**
|
|
6328
|
+
* The reason why code actions were requested.
|
|
6329
|
+
*/
|
|
6330
|
+
readonly trigger: CodeActionTriggerType;
|
|
5725
6331
|
}
|
|
5726
6332
|
|
|
5727
6333
|
/**
|
|
@@ -5752,6 +6358,10 @@ declare namespace monaco.languages {
|
|
|
5752
6358
|
* such as `["quickfix.removeLine", "source.fixAll" ...]`.
|
|
5753
6359
|
*/
|
|
5754
6360
|
readonly providedCodeActionKinds?: readonly string[];
|
|
6361
|
+
readonly documentation?: ReadonlyArray<{
|
|
6362
|
+
readonly kind: string;
|
|
6363
|
+
readonly command: Command;
|
|
6364
|
+
}>;
|
|
5755
6365
|
}
|
|
5756
6366
|
|
|
5757
6367
|
/**
|
|
@@ -6067,6 +6677,7 @@ declare namespace monaco.languages {
|
|
|
6067
6677
|
}
|
|
6068
6678
|
|
|
6069
6679
|
export enum CompletionItemInsertTextRule {
|
|
6680
|
+
None = 0,
|
|
6070
6681
|
/**
|
|
6071
6682
|
* Adjust whitespace/indentation of multiline insert texts to
|
|
6072
6683
|
* match the current line indentation.
|
|
@@ -6251,11 +6862,13 @@ declare namespace monaco.languages {
|
|
|
6251
6862
|
readonly selectedSuggestionInfo: SelectedSuggestionInfo | undefined;
|
|
6252
6863
|
}
|
|
6253
6864
|
|
|
6254
|
-
export
|
|
6255
|
-
range: IRange;
|
|
6256
|
-
text: string;
|
|
6257
|
-
|
|
6258
|
-
|
|
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;
|
|
6259
6872
|
}
|
|
6260
6873
|
|
|
6261
6874
|
export interface InlineCompletion {
|
|
@@ -6263,8 +6876,24 @@ declare namespace monaco.languages {
|
|
|
6263
6876
|
* The text to insert.
|
|
6264
6877
|
* If the text contains a line break, the range must end at the end of a line.
|
|
6265
6878
|
* If existing text should be replaced, the existing text must be a prefix of the text to insert.
|
|
6879
|
+
*
|
|
6880
|
+
* The text can also be a snippet. In that case, a preview with default parameters is shown.
|
|
6881
|
+
* When accepting the suggestion, the full snippet is inserted.
|
|
6266
6882
|
*/
|
|
6267
|
-
readonly
|
|
6883
|
+
readonly insertText: string | {
|
|
6884
|
+
snippet: string;
|
|
6885
|
+
};
|
|
6886
|
+
/**
|
|
6887
|
+
* A text that is used to decide if this inline completion should be shown.
|
|
6888
|
+
* An inline completion is shown if the text to replace is a subword of the filter text.
|
|
6889
|
+
*/
|
|
6890
|
+
readonly filterText?: string;
|
|
6891
|
+
/**
|
|
6892
|
+
* An optional array of additional text edits that are applied when
|
|
6893
|
+
* selecting this completion. Edits must not overlap with the main edit
|
|
6894
|
+
* nor with themselves.
|
|
6895
|
+
*/
|
|
6896
|
+
readonly additionalTextEdits?: editor.ISingleEditOperation[];
|
|
6268
6897
|
/**
|
|
6269
6898
|
* The range to replace.
|
|
6270
6899
|
* Must begin and end on the same line.
|
|
@@ -6280,14 +6909,28 @@ declare namespace monaco.languages {
|
|
|
6280
6909
|
|
|
6281
6910
|
export interface InlineCompletions<TItem extends InlineCompletion = InlineCompletion> {
|
|
6282
6911
|
readonly items: readonly TItem[];
|
|
6912
|
+
/**
|
|
6913
|
+
* A list of commands associated with the inline completions of this list.
|
|
6914
|
+
*/
|
|
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;
|
|
6283
6921
|
}
|
|
6284
6922
|
|
|
6285
6923
|
export interface InlineCompletionsProvider<T extends InlineCompletions = InlineCompletions> {
|
|
6286
6924
|
provideInlineCompletions(model: editor.ITextModel, position: Position, context: InlineCompletionContext, token: CancellationToken): ProviderResult<T>;
|
|
6287
6925
|
/**
|
|
6288
6926
|
* Will be called when an item is shown.
|
|
6927
|
+
* @param updatedInsertText Is useful to understand bracket completion.
|
|
6289
6928
|
*/
|
|
6290
|
-
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;
|
|
6291
6934
|
/**
|
|
6292
6935
|
* Will be called when a completions list is no longer in use and can be garbage-collected.
|
|
6293
6936
|
*/
|
|
@@ -6304,6 +6947,11 @@ declare namespace monaco.languages {
|
|
|
6304
6947
|
disabled?: string;
|
|
6305
6948
|
}
|
|
6306
6949
|
|
|
6950
|
+
export enum CodeActionTriggerType {
|
|
6951
|
+
Invoke = 1,
|
|
6952
|
+
Auto = 2
|
|
6953
|
+
}
|
|
6954
|
+
|
|
6307
6955
|
export interface CodeActionList extends IDisposable {
|
|
6308
6956
|
readonly actions: ReadonlyArray<CodeAction>;
|
|
6309
6957
|
}
|
|
@@ -6640,11 +7288,11 @@ declare namespace monaco.languages {
|
|
|
6640
7288
|
provideDocumentSymbols(model: editor.ITextModel, token: CancellationToken): ProviderResult<DocumentSymbol[]>;
|
|
6641
7289
|
}
|
|
6642
7290
|
|
|
6643
|
-
export
|
|
7291
|
+
export interface TextEdit {
|
|
6644
7292
|
range: IRange;
|
|
6645
7293
|
text: string;
|
|
6646
7294
|
eol?: editor.EndOfLineSequence;
|
|
6647
|
-
}
|
|
7295
|
+
}
|
|
6648
7296
|
|
|
6649
7297
|
/**
|
|
6650
7298
|
* Interface used to format a model
|
|
@@ -6658,6 +7306,10 @@ declare namespace monaco.languages {
|
|
|
6658
7306
|
* Prefer spaces over tabs.
|
|
6659
7307
|
*/
|
|
6660
7308
|
insertSpaces: boolean;
|
|
7309
|
+
/**
|
|
7310
|
+
* The list of multiple ranges to format at once, if the provider supports it.
|
|
7311
|
+
*/
|
|
7312
|
+
ranges?: Range[];
|
|
6661
7313
|
}
|
|
6662
7314
|
|
|
6663
7315
|
/**
|
|
@@ -6686,6 +7338,7 @@ declare namespace monaco.languages {
|
|
|
6686
7338
|
* of the range to full syntax nodes.
|
|
6687
7339
|
*/
|
|
6688
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[]>;
|
|
6689
7342
|
}
|
|
6690
7343
|
|
|
6691
7344
|
/**
|
|
@@ -6859,6 +7512,12 @@ declare namespace monaco.languages {
|
|
|
6859
7512
|
* The value of the kind is 'region'.
|
|
6860
7513
|
*/
|
|
6861
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;
|
|
6862
7521
|
/**
|
|
6863
7522
|
* Creates a new {@link FoldingRangeKind}.
|
|
6864
7523
|
*
|
|
@@ -6884,22 +7543,24 @@ declare namespace monaco.languages {
|
|
|
6884
7543
|
maxSize?: number;
|
|
6885
7544
|
}
|
|
6886
7545
|
|
|
6887
|
-
export interface
|
|
6888
|
-
|
|
6889
|
-
|
|
7546
|
+
export interface IWorkspaceFileEdit {
|
|
7547
|
+
oldResource?: Uri;
|
|
7548
|
+
newResource?: Uri;
|
|
6890
7549
|
options?: WorkspaceFileEditOptions;
|
|
6891
7550
|
metadata?: WorkspaceEditMetadata;
|
|
6892
7551
|
}
|
|
6893
7552
|
|
|
6894
|
-
export interface
|
|
7553
|
+
export interface IWorkspaceTextEdit {
|
|
6895
7554
|
resource: Uri;
|
|
6896
|
-
|
|
6897
|
-
|
|
7555
|
+
textEdit: TextEdit & {
|
|
7556
|
+
insertAsSnippet?: boolean;
|
|
7557
|
+
};
|
|
7558
|
+
versionId: number | undefined;
|
|
6898
7559
|
metadata?: WorkspaceEditMetadata;
|
|
6899
7560
|
}
|
|
6900
7561
|
|
|
6901
7562
|
export interface WorkspaceEdit {
|
|
6902
|
-
edits: Array<
|
|
7563
|
+
edits: Array<IWorkspaceTextEdit | IWorkspaceFileEdit>;
|
|
6903
7564
|
}
|
|
6904
7565
|
|
|
6905
7566
|
export interface Rejection {
|
|
@@ -6955,7 +7616,7 @@ declare namespace monaco.languages {
|
|
|
6955
7616
|
export interface InlayHint {
|
|
6956
7617
|
label: string | InlayHintLabelPart[];
|
|
6957
7618
|
tooltip?: string | IMarkdownString;
|
|
6958
|
-
|
|
7619
|
+
textEdits?: TextEdit[];
|
|
6959
7620
|
position: IPosition;
|
|
6960
7621
|
kind?: InlayHintKind;
|
|
6961
7622
|
paddingLeft?: boolean;
|
|
@@ -7134,7 +7795,7 @@ declare namespace monaco.languages {
|
|
|
7134
7795
|
log?: string;
|
|
7135
7796
|
}
|
|
7136
7797
|
|
|
7137
|
-
export type IMonarchLanguageAction = IShortMonarchLanguageAction | IExpandedMonarchLanguageAction | IShortMonarchLanguageAction
|
|
7798
|
+
export type IMonarchLanguageAction = IShortMonarchLanguageAction | IExpandedMonarchLanguageAction | (IShortMonarchLanguageAction | IExpandedMonarchLanguageAction)[];
|
|
7138
7799
|
|
|
7139
7800
|
/**
|
|
7140
7801
|
* This interface can be shortened as an array, ie. ['{','}','delimiter.curly']
|
|
@@ -7190,6 +7851,20 @@ declare namespace monaco.worker {
|
|
|
7190
7851
|
*--------------------------------------------------------------------------------------------*/
|
|
7191
7852
|
|
|
7192
7853
|
declare namespace monaco.languages.css {
|
|
7854
|
+
export interface CSSFormatConfiguration {
|
|
7855
|
+
/** separate selectors with newline (e.g. "a,\nbr" or "a, br"): Default: true */
|
|
7856
|
+
newlineBetweenSelectors?: boolean;
|
|
7857
|
+
/** add a new line after every css rule: Default: true */
|
|
7858
|
+
newlineBetweenRules?: boolean;
|
|
7859
|
+
/** ensure space around selector separators: '>', '+', '~' (e.g. "a>b" -> "a > b"): Default: false */
|
|
7860
|
+
spaceAroundSelectorSeparator?: boolean;
|
|
7861
|
+
/** put braces on the same line as rules (`collapse`), or put braces on own line, Allman / ANSI style (`expand`). Default `collapse` */
|
|
7862
|
+
braceStyle?: 'collapse' | 'expand';
|
|
7863
|
+
/** whether existing line breaks before elements should be preserved. Default: true */
|
|
7864
|
+
preserveNewLines?: boolean;
|
|
7865
|
+
/** maximum number of line breaks to be preserved in one chunk. Default: unlimited */
|
|
7866
|
+
maxPreserveNewLines?: number;
|
|
7867
|
+
}
|
|
7193
7868
|
export interface Options {
|
|
7194
7869
|
readonly validate?: boolean;
|
|
7195
7870
|
readonly lint?: {
|
|
@@ -7216,6 +7891,10 @@ declare namespace monaco.languages.css {
|
|
|
7216
7891
|
* Configures the CSS data types known by the langauge service.
|
|
7217
7892
|
*/
|
|
7218
7893
|
readonly data?: CSSDataConfiguration;
|
|
7894
|
+
/**
|
|
7895
|
+
* Settings for the CSS formatter.
|
|
7896
|
+
*/
|
|
7897
|
+
readonly format?: CSSFormatConfiguration;
|
|
7219
7898
|
}
|
|
7220
7899
|
export interface ModeConfiguration {
|
|
7221
7900
|
/**
|
|
@@ -7262,6 +7941,14 @@ declare namespace monaco.languages.css {
|
|
|
7262
7941
|
* Defines whether the built-in selection range provider is enabled.
|
|
7263
7942
|
*/
|
|
7264
7943
|
readonly selectionRanges?: boolean;
|
|
7944
|
+
/**
|
|
7945
|
+
* Defines whether the built-in document formatting edit provider is enabled.
|
|
7946
|
+
*/
|
|
7947
|
+
readonly documentFormattingEdits?: boolean;
|
|
7948
|
+
/**
|
|
7949
|
+
* Defines whether the built-in document formatting range edit provider is enabled.
|
|
7950
|
+
*/
|
|
7951
|
+
readonly documentRangeFormattingEdits?: boolean;
|
|
7265
7952
|
}
|
|
7266
7953
|
export interface LanguageServiceDefaults {
|
|
7267
7954
|
readonly languageId: string;
|
|
@@ -7379,11 +8066,11 @@ declare namespace monaco.languages.html {
|
|
|
7379
8066
|
}
|
|
7380
8067
|
export interface Options {
|
|
7381
8068
|
/**
|
|
7382
|
-
*
|
|
8069
|
+
* Settings for the HTML formatter.
|
|
7383
8070
|
*/
|
|
7384
8071
|
readonly format?: HTMLFormatConfiguration;
|
|
7385
8072
|
/**
|
|
7386
|
-
*
|
|
8073
|
+
* Code completion settings.
|
|
7387
8074
|
*/
|
|
7388
8075
|
readonly suggest?: CompletionConfiguration;
|
|
7389
8076
|
/**
|
|
@@ -7834,6 +8521,60 @@ declare namespace monaco.languages.typescript {
|
|
|
7834
8521
|
writeByteOrderMark: boolean;
|
|
7835
8522
|
text: string;
|
|
7836
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
|
+
}
|
|
7837
8578
|
export interface LanguageServiceDefaults {
|
|
7838
8579
|
/**
|
|
7839
8580
|
* Event fired when compiler options or diagnostics options are changed.
|
|
@@ -7845,6 +8586,8 @@ declare namespace monaco.languages.typescript {
|
|
|
7845
8586
|
readonly onDidExtraLibsChange: IEvent<void>;
|
|
7846
8587
|
readonly workerOptions: WorkerOptions;
|
|
7847
8588
|
readonly inlayHintsOptions: InlayHintsOptions;
|
|
8589
|
+
readonly modeConfiguration: ModeConfiguration;
|
|
8590
|
+
setModeConfiguration(modeConfiguration: ModeConfiguration): void;
|
|
7848
8591
|
/**
|
|
7849
8592
|
* Get the current extra libs registered with the language service.
|
|
7850
8593
|
*/
|
|
@@ -7952,11 +8695,7 @@ declare namespace monaco.languages.typescript {
|
|
|
7952
8695
|
* @returns `Promise<typescript.QuickInfo | undefined>`
|
|
7953
8696
|
*/
|
|
7954
8697
|
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>;
|
|
8698
|
+
getDocumentHighlights(fileName: string, position: number, filesToSearch: string[]): Promise<ReadonlyArray<any> | undefined>;
|
|
7960
8699
|
/**
|
|
7961
8700
|
* Get the definition of the item at the given position in the file.
|
|
7962
8701
|
* @returns `Promise<ReadonlyArray<typescript.DefinitionInfo> | undefined>`
|
|
@@ -7969,9 +8708,9 @@ declare namespace monaco.languages.typescript {
|
|
|
7969
8708
|
getReferencesAtPosition(fileName: string, position: number): Promise<any[] | undefined>;
|
|
7970
8709
|
/**
|
|
7971
8710
|
* Get outline entries for the item at the given position in the file.
|
|
7972
|
-
* @returns `Promise<typescript.
|
|
8711
|
+
* @returns `Promise<typescript.NavigationTree | undefined>`
|
|
7973
8712
|
*/
|
|
7974
|
-
|
|
8713
|
+
getNavigationTree(fileName: string): Promise<any | undefined>;
|
|
7975
8714
|
/**
|
|
7976
8715
|
* Get changes which should be applied to format the given file.
|
|
7977
8716
|
* @param options `typescript.FormatCodeOptions`
|