@codingame/monaco-vscode-api 1.67.15 → 1.67.18

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.
@@ -0,0 +1,2683 @@
1
+ import * as monaco from 'monaco-editor';
2
+ import * as vscode from 'vscode';
3
+
4
+ interface IDisposable {
5
+ dispose(): void;
6
+ }
7
+ declare class DisposableStore implements IDisposable {
8
+ static DISABLE_DISPOSED_WARNING: boolean;
9
+ private _toDispose;
10
+ private _isDisposed;
11
+ constructor();
12
+ /**
13
+ * Dispose of all registered disposables and mark this object as disposed.
14
+ *
15
+ * Any future disposables added to this object will be disposed of on `add`.
16
+ */
17
+ dispose(): void;
18
+ /**
19
+ * Returns `true` if this object has been disposed
20
+ */
21
+ get isDisposed(): boolean;
22
+ /**
23
+ * Dispose of all registered disposables but do not mark this object as disposed.
24
+ */
25
+ clear(): void;
26
+ add<T extends IDisposable>(o: T): T;
27
+ }
28
+
29
+ interface UriComponents {
30
+ scheme: string;
31
+ authority: string;
32
+ path: string;
33
+ query: string;
34
+ fragment: string;
35
+ }
36
+
37
+ /**
38
+ * To an event a function with one or zero parameters
39
+ * can be subscribed. The event is the subscriber function itself.
40
+ */
41
+ type Event<T> = vscode.Event<T>
42
+ declare namespace Event {
43
+ const None: Event<any>;
44
+ /**
45
+ * Given an event, returns another event which only fires once.
46
+ */
47
+ function once<T>(event: Event<T>): Event<T>;
48
+ /**
49
+ * *NOTE* that this function returns an `Event` and it MUST be called with a `DisposableStore` whenever the returned
50
+ * event is accessible to "third parties", e.g the event is a public property. Otherwise a leaked listener on the
51
+ * returned event causes this utility to leak a listener on the original event.
52
+ */
53
+ function map<I, O>(event: Event<I>, map: (i: I) => O, disposable?: DisposableStore): Event<O>;
54
+ /**
55
+ * *NOTE* that this function returns an `Event` and it MUST be called with a `DisposableStore` whenever the returned
56
+ * event is accessible to "third parties", e.g the event is a public property. Otherwise a leaked listener on the
57
+ * returned event causes this utility to leak a listener on the original event.
58
+ */
59
+ function forEach<I>(event: Event<I>, each: (i: I) => void, disposable?: DisposableStore): Event<I>;
60
+ /**
61
+ * *NOTE* that this function returns an `Event` and it MUST be called with a `DisposableStore` whenever the returned
62
+ * event is accessible to "third parties", e.g the event is a public property. Otherwise a leaked listener on the
63
+ * returned event causes this utility to leak a listener on the original event.
64
+ */
65
+ function filter<T, U>(event: Event<T | U>, filter: (e: T | U) => e is T, disposable?: DisposableStore): Event<T>;
66
+ function filter<T>(event: Event<T>, filter: (e: T) => boolean, disposable?: DisposableStore): Event<T>;
67
+ function filter<T, R>(event: Event<T | R>, filter: (e: T | R) => e is R, disposable?: DisposableStore): Event<R>;
68
+ /**
69
+ * Given an event, returns the same event but typed as `Event<void>`.
70
+ */
71
+ function signal<T>(event: Event<T>): Event<void>;
72
+ /**
73
+ * Given a collection of events, returns a single event which emits
74
+ * whenever any of the provided events emit.
75
+ */
76
+ function any<T>(...events: Event<T>[]): Event<T>;
77
+ function any(...events: Event<any>[]): Event<void>;
78
+ /**
79
+ * *NOTE* that this function returns an `Event` and it MUST be called with a `DisposableStore` whenever the returned
80
+ * event is accessible to "third parties", e.g the event is a public property. Otherwise a leaked listener on the
81
+ * returned event causes this utility to leak a listener on the original event.
82
+ */
83
+ function reduce<I, O>(event: Event<I>, merge: (last: O | undefined, event: I) => O, initial?: O, disposable?: DisposableStore): Event<O>;
84
+ /**
85
+ * *NOTE* that this function returns an `Event` and it MUST be called with a `DisposableStore` whenever the returned
86
+ * event is accessible to "third parties", e.g the event is a public property. Otherwise a leaked listener on the
87
+ * returned event causes this utility to leak a listener on the original event.
88
+ */
89
+ function debounce<T>(event: Event<T>, merge: (last: T | undefined, event: T) => T, delay?: number, leading?: boolean, leakWarningThreshold?: number, disposable?: DisposableStore): Event<T>;
90
+ /**
91
+ * *NOTE* that this function returns an `Event` and it MUST be called with a `DisposableStore` whenever the returned
92
+ * event is accessible to "third parties", e.g the event is a public property. Otherwise a leaked listener on the
93
+ * returned event causes this utility to leak a listener on the original event.
94
+ */
95
+ function debounce<I, O>(event: Event<I>, merge: (last: O | undefined, event: I) => O, delay?: number, leading?: boolean, leakWarningThreshold?: number, disposable?: DisposableStore): Event<O>;
96
+ /**
97
+ * *NOTE* that this function returns an `Event` and it MUST be called with a `DisposableStore` whenever the returned
98
+ * event is accessible to "third parties", e.g the event is a public property. Otherwise a leaked listener on the
99
+ * returned event causes this utility to leak a listener on the original event.
100
+ */
101
+ function latch<T>(event: Event<T>, equals?: (a: T, b: T) => boolean, disposable?: DisposableStore): Event<T>;
102
+ /**
103
+ * *NOTE* that this function returns an `Event` and it MUST be called with a `DisposableStore` whenever the returned
104
+ * event is accessible to "third parties", e.g the event is a public property. Otherwise a leaked listener on the
105
+ * returned event causes this utility to leak a listener on the original event.
106
+ */
107
+ function split<T, U>(event: Event<T | U>, isT: (e: T | U) => e is T, disposable?: DisposableStore): [Event<T>, Event<U>];
108
+ /**
109
+ * *NOTE* that this function returns an `Event` and it MUST be called with a `DisposableStore` whenever the returned
110
+ * event is accessible to "third parties", e.g the event is a public property. Otherwise a leaked listener on the
111
+ * returned event causes this utility to leak a listener on the original event.
112
+ */
113
+ function buffer<T>(event: Event<T>, flushAfterTimeout?: boolean, _buffer?: T[]): Event<T>;
114
+ interface IChainableEvent<T> {
115
+ event: Event<T>;
116
+ map<O>(fn: (i: T) => O): IChainableEvent<O>;
117
+ forEach(fn: (i: T) => void): IChainableEvent<T>;
118
+ filter(fn: (e: T) => boolean): IChainableEvent<T>;
119
+ filter<R>(fn: (e: T | R) => e is R): IChainableEvent<R>;
120
+ reduce<R>(merge: (last: R | undefined, event: T) => R, initial?: R): IChainableEvent<R>;
121
+ latch(): IChainableEvent<T>;
122
+ debounce(merge: (last: T | undefined, event: T) => T, delay?: number, leading?: boolean, leakWarningThreshold?: number): IChainableEvent<T>;
123
+ debounce<R>(merge: (last: R | undefined, event: T) => R, delay?: number, leading?: boolean, leakWarningThreshold?: number): IChainableEvent<R>;
124
+ on(listener: (e: T) => any, thisArgs?: any, disposables?: IDisposable[] | DisposableStore): IDisposable;
125
+ once(listener: (e: T) => any, thisArgs?: any, disposables?: IDisposable[]): IDisposable;
126
+ }
127
+ /**
128
+ * @deprecated DO NOT use, this leaks memory
129
+ */
130
+ function chain<T>(event: Event<T>): IChainableEvent<T>;
131
+ interface NodeEventEmitter {
132
+ on(event: string | symbol, listener: Function): unknown;
133
+ removeListener(event: string | symbol, listener: Function): unknown;
134
+ }
135
+ function fromNodeEventEmitter<T>(emitter: NodeEventEmitter, eventName: string, map?: (...args: any[]) => T): Event<T>;
136
+ interface DOMEventEmitter {
137
+ addEventListener(event: string | symbol, listener: Function): void;
138
+ removeEventListener(event: string | symbol, listener: Function): void;
139
+ }
140
+ function fromDOMEventEmitter<T>(emitter: DOMEventEmitter, eventName: string, map?: (...args: any[]) => T): Event<T>;
141
+ function toPromise<T>(event: Event<T>): Promise<T>;
142
+ function runAndSubscribe<T>(event: Event<T>, handler: (e: T | undefined) => any): IDisposable;
143
+ function runAndSubscribeWithStore<T>(event: Event<T>, handler: (e: T | undefined, disposableStore: DisposableStore) => any): IDisposable;
144
+ }
145
+
146
+ interface ServicesAccessor {
147
+ get<T>(id: ServiceIdentifier<T>): T;
148
+ }
149
+ /**
150
+ * Identifies a service of type `T`.
151
+ */
152
+ interface ServiceIdentifier<T> {
153
+ (...args: any[]): void;
154
+ type: T;
155
+ }
156
+
157
+ interface IContextKey<T> {
158
+ set(value: T): void;
159
+ reset(): void;
160
+ get(): T | undefined;
161
+ }
162
+
163
+ /**
164
+ * Configuration options for auto closing quotes and brackets
165
+ */
166
+ declare type EditorAutoClosingStrategy = 'always' | 'languageDefined' | 'beforeWhitespace' | 'never';
167
+ /**
168
+ * Configuration options for auto wrapping quotes and brackets
169
+ */
170
+ declare type EditorAutoSurroundStrategy = 'languageDefined' | 'quotes' | 'brackets' | 'never';
171
+ /**
172
+ * Configuration options for typing over closing quotes or brackets
173
+ */
174
+ declare type EditorAutoClosingEditStrategy = 'always' | 'auto' | 'never';
175
+ /**
176
+ * Configuration options for the editor.
177
+ */
178
+ interface IEditorOptions {
179
+ /**
180
+ * This editor is used inside a diff editor.
181
+ */
182
+ inDiffEditor?: boolean;
183
+ /**
184
+ * The aria label for the editor's textarea (when it is focused).
185
+ */
186
+ ariaLabel?: string;
187
+ /**
188
+ * The `tabindex` property of the editor's textarea
189
+ */
190
+ tabIndex?: number;
191
+ /**
192
+ * Render vertical lines at the specified columns.
193
+ * Defaults to empty array.
194
+ */
195
+ rulers?: (number | IRulerOption)[];
196
+ /**
197
+ * A string containing the word separators used when doing word navigation.
198
+ * Defaults to `~!@#$%^&*()-=+[{]}\\|;:\'",.<>/?
199
+ */
200
+ wordSeparators?: string;
201
+ /**
202
+ * Enable Linux primary clipboard.
203
+ * Defaults to true.
204
+ */
205
+ selectionClipboard?: boolean;
206
+ /**
207
+ * Control the rendering of line numbers.
208
+ * If it is a function, it will be invoked when rendering a line number and the return value will be rendered.
209
+ * Otherwise, if it is a truthy, line numbers will be rendered normally (equivalent of using an identity function).
210
+ * Otherwise, line numbers will not be rendered.
211
+ * Defaults to `on`.
212
+ */
213
+ lineNumbers?: LineNumbersType;
214
+ /**
215
+ * Controls the minimal number of visible leading and trailing lines surrounding the cursor.
216
+ * Defaults to 0.
217
+ */
218
+ cursorSurroundingLines?: number;
219
+ /**
220
+ * Controls when `cursorSurroundingLines` should be enforced
221
+ * Defaults to `default`, `cursorSurroundingLines` is not enforced when cursor position is changed
222
+ * by mouse.
223
+ */
224
+ cursorSurroundingLinesStyle?: 'default' | 'all';
225
+ /**
226
+ * Render last line number when the file ends with a newline.
227
+ * Defaults to true.
228
+ */
229
+ renderFinalNewline?: boolean;
230
+ /**
231
+ * Remove unusual line terminators like LINE SEPARATOR (LS), PARAGRAPH SEPARATOR (PS).
232
+ * Defaults to 'prompt'.
233
+ */
234
+ unusualLineTerminators?: 'auto' | 'off' | 'prompt';
235
+ /**
236
+ * Should the corresponding line be selected when clicking on the line number?
237
+ * Defaults to true.
238
+ */
239
+ selectOnLineNumbers?: boolean;
240
+ /**
241
+ * Control the width of line numbers, by reserving horizontal space for rendering at least an amount of digits.
242
+ * Defaults to 5.
243
+ */
244
+ lineNumbersMinChars?: number;
245
+ /**
246
+ * Enable the rendering of the glyph margin.
247
+ * Defaults to true in vscode and to false in monaco-editor.
248
+ */
249
+ glyphMargin?: boolean;
250
+ /**
251
+ * The width reserved for line decorations (in px).
252
+ * Line decorations are placed between line numbers and the editor content.
253
+ * You can pass in a string in the format floating point followed by "ch". e.g. 1.3ch.
254
+ * Defaults to 10.
255
+ */
256
+ lineDecorationsWidth?: number | string;
257
+ /**
258
+ * When revealing the cursor, a virtual padding (px) is added to the cursor, turning it into a rectangle.
259
+ * This virtual padding ensures that the cursor gets revealed before hitting the edge of the viewport.
260
+ * Defaults to 30 (px).
261
+ */
262
+ revealHorizontalRightPadding?: number;
263
+ /**
264
+ * Render the editor selection with rounded borders.
265
+ * Defaults to true.
266
+ */
267
+ roundedSelection?: boolean;
268
+ /**
269
+ * Class name to be added to the editor.
270
+ */
271
+ extraEditorClassName?: string;
272
+ /**
273
+ * Should the editor be read only. See also `domReadOnly`.
274
+ * Defaults to false.
275
+ */
276
+ readOnly?: boolean;
277
+ /**
278
+ * Should the textarea used for input use the DOM `readonly` attribute.
279
+ * Defaults to false.
280
+ */
281
+ domReadOnly?: boolean;
282
+ /**
283
+ * Enable linked editing.
284
+ * Defaults to false.
285
+ */
286
+ linkedEditing?: boolean;
287
+ /**
288
+ * deprecated, use linkedEditing instead
289
+ */
290
+ renameOnType?: boolean;
291
+ /**
292
+ * Should the editor render validation decorations.
293
+ * Defaults to editable.
294
+ */
295
+ renderValidationDecorations?: 'editable' | 'on' | 'off';
296
+ /**
297
+ * Control the behavior and rendering of the scrollbars.
298
+ */
299
+ scrollbar?: IEditorScrollbarOptions;
300
+ /**
301
+ * Control the behavior and rendering of the minimap.
302
+ */
303
+ minimap?: IEditorMinimapOptions;
304
+ /**
305
+ * Control the behavior of the find widget.
306
+ */
307
+ find?: IEditorFindOptions;
308
+ /**
309
+ * Display overflow widgets as `fixed`.
310
+ * Defaults to `false`.
311
+ */
312
+ fixedOverflowWidgets?: boolean;
313
+ /**
314
+ * The number of vertical lanes the overview ruler should render.
315
+ * Defaults to 3.
316
+ */
317
+ overviewRulerLanes?: number;
318
+ /**
319
+ * Controls if a border should be drawn around the overview ruler.
320
+ * Defaults to `true`.
321
+ */
322
+ overviewRulerBorder?: boolean;
323
+ /**
324
+ * Control the cursor animation style, possible values are 'blink', 'smooth', 'phase', 'expand' and 'solid'.
325
+ * Defaults to 'blink'.
326
+ */
327
+ cursorBlinking?: 'blink' | 'smooth' | 'phase' | 'expand' | 'solid';
328
+ /**
329
+ * Zoom the font in the editor when using the mouse wheel in combination with holding Ctrl.
330
+ * Defaults to false.
331
+ */
332
+ mouseWheelZoom?: boolean;
333
+ /**
334
+ * Control the mouse pointer style, either 'text' or 'default' or 'copy'
335
+ * Defaults to 'text'
336
+ */
337
+ mouseStyle?: 'text' | 'default' | 'copy';
338
+ /**
339
+ * Enable smooth caret animation.
340
+ * Defaults to false.
341
+ */
342
+ cursorSmoothCaretAnimation?: boolean;
343
+ /**
344
+ * Control the cursor style, either 'block' or 'line'.
345
+ * Defaults to 'line'.
346
+ */
347
+ cursorStyle?: 'line' | 'block' | 'underline' | 'line-thin' | 'block-outline' | 'underline-thin';
348
+ /**
349
+ * Control the width of the cursor when cursorStyle is set to 'line'
350
+ */
351
+ cursorWidth?: number;
352
+ /**
353
+ * Enable font ligatures.
354
+ * Defaults to false.
355
+ */
356
+ fontLigatures?: boolean | string;
357
+ /**
358
+ * Disable the use of `transform: translate3d(0px, 0px, 0px)` for the editor margin and lines layers.
359
+ * The usage of `transform: translate3d(0px, 0px, 0px)` acts as a hint for browsers to create an extra layer.
360
+ * Defaults to false.
361
+ */
362
+ disableLayerHinting?: boolean;
363
+ /**
364
+ * Disable the optimizations for monospace fonts.
365
+ * Defaults to false.
366
+ */
367
+ disableMonospaceOptimizations?: boolean;
368
+ /**
369
+ * Should the cursor be hidden in the overview ruler.
370
+ * Defaults to false.
371
+ */
372
+ hideCursorInOverviewRuler?: boolean;
373
+ /**
374
+ * Enable that scrolling can go one screen size after the last line.
375
+ * Defaults to true.
376
+ */
377
+ scrollBeyondLastLine?: boolean;
378
+ /**
379
+ * Enable that scrolling can go beyond the last column by a number of columns.
380
+ * Defaults to 5.
381
+ */
382
+ scrollBeyondLastColumn?: number;
383
+ /**
384
+ * Enable that the editor animates scrolling to a position.
385
+ * Defaults to false.
386
+ */
387
+ smoothScrolling?: boolean;
388
+ /**
389
+ * Enable that the editor will install an interval to check if its container dom node size has changed.
390
+ * Enabling this might have a severe performance impact.
391
+ * Defaults to false.
392
+ */
393
+ automaticLayout?: boolean;
394
+ /**
395
+ * Control the wrapping of the editor.
396
+ * When `wordWrap` = "off", the lines will never wrap.
397
+ * When `wordWrap` = "on", the lines will wrap at the viewport width.
398
+ * When `wordWrap` = "wordWrapColumn", the lines will wrap at `wordWrapColumn`.
399
+ * When `wordWrap` = "bounded", the lines will wrap at min(viewport width, wordWrapColumn).
400
+ * Defaults to "off".
401
+ */
402
+ wordWrap?: 'off' | 'on' | 'wordWrapColumn' | 'bounded';
403
+ /**
404
+ * Override the `wordWrap` setting.
405
+ */
406
+ wordWrapOverride1?: 'off' | 'on' | 'inherit';
407
+ /**
408
+ * Override the `wordWrapOverride1` setting.
409
+ */
410
+ wordWrapOverride2?: 'off' | 'on' | 'inherit';
411
+ /**
412
+ * Control the wrapping of the editor.
413
+ * When `wordWrap` = "off", the lines will never wrap.
414
+ * When `wordWrap` = "on", the lines will wrap at the viewport width.
415
+ * When `wordWrap` = "wordWrapColumn", the lines will wrap at `wordWrapColumn`.
416
+ * When `wordWrap` = "bounded", the lines will wrap at min(viewport width, wordWrapColumn).
417
+ * Defaults to 80.
418
+ */
419
+ wordWrapColumn?: number;
420
+ /**
421
+ * Control indentation of wrapped lines. Can be: 'none', 'same', 'indent' or 'deepIndent'.
422
+ * Defaults to 'same' in vscode and to 'none' in monaco-editor.
423
+ */
424
+ wrappingIndent?: 'none' | 'same' | 'indent' | 'deepIndent';
425
+ /**
426
+ * Controls the wrapping strategy to use.
427
+ * Defaults to 'simple'.
428
+ */
429
+ wrappingStrategy?: 'simple' | 'advanced';
430
+ /**
431
+ * Configure word wrapping characters. A break will be introduced before these characters.
432
+ */
433
+ wordWrapBreakBeforeCharacters?: string;
434
+ /**
435
+ * Configure word wrapping characters. A break will be introduced after these characters.
436
+ */
437
+ wordWrapBreakAfterCharacters?: string;
438
+ /**
439
+ * Performance guard: Stop rendering a line after x characters.
440
+ * Defaults to 10000.
441
+ * Use -1 to never stop rendering
442
+ */
443
+ stopRenderingLineAfter?: number;
444
+ /**
445
+ * Configure the editor's hover.
446
+ */
447
+ hover?: IEditorHoverOptions;
448
+ /**
449
+ * Enable detecting links and making them clickable.
450
+ * Defaults to true.
451
+ */
452
+ links?: boolean;
453
+ /**
454
+ * Enable inline color decorators and color picker rendering.
455
+ */
456
+ colorDecorators?: boolean;
457
+ /**
458
+ * Control the behaviour of comments in the editor.
459
+ */
460
+ comments?: IEditorCommentsOptions;
461
+ /**
462
+ * Enable custom contextmenu.
463
+ * Defaults to true.
464
+ */
465
+ contextmenu?: boolean;
466
+ /**
467
+ * A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.
468
+ * Defaults to 1.
469
+ */
470
+ mouseWheelScrollSensitivity?: number;
471
+ /**
472
+ * FastScrolling mulitplier speed when pressing `Alt`
473
+ * Defaults to 5.
474
+ */
475
+ fastScrollSensitivity?: number;
476
+ /**
477
+ * Enable that the editor scrolls only the predominant axis. Prevents horizontal drift when scrolling vertically on a trackpad.
478
+ * Defaults to true.
479
+ */
480
+ scrollPredominantAxis?: boolean;
481
+ /**
482
+ * Enable that the selection with the mouse and keys is doing column selection.
483
+ * Defaults to false.
484
+ */
485
+ columnSelection?: boolean;
486
+ /**
487
+ * The modifier to be used to add multiple cursors with the mouse.
488
+ * Defaults to 'alt'
489
+ */
490
+ multiCursorModifier?: 'ctrlCmd' | 'alt';
491
+ /**
492
+ * Merge overlapping selections.
493
+ * Defaults to true
494
+ */
495
+ multiCursorMergeOverlapping?: boolean;
496
+ /**
497
+ * Configure the behaviour when pasting a text with the line count equal to the cursor count.
498
+ * Defaults to 'spread'.
499
+ */
500
+ multiCursorPaste?: 'spread' | 'full';
501
+ /**
502
+ * Configure the editor's accessibility support.
503
+ * Defaults to 'auto'. It is best to leave this to 'auto'.
504
+ */
505
+ accessibilitySupport?: 'auto' | 'off' | 'on';
506
+ /**
507
+ * Controls the number of lines in the editor that can be read out by a screen reader
508
+ */
509
+ accessibilityPageSize?: number;
510
+ /**
511
+ * Suggest options.
512
+ */
513
+ suggest?: ISuggestOptions;
514
+ inlineSuggest?: IInlineSuggestOptions;
515
+ /**
516
+ * Smart select options.
517
+ */
518
+ smartSelect?: ISmartSelectOptions;
519
+ /**
520
+ *
521
+ */
522
+ gotoLocation?: IGotoLocationOptions;
523
+ /**
524
+ * Enable quick suggestions (shadow suggestions)
525
+ * Defaults to true.
526
+ */
527
+ quickSuggestions?: boolean | IQuickSuggestionsOptions;
528
+ /**
529
+ * Quick suggestions show delay (in ms)
530
+ * Defaults to 10 (ms)
531
+ */
532
+ quickSuggestionsDelay?: number;
533
+ /**
534
+ * Controls the spacing around the editor.
535
+ */
536
+ padding?: IEditorPaddingOptions;
537
+ /**
538
+ * Parameter hint options.
539
+ */
540
+ parameterHints?: IEditorParameterHintOptions;
541
+ /**
542
+ * Options for auto closing brackets.
543
+ * Defaults to language defined behavior.
544
+ */
545
+ autoClosingBrackets?: EditorAutoClosingStrategy;
546
+ /**
547
+ * Options for auto closing quotes.
548
+ * Defaults to language defined behavior.
549
+ */
550
+ autoClosingQuotes?: EditorAutoClosingStrategy;
551
+ /**
552
+ * Options for pressing backspace near quotes or bracket pairs.
553
+ */
554
+ autoClosingDelete?: EditorAutoClosingEditStrategy;
555
+ /**
556
+ * Options for typing over closing quotes or brackets.
557
+ */
558
+ autoClosingOvertype?: EditorAutoClosingEditStrategy;
559
+ /**
560
+ * Options for auto surrounding.
561
+ * Defaults to always allowing auto surrounding.
562
+ */
563
+ autoSurround?: EditorAutoSurroundStrategy;
564
+ /**
565
+ * Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.
566
+ * Defaults to advanced.
567
+ */
568
+ autoIndent?: 'none' | 'keep' | 'brackets' | 'advanced' | 'full';
569
+ /**
570
+ * Emulate selection behaviour of tab characters when using spaces for indentation.
571
+ * This means selection will stick to tab stops.
572
+ */
573
+ stickyTabStops?: boolean;
574
+ /**
575
+ * Enable format on type.
576
+ * Defaults to false.
577
+ */
578
+ formatOnType?: boolean;
579
+ /**
580
+ * Enable format on paste.
581
+ * Defaults to false.
582
+ */
583
+ formatOnPaste?: boolean;
584
+ /**
585
+ * Controls if the editor should allow to move selections via drag and drop.
586
+ * Defaults to false.
587
+ */
588
+ dragAndDrop?: boolean;
589
+ /**
590
+ * Enable the suggestion box to pop-up on trigger characters.
591
+ * Defaults to true.
592
+ */
593
+ suggestOnTriggerCharacters?: boolean;
594
+ /**
595
+ * Accept suggestions on ENTER.
596
+ * Defaults to 'on'.
597
+ */
598
+ acceptSuggestionOnEnter?: 'on' | 'smart' | 'off';
599
+ /**
600
+ * Accept suggestions on provider defined characters.
601
+ * Defaults to true.
602
+ */
603
+ acceptSuggestionOnCommitCharacter?: boolean;
604
+ /**
605
+ * Enable snippet suggestions. Default to 'true'.
606
+ */
607
+ snippetSuggestions?: 'top' | 'bottom' | 'inline' | 'none';
608
+ /**
609
+ * Copying without a selection copies the current line.
610
+ */
611
+ emptySelectionClipboard?: boolean;
612
+ /**
613
+ * Syntax highlighting is copied.
614
+ */
615
+ copyWithSyntaxHighlighting?: boolean;
616
+ /**
617
+ * The history mode for suggestions.
618
+ */
619
+ suggestSelection?: 'first' | 'recentlyUsed' | 'recentlyUsedByPrefix';
620
+ /**
621
+ * The font size for the suggest widget.
622
+ * Defaults to the editor font size.
623
+ */
624
+ suggestFontSize?: number;
625
+ /**
626
+ * The line height for the suggest widget.
627
+ * Defaults to the editor line height.
628
+ */
629
+ suggestLineHeight?: number;
630
+ /**
631
+ * Enable tab completion.
632
+ */
633
+ tabCompletion?: 'on' | 'off' | 'onlySnippets';
634
+ /**
635
+ * Enable selection highlight.
636
+ * Defaults to true.
637
+ */
638
+ selectionHighlight?: boolean;
639
+ /**
640
+ * Enable semantic occurrences highlight.
641
+ * Defaults to true.
642
+ */
643
+ occurrencesHighlight?: boolean;
644
+ /**
645
+ * Show code lens
646
+ * Defaults to true.
647
+ */
648
+ codeLens?: boolean;
649
+ /**
650
+ * Code lens font family. Defaults to editor font family.
651
+ */
652
+ codeLensFontFamily?: string;
653
+ /**
654
+ * Code lens font size. Default to 90% of the editor font size
655
+ */
656
+ codeLensFontSize?: number;
657
+ /**
658
+ * Control the behavior and rendering of the code action lightbulb.
659
+ */
660
+ lightbulb?: IEditorLightbulbOptions;
661
+ /**
662
+ * Timeout for running code actions on save.
663
+ */
664
+ codeActionsOnSaveTimeout?: number;
665
+ /**
666
+ * Enable code folding.
667
+ * Defaults to true.
668
+ */
669
+ folding?: boolean;
670
+ /**
671
+ * Selects the folding strategy. 'auto' uses the strategies contributed for the current document, 'indentation' uses the indentation based folding strategy.
672
+ * Defaults to 'auto'.
673
+ */
674
+ foldingStrategy?: 'auto' | 'indentation';
675
+ /**
676
+ * Enable highlight for folded regions.
677
+ * Defaults to true.
678
+ */
679
+ foldingHighlight?: boolean;
680
+ /**
681
+ * Auto fold imports folding regions.
682
+ * Defaults to true.
683
+ */
684
+ foldingImportsByDefault?: boolean;
685
+ /**
686
+ * Maximum number of foldable regions.
687
+ * Defaults to 5000.
688
+ */
689
+ foldingMaximumRegions?: number;
690
+ /**
691
+ * Controls whether the fold actions in the gutter stay always visible or hide unless the mouse is over the gutter.
692
+ * Defaults to 'mouseover'.
693
+ */
694
+ showFoldingControls?: 'always' | 'mouseover';
695
+ /**
696
+ * Controls whether clicking on the empty content after a folded line will unfold the line.
697
+ * Defaults to false.
698
+ */
699
+ unfoldOnClickAfterEndOfLine?: boolean;
700
+ /**
701
+ * Enable highlighting of matching brackets.
702
+ * Defaults to 'always'.
703
+ */
704
+ matchBrackets?: 'never' | 'near' | 'always';
705
+ /**
706
+ * Enable rendering of whitespace.
707
+ * Defaults to 'selection'.
708
+ */
709
+ renderWhitespace?: 'none' | 'boundary' | 'selection' | 'trailing' | 'all';
710
+ /**
711
+ * Enable rendering of control characters.
712
+ * Defaults to true.
713
+ */
714
+ renderControlCharacters?: boolean;
715
+ /**
716
+ * Enable rendering of current line highlight.
717
+ * Defaults to all.
718
+ */
719
+ renderLineHighlight?: 'none' | 'gutter' | 'line' | 'all';
720
+ /**
721
+ * Control if the current line highlight should be rendered only the editor is focused.
722
+ * Defaults to false.
723
+ */
724
+ renderLineHighlightOnlyWhenFocus?: boolean;
725
+ /**
726
+ * Inserting and deleting whitespace follows tab stops.
727
+ */
728
+ useTabStops?: boolean;
729
+ /**
730
+ * The font family
731
+ */
732
+ fontFamily?: string;
733
+ /**
734
+ * The font weight
735
+ */
736
+ fontWeight?: string;
737
+ /**
738
+ * The font size
739
+ */
740
+ fontSize?: number;
741
+ /**
742
+ * The line height
743
+ */
744
+ lineHeight?: number;
745
+ /**
746
+ * The letter spacing
747
+ */
748
+ letterSpacing?: number;
749
+ /**
750
+ * Controls fading out of unused variables.
751
+ */
752
+ showUnused?: boolean;
753
+ /**
754
+ * Controls whether to focus the inline editor in the peek widget by default.
755
+ * Defaults to false.
756
+ */
757
+ peekWidgetDefaultFocus?: 'tree' | 'editor';
758
+ /**
759
+ * Controls whether the definition link opens element in the peek widget.
760
+ * Defaults to false.
761
+ */
762
+ definitionLinkOpensInPeek?: boolean;
763
+ /**
764
+ * Controls strikethrough deprecated variables.
765
+ */
766
+ showDeprecated?: boolean;
767
+ /**
768
+ * Control the behavior and rendering of the inline hints.
769
+ */
770
+ inlayHints?: IEditorInlayHintsOptions;
771
+ /**
772
+ * Control if the editor should use shadow DOM.
773
+ */
774
+ useShadowDOM?: boolean;
775
+ /**
776
+ * Controls the behavior of editor guides.
777
+ */
778
+ guides?: IGuidesOptions;
779
+ /**
780
+ * Controls the behavior of the unicode highlight feature
781
+ * (by default, ambiguous and invisible characters are highlighted).
782
+ */
783
+ unicodeHighlight?: IUnicodeHighlightOptions;
784
+ /**
785
+ * Configures bracket pair colorization (disabled by default).
786
+ */
787
+ bracketPairColorization?: IBracketPairColorizationOptions;
788
+ }
789
+ interface IDiffEditorBaseOptions {
790
+ /**
791
+ * Allow the user to resize the diff editor split view.
792
+ * Defaults to true.
793
+ */
794
+ enableSplitViewResizing?: boolean;
795
+ /**
796
+ * Render the differences in two side-by-side editors.
797
+ * Defaults to true.
798
+ */
799
+ renderSideBySide?: boolean;
800
+ /**
801
+ * Timeout in milliseconds after which diff computation is cancelled.
802
+ * Defaults to 5000.
803
+ */
804
+ maxComputationTime?: number;
805
+ /**
806
+ * Maximum supported file size in MB.
807
+ * Defaults to 50.
808
+ */
809
+ maxFileSize?: number;
810
+ /**
811
+ * Compute the diff by ignoring leading/trailing whitespace
812
+ * Defaults to true.
813
+ */
814
+ ignoreTrimWhitespace?: boolean;
815
+ /**
816
+ * Render +/- indicators for added/deleted changes.
817
+ * Defaults to true.
818
+ */
819
+ renderIndicators?: boolean;
820
+ /**
821
+ * Original model should be editable?
822
+ * Defaults to false.
823
+ */
824
+ originalEditable?: boolean;
825
+ /**
826
+ * Should the diff editor enable code lens?
827
+ * Defaults to false.
828
+ */
829
+ diffCodeLens?: boolean;
830
+ /**
831
+ * Is the diff editor should render overview ruler
832
+ * Defaults to true
833
+ */
834
+ renderOverviewRuler?: boolean;
835
+ /**
836
+ * Control the wrapping of the diff editor.
837
+ */
838
+ diffWordWrap?: 'off' | 'on' | 'inherit';
839
+ }
840
+ /**
841
+ * Configuration options for the diff editor.
842
+ */
843
+ interface IDiffEditorOptions extends IEditorOptions, IDiffEditorBaseOptions {
844
+ }
845
+ /**
846
+ * Configuration options for editor comments
847
+ */
848
+ interface IEditorCommentsOptions {
849
+ /**
850
+ * Insert a space after the line comment token and inside the block comments tokens.
851
+ * Defaults to true.
852
+ */
853
+ insertSpace?: boolean;
854
+ /**
855
+ * Ignore empty lines when inserting line comments.
856
+ * Defaults to true.
857
+ */
858
+ ignoreEmptyLines?: boolean;
859
+ }
860
+ /**
861
+ * Configuration options for editor find widget
862
+ */
863
+ interface IEditorFindOptions {
864
+ /**
865
+ * Controls whether the cursor should move to find matches while typing.
866
+ */
867
+ cursorMoveOnType?: boolean;
868
+ /**
869
+ * Controls if we seed search string in the Find Widget with editor selection.
870
+ */
871
+ seedSearchStringFromSelection?: 'never' | 'always' | 'selection';
872
+ /**
873
+ * Controls if Find in Selection flag is turned on in the editor.
874
+ */
875
+ autoFindInSelection?: 'never' | 'always' | 'multiline';
876
+ addExtraSpaceOnTop?: boolean;
877
+ /**
878
+ * @internal
879
+ * Controls if the Find Widget should read or modify the shared find clipboard on macOS
880
+ */
881
+ globalFindClipboard?: boolean;
882
+ /**
883
+ * Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found
884
+ */
885
+ loop?: boolean;
886
+ }
887
+ declare type GoToLocationValues = 'peek' | 'gotoAndPeek' | 'goto';
888
+ /**
889
+ * Configuration options for go to location
890
+ */
891
+ interface IGotoLocationOptions {
892
+ multiple?: GoToLocationValues;
893
+ multipleDefinitions?: GoToLocationValues;
894
+ multipleTypeDefinitions?: GoToLocationValues;
895
+ multipleDeclarations?: GoToLocationValues;
896
+ multipleImplementations?: GoToLocationValues;
897
+ multipleReferences?: GoToLocationValues;
898
+ alternativeDefinitionCommand?: string;
899
+ alternativeTypeDefinitionCommand?: string;
900
+ alternativeDeclarationCommand?: string;
901
+ alternativeImplementationCommand?: string;
902
+ alternativeReferenceCommand?: string;
903
+ }
904
+ /**
905
+ * Configuration options for editor hover
906
+ */
907
+ interface IEditorHoverOptions {
908
+ /**
909
+ * Enable the hover.
910
+ * Defaults to true.
911
+ */
912
+ enabled?: boolean;
913
+ /**
914
+ * Delay for showing the hover.
915
+ * Defaults to 300.
916
+ */
917
+ delay?: number;
918
+ /**
919
+ * Is the hover sticky such that it can be clicked and its contents selected?
920
+ * Defaults to true.
921
+ */
922
+ sticky?: boolean;
923
+ /**
924
+ * Should the hover be shown above the line if possible?
925
+ * Defaults to false.
926
+ */
927
+ above?: boolean;
928
+ }
929
+ /**
930
+ * Configuration options for editor lightbulb
931
+ */
932
+ interface IEditorLightbulbOptions {
933
+ /**
934
+ * Enable the lightbulb code action.
935
+ * Defaults to true.
936
+ */
937
+ enabled?: boolean;
938
+ }
939
+ /**
940
+ * Configuration options for editor inlayHints
941
+ */
942
+ interface IEditorInlayHintsOptions {
943
+ /**
944
+ * Enable the inline hints.
945
+ * Defaults to true.
946
+ */
947
+ enabled?: boolean;
948
+ /**
949
+ * Font size of inline hints.
950
+ * Default to 90% of the editor font size.
951
+ */
952
+ fontSize?: number;
953
+ /**
954
+ * Font family of inline hints.
955
+ * Defaults to editor font family.
956
+ */
957
+ fontFamily?: string;
958
+ }
959
+ /**
960
+ * Configuration options for editor minimap
961
+ */
962
+ interface IEditorMinimapOptions {
963
+ /**
964
+ * Enable the rendering of the minimap.
965
+ * Defaults to true.
966
+ */
967
+ enabled?: boolean;
968
+ /**
969
+ * Control the side of the minimap in editor.
970
+ * Defaults to 'right'.
971
+ */
972
+ side?: 'right' | 'left';
973
+ /**
974
+ * Control the minimap rendering mode.
975
+ * Defaults to 'actual'.
976
+ */
977
+ size?: 'proportional' | 'fill' | 'fit';
978
+ /**
979
+ * Control the rendering of the minimap slider.
980
+ * Defaults to 'mouseover'.
981
+ */
982
+ showSlider?: 'always' | 'mouseover';
983
+ /**
984
+ * Render the actual text on a line (as opposed to color blocks).
985
+ * Defaults to true.
986
+ */
987
+ renderCharacters?: boolean;
988
+ /**
989
+ * Limit the width of the minimap to render at most a certain number of columns.
990
+ * Defaults to 120.
991
+ */
992
+ maxColumn?: number;
993
+ /**
994
+ * Relative size of the font in the minimap. Defaults to 1.
995
+ */
996
+ scale?: number;
997
+ }
998
+ /**
999
+ * Configuration options for editor padding
1000
+ */
1001
+ interface IEditorPaddingOptions {
1002
+ /**
1003
+ * Spacing between top edge of editor and first line.
1004
+ */
1005
+ top?: number;
1006
+ /**
1007
+ * Spacing between bottom edge of editor and last line.
1008
+ */
1009
+ bottom?: number;
1010
+ }
1011
+ /**
1012
+ * Configuration options for parameter hints
1013
+ */
1014
+ interface IEditorParameterHintOptions {
1015
+ /**
1016
+ * Enable parameter hints.
1017
+ * Defaults to true.
1018
+ */
1019
+ enabled?: boolean;
1020
+ /**
1021
+ * Enable cycling of parameter hints.
1022
+ * Defaults to false.
1023
+ */
1024
+ cycle?: boolean;
1025
+ }
1026
+ /**
1027
+ * Configuration options for quick suggestions
1028
+ */
1029
+ interface IQuickSuggestionsOptions {
1030
+ other?: boolean;
1031
+ comments?: boolean;
1032
+ strings?: boolean;
1033
+ }
1034
+ declare type LineNumbersType = 'on' | 'off' | 'relative' | 'interval' | ((lineNumber: number) => string);
1035
+ interface IRulerOption {
1036
+ readonly column: number;
1037
+ readonly color: string | null;
1038
+ }
1039
+ /**
1040
+ * Configuration options for editor scrollbars
1041
+ */
1042
+ interface IEditorScrollbarOptions {
1043
+ /**
1044
+ * The size of arrows (if displayed).
1045
+ * Defaults to 11.
1046
+ * **NOTE**: This option cannot be updated using `updateOptions()`
1047
+ */
1048
+ arrowSize?: number;
1049
+ /**
1050
+ * Render vertical scrollbar.
1051
+ * Defaults to 'auto'.
1052
+ */
1053
+ vertical?: 'auto' | 'visible' | 'hidden';
1054
+ /**
1055
+ * Render horizontal scrollbar.
1056
+ * Defaults to 'auto'.
1057
+ */
1058
+ horizontal?: 'auto' | 'visible' | 'hidden';
1059
+ /**
1060
+ * Cast horizontal and vertical shadows when the content is scrolled.
1061
+ * Defaults to true.
1062
+ * **NOTE**: This option cannot be updated using `updateOptions()`
1063
+ */
1064
+ useShadows?: boolean;
1065
+ /**
1066
+ * Render arrows at the top and bottom of the vertical scrollbar.
1067
+ * Defaults to false.
1068
+ * **NOTE**: This option cannot be updated using `updateOptions()`
1069
+ */
1070
+ verticalHasArrows?: boolean;
1071
+ /**
1072
+ * Render arrows at the left and right of the horizontal scrollbar.
1073
+ * Defaults to false.
1074
+ * **NOTE**: This option cannot be updated using `updateOptions()`
1075
+ */
1076
+ horizontalHasArrows?: boolean;
1077
+ /**
1078
+ * Listen to mouse wheel events and react to them by scrolling.
1079
+ * Defaults to true.
1080
+ */
1081
+ handleMouseWheel?: boolean;
1082
+ /**
1083
+ * Always consume mouse wheel events (always call preventDefault() and stopPropagation() on the browser events).
1084
+ * Defaults to true.
1085
+ * **NOTE**: This option cannot be updated using `updateOptions()`
1086
+ */
1087
+ alwaysConsumeMouseWheel?: boolean;
1088
+ /**
1089
+ * Height in pixels for the horizontal scrollbar.
1090
+ * Defaults to 10 (px).
1091
+ */
1092
+ horizontalScrollbarSize?: number;
1093
+ /**
1094
+ * Width in pixels for the vertical scrollbar.
1095
+ * Defaults to 10 (px).
1096
+ */
1097
+ verticalScrollbarSize?: number;
1098
+ /**
1099
+ * Width in pixels for the vertical slider.
1100
+ * Defaults to `verticalScrollbarSize`.
1101
+ * **NOTE**: This option cannot be updated using `updateOptions()`
1102
+ */
1103
+ verticalSliderSize?: number;
1104
+ /**
1105
+ * Height in pixels for the horizontal slider.
1106
+ * Defaults to `horizontalScrollbarSize`.
1107
+ * **NOTE**: This option cannot be updated using `updateOptions()`
1108
+ */
1109
+ horizontalSliderSize?: number;
1110
+ /**
1111
+ * Scroll gutter clicks move by page vs jump to position.
1112
+ * Defaults to false.
1113
+ */
1114
+ scrollByPage?: boolean;
1115
+ }
1116
+ declare type InUntrustedWorkspace = 'inUntrustedWorkspace';
1117
+ /**
1118
+ * Configuration options for unicode highlighting.
1119
+ */
1120
+ interface IUnicodeHighlightOptions {
1121
+ /**
1122
+ * Controls whether all non-basic ASCII characters are highlighted. Only characters between U+0020 and U+007E, tab, line-feed and carriage-return are considered basic ASCII.
1123
+ */
1124
+ nonBasicASCII?: boolean | InUntrustedWorkspace;
1125
+ /**
1126
+ * Controls whether characters that just reserve space or have no width at all are highlighted.
1127
+ */
1128
+ invisibleCharacters?: boolean;
1129
+ /**
1130
+ * Controls whether characters are highlighted that can be confused with basic ASCII characters, except those that are common in the current user locale.
1131
+ */
1132
+ ambiguousCharacters?: boolean;
1133
+ /**
1134
+ * Controls whether characters in comments should also be subject to unicode highlighting.
1135
+ */
1136
+ includeComments?: boolean | InUntrustedWorkspace;
1137
+ /**
1138
+ * Controls whether characters in strings should also be subject to unicode highlighting.
1139
+ */
1140
+ includeStrings?: boolean | InUntrustedWorkspace;
1141
+ /**
1142
+ * Defines allowed characters that are not being highlighted.
1143
+ */
1144
+ allowedCharacters?: Record<string, true>;
1145
+ /**
1146
+ * Unicode characters that are common in allowed locales are not being highlighted.
1147
+ */
1148
+ allowedLocales?: Record<string | '_os' | '_vscode', true>;
1149
+ }
1150
+ interface IInlineSuggestOptions {
1151
+ /**
1152
+ * Enable or disable the rendering of automatic inline completions.
1153
+ */
1154
+ enabled?: boolean;
1155
+ /**
1156
+ * Configures the mode.
1157
+ * Use `prefix` to only show ghost text if the text to replace is a prefix of the suggestion text.
1158
+ * Use `subword` to only show ghost text if the replace text is a subword of the suggestion text.
1159
+ * 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.
1160
+ * Defaults to `prefix`.
1161
+ */
1162
+ mode?: 'prefix' | 'subword' | 'subwordSmart';
1163
+ }
1164
+ interface IBracketPairColorizationOptions {
1165
+ /**
1166
+ * Enable or disable bracket pair colorization.
1167
+ */
1168
+ enabled?: boolean;
1169
+ }
1170
+ interface IGuidesOptions {
1171
+ /**
1172
+ * Enable rendering of bracket pair guides.
1173
+ * Defaults to false.
1174
+ */
1175
+ bracketPairs?: boolean | 'active';
1176
+ /**
1177
+ * Enable rendering of vertical bracket pair guides.
1178
+ * Defaults to 'active'.
1179
+ */
1180
+ bracketPairsHorizontal?: boolean | 'active';
1181
+ /**
1182
+ * Enable highlighting of the active bracket pair.
1183
+ * Defaults to true.
1184
+ */
1185
+ highlightActiveBracketPair?: boolean;
1186
+ /**
1187
+ * Enable rendering of indent guides.
1188
+ * Defaults to true.
1189
+ */
1190
+ indentation?: boolean;
1191
+ /**
1192
+ * Enable highlighting of the active indent guide.
1193
+ * Defaults to true.
1194
+ */
1195
+ highlightActiveIndentation?: boolean;
1196
+ }
1197
+ /**
1198
+ * Configuration options for editor suggest widget
1199
+ */
1200
+ interface ISuggestOptions {
1201
+ /**
1202
+ * Overwrite word ends on accept. Default to false.
1203
+ */
1204
+ insertMode?: 'insert' | 'replace';
1205
+ /**
1206
+ * Enable graceful matching. Defaults to true.
1207
+ */
1208
+ filterGraceful?: boolean;
1209
+ /**
1210
+ * Prevent quick suggestions when a snippet is active. Defaults to true.
1211
+ */
1212
+ snippetsPreventQuickSuggestions?: boolean;
1213
+ /**
1214
+ * Favors words that appear close to the cursor.
1215
+ */
1216
+ localityBonus?: boolean;
1217
+ /**
1218
+ * Enable using global storage for remembering suggestions.
1219
+ */
1220
+ shareSuggestSelections?: boolean;
1221
+ /**
1222
+ * Enable or disable icons in suggestions. Defaults to true.
1223
+ */
1224
+ showIcons?: boolean;
1225
+ /**
1226
+ * Enable or disable the suggest status bar.
1227
+ */
1228
+ showStatusBar?: boolean;
1229
+ /**
1230
+ * Enable or disable the rendering of the suggestion preview.
1231
+ */
1232
+ preview?: boolean;
1233
+ /**
1234
+ * Configures the mode of the preview.
1235
+ */
1236
+ previewMode?: 'prefix' | 'subword' | 'subwordSmart';
1237
+ /**
1238
+ * Show details inline with the label. Defaults to true.
1239
+ */
1240
+ showInlineDetails?: boolean;
1241
+ /**
1242
+ * Show method-suggestions.
1243
+ */
1244
+ showMethods?: boolean;
1245
+ /**
1246
+ * Show function-suggestions.
1247
+ */
1248
+ showFunctions?: boolean;
1249
+ /**
1250
+ * Show constructor-suggestions.
1251
+ */
1252
+ showConstructors?: boolean;
1253
+ /**
1254
+ * Show deprecated-suggestions.
1255
+ */
1256
+ showDeprecated?: boolean;
1257
+ /**
1258
+ * Show field-suggestions.
1259
+ */
1260
+ showFields?: boolean;
1261
+ /**
1262
+ * Show variable-suggestions.
1263
+ */
1264
+ showVariables?: boolean;
1265
+ /**
1266
+ * Show class-suggestions.
1267
+ */
1268
+ showClasses?: boolean;
1269
+ /**
1270
+ * Show struct-suggestions.
1271
+ */
1272
+ showStructs?: boolean;
1273
+ /**
1274
+ * Show interface-suggestions.
1275
+ */
1276
+ showInterfaces?: boolean;
1277
+ /**
1278
+ * Show module-suggestions.
1279
+ */
1280
+ showModules?: boolean;
1281
+ /**
1282
+ * Show property-suggestions.
1283
+ */
1284
+ showProperties?: boolean;
1285
+ /**
1286
+ * Show event-suggestions.
1287
+ */
1288
+ showEvents?: boolean;
1289
+ /**
1290
+ * Show operator-suggestions.
1291
+ */
1292
+ showOperators?: boolean;
1293
+ /**
1294
+ * Show unit-suggestions.
1295
+ */
1296
+ showUnits?: boolean;
1297
+ /**
1298
+ * Show value-suggestions.
1299
+ */
1300
+ showValues?: boolean;
1301
+ /**
1302
+ * Show constant-suggestions.
1303
+ */
1304
+ showConstants?: boolean;
1305
+ /**
1306
+ * Show enum-suggestions.
1307
+ */
1308
+ showEnums?: boolean;
1309
+ /**
1310
+ * Show enumMember-suggestions.
1311
+ */
1312
+ showEnumMembers?: boolean;
1313
+ /**
1314
+ * Show keyword-suggestions.
1315
+ */
1316
+ showKeywords?: boolean;
1317
+ /**
1318
+ * Show text-suggestions.
1319
+ */
1320
+ showWords?: boolean;
1321
+ /**
1322
+ * Show color-suggestions.
1323
+ */
1324
+ showColors?: boolean;
1325
+ /**
1326
+ * Show file-suggestions.
1327
+ */
1328
+ showFiles?: boolean;
1329
+ /**
1330
+ * Show reference-suggestions.
1331
+ */
1332
+ showReferences?: boolean;
1333
+ /**
1334
+ * Show folder-suggestions.
1335
+ */
1336
+ showFolders?: boolean;
1337
+ /**
1338
+ * Show typeParameter-suggestions.
1339
+ */
1340
+ showTypeParameters?: boolean;
1341
+ /**
1342
+ * Show issue-suggestions.
1343
+ */
1344
+ showIssues?: boolean;
1345
+ /**
1346
+ * Show user-suggestions.
1347
+ */
1348
+ showUsers?: boolean;
1349
+ /**
1350
+ * Show snippet-suggestions.
1351
+ */
1352
+ showSnippets?: boolean;
1353
+ }
1354
+ interface ISmartSelectOptions {
1355
+ selectLeadingAndTrailingWhitespace?: boolean;
1356
+ }
1357
+
1358
+ /**
1359
+ * A position in the editor. This interface is suitable for serialization.
1360
+ */
1361
+ interface IPosition {
1362
+ /**
1363
+ * line number (starts at 1)
1364
+ */
1365
+ readonly lineNumber: number;
1366
+ /**
1367
+ * column (the first character in a line is between column 1 and column 2)
1368
+ */
1369
+ readonly column: number;
1370
+ }
1371
+ /**
1372
+ * A position in the editor.
1373
+ */
1374
+ declare class Position {
1375
+ /**
1376
+ * line number (starts at 1)
1377
+ */
1378
+ readonly lineNumber: number;
1379
+ /**
1380
+ * column (the first character in a line is between column 1 and column 2)
1381
+ */
1382
+ readonly column: number;
1383
+ constructor(lineNumber: number, column: number);
1384
+ /**
1385
+ * Create a new position from this position.
1386
+ *
1387
+ * @param newLineNumber new line number
1388
+ * @param newColumn new column
1389
+ */
1390
+ with(newLineNumber?: number, newColumn?: number): Position;
1391
+ /**
1392
+ * Derive a new position from this position.
1393
+ *
1394
+ * @param deltaLineNumber line number delta
1395
+ * @param deltaColumn column delta
1396
+ */
1397
+ delta(deltaLineNumber?: number, deltaColumn?: number): Position;
1398
+ /**
1399
+ * Test if this position equals other position
1400
+ */
1401
+ equals(other: IPosition): boolean;
1402
+ /**
1403
+ * Test if position `a` equals position `b`
1404
+ */
1405
+ static equals(a: IPosition | null, b: IPosition | null): boolean;
1406
+ /**
1407
+ * Test if this position is before other position.
1408
+ * If the two positions are equal, the result will be false.
1409
+ */
1410
+ isBefore(other: IPosition): boolean;
1411
+ /**
1412
+ * Test if position `a` is before position `b`.
1413
+ * If the two positions are equal, the result will be false.
1414
+ */
1415
+ static isBefore(a: IPosition, b: IPosition): boolean;
1416
+ /**
1417
+ * Test if this position is before other position.
1418
+ * If the two positions are equal, the result will be true.
1419
+ */
1420
+ isBeforeOrEqual(other: IPosition): boolean;
1421
+ /**
1422
+ * Test if position `a` is before position `b`.
1423
+ * If the two positions are equal, the result will be true.
1424
+ */
1425
+ static isBeforeOrEqual(a: IPosition, b: IPosition): boolean;
1426
+ /**
1427
+ * A function that compares positions, useful for sorting
1428
+ */
1429
+ static compare(a: IPosition, b: IPosition): number;
1430
+ /**
1431
+ * Clone this position.
1432
+ */
1433
+ clone(): Position;
1434
+ /**
1435
+ * Convert to a human-readable representation.
1436
+ */
1437
+ toString(): string;
1438
+ /**
1439
+ * Create a `Position` from an `IPosition`.
1440
+ */
1441
+ static lift(pos: IPosition): Position;
1442
+ /**
1443
+ * Test if `obj` is an `IPosition`.
1444
+ */
1445
+ static isIPosition(obj: any): obj is IPosition;
1446
+ }
1447
+
1448
+ /**
1449
+ * A range in the editor. This interface is suitable for serialization.
1450
+ */
1451
+ interface IRange {
1452
+ /**
1453
+ * Line number on which the range starts (starts at 1).
1454
+ */
1455
+ readonly startLineNumber: number;
1456
+ /**
1457
+ * Column on which the range starts in line `startLineNumber` (starts at 1).
1458
+ */
1459
+ readonly startColumn: number;
1460
+ /**
1461
+ * Line number on which the range ends.
1462
+ */
1463
+ readonly endLineNumber: number;
1464
+ /**
1465
+ * Column on which the range ends in line `endLineNumber`.
1466
+ */
1467
+ readonly endColumn: number;
1468
+ }
1469
+ /**
1470
+ * A range in the editor. (startLineNumber,startColumn) is <= (endLineNumber,endColumn)
1471
+ */
1472
+ declare class Range {
1473
+ /**
1474
+ * Line number on which the range starts (starts at 1).
1475
+ */
1476
+ readonly startLineNumber: number;
1477
+ /**
1478
+ * Column on which the range starts in line `startLineNumber` (starts at 1).
1479
+ */
1480
+ readonly startColumn: number;
1481
+ /**
1482
+ * Line number on which the range ends.
1483
+ */
1484
+ readonly endLineNumber: number;
1485
+ /**
1486
+ * Column on which the range ends in line `endLineNumber`.
1487
+ */
1488
+ readonly endColumn: number;
1489
+ constructor(startLineNumber: number, startColumn: number, endLineNumber: number, endColumn: number);
1490
+ /**
1491
+ * Test if this range is empty.
1492
+ */
1493
+ isEmpty(): boolean;
1494
+ /**
1495
+ * Test if `range` is empty.
1496
+ */
1497
+ static isEmpty(range: IRange): boolean;
1498
+ /**
1499
+ * Test if position is in this range. If the position is at the edges, will return true.
1500
+ */
1501
+ containsPosition(position: IPosition): boolean;
1502
+ /**
1503
+ * Test if `position` is in `range`. If the position is at the edges, will return true.
1504
+ */
1505
+ static containsPosition(range: IRange, position: IPosition): boolean;
1506
+ /**
1507
+ * Test if `position` is in `range`. If the position is at the edges, will return false.
1508
+ * @internal
1509
+ */
1510
+ static strictContainsPosition(range: IRange, position: IPosition): boolean;
1511
+ /**
1512
+ * Test if range is in this range. If the range is equal to this range, will return true.
1513
+ */
1514
+ containsRange(range: IRange): boolean;
1515
+ /**
1516
+ * Test if `otherRange` is in `range`. If the ranges are equal, will return true.
1517
+ */
1518
+ static containsRange(range: IRange, otherRange: IRange): boolean;
1519
+ /**
1520
+ * Test if `range` is strictly in this range. `range` must start after and end before this range for the result to be true.
1521
+ */
1522
+ strictContainsRange(range: IRange): boolean;
1523
+ /**
1524
+ * Test if `otherRange` is strictly in `range` (must start after, and end before). If the ranges are equal, will return false.
1525
+ */
1526
+ static strictContainsRange(range: IRange, otherRange: IRange): boolean;
1527
+ /**
1528
+ * A reunion of the two ranges.
1529
+ * The smallest position will be used as the start point, and the largest one as the end point.
1530
+ */
1531
+ plusRange(range: IRange): Range;
1532
+ /**
1533
+ * A reunion of the two ranges.
1534
+ * The smallest position will be used as the start point, and the largest one as the end point.
1535
+ */
1536
+ static plusRange(a: IRange, b: IRange): Range;
1537
+ /**
1538
+ * A intersection of the two ranges.
1539
+ */
1540
+ intersectRanges(range: IRange): Range | null;
1541
+ /**
1542
+ * A intersection of the two ranges.
1543
+ */
1544
+ static intersectRanges(a: IRange, b: IRange): Range | null;
1545
+ /**
1546
+ * Test if this range equals other.
1547
+ */
1548
+ equalsRange(other: IRange | null): boolean;
1549
+ /**
1550
+ * Test if range `a` equals `b`.
1551
+ */
1552
+ static equalsRange(a: IRange | null, b: IRange | null): boolean;
1553
+ /**
1554
+ * Return the end position (which will be after or equal to the start position)
1555
+ */
1556
+ getEndPosition(): Position;
1557
+ /**
1558
+ * Return the end position (which will be after or equal to the start position)
1559
+ */
1560
+ static getEndPosition(range: IRange): Position;
1561
+ /**
1562
+ * Return the start position (which will be before or equal to the end position)
1563
+ */
1564
+ getStartPosition(): Position;
1565
+ /**
1566
+ * Return the start position (which will be before or equal to the end position)
1567
+ */
1568
+ static getStartPosition(range: IRange): Position;
1569
+ /**
1570
+ * Transform to a user presentable string representation.
1571
+ */
1572
+ toString(): string;
1573
+ /**
1574
+ * Create a new range using this range's start position, and using endLineNumber and endColumn as the end position.
1575
+ */
1576
+ setEndPosition(endLineNumber: number, endColumn: number): Range;
1577
+ /**
1578
+ * Create a new range using this range's end position, and using startLineNumber and startColumn as the start position.
1579
+ */
1580
+ setStartPosition(startLineNumber: number, startColumn: number): Range;
1581
+ /**
1582
+ * Create a new empty range using this range's start position.
1583
+ */
1584
+ collapseToStart(): Range;
1585
+ /**
1586
+ * Create a new empty range using this range's start position.
1587
+ */
1588
+ static collapseToStart(range: IRange): Range;
1589
+ static fromPositions(start: IPosition, end?: IPosition): Range;
1590
+ /**
1591
+ * Create a `Range` from an `IRange`.
1592
+ */
1593
+ static lift(range: undefined | null): null;
1594
+ static lift(range: IRange): Range;
1595
+ static lift(range: IRange | undefined | null): Range | null;
1596
+ /**
1597
+ * Test if `obj` is an `IRange`.
1598
+ */
1599
+ static isIRange(obj: any): obj is IRange;
1600
+ /**
1601
+ * Test if the two ranges are touching in any way.
1602
+ */
1603
+ static areIntersectingOrTouching(a: IRange, b: IRange): boolean;
1604
+ /**
1605
+ * Test if the two ranges are intersecting. If the ranges are touching it returns true.
1606
+ */
1607
+ static areIntersecting(a: IRange, b: IRange): boolean;
1608
+ /**
1609
+ * A function that compares ranges, useful for sorting ranges
1610
+ * It will first compare ranges on the startPosition and then on the endPosition
1611
+ */
1612
+ static compareRangesUsingStarts(a: IRange | null | undefined, b: IRange | null | undefined): number;
1613
+ /**
1614
+ * A function that compares ranges, useful for sorting ranges
1615
+ * It will first compare ranges on the endPosition and then on the startPosition
1616
+ */
1617
+ static compareRangesUsingEnds(a: IRange, b: IRange): number;
1618
+ /**
1619
+ * Test if the range spans multiple lines.
1620
+ */
1621
+ static spansMultipleLines(range: IRange): boolean;
1622
+ toJSON(): IRange;
1623
+ }
1624
+
1625
+ /**
1626
+ * A selection in the editor.
1627
+ * The selection is a range that has an orientation.
1628
+ */
1629
+ interface ISelection {
1630
+ /**
1631
+ * The line number on which the selection has started.
1632
+ */
1633
+ readonly selectionStartLineNumber: number;
1634
+ /**
1635
+ * The column on `selectionStartLineNumber` where the selection has started.
1636
+ */
1637
+ readonly selectionStartColumn: number;
1638
+ /**
1639
+ * The line number on which the selection has ended.
1640
+ */
1641
+ readonly positionLineNumber: number;
1642
+ /**
1643
+ * The column on `positionLineNumber` where the selection has ended.
1644
+ */
1645
+ readonly positionColumn: number;
1646
+ }
1647
+ /**
1648
+ * The direction of a selection.
1649
+ */
1650
+ declare const enum SelectionDirection {
1651
+ /**
1652
+ * The selection starts above where it ends.
1653
+ */
1654
+ LTR = 0,
1655
+ /**
1656
+ * The selection starts below where it ends.
1657
+ */
1658
+ RTL = 1
1659
+ }
1660
+ /**
1661
+ * A selection in the editor.
1662
+ * The selection is a range that has an orientation.
1663
+ */
1664
+ declare class Selection extends Range {
1665
+ /**
1666
+ * The line number on which the selection has started.
1667
+ */
1668
+ readonly selectionStartLineNumber: number;
1669
+ /**
1670
+ * The column on `selectionStartLineNumber` where the selection has started.
1671
+ */
1672
+ readonly selectionStartColumn: number;
1673
+ /**
1674
+ * The line number on which the selection has ended.
1675
+ */
1676
+ readonly positionLineNumber: number;
1677
+ /**
1678
+ * The column on `positionLineNumber` where the selection has ended.
1679
+ */
1680
+ readonly positionColumn: number;
1681
+ constructor(selectionStartLineNumber: number, selectionStartColumn: number, positionLineNumber: number, positionColumn: number);
1682
+ /**
1683
+ * Transform to a human-readable representation.
1684
+ */
1685
+ toString(): string;
1686
+ /**
1687
+ * Test if equals other selection.
1688
+ */
1689
+ equalsSelection(other: ISelection): boolean;
1690
+ /**
1691
+ * Test if the two selections are equal.
1692
+ */
1693
+ static selectionsEqual(a: ISelection, b: ISelection): boolean;
1694
+ /**
1695
+ * Get directions (LTR or RTL).
1696
+ */
1697
+ getDirection(): SelectionDirection;
1698
+ /**
1699
+ * Create a new selection with a different `positionLineNumber` and `positionColumn`.
1700
+ */
1701
+ setEndPosition(endLineNumber: number, endColumn: number): Selection;
1702
+ /**
1703
+ * Get the position at `positionLineNumber` and `positionColumn`.
1704
+ */
1705
+ getPosition(): Position;
1706
+ /**
1707
+ * Get the position at the start of the selection.
1708
+ */
1709
+ getSelectionStart(): Position;
1710
+ /**
1711
+ * Create a new selection with a different `selectionStartLineNumber` and `selectionStartColumn`.
1712
+ */
1713
+ setStartPosition(startLineNumber: number, startColumn: number): Selection;
1714
+ /**
1715
+ * Create a `Selection` from one or two positions
1716
+ */
1717
+ static fromPositions(start: IPosition, end?: IPosition): Selection;
1718
+ /**
1719
+ * Creates a `Selection` from a range, given a direction.
1720
+ */
1721
+ static fromRange(range: Range, direction: SelectionDirection): Selection;
1722
+ /**
1723
+ * Create a `Selection` from an `ISelection`.
1724
+ */
1725
+ static liftSelection(sel: ISelection): Selection;
1726
+ /**
1727
+ * `a` equals `b`.
1728
+ */
1729
+ static selectionsArrEqual(a: ISelection[], b: ISelection[]): boolean;
1730
+ /**
1731
+ * Test if `obj` is an `ISelection`.
1732
+ */
1733
+ static isISelection(obj: any): obj is ISelection;
1734
+ /**
1735
+ * Create with a direction.
1736
+ */
1737
+ static createWithDirection(startLineNumber: number, startColumn: number, endLineNumber: number, endColumn: number, direction: SelectionDirection): Selection;
1738
+ }
1739
+
1740
+ interface IMarkdownString {
1741
+ readonly value: string;
1742
+ readonly isTrusted?: boolean;
1743
+ readonly supportThemeIcons?: boolean;
1744
+ readonly supportHtml?: boolean;
1745
+ readonly baseUri?: UriComponents;
1746
+ uris?: {
1747
+ [href: string]: UriComponents;
1748
+ };
1749
+ }
1750
+
1751
+ interface ThemeColor {
1752
+ id: string;
1753
+ }
1754
+ declare namespace ThemeColor {
1755
+ function isThemeColor(obj: any): obj is ThemeColor;
1756
+ }
1757
+
1758
+ /**
1759
+ * Vertical Lane in the overview ruler of the editor.
1760
+ */
1761
+ declare enum OverviewRulerLane {
1762
+ Left = 1,
1763
+ Center = 2,
1764
+ Right = 4,
1765
+ Full = 7
1766
+ }
1767
+ /**
1768
+ * Position in the minimap to render the decoration.
1769
+ */
1770
+ declare enum MinimapPosition {
1771
+ Inline = 1,
1772
+ Gutter = 2
1773
+ }
1774
+ interface IDecorationOptions {
1775
+ /**
1776
+ * CSS color to render.
1777
+ * e.g.: rgba(100, 100, 100, 0.5) or a color from the color registry
1778
+ */
1779
+ color: string | ThemeColor | undefined;
1780
+ /**
1781
+ * CSS color to render.
1782
+ * e.g.: rgba(100, 100, 100, 0.5) or a color from the color registry
1783
+ */
1784
+ darkColor?: string | ThemeColor;
1785
+ }
1786
+ /**
1787
+ * Options for rendering a model decoration in the overview ruler.
1788
+ */
1789
+ interface IModelDecorationOverviewRulerOptions extends IDecorationOptions {
1790
+ /**
1791
+ * The position in the overview ruler.
1792
+ */
1793
+ position: OverviewRulerLane;
1794
+ }
1795
+ /**
1796
+ * Options for rendering a model decoration in the overview ruler.
1797
+ */
1798
+ interface IModelDecorationMinimapOptions extends IDecorationOptions {
1799
+ /**
1800
+ * The position in the overview ruler.
1801
+ */
1802
+ position: MinimapPosition;
1803
+ }
1804
+ /**
1805
+ * Options for a model decoration.
1806
+ */
1807
+ interface IModelDecorationOptions {
1808
+ /**
1809
+ * A debug description that can be used for inspecting model decorations.
1810
+ * @internal
1811
+ */
1812
+ description: string;
1813
+ /**
1814
+ * Customize the growing behavior of the decoration when typing at the edges of the decoration.
1815
+ * Defaults to TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges
1816
+ */
1817
+ stickiness?: TrackedRangeStickiness;
1818
+ /**
1819
+ * CSS class name describing the decoration.
1820
+ */
1821
+ className?: string | null;
1822
+ /**
1823
+ * Message to be rendered when hovering over the glyph margin decoration.
1824
+ */
1825
+ glyphMarginHoverMessage?: IMarkdownString | IMarkdownString[] | null;
1826
+ /**
1827
+ * Array of MarkdownString to render as the decoration message.
1828
+ */
1829
+ hoverMessage?: IMarkdownString | IMarkdownString[] | null;
1830
+ /**
1831
+ * Should the decoration expand to encompass a whole line.
1832
+ */
1833
+ isWholeLine?: boolean;
1834
+ /**
1835
+ * Always render the decoration (even when the range it encompasses is collapsed).
1836
+ * @internal
1837
+ */
1838
+ showIfCollapsed?: boolean;
1839
+ /**
1840
+ * Collapse the decoration if its entire range is being replaced via an edit.
1841
+ * @internal
1842
+ */
1843
+ collapseOnReplaceEdit?: boolean;
1844
+ /**
1845
+ * Specifies the stack order of a decoration.
1846
+ * A decoration with greater stack order is always in front of a decoration with
1847
+ * a lower stack order when the decorations are on the same line.
1848
+ */
1849
+ zIndex?: number;
1850
+ /**
1851
+ * If set, render this decoration in the overview ruler.
1852
+ */
1853
+ overviewRuler?: IModelDecorationOverviewRulerOptions | null;
1854
+ /**
1855
+ * If set, render this decoration in the minimap.
1856
+ */
1857
+ minimap?: IModelDecorationMinimapOptions | null;
1858
+ /**
1859
+ * If set, the decoration will be rendered in the glyph margin with this CSS class name.
1860
+ */
1861
+ glyphMarginClassName?: string | null;
1862
+ /**
1863
+ * If set, the decoration will be rendered in the lines decorations with this CSS class name.
1864
+ */
1865
+ linesDecorationsClassName?: string | null;
1866
+ /**
1867
+ * If set, the decoration will be rendered in the lines decorations with this CSS class name, but only for the first line in case of line wrapping.
1868
+ */
1869
+ firstLineDecorationClassName?: string | null;
1870
+ /**
1871
+ * If set, the decoration will be rendered in the margin (covering its full width) with this CSS class name.
1872
+ */
1873
+ marginClassName?: string | null;
1874
+ /**
1875
+ * If set, the decoration will be rendered inline with the text with this CSS class name.
1876
+ * Please use this only for CSS rules that must impact the text. For example, use `className`
1877
+ * to have a background color decoration.
1878
+ */
1879
+ inlineClassName?: string | null;
1880
+ /**
1881
+ * If there is an `inlineClassName` which affects letter spacing.
1882
+ */
1883
+ inlineClassNameAffectsLetterSpacing?: boolean;
1884
+ /**
1885
+ * If set, the decoration will be rendered before the text with this CSS class name.
1886
+ */
1887
+ beforeContentClassName?: string | null;
1888
+ /**
1889
+ * If set, the decoration will be rendered after the text with this CSS class name.
1890
+ */
1891
+ afterContentClassName?: string | null;
1892
+ /**
1893
+ * If set, text will be injected in the view after the range.
1894
+ */
1895
+ after?: InjectedTextOptions | null;
1896
+ /**
1897
+ * If set, text will be injected in the view before the range.
1898
+ */
1899
+ before?: InjectedTextOptions | null;
1900
+ /**
1901
+ * If set, this decoration will not be rendered for comment tokens.
1902
+ * @internal
1903
+ */
1904
+ hideInCommentTokens?: boolean | null;
1905
+ /**
1906
+ * If set, this decoration will not be rendered for string tokens.
1907
+ * @internal
1908
+ */
1909
+ hideInStringTokens?: boolean | null;
1910
+ }
1911
+ /**
1912
+ * Configures text that is injected into the view without changing the underlying document.
1913
+ */
1914
+ interface InjectedTextOptions {
1915
+ /**
1916
+ * Sets the text to inject. Must be a single line.
1917
+ */
1918
+ readonly content: string;
1919
+ /**
1920
+ * If set, the decoration will be rendered inline with the text with this CSS class name.
1921
+ */
1922
+ readonly inlineClassName?: string | null;
1923
+ /**
1924
+ * If there is an `inlineClassName` which affects letter spacing.
1925
+ */
1926
+ readonly inlineClassNameAffectsLetterSpacing?: boolean;
1927
+ /**
1928
+ * This field allows to attach data to this injected text.
1929
+ * The data can be read when injected texts at a given position are queried.
1930
+ */
1931
+ readonly attachedData?: unknown;
1932
+ /**
1933
+ * Configures cursor stops around injected text.
1934
+ * Defaults to {@link InjectedTextCursorStops.Both}.
1935
+ */
1936
+ readonly cursorStops?: InjectedTextCursorStops | null;
1937
+ }
1938
+ declare enum InjectedTextCursorStops {
1939
+ Both = 0,
1940
+ Right = 1,
1941
+ Left = 2,
1942
+ None = 3
1943
+ }
1944
+ /**
1945
+ * New model decorations.
1946
+ */
1947
+ interface IModelDeltaDecoration {
1948
+ /**
1949
+ * Range that this decoration covers.
1950
+ */
1951
+ range: IRange;
1952
+ /**
1953
+ * Options associated with this decoration.
1954
+ */
1955
+ options: IModelDecorationOptions;
1956
+ }
1957
+ /**
1958
+ * An accessor that can add, change or remove model decorations.
1959
+ * @internal
1960
+ */
1961
+ interface IModelDecorationsChangeAccessor {
1962
+ /**
1963
+ * Add a new decoration.
1964
+ * @param range Range that this decoration covers.
1965
+ * @param options Options associated with this decoration.
1966
+ * @return An unique identifier associated with this decoration.
1967
+ */
1968
+ addDecoration(range: IRange, options: IModelDecorationOptions): string;
1969
+ /**
1970
+ * Change the range that an existing decoration covers.
1971
+ * @param id The unique identifier associated with the decoration.
1972
+ * @param newRange The new range that this decoration covers.
1973
+ */
1974
+ changeDecoration(id: string, newRange: IRange): void;
1975
+ /**
1976
+ * Change the options associated with an existing decoration.
1977
+ * @param id The unique identifier associated with the decoration.
1978
+ * @param newOptions The new options associated with this decoration.
1979
+ */
1980
+ changeDecorationOptions(id: string, newOptions: IModelDecorationOptions): void;
1981
+ /**
1982
+ * Remove an existing decoration.
1983
+ * @param id The unique identifier associated with the decoration.
1984
+ */
1985
+ removeDecoration(id: string): void;
1986
+ /**
1987
+ * Perform a minimum amount of operations, in order to transform the decorations
1988
+ * identified by `oldDecorations` to the decorations described by `newDecorations`
1989
+ * and returns the new identifiers associated with the resulting decorations.
1990
+ *
1991
+ * @param oldDecorations Array containing previous decorations identifiers.
1992
+ * @param newDecorations Array describing what decorations should result after the call.
1993
+ * @return An array containing the new decorations identifiers.
1994
+ */
1995
+ deltaDecorations(oldDecorations: string[], newDecorations: IModelDeltaDecoration[]): string[];
1996
+ }
1997
+ /**
1998
+ * Describes the behavior of decorations when typing/editing near their edges.
1999
+ * Note: Please do not edit the values, as they very carefully match `DecorationRangeBehavior`
2000
+ */
2001
+ declare const enum TrackedRangeStickiness {
2002
+ AlwaysGrowsWhenTypingAtEdges = 0,
2003
+ NeverGrowsWhenTypingAtEdges = 1,
2004
+ GrowsOnlyWhenTypingBefore = 2,
2005
+ GrowsOnlyWhenTypingAfter = 3
2006
+ }
2007
+ /**
2008
+ * A model.
2009
+ */
2010
+ type ITextModel = monaco.editor.ITextModel
2011
+
2012
+ interface IDimension {
2013
+ width: number;
2014
+ height: number;
2015
+ }
2016
+
2017
+ /**
2018
+ * A model for the diff editor.
2019
+ */
2020
+ interface IDiffEditorModel {
2021
+ /**
2022
+ * Original model.
2023
+ */
2024
+ original: ITextModel;
2025
+ /**
2026
+ * Modified model.
2027
+ */
2028
+ modified: ITextModel;
2029
+ }
2030
+ interface IEditorAction {
2031
+ readonly id: string;
2032
+ readonly label: string;
2033
+ readonly alias: string;
2034
+ isSupported(): boolean;
2035
+ run(): Promise<void>;
2036
+ }
2037
+ declare type IEditorModel = ITextModel | IDiffEditorModel;
2038
+ /**
2039
+ * A (serializable) state of the cursors.
2040
+ */
2041
+ interface ICursorState {
2042
+ inSelectionMode: boolean;
2043
+ selectionStart: IPosition;
2044
+ position: IPosition;
2045
+ }
2046
+ /**
2047
+ * A (serializable) state of the view.
2048
+ */
2049
+ interface IViewState {
2050
+ /** written by previous versions */
2051
+ scrollTop?: number;
2052
+ /** written by previous versions */
2053
+ scrollTopWithoutViewZones?: number;
2054
+ scrollLeft: number;
2055
+ firstPosition: IPosition;
2056
+ firstPositionDeltaTop: number;
2057
+ }
2058
+ /**
2059
+ * A (serializable) state of the code editor.
2060
+ */
2061
+ interface ICodeEditorViewState {
2062
+ cursorState: ICursorState[];
2063
+ viewState: IViewState;
2064
+ contributionsState: {
2065
+ [id: string]: any;
2066
+ };
2067
+ }
2068
+ /**
2069
+ * (Serializable) View state for the diff editor.
2070
+ */
2071
+ interface IDiffEditorViewState {
2072
+ original: ICodeEditorViewState | null;
2073
+ modified: ICodeEditorViewState | null;
2074
+ }
2075
+ /**
2076
+ * An editor view state.
2077
+ */
2078
+ declare type IEditorViewState = ICodeEditorViewState | IDiffEditorViewState;
2079
+ declare const enum ScrollType {
2080
+ Smooth = 0,
2081
+ Immediate = 1
2082
+ }
2083
+ /**
2084
+ * An editor.
2085
+ */
2086
+ interface IEditor {
2087
+ /**
2088
+ * An event emitted when the editor has been disposed.
2089
+ * @event
2090
+ */
2091
+ onDidDispose(listener: () => void): IDisposable;
2092
+ /**
2093
+ * Dispose the editor.
2094
+ */
2095
+ dispose(): void;
2096
+ /**
2097
+ * Get a unique id for this editor instance.
2098
+ */
2099
+ getId(): string;
2100
+ /**
2101
+ * Get the editor type. Please see `EditorType`.
2102
+ * This is to avoid an instanceof check
2103
+ */
2104
+ getEditorType(): string;
2105
+ /**
2106
+ * Update the editor's options after the editor has been created.
2107
+ */
2108
+ updateOptions(newOptions: IEditorOptions): void;
2109
+ /**
2110
+ * Indicates that the editor becomes visible.
2111
+ * @internal
2112
+ */
2113
+ onVisible(): void;
2114
+ /**
2115
+ * Indicates that the editor becomes hidden.
2116
+ * @internal
2117
+ */
2118
+ onHide(): void;
2119
+ /**
2120
+ * Instructs the editor to remeasure its container. This method should
2121
+ * be called when the container of the editor gets resized.
2122
+ *
2123
+ * If a dimension is passed in, the passed in value will be used.
2124
+ */
2125
+ layout(dimension?: IDimension): void;
2126
+ /**
2127
+ * Brings browser focus to the editor text
2128
+ */
2129
+ focus(): void;
2130
+ /**
2131
+ * Returns true if the text inside this editor is focused (i.e. cursor is blinking).
2132
+ */
2133
+ hasTextFocus(): boolean;
2134
+ /**
2135
+ * Returns all actions associated with this editor.
2136
+ */
2137
+ getSupportedActions(): IEditorAction[];
2138
+ /**
2139
+ * Saves current view state of the editor in a serializable object.
2140
+ */
2141
+ saveViewState(): IEditorViewState | null;
2142
+ /**
2143
+ * Restores the view state of the editor from a serializable object generated by `saveViewState`.
2144
+ */
2145
+ restoreViewState(state: IEditorViewState): void;
2146
+ /**
2147
+ * Given a position, returns a column number that takes tab-widths into account.
2148
+ */
2149
+ getVisibleColumnFromPosition(position: IPosition): number;
2150
+ /**
2151
+ * Given a position, returns a column number that takes tab-widths into account.
2152
+ * @internal
2153
+ */
2154
+ getStatusbarColumn(position: IPosition): number;
2155
+ /**
2156
+ * Returns the primary position of the cursor.
2157
+ */
2158
+ getPosition(): Position | null;
2159
+ /**
2160
+ * Set the primary position of the cursor. This will remove any secondary cursors.
2161
+ * @param position New primary cursor's position
2162
+ * @param source Source of the call that caused the position
2163
+ */
2164
+ setPosition(position: IPosition, source?: string): void;
2165
+ /**
2166
+ * Scroll vertically as necessary and reveal a line.
2167
+ */
2168
+ revealLine(lineNumber: number, scrollType?: ScrollType): void;
2169
+ /**
2170
+ * Scroll vertically as necessary and reveal a line centered vertically.
2171
+ */
2172
+ revealLineInCenter(lineNumber: number, scrollType?: ScrollType): void;
2173
+ /**
2174
+ * Scroll vertically as necessary and reveal a line centered vertically only if it lies outside the viewport.
2175
+ */
2176
+ revealLineInCenterIfOutsideViewport(lineNumber: number, scrollType?: ScrollType): void;
2177
+ /**
2178
+ * Scroll vertically as necessary and reveal a line close to the top of the viewport,
2179
+ * optimized for viewing a code definition.
2180
+ */
2181
+ revealLineNearTop(lineNumber: number, scrollType?: ScrollType): void;
2182
+ /**
2183
+ * Scroll vertically or horizontally as necessary and reveal a position.
2184
+ */
2185
+ revealPosition(position: IPosition, scrollType?: ScrollType): void;
2186
+ /**
2187
+ * Scroll vertically or horizontally as necessary and reveal a position centered vertically.
2188
+ */
2189
+ revealPositionInCenter(position: IPosition, scrollType?: ScrollType): void;
2190
+ /**
2191
+ * Scroll vertically or horizontally as necessary and reveal a position centered vertically only if it lies outside the viewport.
2192
+ */
2193
+ revealPositionInCenterIfOutsideViewport(position: IPosition, scrollType?: ScrollType): void;
2194
+ /**
2195
+ * Scroll vertically or horizontally as necessary and reveal a position close to the top of the viewport,
2196
+ * optimized for viewing a code definition.
2197
+ */
2198
+ revealPositionNearTop(position: IPosition, scrollType?: ScrollType): void;
2199
+ /**
2200
+ * Returns the primary selection of the editor.
2201
+ */
2202
+ getSelection(): Selection | null;
2203
+ /**
2204
+ * Returns all the selections of the editor.
2205
+ */
2206
+ getSelections(): Selection[] | null;
2207
+ /**
2208
+ * Set the primary selection of the editor. This will remove any secondary cursors.
2209
+ * @param selection The new selection
2210
+ * @param source Source of the call that caused the selection
2211
+ */
2212
+ setSelection(selection: IRange, source?: string): void;
2213
+ /**
2214
+ * Set the primary selection of the editor. This will remove any secondary cursors.
2215
+ * @param selection The new selection
2216
+ * @param source Source of the call that caused the selection
2217
+ */
2218
+ setSelection(selection: Range, source?: string): void;
2219
+ /**
2220
+ * Set the primary selection of the editor. This will remove any secondary cursors.
2221
+ * @param selection The new selection
2222
+ * @param source Source of the call that caused the selection
2223
+ */
2224
+ setSelection(selection: ISelection, source?: string): void;
2225
+ /**
2226
+ * Set the primary selection of the editor. This will remove any secondary cursors.
2227
+ * @param selection The new selection
2228
+ * @param source Source of the call that caused the selection
2229
+ */
2230
+ setSelection(selection: Selection, source?: string): void;
2231
+ /**
2232
+ * Set the selections for all the cursors of the editor.
2233
+ * Cursors will be removed or added, as necessary.
2234
+ * @param selections The new selection
2235
+ * @param source Source of the call that caused the selection
2236
+ */
2237
+ setSelections(selections: readonly ISelection[], source?: string): void;
2238
+ /**
2239
+ * Scroll vertically as necessary and reveal lines.
2240
+ */
2241
+ revealLines(startLineNumber: number, endLineNumber: number, scrollType?: ScrollType): void;
2242
+ /**
2243
+ * Scroll vertically as necessary and reveal lines centered vertically.
2244
+ */
2245
+ revealLinesInCenter(lineNumber: number, endLineNumber: number, scrollType?: ScrollType): void;
2246
+ /**
2247
+ * Scroll vertically as necessary and reveal lines centered vertically only if it lies outside the viewport.
2248
+ */
2249
+ revealLinesInCenterIfOutsideViewport(lineNumber: number, endLineNumber: number, scrollType?: ScrollType): void;
2250
+ /**
2251
+ * Scroll vertically as necessary and reveal lines close to the top of the viewport,
2252
+ * optimized for viewing a code definition.
2253
+ */
2254
+ revealLinesNearTop(lineNumber: number, endLineNumber: number, scrollType?: ScrollType): void;
2255
+ /**
2256
+ * Scroll vertically or horizontally as necessary and reveal a range.
2257
+ */
2258
+ revealRange(range: IRange, scrollType?: ScrollType): void;
2259
+ /**
2260
+ * Scroll vertically or horizontally as necessary and reveal a range centered vertically.
2261
+ */
2262
+ revealRangeInCenter(range: IRange, scrollType?: ScrollType): void;
2263
+ /**
2264
+ * Scroll vertically or horizontally as necessary and reveal a range at the top of the viewport.
2265
+ */
2266
+ revealRangeAtTop(range: IRange, scrollType?: ScrollType): void;
2267
+ /**
2268
+ * Scroll vertically or horizontally as necessary and reveal a range centered vertically only if it lies outside the viewport.
2269
+ */
2270
+ revealRangeInCenterIfOutsideViewport(range: IRange, scrollType?: ScrollType): void;
2271
+ /**
2272
+ * Scroll vertically or horizontally as necessary and reveal a range close to the top of the viewport,
2273
+ * optimized for viewing a code definition.
2274
+ */
2275
+ revealRangeNearTop(range: IRange, scrollType?: ScrollType): void;
2276
+ /**
2277
+ * Scroll vertically or horizontally as necessary and reveal a range close to the top of the viewport,
2278
+ * optimized for viewing a code definition. Only if it lies outside the viewport.
2279
+ */
2280
+ revealRangeNearTopIfOutsideViewport(range: IRange, scrollType?: ScrollType): void;
2281
+ /**
2282
+ * Directly trigger a handler or an editor action.
2283
+ * @param source The source of the call.
2284
+ * @param handlerId The id of the handler or the id of a contribution.
2285
+ * @param payload Extra data to be sent to the handler.
2286
+ */
2287
+ trigger(source: string | null | undefined, handlerId: string, payload: any): void;
2288
+ /**
2289
+ * Gets the current model attached to this editor.
2290
+ */
2291
+ getModel(): IEditorModel | null;
2292
+ /**
2293
+ * Sets the current model attached to this editor.
2294
+ * If the previous model was created by the editor via the value key in the options
2295
+ * literal object, it will be destroyed. Otherwise, if the previous model was set
2296
+ * via setModel, or the model key in the options literal object, the previous model
2297
+ * will not be destroyed.
2298
+ * It is safe to call setModel(null) to simply detach the current model from the editor.
2299
+ */
2300
+ setModel(model: IEditorModel | null): void;
2301
+ /**
2302
+ * Change the decorations. All decorations added through this changeAccessor
2303
+ * will get the ownerId of the editor (meaning they will not show up in other
2304
+ * editors).
2305
+ * @see {@link ITextModel.changeDecorations}
2306
+ * @internal
2307
+ */
2308
+ changeDecorations(callback: (changeAccessor: IModelDecorationsChangeAccessor) => any): any;
2309
+ }
2310
+
2311
+ interface IDiffComputationResult {
2312
+ quitEarly: boolean;
2313
+ identical: boolean;
2314
+ changes: ILineChange[];
2315
+ }
2316
+ /**
2317
+ * A change
2318
+ */
2319
+ interface IChange {
2320
+ readonly originalStartLineNumber: number;
2321
+ readonly originalEndLineNumber: number;
2322
+ readonly modifiedStartLineNumber: number;
2323
+ readonly modifiedEndLineNumber: number;
2324
+ }
2325
+ /**
2326
+ * A character level change.
2327
+ */
2328
+ interface ICharChange extends IChange {
2329
+ readonly originalStartColumn: number;
2330
+ readonly originalEndColumn: number;
2331
+ readonly modifiedStartColumn: number;
2332
+ readonly modifiedEndColumn: number;
2333
+ }
2334
+ /**
2335
+ * A line change
2336
+ */
2337
+ interface ILineChange extends IChange {
2338
+ readonly charChanges: ICharChange[] | undefined;
2339
+ }
2340
+
2341
+ interface IDiffEditorConstructionOptions extends IDiffEditorOptions {
2342
+ /**
2343
+ * The initial editor dimension (to avoid measuring the container).
2344
+ */
2345
+ dimension?: IDimension;
2346
+ /**
2347
+ * Place overflow widgets inside an external DOM node.
2348
+ * Defaults to an internal DOM node.
2349
+ */
2350
+ overflowWidgetsDomNode?: HTMLElement;
2351
+ /**
2352
+ * Aria label for original editor.
2353
+ */
2354
+ originalAriaLabel?: string;
2355
+ /**
2356
+ * Aria label for modified editor.
2357
+ */
2358
+ modifiedAriaLabel?: string;
2359
+ /**
2360
+ * Is the diff editor inside another editor
2361
+ * Defaults to false
2362
+ */
2363
+ isInEmbeddedEditor?: boolean;
2364
+ }
2365
+ /**
2366
+ * A rich code editor.
2367
+ */
2368
+ type ICodeEditor = monaco.editor.ICodeEditor
2369
+ /**
2370
+ * Information about a line in the diff editor
2371
+ */
2372
+ interface IDiffLineInformation {
2373
+ readonly equivalentLineNumber: number;
2374
+ }
2375
+ /**
2376
+ * A rich diff editor.
2377
+ */
2378
+ interface IDiffEditor extends IEditor {
2379
+ /**
2380
+ * Returns whether the diff editor is ignoring trim whitespace or not.
2381
+ * @internal
2382
+ */
2383
+ readonly ignoreTrimWhitespace: boolean;
2384
+ /**
2385
+ * Returns whether the diff editor is rendering side by side or inline.
2386
+ * @internal
2387
+ */
2388
+ readonly renderSideBySide: boolean;
2389
+ /**
2390
+ * Timeout in milliseconds after which diff computation is cancelled.
2391
+ * @internal
2392
+ */
2393
+ readonly maxComputationTime: number;
2394
+ /**
2395
+ * @see {@link ICodeEditor.getContainerDomNode}
2396
+ */
2397
+ getContainerDomNode(): HTMLElement;
2398
+ /**
2399
+ * An event emitted when the diff information computed by this diff editor has been updated.
2400
+ * @event
2401
+ */
2402
+ readonly onDidUpdateDiff: Event<void>;
2403
+ /**
2404
+ * Saves current view state of the editor in a serializable object.
2405
+ */
2406
+ saveViewState(): IDiffEditorViewState | null;
2407
+ /**
2408
+ * Restores the view state of the editor from a serializable object generated by `saveViewState`.
2409
+ */
2410
+ restoreViewState(state: IDiffEditorViewState): void;
2411
+ /**
2412
+ * Type the getModel() of IEditor.
2413
+ */
2414
+ getModel(): IDiffEditorModel | null;
2415
+ /**
2416
+ * Sets the current model attached to this editor.
2417
+ * If the previous model was created by the editor via the value key in the options
2418
+ * literal object, it will be destroyed. Otherwise, if the previous model was set
2419
+ * via setModel, or the model key in the options literal object, the previous model
2420
+ * will not be destroyed.
2421
+ * It is safe to call setModel(null) to simply detach the current model from the editor.
2422
+ */
2423
+ setModel(model: IDiffEditorModel | null): void;
2424
+ /**
2425
+ * Get the `original` editor.
2426
+ */
2427
+ getOriginalEditor(): ICodeEditor;
2428
+ /**
2429
+ * Get the `modified` editor.
2430
+ */
2431
+ getModifiedEditor(): ICodeEditor;
2432
+ /**
2433
+ * Get the computed diff information.
2434
+ */
2435
+ getLineChanges(): ILineChange[] | null;
2436
+ /**
2437
+ * Get the computed diff information.
2438
+ * @internal
2439
+ */
2440
+ getDiffComputationResult(): IDiffComputationResult | null;
2441
+ /**
2442
+ * Get information based on computed diff about a line number from the original model.
2443
+ * If the diff computation is not finished or the model is missing, will return null.
2444
+ */
2445
+ getDiffLineInformationForOriginal(lineNumber: number): IDiffLineInformation | null;
2446
+ /**
2447
+ * Get information based on computed diff about a line number from the modified model.
2448
+ * If the diff computation is not finished or the model is missing, will return null.
2449
+ */
2450
+ getDiffLineInformationForModified(lineNumber: number): IDiffLineInformation | null;
2451
+ /**
2452
+ * Update the editor's options after the editor has been created.
2453
+ */
2454
+ updateOptions(newOptions: IDiffEditorOptions): void;
2455
+ }
2456
+
2457
+ interface IEditorConstructionOptions extends IEditorOptions {
2458
+ /**
2459
+ * The initial editor dimension (to avoid measuring the container).
2460
+ */
2461
+ dimension?: IDimension;
2462
+ /**
2463
+ * Place overflow widgets inside an external DOM node.
2464
+ * Defaults to an internal DOM node.
2465
+ */
2466
+ overflowWidgetsDomNode?: HTMLElement;
2467
+ }
2468
+
2469
+ interface ICommandHandler {
2470
+ (accessor: ServicesAccessor, ...args: any[]): void;
2471
+ }
2472
+
2473
+ /**
2474
+ * Description of an action contribution
2475
+ */
2476
+ interface IActionDescriptor {
2477
+ /**
2478
+ * An unique identifier of the contributed action.
2479
+ */
2480
+ id: string;
2481
+ /**
2482
+ * A label of the action that will be presented to the user.
2483
+ */
2484
+ label: string;
2485
+ /**
2486
+ * Precondition rule.
2487
+ */
2488
+ precondition?: string;
2489
+ /**
2490
+ * An array of keybindings for the action.
2491
+ */
2492
+ keybindings?: number[];
2493
+ /**
2494
+ * The keybinding rule (condition on top of precondition).
2495
+ */
2496
+ keybindingContext?: string;
2497
+ /**
2498
+ * Control if the action should show up in the context menu and where.
2499
+ * The context menu of the editor has these default:
2500
+ * navigation - The navigation group comes first in all cases.
2501
+ * 1_modification - This group comes next and contains commands that modify your code.
2502
+ * 9_cutcopypaste - The last default group with the basic editing commands.
2503
+ * You can also create your own group.
2504
+ * Defaults to null (don't show in context menu).
2505
+ */
2506
+ contextMenuGroupId?: string;
2507
+ /**
2508
+ * Control the order in the context menu group.
2509
+ */
2510
+ contextMenuOrder?: number;
2511
+ /**
2512
+ * Method that will be executed when the action is triggered.
2513
+ * @param editor The editor instance is passed in as a convenience
2514
+ */
2515
+ run(editor: ICodeEditor, ...args: any[]): void | Promise<void>;
2516
+ }
2517
+ /**
2518
+ * Options which apply for all editors.
2519
+ */
2520
+ interface IGlobalEditorOptions {
2521
+ /**
2522
+ * The number of spaces a tab is equal to.
2523
+ * This setting is overridden based on the file contents when `detectIndentation` is on.
2524
+ * Defaults to 4.
2525
+ */
2526
+ tabSize?: number;
2527
+ /**
2528
+ * Insert spaces when pressing `Tab`.
2529
+ * This setting is overridden based on the file contents when `detectIndentation` is on.
2530
+ * Defaults to true.
2531
+ */
2532
+ insertSpaces?: boolean;
2533
+ /**
2534
+ * Controls whether `tabSize` and `insertSpaces` will be automatically detected when a file is opened based on the file contents.
2535
+ * Defaults to true.
2536
+ */
2537
+ detectIndentation?: boolean;
2538
+ /**
2539
+ * Remove trailing auto inserted whitespace.
2540
+ * Defaults to true.
2541
+ */
2542
+ trimAutoWhitespace?: boolean;
2543
+ /**
2544
+ * Special handling for large files to disable certain memory intensive features.
2545
+ * Defaults to true.
2546
+ */
2547
+ largeFileOptimizations?: boolean;
2548
+ /**
2549
+ * Controls whether completions should be computed based on words in the document.
2550
+ * Defaults to true.
2551
+ */
2552
+ wordBasedSuggestions?: boolean;
2553
+ /**
2554
+ * Controls whether word based completions should be included from opened documents of the same language or any language.
2555
+ */
2556
+ wordBasedSuggestionsOnlySameLanguage?: boolean;
2557
+ /**
2558
+ * Controls whether the semanticHighlighting is shown for the languages that support it.
2559
+ * true: semanticHighlighting is enabled for all themes
2560
+ * false: semanticHighlighting is disabled for all themes
2561
+ * 'configuredByTheme': semanticHighlighting is controlled by the current color theme's semanticHighlighting setting.
2562
+ * Defaults to 'byTheme'.
2563
+ */
2564
+ 'semanticHighlighting.enabled'?: true | false | 'configuredByTheme';
2565
+ /**
2566
+ * Keep peek editors open even when double clicking their content or when hitting `Escape`.
2567
+ * Defaults to false.
2568
+ */
2569
+ stablePeek?: boolean;
2570
+ /**
2571
+ * Lines above this length will not be tokenized for performance reasons.
2572
+ * Defaults to 20000.
2573
+ */
2574
+ maxTokenizationLineLength?: number;
2575
+ /**
2576
+ * Theme to be used for rendering.
2577
+ * The current out-of-the-box available themes are: 'vs' (default), 'vs-dark', 'hc-black'.
2578
+ * You can create custom themes via `monaco.editor.defineTheme`.
2579
+ * To switch a theme, use `monaco.editor.setTheme`.
2580
+ * **NOTE**: The theme might be overwritten if the OS is in high contrast mode, unless `autoDetectHighContrast` is set to false.
2581
+ */
2582
+ theme?: string;
2583
+ /**
2584
+ * If enabled, will automatically change to high contrast theme if the OS is using a high contrast theme.
2585
+ * Defaults to true.
2586
+ */
2587
+ autoDetectHighContrast?: boolean;
2588
+ }
2589
+ /**
2590
+ * The options to create an editor.
2591
+ */
2592
+ interface IStandaloneEditorConstructionOptions extends IEditorConstructionOptions, IGlobalEditorOptions {
2593
+ /**
2594
+ * The initial model associated with this code editor.
2595
+ */
2596
+ model?: ITextModel | null;
2597
+ /**
2598
+ * The initial value of the auto created model in the editor.
2599
+ * To not automatically create a model, use `model: null`.
2600
+ */
2601
+ value?: string;
2602
+ /**
2603
+ * The initial language of the auto created model in the editor.
2604
+ * To not automatically create a model, use `model: null`.
2605
+ */
2606
+ language?: string;
2607
+ /**
2608
+ * Initial theme to be used for rendering.
2609
+ * The current out-of-the-box available themes are: 'vs' (default), 'vs-dark', 'hc-black'.
2610
+ * You can create custom themes via `monaco.editor.defineTheme`.
2611
+ * To switch a theme, use `monaco.editor.setTheme`.
2612
+ * **NOTE**: The theme might be overwritten if the OS is in high contrast mode, unless `autoDetectHighContrast` is set to false.
2613
+ */
2614
+ theme?: string;
2615
+ /**
2616
+ * If enabled, will automatically change to high contrast theme if the OS is using a high contrast theme.
2617
+ * Defaults to true.
2618
+ */
2619
+ autoDetectHighContrast?: boolean;
2620
+ /**
2621
+ * An URL to open when Ctrl+H (Windows and Linux) or Cmd+H (OSX) is pressed in
2622
+ * the accessibility help dialog in the editor.
2623
+ *
2624
+ * Defaults to "https://go.microsoft.com/fwlink/?linkid=852450"
2625
+ */
2626
+ accessibilityHelpUrl?: string;
2627
+ /**
2628
+ * Container element to use for ARIA messages.
2629
+ * Defaults to document.body.
2630
+ */
2631
+ ariaContainerElement?: HTMLElement;
2632
+ }
2633
+ /**
2634
+ * The options to create a diff editor.
2635
+ */
2636
+ interface IStandaloneDiffEditorConstructionOptions extends IDiffEditorConstructionOptions {
2637
+ /**
2638
+ * Initial theme to be used for rendering.
2639
+ * The current out-of-the-box available themes are: 'vs' (default), 'vs-dark', 'hc-black'.
2640
+ * You can create custom themes via `monaco.editor.defineTheme`.
2641
+ * To switch a theme, use `monaco.editor.setTheme`.
2642
+ * **NOTE**: The theme might be overwritten if the OS is in high contrast mode, unless `autoDetectHighContrast` is set to false.
2643
+ */
2644
+ theme?: string;
2645
+ /**
2646
+ * If enabled, will automatically change to high contrast theme if the OS is using a high contrast theme.
2647
+ * Defaults to true.
2648
+ */
2649
+ autoDetectHighContrast?: boolean;
2650
+ }
2651
+ interface IStandaloneCodeEditor extends ICodeEditor {
2652
+ updateOptions(newOptions: IEditorOptions & IGlobalEditorOptions): void;
2653
+ addCommand(keybinding: number, handler: ICommandHandler, context?: string): string | null;
2654
+ createContextKey<T>(key: string, defaultValue: T): IContextKey<T>;
2655
+ addAction(descriptor: IActionDescriptor): IDisposable;
2656
+ }
2657
+ interface IStandaloneDiffEditor extends IDiffEditor {
2658
+ addCommand(keybinding: number, handler: ICommandHandler, context?: string): string | null;
2659
+ createContextKey<T>(key: string, defaultValue: T): IContextKey<T>;
2660
+ addAction(descriptor: IActionDescriptor): IDisposable;
2661
+ getOriginalEditor(): IStandaloneCodeEditor;
2662
+ getModifiedEditor(): IStandaloneCodeEditor;
2663
+ }
2664
+
2665
+ type IEditorOverrideServices = monaco.editor.IEditorOverrideServices
2666
+
2667
+ /**
2668
+ * Create a new editor under `domElement`.
2669
+ * `domElement` should be empty (not contain other dom nodes).
2670
+ * The editor will read the size of `domElement`.
2671
+ */
2672
+ declare function create(domElement: HTMLElement, options?: IStandaloneEditorConstructionOptions, override?: IEditorOverrideServices): IStandaloneCodeEditor;
2673
+ /**
2674
+ * Create a new diff editor under `domElement`.
2675
+ * `domElement` should be empty (not contain other dom nodes).
2676
+ * The editor will read the size of `domElement`.
2677
+ */
2678
+ declare function createDiffEditor(domElement: HTMLElement, options?: IStandaloneDiffEditorConstructionOptions, override?: IEditorOverrideServices): IStandaloneDiffEditor;
2679
+
2680
+ declare const createConfiguredEditor: typeof create;
2681
+ declare const createConfiguredDiffEditor: typeof createDiffEditor;
2682
+
2683
+ export { createConfiguredDiffEditor, createConfiguredEditor };