@ng-util/monaco-editor 12.1.2 → 13.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/esm2020/monaco-editor-base.component.mjs +152 -0
- package/esm2020/monaco-editor-diff.component.mjs +47 -0
- package/esm2020/monaco-editor.component.mjs +95 -0
- package/{esm2015/monaco-editor.config.js → esm2020/monaco-editor.config.mjs} +0 -0
- package/esm2020/monaco-editor.module.mjs +27 -0
- package/{esm2015/monaco-editor.types.js → esm2020/monaco-editor.types.mjs} +0 -0
- package/esm2020/ng-util-monaco-editor.mjs +5 -0
- package/{esm2015/public-api.js → esm2020/public-api.mjs} +0 -0
- package/fesm2015/{ng-util-monaco-editor.js → ng-util-monaco-editor.mjs} +90 -83
- package/fesm2015/ng-util-monaco-editor.mjs.map +1 -0
- package/fesm2020/ng-util-monaco-editor.mjs +319 -0
- package/fesm2020/ng-util-monaco-editor.mjs.map +1 -0
- package/monaco-editor-base.component.d.ts +5 -2
- package/monaco-editor-diff.component.d.ts +5 -2
- package/monaco-editor.component.d.ts +4 -1
- package/monaco-editor.module.d.ts +7 -0
- package/monaco.d.ts +785 -419
- package/ng-util-monaco-editor.d.ts +1 -1
- package/package.json +20 -8
- package/bundles/ng-util-monaco-editor.umd.js +0 -676
- package/bundles/ng-util-monaco-editor.umd.js.map +0 -1
- package/esm2015/monaco-editor-base.component.js +0 -155
- package/esm2015/monaco-editor-diff.component.js +0 -45
- package/esm2015/monaco-editor.component.js +0 -88
- package/esm2015/monaco-editor.module.js +0 -24
- package/esm2015/ng-util-monaco-editor.js +0 -6
- package/fesm2015/ng-util-monaco-editor.js.map +0 -1
- package/ng-util-monaco-editor.metadata.json +0 -1
package/monaco.d.ts
CHANGED
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
|
|
11
11
|
declare let MonacoEnvironment: monaco.Environment | undefined;
|
|
12
12
|
|
|
13
|
+
interface Window {
|
|
14
|
+
MonacoEnvironment?: monaco.Environment | undefined;
|
|
15
|
+
}
|
|
16
|
+
|
|
13
17
|
declare namespace monaco {
|
|
14
18
|
|
|
15
19
|
export type Thenable<T> = PromiseLike<T>;
|
|
@@ -216,7 +220,6 @@ declare namespace monaco {
|
|
|
216
220
|
query: string;
|
|
217
221
|
fragment: string;
|
|
218
222
|
}
|
|
219
|
-
|
|
220
223
|
/**
|
|
221
224
|
* Virtual Key Codes, the value does not hold any inherent meaning.
|
|
222
225
|
* Inspired somewhat from https://msdn.microsoft.com/en-us/library/windows/desktop/dd375731(v=vs.85).aspx
|
|
@@ -248,42 +251,42 @@ declare namespace monaco {
|
|
|
248
251
|
DownArrow = 18,
|
|
249
252
|
Insert = 19,
|
|
250
253
|
Delete = 20,
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
254
|
+
Digit0 = 21,
|
|
255
|
+
Digit1 = 22,
|
|
256
|
+
Digit2 = 23,
|
|
257
|
+
Digit3 = 24,
|
|
258
|
+
Digit4 = 25,
|
|
259
|
+
Digit5 = 26,
|
|
260
|
+
Digit6 = 27,
|
|
261
|
+
Digit7 = 28,
|
|
262
|
+
Digit8 = 29,
|
|
263
|
+
Digit9 = 30,
|
|
264
|
+
KeyA = 31,
|
|
265
|
+
KeyB = 32,
|
|
266
|
+
KeyC = 33,
|
|
267
|
+
KeyD = 34,
|
|
268
|
+
KeyE = 35,
|
|
269
|
+
KeyF = 36,
|
|
270
|
+
KeyG = 37,
|
|
271
|
+
KeyH = 38,
|
|
272
|
+
KeyI = 39,
|
|
273
|
+
KeyJ = 40,
|
|
274
|
+
KeyK = 41,
|
|
275
|
+
KeyL = 42,
|
|
276
|
+
KeyM = 43,
|
|
277
|
+
KeyN = 44,
|
|
278
|
+
KeyO = 45,
|
|
279
|
+
KeyP = 46,
|
|
280
|
+
KeyQ = 47,
|
|
281
|
+
KeyR = 48,
|
|
282
|
+
KeyS = 49,
|
|
283
|
+
KeyT = 50,
|
|
284
|
+
KeyU = 51,
|
|
285
|
+
KeyV = 52,
|
|
286
|
+
KeyW = 53,
|
|
287
|
+
KeyX = 54,
|
|
288
|
+
KeyY = 55,
|
|
289
|
+
KeyZ = 56,
|
|
287
290
|
Meta = 57,
|
|
288
291
|
ContextMenu = 58,
|
|
289
292
|
F1 = 59,
|
|
@@ -311,57 +314,57 @@ declare namespace monaco {
|
|
|
311
314
|
* Used for miscellaneous characters; it can vary by keyboard.
|
|
312
315
|
* For the US standard keyboard, the ';:' key
|
|
313
316
|
*/
|
|
314
|
-
|
|
317
|
+
Semicolon = 80,
|
|
315
318
|
/**
|
|
316
319
|
* For any country/region, the '+' key
|
|
317
320
|
* For the US standard keyboard, the '=+' key
|
|
318
321
|
*/
|
|
319
|
-
|
|
322
|
+
Equal = 81,
|
|
320
323
|
/**
|
|
321
324
|
* For any country/region, the ',' key
|
|
322
325
|
* For the US standard keyboard, the ',<' key
|
|
323
326
|
*/
|
|
324
|
-
|
|
327
|
+
Comma = 82,
|
|
325
328
|
/**
|
|
326
329
|
* For any country/region, the '-' key
|
|
327
330
|
* For the US standard keyboard, the '-_' key
|
|
328
331
|
*/
|
|
329
|
-
|
|
332
|
+
Minus = 83,
|
|
330
333
|
/**
|
|
331
334
|
* For any country/region, the '.' key
|
|
332
335
|
* For the US standard keyboard, the '.>' key
|
|
333
336
|
*/
|
|
334
|
-
|
|
337
|
+
Period = 84,
|
|
335
338
|
/**
|
|
336
339
|
* Used for miscellaneous characters; it can vary by keyboard.
|
|
337
340
|
* For the US standard keyboard, the '/?' key
|
|
338
341
|
*/
|
|
339
|
-
|
|
342
|
+
Slash = 85,
|
|
340
343
|
/**
|
|
341
344
|
* Used for miscellaneous characters; it can vary by keyboard.
|
|
342
345
|
* For the US standard keyboard, the '`~' key
|
|
343
346
|
*/
|
|
344
|
-
|
|
347
|
+
Backquote = 86,
|
|
345
348
|
/**
|
|
346
349
|
* Used for miscellaneous characters; it can vary by keyboard.
|
|
347
350
|
* For the US standard keyboard, the '[{' key
|
|
348
351
|
*/
|
|
349
|
-
|
|
352
|
+
BracketLeft = 87,
|
|
350
353
|
/**
|
|
351
354
|
* Used for miscellaneous characters; it can vary by keyboard.
|
|
352
355
|
* For the US standard keyboard, the '\|' key
|
|
353
356
|
*/
|
|
354
|
-
|
|
357
|
+
Backslash = 88,
|
|
355
358
|
/**
|
|
356
359
|
* Used for miscellaneous characters; it can vary by keyboard.
|
|
357
360
|
* For the US standard keyboard, the ']}' key
|
|
358
361
|
*/
|
|
359
|
-
|
|
362
|
+
BracketRight = 89,
|
|
360
363
|
/**
|
|
361
364
|
* Used for miscellaneous characters; it can vary by keyboard.
|
|
362
365
|
* For the US standard keyboard, the ''"' key
|
|
363
366
|
*/
|
|
364
|
-
|
|
367
|
+
Quote = 90,
|
|
365
368
|
/**
|
|
366
369
|
* Used for miscellaneous characters; it can vary by keyboard.
|
|
367
370
|
*/
|
|
@@ -369,34 +372,48 @@ declare namespace monaco {
|
|
|
369
372
|
/**
|
|
370
373
|
* Either the angle bracket key or the backslash key on the RT 102-key keyboard.
|
|
371
374
|
*/
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
375
|
+
IntlBackslash = 92,
|
|
376
|
+
Numpad0 = 93,
|
|
377
|
+
Numpad1 = 94,
|
|
378
|
+
Numpad2 = 95,
|
|
379
|
+
Numpad3 = 96,
|
|
380
|
+
Numpad4 = 97,
|
|
381
|
+
Numpad5 = 98,
|
|
382
|
+
Numpad6 = 99,
|
|
383
|
+
Numpad7 = 100,
|
|
384
|
+
Numpad8 = 101,
|
|
385
|
+
Numpad9 = 102,
|
|
386
|
+
NumpadMultiply = 103,
|
|
387
|
+
NumpadAdd = 104,
|
|
385
388
|
NUMPAD_SEPARATOR = 105,
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
+
NumpadSubtract = 106,
|
|
390
|
+
NumpadDecimal = 107,
|
|
391
|
+
NumpadDivide = 108,
|
|
389
392
|
/**
|
|
390
393
|
* Cover all key codes when IME is processing input.
|
|
391
394
|
*/
|
|
392
395
|
KEY_IN_COMPOSITION = 109,
|
|
393
396
|
ABNT_C1 = 110,
|
|
394
397
|
ABNT_C2 = 111,
|
|
398
|
+
AudioVolumeMute = 112,
|
|
399
|
+
AudioVolumeUp = 113,
|
|
400
|
+
AudioVolumeDown = 114,
|
|
401
|
+
BrowserSearch = 115,
|
|
402
|
+
BrowserHome = 116,
|
|
403
|
+
BrowserBack = 117,
|
|
404
|
+
BrowserForward = 118,
|
|
405
|
+
MediaTrackNext = 119,
|
|
406
|
+
MediaTrackPrevious = 120,
|
|
407
|
+
MediaStop = 121,
|
|
408
|
+
MediaPlayPause = 122,
|
|
409
|
+
LaunchMediaPlayer = 123,
|
|
410
|
+
LaunchMail = 124,
|
|
411
|
+
LaunchApp2 = 125,
|
|
395
412
|
/**
|
|
396
413
|
* Placed last to cover the length of the enum.
|
|
397
414
|
* Please do not depend on this value!
|
|
398
415
|
*/
|
|
399
|
-
MAX_VALUE =
|
|
416
|
+
MAX_VALUE = 126
|
|
400
417
|
}
|
|
401
418
|
export class KeyMod {
|
|
402
419
|
static readonly CtrlCmd: number;
|
|
@@ -410,6 +427,7 @@ declare namespace monaco {
|
|
|
410
427
|
readonly value: string;
|
|
411
428
|
readonly isTrusted?: boolean;
|
|
412
429
|
readonly supportThemeIcons?: boolean;
|
|
430
|
+
readonly supportHtml?: boolean;
|
|
413
431
|
uris?: {
|
|
414
432
|
[href: string]: UriComponents;
|
|
415
433
|
};
|
|
@@ -621,7 +639,7 @@ declare namespace monaco {
|
|
|
621
639
|
*/
|
|
622
640
|
strictContainsRange(range: IRange): boolean;
|
|
623
641
|
/**
|
|
624
|
-
* Test if `otherRange` is
|
|
642
|
+
* Test if `otherRange` is strictly in `range` (must start after, and end before). If the ranges are equal, will return false.
|
|
625
643
|
*/
|
|
626
644
|
static strictContainsRange(range: IRange, otherRange: IRange): boolean;
|
|
627
645
|
/**
|
|
@@ -789,6 +807,10 @@ declare namespace monaco {
|
|
|
789
807
|
* Get the position at `positionLineNumber` and `positionColumn`.
|
|
790
808
|
*/
|
|
791
809
|
getPosition(): Position;
|
|
810
|
+
/**
|
|
811
|
+
* Get the position at the start of the selection.
|
|
812
|
+
*/
|
|
813
|
+
getSelectionStart(): Position;
|
|
792
814
|
/**
|
|
793
815
|
* Create a new selection with a different `selectionStartLineNumber` and `selectionStartColumn`.
|
|
794
816
|
*/
|
|
@@ -797,6 +819,10 @@ declare namespace monaco {
|
|
|
797
819
|
* Create a `Selection` from one or two positions
|
|
798
820
|
*/
|
|
799
821
|
static fromPositions(start: IPosition, end?: IPosition): Selection;
|
|
822
|
+
/**
|
|
823
|
+
* Creates a `Selection` from a range, given a direction.
|
|
824
|
+
*/
|
|
825
|
+
static fromRange(range: Range, direction: SelectionDirection): Selection;
|
|
800
826
|
/**
|
|
801
827
|
* Create a `Selection` from an `ISelection`.
|
|
802
828
|
*/
|
|
@@ -867,7 +893,7 @@ declare namespace monaco.editor {
|
|
|
867
893
|
* `domElement` should be empty (not contain other dom nodes).
|
|
868
894
|
* The editor will read the size of `domElement`.
|
|
869
895
|
*/
|
|
870
|
-
export function createDiffEditor(domElement: HTMLElement, options?:
|
|
896
|
+
export function createDiffEditor(domElement: HTMLElement, options?: IStandaloneDiffEditorConstructionOptions, override?: IEditorOverrideServices): IStandaloneDiffEditor;
|
|
871
897
|
|
|
872
898
|
export interface IDiffNavigatorOptions {
|
|
873
899
|
readonly followsCaret?: boolean;
|
|
@@ -1180,12 +1206,12 @@ declare namespace monaco.editor {
|
|
|
1180
1206
|
model?: ITextModel | null;
|
|
1181
1207
|
/**
|
|
1182
1208
|
* The initial value of the auto created model in the editor.
|
|
1183
|
-
* To not create
|
|
1209
|
+
* To not automatically create a model, use `model: null`.
|
|
1184
1210
|
*/
|
|
1185
1211
|
value?: string;
|
|
1186
1212
|
/**
|
|
1187
1213
|
* The initial language of the auto created model in the editor.
|
|
1188
|
-
* To not create
|
|
1214
|
+
* To not automatically create a model, use `model: null`.
|
|
1189
1215
|
*/
|
|
1190
1216
|
language?: string;
|
|
1191
1217
|
/**
|
|
@@ -1208,12 +1234,17 @@ declare namespace monaco.editor {
|
|
|
1208
1234
|
* Defaults to "https://go.microsoft.com/fwlink/?linkid=852450"
|
|
1209
1235
|
*/
|
|
1210
1236
|
accessibilityHelpUrl?: string;
|
|
1237
|
+
/**
|
|
1238
|
+
* Container element to use for ARIA messages.
|
|
1239
|
+
* Defaults to document.body.
|
|
1240
|
+
*/
|
|
1241
|
+
ariaContainerElement?: HTMLElement;
|
|
1211
1242
|
}
|
|
1212
1243
|
|
|
1213
1244
|
/**
|
|
1214
1245
|
* The options to create a diff editor.
|
|
1215
1246
|
*/
|
|
1216
|
-
export interface
|
|
1247
|
+
export interface IStandaloneDiffEditorConstructionOptions extends IDiffEditorConstructionOptions {
|
|
1217
1248
|
/**
|
|
1218
1249
|
* Initial theme to be used for rendering.
|
|
1219
1250
|
* The current out-of-the-box available themes are: 'vs' (default), 'vs-dark', 'hc-black'.
|
|
@@ -1403,7 +1434,8 @@ declare namespace monaco.editor {
|
|
|
1403
1434
|
isWholeLine?: boolean;
|
|
1404
1435
|
/**
|
|
1405
1436
|
* Specifies the stack order of a decoration.
|
|
1406
|
-
* A decoration with greater stack order is always in front of a decoration with
|
|
1437
|
+
* A decoration with greater stack order is always in front of a decoration with
|
|
1438
|
+
* a lower stack order when the decorations are on the same line.
|
|
1407
1439
|
*/
|
|
1408
1440
|
zIndex?: number;
|
|
1409
1441
|
/**
|
|
@@ -1448,6 +1480,32 @@ declare namespace monaco.editor {
|
|
|
1448
1480
|
* If set, the decoration will be rendered after the text with this CSS class name.
|
|
1449
1481
|
*/
|
|
1450
1482
|
afterContentClassName?: string | null;
|
|
1483
|
+
/**
|
|
1484
|
+
* If set, text will be injected in the view after the range.
|
|
1485
|
+
*/
|
|
1486
|
+
after?: InjectedTextOptions | null;
|
|
1487
|
+
/**
|
|
1488
|
+
* If set, text will be injected in the view before the range.
|
|
1489
|
+
*/
|
|
1490
|
+
before?: InjectedTextOptions | null;
|
|
1491
|
+
}
|
|
1492
|
+
|
|
1493
|
+
/**
|
|
1494
|
+
* Configures text that is injected into the view without changing the underlying document.
|
|
1495
|
+
*/
|
|
1496
|
+
export interface InjectedTextOptions {
|
|
1497
|
+
/**
|
|
1498
|
+
* Sets the text to inject. Must be a single line.
|
|
1499
|
+
*/
|
|
1500
|
+
readonly content: string;
|
|
1501
|
+
/**
|
|
1502
|
+
* If set, the decoration will be rendered inline with the text with this CSS class name.
|
|
1503
|
+
*/
|
|
1504
|
+
readonly inlineClassName?: string | null;
|
|
1505
|
+
/**
|
|
1506
|
+
* If there is an `inlineClassName` which affects letter spacing.
|
|
1507
|
+
*/
|
|
1508
|
+
readonly inlineClassNameAffectsLetterSpacing?: boolean;
|
|
1451
1509
|
}
|
|
1452
1510
|
|
|
1453
1511
|
/**
|
|
@@ -1617,6 +1675,11 @@ declare namespace monaco.editor {
|
|
|
1617
1675
|
readonly insertSpaces: boolean;
|
|
1618
1676
|
readonly defaultEOL: DefaultEndOfLine;
|
|
1619
1677
|
readonly trimAutoWhitespace: boolean;
|
|
1678
|
+
readonly bracketPairColorizationOptions: BracketPairColorizationOptions;
|
|
1679
|
+
}
|
|
1680
|
+
|
|
1681
|
+
export interface BracketPairColorizationOptions {
|
|
1682
|
+
enabled: boolean;
|
|
1620
1683
|
}
|
|
1621
1684
|
|
|
1622
1685
|
export interface ITextModelUpdateOptions {
|
|
@@ -1624,6 +1687,7 @@ declare namespace monaco.editor {
|
|
|
1624
1687
|
indentSize?: number;
|
|
1625
1688
|
insertSpaces?: boolean;
|
|
1626
1689
|
trimAutoWhitespace?: boolean;
|
|
1690
|
+
bracketColorizationOptions?: BracketPairColorizationOptions;
|
|
1627
1691
|
}
|
|
1628
1692
|
|
|
1629
1693
|
export class FindMatch {
|
|
@@ -1748,7 +1812,7 @@ declare namespace monaco.editor {
|
|
|
1748
1812
|
*/
|
|
1749
1813
|
getLineLastNonWhitespaceColumn(lineNumber: number): number;
|
|
1750
1814
|
/**
|
|
1751
|
-
* Create a valid position
|
|
1815
|
+
* Create a valid position.
|
|
1752
1816
|
*/
|
|
1753
1817
|
validatePosition(position: IPosition): Position;
|
|
1754
1818
|
/**
|
|
@@ -1783,7 +1847,7 @@ declare namespace monaco.editor {
|
|
|
1783
1847
|
*/
|
|
1784
1848
|
getPositionAt(offset: number): Position;
|
|
1785
1849
|
/**
|
|
1786
|
-
* Get a range covering the entire model
|
|
1850
|
+
* Get a range covering the entire model.
|
|
1787
1851
|
*/
|
|
1788
1852
|
getFullModelRange(): Range;
|
|
1789
1853
|
/**
|
|
@@ -1839,7 +1903,7 @@ declare namespace monaco.editor {
|
|
|
1839
1903
|
/**
|
|
1840
1904
|
* Get the language associated with this model.
|
|
1841
1905
|
*/
|
|
1842
|
-
|
|
1906
|
+
getLanguageId(): string;
|
|
1843
1907
|
/**
|
|
1844
1908
|
* Get the word under or besides `position`.
|
|
1845
1909
|
* @param position The position to look for a word.
|
|
@@ -1913,6 +1977,11 @@ declare namespace monaco.editor {
|
|
|
1913
1977
|
* @param filterOutValidation If set, it will ignore decorations specific to validation (i.e. warnings, errors).
|
|
1914
1978
|
*/
|
|
1915
1979
|
getOverviewRulerDecorations(ownerId?: number, filterOutValidation?: boolean): IModelDecoration[];
|
|
1980
|
+
/**
|
|
1981
|
+
* Gets all the decorations that contain injected text.
|
|
1982
|
+
* @param ownerId If set, it will ignore decorations belonging to other owners.
|
|
1983
|
+
*/
|
|
1984
|
+
getInjectedTextDecorations(ownerId?: number): IModelDecoration[];
|
|
1916
1985
|
/**
|
|
1917
1986
|
* Normalize a string containing whitespace according to indentation rules (converts to spaces or to tabs).
|
|
1918
1987
|
*/
|
|
@@ -1999,8 +2068,7 @@ declare namespace monaco.editor {
|
|
|
1999
2068
|
*/
|
|
2000
2069
|
onWillDispose(listener: () => void): IDisposable;
|
|
2001
2070
|
/**
|
|
2002
|
-
* Destroy this model.
|
|
2003
|
-
* and make all necessary clean-up to release this object to the GC.
|
|
2071
|
+
* Destroy this model.
|
|
2004
2072
|
*/
|
|
2005
2073
|
dispose(): void;
|
|
2006
2074
|
/**
|
|
@@ -2431,7 +2499,7 @@ declare namespace monaco.editor {
|
|
|
2431
2499
|
};
|
|
2432
2500
|
|
|
2433
2501
|
/**
|
|
2434
|
-
* An event describing that the current
|
|
2502
|
+
* An event describing that the current language associated with a model has changed.
|
|
2435
2503
|
*/
|
|
2436
2504
|
export interface IModelLanguageChangedEvent {
|
|
2437
2505
|
/**
|
|
@@ -2671,7 +2739,7 @@ declare namespace monaco.editor {
|
|
|
2671
2739
|
/**
|
|
2672
2740
|
* Control the rendering of line numbers.
|
|
2673
2741
|
* If it is a function, it will be invoked when rendering a line number and the return value will be rendered.
|
|
2674
|
-
* Otherwise, if it is a
|
|
2742
|
+
* Otherwise, if it is a truthy, line numbers will be rendered normally (equivalent of using an identity function).
|
|
2675
2743
|
* Otherwise, line numbers will not be rendered.
|
|
2676
2744
|
* Defaults to `on`.
|
|
2677
2745
|
*/
|
|
@@ -2894,12 +2962,10 @@ declare namespace monaco.editor {
|
|
|
2894
2962
|
wrappingStrategy?: 'simple' | 'advanced';
|
|
2895
2963
|
/**
|
|
2896
2964
|
* Configure word wrapping characters. A break will be introduced before these characters.
|
|
2897
|
-
* Defaults to '([{‘“〈《「『【〔([{「£¥$£¥++'.
|
|
2898
2965
|
*/
|
|
2899
2966
|
wordWrapBreakBeforeCharacters?: string;
|
|
2900
2967
|
/**
|
|
2901
2968
|
* Configure word wrapping characters. A break will be introduced after these characters.
|
|
2902
|
-
* Defaults to ' \t})]?|/&.,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」'.
|
|
2903
2969
|
*/
|
|
2904
2970
|
wordWrapBreakAfterCharacters?: string;
|
|
2905
2971
|
/**
|
|
@@ -2978,6 +3044,7 @@ declare namespace monaco.editor {
|
|
|
2978
3044
|
* Suggest options.
|
|
2979
3045
|
*/
|
|
2980
3046
|
suggest?: ISuggestOptions;
|
|
3047
|
+
inlineSuggest?: IInlineSuggestOptions;
|
|
2981
3048
|
/**
|
|
2982
3049
|
* Smart select options.
|
|
2983
3050
|
*/
|
|
@@ -3143,6 +3210,11 @@ declare namespace monaco.editor {
|
|
|
3143
3210
|
* Defaults to true.
|
|
3144
3211
|
*/
|
|
3145
3212
|
foldingHighlight?: boolean;
|
|
3213
|
+
/**
|
|
3214
|
+
* Auto fold imports folding regions.
|
|
3215
|
+
* Defaults to true.
|
|
3216
|
+
*/
|
|
3217
|
+
foldingImportsByDefault?: boolean;
|
|
3146
3218
|
/**
|
|
3147
3219
|
* Controls whether the fold actions in the gutter stay always visible or hide unless the mouse is over the gutter.
|
|
3148
3220
|
* Defaults to 'mouseover'.
|
|
@@ -3160,24 +3232,14 @@ declare namespace monaco.editor {
|
|
|
3160
3232
|
matchBrackets?: 'never' | 'near' | 'always';
|
|
3161
3233
|
/**
|
|
3162
3234
|
* Enable rendering of whitespace.
|
|
3163
|
-
* Defaults to
|
|
3235
|
+
* Defaults to 'selection'.
|
|
3164
3236
|
*/
|
|
3165
3237
|
renderWhitespace?: 'none' | 'boundary' | 'selection' | 'trailing' | 'all';
|
|
3166
3238
|
/**
|
|
3167
3239
|
* Enable rendering of control characters.
|
|
3168
|
-
* Defaults to false.
|
|
3169
|
-
*/
|
|
3170
|
-
renderControlCharacters?: boolean;
|
|
3171
|
-
/**
|
|
3172
|
-
* Enable rendering of indent guides.
|
|
3173
3240
|
* Defaults to true.
|
|
3174
3241
|
*/
|
|
3175
|
-
|
|
3176
|
-
/**
|
|
3177
|
-
* Enable highlighting of the active indent guide.
|
|
3178
|
-
* Defaults to true.
|
|
3179
|
-
*/
|
|
3180
|
-
highlightActiveIndentGuide?: boolean;
|
|
3242
|
+
renderControlCharacters?: boolean;
|
|
3181
3243
|
/**
|
|
3182
3244
|
* Enable rendering of current line highlight.
|
|
3183
3245
|
* Defaults to all.
|
|
@@ -3233,17 +3295,19 @@ declare namespace monaco.editor {
|
|
|
3233
3295
|
/**
|
|
3234
3296
|
* Control the behavior and rendering of the inline hints.
|
|
3235
3297
|
*/
|
|
3236
|
-
|
|
3298
|
+
inlayHints?: IEditorInlayHintsOptions;
|
|
3237
3299
|
/**
|
|
3238
3300
|
* Control if the editor should use shadow DOM.
|
|
3239
3301
|
*/
|
|
3240
3302
|
useShadowDOM?: boolean;
|
|
3303
|
+
/**
|
|
3304
|
+
* Controls the behavior of editor guides.
|
|
3305
|
+
*/
|
|
3306
|
+
guides?: IGuidesOptions;
|
|
3307
|
+
unicodeHighlight?: IUnicodeHighlightOptions;
|
|
3241
3308
|
}
|
|
3242
3309
|
|
|
3243
|
-
|
|
3244
|
-
* Configuration options for the diff editor.
|
|
3245
|
-
*/
|
|
3246
|
-
export interface IDiffEditorOptions extends IEditorOptions {
|
|
3310
|
+
export interface IDiffEditorBaseOptions {
|
|
3247
3311
|
/**
|
|
3248
3312
|
* Allow the user to resize the diff editor split view.
|
|
3249
3313
|
* Defaults to true.
|
|
@@ -3259,6 +3323,11 @@ declare namespace monaco.editor {
|
|
|
3259
3323
|
* Defaults to 5000.
|
|
3260
3324
|
*/
|
|
3261
3325
|
maxComputationTime?: number;
|
|
3326
|
+
/**
|
|
3327
|
+
* Maximum supported file size in MB.
|
|
3328
|
+
* Defaults to 50.
|
|
3329
|
+
*/
|
|
3330
|
+
maxFileSize?: number;
|
|
3262
3331
|
/**
|
|
3263
3332
|
* Compute the diff by ignoring leading/trailing whitespace
|
|
3264
3333
|
* Defaults to true.
|
|
@@ -3279,11 +3348,6 @@ declare namespace monaco.editor {
|
|
|
3279
3348
|
* Defaults to false.
|
|
3280
3349
|
*/
|
|
3281
3350
|
diffCodeLens?: boolean;
|
|
3282
|
-
/**
|
|
3283
|
-
* Is the diff editor inside another editor
|
|
3284
|
-
* Defaults to false
|
|
3285
|
-
*/
|
|
3286
|
-
isInEmbeddedEditor?: boolean;
|
|
3287
3351
|
/**
|
|
3288
3352
|
* Is the diff editor should render overview ruler
|
|
3289
3353
|
* Defaults to true
|
|
@@ -3293,14 +3357,12 @@ declare namespace monaco.editor {
|
|
|
3293
3357
|
* Control the wrapping of the diff editor.
|
|
3294
3358
|
*/
|
|
3295
3359
|
diffWordWrap?: 'off' | 'on' | 'inherit';
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
*/
|
|
3303
|
-
modifiedAriaLabel?: string;
|
|
3360
|
+
}
|
|
3361
|
+
|
|
3362
|
+
/**
|
|
3363
|
+
* Configuration options for the diff editor.
|
|
3364
|
+
*/
|
|
3365
|
+
export interface IDiffEditorOptions extends IEditorOptions, IDiffEditorBaseOptions {
|
|
3304
3366
|
}
|
|
3305
3367
|
|
|
3306
3368
|
/**
|
|
@@ -3321,6 +3383,16 @@ declare namespace monaco.editor {
|
|
|
3321
3383
|
readonly id: K1;
|
|
3322
3384
|
readonly name: string;
|
|
3323
3385
|
defaultValue: V;
|
|
3386
|
+
/**
|
|
3387
|
+
* Might modify `value`.
|
|
3388
|
+
*/
|
|
3389
|
+
applyUpdate(value: V, update: V): ApplyUpdateResult<V>;
|
|
3390
|
+
}
|
|
3391
|
+
|
|
3392
|
+
export class ApplyUpdateResult<T> {
|
|
3393
|
+
readonly newValue: T;
|
|
3394
|
+
readonly didChange: boolean;
|
|
3395
|
+
constructor(newValue: T, didChange: boolean);
|
|
3324
3396
|
}
|
|
3325
3397
|
|
|
3326
3398
|
/**
|
|
@@ -3339,8 +3411,6 @@ declare namespace monaco.editor {
|
|
|
3339
3411
|
ignoreEmptyLines?: boolean;
|
|
3340
3412
|
}
|
|
3341
3413
|
|
|
3342
|
-
export type EditorCommentsOptions = Readonly<Required<IEditorCommentsOptions>>;
|
|
3343
|
-
|
|
3344
3414
|
/**
|
|
3345
3415
|
* The kind of animation in which the editor's cursor should be rendered.
|
|
3346
3416
|
*/
|
|
@@ -3412,7 +3482,7 @@ declare namespace monaco.editor {
|
|
|
3412
3482
|
/**
|
|
3413
3483
|
* Controls if we seed search string in the Find Widget with editor selection.
|
|
3414
3484
|
*/
|
|
3415
|
-
seedSearchStringFromSelection?:
|
|
3485
|
+
seedSearchStringFromSelection?: 'never' | 'always' | 'selection';
|
|
3416
3486
|
/**
|
|
3417
3487
|
* Controls if Find in Selection flag is turned on in the editor.
|
|
3418
3488
|
*/
|
|
@@ -3424,8 +3494,6 @@ declare namespace monaco.editor {
|
|
|
3424
3494
|
loop?: boolean;
|
|
3425
3495
|
}
|
|
3426
3496
|
|
|
3427
|
-
export type EditorFindOptions = Readonly<Required<IEditorFindOptions>>;
|
|
3428
|
-
|
|
3429
3497
|
export type GoToLocationValues = 'peek' | 'gotoAndPeek' | 'goto';
|
|
3430
3498
|
|
|
3431
3499
|
/**
|
|
@@ -3445,8 +3513,6 @@ declare namespace monaco.editor {
|
|
|
3445
3513
|
alternativeReferenceCommand?: string;
|
|
3446
3514
|
}
|
|
3447
3515
|
|
|
3448
|
-
export type GoToLocationOptions = Readonly<Required<IGotoLocationOptions>>;
|
|
3449
|
-
|
|
3450
3516
|
/**
|
|
3451
3517
|
* Configuration options for editor hover
|
|
3452
3518
|
*/
|
|
@@ -3466,10 +3532,13 @@ declare namespace monaco.editor {
|
|
|
3466
3532
|
* Defaults to true.
|
|
3467
3533
|
*/
|
|
3468
3534
|
sticky?: boolean;
|
|
3535
|
+
/**
|
|
3536
|
+
* Should the hover be shown above the line if possible?
|
|
3537
|
+
* Defaults to false.
|
|
3538
|
+
*/
|
|
3539
|
+
above?: boolean;
|
|
3469
3540
|
}
|
|
3470
3541
|
|
|
3471
|
-
export type EditorHoverOptions = Readonly<Required<IEditorHoverOptions>>;
|
|
3472
|
-
|
|
3473
3542
|
/**
|
|
3474
3543
|
* A description for the overview ruler position.
|
|
3475
3544
|
*/
|
|
@@ -3595,12 +3664,10 @@ declare namespace monaco.editor {
|
|
|
3595
3664
|
enabled?: boolean;
|
|
3596
3665
|
}
|
|
3597
3666
|
|
|
3598
|
-
export type EditorLightbulbOptions = Readonly<Required<IEditorLightbulbOptions>>;
|
|
3599
|
-
|
|
3600
3667
|
/**
|
|
3601
|
-
* Configuration options for editor
|
|
3668
|
+
* Configuration options for editor inlayHints
|
|
3602
3669
|
*/
|
|
3603
|
-
export interface
|
|
3670
|
+
export interface IEditorInlayHintsOptions {
|
|
3604
3671
|
/**
|
|
3605
3672
|
* Enable the inline hints.
|
|
3606
3673
|
* Defaults to true.
|
|
@@ -3618,8 +3685,6 @@ declare namespace monaco.editor {
|
|
|
3618
3685
|
fontFamily?: string;
|
|
3619
3686
|
}
|
|
3620
3687
|
|
|
3621
|
-
export type EditorInlineHintsOptions = Readonly<Required<IEditorInlineHintsOptions>>;
|
|
3622
|
-
|
|
3623
3688
|
/**
|
|
3624
3689
|
* Configuration options for editor minimap
|
|
3625
3690
|
*/
|
|
@@ -3660,8 +3725,6 @@ declare namespace monaco.editor {
|
|
|
3660
3725
|
scale?: number;
|
|
3661
3726
|
}
|
|
3662
3727
|
|
|
3663
|
-
export type EditorMinimapOptions = Readonly<Required<IEditorMinimapOptions>>;
|
|
3664
|
-
|
|
3665
3728
|
/**
|
|
3666
3729
|
* Configuration options for editor padding
|
|
3667
3730
|
*/
|
|
@@ -3676,11 +3739,6 @@ declare namespace monaco.editor {
|
|
|
3676
3739
|
bottom?: number;
|
|
3677
3740
|
}
|
|
3678
3741
|
|
|
3679
|
-
export interface InternalEditorPaddingOptions {
|
|
3680
|
-
readonly top: number;
|
|
3681
|
-
readonly bottom: number;
|
|
3682
|
-
}
|
|
3683
|
-
|
|
3684
3742
|
/**
|
|
3685
3743
|
* Configuration options for parameter hints
|
|
3686
3744
|
*/
|
|
@@ -3697,8 +3755,6 @@ declare namespace monaco.editor {
|
|
|
3697
3755
|
cycle?: boolean;
|
|
3698
3756
|
}
|
|
3699
3757
|
|
|
3700
|
-
export type InternalParameterHintOptions = Readonly<Required<IEditorParameterHintOptions>>;
|
|
3701
|
-
|
|
3702
3758
|
/**
|
|
3703
3759
|
* Configuration options for quick suggestions
|
|
3704
3760
|
*/
|
|
@@ -3708,8 +3764,6 @@ declare namespace monaco.editor {
|
|
|
3708
3764
|
strings?: boolean;
|
|
3709
3765
|
}
|
|
3710
3766
|
|
|
3711
|
-
export type ValidQuickSuggestionsOptions = boolean | Readonly<Required<IQuickSuggestionsOptions>>;
|
|
3712
|
-
|
|
3713
3767
|
export type LineNumbersType = 'on' | 'off' | 'relative' | 'interval' | ((lineNumber: number) => string);
|
|
3714
3768
|
|
|
3715
3769
|
export enum RenderLineNumbersType {
|
|
@@ -3737,6 +3791,7 @@ declare namespace monaco.editor {
|
|
|
3737
3791
|
/**
|
|
3738
3792
|
* The size of arrows (if displayed).
|
|
3739
3793
|
* Defaults to 11.
|
|
3794
|
+
* **NOTE**: This option cannot be updated using `updateOptions()`
|
|
3740
3795
|
*/
|
|
3741
3796
|
arrowSize?: number;
|
|
3742
3797
|
/**
|
|
@@ -3752,16 +3807,19 @@ declare namespace monaco.editor {
|
|
|
3752
3807
|
/**
|
|
3753
3808
|
* Cast horizontal and vertical shadows when the content is scrolled.
|
|
3754
3809
|
* Defaults to true.
|
|
3810
|
+
* **NOTE**: This option cannot be updated using `updateOptions()`
|
|
3755
3811
|
*/
|
|
3756
3812
|
useShadows?: boolean;
|
|
3757
3813
|
/**
|
|
3758
3814
|
* Render arrows at the top and bottom of the vertical scrollbar.
|
|
3759
3815
|
* Defaults to false.
|
|
3816
|
+
* **NOTE**: This option cannot be updated using `updateOptions()`
|
|
3760
3817
|
*/
|
|
3761
3818
|
verticalHasArrows?: boolean;
|
|
3762
3819
|
/**
|
|
3763
3820
|
* Render arrows at the left and right of the horizontal scrollbar.
|
|
3764
3821
|
* Defaults to false.
|
|
3822
|
+
* **NOTE**: This option cannot be updated using `updateOptions()`
|
|
3765
3823
|
*/
|
|
3766
3824
|
horizontalHasArrows?: boolean;
|
|
3767
3825
|
/**
|
|
@@ -3772,6 +3830,7 @@ declare namespace monaco.editor {
|
|
|
3772
3830
|
/**
|
|
3773
3831
|
* Always consume mouse wheel events (always call preventDefault() and stopPropagation() on the browser events).
|
|
3774
3832
|
* Defaults to true.
|
|
3833
|
+
* **NOTE**: This option cannot be updated using `updateOptions()`
|
|
3775
3834
|
*/
|
|
3776
3835
|
alwaysConsumeMouseWheel?: boolean;
|
|
3777
3836
|
/**
|
|
@@ -3787,11 +3846,13 @@ declare namespace monaco.editor {
|
|
|
3787
3846
|
/**
|
|
3788
3847
|
* Width in pixels for the vertical slider.
|
|
3789
3848
|
* Defaults to `verticalScrollbarSize`.
|
|
3849
|
+
* **NOTE**: This option cannot be updated using `updateOptions()`
|
|
3790
3850
|
*/
|
|
3791
3851
|
verticalSliderSize?: number;
|
|
3792
3852
|
/**
|
|
3793
3853
|
* Height in pixels for the horizontal slider.
|
|
3794
3854
|
* Defaults to `horizontalScrollbarSize`.
|
|
3855
|
+
* **NOTE**: This option cannot be updated using `updateOptions()`
|
|
3795
3856
|
*/
|
|
3796
3857
|
horizontalSliderSize?: number;
|
|
3797
3858
|
/**
|
|
@@ -3817,6 +3878,72 @@ declare namespace monaco.editor {
|
|
|
3817
3878
|
readonly scrollByPage: boolean;
|
|
3818
3879
|
}
|
|
3819
3880
|
|
|
3881
|
+
export type InUntrustedWorkspace = 'inUntrustedWorkspace';
|
|
3882
|
+
|
|
3883
|
+
/**
|
|
3884
|
+
* Configuration options for unicode highlighting.
|
|
3885
|
+
*/
|
|
3886
|
+
export interface IUnicodeHighlightOptions {
|
|
3887
|
+
nonBasicASCII?: boolean | InUntrustedWorkspace;
|
|
3888
|
+
invisibleCharacters?: boolean;
|
|
3889
|
+
ambiguousCharacters?: boolean;
|
|
3890
|
+
includeComments?: boolean | InUntrustedWorkspace;
|
|
3891
|
+
/**
|
|
3892
|
+
* A map of allowed characters (true: allowed).
|
|
3893
|
+
*/
|
|
3894
|
+
allowedCharacters?: Record<string, true>;
|
|
3895
|
+
}
|
|
3896
|
+
|
|
3897
|
+
export interface IInlineSuggestOptions {
|
|
3898
|
+
/**
|
|
3899
|
+
* Enable or disable the rendering of automatic inline completions.
|
|
3900
|
+
*/
|
|
3901
|
+
enabled?: boolean;
|
|
3902
|
+
/**
|
|
3903
|
+
* Configures the mode.
|
|
3904
|
+
* Use `prefix` to only show ghost text if the text to replace is a prefix of the suggestion text.
|
|
3905
|
+
* Use `subword` to only show ghost text if the replace text is a subword of the suggestion text.
|
|
3906
|
+
* Use `subwordSmart` to only show ghost text if the replace text is a subword of the suggestion text, but the subword must start after the cursor position.
|
|
3907
|
+
* Defaults to `prefix`.
|
|
3908
|
+
*/
|
|
3909
|
+
mode?: 'prefix' | 'subword' | 'subwordSmart';
|
|
3910
|
+
}
|
|
3911
|
+
|
|
3912
|
+
export interface IBracketPairColorizationOptions {
|
|
3913
|
+
/**
|
|
3914
|
+
* Enable or disable bracket pair colorization.
|
|
3915
|
+
*/
|
|
3916
|
+
enabled?: boolean;
|
|
3917
|
+
}
|
|
3918
|
+
|
|
3919
|
+
export interface IGuidesOptions {
|
|
3920
|
+
/**
|
|
3921
|
+
* Enable rendering of bracket pair guides.
|
|
3922
|
+
* Defaults to false.
|
|
3923
|
+
*/
|
|
3924
|
+
bracketPairs?: boolean | 'active';
|
|
3925
|
+
/**
|
|
3926
|
+
* Enable rendering of vertical bracket pair guides.
|
|
3927
|
+
* Defaults to 'active'.
|
|
3928
|
+
*/
|
|
3929
|
+
bracketPairsHorizontal?: boolean | 'active';
|
|
3930
|
+
/**
|
|
3931
|
+
* Enable highlighting of the active bracket pair.
|
|
3932
|
+
* Defaults to true.
|
|
3933
|
+
*/
|
|
3934
|
+
highlightActiveBracketPair?: boolean;
|
|
3935
|
+
/**
|
|
3936
|
+
* Enable rendering of indent guides.
|
|
3937
|
+
* Defaults to true.
|
|
3938
|
+
*/
|
|
3939
|
+
indentation?: boolean;
|
|
3940
|
+
/**
|
|
3941
|
+
* Enable highlighting of the active indent guide.
|
|
3942
|
+
* Defaults to true.
|
|
3943
|
+
*/
|
|
3944
|
+
highlightActiveIndentation?: boolean;
|
|
3945
|
+
}
|
|
3946
|
+
|
|
3820
3947
|
/**
|
|
3821
3948
|
* Configuration options for editor suggest widget
|
|
3822
3949
|
*/
|
|
@@ -3849,6 +3976,14 @@ declare namespace monaco.editor {
|
|
|
3849
3976
|
* Enable or disable the suggest status bar.
|
|
3850
3977
|
*/
|
|
3851
3978
|
showStatusBar?: boolean;
|
|
3979
|
+
/**
|
|
3980
|
+
* Enable or disable the rendering of the suggestion preview.
|
|
3981
|
+
*/
|
|
3982
|
+
preview?: boolean;
|
|
3983
|
+
/**
|
|
3984
|
+
* Configures the mode of the preview.
|
|
3985
|
+
*/
|
|
3986
|
+
previewMode?: 'prefix' | 'subword' | 'subwordSmart';
|
|
3852
3987
|
/**
|
|
3853
3988
|
* Show details inline with the label. Defaults to true.
|
|
3854
3989
|
*/
|
|
@@ -3865,6 +4000,10 @@ declare namespace monaco.editor {
|
|
|
3865
4000
|
* Show constructor-suggestions.
|
|
3866
4001
|
*/
|
|
3867
4002
|
showConstructors?: boolean;
|
|
4003
|
+
/**
|
|
4004
|
+
* Show deprecated-suggestions.
|
|
4005
|
+
*/
|
|
4006
|
+
showDeprecated?: boolean;
|
|
3868
4007
|
/**
|
|
3869
4008
|
* Show field-suggestions.
|
|
3870
4009
|
*/
|
|
@@ -3963,14 +4102,10 @@ declare namespace monaco.editor {
|
|
|
3963
4102
|
showSnippets?: boolean;
|
|
3964
4103
|
}
|
|
3965
4104
|
|
|
3966
|
-
export type InternalSuggestOptions = Readonly<Required<ISuggestOptions>>;
|
|
3967
|
-
|
|
3968
4105
|
export interface ISmartSelectOptions {
|
|
3969
4106
|
selectLeadingAndTrailingWhitespace?: boolean;
|
|
3970
4107
|
}
|
|
3971
4108
|
|
|
3972
|
-
export type SmartSelectOptions = Readonly<Required<ISmartSelectOptions>>;
|
|
3973
|
-
|
|
3974
4109
|
/**
|
|
3975
4110
|
* Describes how to indent wrapped lines.
|
|
3976
4111
|
*/
|
|
@@ -4013,124 +4148,128 @@ declare namespace monaco.editor {
|
|
|
4013
4148
|
autoIndent = 9,
|
|
4014
4149
|
automaticLayout = 10,
|
|
4015
4150
|
autoSurround = 11,
|
|
4016
|
-
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
|
|
4020
|
-
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
|
|
4047
|
-
|
|
4048
|
-
|
|
4049
|
-
|
|
4050
|
-
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
|
|
4057
|
-
|
|
4058
|
-
|
|
4059
|
-
|
|
4060
|
-
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
|
|
4084
|
-
|
|
4085
|
-
|
|
4086
|
-
|
|
4087
|
-
|
|
4088
|
-
|
|
4089
|
-
|
|
4090
|
-
|
|
4091
|
-
|
|
4092
|
-
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
|
|
4151
|
+
bracketPairColorization = 12,
|
|
4152
|
+
guides = 13,
|
|
4153
|
+
codeLens = 14,
|
|
4154
|
+
codeLensFontFamily = 15,
|
|
4155
|
+
codeLensFontSize = 16,
|
|
4156
|
+
colorDecorators = 17,
|
|
4157
|
+
columnSelection = 18,
|
|
4158
|
+
comments = 19,
|
|
4159
|
+
contextmenu = 20,
|
|
4160
|
+
copyWithSyntaxHighlighting = 21,
|
|
4161
|
+
cursorBlinking = 22,
|
|
4162
|
+
cursorSmoothCaretAnimation = 23,
|
|
4163
|
+
cursorStyle = 24,
|
|
4164
|
+
cursorSurroundingLines = 25,
|
|
4165
|
+
cursorSurroundingLinesStyle = 26,
|
|
4166
|
+
cursorWidth = 27,
|
|
4167
|
+
disableLayerHinting = 28,
|
|
4168
|
+
disableMonospaceOptimizations = 29,
|
|
4169
|
+
domReadOnly = 30,
|
|
4170
|
+
dragAndDrop = 31,
|
|
4171
|
+
emptySelectionClipboard = 32,
|
|
4172
|
+
extraEditorClassName = 33,
|
|
4173
|
+
fastScrollSensitivity = 34,
|
|
4174
|
+
find = 35,
|
|
4175
|
+
fixedOverflowWidgets = 36,
|
|
4176
|
+
folding = 37,
|
|
4177
|
+
foldingStrategy = 38,
|
|
4178
|
+
foldingHighlight = 39,
|
|
4179
|
+
foldingImportsByDefault = 40,
|
|
4180
|
+
unfoldOnClickAfterEndOfLine = 41,
|
|
4181
|
+
fontFamily = 42,
|
|
4182
|
+
fontInfo = 43,
|
|
4183
|
+
fontLigatures = 44,
|
|
4184
|
+
fontSize = 45,
|
|
4185
|
+
fontWeight = 46,
|
|
4186
|
+
formatOnPaste = 47,
|
|
4187
|
+
formatOnType = 48,
|
|
4188
|
+
glyphMargin = 49,
|
|
4189
|
+
gotoLocation = 50,
|
|
4190
|
+
hideCursorInOverviewRuler = 51,
|
|
4191
|
+
hover = 52,
|
|
4192
|
+
inDiffEditor = 53,
|
|
4193
|
+
inlineSuggest = 54,
|
|
4194
|
+
letterSpacing = 55,
|
|
4195
|
+
lightbulb = 56,
|
|
4196
|
+
lineDecorationsWidth = 57,
|
|
4197
|
+
lineHeight = 58,
|
|
4198
|
+
lineNumbers = 59,
|
|
4199
|
+
lineNumbersMinChars = 60,
|
|
4200
|
+
linkedEditing = 61,
|
|
4201
|
+
links = 62,
|
|
4202
|
+
matchBrackets = 63,
|
|
4203
|
+
minimap = 64,
|
|
4204
|
+
mouseStyle = 65,
|
|
4205
|
+
mouseWheelScrollSensitivity = 66,
|
|
4206
|
+
mouseWheelZoom = 67,
|
|
4207
|
+
multiCursorMergeOverlapping = 68,
|
|
4208
|
+
multiCursorModifier = 69,
|
|
4209
|
+
multiCursorPaste = 70,
|
|
4210
|
+
occurrencesHighlight = 71,
|
|
4211
|
+
overviewRulerBorder = 72,
|
|
4212
|
+
overviewRulerLanes = 73,
|
|
4213
|
+
padding = 74,
|
|
4214
|
+
parameterHints = 75,
|
|
4215
|
+
peekWidgetDefaultFocus = 76,
|
|
4216
|
+
definitionLinkOpensInPeek = 77,
|
|
4217
|
+
quickSuggestions = 78,
|
|
4218
|
+
quickSuggestionsDelay = 79,
|
|
4219
|
+
readOnly = 80,
|
|
4220
|
+
renameOnType = 81,
|
|
4221
|
+
renderControlCharacters = 82,
|
|
4222
|
+
renderFinalNewline = 83,
|
|
4223
|
+
renderLineHighlight = 84,
|
|
4224
|
+
renderLineHighlightOnlyWhenFocus = 85,
|
|
4225
|
+
renderValidationDecorations = 86,
|
|
4226
|
+
renderWhitespace = 87,
|
|
4227
|
+
revealHorizontalRightPadding = 88,
|
|
4228
|
+
roundedSelection = 89,
|
|
4229
|
+
rulers = 90,
|
|
4230
|
+
scrollbar = 91,
|
|
4231
|
+
scrollBeyondLastColumn = 92,
|
|
4232
|
+
scrollBeyondLastLine = 93,
|
|
4233
|
+
scrollPredominantAxis = 94,
|
|
4234
|
+
selectionClipboard = 95,
|
|
4235
|
+
selectionHighlight = 96,
|
|
4236
|
+
selectOnLineNumbers = 97,
|
|
4237
|
+
showFoldingControls = 98,
|
|
4238
|
+
showUnused = 99,
|
|
4239
|
+
snippetSuggestions = 100,
|
|
4240
|
+
smartSelect = 101,
|
|
4241
|
+
smoothScrolling = 102,
|
|
4242
|
+
stickyTabStops = 103,
|
|
4243
|
+
stopRenderingLineAfter = 104,
|
|
4244
|
+
suggest = 105,
|
|
4245
|
+
suggestFontSize = 106,
|
|
4246
|
+
suggestLineHeight = 107,
|
|
4247
|
+
suggestOnTriggerCharacters = 108,
|
|
4248
|
+
suggestSelection = 109,
|
|
4249
|
+
tabCompletion = 110,
|
|
4250
|
+
tabIndex = 111,
|
|
4251
|
+
unicodeHighlighting = 112,
|
|
4252
|
+
unusualLineTerminators = 113,
|
|
4253
|
+
useShadowDOM = 114,
|
|
4254
|
+
useTabStops = 115,
|
|
4255
|
+
wordSeparators = 116,
|
|
4256
|
+
wordWrap = 117,
|
|
4257
|
+
wordWrapBreakAfterCharacters = 118,
|
|
4258
|
+
wordWrapBreakBeforeCharacters = 119,
|
|
4259
|
+
wordWrapColumn = 120,
|
|
4260
|
+
wordWrapOverride1 = 121,
|
|
4261
|
+
wordWrapOverride2 = 122,
|
|
4262
|
+
wrappingIndent = 123,
|
|
4263
|
+
wrappingStrategy = 124,
|
|
4264
|
+
showDeprecated = 125,
|
|
4265
|
+
inlayHints = 126,
|
|
4266
|
+
editorClassName = 127,
|
|
4267
|
+
pixelRatio = 128,
|
|
4268
|
+
tabFocusMode = 129,
|
|
4269
|
+
layoutInfo = 130,
|
|
4270
|
+
wrappingInfo = 131
|
|
4133
4271
|
}
|
|
4272
|
+
|
|
4134
4273
|
export const EditorOptions: {
|
|
4135
4274
|
acceptSuggestionOnCommitCharacter: IEditorOption<EditorOption.acceptSuggestionOnCommitCharacter, boolean>;
|
|
4136
4275
|
acceptSuggestionOnEnter: IEditorOption<EditorOption.acceptSuggestionOnEnter, 'on' | 'off' | 'smart'>;
|
|
@@ -4144,13 +4283,15 @@ declare namespace monaco.editor {
|
|
|
4144
4283
|
autoIndent: IEditorOption<EditorOption.autoIndent, EditorAutoIndentStrategy>;
|
|
4145
4284
|
automaticLayout: IEditorOption<EditorOption.automaticLayout, boolean>;
|
|
4146
4285
|
autoSurround: IEditorOption<EditorOption.autoSurround, 'languageDefined' | 'never' | 'quotes' | 'brackets'>;
|
|
4286
|
+
bracketPairColorization: IEditorOption<EditorOption.bracketPairColorization, Readonly<Required<IBracketPairColorizationOptions>>>;
|
|
4287
|
+
bracketPairGuides: IEditorOption<EditorOption.guides, Readonly<Required<IGuidesOptions>>>;
|
|
4147
4288
|
stickyTabStops: IEditorOption<EditorOption.stickyTabStops, boolean>;
|
|
4148
4289
|
codeLens: IEditorOption<EditorOption.codeLens, boolean>;
|
|
4149
4290
|
codeLensFontFamily: IEditorOption<EditorOption.codeLensFontFamily, string>;
|
|
4150
4291
|
codeLensFontSize: IEditorOption<EditorOption.codeLensFontSize, number>;
|
|
4151
4292
|
colorDecorators: IEditorOption<EditorOption.colorDecorators, boolean>;
|
|
4152
4293
|
columnSelection: IEditorOption<EditorOption.columnSelection, boolean>;
|
|
4153
|
-
comments: IEditorOption<EditorOption.comments,
|
|
4294
|
+
comments: IEditorOption<EditorOption.comments, Readonly<Required<IEditorCommentsOptions>>>;
|
|
4154
4295
|
contextmenu: IEditorOption<EditorOption.contextmenu, boolean>;
|
|
4155
4296
|
copyWithSyntaxHighlighting: IEditorOption<EditorOption.copyWithSyntaxHighlighting, boolean>;
|
|
4156
4297
|
cursorBlinking: IEditorOption<EditorOption.cursorBlinking, TextEditorCursorBlinkingStyle>;
|
|
@@ -4166,11 +4307,12 @@ declare namespace monaco.editor {
|
|
|
4166
4307
|
emptySelectionClipboard: IEditorOption<EditorOption.emptySelectionClipboard, boolean>;
|
|
4167
4308
|
extraEditorClassName: IEditorOption<EditorOption.extraEditorClassName, string>;
|
|
4168
4309
|
fastScrollSensitivity: IEditorOption<EditorOption.fastScrollSensitivity, number>;
|
|
4169
|
-
find: IEditorOption<EditorOption.find,
|
|
4310
|
+
find: IEditorOption<EditorOption.find, Readonly<Required<IEditorFindOptions>>>;
|
|
4170
4311
|
fixedOverflowWidgets: IEditorOption<EditorOption.fixedOverflowWidgets, boolean>;
|
|
4171
4312
|
folding: IEditorOption<EditorOption.folding, boolean>;
|
|
4172
4313
|
foldingStrategy: IEditorOption<EditorOption.foldingStrategy, 'auto' | 'indentation'>;
|
|
4173
4314
|
foldingHighlight: IEditorOption<EditorOption.foldingHighlight, boolean>;
|
|
4315
|
+
foldingImportsByDefault: IEditorOption<EditorOption.foldingImportsByDefault, boolean>;
|
|
4174
4316
|
unfoldOnClickAfterEndOfLine: IEditorOption<EditorOption.unfoldOnClickAfterEndOfLine, boolean>;
|
|
4175
4317
|
fontFamily: IEditorOption<EditorOption.fontFamily, string>;
|
|
4176
4318
|
fontInfo: IEditorOption<EditorOption.fontInfo, FontInfo>;
|
|
@@ -4180,13 +4322,12 @@ declare namespace monaco.editor {
|
|
|
4180
4322
|
formatOnPaste: IEditorOption<EditorOption.formatOnPaste, boolean>;
|
|
4181
4323
|
formatOnType: IEditorOption<EditorOption.formatOnType, boolean>;
|
|
4182
4324
|
glyphMargin: IEditorOption<EditorOption.glyphMargin, boolean>;
|
|
4183
|
-
gotoLocation: IEditorOption<EditorOption.gotoLocation,
|
|
4325
|
+
gotoLocation: IEditorOption<EditorOption.gotoLocation, Readonly<Required<IGotoLocationOptions>>>;
|
|
4184
4326
|
hideCursorInOverviewRuler: IEditorOption<EditorOption.hideCursorInOverviewRuler, boolean>;
|
|
4185
|
-
|
|
4186
|
-
hover: IEditorOption<EditorOption.hover, EditorHoverOptions>;
|
|
4327
|
+
hover: IEditorOption<EditorOption.hover, Readonly<Required<IEditorHoverOptions>>>;
|
|
4187
4328
|
inDiffEditor: IEditorOption<EditorOption.inDiffEditor, boolean>;
|
|
4188
4329
|
letterSpacing: IEditorOption<EditorOption.letterSpacing, number>;
|
|
4189
|
-
lightbulb: IEditorOption<EditorOption.lightbulb,
|
|
4330
|
+
lightbulb: IEditorOption<EditorOption.lightbulb, Readonly<Required<IEditorLightbulbOptions>>>;
|
|
4190
4331
|
lineDecorationsWidth: IEditorOption<EditorOption.lineDecorationsWidth, string | number>;
|
|
4191
4332
|
lineHeight: IEditorOption<EditorOption.lineHeight, number>;
|
|
4192
4333
|
lineNumbers: IEditorOption<EditorOption.lineNumbers, InternalEditorRenderLineNumbersOptions>;
|
|
@@ -4194,7 +4335,7 @@ declare namespace monaco.editor {
|
|
|
4194
4335
|
linkedEditing: IEditorOption<EditorOption.linkedEditing, boolean>;
|
|
4195
4336
|
links: IEditorOption<EditorOption.links, boolean>;
|
|
4196
4337
|
matchBrackets: IEditorOption<EditorOption.matchBrackets, 'always' | 'never' | 'near'>;
|
|
4197
|
-
minimap: IEditorOption<EditorOption.minimap,
|
|
4338
|
+
minimap: IEditorOption<EditorOption.minimap, Readonly<Required<IEditorMinimapOptions>>>;
|
|
4198
4339
|
mouseStyle: IEditorOption<EditorOption.mouseStyle, 'default' | 'text' | 'copy'>;
|
|
4199
4340
|
mouseWheelScrollSensitivity: IEditorOption<EditorOption.mouseWheelScrollSensitivity, number>;
|
|
4200
4341
|
mouseWheelZoom: IEditorOption<EditorOption.mouseWheelZoom, boolean>;
|
|
@@ -4204,16 +4345,15 @@ declare namespace monaco.editor {
|
|
|
4204
4345
|
occurrencesHighlight: IEditorOption<EditorOption.occurrencesHighlight, boolean>;
|
|
4205
4346
|
overviewRulerBorder: IEditorOption<EditorOption.overviewRulerBorder, boolean>;
|
|
4206
4347
|
overviewRulerLanes: IEditorOption<EditorOption.overviewRulerLanes, number>;
|
|
4207
|
-
padding: IEditorOption<EditorOption.padding,
|
|
4208
|
-
parameterHints: IEditorOption<EditorOption.parameterHints,
|
|
4348
|
+
padding: IEditorOption<EditorOption.padding, Readonly<Required<IEditorPaddingOptions>>>;
|
|
4349
|
+
parameterHints: IEditorOption<EditorOption.parameterHints, Readonly<Required<IEditorParameterHintOptions>>>;
|
|
4209
4350
|
peekWidgetDefaultFocus: IEditorOption<EditorOption.peekWidgetDefaultFocus, 'tree' | 'editor'>;
|
|
4210
4351
|
definitionLinkOpensInPeek: IEditorOption<EditorOption.definitionLinkOpensInPeek, boolean>;
|
|
4211
|
-
quickSuggestions: IEditorOption<EditorOption.quickSuggestions,
|
|
4352
|
+
quickSuggestions: IEditorOption<EditorOption.quickSuggestions, any>;
|
|
4212
4353
|
quickSuggestionsDelay: IEditorOption<EditorOption.quickSuggestionsDelay, number>;
|
|
4213
4354
|
readOnly: IEditorOption<EditorOption.readOnly, boolean>;
|
|
4214
4355
|
renameOnType: IEditorOption<EditorOption.renameOnType, boolean>;
|
|
4215
4356
|
renderControlCharacters: IEditorOption<EditorOption.renderControlCharacters, boolean>;
|
|
4216
|
-
renderIndentGuides: IEditorOption<EditorOption.renderIndentGuides, boolean>;
|
|
4217
4357
|
renderFinalNewline: IEditorOption<EditorOption.renderFinalNewline, boolean>;
|
|
4218
4358
|
renderLineHighlight: IEditorOption<EditorOption.renderLineHighlight, 'all' | 'line' | 'none' | 'gutter'>;
|
|
4219
4359
|
renderLineHighlightOnlyWhenFocus: IEditorOption<EditorOption.renderLineHighlightOnlyWhenFocus, boolean>;
|
|
@@ -4232,18 +4372,20 @@ declare namespace monaco.editor {
|
|
|
4232
4372
|
showFoldingControls: IEditorOption<EditorOption.showFoldingControls, 'always' | 'mouseover'>;
|
|
4233
4373
|
showUnused: IEditorOption<EditorOption.showUnused, boolean>;
|
|
4234
4374
|
showDeprecated: IEditorOption<EditorOption.showDeprecated, boolean>;
|
|
4235
|
-
|
|
4375
|
+
inlayHints: IEditorOption<EditorOption.inlayHints, Readonly<Required<IEditorInlayHintsOptions>>>;
|
|
4236
4376
|
snippetSuggestions: IEditorOption<EditorOption.snippetSuggestions, 'none' | 'top' | 'bottom' | 'inline'>;
|
|
4237
|
-
smartSelect: IEditorOption<EditorOption.smartSelect,
|
|
4377
|
+
smartSelect: IEditorOption<EditorOption.smartSelect, Readonly<Required<ISmartSelectOptions>>>;
|
|
4238
4378
|
smoothScrolling: IEditorOption<EditorOption.smoothScrolling, boolean>;
|
|
4239
4379
|
stopRenderingLineAfter: IEditorOption<EditorOption.stopRenderingLineAfter, number>;
|
|
4240
|
-
suggest: IEditorOption<EditorOption.suggest,
|
|
4380
|
+
suggest: IEditorOption<EditorOption.suggest, Readonly<Required<ISuggestOptions>>>;
|
|
4381
|
+
inlineSuggest: IEditorOption<EditorOption.inlineSuggest, Readonly<Required<IInlineSuggestOptions>>>;
|
|
4241
4382
|
suggestFontSize: IEditorOption<EditorOption.suggestFontSize, number>;
|
|
4242
4383
|
suggestLineHeight: IEditorOption<EditorOption.suggestLineHeight, number>;
|
|
4243
4384
|
suggestOnTriggerCharacters: IEditorOption<EditorOption.suggestOnTriggerCharacters, boolean>;
|
|
4244
4385
|
suggestSelection: IEditorOption<EditorOption.suggestSelection, 'first' | 'recentlyUsed' | 'recentlyUsedByPrefix'>;
|
|
4245
4386
|
tabCompletion: IEditorOption<EditorOption.tabCompletion, 'on' | 'off' | 'onlySnippets'>;
|
|
4246
4387
|
tabIndex: IEditorOption<EditorOption.tabIndex, number>;
|
|
4388
|
+
unicodeHighlight: IEditorOption<EditorOption.unicodeHighlighting, Required<Readonly<IUnicodeHighlightOptions>>>;
|
|
4247
4389
|
unusualLineTerminators: IEditorOption<EditorOption.unusualLineTerminators, 'auto' | 'off' | 'prompt'>;
|
|
4248
4390
|
useShadowDOM: IEditorOption<EditorOption.useShadowDOM, boolean>;
|
|
4249
4391
|
useTabStops: IEditorOption<EditorOption.useTabStops, boolean>;
|
|
@@ -4582,7 +4724,7 @@ declare namespace monaco.editor {
|
|
|
4582
4724
|
*/
|
|
4583
4725
|
export interface IPasteEvent {
|
|
4584
4726
|
readonly range: Range;
|
|
4585
|
-
readonly
|
|
4727
|
+
readonly languageId: string | null;
|
|
4586
4728
|
}
|
|
4587
4729
|
|
|
4588
4730
|
export interface IEditorConstructionOptions extends IEditorOptions {
|
|
@@ -4607,6 +4749,19 @@ declare namespace monaco.editor {
|
|
|
4607
4749
|
* Defaults to an internal DOM node.
|
|
4608
4750
|
*/
|
|
4609
4751
|
overflowWidgetsDomNode?: HTMLElement;
|
|
4752
|
+
/**
|
|
4753
|
+
* Aria label for original editor.
|
|
4754
|
+
*/
|
|
4755
|
+
originalAriaLabel?: string;
|
|
4756
|
+
/**
|
|
4757
|
+
* Aria label for modified editor.
|
|
4758
|
+
*/
|
|
4759
|
+
modifiedAriaLabel?: string;
|
|
4760
|
+
/**
|
|
4761
|
+
* Is the diff editor inside another editor
|
|
4762
|
+
* Defaults to false
|
|
4763
|
+
*/
|
|
4764
|
+
isInEmbeddedEditor?: boolean;
|
|
4610
4765
|
}
|
|
4611
4766
|
|
|
4612
4767
|
/**
|
|
@@ -4617,47 +4772,47 @@ declare namespace monaco.editor {
|
|
|
4617
4772
|
* An event emitted when the content of the current model has changed.
|
|
4618
4773
|
* @event
|
|
4619
4774
|
*/
|
|
4620
|
-
onDidChangeModelContent
|
|
4775
|
+
onDidChangeModelContent: IEvent<IModelContentChangedEvent>;
|
|
4621
4776
|
/**
|
|
4622
4777
|
* An event emitted when the language of the current model has changed.
|
|
4623
4778
|
* @event
|
|
4624
4779
|
*/
|
|
4625
|
-
onDidChangeModelLanguage
|
|
4780
|
+
onDidChangeModelLanguage: IEvent<IModelLanguageChangedEvent>;
|
|
4626
4781
|
/**
|
|
4627
4782
|
* An event emitted when the language configuration of the current model has changed.
|
|
4628
4783
|
* @event
|
|
4629
4784
|
*/
|
|
4630
|
-
onDidChangeModelLanguageConfiguration
|
|
4785
|
+
onDidChangeModelLanguageConfiguration: IEvent<IModelLanguageConfigurationChangedEvent>;
|
|
4631
4786
|
/**
|
|
4632
4787
|
* An event emitted when the options of the current model has changed.
|
|
4633
4788
|
* @event
|
|
4634
4789
|
*/
|
|
4635
|
-
onDidChangeModelOptions
|
|
4790
|
+
onDidChangeModelOptions: IEvent<IModelOptionsChangedEvent>;
|
|
4636
4791
|
/**
|
|
4637
4792
|
* An event emitted when the configuration of the editor has changed. (e.g. `editor.updateOptions()`)
|
|
4638
4793
|
* @event
|
|
4639
4794
|
*/
|
|
4640
|
-
onDidChangeConfiguration
|
|
4795
|
+
onDidChangeConfiguration: IEvent<ConfigurationChangedEvent>;
|
|
4641
4796
|
/**
|
|
4642
4797
|
* An event emitted when the cursor position has changed.
|
|
4643
4798
|
* @event
|
|
4644
4799
|
*/
|
|
4645
|
-
onDidChangeCursorPosition
|
|
4800
|
+
onDidChangeCursorPosition: IEvent<ICursorPositionChangedEvent>;
|
|
4646
4801
|
/**
|
|
4647
4802
|
* An event emitted when the cursor selection has changed.
|
|
4648
4803
|
* @event
|
|
4649
4804
|
*/
|
|
4650
|
-
onDidChangeCursorSelection
|
|
4805
|
+
onDidChangeCursorSelection: IEvent<ICursorSelectionChangedEvent>;
|
|
4651
4806
|
/**
|
|
4652
4807
|
* An event emitted when the model of this editor has changed (e.g. `editor.setModel()`).
|
|
4653
4808
|
* @event
|
|
4654
4809
|
*/
|
|
4655
|
-
onDidChangeModel
|
|
4810
|
+
onDidChangeModel: IEvent<IModelChangedEvent>;
|
|
4656
4811
|
/**
|
|
4657
4812
|
* An event emitted when the decorations of the current model have changed.
|
|
4658
4813
|
* @event
|
|
4659
4814
|
*/
|
|
4660
|
-
onDidChangeModelDecorations
|
|
4815
|
+
onDidChangeModelDecorations: IEvent<IModelDecorationsChangedEvent>;
|
|
4661
4816
|
/**
|
|
4662
4817
|
* An event emitted when the text inside this editor gained focus (i.e. cursor starts blinking).
|
|
4663
4818
|
* @event
|
|
@@ -4695,57 +4850,62 @@ declare namespace monaco.editor {
|
|
|
4695
4850
|
* An event emitted when users paste text in the editor.
|
|
4696
4851
|
* @event
|
|
4697
4852
|
*/
|
|
4698
|
-
onDidPaste
|
|
4853
|
+
onDidPaste: IEvent<IPasteEvent>;
|
|
4699
4854
|
/**
|
|
4700
4855
|
* An event emitted on a "mouseup".
|
|
4701
4856
|
* @event
|
|
4702
4857
|
*/
|
|
4703
|
-
onMouseUp
|
|
4858
|
+
onMouseUp: IEvent<IEditorMouseEvent>;
|
|
4704
4859
|
/**
|
|
4705
4860
|
* An event emitted on a "mousedown".
|
|
4706
4861
|
* @event
|
|
4707
4862
|
*/
|
|
4708
|
-
onMouseDown
|
|
4863
|
+
onMouseDown: IEvent<IEditorMouseEvent>;
|
|
4709
4864
|
/**
|
|
4710
4865
|
* An event emitted on a "contextmenu".
|
|
4711
4866
|
* @event
|
|
4712
4867
|
*/
|
|
4713
|
-
onContextMenu
|
|
4868
|
+
onContextMenu: IEvent<IEditorMouseEvent>;
|
|
4714
4869
|
/**
|
|
4715
4870
|
* An event emitted on a "mousemove".
|
|
4716
4871
|
* @event
|
|
4717
4872
|
*/
|
|
4718
|
-
onMouseMove
|
|
4873
|
+
onMouseMove: IEvent<IEditorMouseEvent>;
|
|
4719
4874
|
/**
|
|
4720
4875
|
* An event emitted on a "mouseleave".
|
|
4721
4876
|
* @event
|
|
4722
4877
|
*/
|
|
4723
|
-
onMouseLeave
|
|
4878
|
+
onMouseLeave: IEvent<IPartialEditorMouseEvent>;
|
|
4724
4879
|
/**
|
|
4725
4880
|
* An event emitted on a "keyup".
|
|
4726
4881
|
* @event
|
|
4727
4882
|
*/
|
|
4728
|
-
onKeyUp
|
|
4883
|
+
onKeyUp: IEvent<IKeyboardEvent>;
|
|
4729
4884
|
/**
|
|
4730
4885
|
* An event emitted on a "keydown".
|
|
4731
4886
|
* @event
|
|
4732
4887
|
*/
|
|
4733
|
-
onKeyDown
|
|
4888
|
+
onKeyDown: IEvent<IKeyboardEvent>;
|
|
4734
4889
|
/**
|
|
4735
4890
|
* An event emitted when the layout of the editor has changed.
|
|
4736
4891
|
* @event
|
|
4737
4892
|
*/
|
|
4738
|
-
onDidLayoutChange
|
|
4893
|
+
onDidLayoutChange: IEvent<EditorLayoutInfo>;
|
|
4739
4894
|
/**
|
|
4740
4895
|
* An event emitted when the content width or content height in the editor has changed.
|
|
4741
4896
|
* @event
|
|
4742
4897
|
*/
|
|
4743
|
-
onDidContentSizeChange
|
|
4898
|
+
onDidContentSizeChange: IEvent<IContentSizeChangedEvent>;
|
|
4744
4899
|
/**
|
|
4745
4900
|
* An event emitted when the scroll in the editor has changed.
|
|
4746
4901
|
* @event
|
|
4747
4902
|
*/
|
|
4748
|
-
onDidScrollChange
|
|
4903
|
+
onDidScrollChange: IEvent<IScrollEvent>;
|
|
4904
|
+
/**
|
|
4905
|
+
* An event emitted when hidden areas change in the editor (e.g. due to folding).
|
|
4906
|
+
* @event
|
|
4907
|
+
*/
|
|
4908
|
+
onDidChangeHiddenAreas: IEvent<void>;
|
|
4749
4909
|
/**
|
|
4750
4910
|
* Saves current view state of the editor in a serializable object.
|
|
4751
4911
|
*/
|
|
@@ -4791,7 +4951,7 @@ declare namespace monaco.editor {
|
|
|
4791
4951
|
getRawOptions(): IEditorOptions;
|
|
4792
4952
|
/**
|
|
4793
4953
|
* Get value of the current model attached to this editor.
|
|
4794
|
-
* @see
|
|
4954
|
+
* @see {@link ITextModel.getValue}
|
|
4795
4955
|
*/
|
|
4796
4956
|
getValue(options?: {
|
|
4797
4957
|
preserveBOM: boolean;
|
|
@@ -4799,7 +4959,7 @@ declare namespace monaco.editor {
|
|
|
4799
4959
|
}): string;
|
|
4800
4960
|
/**
|
|
4801
4961
|
* Set the value of the current model attached to this editor.
|
|
4802
|
-
* @see
|
|
4962
|
+
* @see {@link ITextModel.setValue}
|
|
4803
4963
|
*/
|
|
4804
4964
|
setValue(newValue: string): void;
|
|
4805
4965
|
/**
|
|
@@ -4881,7 +5041,7 @@ declare namespace monaco.editor {
|
|
|
4881
5041
|
getLineDecorations(lineNumber: number): IModelDecoration[] | null;
|
|
4882
5042
|
/**
|
|
4883
5043
|
* All decorations added through this call will get the ownerId of this editor.
|
|
4884
|
-
* @see
|
|
5044
|
+
* @see {@link ITextModel.deltaDecorations}
|
|
4885
5045
|
*/
|
|
4886
5046
|
deltaDecorations(oldDecorations: string[], newDecorations: IModelDeltaDecoration[]): string[];
|
|
4887
5047
|
/**
|
|
@@ -4972,6 +5132,7 @@ declare namespace monaco.editor {
|
|
|
4972
5132
|
* Apply the same font settings as the editor to `target`.
|
|
4973
5133
|
*/
|
|
4974
5134
|
applyFontInfo(target: HTMLElement): void;
|
|
5135
|
+
setBanner(bannerDomNode: HTMLElement | null, height: number): void;
|
|
4975
5136
|
}
|
|
4976
5137
|
|
|
4977
5138
|
/**
|
|
@@ -4986,7 +5147,7 @@ declare namespace monaco.editor {
|
|
|
4986
5147
|
*/
|
|
4987
5148
|
export interface IDiffEditor extends IEditor {
|
|
4988
5149
|
/**
|
|
4989
|
-
* @see ICodeEditor.getDomNode
|
|
5150
|
+
* @see {@link ICodeEditor.getDomNode}
|
|
4990
5151
|
*/
|
|
4991
5152
|
getDomNode(): HTMLElement;
|
|
4992
5153
|
/**
|
|
@@ -5261,7 +5422,7 @@ declare namespace monaco.languages {
|
|
|
5261
5422
|
/**
|
|
5262
5423
|
* Register a code action provider (used by e.g. quick fix).
|
|
5263
5424
|
*/
|
|
5264
|
-
export function registerCodeActionProvider(languageId: string, provider: CodeActionProvider): IDisposable;
|
|
5425
|
+
export function registerCodeActionProvider(languageId: string, provider: CodeActionProvider, metadata?: CodeActionProviderMetadata): IDisposable;
|
|
5265
5426
|
|
|
5266
5427
|
/**
|
|
5267
5428
|
* Register a formatter that can handle only entire models.
|
|
@@ -5318,6 +5479,16 @@ declare namespace monaco.languages {
|
|
|
5318
5479
|
*/
|
|
5319
5480
|
export function registerDocumentRangeSemanticTokensProvider(languageId: string, provider: DocumentRangeSemanticTokensProvider): IDisposable;
|
|
5320
5481
|
|
|
5482
|
+
/**
|
|
5483
|
+
* Register an inline completions provider.
|
|
5484
|
+
*/
|
|
5485
|
+
export function registerInlineCompletionsProvider(languageId: string, provider: InlineCompletionsProvider): IDisposable;
|
|
5486
|
+
|
|
5487
|
+
/**
|
|
5488
|
+
* Register an inlay hints provider.
|
|
5489
|
+
*/
|
|
5490
|
+
export function registerInlayHintsProvider(languageId: string, provider: InlayHintsProvider): IDisposable;
|
|
5491
|
+
|
|
5321
5492
|
/**
|
|
5322
5493
|
* Contains additional diagnostic information about the context in which
|
|
5323
5494
|
* a [code action](#CodeActionProvider.provideCodeActions) is run.
|
|
@@ -5342,6 +5513,25 @@ declare namespace monaco.languages {
|
|
|
5342
5513
|
* Provide commands for the given document and range.
|
|
5343
5514
|
*/
|
|
5344
5515
|
provideCodeActions(model: editor.ITextModel, range: Range, context: CodeActionContext, token: CancellationToken): ProviderResult<CodeActionList>;
|
|
5516
|
+
/**
|
|
5517
|
+
* Given a code action fill in the edit. Will only invoked when missing.
|
|
5518
|
+
*/
|
|
5519
|
+
resolveCodeAction?(codeAction: CodeAction, token: CancellationToken): ProviderResult<CodeAction>;
|
|
5520
|
+
}
|
|
5521
|
+
|
|
5522
|
+
/**
|
|
5523
|
+
* Metadata about the type of code actions that a {@link CodeActionProvider} provides.
|
|
5524
|
+
*/
|
|
5525
|
+
export interface CodeActionProviderMetadata {
|
|
5526
|
+
/**
|
|
5527
|
+
* List of code action kinds that a {@link CodeActionProvider} may return.
|
|
5528
|
+
*
|
|
5529
|
+
* This list is used to determine if a given `CodeActionProvider` should be invoked or not.
|
|
5530
|
+
* To avoid unnecessary computation, every `CodeActionProvider` should list use `providedCodeActionKinds`. The
|
|
5531
|
+
* list of kinds may either be generic, such as `["quickfix", "refactor", "source"]`, or list out every kind provided,
|
|
5532
|
+
* such as `["quickfix.removeLine", "source.fixAll" ...]`.
|
|
5533
|
+
*/
|
|
5534
|
+
readonly providedCodeActionKinds?: readonly string[];
|
|
5345
5535
|
}
|
|
5346
5536
|
|
|
5347
5537
|
/**
|
|
@@ -5399,6 +5589,11 @@ declare namespace monaco.languages {
|
|
|
5399
5589
|
* settings will be used.
|
|
5400
5590
|
*/
|
|
5401
5591
|
surroundingPairs?: IAutoClosingPair[];
|
|
5592
|
+
/**
|
|
5593
|
+
* Defines a list of bracket pairs that are colorized depending on their nesting level.
|
|
5594
|
+
* If not set, the configured brackets will be used.
|
|
5595
|
+
*/
|
|
5596
|
+
colorizedBracketPairs?: CharacterPair[];
|
|
5402
5597
|
/**
|
|
5403
5598
|
* Defines what characters must be after the cursor for bracket or quote autoclosing to occur when using the \'languageDefined\' autoclosing setting.
|
|
5404
5599
|
*
|
|
@@ -5573,7 +5768,7 @@ declare namespace monaco.languages {
|
|
|
5573
5768
|
}
|
|
5574
5769
|
|
|
5575
5770
|
/**
|
|
5576
|
-
* A provider result represents the values a provider, like the
|
|
5771
|
+
* A provider result represents the values a provider, like the {@link HoverProvider},
|
|
5577
5772
|
* may return. For once this is the actual result type `T`, like `Hover`, or a thenable that resolves
|
|
5578
5773
|
* to that type `T`. In addition, `null` and `undefined` can be returned - either directly or from a
|
|
5579
5774
|
* thenable.
|
|
@@ -5642,22 +5837,9 @@ declare namespace monaco.languages {
|
|
|
5642
5837
|
}
|
|
5643
5838
|
|
|
5644
5839
|
export interface CompletionItemLabel {
|
|
5645
|
-
|
|
5646
|
-
|
|
5647
|
-
|
|
5648
|
-
name: string;
|
|
5649
|
-
/**
|
|
5650
|
-
* The parameters without the return type. Render after `name`.
|
|
5651
|
-
*/
|
|
5652
|
-
parameters?: string;
|
|
5653
|
-
/**
|
|
5654
|
-
* The fully qualified name, like package name or file path. Rendered after `signature`.
|
|
5655
|
-
*/
|
|
5656
|
-
qualifier?: string;
|
|
5657
|
-
/**
|
|
5658
|
-
* The return-type of a function or type of a property/variable. Rendered rightmost.
|
|
5659
|
-
*/
|
|
5660
|
-
type?: string;
|
|
5840
|
+
label: string;
|
|
5841
|
+
detail?: string;
|
|
5842
|
+
description?: string;
|
|
5661
5843
|
}
|
|
5662
5844
|
|
|
5663
5845
|
export enum CompletionItemTag {
|
|
@@ -5676,6 +5858,11 @@ declare namespace monaco.languages {
|
|
|
5676
5858
|
InsertAsSnippet = 4
|
|
5677
5859
|
}
|
|
5678
5860
|
|
|
5861
|
+
export interface CompletionItemRanges {
|
|
5862
|
+
insert: IRange;
|
|
5863
|
+
replace: IRange;
|
|
5864
|
+
}
|
|
5865
|
+
|
|
5679
5866
|
/**
|
|
5680
5867
|
* A completion item represents a text snippet that is
|
|
5681
5868
|
* proposed to complete text that is being typed.
|
|
@@ -5708,13 +5895,13 @@ declare namespace monaco.languages {
|
|
|
5708
5895
|
documentation?: string | IMarkdownString;
|
|
5709
5896
|
/**
|
|
5710
5897
|
* A string that should be used when comparing this item
|
|
5711
|
-
* with other items. When `falsy` the
|
|
5898
|
+
* with other items. When `falsy` the {@link CompletionItem.label label}
|
|
5712
5899
|
* is used.
|
|
5713
5900
|
*/
|
|
5714
5901
|
sortText?: string;
|
|
5715
5902
|
/**
|
|
5716
5903
|
* A string that should be used when filtering a set of
|
|
5717
|
-
* completion items. When `falsy` the
|
|
5904
|
+
* completion items. When `falsy` the {@link CompletionItem.label label}
|
|
5718
5905
|
* is used.
|
|
5719
5906
|
*/
|
|
5720
5907
|
filterText?: string;
|
|
@@ -5727,27 +5914,23 @@ declare namespace monaco.languages {
|
|
|
5727
5914
|
/**
|
|
5728
5915
|
* A string or snippet that should be inserted in a document when selecting
|
|
5729
5916
|
* this completion.
|
|
5730
|
-
* is used.
|
|
5731
5917
|
*/
|
|
5732
5918
|
insertText: string;
|
|
5733
5919
|
/**
|
|
5734
|
-
*
|
|
5920
|
+
* Additional rules (as bitmask) that should be applied when inserting
|
|
5735
5921
|
* this completion.
|
|
5736
5922
|
*/
|
|
5737
5923
|
insertTextRules?: CompletionItemInsertTextRule;
|
|
5738
5924
|
/**
|
|
5739
5925
|
* A range of text that should be replaced by this completion item.
|
|
5740
5926
|
*
|
|
5741
|
-
* Defaults to a range from the start of the
|
|
5927
|
+
* Defaults to a range from the start of the {@link TextDocument.getWordRangeAtPosition current word} to the
|
|
5742
5928
|
* current position.
|
|
5743
5929
|
*
|
|
5744
|
-
* *Note:* The range must be a
|
|
5745
|
-
*
|
|
5930
|
+
* *Note:* The range must be a {@link Range.isSingleLine single line} and it must
|
|
5931
|
+
* {@link Range.contains contain} the position at which completion has been {@link CompletionItemProvider.provideCompletionItems requested}.
|
|
5746
5932
|
*/
|
|
5747
|
-
range: IRange |
|
|
5748
|
-
insert: IRange;
|
|
5749
|
-
replace: IRange;
|
|
5750
|
-
};
|
|
5933
|
+
range: IRange | CompletionItemRanges;
|
|
5751
5934
|
/**
|
|
5752
5935
|
* An optional set of characters that when pressed while this completion is active will accept it first and
|
|
5753
5936
|
* then type that character. *Note* that all commit characters should have `length=1` and that superfluous
|
|
@@ -5783,7 +5966,7 @@ declare namespace monaco.languages {
|
|
|
5783
5966
|
|
|
5784
5967
|
/**
|
|
5785
5968
|
* Contains additional information about the context in which
|
|
5786
|
-
*
|
|
5969
|
+
* {@link CompletionItemProvider.provideCompletionItems completion provider} is triggered.
|
|
5787
5970
|
*/
|
|
5788
5971
|
export interface CompletionContext {
|
|
5789
5972
|
/**
|
|
@@ -5804,10 +5987,10 @@ declare namespace monaco.languages {
|
|
|
5804
5987
|
*
|
|
5805
5988
|
* When computing *complete* completion items is expensive, providers can optionally implement
|
|
5806
5989
|
* the `resolveCompletionItem`-function. In that case it is enough to return completion
|
|
5807
|
-
* items with a
|
|
5808
|
-
*
|
|
5990
|
+
* items with a {@link CompletionItem.label label} from the
|
|
5991
|
+
* {@link CompletionItemProvider.provideCompletionItems provideCompletionItems}-function. Subsequently,
|
|
5809
5992
|
* when a completion item is shown in the UI and gains focus this provider is asked to resolve
|
|
5810
|
-
* the item, like adding
|
|
5993
|
+
* the item, like adding {@link CompletionItem.documentation doc-comment} or {@link CompletionItem.detail details}.
|
|
5811
5994
|
*/
|
|
5812
5995
|
export interface CompletionItemProvider {
|
|
5813
5996
|
triggerCharacters?: string[];
|
|
@@ -5816,14 +5999,76 @@ declare namespace monaco.languages {
|
|
|
5816
5999
|
*/
|
|
5817
6000
|
provideCompletionItems(model: editor.ITextModel, position: Position, context: CompletionContext, token: CancellationToken): ProviderResult<CompletionList>;
|
|
5818
6001
|
/**
|
|
5819
|
-
* Given a completion item fill in more data, like
|
|
5820
|
-
* or
|
|
6002
|
+
* Given a completion item fill in more data, like {@link CompletionItem.documentation doc-comment}
|
|
6003
|
+
* or {@link CompletionItem.detail details}.
|
|
5821
6004
|
*
|
|
5822
6005
|
* The editor will only resolve a completion item once.
|
|
5823
6006
|
*/
|
|
5824
6007
|
resolveCompletionItem?(item: CompletionItem, token: CancellationToken): ProviderResult<CompletionItem>;
|
|
5825
6008
|
}
|
|
5826
6009
|
|
|
6010
|
+
/**
|
|
6011
|
+
* How an {@link InlineCompletionsProvider inline completion provider} was triggered.
|
|
6012
|
+
*/
|
|
6013
|
+
export enum InlineCompletionTriggerKind {
|
|
6014
|
+
/**
|
|
6015
|
+
* Completion was triggered automatically while editing.
|
|
6016
|
+
* It is sufficient to return a single completion item in this case.
|
|
6017
|
+
*/
|
|
6018
|
+
Automatic = 0,
|
|
6019
|
+
/**
|
|
6020
|
+
* Completion was triggered explicitly by a user gesture.
|
|
6021
|
+
* Return multiple completion items to enable cycling through them.
|
|
6022
|
+
*/
|
|
6023
|
+
Explicit = 1
|
|
6024
|
+
}
|
|
6025
|
+
|
|
6026
|
+
export interface InlineCompletionContext {
|
|
6027
|
+
/**
|
|
6028
|
+
* How the completion was triggered.
|
|
6029
|
+
*/
|
|
6030
|
+
readonly triggerKind: InlineCompletionTriggerKind;
|
|
6031
|
+
readonly selectedSuggestionInfo: SelectedSuggestionInfo | undefined;
|
|
6032
|
+
}
|
|
6033
|
+
|
|
6034
|
+
export interface SelectedSuggestionInfo {
|
|
6035
|
+
range: IRange;
|
|
6036
|
+
text: string;
|
|
6037
|
+
isSnippetText: boolean;
|
|
6038
|
+
completionKind: CompletionItemKind;
|
|
6039
|
+
}
|
|
6040
|
+
|
|
6041
|
+
export interface InlineCompletion {
|
|
6042
|
+
/**
|
|
6043
|
+
* The text to insert.
|
|
6044
|
+
* If the text contains a line break, the range must end at the end of a line.
|
|
6045
|
+
* If existing text should be replaced, the existing text must be a prefix of the text to insert.
|
|
6046
|
+
*/
|
|
6047
|
+
readonly text: string;
|
|
6048
|
+
/**
|
|
6049
|
+
* The range to replace.
|
|
6050
|
+
* Must begin and end on the same line.
|
|
6051
|
+
*/
|
|
6052
|
+
readonly range?: IRange;
|
|
6053
|
+
readonly command?: Command;
|
|
6054
|
+
}
|
|
6055
|
+
|
|
6056
|
+
export interface InlineCompletions<TItem extends InlineCompletion = InlineCompletion> {
|
|
6057
|
+
readonly items: readonly TItem[];
|
|
6058
|
+
}
|
|
6059
|
+
|
|
6060
|
+
export interface InlineCompletionsProvider<T extends InlineCompletions = InlineCompletions> {
|
|
6061
|
+
provideInlineCompletions(model: editor.ITextModel, position: Position, context: InlineCompletionContext, token: CancellationToken): ProviderResult<T>;
|
|
6062
|
+
/**
|
|
6063
|
+
* Will be called when an item is shown.
|
|
6064
|
+
*/
|
|
6065
|
+
handleItemDidShow?(completions: T, item: T['items'][number]): void;
|
|
6066
|
+
/**
|
|
6067
|
+
* Will be called when a completions list is no longer in use and can be garbage-collected.
|
|
6068
|
+
*/
|
|
6069
|
+
freeInlineCompletions(completions: T): void;
|
|
6070
|
+
}
|
|
6071
|
+
|
|
5827
6072
|
export interface CodeAction {
|
|
5828
6073
|
title: string;
|
|
5829
6074
|
command?: Command;
|
|
@@ -5962,7 +6207,7 @@ declare namespace monaco.languages {
|
|
|
5962
6207
|
*/
|
|
5963
6208
|
range: IRange;
|
|
5964
6209
|
/**
|
|
5965
|
-
* The highlight kind, default is
|
|
6210
|
+
* The highlight kind, default is {@link DocumentHighlightKind.Text text}.
|
|
5966
6211
|
*/
|
|
5967
6212
|
kind?: DocumentHighlightKind;
|
|
5968
6213
|
}
|
|
@@ -6289,12 +6534,12 @@ declare namespace monaco.languages {
|
|
|
6289
6534
|
*/
|
|
6290
6535
|
label: string;
|
|
6291
6536
|
/**
|
|
6292
|
-
* An
|
|
6537
|
+
* An {@link TextEdit edit} which is applied to a document when selecting
|
|
6293
6538
|
* this presentation for the color.
|
|
6294
6539
|
*/
|
|
6295
6540
|
textEdit?: TextEdit;
|
|
6296
6541
|
/**
|
|
6297
|
-
* An optional array of additional
|
|
6542
|
+
* An optional array of additional {@link TextEdit text edits} that are applied when
|
|
6298
6543
|
* selecting this color presentation.
|
|
6299
6544
|
*/
|
|
6300
6545
|
additionalTextEdits?: TextEdit[];
|
|
@@ -6366,10 +6611,10 @@ declare namespace monaco.languages {
|
|
|
6366
6611
|
*/
|
|
6367
6612
|
end: number;
|
|
6368
6613
|
/**
|
|
6369
|
-
* Describes the
|
|
6370
|
-
*
|
|
6614
|
+
* Describes the {@link FoldingRangeKind Kind} of the folding range such as {@link FoldingRangeKind.Comment Comment} or
|
|
6615
|
+
* {@link FoldingRangeKind.Region Region}. The kind is used to categorize folding ranges and used by commands
|
|
6371
6616
|
* like 'Fold all comments'. See
|
|
6372
|
-
*
|
|
6617
|
+
* {@link FoldingRangeKind} for an enumeration of standardized kinds.
|
|
6373
6618
|
*/
|
|
6374
6619
|
kind?: FoldingRangeKind;
|
|
6375
6620
|
}
|
|
@@ -6390,7 +6635,7 @@ declare namespace monaco.languages {
|
|
|
6390
6635
|
*/
|
|
6391
6636
|
static readonly Region: FoldingRangeKind;
|
|
6392
6637
|
/**
|
|
6393
|
-
* Creates a new
|
|
6638
|
+
* Creates a new {@link FoldingRangeKind}.
|
|
6394
6639
|
*
|
|
6395
6640
|
* @param value of the kind.
|
|
6396
6641
|
*/
|
|
@@ -6470,24 +6715,23 @@ declare namespace monaco.languages {
|
|
|
6470
6715
|
resolveCodeLens?(model: editor.ITextModel, codeLens: CodeLens, token: CancellationToken): ProviderResult<CodeLens>;
|
|
6471
6716
|
}
|
|
6472
6717
|
|
|
6473
|
-
export enum
|
|
6718
|
+
export enum InlayHintKind {
|
|
6474
6719
|
Other = 0,
|
|
6475
6720
|
Type = 1,
|
|
6476
6721
|
Parameter = 2
|
|
6477
6722
|
}
|
|
6478
6723
|
|
|
6479
|
-
export interface
|
|
6724
|
+
export interface InlayHint {
|
|
6480
6725
|
text: string;
|
|
6481
|
-
|
|
6482
|
-
kind:
|
|
6483
|
-
description?: string | IMarkdownString;
|
|
6726
|
+
position: IPosition;
|
|
6727
|
+
kind: InlayHintKind;
|
|
6484
6728
|
whitespaceBefore?: boolean;
|
|
6485
6729
|
whitespaceAfter?: boolean;
|
|
6486
6730
|
}
|
|
6487
6731
|
|
|
6488
|
-
export interface
|
|
6489
|
-
|
|
6490
|
-
|
|
6732
|
+
export interface InlayHintsProvider {
|
|
6733
|
+
onDidChangeInlayHints?: IEvent<void>;
|
|
6734
|
+
provideInlayHints(model: editor.ITextModel, range: Range, token: CancellationToken): ProviderResult<InlayHint[]>;
|
|
6491
6735
|
}
|
|
6492
6736
|
|
|
6493
6737
|
export interface SemanticTokensLegend {
|
|
@@ -6705,7 +6949,6 @@ declare namespace monaco.worker {
|
|
|
6705
6949
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
6706
6950
|
*--------------------------------------------------------------------------------------------*/
|
|
6707
6951
|
|
|
6708
|
-
|
|
6709
6952
|
declare namespace monaco.languages.typescript {
|
|
6710
6953
|
export enum ModuleKind {
|
|
6711
6954
|
None = 0,
|
|
@@ -6748,15 +6991,7 @@ declare namespace monaco.languages.typescript {
|
|
|
6748
6991
|
interface MapLike<T> {
|
|
6749
6992
|
[index: string]: T;
|
|
6750
6993
|
}
|
|
6751
|
-
type CompilerOptionsValue =
|
|
6752
|
-
| string
|
|
6753
|
-
| number
|
|
6754
|
-
| boolean
|
|
6755
|
-
| (string | number)[]
|
|
6756
|
-
| string[]
|
|
6757
|
-
| MapLike<string[]>
|
|
6758
|
-
| null
|
|
6759
|
-
| undefined;
|
|
6994
|
+
type CompilerOptionsValue = string | number | boolean | (string | number)[] | string[] | MapLike<string[]> | null | undefined;
|
|
6760
6995
|
interface CompilerOptions {
|
|
6761
6996
|
allowJs?: boolean;
|
|
6762
6997
|
allowSyntheticDefaultImports?: boolean;
|
|
@@ -6855,6 +7090,15 @@ declare namespace monaco.languages.typescript {
|
|
|
6855
7090
|
/** A full HTTP path to a JavaScript file which adds a function `customTSWorkerFactory` to the self inside a web-worker */
|
|
6856
7091
|
customWorkerPath?: string;
|
|
6857
7092
|
}
|
|
7093
|
+
interface InlayHintsOptions {
|
|
7094
|
+
readonly includeInlayParameterNameHints?: 'none' | 'literals' | 'all';
|
|
7095
|
+
readonly includeInlayParameterNameHintsWhenArgumentMatchesName?: boolean;
|
|
7096
|
+
readonly includeInlayFunctionParameterTypeHints?: boolean;
|
|
7097
|
+
readonly includeInlayVariableTypeHints?: boolean;
|
|
7098
|
+
readonly includeInlayPropertyDeclarationTypeHints?: boolean;
|
|
7099
|
+
readonly includeInlayFunctionLikeReturnTypeHints?: boolean;
|
|
7100
|
+
readonly includeInlayEnumMemberValueHints?: boolean;
|
|
7101
|
+
}
|
|
6858
7102
|
interface IExtraLib {
|
|
6859
7103
|
content: string;
|
|
6860
7104
|
version: number;
|
|
@@ -6885,11 +7129,9 @@ declare namespace monaco.languages.typescript {
|
|
|
6885
7129
|
category: 0 | 1 | 2 | 3;
|
|
6886
7130
|
code: number;
|
|
6887
7131
|
/** TypeScriptWorker removes all but the `fileName` property to avoid serializing circular JSON structures. */
|
|
6888
|
-
file:
|
|
6889
|
-
|
|
6890
|
-
|
|
6891
|
-
}
|
|
6892
|
-
| undefined;
|
|
7132
|
+
file: {
|
|
7133
|
+
fileName: string;
|
|
7134
|
+
} | undefined;
|
|
6893
7135
|
start: number | undefined;
|
|
6894
7136
|
length: number | undefined;
|
|
6895
7137
|
messageText: string | DiagnosticMessageChain;
|
|
@@ -6913,6 +7155,7 @@ declare namespace monaco.languages.typescript {
|
|
|
6913
7155
|
*/
|
|
6914
7156
|
readonly onDidExtraLibsChange: IEvent<void>;
|
|
6915
7157
|
readonly workerOptions: WorkerOptions;
|
|
7158
|
+
readonly inlayHintsOptions: InlayHintsOptions;
|
|
6916
7159
|
/**
|
|
6917
7160
|
* Get the current extra libs registered with the language service.
|
|
6918
7161
|
*/
|
|
@@ -6934,12 +7177,10 @@ declare namespace monaco.languages.typescript {
|
|
|
6934
7177
|
* files that won't be loaded as editor documents, like `jquery.d.ts`.
|
|
6935
7178
|
* @param libs An array of entries to register.
|
|
6936
7179
|
*/
|
|
6937
|
-
setExtraLibs(
|
|
6938
|
-
|
|
6939
|
-
|
|
6940
|
-
|
|
6941
|
-
}[]
|
|
6942
|
-
): void;
|
|
7180
|
+
setExtraLibs(libs: {
|
|
7181
|
+
content: string;
|
|
7182
|
+
filePath?: string;
|
|
7183
|
+
}[]): void;
|
|
6943
7184
|
/**
|
|
6944
7185
|
* Get current TypeScript compiler options for the language service.
|
|
6945
7186
|
*/
|
|
@@ -6975,6 +7216,10 @@ declare namespace monaco.languages.typescript {
|
|
|
6975
7216
|
* to the worker on start or restart.
|
|
6976
7217
|
*/
|
|
6977
7218
|
getEagerModelSync(): boolean;
|
|
7219
|
+
/**
|
|
7220
|
+
* Configure inlay hints options.
|
|
7221
|
+
*/
|
|
7222
|
+
setInlayHintsOptions(options: InlayHintsOptions): void;
|
|
6978
7223
|
}
|
|
6979
7224
|
export interface TypeScriptWorker {
|
|
6980
7225
|
/**
|
|
@@ -7007,20 +7252,12 @@ declare namespace monaco.languages.typescript {
|
|
|
7007
7252
|
* Get code completion details for the given file, position, and entry.
|
|
7008
7253
|
* @returns `Promise<typescript.CompletionEntryDetails | undefined>`
|
|
7009
7254
|
*/
|
|
7010
|
-
getCompletionEntryDetails(
|
|
7011
|
-
fileName: string,
|
|
7012
|
-
position: number,
|
|
7013
|
-
entry: string
|
|
7014
|
-
): Promise<any | undefined>;
|
|
7255
|
+
getCompletionEntryDetails(fileName: string, position: number, entry: string): Promise<any | undefined>;
|
|
7015
7256
|
/**
|
|
7016
7257
|
* Get signature help items for the item at the given file and position.
|
|
7017
7258
|
* @returns `Promise<typescript.SignatureHelpItems | undefined>`
|
|
7018
7259
|
*/
|
|
7019
|
-
getSignatureHelpItems(
|
|
7020
|
-
fileName: string,
|
|
7021
|
-
position: number,
|
|
7022
|
-
options: any
|
|
7023
|
-
): Promise<any | undefined>;
|
|
7260
|
+
getSignatureHelpItems(fileName: string, position: number, options: any): Promise<any | undefined>;
|
|
7024
7261
|
/**
|
|
7025
7262
|
* Get quick info for the item at the given position in the file.
|
|
7026
7263
|
* @returns `Promise<typescript.QuickInfo | undefined>`
|
|
@@ -7030,18 +7267,12 @@ declare namespace monaco.languages.typescript {
|
|
|
7030
7267
|
* Get other ranges which are related to the item at the given position in the file (often used for highlighting).
|
|
7031
7268
|
* @returns `Promise<ReadonlyArray<typescript.ReferenceEntry> | undefined>`
|
|
7032
7269
|
*/
|
|
7033
|
-
getOccurrencesAtPosition(
|
|
7034
|
-
fileName: string,
|
|
7035
|
-
position: number
|
|
7036
|
-
): Promise<ReadonlyArray<any> | undefined>;
|
|
7270
|
+
getOccurrencesAtPosition(fileName: string, position: number): Promise<ReadonlyArray<any> | undefined>;
|
|
7037
7271
|
/**
|
|
7038
7272
|
* Get the definition of the item at the given position in the file.
|
|
7039
7273
|
* @returns `Promise<ReadonlyArray<typescript.DefinitionInfo> | undefined>`
|
|
7040
7274
|
*/
|
|
7041
|
-
getDefinitionAtPosition(
|
|
7042
|
-
fileName: string,
|
|
7043
|
-
position: number
|
|
7044
|
-
): Promise<ReadonlyArray<any> | undefined>;
|
|
7275
|
+
getDefinitionAtPosition(fileName: string, position: number): Promise<ReadonlyArray<any> | undefined>;
|
|
7045
7276
|
/**
|
|
7046
7277
|
* Get references to the item at the given position in the file.
|
|
7047
7278
|
* @returns `Promise<typescript.ReferenceEntry[] | undefined>`
|
|
@@ -7063,34 +7294,18 @@ declare namespace monaco.languages.typescript {
|
|
|
7063
7294
|
* @param options `typescript.FormatCodeOptions`
|
|
7064
7295
|
* @returns `Promise<typescript.TextChange[]>`
|
|
7065
7296
|
*/
|
|
7066
|
-
getFormattingEditsForRange(
|
|
7067
|
-
fileName: string,
|
|
7068
|
-
start: number,
|
|
7069
|
-
end: number,
|
|
7070
|
-
options: any
|
|
7071
|
-
): Promise<any[]>;
|
|
7297
|
+
getFormattingEditsForRange(fileName: string, start: number, end: number, options: any): Promise<any[]>;
|
|
7072
7298
|
/**
|
|
7073
7299
|
* Get formatting changes which should be applied after the given keystroke.
|
|
7074
7300
|
* @param options `typescript.FormatCodeOptions`
|
|
7075
7301
|
* @returns `Promise<typescript.TextChange[]>`
|
|
7076
7302
|
*/
|
|
7077
|
-
getFormattingEditsAfterKeystroke(
|
|
7078
|
-
fileName: string,
|
|
7079
|
-
postion: number,
|
|
7080
|
-
ch: string,
|
|
7081
|
-
options: any
|
|
7082
|
-
): Promise<any[]>;
|
|
7303
|
+
getFormattingEditsAfterKeystroke(fileName: string, postion: number, ch: string, options: any): Promise<any[]>;
|
|
7083
7304
|
/**
|
|
7084
7305
|
* Get other occurrences which should be updated when renaming the item at the given file and position.
|
|
7085
7306
|
* @returns `Promise<readonly typescript.RenameLocation[] | undefined>`
|
|
7086
7307
|
*/
|
|
7087
|
-
findRenameLocations(
|
|
7088
|
-
fileName: string,
|
|
7089
|
-
positon: number,
|
|
7090
|
-
findInStrings: boolean,
|
|
7091
|
-
findInComments: boolean,
|
|
7092
|
-
providePrefixAndSuffixTextForRename: boolean
|
|
7093
|
-
): Promise<readonly any[] | undefined>;
|
|
7308
|
+
findRenameLocations(fileName: string, positon: number, findInStrings: boolean, findInComments: boolean, providePrefixAndSuffixTextForRename: boolean): Promise<readonly any[] | undefined>;
|
|
7094
7309
|
/**
|
|
7095
7310
|
* Get edits which should be applied to rename the item at the given file and position (or a failure reason).
|
|
7096
7311
|
* @param options `typescript.RenameInfoOptions`
|
|
@@ -7107,13 +7322,13 @@ declare namespace monaco.languages.typescript {
|
|
|
7107
7322
|
* @param formatOptions `typescript.FormatCodeOptions`
|
|
7108
7323
|
* @returns `Promise<ReadonlyArray<typescript.CodeFixAction>>`
|
|
7109
7324
|
*/
|
|
7110
|
-
getCodeFixesAtPosition(
|
|
7111
|
-
|
|
7112
|
-
|
|
7113
|
-
|
|
7114
|
-
|
|
7115
|
-
|
|
7116
|
-
): Promise<ReadonlyArray<any>>;
|
|
7325
|
+
getCodeFixesAtPosition(fileName: string, start: number, end: number, errorCodes: number[], formatOptions: any): Promise<ReadonlyArray<any>>;
|
|
7326
|
+
/**
|
|
7327
|
+
* Get inlay hints in the range of the file.
|
|
7328
|
+
* @param fileName
|
|
7329
|
+
* @returns `Promise<typescript.InlayHint[]>`
|
|
7330
|
+
*/
|
|
7331
|
+
provideInlayHints(fileName: string, start: number, end: number): Promise<ReadonlyArray<any>>;
|
|
7117
7332
|
}
|
|
7118
7333
|
export const typescriptVersion: string;
|
|
7119
7334
|
export const typescriptDefaults: LanguageServiceDefaults;
|
|
@@ -7127,9 +7342,8 @@ declare namespace monaco.languages.typescript {
|
|
|
7127
7342
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
7128
7343
|
*--------------------------------------------------------------------------------------------*/
|
|
7129
7344
|
|
|
7130
|
-
|
|
7131
7345
|
declare namespace monaco.languages.css {
|
|
7132
|
-
export interface
|
|
7346
|
+
export interface Options {
|
|
7133
7347
|
readonly validate?: boolean;
|
|
7134
7348
|
readonly lint?: {
|
|
7135
7349
|
readonly compatibleVendorPrefixes?: 'ignore' | 'warning' | 'error';
|
|
@@ -7151,6 +7365,10 @@ declare namespace monaco.languages.css {
|
|
|
7151
7365
|
readonly float?: 'ignore' | 'warning' | 'error';
|
|
7152
7366
|
readonly idSelector?: 'ignore' | 'warning' | 'error';
|
|
7153
7367
|
};
|
|
7368
|
+
/**
|
|
7369
|
+
* Configures the CSS data types known by the langauge service.
|
|
7370
|
+
*/
|
|
7371
|
+
readonly data?: CSSDataConfiguration;
|
|
7154
7372
|
}
|
|
7155
7373
|
export interface ModeConfiguration {
|
|
7156
7374
|
/**
|
|
@@ -7201,14 +7419,92 @@ declare namespace monaco.languages.css {
|
|
|
7201
7419
|
export interface LanguageServiceDefaults {
|
|
7202
7420
|
readonly languageId: string;
|
|
7203
7421
|
readonly onDidChange: IEvent<LanguageServiceDefaults>;
|
|
7204
|
-
readonly diagnosticsOptions: DiagnosticsOptions;
|
|
7205
7422
|
readonly modeConfiguration: ModeConfiguration;
|
|
7206
|
-
|
|
7423
|
+
readonly options: Options;
|
|
7424
|
+
setOptions(options: Options): void;
|
|
7207
7425
|
setModeConfiguration(modeConfiguration: ModeConfiguration): void;
|
|
7426
|
+
/** @deprecated Use options instead */
|
|
7427
|
+
readonly diagnosticsOptions: DiagnosticsOptions;
|
|
7428
|
+
/** @deprecated Use setOptions instead */
|
|
7429
|
+
setDiagnosticsOptions(options: DiagnosticsOptions): void;
|
|
7208
7430
|
}
|
|
7431
|
+
/** @deprecated Use Options instead */
|
|
7432
|
+
export type DiagnosticsOptions = Options;
|
|
7209
7433
|
export const cssDefaults: LanguageServiceDefaults;
|
|
7210
7434
|
export const scssDefaults: LanguageServiceDefaults;
|
|
7211
7435
|
export const lessDefaults: LanguageServiceDefaults;
|
|
7436
|
+
export interface CSSDataConfiguration {
|
|
7437
|
+
/**
|
|
7438
|
+
* Defines whether the standard CSS properties, at-directives, pseudoClasses and pseudoElements are shown.
|
|
7439
|
+
*/
|
|
7440
|
+
useDefaultDataProvider?: boolean;
|
|
7441
|
+
/**
|
|
7442
|
+
* Provides a set of custom data providers.
|
|
7443
|
+
*/
|
|
7444
|
+
dataProviders?: {
|
|
7445
|
+
[providerId: string]: CSSDataV1;
|
|
7446
|
+
};
|
|
7447
|
+
}
|
|
7448
|
+
/**
|
|
7449
|
+
* Custom CSS properties, at-directives, pseudoClasses and pseudoElements
|
|
7450
|
+
* https://github.com/microsoft/vscode-css-languageservice/blob/main/docs/customData.md
|
|
7451
|
+
*/
|
|
7452
|
+
export interface CSSDataV1 {
|
|
7453
|
+
version: 1 | 1.1;
|
|
7454
|
+
properties?: IPropertyData[];
|
|
7455
|
+
atDirectives?: IAtDirectiveData[];
|
|
7456
|
+
pseudoClasses?: IPseudoClassData[];
|
|
7457
|
+
pseudoElements?: IPseudoElementData[];
|
|
7458
|
+
}
|
|
7459
|
+
export type EntryStatus = 'standard' | 'experimental' | 'nonstandard' | 'obsolete';
|
|
7460
|
+
export interface IReference {
|
|
7461
|
+
name: string;
|
|
7462
|
+
url: string;
|
|
7463
|
+
}
|
|
7464
|
+
export interface IPropertyData {
|
|
7465
|
+
name: string;
|
|
7466
|
+
description?: string | MarkupContent;
|
|
7467
|
+
browsers?: string[];
|
|
7468
|
+
restrictions?: string[];
|
|
7469
|
+
status?: EntryStatus;
|
|
7470
|
+
syntax?: string;
|
|
7471
|
+
values?: IValueData[];
|
|
7472
|
+
references?: IReference[];
|
|
7473
|
+
relevance?: number;
|
|
7474
|
+
}
|
|
7475
|
+
export interface IAtDirectiveData {
|
|
7476
|
+
name: string;
|
|
7477
|
+
description?: string | MarkupContent;
|
|
7478
|
+
browsers?: string[];
|
|
7479
|
+
status?: EntryStatus;
|
|
7480
|
+
references?: IReference[];
|
|
7481
|
+
}
|
|
7482
|
+
export interface IPseudoClassData {
|
|
7483
|
+
name: string;
|
|
7484
|
+
description?: string | MarkupContent;
|
|
7485
|
+
browsers?: string[];
|
|
7486
|
+
status?: EntryStatus;
|
|
7487
|
+
references?: IReference[];
|
|
7488
|
+
}
|
|
7489
|
+
export interface IPseudoElementData {
|
|
7490
|
+
name: string;
|
|
7491
|
+
description?: string | MarkupContent;
|
|
7492
|
+
browsers?: string[];
|
|
7493
|
+
status?: EntryStatus;
|
|
7494
|
+
references?: IReference[];
|
|
7495
|
+
}
|
|
7496
|
+
export interface IValueData {
|
|
7497
|
+
name: string;
|
|
7498
|
+
description?: string | MarkupContent;
|
|
7499
|
+
browsers?: string[];
|
|
7500
|
+
status?: EntryStatus;
|
|
7501
|
+
references?: IReference[];
|
|
7502
|
+
}
|
|
7503
|
+
export interface MarkupContent {
|
|
7504
|
+
kind: MarkupKind;
|
|
7505
|
+
value: string;
|
|
7506
|
+
}
|
|
7507
|
+
export type MarkupKind = 'plaintext' | 'markdown';
|
|
7212
7508
|
}
|
|
7213
7509
|
|
|
7214
7510
|
/*---------------------------------------------------------------------------------------------
|
|
@@ -7216,7 +7512,6 @@ declare namespace monaco.languages.css {
|
|
|
7216
7512
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
7217
7513
|
*--------------------------------------------------------------------------------------------*/
|
|
7218
7514
|
|
|
7219
|
-
|
|
7220
7515
|
declare namespace monaco.languages.json {
|
|
7221
7516
|
export interface DiagnosticsOptions {
|
|
7222
7517
|
/**
|
|
@@ -7329,7 +7624,6 @@ declare namespace monaco.languages.json {
|
|
|
7329
7624
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
7330
7625
|
*--------------------------------------------------------------------------------------------*/
|
|
7331
7626
|
|
|
7332
|
-
|
|
7333
7627
|
declare namespace monaco.languages.html {
|
|
7334
7628
|
export interface HTMLFormatConfiguration {
|
|
7335
7629
|
readonly tabSize: number;
|
|
@@ -7339,14 +7633,14 @@ declare namespace monaco.languages.html {
|
|
|
7339
7633
|
readonly contentUnformatted: string;
|
|
7340
7634
|
readonly indentInnerHtml: boolean;
|
|
7341
7635
|
readonly preserveNewLines: boolean;
|
|
7342
|
-
readonly maxPreserveNewLines: number;
|
|
7636
|
+
readonly maxPreserveNewLines: number | undefined;
|
|
7343
7637
|
readonly indentHandlebars: boolean;
|
|
7344
7638
|
readonly endWithNewline: boolean;
|
|
7345
7639
|
readonly extraLiners: string;
|
|
7346
7640
|
readonly wrapAttributes: 'auto' | 'force' | 'force-aligned' | 'force-expand-multiline';
|
|
7347
7641
|
}
|
|
7348
7642
|
export interface CompletionConfiguration {
|
|
7349
|
-
[
|
|
7643
|
+
readonly [providerId: string]: boolean;
|
|
7350
7644
|
}
|
|
7351
7645
|
export interface Options {
|
|
7352
7646
|
/**
|
|
@@ -7357,6 +7651,10 @@ declare namespace monaco.languages.html {
|
|
|
7357
7651
|
* A list of known schemas and/or associations of schemas to file names.
|
|
7358
7652
|
*/
|
|
7359
7653
|
readonly suggest?: CompletionConfiguration;
|
|
7654
|
+
/**
|
|
7655
|
+
* Configures the HTML data types known by the HTML langauge service.
|
|
7656
|
+
*/
|
|
7657
|
+
readonly data?: HTMLDataConfiguration;
|
|
7360
7658
|
}
|
|
7361
7659
|
export interface ModeConfiguration {
|
|
7362
7660
|
/**
|
|
@@ -7414,8 +7712,76 @@ declare namespace monaco.languages.html {
|
|
|
7414
7712
|
readonly onDidChange: IEvent<LanguageServiceDefaults>;
|
|
7415
7713
|
readonly options: Options;
|
|
7416
7714
|
setOptions(options: Options): void;
|
|
7715
|
+
setModeConfiguration(modeConfiguration: ModeConfiguration): void;
|
|
7417
7716
|
}
|
|
7717
|
+
export const htmlLanguageService: LanguageServiceRegistration;
|
|
7418
7718
|
export const htmlDefaults: LanguageServiceDefaults;
|
|
7719
|
+
export const handlebarLanguageService: LanguageServiceRegistration;
|
|
7419
7720
|
export const handlebarDefaults: LanguageServiceDefaults;
|
|
7721
|
+
export const razorLanguageService: LanguageServiceRegistration;
|
|
7420
7722
|
export const razorDefaults: LanguageServiceDefaults;
|
|
7723
|
+
export interface LanguageServiceRegistration extends IDisposable {
|
|
7724
|
+
readonly defaults: LanguageServiceDefaults;
|
|
7725
|
+
}
|
|
7726
|
+
/**
|
|
7727
|
+
* Registers a new HTML language service for the languageId.
|
|
7728
|
+
* Note: 'html', 'handlebar' and 'razor' are registered by default.
|
|
7729
|
+
*
|
|
7730
|
+
* Use this method to register additional language ids with a HTML service.
|
|
7731
|
+
* The language server has to be registered before an editor model is opened.
|
|
7732
|
+
*/
|
|
7733
|
+
export function registerHTMLLanguageService(languageId: string, options?: Options, modeConfiguration?: ModeConfiguration): LanguageServiceRegistration;
|
|
7734
|
+
export interface HTMLDataConfiguration {
|
|
7735
|
+
/**
|
|
7736
|
+
* Defines whether the standard HTML tags and attributes are shown
|
|
7737
|
+
*/
|
|
7738
|
+
readonly useDefaultDataProvider?: boolean;
|
|
7739
|
+
/**
|
|
7740
|
+
* Provides a set of custom data providers.
|
|
7741
|
+
*/
|
|
7742
|
+
readonly dataProviders?: {
|
|
7743
|
+
[providerId: string]: HTMLDataV1;
|
|
7744
|
+
};
|
|
7745
|
+
}
|
|
7746
|
+
/**
|
|
7747
|
+
* Custom HTML tags attributes and attribute values
|
|
7748
|
+
* https://github.com/microsoft/vscode-html-languageservice/blob/main/docs/customData.md
|
|
7749
|
+
*/
|
|
7750
|
+
export interface HTMLDataV1 {
|
|
7751
|
+
readonly version: 1 | 1.1;
|
|
7752
|
+
readonly tags?: ITagData[];
|
|
7753
|
+
readonly globalAttributes?: IAttributeData[];
|
|
7754
|
+
readonly valueSets?: IValueSet[];
|
|
7755
|
+
}
|
|
7756
|
+
export interface IReference {
|
|
7757
|
+
readonly name: string;
|
|
7758
|
+
readonly url: string;
|
|
7759
|
+
}
|
|
7760
|
+
export interface ITagData {
|
|
7761
|
+
readonly name: string;
|
|
7762
|
+
readonly description?: string | MarkupContent;
|
|
7763
|
+
readonly attributes: IAttributeData[];
|
|
7764
|
+
readonly references?: IReference[];
|
|
7765
|
+
}
|
|
7766
|
+
export interface IAttributeData {
|
|
7767
|
+
readonly name: string;
|
|
7768
|
+
readonly description?: string | MarkupContent;
|
|
7769
|
+
readonly valueSet?: string;
|
|
7770
|
+
readonly values?: IValueData[];
|
|
7771
|
+
readonly references?: IReference[];
|
|
7772
|
+
}
|
|
7773
|
+
export interface IValueData {
|
|
7774
|
+
readonly name: string;
|
|
7775
|
+
readonly description?: string | MarkupContent;
|
|
7776
|
+
readonly references?: IReference[];
|
|
7777
|
+
}
|
|
7778
|
+
export interface IValueSet {
|
|
7779
|
+
readonly name: string;
|
|
7780
|
+
readonly values: IValueData[];
|
|
7781
|
+
}
|
|
7782
|
+
export interface MarkupContent {
|
|
7783
|
+
readonly kind: MarkupKind;
|
|
7784
|
+
readonly value: string;
|
|
7785
|
+
}
|
|
7786
|
+
export type MarkupKind = 'plaintext' | 'markdown';
|
|
7421
7787
|
}
|