/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/45// eslint-disable-next-line no-var6declare var MonacoEnvironment: monaco.Environment | undefined;78declare namespace monaco {910export type Thenable<T> = PromiseLike<T>;1112export interface Environment {13/**14* Define a global `monaco` symbol.15* This is true by default in AMD and false by default in ESM.16*/17globalAPI?: boolean;18/**19* The base url where the editor sources are found (which contains the vs folder)20*/21baseUrl?: string;22/**23* A web worker factory.24* NOTE: If `getWorker` is defined, `getWorkerUrl` is not invoked.25*/26getWorker?(workerId: string, label: string): Promise<Worker> | Worker;27/**28* Return the location for web worker scripts.29* NOTE: If `getWorker` is defined, `getWorkerUrl` is not invoked.30*/31getWorkerUrl?(workerId: string, label: string): string;32/**33* Create a trusted types policy (same API as window.trustedTypes.createPolicy)34*/35createTrustedTypesPolicy?(36policyName: string,37policyOptions?: ITrustedTypePolicyOptions,38): undefined | ITrustedTypePolicy;39}4041export interface ITrustedTypePolicyOptions {42createHTML?: (input: string, ...arguments: any[]) => string;43createScript?: (input: string, ...arguments: any[]) => string;44createScriptURL?: (input: string, ...arguments: any[]) => string;45}4647export interface ITrustedTypePolicy {48readonly name: string;49createHTML?(input: string): any;50createScript?(input: string): any;51createScriptURL?(input: string): any;52}5354export interface IDisposable {55dispose(): void;56}5758export interface IEvent<T> {59(listener: (e: T) => any, thisArg?: any): IDisposable;60}6162/**63* A helper that allows to emit and listen to typed events64*/65export class Emitter<T> {66constructor();67readonly event: IEvent<T>;68fire(event: T): void;69dispose(): void;70}717273export enum MarkerTag {74Unnecessary = 1,75Deprecated = 276}7778export enum MarkerSeverity {79Hint = 1,80Info = 2,81Warning = 4,82Error = 883}8485export class CancellationTokenSource {86constructor(parent?: CancellationToken);87get token(): CancellationToken;88cancel(): void;89dispose(cancel?: boolean): void;90}9192export interface CancellationToken {93/**94* A flag signalling is cancellation has been requested.95*/96readonly isCancellationRequested: boolean;97/**98* An event which fires when cancellation is requested. This event99* only ever fires `once` as cancellation can only happen once. Listeners100* that are registered after cancellation will be called (next event loop run),101* but also only once.102*103* @event104*/105readonly onCancellationRequested: (listener: (e: void) => unknown, thisArgs?: unknown, disposables?: IDisposable[]) => IDisposable;106}107/**108* Uniform Resource Identifier (Uri) http://tools.ietf.org/html/rfc3986.109* This class is a simple parser which creates the basic component parts110* (http://tools.ietf.org/html/rfc3986#section-3) with minimal validation111* and encoding.112*113* ```txt114* foo://example.com:8042/over/there?name=ferret#nose115* \_/ \______________/\_________/ \_________/ \__/116* | | | | |117* scheme authority path query fragment118* | _____________________|__119* / \ / \120* urn:example:animal:ferret:nose121* ```122*/123export class Uri implements UriComponents {124static isUri(thing: unknown): thing is Uri;125/**126* scheme is the 'http' part of 'http://www.example.com/some/path?query#fragment'.127* The part before the first colon.128*/129readonly scheme: string;130/**131* authority is the 'www.example.com' part of 'http://www.example.com/some/path?query#fragment'.132* The part between the first double slashes and the next slash.133*/134readonly authority: string;135/**136* path is the '/some/path' part of 'http://www.example.com/some/path?query#fragment'.137*/138readonly path: string;139/**140* query is the 'query' part of 'http://www.example.com/some/path?query#fragment'.141*/142readonly query: string;143/**144* fragment is the 'fragment' part of 'http://www.example.com/some/path?query#fragment'.145*/146readonly fragment: string;147/**148* Returns a string representing the corresponding file system path of this Uri.149* Will handle UNC paths, normalizes windows drive letters to lower-case, and uses the150* platform specific path separator.151*152* * Will *not* validate the path for invalid characters and semantics.153* * Will *not* look at the scheme of this Uri.154* * The result shall *not* be used for display purposes but for accessing a file on disk.155*156*157* The *difference* to `Uri#path` is the use of the platform specific separator and the handling158* of UNC paths. See the below sample of a file-uri with an authority (UNC path).159*160* ```ts161const u = Uri.parse('file://server/c$/folder/file.txt')162u.authority === 'server'163u.path === '/shares/c$/file.txt'164u.fsPath === '\\server\c$\folder\file.txt'165```166*167* Using `Uri#path` to read a file (using fs-apis) would not be enough because parts of the path,168* namely the server name, would be missing. Therefore `Uri#fsPath` exists - it's sugar to ease working169* with URIs that represent files on disk (`file` scheme).170*/171get fsPath(): string;172with(change: {173scheme?: string;174authority?: string | null;175path?: string | null;176query?: string | null;177fragment?: string | null;178}): Uri;179/**180* Creates a new Uri from a string, e.g. `http://www.example.com/some/path`,181* `file:///usr/home`, or `scheme:with/path`.182*183* @param value A string which represents an Uri (see `Uri#toString`).184*/185static parse(value: string, _strict?: boolean): Uri;186/**187* Creates a new Uri from a file system path, e.g. `c:\my\files`,188* `/usr/home`, or `\\server\share\some\path`.189*190* The *difference* between `Uri#parse` and `Uri#file` is that the latter treats the argument191* as path, not as stringified-uri. E.g. `Uri.file(path)` is **not the same as**192* `Uri.parse('file://' + path)` because the path might contain characters that are193* interpreted (# and ?). See the following sample:194* ```ts195const good = Uri.file('/coding/c#/project1');196good.scheme === 'file';197good.path === '/coding/c#/project1';198good.fragment === '';199const bad = Uri.parse('file://' + '/coding/c#/project1');200bad.scheme === 'file';201bad.path === '/coding/c'; // path is now broken202bad.fragment === '/project1';203```204*205* @param path A file system path (see `Uri#fsPath`)206*/207static file(path: string): Uri;208/**209* Creates new Uri from uri components.210*211* Unless `strict` is `true` the scheme is defaults to be `file`. This function performs212* validation and should be used for untrusted uri components retrieved from storage,213* user input, command arguments etc214*/215static from(components: UriComponents, strict?: boolean): Uri;216/**217* Join a Uri path with path fragments and normalizes the resulting path.218*219* @param uri The input Uri.220* @param pathFragment The path fragment to add to the Uri path.221* @returns The resulting Uri.222*/223static joinPath(uri: Uri, ...pathFragment: string[]): Uri;224/**225* Creates a string representation for this Uri. It's guaranteed that calling226* `Uri.parse` with the result of this function creates an Uri which is equal227* to this Uri.228*229* * The result shall *not* be used for display purposes but for externalization or transport.230* * The result will be encoded using the percentage encoding and encoding happens mostly231* ignore the scheme-specific encoding rules.232*233* @param skipEncoding Do not encode the result, default is `false`234*/235toString(skipEncoding?: boolean): string;236toJSON(): UriComponents;237/**238* A helper function to revive URIs.239*240* **Note** that this function should only be used when receiving Uri#toJSON generated data241* and that it doesn't do any validation. Use {@link Uri.from} when received "untrusted"242* uri components such as command arguments or data from storage.243*244* @param data The Uri components or Uri to revive.245* @returns The revived Uri or undefined or null.246*/247static revive(data: UriComponents | Uri): Uri;248static revive(data: UriComponents | Uri | undefined): Uri | undefined;249static revive(data: UriComponents | Uri | null): Uri | null;250static revive(data: UriComponents | Uri | undefined | null): Uri | undefined | null;251}252253export interface UriComponents {254scheme: string;255authority?: string;256path?: string;257query?: string;258fragment?: string;259}260/**261* Virtual Key Codes, the value does not hold any inherent meaning.262* Inspired somewhat from https://msdn.microsoft.com/en-us/library/windows/desktop/dd375731(v=vs.85).aspx263* But these are "more general", as they should work across browsers & OS`s.264*/265export enum KeyCode {266DependsOnKbLayout = -1,267/**268* Placed first to cover the 0 value of the enum.269*/270Unknown = 0,271Backspace = 1,272Tab = 2,273Enter = 3,274Shift = 4,275Ctrl = 5,276Alt = 6,277PauseBreak = 7,278CapsLock = 8,279Escape = 9,280Space = 10,281PageUp = 11,282PageDown = 12,283End = 13,284Home = 14,285LeftArrow = 15,286UpArrow = 16,287RightArrow = 17,288DownArrow = 18,289Insert = 19,290Delete = 20,291Digit0 = 21,292Digit1 = 22,293Digit2 = 23,294Digit3 = 24,295Digit4 = 25,296Digit5 = 26,297Digit6 = 27,298Digit7 = 28,299Digit8 = 29,300Digit9 = 30,301KeyA = 31,302KeyB = 32,303KeyC = 33,304KeyD = 34,305KeyE = 35,306KeyF = 36,307KeyG = 37,308KeyH = 38,309KeyI = 39,310KeyJ = 40,311KeyK = 41,312KeyL = 42,313KeyM = 43,314KeyN = 44,315KeyO = 45,316KeyP = 46,317KeyQ = 47,318KeyR = 48,319KeyS = 49,320KeyT = 50,321KeyU = 51,322KeyV = 52,323KeyW = 53,324KeyX = 54,325KeyY = 55,326KeyZ = 56,327Meta = 57,328ContextMenu = 58,329F1 = 59,330F2 = 60,331F3 = 61,332F4 = 62,333F5 = 63,334F6 = 64,335F7 = 65,336F8 = 66,337F9 = 67,338F10 = 68,339F11 = 69,340F12 = 70,341F13 = 71,342F14 = 72,343F15 = 73,344F16 = 74,345F17 = 75,346F18 = 76,347F19 = 77,348F20 = 78,349F21 = 79,350F22 = 80,351F23 = 81,352F24 = 82,353NumLock = 83,354ScrollLock = 84,355/**356* Used for miscellaneous characters; it can vary by keyboard.357* For the US standard keyboard, the ';:' key358*/359Semicolon = 85,360/**361* For any country/region, the '+' key362* For the US standard keyboard, the '=+' key363*/364Equal = 86,365/**366* For any country/region, the ',' key367* For the US standard keyboard, the ',<' key368*/369Comma = 87,370/**371* For any country/region, the '-' key372* For the US standard keyboard, the '-_' key373*/374Minus = 88,375/**376* For any country/region, the '.' key377* For the US standard keyboard, the '.>' key378*/379Period = 89,380/**381* Used for miscellaneous characters; it can vary by keyboard.382* For the US standard keyboard, the '/?' key383*/384Slash = 90,385/**386* Used for miscellaneous characters; it can vary by keyboard.387* For the US standard keyboard, the '`~' key388*/389Backquote = 91,390/**391* Used for miscellaneous characters; it can vary by keyboard.392* For the US standard keyboard, the '[{' key393*/394BracketLeft = 92,395/**396* Used for miscellaneous characters; it can vary by keyboard.397* For the US standard keyboard, the '\|' key398*/399Backslash = 93,400/**401* Used for miscellaneous characters; it can vary by keyboard.402* For the US standard keyboard, the ']}' key403*/404BracketRight = 94,405/**406* Used for miscellaneous characters; it can vary by keyboard.407* For the US standard keyboard, the ''"' key408*/409Quote = 95,410/**411* Used for miscellaneous characters; it can vary by keyboard.412*/413OEM_8 = 96,414/**415* Either the angle bracket key or the backslash key on the RT 102-key keyboard.416*/417IntlBackslash = 97,418Numpad0 = 98,// VK_NUMPAD0, 0x60, Numeric keypad 0 key419Numpad1 = 99,// VK_NUMPAD1, 0x61, Numeric keypad 1 key420Numpad2 = 100,// VK_NUMPAD2, 0x62, Numeric keypad 2 key421Numpad3 = 101,// VK_NUMPAD3, 0x63, Numeric keypad 3 key422Numpad4 = 102,// VK_NUMPAD4, 0x64, Numeric keypad 4 key423Numpad5 = 103,// VK_NUMPAD5, 0x65, Numeric keypad 5 key424Numpad6 = 104,// VK_NUMPAD6, 0x66, Numeric keypad 6 key425Numpad7 = 105,// VK_NUMPAD7, 0x67, Numeric keypad 7 key426Numpad8 = 106,// VK_NUMPAD8, 0x68, Numeric keypad 8 key427Numpad9 = 107,// VK_NUMPAD9, 0x69, Numeric keypad 9 key428NumpadMultiply = 108,// VK_MULTIPLY, 0x6A, Multiply key429NumpadAdd = 109,// VK_ADD, 0x6B, Add key430NUMPAD_SEPARATOR = 110,// VK_SEPARATOR, 0x6C, Separator key431NumpadSubtract = 111,// VK_SUBTRACT, 0x6D, Subtract key432NumpadDecimal = 112,// VK_DECIMAL, 0x6E, Decimal key433NumpadDivide = 113,// VK_DIVIDE, 0x6F,434/**435* Cover all key codes when IME is processing input.436*/437KEY_IN_COMPOSITION = 114,438ABNT_C1 = 115,// Brazilian (ABNT) Keyboard439ABNT_C2 = 116,// Brazilian (ABNT) Keyboard440AudioVolumeMute = 117,441AudioVolumeUp = 118,442AudioVolumeDown = 119,443BrowserSearch = 120,444BrowserHome = 121,445BrowserBack = 122,446BrowserForward = 123,447MediaTrackNext = 124,448MediaTrackPrevious = 125,449MediaStop = 126,450MediaPlayPause = 127,451LaunchMediaPlayer = 128,452LaunchMail = 129,453LaunchApp2 = 130,454/**455* VK_CLEAR, 0x0C, CLEAR key456*/457Clear = 131,458/**459* Placed last to cover the length of the enum.460* Please do not depend on this value!461*/462MAX_VALUE = 132463}464export class KeyMod {465static readonly CtrlCmd: number;466static readonly Shift: number;467static readonly Alt: number;468static readonly WinCtrl: number;469static chord(firstPart: number, secondPart: number): number;470}471472export interface IMarkdownString {473readonly value: string;474readonly isTrusted?: boolean | MarkdownStringTrustedOptions;475readonly supportThemeIcons?: boolean;476readonly supportHtml?: boolean;477readonly baseUri?: UriComponents;478uris?: {479[href: string]: UriComponents;480};481}482483export interface MarkdownStringTrustedOptions {484readonly enabledCommands: readonly string[];485}486487export interface IKeyboardEvent {488readonly _standardKeyboardEventBrand: true;489readonly browserEvent: KeyboardEvent;490readonly target: HTMLElement;491readonly ctrlKey: boolean;492readonly shiftKey: boolean;493readonly altKey: boolean;494readonly metaKey: boolean;495readonly altGraphKey: boolean;496readonly keyCode: KeyCode;497readonly code: string;498equals(keybinding: number): boolean;499preventDefault(): void;500stopPropagation(): void;501}502export interface IMouseEvent {503readonly browserEvent: MouseEvent;504readonly leftButton: boolean;505readonly middleButton: boolean;506readonly rightButton: boolean;507readonly buttons: number;508readonly target: HTMLElement;509readonly detail: number;510readonly posx: number;511readonly posy: number;512readonly ctrlKey: boolean;513readonly shiftKey: boolean;514readonly altKey: boolean;515readonly metaKey: boolean;516readonly timestamp: number;517readonly defaultPrevented: boolean;518preventDefault(): void;519stopPropagation(): void;520}521522export interface IScrollEvent {523readonly scrollTop: number;524readonly scrollLeft: number;525readonly scrollWidth: number;526readonly scrollHeight: number;527readonly scrollTopChanged: boolean;528readonly scrollLeftChanged: boolean;529readonly scrollWidthChanged: boolean;530readonly scrollHeightChanged: boolean;531}532/**533* A position in the editor. This interface is suitable for serialization.534*/535export interface IPosition {536/**537* line number (starts at 1)538*/539readonly lineNumber: number;540/**541* column (the first character in a line is between column 1 and column 2)542*/543readonly column: number;544}545546/**547* A position in the editor.548*/549export class Position {550/**551* line number (starts at 1)552*/553readonly lineNumber: number;554/**555* column (the first character in a line is between column 1 and column 2)556*/557readonly column: number;558constructor(lineNumber: number, column: number);559/**560* Create a new position from this position.561*562* @param newLineNumber new line number563* @param newColumn new column564*/565with(newLineNumber?: number, newColumn?: number): Position;566/**567* Derive a new position from this position.568*569* @param deltaLineNumber line number delta570* @param deltaColumn column delta571*/572delta(deltaLineNumber?: number, deltaColumn?: number): Position;573/**574* Test if this position equals other position575*/576equals(other: IPosition): boolean;577/**578* Test if position `a` equals position `b`579*/580static equals(a: IPosition | null, b: IPosition | null): boolean;581/**582* Test if this position is before other position.583* If the two positions are equal, the result will be false.584*/585isBefore(other: IPosition): boolean;586/**587* Test if position `a` is before position `b`.588* If the two positions are equal, the result will be false.589*/590static isBefore(a: IPosition, b: IPosition): boolean;591/**592* Test if this position is before other position.593* If the two positions are equal, the result will be true.594*/595isBeforeOrEqual(other: IPosition): boolean;596/**597* Test if position `a` is before position `b`.598* If the two positions are equal, the result will be true.599*/600static isBeforeOrEqual(a: IPosition, b: IPosition): boolean;601/**602* A function that compares positions, useful for sorting603*/604static compare(a: IPosition, b: IPosition): number;605/**606* Clone this position.607*/608clone(): Position;609/**610* Convert to a human-readable representation.611*/612toString(): string;613/**614* Create a `Position` from an `IPosition`.615*/616static lift(pos: IPosition): Position;617/**618* Test if `obj` is an `IPosition`.619*/620static isIPosition(obj: unknown): obj is IPosition;621toJSON(): IPosition;622}623624/**625* A range in the editor. This interface is suitable for serialization.626*/627export interface IRange {628/**629* Line number on which the range starts (starts at 1).630*/631readonly startLineNumber: number;632/**633* Column on which the range starts in line `startLineNumber` (starts at 1).634*/635readonly startColumn: number;636/**637* Line number on which the range ends.638*/639readonly endLineNumber: number;640/**641* Column on which the range ends in line `endLineNumber`.642*/643readonly endColumn: number;644}645646/**647* A range in the editor. (startLineNumber,startColumn) is <= (endLineNumber,endColumn)648*/649export class Range {650/**651* Line number on which the range starts (starts at 1).652*/653readonly startLineNumber: number;654/**655* Column on which the range starts in line `startLineNumber` (starts at 1).656*/657readonly startColumn: number;658/**659* Line number on which the range ends.660*/661readonly endLineNumber: number;662/**663* Column on which the range ends in line `endLineNumber`.664*/665readonly endColumn: number;666constructor(startLineNumber: number, startColumn: number, endLineNumber: number, endColumn: number);667/**668* Test if this range is empty.669*/670isEmpty(): boolean;671/**672* Test if `range` is empty.673*/674static isEmpty(range: IRange): boolean;675/**676* Test if position is in this range. If the position is at the edges, will return true.677*/678containsPosition(position: IPosition): boolean;679/**680* Test if `position` is in `range`. If the position is at the edges, will return true.681*/682static containsPosition(range: IRange, position: IPosition): boolean;683/**684* Test if range is in this range. If the range is equal to this range, will return true.685*/686containsRange(range: IRange): boolean;687/**688* Test if `otherRange` is in `range`. If the ranges are equal, will return true.689*/690static containsRange(range: IRange, otherRange: IRange): boolean;691/**692* Test if `range` is strictly in this range. `range` must start after and end before this range for the result to be true.693*/694strictContainsRange(range: IRange): boolean;695/**696* Test if `otherRange` is strictly in `range` (must start after, and end before). If the ranges are equal, will return false.697*/698static strictContainsRange(range: IRange, otherRange: IRange): boolean;699/**700* A reunion of the two ranges.701* The smallest position will be used as the start point, and the largest one as the end point.702*/703plusRange(range: IRange): Range;704/**705* A reunion of the two ranges.706* The smallest position will be used as the start point, and the largest one as the end point.707*/708static plusRange(a: IRange, b: IRange): Range;709/**710* A intersection of the two ranges.711*/712intersectRanges(range: IRange): Range | null;713/**714* A intersection of the two ranges.715*/716static intersectRanges(a: IRange, b: IRange): Range | null;717/**718* Test if this range equals other.719*/720equalsRange(other: IRange | null | undefined): boolean;721/**722* Test if range `a` equals `b`.723*/724static equalsRange(a: IRange | null | undefined, b: IRange | null | undefined): boolean;725/**726* Return the end position (which will be after or equal to the start position)727*/728getEndPosition(): Position;729/**730* Return the end position (which will be after or equal to the start position)731*/732static getEndPosition(range: IRange): Position;733/**734* Return the start position (which will be before or equal to the end position)735*/736getStartPosition(): Position;737/**738* Return the start position (which will be before or equal to the end position)739*/740static getStartPosition(range: IRange): Position;741/**742* Transform to a user presentable string representation.743*/744toString(): string;745/**746* Create a new range using this range's start position, and using endLineNumber and endColumn as the end position.747*/748setEndPosition(endLineNumber: number, endColumn: number): Range;749/**750* Create a new range using this range's end position, and using startLineNumber and startColumn as the start position.751*/752setStartPosition(startLineNumber: number, startColumn: number): Range;753/**754* Create a new empty range using this range's start position.755*/756collapseToStart(): Range;757/**758* Create a new empty range using this range's start position.759*/760static collapseToStart(range: IRange): Range;761/**762* Create a new empty range using this range's end position.763*/764collapseToEnd(): Range;765/**766* Create a new empty range using this range's end position.767*/768static collapseToEnd(range: IRange): Range;769/**770* Moves the range by the given amount of lines.771*/772delta(lineCount: number): Range;773/**774* Test if this range starts and ends on the same line.775*/776isSingleLine(): boolean;777static fromPositions(start: IPosition, end?: IPosition): Range;778/**779* Create a `Range` from an `IRange`.780*/781static lift(range: undefined | null): null;782static lift(range: IRange): Range;783static lift(range: IRange | undefined | null): Range | null;784/**785* Test if `obj` is an `IRange`.786*/787static isIRange(obj: unknown): obj is IRange;788/**789* Test if the two ranges are touching in any way.790*/791static areIntersectingOrTouching(a: IRange, b: IRange): boolean;792/**793* Test if the two ranges are intersecting. If the ranges are touching it returns true.794*/795static areIntersecting(a: IRange, b: IRange): boolean;796/**797* Test if the two ranges are intersecting, but not touching at all.798*/799static areOnlyIntersecting(a: IRange, b: IRange): boolean;800/**801* A function that compares ranges, useful for sorting ranges802* It will first compare ranges on the startPosition and then on the endPosition803*/804static compareRangesUsingStarts(a: IRange | null | undefined, b: IRange | null | undefined): number;805/**806* A function that compares ranges, useful for sorting ranges807* It will first compare ranges on the endPosition and then on the startPosition808*/809static compareRangesUsingEnds(a: IRange, b: IRange): number;810/**811* Test if the range spans multiple lines.812*/813static spansMultipleLines(range: IRange): boolean;814toJSON(): IRange;815}816817/**818* A selection in the editor.819* The selection is a range that has an orientation.820*/821export interface ISelection {822/**823* The line number on which the selection has started.824*/825readonly selectionStartLineNumber: number;826/**827* The column on `selectionStartLineNumber` where the selection has started.828*/829readonly selectionStartColumn: number;830/**831* The line number on which the selection has ended.832*/833readonly positionLineNumber: number;834/**835* The column on `positionLineNumber` where the selection has ended.836*/837readonly positionColumn: number;838}839840/**841* A selection in the editor.842* The selection is a range that has an orientation.843*/844export class Selection extends Range {845/**846* The line number on which the selection has started.847*/848readonly selectionStartLineNumber: number;849/**850* The column on `selectionStartLineNumber` where the selection has started.851*/852readonly selectionStartColumn: number;853/**854* The line number on which the selection has ended.855*/856readonly positionLineNumber: number;857/**858* The column on `positionLineNumber` where the selection has ended.859*/860readonly positionColumn: number;861constructor(selectionStartLineNumber: number, selectionStartColumn: number, positionLineNumber: number, positionColumn: number);862/**863* Transform to a human-readable representation.864*/865toString(): string;866/**867* Test if equals other selection.868*/869equalsSelection(other: ISelection): boolean;870/**871* Test if the two selections are equal.872*/873static selectionsEqual(a: ISelection, b: ISelection): boolean;874/**875* Get directions (LTR or RTL).876*/877getDirection(): SelectionDirection;878/**879* Create a new selection with a different `positionLineNumber` and `positionColumn`.880*/881setEndPosition(endLineNumber: number, endColumn: number): Selection;882/**883* Get the position at `positionLineNumber` and `positionColumn`.884*/885getPosition(): Position;886/**887* Get the position at the start of the selection.888*/889getSelectionStart(): Position;890/**891* Create a new selection with a different `selectionStartLineNumber` and `selectionStartColumn`.892*/893setStartPosition(startLineNumber: number, startColumn: number): Selection;894/**895* Create a `Selection` from one or two positions896*/897static fromPositions(start: IPosition, end?: IPosition): Selection;898/**899* Creates a `Selection` from a range, given a direction.900*/901static fromRange(range: Range, direction: SelectionDirection): Selection;902/**903* Create a `Selection` from an `ISelection`.904*/905static liftSelection(sel: ISelection): Selection;906/**907* `a` equals `b`.908*/909static selectionsArrEqual(a: ISelection[], b: ISelection[]): boolean;910/**911* Test if `obj` is an `ISelection`.912*/913static isISelection(obj: unknown): obj is ISelection;914/**915* Create with a direction.916*/917static createWithDirection(startLineNumber: number, startColumn: number, endLineNumber: number, endColumn: number, direction: SelectionDirection): Selection;918}919920/**921* The direction of a selection.922*/923export enum SelectionDirection {924/**925* The selection starts above where it ends.926*/927LTR = 0,928/**929* The selection starts below where it ends.930*/931RTL = 1932}933934export class Token {935readonly offset: number;936readonly type: string;937readonly language: string;938_tokenBrand: void;939constructor(offset: number, type: string, language: string);940toString(): string;941}942}943944declare namespace monaco.editor {945946/**947* Create a new editor under `domElement`.948* `domElement` should be empty (not contain other dom nodes).949* The editor will read the size of `domElement`.950*/951export function create(domElement: HTMLElement, options?: IStandaloneEditorConstructionOptions, override?: IEditorOverrideServices): IStandaloneCodeEditor;952953/**954* Emitted when an editor is created.955* Creating a diff editor might cause this listener to be invoked with the two editors.956* @event957*/958export function onDidCreateEditor(listener: (codeEditor: ICodeEditor) => void): IDisposable;959960/**961* Emitted when an diff editor is created.962* @event963*/964export function onDidCreateDiffEditor(listener: (diffEditor: IDiffEditor) => void): IDisposable;965966/**967* Get all the created editors.968*/969export function getEditors(): readonly ICodeEditor[];970971/**972* Get all the created diff editors.973*/974export function getDiffEditors(): readonly IDiffEditor[];975976/**977* Create a new diff editor under `domElement`.978* `domElement` should be empty (not contain other dom nodes).979* The editor will read the size of `domElement`.980*/981export function createDiffEditor(domElement: HTMLElement, options?: IStandaloneDiffEditorConstructionOptions, override?: IEditorOverrideServices): IStandaloneDiffEditor;982983export function createMultiFileDiffEditor(domElement: HTMLElement, override?: IEditorOverrideServices): any;984985/**986* Description of a command contribution987*/988export interface ICommandDescriptor {989/**990* An unique identifier of the contributed command.991*/992id: string;993/**994* Callback that will be executed when the command is triggered.995*/996run: ICommandHandler;997}998999/**1000* Add a command.1001*/1002export function addCommand(descriptor: ICommandDescriptor): IDisposable;10031004/**1005* Add an action to all editors.1006*/1007export function addEditorAction(descriptor: IActionDescriptor): IDisposable;10081009/**1010* A keybinding rule.1011*/1012export interface IKeybindingRule {1013keybinding: number;1014command?: string | null;1015commandArgs?: any;1016when?: string | null;1017}10181019/**1020* Add a keybinding rule.1021*/1022export function addKeybindingRule(rule: IKeybindingRule): IDisposable;10231024/**1025* Add keybinding rules.1026*/1027export function addKeybindingRules(rules: IKeybindingRule[]): IDisposable;10281029/**1030* Create a new editor model.1031* You can specify the language that should be set for this model or let the language be inferred from the `uri`.1032*/1033export function createModel(value: string, language?: string, uri?: Uri): ITextModel;10341035/**1036* Change the language for a model.1037*/1038export function setModelLanguage(model: ITextModel, mimeTypeOrLanguageId: string): void;10391040/**1041* Set the markers for a model.1042*/1043export function setModelMarkers(model: ITextModel, owner: string, markers: IMarkerData[]): void;10441045/**1046* Remove all markers of an owner.1047*/1048export function removeAllMarkers(owner: string): void;10491050/**1051* Get markers for owner and/or resource1052*1053* @returns list of markers1054*/1055export function getModelMarkers(filter: {1056owner?: string;1057resource?: Uri;1058take?: number;1059}): IMarker[];10601061/**1062* Emitted when markers change for a model.1063* @event1064*/1065export function onDidChangeMarkers(listener: (e: readonly Uri[]) => void): IDisposable;10661067/**1068* Get the model that has `uri` if it exists.1069*/1070export function getModel(uri: Uri): ITextModel | null;10711072/**1073* Get all the created models.1074*/1075export function getModels(): ITextModel[];10761077/**1078* Emitted when a model is created.1079* @event1080*/1081export function onDidCreateModel(listener: (model: ITextModel) => void): IDisposable;10821083/**1084* Emitted right before a model is disposed.1085* @event1086*/1087export function onWillDisposeModel(listener: (model: ITextModel) => void): IDisposable;10881089/**1090* Emitted when a different language is set to a model.1091* @event1092*/1093export function onDidChangeModelLanguage(listener: (e: {1094readonly model: ITextModel;1095readonly oldLanguage: string;1096}) => void): IDisposable;10971098/**1099* Create a new web worker that has model syncing capabilities built in.1100* Specify an AMD module to load that will `create` an object that will be proxied.1101*/1102export function createWebWorker<T extends object>(opts: IInternalWebWorkerOptions): MonacoWebWorker<T>;11031104/**1105* Colorize the contents of `domNode` using attribute `data-lang`.1106*/1107export function colorizeElement(domNode: HTMLElement, options: IColorizerElementOptions): Promise<void>;11081109/**1110* Colorize `text` using language `languageId`.1111*/1112export function colorize(text: string, languageId: string, options: IColorizerOptions): Promise<string>;11131114/**1115* Colorize a line in a model.1116*/1117export function colorizeModelLine(model: ITextModel, lineNumber: number, tabSize?: number): string;11181119/**1120* Tokenize `text` using language `languageId`1121*/1122export function tokenize(text: string, languageId: string): Token[][];11231124/**1125* Define a new theme or update an existing theme.1126*/1127export function defineTheme(themeName: string, themeData: IStandaloneThemeData): void;11281129/**1130* Switches to a theme.1131*/1132export function setTheme(themeName: string): void;11331134/**1135* Clears all cached font measurements and triggers re-measurement.1136*/1137export function remeasureFonts(): void;11381139/**1140* Register a command.1141*/1142export function registerCommand(id: string, handler: (accessor: any, ...args: any[]) => void): IDisposable;11431144export interface ILinkOpener {1145open(resource: Uri): boolean | Promise<boolean>;1146}11471148/**1149* Registers a handler that is called when a link is opened in any editor. The handler callback should return `true` if the link was handled and `false` otherwise.1150* The handler that was registered last will be called first when a link is opened.1151*1152* Returns a disposable that can unregister the opener again.1153*/1154export function registerLinkOpener(opener: ILinkOpener): IDisposable;11551156/**1157* Represents an object that can handle editor open operations (e.g. when "go to definition" is called1158* with a resource other than the current model).1159*/1160export interface ICodeEditorOpener {1161/**1162* Callback that is invoked when a resource other than the current model should be opened (e.g. when "go to definition" is called).1163* The callback should return `true` if the request was handled and `false` otherwise.1164* @param source The code editor instance that initiated the request.1165* @param resource The Uri of the resource that should be opened.1166* @param selectionOrPosition An optional position or selection inside the model corresponding to `resource` that can be used to set the cursor.1167*/1168openCodeEditor(source: ICodeEditor, resource: Uri, selectionOrPosition?: IRange | IPosition): boolean | Promise<boolean>;1169}11701171/**1172* Registers a handler that is called when a resource other than the current model should be opened in the editor (e.g. "go to definition").1173* The handler callback should return `true` if the request was handled and `false` otherwise.1174*1175* Returns a disposable that can unregister the opener again.1176*1177* If no handler is registered the default behavior is to do nothing for models other than the currently attached one.1178*/1179export function registerEditorOpener(opener: ICodeEditorOpener): IDisposable;11801181export type BuiltinTheme = 'vs' | 'vs-dark' | 'hc-black' | 'hc-light';11821183export interface IStandaloneThemeData {1184base: BuiltinTheme;1185inherit: boolean;1186rules: ITokenThemeRule[];1187encodedTokensColors?: string[];1188colors: IColors;1189}11901191export type IColors = {1192[colorId: string]: string;1193};11941195export interface ITokenThemeRule {1196token: string;1197foreground?: string;1198background?: string;1199fontStyle?: string;1200}12011202/**1203* A web worker that can provide a proxy to an arbitrary file.1204*/1205export interface MonacoWebWorker<T> {1206/**1207* Terminate the web worker, thus invalidating the returned proxy.1208*/1209dispose(): void;1210/**1211* Get a proxy to the arbitrary loaded code.1212*/1213getProxy(): Promise<T>;1214/**1215* Synchronize (send) the models at `resources` to the web worker,1216* making them available in the monaco.worker.getMirrorModels().1217*/1218withSyncedResources(resources: Uri[]): Promise<T>;1219}12201221export interface IInternalWebWorkerOptions {1222/**1223* The worker.1224*/1225worker: Worker | Promise<Worker>;1226/**1227* An object that can be used by the web worker to make calls back to the main thread.1228*/1229host?: Record<string, Function>;1230/**1231* Keep idle models.1232* Defaults to false, which means that idle models will stop syncing after a while.1233*/1234keepIdleModels?: boolean;1235}12361237/**1238* Description of an action contribution1239*/1240export interface IActionDescriptor {1241/**1242* An unique identifier of the contributed action.1243*/1244id: string;1245/**1246* A label of the action that will be presented to the user.1247*/1248label: string;1249/**1250* Precondition rule. The value should be a [context key expression](https://code.visualstudio.com/docs/getstarted/keybindings#_when-clause-contexts).1251*/1252precondition?: string;1253/**1254* An array of keybindings for the action.1255*/1256keybindings?: number[];1257/**1258* The keybinding rule (condition on top of precondition).1259*/1260keybindingContext?: string;1261/**1262* Control if the action should show up in the context menu and where.1263* The context menu of the editor has these default:1264* navigation - The navigation group comes first in all cases.1265* 1_modification - This group comes next and contains commands that modify your code.1266* 9_cutcopypaste - The last default group with the basic editing commands.1267* You can also create your own group.1268* Defaults to null (don't show in context menu).1269*/1270contextMenuGroupId?: string;1271/**1272* Control the order in the context menu group.1273*/1274contextMenuOrder?: number;1275/**1276* Method that will be executed when the action is triggered.1277* @param editor The editor instance is passed in as a convenience1278*/1279run(editor: ICodeEditor, ...args: unknown[]): void | Promise<void>;1280}12811282/**1283* Options which apply for all editors.1284*/1285export interface IGlobalEditorOptions {1286/**1287* The number of spaces a tab is equal to.1288* This setting is overridden based on the file contents when `detectIndentation` is on.1289* Defaults to 4.1290*/1291tabSize?: number;1292/**1293* Insert spaces when pressing `Tab`.1294* This setting is overridden based on the file contents when `detectIndentation` is on.1295* Defaults to true.1296*/1297insertSpaces?: boolean;1298/**1299* Controls whether `tabSize` and `insertSpaces` will be automatically detected when a file is opened based on the file contents.1300* Defaults to true.1301*/1302detectIndentation?: boolean;1303/**1304* Remove trailing auto inserted whitespace.1305* Defaults to true.1306*/1307trimAutoWhitespace?: boolean;1308/**1309* Special handling for large files to disable certain memory intensive features.1310* Defaults to true.1311*/1312largeFileOptimizations?: boolean;1313/**1314* Controls whether completions should be computed based on words in the document.1315* Defaults to true.1316*/1317wordBasedSuggestions?: 'off' | 'currentDocument' | 'matchingDocuments' | 'allDocuments';1318/**1319* Controls whether word based completions should be included from opened documents of the same language or any language.1320*/1321wordBasedSuggestionsOnlySameLanguage?: boolean;1322/**1323* Controls whether the semanticHighlighting is shown for the languages that support it.1324* true: semanticHighlighting is enabled for all themes1325* false: semanticHighlighting is disabled for all themes1326* 'configuredByTheme': semanticHighlighting is controlled by the current color theme's semanticHighlighting setting.1327* Defaults to 'byTheme'.1328*/1329'semanticHighlighting.enabled'?: true | false | 'configuredByTheme';1330/**1331* Keep peek editors open even when double-clicking their content or when hitting `Escape`.1332* Defaults to false.1333*/1334stablePeek?: boolean;1335/**1336* Lines above this length will not be tokenized for performance reasons.1337* Defaults to 20000.1338*/1339maxTokenizationLineLength?: number;1340/**1341* Theme to be used for rendering.1342* The current out-of-the-box available themes are: 'vs' (default), 'vs-dark', 'hc-black', 'hc-light'.1343* You can create custom themes via `monaco.editor.defineTheme`.1344* To switch a theme, use `monaco.editor.setTheme`.1345* **NOTE**: The theme might be overwritten if the OS is in high contrast mode, unless `autoDetectHighContrast` is set to false.1346*/1347theme?: string;1348/**1349* If enabled, will automatically change to high contrast theme if the OS is using a high contrast theme.1350* Defaults to true.1351*/1352autoDetectHighContrast?: boolean;1353}13541355/**1356* The options to create an editor.1357*/1358export interface IStandaloneEditorConstructionOptions extends IEditorConstructionOptions, IGlobalEditorOptions {1359/**1360* The initial model associated with this code editor.1361*/1362model?: ITextModel | null;1363/**1364* The initial value of the auto created model in the editor.1365* To not automatically create a model, use `model: null`.1366*/1367value?: string;1368/**1369* The initial language of the auto created model in the editor.1370* To not automatically create a model, use `model: null`.1371*/1372language?: string;1373/**1374* Initial theme to be used for rendering.1375* The current out-of-the-box available themes are: 'vs' (default), 'vs-dark', 'hc-black', 'hc-light.1376* You can create custom themes via `monaco.editor.defineTheme`.1377* To switch a theme, use `monaco.editor.setTheme`.1378* **NOTE**: The theme might be overwritten if the OS is in high contrast mode, unless `autoDetectHighContrast` is set to false.1379*/1380theme?: string;1381/**1382* If enabled, will automatically change to high contrast theme if the OS is using a high contrast theme.1383* Defaults to true.1384*/1385autoDetectHighContrast?: boolean;1386/**1387* An URL to open when Ctrl+H (Windows and Linux) or Cmd+H (OSX) is pressed in1388* the accessibility help dialog in the editor.1389*1390* Defaults to "https://go.microsoft.com/fwlink/?linkid=852450"1391*/1392accessibilityHelpUrl?: string;1393/**1394* Container element to use for ARIA messages.1395* Defaults to document.body.1396*/1397ariaContainerElement?: HTMLElement;1398}13991400/**1401* The options to create a diff editor.1402*/1403export interface IStandaloneDiffEditorConstructionOptions extends IDiffEditorConstructionOptions {1404/**1405* Initial theme to be used for rendering.1406* The current out-of-the-box available themes are: 'vs' (default), 'vs-dark', 'hc-black', 'hc-light.1407* You can create custom themes via `monaco.editor.defineTheme`.1408* To switch a theme, use `monaco.editor.setTheme`.1409* **NOTE**: The theme might be overwritten if the OS is in high contrast mode, unless `autoDetectHighContrast` is set to false.1410*/1411theme?: string;1412/**1413* If enabled, will automatically change to high contrast theme if the OS is using a high contrast theme.1414* Defaults to true.1415*/1416autoDetectHighContrast?: boolean;1417}14181419export interface IStandaloneCodeEditor extends ICodeEditor {1420updateOptions(newOptions: IEditorOptions & IGlobalEditorOptions): void;1421addCommand(keybinding: number, handler: ICommandHandler, context?: string): string | null;1422createContextKey<T extends ContextKeyValue = ContextKeyValue>(key: string, defaultValue: T): IContextKey<T>;1423addAction(descriptor: IActionDescriptor): IDisposable;1424}14251426export interface IStandaloneDiffEditor extends IDiffEditor {1427addCommand(keybinding: number, handler: ICommandHandler, context?: string): string | null;1428createContextKey<T extends ContextKeyValue = ContextKeyValue>(key: string, defaultValue: T): IContextKey<T>;1429addAction(descriptor: IActionDescriptor): IDisposable;1430getOriginalEditor(): IStandaloneCodeEditor;1431getModifiedEditor(): IStandaloneCodeEditor;1432}1433export interface ICommandHandler {1434(...args: any[]): void;1435}1436export interface ILocalizedString {1437original: string;1438value: string;1439}1440export interface ICommandMetadata {1441readonly description: ILocalizedString | string;1442}14431444export interface IContextKey<T extends ContextKeyValue = ContextKeyValue> {1445set(value: T): void;1446reset(): void;1447get(): T | undefined;1448}14491450export type ContextKeyValue = null | undefined | boolean | number | string | Array<null | undefined | boolean | number | string> | Record<string, null | undefined | boolean | number | string>;14511452export interface IEditorOverrideServices {1453[index: string]: unknown;1454}14551456export interface IMarker {1457owner: string;1458resource: Uri;1459severity: MarkerSeverity;1460code?: string | {1461value: string;1462target: Uri;1463};1464message: string;1465source?: string;1466startLineNumber: number;1467startColumn: number;1468endLineNumber: number;1469endColumn: number;1470modelVersionId?: number;1471relatedInformation?: IRelatedInformation[];1472tags?: MarkerTag[];1473origin?: string | undefined;1474}14751476/**1477* A structure defining a problem/warning/etc.1478*/1479export interface IMarkerData {1480code?: string | {1481value: string;1482target: Uri;1483};1484severity: MarkerSeverity;1485message: string;1486source?: string;1487startLineNumber: number;1488startColumn: number;1489endLineNumber: number;1490endColumn: number;1491modelVersionId?: number;1492relatedInformation?: IRelatedInformation[];1493tags?: MarkerTag[];1494origin?: string | undefined;1495}14961497/**1498*1499*/1500export interface IRelatedInformation {1501resource: Uri;1502message: string;1503startLineNumber: number;1504startColumn: number;1505endLineNumber: number;1506endColumn: number;1507}15081509export interface IColorizerOptions {1510tabSize?: number;1511}15121513export interface IColorizerElementOptions extends IColorizerOptions {1514theme?: string;1515mimeType?: string;1516}15171518export enum ScrollbarVisibility {1519Auto = 1,1520Hidden = 2,1521Visible = 31522}15231524export interface ThemeColor {1525id: string;1526}15271528export interface ThemeIcon {1529readonly id: string;1530readonly color?: ThemeColor;1531}15321533/**1534* A single edit operation, that acts as a simple replace.1535* i.e. Replace text at `range` with `text` in model.1536*/1537export interface ISingleEditOperation {1538/**1539* The range to replace. This can be empty to emulate a simple insert.1540*/1541range: IRange;1542/**1543* The text to replace with. This can be null to emulate a simple delete.1544*/1545text: string | null;1546/**1547* This indicates that this operation has "insert" semantics.1548* i.e. forceMoveMarkers = true => if `range` is collapsed, all markers at the position will be moved.1549*/1550forceMoveMarkers?: boolean;1551}15521553/**1554* Word inside a model.1555*/1556export interface IWordAtPosition {1557/**1558* The word.1559*/1560readonly word: string;1561/**1562* The column where the word starts.1563*/1564readonly startColumn: number;1565/**1566* The column where the word ends.1567*/1568readonly endColumn: number;1569}15701571/**1572* Vertical Lane in the overview ruler of the editor.1573*/1574export enum OverviewRulerLane {1575Left = 1,1576Center = 2,1577Right = 4,1578Full = 71579}15801581/**1582* Vertical Lane in the glyph margin of the editor.1583*/1584export enum GlyphMarginLane {1585Left = 1,1586Center = 2,1587Right = 31588}15891590export interface IGlyphMarginLanesModel {1591/**1592* The number of lanes that should be rendered in the editor.1593*/1594readonly requiredLanes: number;1595/**1596* Gets the lanes that should be rendered starting at a given line number.1597*/1598getLanesAtLine(lineNumber: number): GlyphMarginLane[];1599/**1600* Resets the model and ensures it can contain at least `maxLine` lines.1601*/1602reset(maxLine: number): void;1603/**1604* Registers that a lane should be visible at the Range in the model.1605* @param persist - if true, notes that the lane should always be visible,1606* even on lines where there's no specific request for that lane.1607*/1608push(lane: GlyphMarginLane, range: Range, persist?: boolean): void;1609}16101611/**1612* Position in the minimap to render the decoration.1613*/1614export enum MinimapPosition {1615Inline = 1,1616Gutter = 21617}16181619/**1620* Section header style.1621*/1622export enum MinimapSectionHeaderStyle {1623Normal = 1,1624Underlined = 21625}16261627export interface IDecorationOptions {1628/**1629* CSS color to render.1630* e.g.: rgba(100, 100, 100, 0.5) or a color from the color registry1631*/1632color: string | ThemeColor | undefined;1633/**1634* CSS color to render.1635* e.g.: rgba(100, 100, 100, 0.5) or a color from the color registry1636*/1637darkColor?: string | ThemeColor;1638}16391640export interface IModelDecorationGlyphMarginOptions {1641/**1642* The position in the glyph margin.1643*/1644position: GlyphMarginLane;1645/**1646* Whether the glyph margin lane in {@link position} should be rendered even1647* outside of this decoration's range.1648*/1649persistLane?: boolean;1650}16511652/**1653* Options for rendering a model decoration in the overview ruler.1654*/1655export interface IModelDecorationOverviewRulerOptions extends IDecorationOptions {1656/**1657* The position in the overview ruler.1658*/1659position: OverviewRulerLane;1660}16611662/**1663* Options for rendering a model decoration in the minimap.1664*/1665export interface IModelDecorationMinimapOptions extends IDecorationOptions {1666/**1667* The position in the minimap.1668*/1669position: MinimapPosition;1670/**1671* If the decoration is for a section header, which header style.1672*/1673sectionHeaderStyle?: MinimapSectionHeaderStyle | null;1674/**1675* If the decoration is for a section header, the header text.1676*/1677sectionHeaderText?: string | null;1678}16791680/**1681* Options for a model decoration.1682*/1683export interface IModelDecorationOptions {1684/**1685* Customize the growing behavior of the decoration when typing at the edges of the decoration.1686* Defaults to TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges1687*/1688stickiness?: TrackedRangeStickiness;1689/**1690* CSS class name describing the decoration.1691*/1692className?: string | null;1693/**1694* Indicates whether the decoration should span across the entire line when it continues onto the next line.1695*/1696shouldFillLineOnLineBreak?: boolean | null;1697blockClassName?: string | null;1698/**1699* Indicates if this block should be rendered after the last line.1700* In this case, the range must be empty and set to the last line.1701*/1702blockIsAfterEnd?: boolean | null;1703blockDoesNotCollapse?: boolean | null;1704blockPadding?: [top: number, right: number, bottom: number, left: number] | null;1705/**1706* Message to be rendered when hovering over the glyph margin decoration.1707*/1708glyphMarginHoverMessage?: IMarkdownString | IMarkdownString[] | null;1709/**1710* Array of MarkdownString to render as the decoration message.1711*/1712hoverMessage?: IMarkdownString | IMarkdownString[] | null;1713/**1714* Array of MarkdownString to render as the line number message.1715*/1716lineNumberHoverMessage?: IMarkdownString | IMarkdownString[] | null;1717/**1718* Should the decoration expand to encompass a whole line.1719*/1720isWholeLine?: boolean;1721/**1722* Always render the decoration (even when the range it encompasses is collapsed).1723*/1724showIfCollapsed?: boolean;1725/**1726* Specifies the stack order of a decoration.1727* A decoration with greater stack order is always in front of a decoration with1728* a lower stack order when the decorations are on the same line.1729*/1730zIndex?: number;1731/**1732* If set, render this decoration in the overview ruler.1733*/1734overviewRuler?: IModelDecorationOverviewRulerOptions | null;1735/**1736* If set, render this decoration in the minimap.1737*/1738minimap?: IModelDecorationMinimapOptions | null;1739/**1740* If set, the decoration will be rendered in the glyph margin with this CSS class name.1741*/1742glyphMarginClassName?: string | null;1743/**1744* If set and the decoration has {@link glyphMarginClassName} set, render this decoration1745* with the specified {@link IModelDecorationGlyphMarginOptions} in the glyph margin.1746*/1747glyphMargin?: IModelDecorationGlyphMarginOptions | null;1748/**1749* If set, the decoration will override the line height of the lines it spans. This value is a multiplier to the default line height.1750*/1751lineHeight?: number | null;1752/**1753* Font family1754*/1755fontFamily?: string | null;1756/**1757* Font size1758*/1759fontSize?: string | null;1760/**1761* Font weight1762*/1763fontWeight?: string | null;1764/**1765* Font style1766*/1767fontStyle?: string | null;1768/**1769* If set, the decoration will be rendered in the lines decorations with this CSS class name.1770*/1771linesDecorationsClassName?: string | null;1772/**1773* Controls the tooltip text of the line decoration.1774*/1775linesDecorationsTooltip?: string | null;1776/**1777* If set, the decoration will be rendered on the line number.1778*/1779lineNumberClassName?: string | null;1780/**1781* 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.1782*/1783firstLineDecorationClassName?: string | null;1784/**1785* If set, the decoration will be rendered in the margin (covering its full width) with this CSS class name.1786*/1787marginClassName?: string | null;1788/**1789* If set, the decoration will be rendered inline with the text with this CSS class name.1790* Please use this only for CSS rules that must impact the text. For example, use `className`1791* to have a background color decoration.1792*/1793inlineClassName?: string | null;1794/**1795* If there is an `inlineClassName` which affects letter spacing.1796*/1797inlineClassNameAffectsLetterSpacing?: boolean;1798/**1799* If set, the decoration will be rendered before the text with this CSS class name.1800*/1801beforeContentClassName?: string | null;1802/**1803* If set, the decoration will be rendered after the text with this CSS class name.1804*/1805afterContentClassName?: string | null;1806/**1807* If set, text will be injected in the view after the range.1808*/1809after?: InjectedTextOptions | null;1810/**1811* If set, text will be injected in the view before the range.1812*/1813before?: InjectedTextOptions | null;1814/**1815* The text direction of the decoration.1816*/1817textDirection?: TextDirection | null;1818}18191820/**1821* Text Direction for a decoration.1822*/1823export enum TextDirection {1824LTR = 0,1825RTL = 11826}18271828/**1829* Configures text that is injected into the view without changing the underlying document.1830*/1831export interface InjectedTextOptions {1832/**1833* Sets the text to inject. Must be a single line.1834*/1835readonly content: string;1836/**1837* If set, the decoration will be rendered inline with the text with this CSS class name.1838*/1839readonly inlineClassName?: string | null;1840/**1841* If there is an `inlineClassName` which affects letter spacing.1842*/1843readonly inlineClassNameAffectsLetterSpacing?: boolean;1844/**1845* This field allows to attach data to this injected text.1846* The data can be read when injected texts at a given position are queried.1847*/1848readonly attachedData?: unknown;1849/**1850* Configures cursor stops around injected text.1851* Defaults to {@link InjectedTextCursorStops.Both}.1852*/1853readonly cursorStops?: InjectedTextCursorStops | null;1854}18551856export enum InjectedTextCursorStops {1857Both = 0,1858Right = 1,1859Left = 2,1860None = 31861}18621863/**1864* New model decorations.1865*/1866export interface IModelDeltaDecoration {1867/**1868* Range that this decoration covers.1869*/1870range: IRange;1871/**1872* Options associated with this decoration.1873*/1874options: IModelDecorationOptions;1875}18761877/**1878* A decoration in the model.1879*/1880export interface IModelDecoration {1881/**1882* Identifier for a decoration.1883*/1884readonly id: string;1885/**1886* Identifier for a decoration's owner.1887*/1888readonly ownerId: number;1889/**1890* Range that this decoration covers.1891*/1892readonly range: Range;1893/**1894* Options associated with this decoration.1895*/1896readonly options: IModelDecorationOptions;1897}18981899/**1900* End of line character preference.1901*/1902export enum EndOfLinePreference {1903/**1904* Use the end of line character identified in the text buffer.1905*/1906TextDefined = 0,1907/**1908* Use line feed (\n) as the end of line character.1909*/1910LF = 1,1911/**1912* Use carriage return and line feed (\r\n) as the end of line character.1913*/1914CRLF = 21915}19161917/**1918* The default end of line to use when instantiating models.1919*/1920export enum DefaultEndOfLine {1921/**1922* Use line feed (\n) as the end of line character.1923*/1924LF = 1,1925/**1926* Use carriage return and line feed (\r\n) as the end of line character.1927*/1928CRLF = 21929}19301931/**1932* End of line character preference.1933*/1934export enum EndOfLineSequence {1935/**1936* Use line feed (\n) as the end of line character.1937*/1938LF = 0,1939/**1940* Use carriage return and line feed (\r\n) as the end of line character.1941*/1942CRLF = 11943}19441945/**1946* A single edit operation, that has an identifier.1947*/1948export interface IIdentifiedSingleEditOperation extends ISingleEditOperation {1949}19501951export interface IValidEditOperation {1952/**1953* The range to replace. This can be empty to emulate a simple insert.1954*/1955range: Range;1956/**1957* The text to replace with. This can be empty to emulate a simple delete.1958*/1959text: string;1960}19611962/**1963* A callback that can compute the cursor state after applying a series of edit operations.1964*/1965export interface ICursorStateComputer {1966/**1967* A callback that can compute the resulting cursors state after some edit operations have been executed.1968*/1969(inverseEditOperations: IValidEditOperation[]): Selection[] | null;1970}19711972export class TextModelResolvedOptions {1973_textModelResolvedOptionsBrand: void;1974readonly tabSize: number;1975readonly indentSize: number;1976readonly insertSpaces: boolean;1977readonly defaultEOL: DefaultEndOfLine;1978readonly trimAutoWhitespace: boolean;1979readonly bracketPairColorizationOptions: BracketPairColorizationOptions;1980get originalIndentSize(): number | 'tabSize';1981}19821983export interface BracketPairColorizationOptions {1984enabled: boolean;1985independentColorPoolPerBracketType: boolean;1986}19871988export interface ITextModelUpdateOptions {1989tabSize?: number;1990indentSize?: number | 'tabSize';1991insertSpaces?: boolean;1992trimAutoWhitespace?: boolean;1993bracketColorizationOptions?: BracketPairColorizationOptions;1994}19951996export class FindMatch {1997_findMatchBrand: void;1998readonly range: Range;1999readonly matches: string[] | null;2000}20012002/**2003* Describes the behavior of decorations when typing/editing near their edges.2004* Note: Please do not edit the values, as they very carefully match `DecorationRangeBehavior`2005*/2006export enum TrackedRangeStickiness {2007AlwaysGrowsWhenTypingAtEdges = 0,2008NeverGrowsWhenTypingAtEdges = 1,2009GrowsOnlyWhenTypingBefore = 2,2010GrowsOnlyWhenTypingAfter = 32011}20122013/**2014* Text snapshot that works like an iterator.2015* Will try to return chunks of roughly ~64KB size.2016* Will return null when finished.2017*/2018export interface ITextSnapshot {2019read(): string | null;2020}20212022/**2023* A model.2024*/2025export interface ITextModel {2026/**2027* Gets the resource associated with this editor model.2028*/2029readonly uri: Uri;2030/**2031* A unique identifier associated with this model.2032*/2033readonly id: string;2034/**2035* Get the resolved options for this model.2036*/2037getOptions(): TextModelResolvedOptions;2038/**2039* Get the current version id of the model.2040* Anytime a change happens to the model (even undo/redo),2041* the version id is incremented.2042*/2043getVersionId(): number;2044/**2045* Get the alternative version id of the model.2046* This alternative version id is not always incremented,2047* it will return the same values in the case of undo-redo.2048*/2049getAlternativeVersionId(): number;2050/**2051* Replace the entire text buffer value contained in this model.2052*/2053setValue(newValue: string | ITextSnapshot): void;2054/**2055* Get the text stored in this model.2056* @param eol The end of line character preference. Defaults to `EndOfLinePreference.TextDefined`.2057* @param preserverBOM Preserve a BOM character if it was detected when the model was constructed.2058* @return The text.2059*/2060getValue(eol?: EndOfLinePreference, preserveBOM?: boolean): string;2061/**2062* Get the text stored in this model.2063* @param preserverBOM Preserve a BOM character if it was detected when the model was constructed.2064* @return The text snapshot (it is safe to consume it asynchronously).2065*/2066createSnapshot(preserveBOM?: boolean): ITextSnapshot;2067/**2068* Get the length of the text stored in this model.2069*/2070getValueLength(eol?: EndOfLinePreference, preserveBOM?: boolean): number;2071/**2072* Get the text in a certain range.2073* @param range The range describing what text to get.2074* @param eol The end of line character preference. This will only be used for multiline ranges. Defaults to `EndOfLinePreference.TextDefined`.2075* @return The text.2076*/2077getValueInRange(range: IRange, eol?: EndOfLinePreference): string;2078/**2079* Get the length of text in a certain range.2080* @param range The range describing what text length to get.2081* @return The text length.2082*/2083getValueLengthInRange(range: IRange, eol?: EndOfLinePreference): number;2084/**2085* Get the character count of text in a certain range.2086* @param range The range describing what text length to get.2087*/2088getCharacterCountInRange(range: IRange, eol?: EndOfLinePreference): number;2089/**2090* Get the number of lines in the model.2091*/2092getLineCount(): number;2093/**2094* Get the text for a certain line.2095*/2096getLineContent(lineNumber: number): string;2097/**2098* Get the text length for a certain line.2099*/2100getLineLength(lineNumber: number): number;2101/**2102* Get the text for all lines.2103*/2104getLinesContent(): string[];2105/**2106* Get the end of line sequence predominantly used in the text buffer.2107* @return EOL char sequence (e.g.: '\n' or '\r\n').2108*/2109getEOL(): string;2110/**2111* Get the end of line sequence predominantly used in the text buffer.2112*/2113getEndOfLineSequence(): EndOfLineSequence;2114/**2115* Get the minimum legal column for line at `lineNumber`2116*/2117getLineMinColumn(lineNumber: number): number;2118/**2119* Get the maximum legal column for line at `lineNumber`2120*/2121getLineMaxColumn(lineNumber: number): number;2122/**2123* Returns the column before the first non whitespace character for line at `lineNumber`.2124* Returns 0 if line is empty or contains only whitespace.2125*/2126getLineFirstNonWhitespaceColumn(lineNumber: number): number;2127/**2128* Returns the column after the last non whitespace character for line at `lineNumber`.2129* Returns 0 if line is empty or contains only whitespace.2130*/2131getLineLastNonWhitespaceColumn(lineNumber: number): number;2132/**2133* Create a valid position.2134*/2135validatePosition(position: IPosition): Position;2136/**2137* Advances the given position by the given offset (negative offsets are also accepted)2138* and returns it as a new valid position.2139*2140* If the offset and position are such that their combination goes beyond the beginning or2141* end of the model, throws an exception.2142*2143* If the offset is such that the new position would be in the middle of a multi-byte2144* line terminator, throws an exception.2145*/2146modifyPosition(position: IPosition, offset: number): Position;2147/**2148* Create a valid range.2149*/2150validateRange(range: IRange): Range;2151/**2152* Verifies the range is valid.2153*/2154isValidRange(range: IRange): boolean;2155/**2156* Converts the position to a zero-based offset.2157*2158* The position will be [adjusted](#TextDocument.validatePosition).2159*2160* @param position A position.2161* @return A valid zero-based offset.2162*/2163getOffsetAt(position: IPosition): number;2164/**2165* Converts a zero-based offset to a position.2166*2167* @param offset A zero-based offset.2168* @return A valid [position](#Position).2169*/2170getPositionAt(offset: number): Position;2171/**2172* Get a range covering the entire model.2173*/2174getFullModelRange(): Range;2175/**2176* Returns if the model was disposed or not.2177*/2178isDisposed(): boolean;2179/**2180* Search the model.2181* @param searchString The string used to search. If it is a regular expression, set `isRegex` to true.2182* @param searchOnlyEditableRange Limit the searching to only search inside the editable range of the model.2183* @param isRegex Used to indicate that `searchString` is a regular expression.2184* @param matchCase Force the matching to match lower/upper case exactly.2185* @param wordSeparators Force the matching to match entire words only. Pass null otherwise.2186* @param captureMatches The result will contain the captured groups.2187* @param limitResultCount Limit the number of results2188* @return The ranges where the matches are. It is empty if not matches have been found.2189*/2190findMatches(searchString: string, searchOnlyEditableRange: boolean, isRegex: boolean, matchCase: boolean, wordSeparators: string | null, captureMatches: boolean, limitResultCount?: number): FindMatch[];2191/**2192* Search the model.2193* @param searchString The string used to search. If it is a regular expression, set `isRegex` to true.2194* @param searchScope Limit the searching to only search inside these ranges.2195* @param isRegex Used to indicate that `searchString` is a regular expression.2196* @param matchCase Force the matching to match lower/upper case exactly.2197* @param wordSeparators Force the matching to match entire words only. Pass null otherwise.2198* @param captureMatches The result will contain the captured groups.2199* @param limitResultCount Limit the number of results2200* @return The ranges where the matches are. It is empty if no matches have been found.2201*/2202findMatches(searchString: string, searchScope: IRange | IRange[], isRegex: boolean, matchCase: boolean, wordSeparators: string | null, captureMatches: boolean, limitResultCount?: number): FindMatch[];2203/**2204* Search the model for the next match. Loops to the beginning of the model if needed.2205* @param searchString The string used to search. If it is a regular expression, set `isRegex` to true.2206* @param searchStart Start the searching at the specified position.2207* @param isRegex Used to indicate that `searchString` is a regular expression.2208* @param matchCase Force the matching to match lower/upper case exactly.2209* @param wordSeparators Force the matching to match entire words only. Pass null otherwise.2210* @param captureMatches The result will contain the captured groups.2211* @return The range where the next match is. It is null if no next match has been found.2212*/2213findNextMatch(searchString: string, searchStart: IPosition, isRegex: boolean, matchCase: boolean, wordSeparators: string | null, captureMatches: boolean): FindMatch | null;2214/**2215* Search the model for the previous match. Loops to the end of the model if needed.2216* @param searchString The string used to search. If it is a regular expression, set `isRegex` to true.2217* @param searchStart Start the searching at the specified position.2218* @param isRegex Used to indicate that `searchString` is a regular expression.2219* @param matchCase Force the matching to match lower/upper case exactly.2220* @param wordSeparators Force the matching to match entire words only. Pass null otherwise.2221* @param captureMatches The result will contain the captured groups.2222* @return The range where the previous match is. It is null if no previous match has been found.2223*/2224findPreviousMatch(searchString: string, searchStart: IPosition, isRegex: boolean, matchCase: boolean, wordSeparators: string | null, captureMatches: boolean): FindMatch | null;2225/**2226* Get the language associated with this model.2227*/2228getLanguageId(): string;2229/**2230* Get the word under or besides `position`.2231* @param position The position to look for a word.2232* @return The word under or besides `position`. Might be null.2233*/2234getWordAtPosition(position: IPosition): IWordAtPosition | null;2235/**2236* Get the word under or besides `position` trimmed to `position`.column2237* @param position The position to look for a word.2238* @return The word under or besides `position`. Will never be null.2239*/2240getWordUntilPosition(position: IPosition): IWordAtPosition;2241/**2242* Perform a minimum amount of operations, in order to transform the decorations2243* identified by `oldDecorations` to the decorations described by `newDecorations`2244* and returns the new identifiers associated with the resulting decorations.2245*2246* @param oldDecorations Array containing previous decorations identifiers.2247* @param newDecorations Array describing what decorations should result after the call.2248* @param ownerId Identifies the editor id in which these decorations should appear. If no `ownerId` is provided, the decorations will appear in all editors that attach this model.2249* @return An array containing the new decorations identifiers.2250*/2251deltaDecorations(oldDecorations: string[], newDecorations: IModelDeltaDecoration[], ownerId?: number): string[];2252/**2253* Get the options associated with a decoration.2254* @param id The decoration id.2255* @return The decoration options or null if the decoration was not found.2256*/2257getDecorationOptions(id: string): IModelDecorationOptions | null;2258/**2259* Get the range associated with a decoration.2260* @param id The decoration id.2261* @return The decoration range or null if the decoration was not found.2262*/2263getDecorationRange(id: string): Range | null;2264/**2265* Gets all the decorations for the line `lineNumber` as an array.2266* @param lineNumber The line number2267* @param ownerId If set, it will ignore decorations belonging to other owners.2268* @param filterOutValidation If set, it will ignore decorations specific to validation (i.e. warnings, errors).2269* @param filterFontDecorations If set, it will ignore font decorations.2270* @return An array with the decorations2271*/2272getLineDecorations(lineNumber: number, ownerId?: number, filterOutValidation?: boolean, filterFontDecorations?: boolean): IModelDecoration[];2273/**2274* Gets all the decorations for the lines between `startLineNumber` and `endLineNumber` as an array.2275* @param startLineNumber The start line number2276* @param endLineNumber The end line number2277* @param ownerId If set, it will ignore decorations belonging to other owners.2278* @param filterOutValidation If set, it will ignore decorations specific to validation (i.e. warnings, errors).2279* @param filterFontDecorations If set, it will ignore font decorations.2280* @return An array with the decorations2281*/2282getLinesDecorations(startLineNumber: number, endLineNumber: number, ownerId?: number, filterOutValidation?: boolean, filterFontDecorations?: boolean): IModelDecoration[];2283/**2284* Gets all the decorations in a range as an array. Only `startLineNumber` and `endLineNumber` from `range` are used for filtering.2285* So for now it returns all the decorations on the same line as `range`.2286* @param range The range to search in2287* @param ownerId If set, it will ignore decorations belonging to other owners.2288* @param filterOutValidation If set, it will ignore decorations specific to validation (i.e. warnings, errors).2289* @param filterFontDecorations If set, it will ignore font decorations.2290* @param onlyMinimapDecorations If set, it will return only decorations that render in the minimap.2291* @param onlyMarginDecorations If set, it will return only decorations that render in the glyph margin.2292* @return An array with the decorations2293*/2294getDecorationsInRange(range: IRange, ownerId?: number, filterOutValidation?: boolean, filterFontDecorations?: boolean, onlyMinimapDecorations?: boolean, onlyMarginDecorations?: boolean): IModelDecoration[];2295/**2296* Gets all the decorations as an array.2297* @param ownerId If set, it will ignore decorations belonging to other owners.2298* @param filterOutValidation If set, it will ignore decorations specific to validation (i.e. warnings, errors).2299* @param filterFontDecorations If set, it will ignore font decorations.2300*/2301getAllDecorations(ownerId?: number, filterOutValidation?: boolean, filterFontDecorations?: boolean): IModelDecoration[];2302/**2303* Gets all decorations that render in the glyph margin as an array.2304* @param ownerId If set, it will ignore decorations belonging to other owners.2305*/2306getAllMarginDecorations(ownerId?: number): IModelDecoration[];2307/**2308* Gets all the decorations that should be rendered in the overview ruler as an array.2309* @param ownerId If set, it will ignore decorations belonging to other owners.2310* @param filterOutValidation If set, it will ignore decorations specific to validation (i.e. warnings, errors).2311* @param filterFontDecorations If set, it will ignore font decorations.2312*/2313getOverviewRulerDecorations(ownerId?: number, filterOutValidation?: boolean, filterFontDecorations?: boolean): IModelDecoration[];2314/**2315* Gets all the decorations that contain injected text.2316* @param ownerId If set, it will ignore decorations belonging to other owners.2317*/2318getInjectedTextDecorations(ownerId?: number): IModelDecoration[];2319/**2320* Gets all the decorations that contain custom line heights.2321* @param ownerId If set, it will ignore decorations belonging to other owners.2322*/2323getCustomLineHeightsDecorations(ownerId?: number): IModelDecoration[];2324/**2325* Normalize a string containing whitespace according to indentation rules (converts to spaces or to tabs).2326*/2327normalizeIndentation(str: string): string;2328/**2329* Change the options of this model.2330*/2331updateOptions(newOpts: ITextModelUpdateOptions): void;2332/**2333* Detect the indentation options for this model from its content.2334*/2335detectIndentation(defaultInsertSpaces: boolean, defaultTabSize: number): void;2336/**2337* Close the current undo-redo element.2338* This offers a way to create an undo/redo stop point.2339*/2340pushStackElement(): void;2341/**2342* Open the current undo-redo element.2343* This offers a way to remove the current undo/redo stop point.2344*/2345popStackElement(): void;2346/**2347* Push edit operations, basically editing the model. This is the preferred way2348* of editing the model. The edit operations will land on the undo stack.2349* @param beforeCursorState The cursor state before the edit operations. This cursor state will be returned when `undo` or `redo` are invoked.2350* @param editOperations The edit operations.2351* @param cursorStateComputer A callback that can compute the resulting cursors state after the edit operations have been executed.2352* @return The cursor state returned by the `cursorStateComputer`.2353*/2354pushEditOperations(beforeCursorState: Selection[] | null, editOperations: IIdentifiedSingleEditOperation[], cursorStateComputer: ICursorStateComputer): Selection[] | null;2355/**2356* Change the end of line sequence. This is the preferred way of2357* changing the eol sequence. This will land on the undo stack.2358*/2359pushEOL(eol: EndOfLineSequence): void;2360/**2361* Edit the model without adding the edits to the undo stack.2362* This can have dire consequences on the undo stack! See @pushEditOperations for the preferred way.2363* @param operations The edit operations.2364* @return If desired, the inverse edit operations, that, when applied, will bring the model back to the previous state.2365*/2366applyEdits(operations: readonly IIdentifiedSingleEditOperation[]): void;2367applyEdits(operations: readonly IIdentifiedSingleEditOperation[], computeUndoEdits: false): void;2368applyEdits(operations: readonly IIdentifiedSingleEditOperation[], computeUndoEdits: true): IValidEditOperation[];2369/**2370* Change the end of line sequence without recording in the undo stack.2371* This can have dire consequences on the undo stack! See @pushEOL for the preferred way.2372*/2373setEOL(eol: EndOfLineSequence): void;2374/**2375* Undo edit operations until the previous undo/redo point.2376* The inverse edit operations will be pushed on the redo stack.2377*/2378undo(): void | Promise<void>;2379/**2380* Is there anything in the undo stack?2381*/2382canUndo(): boolean;2383/**2384* Redo edit operations until the next undo/redo point.2385* The inverse edit operations will be pushed on the undo stack.2386*/2387redo(): void | Promise<void>;2388/**2389* Is there anything in the redo stack?2390*/2391canRedo(): boolean;2392/**2393* An event emitted when the contents of the model have changed.2394* @event2395*/2396onDidChangeContent(listener: (e: IModelContentChangedEvent) => void): IDisposable;2397/**2398* An event emitted when decorations of the model have changed.2399* @event2400*/2401readonly onDidChangeDecorations: IEvent<IModelDecorationsChangedEvent>;2402/**2403* An event emitted when the model options have changed.2404* @event2405*/2406readonly onDidChangeOptions: IEvent<IModelOptionsChangedEvent>;2407/**2408* An event emitted when the language associated with the model has changed.2409* @event2410*/2411readonly onDidChangeLanguage: IEvent<IModelLanguageChangedEvent>;2412/**2413* An event emitted when the language configuration associated with the model has changed.2414* @event2415*/2416readonly onDidChangeLanguageConfiguration: IEvent<IModelLanguageConfigurationChangedEvent>;2417/**2418* An event emitted when the model has been attached to the first editor or detached from the last editor.2419* @event2420*/2421readonly onDidChangeAttached: IEvent<void>;2422/**2423* An event emitted right before disposing the model.2424* @event2425*/2426readonly onWillDispose: IEvent<void>;2427/**2428* Destroy this model.2429*/2430dispose(): void;2431/**2432* Returns if this model is attached to an editor or not.2433*/2434isAttachedToEditor(): boolean;2435}24362437export enum PositionAffinity {2438/**2439* Prefers the left most position.2440*/2441Left = 0,2442/**2443* Prefers the right most position.2444*/2445Right = 1,2446/**2447* No preference.2448*/2449None = 2,2450/**2451* If the given position is on injected text, prefers the position left of it.2452*/2453LeftOfInjectedText = 3,2454/**2455* If the given position is on injected text, prefers the position right of it.2456*/2457RightOfInjectedText = 42458}24592460/**2461* A change2462*/2463export interface IChange {2464readonly originalStartLineNumber: number;2465readonly originalEndLineNumber: number;2466readonly modifiedStartLineNumber: number;2467readonly modifiedEndLineNumber: number;2468}24692470/**2471* A character level change.2472*/2473export interface ICharChange extends IChange {2474readonly originalStartColumn: number;2475readonly originalEndColumn: number;2476readonly modifiedStartColumn: number;2477readonly modifiedEndColumn: number;2478}24792480/**2481* A line change2482*/2483export interface ILineChange extends IChange {2484readonly charChanges: ICharChange[] | undefined;2485}2486export interface IDimension {2487width: number;2488height: number;2489}24902491/**2492* A builder and helper for edit operations for a command.2493*/2494export interface IEditOperationBuilder {2495/**2496* Add a new edit operation (a replace operation).2497* @param range The range to replace (delete). May be empty to represent a simple insert.2498* @param text The text to replace with. May be null to represent a simple delete.2499*/2500addEditOperation(range: IRange, text: string | null, forceMoveMarkers?: boolean): void;2501/**2502* Add a new edit operation (a replace operation).2503* The inverse edits will be accessible in `ICursorStateComputerData.getInverseEditOperations()`2504* @param range The range to replace (delete). May be empty to represent a simple insert.2505* @param text The text to replace with. May be null to represent a simple delete.2506*/2507addTrackedEditOperation(range: IRange, text: string | null, forceMoveMarkers?: boolean): void;2508/**2509* Track `selection` when applying edit operations.2510* A best effort will be made to not grow/expand the selection.2511* An empty selection will clamp to a nearby character.2512* @param selection The selection to track.2513* @param trackPreviousOnEmpty If set, and the selection is empty, indicates whether the selection2514* should clamp to the previous or the next character.2515* @return A unique identifier.2516*/2517trackSelection(selection: Selection, trackPreviousOnEmpty?: boolean): string;2518}25192520/**2521* A helper for computing cursor state after a command.2522*/2523export interface ICursorStateComputerData {2524/**2525* Get the inverse edit operations of the added edit operations.2526*/2527getInverseEditOperations(): IValidEditOperation[];2528/**2529* Get a previously tracked selection.2530* @param id The unique identifier returned by `trackSelection`.2531* @return The selection.2532*/2533getTrackedSelection(id: string): Selection;2534}25352536/**2537* A command that modifies text / cursor state on a model.2538*/2539export interface ICommand {2540/**2541* Get the edit operations needed to execute this command.2542* @param model The model the command will execute on.2543* @param builder A helper to collect the needed edit operations and to track selections.2544*/2545getEditOperations(model: ITextModel, builder: IEditOperationBuilder): void;2546/**2547* Compute the cursor state after the edit operations were applied.2548* @param model The model the command has executed on.2549* @param helper A helper to get inverse edit operations and to get previously tracked selections.2550* @return The cursor state after the command executed.2551*/2552computeCursorState(model: ITextModel, helper: ICursorStateComputerData): Selection;2553}25542555/**2556* A model for the diff editor.2557*/2558export interface IDiffEditorModel {2559/**2560* Original model.2561*/2562original: ITextModel;2563/**2564* Modified model.2565*/2566modified: ITextModel;2567}25682569export interface IDiffEditorViewModel extends IDisposable {2570readonly model: IDiffEditorModel;2571waitForDiff(): Promise<void>;2572}25732574/**2575* An event describing that an editor has had its model reset (i.e. `editor.setModel()`).2576*/2577export interface IModelChangedEvent {2578/**2579* The `uri` of the previous model or null.2580*/2581readonly oldModelUrl: Uri | null;2582/**2583* The `uri` of the new model or null.2584*/2585readonly newModelUrl: Uri | null;2586}25872588export interface IContentSizeChangedEvent {2589readonly contentWidth: number;2590readonly contentHeight: number;2591readonly contentWidthChanged: boolean;2592readonly contentHeightChanged: boolean;2593}25942595export interface INewScrollPosition {2596scrollLeft?: number;2597scrollTop?: number;2598}25992600export interface IEditorAction {2601readonly id: string;2602readonly label: string;2603readonly alias: string;2604readonly metadata: ICommandMetadata | undefined;2605isSupported(): boolean;2606run(args?: unknown): Promise<void>;2607}26082609export type IEditorModel = ITextModel | IDiffEditorModel | IDiffEditorViewModel;26102611/**2612* A (serializable) state of the cursors.2613*/2614export interface ICursorState {2615inSelectionMode: boolean;2616selectionStart: IPosition;2617position: IPosition;2618}26192620/**2621* A (serializable) state of the view.2622*/2623export interface IViewState {2624/** written by previous versions */2625scrollTop?: number;2626/** written by previous versions */2627scrollTopWithoutViewZones?: number;2628scrollLeft: number;2629firstPosition: IPosition;2630firstPositionDeltaTop: number;2631}26322633/**2634* A (serializable) state of the code editor.2635*/2636export interface ICodeEditorViewState {2637cursorState: ICursorState[];2638viewState: IViewState;2639contributionsState: {2640[id: string]: unknown;2641};2642}26432644/**2645* (Serializable) View state for the diff editor.2646*/2647export interface IDiffEditorViewState {2648original: ICodeEditorViewState | null;2649modified: ICodeEditorViewState | null;2650modelState?: unknown;2651}26522653/**2654* An editor view state.2655*/2656export type IEditorViewState = ICodeEditorViewState | IDiffEditorViewState;26572658export enum ScrollType {2659Smooth = 0,2660Immediate = 12661}26622663/**2664* An editor.2665*/2666export interface IEditor {2667/**2668* An event emitted when the editor has been disposed.2669* @event2670*/2671onDidDispose(listener: () => void): IDisposable;2672/**2673* Dispose the editor.2674*/2675dispose(): void;2676/**2677* Get a unique id for this editor instance.2678*/2679getId(): string;2680/**2681* Get the editor type. Please see `EditorType`.2682* This is to avoid an instanceof check2683*/2684getEditorType(): string;2685/**2686* Update the editor's options after the editor has been created.2687*/2688updateOptions(newOptions: IEditorOptions): void;2689/**2690* Instructs the editor to remeasure its container. This method should2691* be called when the container of the editor gets resized.2692*2693* If a dimension is passed in, the passed in value will be used.2694*2695* By default, this will also render the editor immediately.2696* If you prefer to delay rendering to the next animation frame, use postponeRendering == true.2697*/2698layout(dimension?: IDimension, postponeRendering?: boolean): void;2699/**2700* Brings browser focus to the editor text2701*/2702focus(): void;2703/**2704* Returns true if the text inside this editor is focused (i.e. cursor is blinking).2705*/2706hasTextFocus(): boolean;2707/**2708* Returns all actions associated with this editor.2709*/2710getSupportedActions(): IEditorAction[];2711/**2712* Saves current view state of the editor in a serializable object.2713*/2714saveViewState(): IEditorViewState | null;2715/**2716* Restores the view state of the editor from a serializable object generated by `saveViewState`.2717*/2718restoreViewState(state: IEditorViewState | null): void;2719/**2720* Given a position, returns a column number that takes tab-widths into account.2721*/2722getVisibleColumnFromPosition(position: IPosition): number;2723/**2724* Returns the primary position of the cursor.2725*/2726getPosition(): Position | null;2727/**2728* Set the primary position of the cursor. This will remove any secondary cursors.2729* @param position New primary cursor's position2730* @param source Source of the call that caused the position2731*/2732setPosition(position: IPosition, source?: string): void;2733/**2734* Scroll vertically as necessary and reveal a line.2735*/2736revealLine(lineNumber: number, scrollType?: ScrollType): void;2737/**2738* Scroll vertically as necessary and reveal a line centered vertically.2739*/2740revealLineInCenter(lineNumber: number, scrollType?: ScrollType): void;2741/**2742* Scroll vertically as necessary and reveal a line centered vertically only if it lies outside the viewport.2743*/2744revealLineInCenterIfOutsideViewport(lineNumber: number, scrollType?: ScrollType): void;2745/**2746* Scroll vertically as necessary and reveal a line close to the top of the viewport,2747* optimized for viewing a code definition.2748*/2749revealLineNearTop(lineNumber: number, scrollType?: ScrollType): void;2750/**2751* Scroll vertically or horizontally as necessary and reveal a position.2752*/2753revealPosition(position: IPosition, scrollType?: ScrollType): void;2754/**2755* Scroll vertically or horizontally as necessary and reveal a position centered vertically.2756*/2757revealPositionInCenter(position: IPosition, scrollType?: ScrollType): void;2758/**2759* Scroll vertically or horizontally as necessary and reveal a position centered vertically only if it lies outside the viewport.2760*/2761revealPositionInCenterIfOutsideViewport(position: IPosition, scrollType?: ScrollType): void;2762/**2763* Scroll vertically or horizontally as necessary and reveal a position close to the top of the viewport,2764* optimized for viewing a code definition.2765*/2766revealPositionNearTop(position: IPosition, scrollType?: ScrollType): void;2767/**2768* Returns the primary selection of the editor.2769*/2770getSelection(): Selection | null;2771/**2772* Returns all the selections of the editor.2773*/2774getSelections(): Selection[] | null;2775/**2776* Set the primary selection of the editor. This will remove any secondary cursors.2777* @param selection The new selection2778* @param source Source of the call that caused the selection2779*/2780setSelection(selection: IRange, source?: string): void;2781/**2782* Set the primary selection of the editor. This will remove any secondary cursors.2783* @param selection The new selection2784* @param source Source of the call that caused the selection2785*/2786setSelection(selection: Range, source?: string): void;2787/**2788* Set the primary selection of the editor. This will remove any secondary cursors.2789* @param selection The new selection2790* @param source Source of the call that caused the selection2791*/2792setSelection(selection: ISelection, source?: string): void;2793/**2794* Set the primary selection of the editor. This will remove any secondary cursors.2795* @param selection The new selection2796* @param source Source of the call that caused the selection2797*/2798setSelection(selection: Selection, source?: string): void;2799/**2800* Set the selections for all the cursors of the editor.2801* Cursors will be removed or added, as necessary.2802* @param selections The new selection2803* @param source Source of the call that caused the selection2804*/2805setSelections(selections: readonly ISelection[], source?: string): void;2806/**2807* Scroll vertically as necessary and reveal lines.2808*/2809revealLines(startLineNumber: number, endLineNumber: number, scrollType?: ScrollType): void;2810/**2811* Scroll vertically as necessary and reveal lines centered vertically.2812*/2813revealLinesInCenter(lineNumber: number, endLineNumber: number, scrollType?: ScrollType): void;2814/**2815* Scroll vertically as necessary and reveal lines centered vertically only if it lies outside the viewport.2816*/2817revealLinesInCenterIfOutsideViewport(lineNumber: number, endLineNumber: number, scrollType?: ScrollType): void;2818/**2819* Scroll vertically as necessary and reveal lines close to the top of the viewport,2820* optimized for viewing a code definition.2821*/2822revealLinesNearTop(lineNumber: number, endLineNumber: number, scrollType?: ScrollType): void;2823/**2824* Scroll vertically or horizontally as necessary and reveal a range.2825*/2826revealRange(range: IRange, scrollType?: ScrollType): void;2827/**2828* Scroll vertically or horizontally as necessary and reveal a range centered vertically.2829*/2830revealRangeInCenter(range: IRange, scrollType?: ScrollType): void;2831/**2832* Scroll vertically or horizontally as necessary and reveal a range at the top of the viewport.2833*/2834revealRangeAtTop(range: IRange, scrollType?: ScrollType): void;2835/**2836* Scroll vertically or horizontally as necessary and reveal a range centered vertically only if it lies outside the viewport.2837*/2838revealRangeInCenterIfOutsideViewport(range: IRange, scrollType?: ScrollType): void;2839/**2840* Scroll vertically or horizontally as necessary and reveal a range close to the top of the viewport,2841* optimized for viewing a code definition.2842*/2843revealRangeNearTop(range: IRange, scrollType?: ScrollType): void;2844/**2845* Scroll vertically or horizontally as necessary and reveal a range close to the top of the viewport,2846* optimized for viewing a code definition. Only if it lies outside the viewport.2847*/2848revealRangeNearTopIfOutsideViewport(range: IRange, scrollType?: ScrollType): void;2849/**2850* Directly trigger a handler or an editor action.2851* @param source The source of the call.2852* @param handlerId The id of the handler or the id of a contribution.2853* @param payload Extra data to be sent to the handler.2854*/2855trigger(source: string | null | undefined, handlerId: string, payload: unknown): void;2856/**2857* Gets the current model attached to this editor.2858*/2859getModel(): IEditorModel | null;2860/**2861* Sets the current model attached to this editor.2862* If the previous model was created by the editor via the value key in the options2863* literal object, it will be destroyed. Otherwise, if the previous model was set2864* via setModel, or the model key in the options literal object, the previous model2865* will not be destroyed.2866* It is safe to call setModel(null) to simply detach the current model from the editor.2867*/2868setModel(model: IEditorModel | null): void;2869/**2870* Create a collection of decorations. All decorations added through this collection2871* will get the ownerId of the editor (meaning they will not show up in other editors).2872* These decorations will be automatically cleared when the editor's model changes.2873*/2874createDecorationsCollection(decorations?: IModelDeltaDecoration[]): IEditorDecorationsCollection;2875}28762877/**2878* A collection of decorations2879*/2880export interface IEditorDecorationsCollection {2881/**2882* An event emitted when decorations change in the editor,2883* but the change is not caused by us setting or clearing the collection.2884*/2885readonly onDidChange: IEvent<IModelDecorationsChangedEvent>;2886/**2887* Get the decorations count.2888*/2889length: number;2890/**2891* Get the range for a decoration.2892*/2893getRange(index: number): Range | null;2894/**2895* Get all ranges for decorations.2896*/2897getRanges(): Range[];2898/**2899* Determine if a decoration is in this collection.2900*/2901has(decoration: IModelDecoration): boolean;2902/**2903* Replace all previous decorations with `newDecorations`.2904*/2905set(newDecorations: readonly IModelDeltaDecoration[]): string[];2906/**2907* Append `newDecorations` to this collection.2908*/2909append(newDecorations: readonly IModelDeltaDecoration[]): string[];2910/**2911* Remove all previous decorations.2912*/2913clear(): void;2914}29152916/**2917* An editor contribution that gets created every time a new editor gets created and gets disposed when the editor gets disposed.2918*/2919export interface IEditorContribution {2920/**2921* Dispose this contribution.2922*/2923dispose(): void;2924/**2925* Store view state.2926*/2927saveViewState?(): unknown;2928/**2929* Restore view state.2930*/2931restoreViewState?(state: unknown): void;2932}29332934/**2935* The type of the `IEditor`.2936*/2937export const EditorType: {2938ICodeEditor: string;2939IDiffEditor: string;2940};29412942/**2943* An event describing that the current language associated with a model has changed.2944*/2945export interface IModelLanguageChangedEvent {2946/**2947* Previous language2948*/2949readonly oldLanguage: string;2950/**2951* New language2952*/2953readonly newLanguage: string;2954/**2955* Source of the call that caused the event.2956*/2957readonly source: string;2958}29592960/**2961* An event describing that the language configuration associated with a model has changed.2962*/2963export interface IModelLanguageConfigurationChangedEvent {2964}29652966/**2967* An event describing a change in the text of a model.2968*/2969export interface IModelContentChangedEvent {2970/**2971* The changes are ordered from the end of the document to the beginning, so they should be safe to apply in sequence.2972*/2973readonly changes: IModelContentChange[];2974/**2975* The (new) end-of-line character.2976*/2977readonly eol: string;2978/**2979* The new version id the model has transitioned to.2980*/2981readonly versionId: number;2982/**2983* Flag that indicates that this event was generated while undoing.2984*/2985readonly isUndoing: boolean;2986/**2987* Flag that indicates that this event was generated while redoing.2988*/2989readonly isRedoing: boolean;2990/**2991* Flag that indicates that all decorations were lost with this edit.2992* The model has been reset to a new value.2993*/2994readonly isFlush: boolean;2995/**2996* Flag that indicates that this event describes an eol change.2997*/2998readonly isEolChange: boolean;2999/**3000* The sum of these lengths equals changes.length.3001* The length of this array must equal the length of detailedReasons.3002*/3003readonly detailedReasonsChangeLengths: number[];3004}30053006export interface ISerializedModelContentChangedEvent {3007/**3008* The changes are ordered from the end of the document to the beginning, so they should be safe to apply in sequence.3009*/3010readonly changes: IModelContentChange[];3011/**3012* The (new) end-of-line character.3013*/3014readonly eol: string;3015/**3016* The new version id the model has transitioned to.3017*/3018readonly versionId: number;3019/**3020* Flag that indicates that this event was generated while undoing.3021*/3022readonly isUndoing: boolean;3023/**3024* Flag that indicates that this event was generated while redoing.3025*/3026readonly isRedoing: boolean;3027/**3028* Flag that indicates that all decorations were lost with this edit.3029* The model has been reset to a new value.3030*/3031readonly isFlush: boolean;3032/**3033* Flag that indicates that this event describes an eol change.3034*/3035readonly isEolChange: boolean;3036}30373038/**3039* An event describing that model decorations have changed.3040*/3041export interface IModelDecorationsChangedEvent {3042readonly affectsMinimap: boolean;3043readonly affectsOverviewRuler: boolean;3044readonly affectsGlyphMargin: boolean;3045readonly affectsLineNumber: boolean;3046}30473048export interface IModelOptionsChangedEvent {3049readonly tabSize: boolean;3050readonly indentSize: boolean;3051readonly insertSpaces: boolean;3052readonly trimAutoWhitespace: boolean;3053}30543055export interface IModelContentChange {3056/**3057* The old range that got replaced.3058*/3059readonly range: IRange;3060/**3061* The offset of the range that got replaced.3062*/3063readonly rangeOffset: number;3064/**3065* The length of the range that got replaced.3066*/3067readonly rangeLength: number;3068/**3069* The new text for the range.3070*/3071readonly text: string;3072}30733074/**3075* Describes the reason the cursor has changed its position.3076*/3077export enum CursorChangeReason {3078/**3079* Unknown or not set.3080*/3081NotSet = 0,3082/**3083* A `model.setValue()` was called.3084*/3085ContentFlush = 1,3086/**3087* The `model` has been changed outside of this cursor and the cursor recovers its position from associated markers.3088*/3089RecoverFromMarkers = 2,3090/**3091* There was an explicit user gesture.3092*/3093Explicit = 3,3094/**3095* There was a Paste.3096*/3097Paste = 4,3098/**3099* There was an Undo.3100*/3101Undo = 5,3102/**3103* There was a Redo.3104*/3105Redo = 63106}31073108/**3109* An event describing that the cursor position has changed.3110*/3111export interface ICursorPositionChangedEvent {3112/**3113* Primary cursor's position.3114*/3115readonly position: Position;3116/**3117* Secondary cursors' position.3118*/3119readonly secondaryPositions: Position[];3120/**3121* Reason.3122*/3123readonly reason: CursorChangeReason;3124/**3125* Source of the call that caused the event.3126*/3127readonly source: string;3128}31293130/**3131* An event describing that the cursor selection has changed.3132*/3133export interface ICursorSelectionChangedEvent {3134/**3135* The primary selection.3136*/3137readonly selection: Selection;3138/**3139* The secondary selections.3140*/3141readonly secondarySelections: Selection[];3142/**3143* The model version id.3144*/3145readonly modelVersionId: number;3146/**3147* The old selections.3148*/3149readonly oldSelections: Selection[] | null;3150/**3151* The model version id the that `oldSelections` refer to.3152*/3153readonly oldModelVersionId: number;3154/**3155* Source of the call that caused the event.3156*/3157readonly source: string;3158/**3159* Reason.3160*/3161readonly reason: CursorChangeReason;3162}31633164export enum AccessibilitySupport {3165/**3166* This should be the browser case where it is not known if a screen reader is attached or no.3167*/3168Unknown = 0,3169Disabled = 1,3170Enabled = 23171}31723173/**3174* Configuration options for auto closing quotes and brackets3175*/3176export type EditorAutoClosingStrategy = 'always' | 'languageDefined' | 'beforeWhitespace' | 'never';31773178/**3179* Configuration options for auto wrapping quotes and brackets3180*/3181export type EditorAutoSurroundStrategy = 'languageDefined' | 'quotes' | 'brackets' | 'never';31823183/**3184* Configuration options for typing over closing quotes or brackets3185*/3186export type EditorAutoClosingEditStrategy = 'always' | 'auto' | 'never';31873188/**3189* Configuration options for auto indentation in the editor3190*/3191export enum EditorAutoIndentStrategy {3192None = 0,3193Keep = 1,3194Brackets = 2,3195Advanced = 3,3196Full = 43197}31983199/**3200* Configuration options for the editor.3201*/3202export interface IEditorOptions {3203/**3204* This editor is used inside a diff editor.3205*/3206inDiffEditor?: boolean;3207/**3208* This editor is allowed to use variable line heights.3209*/3210allowVariableLineHeights?: boolean;3211/**3212* This editor is allowed to use variable font-sizes and font-families3213*/3214allowVariableFonts?: boolean;3215/**3216* This editor is allowed to use variable font-sizes and font-families in accessibility mode3217*/3218allowVariableFontsInAccessibilityMode?: boolean;3219/**3220* The aria label for the editor's textarea (when it is focused).3221*/3222ariaLabel?: string;3223/**3224* Whether the aria-required attribute should be set on the editors textarea.3225*/3226ariaRequired?: boolean;3227/**3228* Control whether a screen reader announces inline suggestion content immediately.3229*/3230screenReaderAnnounceInlineSuggestion?: boolean;3231/**3232* The `tabindex` property of the editor's textarea3233*/3234tabIndex?: number;3235/**3236* Render vertical lines at the specified columns.3237* Defaults to empty array.3238*/3239rulers?: (number | IRulerOption)[];3240/**3241* Locales used for segmenting lines into words when doing word related navigations or operations.3242*3243* Specify the BCP 47 language tag of the word you wish to recognize (e.g., ja, zh-CN, zh-Hant-TW, etc.).3244* Defaults to empty array3245*/3246wordSegmenterLocales?: string | string[];3247/**3248* A string containing the word separators used when doing word navigation.3249* Defaults to `~!@#$%^&*()-=+[{]}\\|;:\'",.<>/?3250*/3251wordSeparators?: string;3252/**3253* Enable Linux primary clipboard.3254* Defaults to true.3255*/3256selectionClipboard?: boolean;3257/**3258* Control the rendering of line numbers.3259* If it is a function, it will be invoked when rendering a line number and the return value will be rendered.3260* Otherwise, if it is a truthy, line numbers will be rendered normally (equivalent of using an identity function).3261* Otherwise, line numbers will not be rendered.3262* Defaults to `on`.3263*/3264lineNumbers?: LineNumbersType;3265/**3266* Controls the minimal number of visible leading and trailing lines surrounding the cursor.3267* Defaults to 0.3268*/3269cursorSurroundingLines?: number;3270/**3271* Controls when `cursorSurroundingLines` should be enforced3272* Defaults to `default`, `cursorSurroundingLines` is not enforced when cursor position is changed3273* by mouse.3274*/3275cursorSurroundingLinesStyle?: 'default' | 'all';3276/**3277* Render last line number when the file ends with a newline.3278* Defaults to 'on' for Windows and macOS and 'dimmed' for Linux.3279*/3280renderFinalNewline?: 'on' | 'off' | 'dimmed';3281/**3282* Remove unusual line terminators like LINE SEPARATOR (LS), PARAGRAPH SEPARATOR (PS).3283* Defaults to 'prompt'.3284*/3285unusualLineTerminators?: 'auto' | 'off' | 'prompt';3286/**3287* Should the corresponding line be selected when clicking on the line number?3288* Defaults to true.3289*/3290selectOnLineNumbers?: boolean;3291/**3292* Control the width of line numbers, by reserving horizontal space for rendering at least an amount of digits.3293* Defaults to 5.3294*/3295lineNumbersMinChars?: number;3296/**3297* Enable the rendering of the glyph margin.3298* Defaults to true in vscode and to false in monaco-editor.3299*/3300glyphMargin?: boolean;3301/**3302* The width reserved for line decorations (in px).3303* Line decorations are placed between line numbers and the editor content.3304* You can pass in a string in the format floating point followed by "ch". e.g. 1.3ch.3305* Defaults to 10.3306*/3307lineDecorationsWidth?: number | string;3308/**3309* When revealing the cursor, a virtual padding (px) is added to the cursor, turning it into a rectangle.3310* This virtual padding ensures that the cursor gets revealed before hitting the edge of the viewport.3311* Defaults to 30 (px).3312*/3313revealHorizontalRightPadding?: number;3314/**3315* Render the editor selection with rounded borders.3316* Defaults to true.3317*/3318roundedSelection?: boolean;3319/**3320* Class name to be added to the editor.3321*/3322extraEditorClassName?: string;3323/**3324* Should the editor be read only. See also `domReadOnly`.3325* Defaults to false.3326*/3327readOnly?: boolean;3328/**3329* The message to display when the editor is readonly.3330*/3331readOnlyMessage?: IMarkdownString;3332/**3333* Should the textarea used for input use the DOM `readonly` attribute.3334* Defaults to false.3335*/3336domReadOnly?: boolean;3337/**3338* Enable linked editing.3339* Defaults to false.3340*/3341linkedEditing?: boolean;3342/**3343* deprecated, use linkedEditing instead3344*/3345renameOnType?: boolean;3346/**3347* Should the editor render validation decorations.3348* Defaults to editable.3349*/3350renderValidationDecorations?: 'editable' | 'on' | 'off';3351/**3352* Control the behavior and rendering of the scrollbars.3353*/3354scrollbar?: IEditorScrollbarOptions;3355/**3356* Control the behavior of sticky scroll options3357*/3358stickyScroll?: IEditorStickyScrollOptions;3359/**3360* Control the behavior and rendering of the minimap.3361*/3362minimap?: IEditorMinimapOptions;3363/**3364* Control the behavior of the find widget.3365*/3366find?: IEditorFindOptions;3367/**3368* Display overflow widgets as `fixed`.3369* Defaults to `false`.3370*/3371fixedOverflowWidgets?: boolean;3372/**3373* Allow content widgets and overflow widgets to overflow the editor viewport.3374* Defaults to `true`.3375*/3376allowOverflow?: boolean;3377/**3378* The number of vertical lanes the overview ruler should render.3379* Defaults to 3.3380*/3381overviewRulerLanes?: number;3382/**3383* Controls if a border should be drawn around the overview ruler.3384* Defaults to `true`.3385*/3386overviewRulerBorder?: boolean;3387/**3388* Control the cursor animation style, possible values are 'blink', 'smooth', 'phase', 'expand' and 'solid'.3389* Defaults to 'blink'.3390*/3391cursorBlinking?: 'blink' | 'smooth' | 'phase' | 'expand' | 'solid';3392/**3393* Zoom the font in the editor when using the mouse wheel in combination with holding Ctrl.3394* Defaults to false.3395*/3396mouseWheelZoom?: boolean;3397/**3398* Control the mouse pointer style, either 'text' or 'default' or 'copy'3399* Defaults to 'text'3400*/3401mouseStyle?: 'text' | 'default' | 'copy';3402/**3403* Enable smooth caret animation.3404* Defaults to 'off'.3405*/3406cursorSmoothCaretAnimation?: 'off' | 'explicit' | 'on';3407/**3408* Control the cursor style in insert mode.3409* Defaults to 'line'.3410*/3411cursorStyle?: 'line' | 'block' | 'underline' | 'line-thin' | 'block-outline' | 'underline-thin';3412/**3413* Control the cursor style in overtype mode.3414* Defaults to 'block'.3415*/3416overtypeCursorStyle?: 'line' | 'block' | 'underline' | 'line-thin' | 'block-outline' | 'underline-thin';3417/**3418* Controls whether paste in overtype mode should overwrite or insert.3419*/3420overtypeOnPaste?: boolean;3421/**3422* Control the width of the cursor when cursorStyle is set to 'line'3423*/3424cursorWidth?: number;3425/**3426* Control the height of the cursor when cursorStyle is set to 'line'3427*/3428cursorHeight?: number;3429/**3430* Enable font ligatures.3431* Defaults to false.3432*/3433fontLigatures?: boolean | string;3434/**3435* Enable font variations.3436* Defaults to false.3437*/3438fontVariations?: boolean | string;3439/**3440* Controls whether to use default color decorations or not using the default document color provider3441*/3442defaultColorDecorators?: 'auto' | 'always' | 'never';3443/**3444* Disable the use of `transform: translate3d(0px, 0px, 0px)` for the editor margin and lines layers.3445* The usage of `transform: translate3d(0px, 0px, 0px)` acts as a hint for browsers to create an extra layer.3446* Defaults to false.3447*/3448disableLayerHinting?: boolean;3449/**3450* Disable the optimizations for monospace fonts.3451* Defaults to false.3452*/3453disableMonospaceOptimizations?: boolean;3454/**3455* Should the cursor be hidden in the overview ruler.3456* Defaults to false.3457*/3458hideCursorInOverviewRuler?: boolean;3459/**3460* Enable that scrolling can go one screen size after the last line.3461* Defaults to true.3462*/3463scrollBeyondLastLine?: boolean;3464/**3465* Scroll editor on middle click3466*/3467scrollOnMiddleClick?: boolean;3468/**3469* Enable that scrolling can go beyond the last column by a number of columns.3470* Defaults to 5.3471*/3472scrollBeyondLastColumn?: number;3473/**3474* Enable that the editor animates scrolling to a position.3475* Defaults to false.3476*/3477smoothScrolling?: boolean;3478/**3479* Enable that the editor will install a ResizeObserver to check if its container dom node size has changed.3480* Defaults to false.3481*/3482automaticLayout?: boolean;3483/**3484* Control the wrapping of the editor.3485* When `wordWrap` = "off", the lines will never wrap.3486* When `wordWrap` = "on", the lines will wrap at the viewport width.3487* When `wordWrap` = "wordWrapColumn", the lines will wrap at `wordWrapColumn`.3488* When `wordWrap` = "bounded", the lines will wrap at min(viewport width, wordWrapColumn).3489* Defaults to "off".3490*/3491wordWrap?: 'off' | 'on' | 'wordWrapColumn' | 'bounded';3492/**3493* Override the `wordWrap` setting.3494*/3495wordWrapOverride1?: 'off' | 'on' | 'inherit';3496/**3497* Override the `wordWrapOverride1` setting.3498*/3499wordWrapOverride2?: 'off' | 'on' | 'inherit';3500/**3501* Control the wrapping of the editor.3502* When `wordWrap` = "off", the lines will never wrap.3503* When `wordWrap` = "on", the lines will wrap at the viewport width.3504* When `wordWrap` = "wordWrapColumn", the lines will wrap at `wordWrapColumn`.3505* When `wordWrap` = "bounded", the lines will wrap at min(viewport width, wordWrapColumn).3506* Defaults to 80.3507*/3508wordWrapColumn?: number;3509/**3510* Control indentation of wrapped lines. Can be: 'none', 'same', 'indent' or 'deepIndent'.3511* Defaults to 'same' in vscode and to 'none' in monaco-editor.3512*/3513wrappingIndent?: 'none' | 'same' | 'indent' | 'deepIndent';3514/**3515* Controls the wrapping strategy to use.3516* Defaults to 'simple'.3517*/3518wrappingStrategy?: 'simple' | 'advanced';3519/**3520* Create a softwrap on every quoted "\n" literal.3521* Defaults to false.3522*/3523wrapOnEscapedLineFeeds?: boolean;3524/**3525* Configure word wrapping characters. A break will be introduced before these characters.3526*/3527wordWrapBreakBeforeCharacters?: string;3528/**3529* Configure word wrapping characters. A break will be introduced after these characters.3530*/3531wordWrapBreakAfterCharacters?: string;3532/**3533* Sets whether line breaks appear wherever the text would otherwise overflow its content box.3534* When wordBreak = 'normal', Use the default line break rule.3535* When wordBreak = 'keepAll', Word breaks should not be used for Chinese/Japanese/Korean (CJK) text. Non-CJK text behavior is the same as for normal.3536*/3537wordBreak?: 'normal' | 'keepAll';3538/**3539* Performance guard: Stop rendering a line after x characters.3540* Defaults to 10000.3541* Use -1 to never stop rendering3542*/3543stopRenderingLineAfter?: number;3544/**3545* Configure the editor's hover.3546*/3547hover?: IEditorHoverOptions;3548/**3549* Enable detecting links and making them clickable.3550* Defaults to true.3551*/3552links?: boolean;3553/**3554* Enable inline color decorators and color picker rendering.3555*/3556colorDecorators?: boolean;3557/**3558* Controls what is the condition to spawn a color picker from a color dectorator3559*/3560colorDecoratorsActivatedOn?: 'clickAndHover' | 'click' | 'hover';3561/**3562* Controls the max number of color decorators that can be rendered in an editor at once.3563*/3564colorDecoratorsLimit?: number;3565/**3566* Control the behaviour of comments in the editor.3567*/3568comments?: IEditorCommentsOptions;3569/**3570* Enable custom contextmenu.3571* Defaults to true.3572*/3573contextmenu?: boolean;3574/**3575* A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.3576* Defaults to 1.3577*/3578mouseWheelScrollSensitivity?: number;3579/**3580* FastScrolling mulitplier speed when pressing `Alt`3581* Defaults to 5.3582*/3583fastScrollSensitivity?: number;3584/**3585* Enable that the editor scrolls only the predominant axis. Prevents horizontal drift when scrolling vertically on a trackpad.3586* Defaults to true.3587*/3588scrollPredominantAxis?: boolean;3589/**3590* Make scrolling inertial - mostly useful with touchpad on linux.3591*/3592inertialScroll?: boolean;3593/**3594* Enable that the selection with the mouse and keys is doing column selection.3595* Defaults to false.3596*/3597columnSelection?: boolean;3598/**3599* The modifier to be used to add multiple cursors with the mouse.3600* Defaults to 'alt'3601*/3602multiCursorModifier?: 'ctrlCmd' | 'alt';3603/**3604* Merge overlapping selections.3605* Defaults to true3606*/3607multiCursorMergeOverlapping?: boolean;3608/**3609* Configure the behaviour when pasting a text with the line count equal to the cursor count.3610* Defaults to 'spread'.3611*/3612multiCursorPaste?: 'spread' | 'full';3613/**3614* Controls the max number of text cursors that can be in an active editor at once.3615*/3616multiCursorLimit?: number;3617/**3618* Enables middle mouse button to open links and Go To Definition3619*/3620mouseMiddleClickAction?: MouseMiddleClickAction;3621/**3622* Configure the editor's accessibility support.3623* Defaults to 'auto'. It is best to leave this to 'auto'.3624*/3625accessibilitySupport?: 'auto' | 'off' | 'on';3626/**3627* Controls the number of lines in the editor that can be read out by a screen reader3628*/3629accessibilityPageSize?: number;3630/**3631* Suggest options.3632*/3633suggest?: ISuggestOptions;3634inlineSuggest?: IInlineSuggestOptions;3635/**3636* Smart select options.3637*/3638smartSelect?: ISmartSelectOptions;3639/**3640*3641*/3642gotoLocation?: IGotoLocationOptions;3643/**3644* Enable quick suggestions (shadow suggestions)3645* Defaults to true.3646*/3647quickSuggestions?: boolean | IQuickSuggestionsOptions;3648/**3649* Quick suggestions show delay (in ms)3650* Defaults to 10 (ms)3651*/3652quickSuggestionsDelay?: number;3653/**3654* Controls the spacing around the editor.3655*/3656padding?: IEditorPaddingOptions;3657/**3658* Parameter hint options.3659*/3660parameterHints?: IEditorParameterHintOptions;3661/**3662* Options for auto closing brackets.3663* Defaults to language defined behavior.3664*/3665autoClosingBrackets?: EditorAutoClosingStrategy;3666/**3667* Options for auto closing comments.3668* Defaults to language defined behavior.3669*/3670autoClosingComments?: EditorAutoClosingStrategy;3671/**3672* Options for auto closing quotes.3673* Defaults to language defined behavior.3674*/3675autoClosingQuotes?: EditorAutoClosingStrategy;3676/**3677* Options for pressing backspace near quotes or bracket pairs.3678*/3679autoClosingDelete?: EditorAutoClosingEditStrategy;3680/**3681* Options for typing over closing quotes or brackets.3682*/3683autoClosingOvertype?: EditorAutoClosingEditStrategy;3684/**3685* Options for auto surrounding.3686* Defaults to always allowing auto surrounding.3687*/3688autoSurround?: EditorAutoSurroundStrategy;3689/**3690* Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.3691* Defaults to advanced.3692*/3693autoIndent?: 'none' | 'keep' | 'brackets' | 'advanced' | 'full';3694/**3695* Boolean which controls whether to autoindent on paste3696*/3697autoIndentOnPaste?: boolean;3698/**3699* Boolean which controls whether to autoindent on paste within a string when autoIndentOnPaste is enabled.3700*/3701autoIndentOnPasteWithinString?: boolean;3702/**3703* Emulate selection behaviour of tab characters when using spaces for indentation.3704* This means selection will stick to tab stops.3705*/3706stickyTabStops?: boolean;3707/**3708* Enable format on type.3709* Defaults to false.3710*/3711formatOnType?: boolean;3712/**3713* Enable format on paste.3714* Defaults to false.3715*/3716formatOnPaste?: boolean;3717/**3718* Controls if the editor should allow to move selections via drag and drop.3719* Defaults to false.3720*/3721dragAndDrop?: boolean;3722/**3723* Enable the suggestion box to pop-up on trigger characters.3724* Defaults to true.3725*/3726suggestOnTriggerCharacters?: boolean;3727/**3728* Accept suggestions on ENTER.3729* Defaults to 'on'.3730*/3731acceptSuggestionOnEnter?: 'on' | 'smart' | 'off';3732/**3733* Accept suggestions on provider defined characters.3734* Defaults to true.3735*/3736acceptSuggestionOnCommitCharacter?: boolean;3737/**3738* Enable snippet suggestions. Default to 'true'.3739*/3740snippetSuggestions?: 'top' | 'bottom' | 'inline' | 'none';3741/**3742* Copying without a selection copies the current line.3743*/3744emptySelectionClipboard?: boolean;3745/**3746* Syntax highlighting is copied.3747*/3748copyWithSyntaxHighlighting?: boolean;3749/**3750* The history mode for suggestions.3751*/3752suggestSelection?: 'first' | 'recentlyUsed' | 'recentlyUsedByPrefix';3753/**3754* The font size for the suggest widget.3755* Defaults to the editor font size.3756*/3757suggestFontSize?: number;3758/**3759* The line height for the suggest widget.3760* Defaults to the editor line height.3761*/3762suggestLineHeight?: number;3763/**3764* Enable tab completion.3765*/3766tabCompletion?: 'on' | 'off' | 'onlySnippets';3767/**3768* Enable selection highlight.3769* Defaults to true.3770*/3771selectionHighlight?: boolean;3772/**3773* Enable selection highlight for multiline selections.3774* Defaults to false.3775*/3776selectionHighlightMultiline?: boolean;3777/**3778* Maximum length (in characters) for selection highlights.3779* Set to 0 to have an unlimited length.3780*/3781selectionHighlightMaxLength?: number;3782/**3783* Enable semantic occurrences highlight.3784* Defaults to 'singleFile'.3785* 'off' disables occurrence highlighting3786* 'singleFile' triggers occurrence highlighting in the current document3787* 'multiFile' triggers occurrence highlighting across valid open documents3788*/3789occurrencesHighlight?: 'off' | 'singleFile' | 'multiFile';3790/**3791* Controls delay for occurrences highlighting3792* Defaults to 250.3793* Minimum value is 03794* Maximum value is 20003795*/3796occurrencesHighlightDelay?: number;3797/**3798* Show code lens3799* Defaults to true.3800*/3801codeLens?: boolean;3802/**3803* Code lens font family. Defaults to editor font family.3804*/3805codeLensFontFamily?: string;3806/**3807* Code lens font size. Default to 90% of the editor font size3808*/3809codeLensFontSize?: number;3810/**3811* Control the behavior and rendering of the code action lightbulb.3812*/3813lightbulb?: IEditorLightbulbOptions;3814/**3815* Timeout for running code actions on save.3816*/3817codeActionsOnSaveTimeout?: number;3818/**3819* Enable code folding.3820* Defaults to true.3821*/3822folding?: boolean;3823/**3824* Selects the folding strategy. 'auto' uses the strategies contributed for the current document, 'indentation' uses the indentation based folding strategy.3825* Defaults to 'auto'.3826*/3827foldingStrategy?: 'auto' | 'indentation';3828/**3829* Enable highlight for folded regions.3830* Defaults to true.3831*/3832foldingHighlight?: boolean;3833/**3834* Auto fold imports folding regions.3835* Defaults to true.3836*/3837foldingImportsByDefault?: boolean;3838/**3839* Maximum number of foldable regions.3840* Defaults to 5000.3841*/3842foldingMaximumRegions?: number;3843/**3844* Controls whether the fold actions in the gutter stay always visible or hide unless the mouse is over the gutter.3845* Defaults to 'mouseover'.3846*/3847showFoldingControls?: 'always' | 'never' | 'mouseover';3848/**3849* Controls whether clicking on the empty content after a folded line will unfold the line.3850* Defaults to false.3851*/3852unfoldOnClickAfterEndOfLine?: boolean;3853/**3854* Enable highlighting of matching brackets.3855* Defaults to 'always'.3856*/3857matchBrackets?: 'never' | 'near' | 'always';3858/**3859* Enable experimental rendering using WebGPU.3860* Defaults to 'off'.3861*/3862experimentalGpuAcceleration?: 'on' | 'off';3863/**3864* Enable experimental whitespace rendering.3865* Defaults to 'svg'.3866*/3867experimentalWhitespaceRendering?: 'svg' | 'font' | 'off';3868/**3869* Enable rendering of whitespace.3870* Defaults to 'selection'.3871*/3872renderWhitespace?: 'none' | 'boundary' | 'selection' | 'trailing' | 'all';3873/**3874* Enable rendering of control characters.3875* Defaults to true.3876*/3877renderControlCharacters?: boolean;3878/**3879* Enable rendering of current line highlight.3880* Defaults to all.3881*/3882renderLineHighlight?: 'none' | 'gutter' | 'line' | 'all';3883/**3884* Control if the current line highlight should be rendered only the editor is focused.3885* Defaults to false.3886*/3887renderLineHighlightOnlyWhenFocus?: boolean;3888/**3889* Inserting and deleting whitespace follows tab stops.3890*/3891useTabStops?: boolean;3892/**3893* Controls whether the editor should automatically remove indentation whitespace when joining lines with Delete.3894* Defaults to false.3895*/3896trimWhitespaceOnDelete?: boolean;3897/**3898* The font family3899*/3900fontFamily?: string;3901/**3902* The font weight3903*/3904fontWeight?: string;3905/**3906* The font size3907*/3908fontSize?: number;3909/**3910* The line height3911*/3912lineHeight?: number;3913/**3914* The letter spacing3915*/3916letterSpacing?: number;3917/**3918* Controls fading out of unused variables.3919*/3920showUnused?: boolean;3921/**3922* Controls whether to focus the inline editor in the peek widget by default.3923* Defaults to false.3924*/3925peekWidgetDefaultFocus?: 'tree' | 'editor';3926/**3927* Sets a placeholder for the editor.3928* If set, the placeholder is shown if the editor is empty.3929*/3930placeholder?: string | undefined;3931/**3932* Controls whether the definition link opens element in the peek widget.3933* Defaults to false.3934*/3935definitionLinkOpensInPeek?: boolean;3936/**3937* Controls strikethrough deprecated variables.3938*/3939showDeprecated?: boolean;3940/**3941* Controls whether suggestions allow matches in the middle of the word instead of only at the beginning3942*/3943matchOnWordStartOnly?: boolean;3944/**3945* Control the behavior and rendering of the inline hints.3946*/3947inlayHints?: IEditorInlayHintsOptions;3948/**3949* Control if the editor should use shadow DOM.3950*/3951useShadowDOM?: boolean;3952/**3953* Controls the behavior of editor guides.3954*/3955guides?: IGuidesOptions;3956/**3957* Controls the behavior of the unicode highlight feature3958* (by default, ambiguous and invisible characters are highlighted).3959*/3960unicodeHighlight?: IUnicodeHighlightOptions;3961/**3962* Configures bracket pair colorization (disabled by default).3963*/3964bracketPairColorization?: IBracketPairColorizationOptions;3965/**3966* Controls dropping into the editor from an external source.3967*3968* When enabled, this shows a preview of the drop location and triggers an `onDropIntoEditor` event.3969*/3970dropIntoEditor?: IDropIntoEditorOptions;3971/**3972* Sets whether the new experimental edit context should be used instead of the text area.3973*/3974editContext?: boolean;3975/**3976* Controls whether to render rich HTML screen reader content when the EditContext is enabled3977*/3978renderRichScreenReaderContent?: boolean;3979/**3980* Controls support for changing how content is pasted into the editor.3981*/3982pasteAs?: IPasteAsOptions;3983/**3984* Controls whether the editor / terminal receives tabs or defers them to the workbench for navigation.3985*/3986tabFocusMode?: boolean;3987/**3988* Controls whether the accessibility hint should be provided to screen reader users when an inline completion is shown.3989*/3990inlineCompletionsAccessibilityVerbose?: boolean;3991}39923993export interface IDiffEditorBaseOptions {3994/**3995* Allow the user to resize the diff editor split view.3996* Defaults to true.3997*/3998enableSplitViewResizing?: boolean;3999/**4000* The default ratio when rendering side-by-side editors.4001* Must be a number between 0 and 1, min sizes apply.4002* Defaults to 0.54003*/4004splitViewDefaultRatio?: number;4005/**4006* Render the differences in two side-by-side editors.4007* Defaults to true.4008*/4009renderSideBySide?: boolean;4010/**4011* When `renderSideBySide` is enabled, `useInlineViewWhenSpaceIsLimited` is set,4012* and the diff editor has a width less than `renderSideBySideInlineBreakpoint`, the inline view is used.4013*/4014renderSideBySideInlineBreakpoint?: number | undefined;4015/**4016* When `renderSideBySide` is enabled, `useInlineViewWhenSpaceIsLimited` is set,4017* and the diff editor has a width less than `renderSideBySideInlineBreakpoint`, the inline view is used.4018*/4019useInlineViewWhenSpaceIsLimited?: boolean;4020/**4021* If set, the diff editor is optimized for small views.4022* Defaults to `false`.4023*/4024compactMode?: boolean;4025/**4026* Timeout in milliseconds after which diff computation is cancelled.4027* Defaults to 5000.4028*/4029maxComputationTime?: number;4030/**4031* Maximum supported file size in MB.4032* Defaults to 50.4033*/4034maxFileSize?: number;4035/**4036* Compute the diff by ignoring leading/trailing whitespace4037* Defaults to true.4038*/4039ignoreTrimWhitespace?: boolean;4040/**4041* Render +/- indicators for added/deleted changes.4042* Defaults to true.4043*/4044renderIndicators?: boolean;4045/**4046* Shows icons in the glyph margin to revert changes.4047* Default to true.4048*/4049renderMarginRevertIcon?: boolean;4050/**4051* Indicates if the gutter menu should be rendered.4052*/4053renderGutterMenu?: boolean;4054/**4055* Original model should be editable?4056* Defaults to false.4057*/4058originalEditable?: boolean;4059/**4060* Should the diff editor enable code lens?4061* Defaults to false.4062*/4063diffCodeLens?: boolean;4064/**4065* Is the diff editor should render overview ruler4066* Defaults to true4067*/4068renderOverviewRuler?: boolean;4069/**4070* Control the wrapping of the diff editor.4071*/4072diffWordWrap?: 'off' | 'on' | 'inherit';4073/**4074* Diff Algorithm4075*/4076diffAlgorithm?: 'legacy' | 'advanced';4077/**4078* Whether the diff editor aria label should be verbose.4079*/4080accessibilityVerbose?: boolean;4081experimental?: {4082/**4083* Defaults to false.4084*/4085showMoves?: boolean;4086showEmptyDecorations?: boolean;4087/**4088* Only applies when `renderSideBySide` is set to false.4089*/4090useTrueInlineView?: boolean;4091};4092/**4093* Is the diff editor inside another editor4094* Defaults to false4095*/4096isInEmbeddedEditor?: boolean;4097/**4098* If the diff editor should only show the difference review mode.4099*/4100onlyShowAccessibleDiffViewer?: boolean;4101hideUnchangedRegions?: {4102enabled?: boolean;4103revealLineCount?: number;4104minimumLineCount?: number;4105contextLineCount?: number;4106};4107}41084109/**4110* Configuration options for the diff editor.4111*/4112export interface IDiffEditorOptions extends IEditorOptions, IDiffEditorBaseOptions {4113}41144115/**4116* An event describing that the configuration of the editor has changed.4117*/4118export class ConfigurationChangedEvent {4119hasChanged(id: EditorOption): boolean;4120}41214122/**4123* All computed editor options.4124*/4125export interface IComputedEditorOptions {4126get<T extends EditorOption>(id: T): FindComputedEditorOptionValueById<T>;4127}41284129export interface IEditorOption<K extends EditorOption, V> {4130readonly id: K;4131readonly name: string;4132defaultValue: V;4133/**4134* Might modify `value`.4135*/4136applyUpdate(value: V | undefined, update: V): ApplyUpdateResult<V>;4137}41384139export class ApplyUpdateResult<T> {4140readonly newValue: T;4141readonly didChange: boolean;4142constructor(newValue: T, didChange: boolean);4143}41444145/**4146* Configuration options for editor comments4147*/4148export interface IEditorCommentsOptions {4149/**4150* Insert a space after the line comment token and inside the block comments tokens.4151* Defaults to true.4152*/4153insertSpace?: boolean;4154/**4155* Ignore empty lines when inserting line comments.4156* Defaults to true.4157*/4158ignoreEmptyLines?: boolean;4159}41604161/**4162* The kind of animation in which the editor's cursor should be rendered.4163*/4164export enum TextEditorCursorBlinkingStyle {4165/**4166* Hidden4167*/4168Hidden = 0,4169/**4170* Blinking4171*/4172Blink = 1,4173/**4174* Blinking with smooth fading4175*/4176Smooth = 2,4177/**4178* Blinking with prolonged filled state and smooth fading4179*/4180Phase = 3,4181/**4182* Expand collapse animation on the y axis4183*/4184Expand = 4,4185/**4186* No-Blinking4187*/4188Solid = 54189}41904191/**4192* The style in which the editor's cursor should be rendered.4193*/4194export enum TextEditorCursorStyle {4195/**4196* As a vertical line (sitting between two characters).4197*/4198Line = 1,4199/**4200* As a block (sitting on top of a character).4201*/4202Block = 2,4203/**4204* As a horizontal line (sitting under a character).4205*/4206Underline = 3,4207/**4208* As a thin vertical line (sitting between two characters).4209*/4210LineThin = 4,4211/**4212* As an outlined block (sitting on top of a character).4213*/4214BlockOutline = 5,4215/**4216* As a thin horizontal line (sitting under a character).4217*/4218UnderlineThin = 64219}42204221/**4222* Configuration options for editor find widget4223*/4224export interface IEditorFindOptions {4225/**4226* Controls whether the cursor should move to find matches while typing.4227*/4228cursorMoveOnType?: boolean;4229/**4230* Controls whether the find widget should search as you type.4231*/4232findOnType?: boolean;4233/**4234* Controls if we seed search string in the Find Widget with editor selection.4235*/4236seedSearchStringFromSelection?: 'never' | 'always' | 'selection';4237/**4238* Controls if Find in Selection flag is turned on in the editor.4239*/4240autoFindInSelection?: 'never' | 'always' | 'multiline';4241addExtraSpaceOnTop?: boolean;4242/**4243* Controls whether the search result and diff result automatically restarts from the beginning (or the end) when no further matches can be found4244*/4245loop?: boolean;4246}42474248export type GoToLocationValues = 'peek' | 'gotoAndPeek' | 'goto';42494250/**4251* Configuration options for go to location4252*/4253export interface IGotoLocationOptions {4254multiple?: GoToLocationValues;4255multipleDefinitions?: GoToLocationValues;4256multipleTypeDefinitions?: GoToLocationValues;4257multipleDeclarations?: GoToLocationValues;4258multipleImplementations?: GoToLocationValues;4259multipleReferences?: GoToLocationValues;4260multipleTests?: GoToLocationValues;4261alternativeDefinitionCommand?: string;4262alternativeTypeDefinitionCommand?: string;4263alternativeDeclarationCommand?: string;4264alternativeImplementationCommand?: string;4265alternativeReferenceCommand?: string;4266alternativeTestsCommand?: string;4267}42684269/**4270* Configuration options for editor hover4271*/4272export interface IEditorHoverOptions {4273/**4274* Enable the hover.4275* Defaults to 'on'.4276*/4277enabled?: 'on' | 'off' | 'onKeyboardModifier';4278/**4279* Delay for showing the hover.4280* Defaults to 300.4281*/4282delay?: number;4283/**4284* Is the hover sticky such that it can be clicked and its contents selected?4285* Defaults to true.4286*/4287sticky?: boolean;4288/**4289* Controls how long the hover is visible after you hovered out of it.4290* Require sticky setting to be true.4291*/4292hidingDelay?: number;4293/**4294* Should the hover be shown above the line if possible?4295* Defaults to false.4296*/4297above?: boolean;4298}42994300/**4301* A description for the overview ruler position.4302*/4303export interface OverviewRulerPosition {4304/**4305* Width of the overview ruler4306*/4307readonly width: number;4308/**4309* Height of the overview ruler4310*/4311readonly height: number;4312/**4313* Top position for the overview ruler4314*/4315readonly top: number;4316/**4317* Right position for the overview ruler4318*/4319readonly right: number;4320}43214322export enum RenderMinimap {4323None = 0,4324Text = 1,4325Blocks = 24326}43274328/**4329* The internal layout details of the editor.4330*/4331export interface EditorLayoutInfo {4332/**4333* Full editor width.4334*/4335readonly width: number;4336/**4337* Full editor height.4338*/4339readonly height: number;4340/**4341* Left position for the glyph margin.4342*/4343readonly glyphMarginLeft: number;4344/**4345* The width of the glyph margin.4346*/4347readonly glyphMarginWidth: number;4348/**4349* The number of decoration lanes to render in the glyph margin.4350*/4351readonly glyphMarginDecorationLaneCount: number;4352/**4353* Left position for the line numbers.4354*/4355readonly lineNumbersLeft: number;4356/**4357* The width of the line numbers.4358*/4359readonly lineNumbersWidth: number;4360/**4361* Left position for the line decorations.4362*/4363readonly decorationsLeft: number;4364/**4365* The width of the line decorations.4366*/4367readonly decorationsWidth: number;4368/**4369* Left position for the content (actual text)4370*/4371readonly contentLeft: number;4372/**4373* The width of the content (actual text)4374*/4375readonly contentWidth: number;4376/**4377* Layout information for the minimap4378*/4379readonly minimap: EditorMinimapLayoutInfo;4380/**4381* The number of columns (of typical characters) fitting on a viewport line.4382*/4383readonly viewportColumn: number;4384readonly isWordWrapMinified: boolean;4385readonly isViewportWrapping: boolean;4386readonly wrappingColumn: number;4387/**4388* The width of the vertical scrollbar.4389*/4390readonly verticalScrollbarWidth: number;4391/**4392* The height of the horizontal scrollbar.4393*/4394readonly horizontalScrollbarHeight: number;4395/**4396* The position of the overview ruler.4397*/4398readonly overviewRuler: OverviewRulerPosition;4399}44004401/**4402* The internal layout details of the editor.4403*/4404export interface EditorMinimapLayoutInfo {4405readonly renderMinimap: RenderMinimap;4406readonly minimapLeft: number;4407readonly minimapWidth: number;4408readonly minimapHeightIsEditorHeight: boolean;4409readonly minimapIsSampling: boolean;4410readonly minimapScale: number;4411readonly minimapLineHeight: number;4412readonly minimapCanvasInnerWidth: number;4413readonly minimapCanvasInnerHeight: number;4414readonly minimapCanvasOuterWidth: number;4415readonly minimapCanvasOuterHeight: number;4416}44174418export enum ShowLightbulbIconMode {4419Off = 'off',4420OnCode = 'onCode',4421On = 'on'4422}44234424/**4425* Configuration options for editor lightbulb4426*/4427export interface IEditorLightbulbOptions {4428/**4429* Enable the lightbulb code action.4430* The three possible values are `off`, `on` and `onCode` and the default is `onCode`.4431* `off` disables the code action menu.4432* `on` shows the code action menu on code and on empty lines.4433* `onCode` shows the code action menu on code only.4434*/4435enabled?: ShowLightbulbIconMode;4436}44374438export interface IEditorStickyScrollOptions {4439/**4440* Enable the sticky scroll4441*/4442enabled?: boolean;4443/**4444* Maximum number of sticky lines to show4445*/4446maxLineCount?: number;4447/**4448* Model to choose for sticky scroll by default4449*/4450defaultModel?: 'outlineModel' | 'foldingProviderModel' | 'indentationModel';4451/**4452* Define whether to scroll sticky scroll with editor horizontal scrollbae4453*/4454scrollWithEditor?: boolean;4455}44564457/**4458* Configuration options for editor inlayHints4459*/4460export interface IEditorInlayHintsOptions {4461/**4462* Enable the inline hints.4463* Defaults to true.4464*/4465enabled?: 'on' | 'off' | 'offUnlessPressed' | 'onUnlessPressed';4466/**4467* Font size of inline hints.4468* Default to 90% of the editor font size.4469*/4470fontSize?: number;4471/**4472* Font family of inline hints.4473* Defaults to editor font family.4474*/4475fontFamily?: string;4476/**4477* Enables the padding around the inlay hint.4478* Defaults to false.4479*/4480padding?: boolean;4481/**4482* Maximum length for inlay hints per line4483* Set to 0 to have an unlimited length.4484*/4485maximumLength?: number;4486}44874488/**4489* Configuration options for editor minimap4490*/4491export interface IEditorMinimapOptions {4492/**4493* Enable the rendering of the minimap.4494* Defaults to true.4495*/4496enabled?: boolean;4497/**4498* Control the rendering of minimap.4499*/4500autohide?: 'none' | 'mouseover' | 'scroll';4501/**4502* Control the side of the minimap in editor.4503* Defaults to 'right'.4504*/4505side?: 'right' | 'left';4506/**4507* Control the minimap rendering mode.4508* Defaults to 'actual'.4509*/4510size?: 'proportional' | 'fill' | 'fit';4511/**4512* Control the rendering of the minimap slider.4513* Defaults to 'mouseover'.4514*/4515showSlider?: 'always' | 'mouseover';4516/**4517* Render the actual text on a line (as opposed to color blocks).4518* Defaults to true.4519*/4520renderCharacters?: boolean;4521/**4522* Limit the width of the minimap to render at most a certain number of columns.4523* Defaults to 120.4524*/4525maxColumn?: number;4526/**4527* Relative size of the font in the minimap. Defaults to 1.4528*/4529scale?: number;4530/**4531* Whether to show named regions as section headers. Defaults to true.4532*/4533showRegionSectionHeaders?: boolean;4534/**4535* Whether to show MARK: comments as section headers. Defaults to true.4536*/4537showMarkSectionHeaders?: boolean;4538/**4539* When specified, is used to create a custom section header parser regexp.4540* Must contain a match group named 'label' (written as (?<label>.+)) that encapsulates the section header.4541* Optionally can include another match group named 'separator'.4542* To match multi-line headers like:4543* // ==========4544* // My Section4545* // ==========4546* Use a pattern like: ^={3,}\n^\/\/ *(?<label>[^\n]*?)\n^={3,}$4547*/4548markSectionHeaderRegex?: string;4549/**4550* Font size of section headers. Defaults to 9.4551*/4552sectionHeaderFontSize?: number;4553/**4554* Spacing between the section header characters (in CSS px). Defaults to 1.4555*/4556sectionHeaderLetterSpacing?: number;4557}45584559/**4560* Configuration options for editor padding4561*/4562export interface IEditorPaddingOptions {4563/**4564* Spacing between top edge of editor and first line.4565*/4566top?: number;4567/**4568* Spacing between bottom edge of editor and last line.4569*/4570bottom?: number;4571}45724573/**4574* Configuration options for parameter hints4575*/4576export interface IEditorParameterHintOptions {4577/**4578* Enable parameter hints.4579* Defaults to true.4580*/4581enabled?: boolean;4582/**4583* Enable cycling of parameter hints.4584* Defaults to false.4585*/4586cycle?: boolean;4587}45884589export type QuickSuggestionsValue = 'on' | 'inline' | 'off';45904591/**4592* Configuration options for quick suggestions4593*/4594export interface IQuickSuggestionsOptions {4595other?: boolean | QuickSuggestionsValue;4596comments?: boolean | QuickSuggestionsValue;4597strings?: boolean | QuickSuggestionsValue;4598}45994600export interface InternalQuickSuggestionsOptions {4601readonly other: QuickSuggestionsValue;4602readonly comments: QuickSuggestionsValue;4603readonly strings: QuickSuggestionsValue;4604}46054606export type LineNumbersType = 'on' | 'off' | 'relative' | 'interval' | ((lineNumber: number) => string);46074608export enum RenderLineNumbersType {4609Off = 0,4610On = 1,4611Relative = 2,4612Interval = 3,4613Custom = 44614}46154616export interface InternalEditorRenderLineNumbersOptions {4617readonly renderType: RenderLineNumbersType;4618readonly renderFn: ((lineNumber: number) => string) | null;4619}46204621export interface IRulerOption {4622readonly column: number;4623readonly color: string | null;4624}46254626/**4627* Configuration options for editor scrollbars4628*/4629export interface IEditorScrollbarOptions {4630/**4631* The size of arrows (if displayed).4632* Defaults to 11.4633* **NOTE**: This option cannot be updated using `updateOptions()`4634*/4635arrowSize?: number;4636/**4637* Render vertical scrollbar.4638* Defaults to 'auto'.4639*/4640vertical?: 'auto' | 'visible' | 'hidden';4641/**4642* Render horizontal scrollbar.4643* Defaults to 'auto'.4644*/4645horizontal?: 'auto' | 'visible' | 'hidden';4646/**4647* Cast horizontal and vertical shadows when the content is scrolled.4648* Defaults to true.4649* **NOTE**: This option cannot be updated using `updateOptions()`4650*/4651useShadows?: boolean;4652/**4653* Render arrows at the top and bottom of the vertical scrollbar.4654* Defaults to false.4655* **NOTE**: This option cannot be updated using `updateOptions()`4656*/4657verticalHasArrows?: boolean;4658/**4659* Render arrows at the left and right of the horizontal scrollbar.4660* Defaults to false.4661* **NOTE**: This option cannot be updated using `updateOptions()`4662*/4663horizontalHasArrows?: boolean;4664/**4665* Listen to mouse wheel events and react to them by scrolling.4666* Defaults to true.4667*/4668handleMouseWheel?: boolean;4669/**4670* Always consume mouse wheel events (always call preventDefault() and stopPropagation() on the browser events).4671* Defaults to true.4672* **NOTE**: This option cannot be updated using `updateOptions()`4673*/4674alwaysConsumeMouseWheel?: boolean;4675/**4676* Height in pixels for the horizontal scrollbar.4677* Defaults to 12 (px).4678*/4679horizontalScrollbarSize?: number;4680/**4681* Width in pixels for the vertical scrollbar.4682* Defaults to 14 (px).4683*/4684verticalScrollbarSize?: number;4685/**4686* Width in pixels for the vertical slider.4687* Defaults to `verticalScrollbarSize`.4688* **NOTE**: This option cannot be updated using `updateOptions()`4689*/4690verticalSliderSize?: number;4691/**4692* Height in pixels for the horizontal slider.4693* Defaults to `horizontalScrollbarSize`.4694* **NOTE**: This option cannot be updated using `updateOptions()`4695*/4696horizontalSliderSize?: number;4697/**4698* Scroll gutter clicks move by page vs jump to position.4699* Defaults to false.4700*/4701scrollByPage?: boolean;4702/**4703* When set, the horizontal scrollbar will not increase content height.4704* Defaults to false.4705*/4706ignoreHorizontalScrollbarInContentHeight?: boolean;4707}47084709export interface InternalEditorScrollbarOptions {4710readonly arrowSize: number;4711readonly vertical: ScrollbarVisibility;4712readonly horizontal: ScrollbarVisibility;4713readonly useShadows: boolean;4714readonly verticalHasArrows: boolean;4715readonly horizontalHasArrows: boolean;4716readonly handleMouseWheel: boolean;4717readonly alwaysConsumeMouseWheel: boolean;4718readonly horizontalScrollbarSize: number;4719readonly horizontalSliderSize: number;4720readonly verticalScrollbarSize: number;4721readonly verticalSliderSize: number;4722readonly scrollByPage: boolean;4723readonly ignoreHorizontalScrollbarInContentHeight: boolean;4724}47254726export type InUntrustedWorkspace = 'inUntrustedWorkspace';47274728/**4729* Configuration options for unicode highlighting.4730*/4731export interface IUnicodeHighlightOptions {4732/**4733* 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.4734*/4735nonBasicASCII?: boolean | InUntrustedWorkspace;4736/**4737* Controls whether characters that just reserve space or have no width at all are highlighted.4738*/4739invisibleCharacters?: boolean;4740/**4741* Controls whether characters are highlighted that can be confused with basic ASCII characters, except those that are common in the current user locale.4742*/4743ambiguousCharacters?: boolean;4744/**4745* Controls whether characters in comments should also be subject to unicode highlighting.4746*/4747includeComments?: boolean | InUntrustedWorkspace;4748/**4749* Controls whether characters in strings should also be subject to unicode highlighting.4750*/4751includeStrings?: boolean | InUntrustedWorkspace;4752/**4753* Defines allowed characters that are not being highlighted.4754*/4755allowedCharacters?: Record<string, true>;4756/**4757* Unicode characters that are common in allowed locales are not being highlighted.4758*/4759allowedLocales?: Record<string | '_os' | '_vscode', true>;4760}47614762export interface IInlineSuggestOptions {4763/**4764* Enable or disable the rendering of automatic inline completions.4765*/4766enabled?: boolean;4767/**4768* Configures the mode.4769* Use `prefix` to only show ghost text if the text to replace is a prefix of the suggestion text.4770* Use `subword` to only show ghost text if the replace text is a subword of the suggestion text.4771* 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.4772* Defaults to `prefix`.4773*/4774mode?: 'prefix' | 'subword' | 'subwordSmart';4775showToolbar?: 'always' | 'onHover' | 'never';4776syntaxHighlightingEnabled?: boolean;4777suppressSuggestions?: boolean;4778minShowDelay?: number;4779suppressInSnippetMode?: boolean;4780/**4781* Does not clear active inline suggestions when the editor loses focus.4782*/4783keepOnBlur?: boolean;4784/**4785* Font family for inline suggestions.4786*/4787fontFamily?: string | 'default';4788}47894790type RequiredRecursive<T> = {4791[P in keyof T]-?: T[P] extends object | undefined ? RequiredRecursive<T[P]> : T[P];4792};47934794export interface IBracketPairColorizationOptions {4795/**4796* Enable or disable bracket pair colorization.4797*/4798enabled?: boolean;4799/**4800* Use independent color pool per bracket type.4801*/4802independentColorPoolPerBracketType?: boolean;4803}48044805export interface IGuidesOptions {4806/**4807* Enable rendering of bracket pair guides.4808* Defaults to false.4809*/4810bracketPairs?: boolean | 'active';4811/**4812* Enable rendering of vertical bracket pair guides.4813* Defaults to 'active'.4814*/4815bracketPairsHorizontal?: boolean | 'active';4816/**4817* Enable highlighting of the active bracket pair.4818* Defaults to true.4819*/4820highlightActiveBracketPair?: boolean;4821/**4822* Enable rendering of indent guides.4823* Defaults to true.4824*/4825indentation?: boolean;4826/**4827* Enable highlighting of the active indent guide.4828* Defaults to true.4829*/4830highlightActiveIndentation?: boolean | 'always';4831}48324833/**4834* Configuration options for editor suggest widget4835*/4836export interface ISuggestOptions {4837/**4838* Overwrite word ends on accept. Default to false.4839*/4840insertMode?: 'insert' | 'replace';4841/**4842* Enable graceful matching. Defaults to true.4843*/4844filterGraceful?: boolean;4845/**4846* Prevent quick suggestions when a snippet is active. Defaults to true.4847*/4848snippetsPreventQuickSuggestions?: boolean;4849/**4850* Favors words that appear close to the cursor.4851*/4852localityBonus?: boolean;4853/**4854* Enable using global storage for remembering suggestions.4855*/4856shareSuggestSelections?: boolean;4857/**4858* Select suggestions when triggered via quick suggest or trigger characters4859*/4860selectionMode?: 'always' | 'never' | 'whenTriggerCharacter' | 'whenQuickSuggestion';4861/**4862* Enable or disable icons in suggestions. Defaults to true.4863*/4864showIcons?: boolean;4865/**4866* Enable or disable the suggest status bar.4867*/4868showStatusBar?: boolean;4869/**4870* Enable or disable the rendering of the suggestion preview.4871*/4872preview?: boolean;4873/**4874* Configures the mode of the preview.4875*/4876previewMode?: 'prefix' | 'subword' | 'subwordSmart';4877/**4878* Show details inline with the label. Defaults to true.4879*/4880showInlineDetails?: boolean;4881/**4882* Show method-suggestions.4883*/4884showMethods?: boolean;4885/**4886* Show function-suggestions.4887*/4888showFunctions?: boolean;4889/**4890* Show constructor-suggestions.4891*/4892showConstructors?: boolean;4893/**4894* Show deprecated-suggestions.4895*/4896showDeprecated?: boolean;4897/**4898* Controls whether suggestions allow matches in the middle of the word instead of only at the beginning4899*/4900matchOnWordStartOnly?: boolean;4901/**4902* Show field-suggestions.4903*/4904showFields?: boolean;4905/**4906* Show variable-suggestions.4907*/4908showVariables?: boolean;4909/**4910* Show class-suggestions.4911*/4912showClasses?: boolean;4913/**4914* Show struct-suggestions.4915*/4916showStructs?: boolean;4917/**4918* Show interface-suggestions.4919*/4920showInterfaces?: boolean;4921/**4922* Show module-suggestions.4923*/4924showModules?: boolean;4925/**4926* Show property-suggestions.4927*/4928showProperties?: boolean;4929/**4930* Show event-suggestions.4931*/4932showEvents?: boolean;4933/**4934* Show operator-suggestions.4935*/4936showOperators?: boolean;4937/**4938* Show unit-suggestions.4939*/4940showUnits?: boolean;4941/**4942* Show value-suggestions.4943*/4944showValues?: boolean;4945/**4946* Show constant-suggestions.4947*/4948showConstants?: boolean;4949/**4950* Show enum-suggestions.4951*/4952showEnums?: boolean;4953/**4954* Show enumMember-suggestions.4955*/4956showEnumMembers?: boolean;4957/**4958* Show keyword-suggestions.4959*/4960showKeywords?: boolean;4961/**4962* Show text-suggestions.4963*/4964showWords?: boolean;4965/**4966* Show color-suggestions.4967*/4968showColors?: boolean;4969/**4970* Show file-suggestions.4971*/4972showFiles?: boolean;4973/**4974* Show reference-suggestions.4975*/4976showReferences?: boolean;4977/**4978* Show folder-suggestions.4979*/4980showFolders?: boolean;4981/**4982* Show typeParameter-suggestions.4983*/4984showTypeParameters?: boolean;4985/**4986* Show issue-suggestions.4987*/4988showIssues?: boolean;4989/**4990* Show user-suggestions.4991*/4992showUsers?: boolean;4993/**4994* Show snippet-suggestions.4995*/4996showSnippets?: boolean;4997}49984999export interface ISmartSelectOptions {5000selectLeadingAndTrailingWhitespace?: boolean;5001selectSubwords?: boolean;5002}50035004/**5005* Describes how to indent wrapped lines.5006*/5007export enum WrappingIndent {5008/**5009* No indentation => wrapped lines begin at column 1.5010*/5011None = 0,5012/**5013* Same => wrapped lines get the same indentation as the parent.5014*/5015Same = 1,5016/**5017* Indent => wrapped lines get +1 indentation toward the parent.5018*/5019Indent = 2,5020/**5021* DeepIndent => wrapped lines get +2 indentation toward the parent.5022*/5023DeepIndent = 35024}50255026export interface EditorWrappingInfo {5027readonly isDominatedByLongLines: boolean;5028readonly isWordWrapMinified: boolean;5029readonly isViewportWrapping: boolean;5030readonly wrappingColumn: number;5031}50325033/**5034* Configuration options for editor drop into behavior5035*/5036export interface IDropIntoEditorOptions {5037/**5038* Enable dropping into editor.5039* Defaults to true.5040*/5041enabled?: boolean;5042/**5043* Controls if a widget is shown after a drop.5044* Defaults to 'afterDrop'.5045*/5046showDropSelector?: 'afterDrop' | 'never';5047}50485049/**5050* Configuration options for editor pasting as into behavior5051*/5052export interface IPasteAsOptions {5053/**5054* Enable paste as functionality in editors.5055* Defaults to true.5056*/5057enabled?: boolean;5058/**5059* Controls if a widget is shown after a drop.5060* Defaults to 'afterPaste'.5061*/5062showPasteSelector?: 'afterPaste' | 'never';5063}50645065export enum EditorOption {5066acceptSuggestionOnCommitCharacter = 0,5067acceptSuggestionOnEnter = 1,5068accessibilitySupport = 2,5069accessibilityPageSize = 3,5070allowOverflow = 4,5071allowVariableLineHeights = 5,5072allowVariableFonts = 6,5073allowVariableFontsInAccessibilityMode = 7,5074ariaLabel = 8,5075ariaRequired = 9,5076autoClosingBrackets = 10,5077autoClosingComments = 11,5078screenReaderAnnounceInlineSuggestion = 12,5079autoClosingDelete = 13,5080autoClosingOvertype = 14,5081autoClosingQuotes = 15,5082autoIndent = 16,5083autoIndentOnPaste = 17,5084autoIndentOnPasteWithinString = 18,5085automaticLayout = 19,5086autoSurround = 20,5087bracketPairColorization = 21,5088guides = 22,5089codeLens = 23,5090codeLensFontFamily = 24,5091codeLensFontSize = 25,5092colorDecorators = 26,5093colorDecoratorsLimit = 27,5094columnSelection = 28,5095comments = 29,5096contextmenu = 30,5097copyWithSyntaxHighlighting = 31,5098cursorBlinking = 32,5099cursorSmoothCaretAnimation = 33,5100cursorStyle = 34,5101cursorSurroundingLines = 35,5102cursorSurroundingLinesStyle = 36,5103cursorWidth = 37,5104cursorHeight = 38,5105disableLayerHinting = 39,5106disableMonospaceOptimizations = 40,5107domReadOnly = 41,5108dragAndDrop = 42,5109dropIntoEditor = 43,5110editContext = 44,5111emptySelectionClipboard = 45,5112experimentalGpuAcceleration = 46,5113experimentalWhitespaceRendering = 47,5114extraEditorClassName = 48,5115fastScrollSensitivity = 49,5116find = 50,5117fixedOverflowWidgets = 51,5118folding = 52,5119foldingStrategy = 53,5120foldingHighlight = 54,5121foldingImportsByDefault = 55,5122foldingMaximumRegions = 56,5123unfoldOnClickAfterEndOfLine = 57,5124fontFamily = 58,5125fontInfo = 59,5126fontLigatures = 60,5127fontSize = 61,5128fontWeight = 62,5129fontVariations = 63,5130formatOnPaste = 64,5131formatOnType = 65,5132glyphMargin = 66,5133gotoLocation = 67,5134hideCursorInOverviewRuler = 68,5135hover = 69,5136inDiffEditor = 70,5137inlineSuggest = 71,5138letterSpacing = 72,5139lightbulb = 73,5140lineDecorationsWidth = 74,5141lineHeight = 75,5142lineNumbers = 76,5143lineNumbersMinChars = 77,5144linkedEditing = 78,5145links = 79,5146matchBrackets = 80,5147minimap = 81,5148mouseStyle = 82,5149mouseWheelScrollSensitivity = 83,5150mouseWheelZoom = 84,5151multiCursorMergeOverlapping = 85,5152multiCursorModifier = 86,5153mouseMiddleClickAction = 87,5154multiCursorPaste = 88,5155multiCursorLimit = 89,5156occurrencesHighlight = 90,5157occurrencesHighlightDelay = 91,5158overtypeCursorStyle = 92,5159overtypeOnPaste = 93,5160overviewRulerBorder = 94,5161overviewRulerLanes = 95,5162padding = 96,5163pasteAs = 97,5164parameterHints = 98,5165peekWidgetDefaultFocus = 99,5166placeholder = 100,5167definitionLinkOpensInPeek = 101,5168quickSuggestions = 102,5169quickSuggestionsDelay = 103,5170readOnly = 104,5171readOnlyMessage = 105,5172renameOnType = 106,5173renderRichScreenReaderContent = 107,5174renderControlCharacters = 108,5175renderFinalNewline = 109,5176renderLineHighlight = 110,5177renderLineHighlightOnlyWhenFocus = 111,5178renderValidationDecorations = 112,5179renderWhitespace = 113,5180revealHorizontalRightPadding = 114,5181roundedSelection = 115,5182rulers = 116,5183scrollbar = 117,5184scrollBeyondLastColumn = 118,5185scrollBeyondLastLine = 119,5186scrollPredominantAxis = 120,5187selectionClipboard = 121,5188selectionHighlight = 122,5189selectionHighlightMaxLength = 123,5190selectionHighlightMultiline = 124,5191selectOnLineNumbers = 125,5192showFoldingControls = 126,5193showUnused = 127,5194snippetSuggestions = 128,5195smartSelect = 129,5196smoothScrolling = 130,5197stickyScroll = 131,5198stickyTabStops = 132,5199stopRenderingLineAfter = 133,5200suggest = 134,5201suggestFontSize = 135,5202suggestLineHeight = 136,5203suggestOnTriggerCharacters = 137,5204suggestSelection = 138,5205tabCompletion = 139,5206tabIndex = 140,5207trimWhitespaceOnDelete = 141,5208unicodeHighlighting = 142,5209unusualLineTerminators = 143,5210useShadowDOM = 144,5211useTabStops = 145,5212wordBreak = 146,5213wordSegmenterLocales = 147,5214wordSeparators = 148,5215wordWrap = 149,5216wordWrapBreakAfterCharacters = 150,5217wordWrapBreakBeforeCharacters = 151,5218wordWrapColumn = 152,5219wordWrapOverride1 = 153,5220wordWrapOverride2 = 154,5221wrappingIndent = 155,5222wrappingStrategy = 156,5223showDeprecated = 157,5224inertialScroll = 158,5225inlayHints = 159,5226wrapOnEscapedLineFeeds = 160,5227effectiveCursorStyle = 161,5228editorClassName = 162,5229pixelRatio = 163,5230tabFocusMode = 164,5231layoutInfo = 165,5232wrappingInfo = 166,5233defaultColorDecorators = 167,5234colorDecoratorsActivatedOn = 168,5235inlineCompletionsAccessibilityVerbose = 169,5236effectiveEditContext = 170,5237scrollOnMiddleClick = 171,5238effectiveAllowVariableFonts = 1725239}52405241export const EditorOptions: {5242acceptSuggestionOnCommitCharacter: IEditorOption<EditorOption.acceptSuggestionOnCommitCharacter, boolean>;5243acceptSuggestionOnEnter: IEditorOption<EditorOption.acceptSuggestionOnEnter, 'on' | 'off' | 'smart'>;5244accessibilitySupport: IEditorOption<EditorOption.accessibilitySupport, AccessibilitySupport>;5245accessibilityPageSize: IEditorOption<EditorOption.accessibilityPageSize, number>;5246allowOverflow: IEditorOption<EditorOption.allowOverflow, boolean>;5247allowVariableLineHeights: IEditorOption<EditorOption.allowVariableLineHeights, boolean>;5248allowVariableFonts: IEditorOption<EditorOption.allowVariableFonts, boolean>;5249allowVariableFontsInAccessibilityMode: IEditorOption<EditorOption.allowVariableFontsInAccessibilityMode, boolean>;5250ariaLabel: IEditorOption<EditorOption.ariaLabel, string>;5251ariaRequired: IEditorOption<EditorOption.ariaRequired, boolean>;5252screenReaderAnnounceInlineSuggestion: IEditorOption<EditorOption.screenReaderAnnounceInlineSuggestion, boolean>;5253autoClosingBrackets: IEditorOption<EditorOption.autoClosingBrackets, 'always' | 'never' | 'languageDefined' | 'beforeWhitespace'>;5254autoClosingComments: IEditorOption<EditorOption.autoClosingComments, 'always' | 'never' | 'languageDefined' | 'beforeWhitespace'>;5255autoClosingDelete: IEditorOption<EditorOption.autoClosingDelete, 'auto' | 'always' | 'never'>;5256autoClosingOvertype: IEditorOption<EditorOption.autoClosingOvertype, 'auto' | 'always' | 'never'>;5257autoClosingQuotes: IEditorOption<EditorOption.autoClosingQuotes, 'always' | 'never' | 'languageDefined' | 'beforeWhitespace'>;5258autoIndent: IEditorOption<EditorOption.autoIndent, EditorAutoIndentStrategy>;5259autoIndentOnPaste: IEditorOption<EditorOption.autoIndentOnPaste, boolean>;5260autoIndentOnPasteWithinString: IEditorOption<EditorOption.autoIndentOnPasteWithinString, boolean>;5261automaticLayout: IEditorOption<EditorOption.automaticLayout, boolean>;5262autoSurround: IEditorOption<EditorOption.autoSurround, 'never' | 'languageDefined' | 'quotes' | 'brackets'>;5263bracketPairColorization: IEditorOption<EditorOption.bracketPairColorization, Readonly<Required<IBracketPairColorizationOptions>>>;5264bracketPairGuides: IEditorOption<EditorOption.guides, Readonly<Required<IGuidesOptions>>>;5265stickyTabStops: IEditorOption<EditorOption.stickyTabStops, boolean>;5266codeLens: IEditorOption<EditorOption.codeLens, boolean>;5267codeLensFontFamily: IEditorOption<EditorOption.codeLensFontFamily, string>;5268codeLensFontSize: IEditorOption<EditorOption.codeLensFontSize, number>;5269colorDecorators: IEditorOption<EditorOption.colorDecorators, boolean>;5270colorDecoratorActivatedOn: IEditorOption<EditorOption.colorDecoratorsActivatedOn, 'hover' | 'clickAndHover' | 'click'>;5271colorDecoratorsLimit: IEditorOption<EditorOption.colorDecoratorsLimit, number>;5272columnSelection: IEditorOption<EditorOption.columnSelection, boolean>;5273comments: IEditorOption<EditorOption.comments, Readonly<Required<IEditorCommentsOptions>>>;5274contextmenu: IEditorOption<EditorOption.contextmenu, boolean>;5275copyWithSyntaxHighlighting: IEditorOption<EditorOption.copyWithSyntaxHighlighting, boolean>;5276cursorBlinking: IEditorOption<EditorOption.cursorBlinking, TextEditorCursorBlinkingStyle>;5277cursorSmoothCaretAnimation: IEditorOption<EditorOption.cursorSmoothCaretAnimation, 'on' | 'off' | 'explicit'>;5278cursorStyle: IEditorOption<EditorOption.cursorStyle, TextEditorCursorStyle>;5279overtypeCursorStyle: IEditorOption<EditorOption.overtypeCursorStyle, TextEditorCursorStyle>;5280cursorSurroundingLines: IEditorOption<EditorOption.cursorSurroundingLines, number>;5281cursorSurroundingLinesStyle: IEditorOption<EditorOption.cursorSurroundingLinesStyle, 'default' | 'all'>;5282cursorWidth: IEditorOption<EditorOption.cursorWidth, number>;5283cursorHeight: IEditorOption<EditorOption.cursorHeight, number>;5284disableLayerHinting: IEditorOption<EditorOption.disableLayerHinting, boolean>;5285disableMonospaceOptimizations: IEditorOption<EditorOption.disableMonospaceOptimizations, boolean>;5286domReadOnly: IEditorOption<EditorOption.domReadOnly, boolean>;5287dragAndDrop: IEditorOption<EditorOption.dragAndDrop, boolean>;5288emptySelectionClipboard: IEditorOption<EditorOption.emptySelectionClipboard, boolean>;5289dropIntoEditor: IEditorOption<EditorOption.dropIntoEditor, Readonly<Required<IDropIntoEditorOptions>>>;5290editContext: IEditorOption<EditorOption.editContext, boolean>;5291renderRichScreenReaderContent: IEditorOption<EditorOption.renderRichScreenReaderContent, boolean>;5292stickyScroll: IEditorOption<EditorOption.stickyScroll, Readonly<Required<IEditorStickyScrollOptions>>>;5293experimentalGpuAcceleration: IEditorOption<EditorOption.experimentalGpuAcceleration, 'on' | 'off'>;5294experimentalWhitespaceRendering: IEditorOption<EditorOption.experimentalWhitespaceRendering, 'off' | 'svg' | 'font'>;5295extraEditorClassName: IEditorOption<EditorOption.extraEditorClassName, string>;5296fastScrollSensitivity: IEditorOption<EditorOption.fastScrollSensitivity, number>;5297find: IEditorOption<EditorOption.find, Readonly<Required<IEditorFindOptions>>>;5298fixedOverflowWidgets: IEditorOption<EditorOption.fixedOverflowWidgets, boolean>;5299folding: IEditorOption<EditorOption.folding, boolean>;5300foldingStrategy: IEditorOption<EditorOption.foldingStrategy, 'auto' | 'indentation'>;5301foldingHighlight: IEditorOption<EditorOption.foldingHighlight, boolean>;5302foldingImportsByDefault: IEditorOption<EditorOption.foldingImportsByDefault, boolean>;5303foldingMaximumRegions: IEditorOption<EditorOption.foldingMaximumRegions, number>;5304unfoldOnClickAfterEndOfLine: IEditorOption<EditorOption.unfoldOnClickAfterEndOfLine, boolean>;5305fontFamily: IEditorOption<EditorOption.fontFamily, string>;5306fontInfo: IEditorOption<EditorOption.fontInfo, FontInfo>;5307fontLigatures2: IEditorOption<EditorOption.fontLigatures, string>;5308fontSize: IEditorOption<EditorOption.fontSize, number>;5309fontWeight: IEditorOption<EditorOption.fontWeight, string>;5310fontVariations: IEditorOption<EditorOption.fontVariations, string>;5311formatOnPaste: IEditorOption<EditorOption.formatOnPaste, boolean>;5312formatOnType: IEditorOption<EditorOption.formatOnType, boolean>;5313glyphMargin: IEditorOption<EditorOption.glyphMargin, boolean>;5314gotoLocation: IEditorOption<EditorOption.gotoLocation, Readonly<Required<IGotoLocationOptions>>>;5315hideCursorInOverviewRuler: IEditorOption<EditorOption.hideCursorInOverviewRuler, boolean>;5316hover: IEditorOption<EditorOption.hover, Readonly<Required<IEditorHoverOptions>>>;5317inDiffEditor: IEditorOption<EditorOption.inDiffEditor, boolean>;5318inertialScroll: IEditorOption<EditorOption.inertialScroll, boolean>;5319letterSpacing: IEditorOption<EditorOption.letterSpacing, number>;5320lightbulb: IEditorOption<EditorOption.lightbulb, Readonly<Required<IEditorLightbulbOptions>>>;5321lineDecorationsWidth: IEditorOption<EditorOption.lineDecorationsWidth, number>;5322lineHeight: IEditorOption<EditorOption.lineHeight, number>;5323lineNumbers: IEditorOption<EditorOption.lineNumbers, InternalEditorRenderLineNumbersOptions>;5324lineNumbersMinChars: IEditorOption<EditorOption.lineNumbersMinChars, number>;5325linkedEditing: IEditorOption<EditorOption.linkedEditing, boolean>;5326links: IEditorOption<EditorOption.links, boolean>;5327matchBrackets: IEditorOption<EditorOption.matchBrackets, 'always' | 'never' | 'near'>;5328minimap: IEditorOption<EditorOption.minimap, Readonly<Required<IEditorMinimapOptions>>>;5329mouseStyle: IEditorOption<EditorOption.mouseStyle, 'default' | 'text' | 'copy'>;5330mouseWheelScrollSensitivity: IEditorOption<EditorOption.mouseWheelScrollSensitivity, number>;5331mouseWheelZoom: IEditorOption<EditorOption.mouseWheelZoom, boolean>;5332multiCursorMergeOverlapping: IEditorOption<EditorOption.multiCursorMergeOverlapping, boolean>;5333multiCursorModifier: IEditorOption<EditorOption.multiCursorModifier, 'altKey' | 'metaKey' | 'ctrlKey'>;5334mouseMiddleClickAction: IEditorOption<EditorOption.mouseMiddleClickAction, MouseMiddleClickAction>;5335multiCursorPaste: IEditorOption<EditorOption.multiCursorPaste, 'spread' | 'full'>;5336multiCursorLimit: IEditorOption<EditorOption.multiCursorLimit, number>;5337occurrencesHighlight: IEditorOption<EditorOption.occurrencesHighlight, 'off' | 'singleFile' | 'multiFile'>;5338occurrencesHighlightDelay: IEditorOption<EditorOption.occurrencesHighlightDelay, number>;5339overtypeOnPaste: IEditorOption<EditorOption.overtypeOnPaste, boolean>;5340overviewRulerBorder: IEditorOption<EditorOption.overviewRulerBorder, boolean>;5341overviewRulerLanes: IEditorOption<EditorOption.overviewRulerLanes, number>;5342padding: IEditorOption<EditorOption.padding, Readonly<Required<IEditorPaddingOptions>>>;5343pasteAs: IEditorOption<EditorOption.pasteAs, Readonly<Required<IPasteAsOptions>>>;5344parameterHints: IEditorOption<EditorOption.parameterHints, Readonly<Required<IEditorParameterHintOptions>>>;5345peekWidgetDefaultFocus: IEditorOption<EditorOption.peekWidgetDefaultFocus, 'tree' | 'editor'>;5346placeholder: IEditorOption<EditorOption.placeholder, string>;5347definitionLinkOpensInPeek: IEditorOption<EditorOption.definitionLinkOpensInPeek, boolean>;5348quickSuggestions: IEditorOption<EditorOption.quickSuggestions, InternalQuickSuggestionsOptions>;5349quickSuggestionsDelay: IEditorOption<EditorOption.quickSuggestionsDelay, number>;5350readOnly: IEditorOption<EditorOption.readOnly, boolean>;5351readOnlyMessage: IEditorOption<EditorOption.readOnlyMessage, any>;5352renameOnType: IEditorOption<EditorOption.renameOnType, boolean>;5353renderControlCharacters: IEditorOption<EditorOption.renderControlCharacters, boolean>;5354renderFinalNewline: IEditorOption<EditorOption.renderFinalNewline, 'on' | 'off' | 'dimmed'>;5355renderLineHighlight: IEditorOption<EditorOption.renderLineHighlight, 'all' | 'line' | 'none' | 'gutter'>;5356renderLineHighlightOnlyWhenFocus: IEditorOption<EditorOption.renderLineHighlightOnlyWhenFocus, boolean>;5357renderValidationDecorations: IEditorOption<EditorOption.renderValidationDecorations, 'on' | 'off' | 'editable'>;5358renderWhitespace: IEditorOption<EditorOption.renderWhitespace, 'all' | 'none' | 'boundary' | 'selection' | 'trailing'>;5359revealHorizontalRightPadding: IEditorOption<EditorOption.revealHorizontalRightPadding, number>;5360roundedSelection: IEditorOption<EditorOption.roundedSelection, boolean>;5361rulers: IEditorOption<EditorOption.rulers, IRulerOption[]>;5362scrollbar: IEditorOption<EditorOption.scrollbar, InternalEditorScrollbarOptions>;5363scrollBeyondLastColumn: IEditorOption<EditorOption.scrollBeyondLastColumn, number>;5364scrollBeyondLastLine: IEditorOption<EditorOption.scrollBeyondLastLine, boolean>;5365scrollOnMiddleClick: IEditorOption<EditorOption.scrollOnMiddleClick, boolean>;5366scrollPredominantAxis: IEditorOption<EditorOption.scrollPredominantAxis, boolean>;5367selectionClipboard: IEditorOption<EditorOption.selectionClipboard, boolean>;5368selectionHighlight: IEditorOption<EditorOption.selectionHighlight, boolean>;5369selectionHighlightMaxLength: IEditorOption<EditorOption.selectionHighlightMaxLength, number>;5370selectionHighlightMultiline: IEditorOption<EditorOption.selectionHighlightMultiline, boolean>;5371selectOnLineNumbers: IEditorOption<EditorOption.selectOnLineNumbers, boolean>;5372showFoldingControls: IEditorOption<EditorOption.showFoldingControls, 'always' | 'never' | 'mouseover'>;5373showUnused: IEditorOption<EditorOption.showUnused, boolean>;5374showDeprecated: IEditorOption<EditorOption.showDeprecated, boolean>;5375inlayHints: IEditorOption<EditorOption.inlayHints, Readonly<Required<IEditorInlayHintsOptions>>>;5376snippetSuggestions: IEditorOption<EditorOption.snippetSuggestions, 'none' | 'top' | 'bottom' | 'inline'>;5377smartSelect: IEditorOption<EditorOption.smartSelect, Readonly<Required<ISmartSelectOptions>>>;5378smoothScrolling: IEditorOption<EditorOption.smoothScrolling, boolean>;5379stopRenderingLineAfter: IEditorOption<EditorOption.stopRenderingLineAfter, number>;5380suggest: IEditorOption<EditorOption.suggest, Readonly<Required<ISuggestOptions>>>;5381inlineSuggest: IEditorOption<EditorOption.inlineSuggest, Readonly<RequiredRecursive<IInlineSuggestOptions>>>;5382inlineCompletionsAccessibilityVerbose: IEditorOption<EditorOption.inlineCompletionsAccessibilityVerbose, boolean>;5383suggestFontSize: IEditorOption<EditorOption.suggestFontSize, number>;5384suggestLineHeight: IEditorOption<EditorOption.suggestLineHeight, number>;5385suggestOnTriggerCharacters: IEditorOption<EditorOption.suggestOnTriggerCharacters, boolean>;5386suggestSelection: IEditorOption<EditorOption.suggestSelection, 'first' | 'recentlyUsed' | 'recentlyUsedByPrefix'>;5387tabCompletion: IEditorOption<EditorOption.tabCompletion, 'on' | 'off' | 'onlySnippets'>;5388tabIndex: IEditorOption<EditorOption.tabIndex, number>;5389trimWhitespaceOnDelete: IEditorOption<EditorOption.trimWhitespaceOnDelete, boolean>;5390unicodeHighlight: IEditorOption<EditorOption.unicodeHighlighting, Required<Readonly<IUnicodeHighlightOptions>>>;5391unusualLineTerminators: IEditorOption<EditorOption.unusualLineTerminators, 'off' | 'auto' | 'prompt'>;5392useShadowDOM: IEditorOption<EditorOption.useShadowDOM, boolean>;5393useTabStops: IEditorOption<EditorOption.useTabStops, boolean>;5394wordBreak: IEditorOption<EditorOption.wordBreak, 'normal' | 'keepAll'>;5395wordSegmenterLocales: IEditorOption<EditorOption.wordSegmenterLocales, string[]>;5396wordSeparators: IEditorOption<EditorOption.wordSeparators, string>;5397wordWrap: IEditorOption<EditorOption.wordWrap, 'wordWrapColumn' | 'on' | 'off' | 'bounded'>;5398wordWrapBreakAfterCharacters: IEditorOption<EditorOption.wordWrapBreakAfterCharacters, string>;5399wordWrapBreakBeforeCharacters: IEditorOption<EditorOption.wordWrapBreakBeforeCharacters, string>;5400wordWrapColumn: IEditorOption<EditorOption.wordWrapColumn, number>;5401wordWrapOverride1: IEditorOption<EditorOption.wordWrapOverride1, 'on' | 'off' | 'inherit'>;5402wordWrapOverride2: IEditorOption<EditorOption.wordWrapOverride2, 'on' | 'off' | 'inherit'>;5403wrapOnEscapedLineFeeds: IEditorOption<EditorOption.wrapOnEscapedLineFeeds, boolean>;5404effectiveCursorStyle: IEditorOption<EditorOption.effectiveCursorStyle, TextEditorCursorStyle>;5405editorClassName: IEditorOption<EditorOption.editorClassName, string>;5406defaultColorDecorators: IEditorOption<EditorOption.defaultColorDecorators, 'auto' | 'always' | 'never'>;5407pixelRatio: IEditorOption<EditorOption.pixelRatio, number>;5408tabFocusMode: IEditorOption<EditorOption.tabFocusMode, boolean>;5409layoutInfo: IEditorOption<EditorOption.layoutInfo, EditorLayoutInfo>;5410wrappingInfo: IEditorOption<EditorOption.wrappingInfo, EditorWrappingInfo>;5411wrappingIndent: IEditorOption<EditorOption.wrappingIndent, WrappingIndent>;5412wrappingStrategy: IEditorOption<EditorOption.wrappingStrategy, 'simple' | 'advanced'>;5413effectiveEditContextEnabled: IEditorOption<EditorOption.effectiveEditContext, boolean>;5414effectiveAllowVariableFonts: IEditorOption<EditorOption.effectiveAllowVariableFonts, boolean>;5415};54165417type EditorOptionsType = typeof EditorOptions;54185419type FindEditorOptionsKeyById<T extends EditorOption> = {5420[K in keyof EditorOptionsType]: EditorOptionsType[K]['id'] extends T ? K : never;5421}[keyof EditorOptionsType];54225423type ComputedEditorOptionValue<T extends IEditorOption<any, any>> = T extends IEditorOption<any, infer R> ? R : never;54245425export type FindComputedEditorOptionValueById<T extends EditorOption> = NonNullable<ComputedEditorOptionValue<EditorOptionsType[FindEditorOptionsKeyById<T>]>>;54265427export type MouseMiddleClickAction = 'default' | 'openLink' | 'ctrlLeftClick';54285429export interface IEditorConstructionOptions extends IEditorOptions {5430/**5431* The initial editor dimension (to avoid measuring the container).5432*/5433dimension?: IDimension;5434/**5435* Place overflow widgets inside an external DOM node.5436* Defaults to an internal DOM node.5437*/5438overflowWidgetsDomNode?: HTMLElement;5439}54405441/**5442* A view zone is a full horizontal rectangle that 'pushes' text down.5443* The editor reserves space for view zones when rendering.5444*/5445export interface IViewZone {5446/**5447* The line number after which this zone should appear.5448* Use 0 to place a view zone before the first line number.5449*/5450afterLineNumber: number;5451/**5452* The column after which this zone should appear.5453* If not set, the maxLineColumn of `afterLineNumber` will be used.5454* This is relevant for wrapped lines.5455*/5456afterColumn?: number;5457/**5458* If the `afterColumn` has multiple view columns, the affinity specifies which one to use. Defaults to `none`.5459*/5460afterColumnAffinity?: PositionAffinity;5461/**5462* Render the zone even when its line is hidden.5463*/5464showInHiddenAreas?: boolean;5465/**5466* Tiebreaker that is used when multiple view zones want to be after the same line.5467* Defaults to `afterColumn` otherwise 10000;5468*/5469ordinal?: number;5470/**5471* Suppress mouse down events.5472* If set, the editor will attach a mouse down listener to the view zone and .preventDefault on it.5473* Defaults to false5474*/5475suppressMouseDown?: boolean;5476/**5477* The height in lines of the view zone.5478* If specified, `heightInPx` will be used instead of this.5479* If neither `heightInPx` nor `heightInLines` is specified, a default of `heightInLines` = 1 will be chosen.5480*/5481heightInLines?: number;5482/**5483* The height in px of the view zone.5484* If this is set, the editor will give preference to it rather than `heightInLines` above.5485* If neither `heightInPx` nor `heightInLines` is specified, a default of `heightInLines` = 1 will be chosen.5486*/5487heightInPx?: number;5488/**5489* The minimum width in px of the view zone.5490* If this is set, the editor will ensure that the scroll width is >= than this value.5491*/5492minWidthInPx?: number;5493/**5494* The dom node of the view zone5495*/5496domNode: HTMLElement;5497/**5498* An optional dom node for the view zone that will be placed in the margin area.5499*/5500marginDomNode?: HTMLElement | null;5501/**5502* Callback which gives the relative top of the view zone as it appears (taking scrolling into account).5503*/5504onDomNodeTop?: (top: number) => void;5505/**5506* Callback which gives the height in pixels of the view zone.5507*/5508onComputedHeight?: (height: number) => void;5509}55105511/**5512* An accessor that allows for zones to be added or removed.5513*/5514export interface IViewZoneChangeAccessor {5515/**5516* Create a new view zone.5517* @param zone Zone to create5518* @return A unique identifier to the view zone.5519*/5520addZone(zone: IViewZone): string;5521/**5522* Remove a zone5523* @param id A unique identifier to the view zone, as returned by the `addZone` call.5524*/5525removeZone(id: string): void;5526/**5527* Change a zone's position.5528* The editor will rescan the `afterLineNumber` and `afterColumn` properties of a view zone.5529*/5530layoutZone(id: string): void;5531}55325533/**5534* A positioning preference for rendering content widgets.5535*/5536export enum ContentWidgetPositionPreference {5537/**5538* Place the content widget exactly at a position5539*/5540EXACT = 0,5541/**5542* Place the content widget above a position5543*/5544ABOVE = 1,5545/**5546* Place the content widget below a position5547*/5548BELOW = 25549}55505551/**5552* A position for rendering content widgets.5553*/5554export interface IContentWidgetPosition {5555/**5556* Desired position which serves as an anchor for placing the content widget.5557* The widget will be placed above, at, or below the specified position, based on the5558* provided preference. The widget will always touch this position.5559*5560* Given sufficient horizontal space, the widget will be placed to the right of the5561* passed in position. This can be tweaked by providing a `secondaryPosition`.5562*5563* @see preference5564* @see secondaryPosition5565*/5566position: IPosition | null;5567/**5568* Optionally, a secondary position can be provided to further define the placing of5569* the content widget. The secondary position must have the same line number as the5570* primary position. If possible, the widget will be placed such that it also touches5571* the secondary position.5572*/5573secondaryPosition?: IPosition | null;5574/**5575* Placement preference for position, in order of preference.5576*/5577preference: ContentWidgetPositionPreference[];5578/**5579* Placement preference when multiple view positions refer to the same (model) position.5580* This plays a role when injected text is involved.5581*/5582positionAffinity?: PositionAffinity;5583}55845585/**5586* A content widget renders inline with the text and can be easily placed 'near' an editor position.5587*/5588export interface IContentWidget {5589/**5590* Render this content widget in a location where it could overflow the editor's view dom node.5591*/5592allowEditorOverflow?: boolean;5593/**5594* If true, this widget doesn't have a visual representation.5595* The element will have display set to 'none'.5596*/5597useDisplayNone?: boolean;5598/**5599* Call preventDefault() on mousedown events that target the content widget.5600*/5601suppressMouseDown?: boolean;5602/**5603* Get a unique identifier of the content widget.5604*/5605getId(): string;5606/**5607* Get the dom node of the content widget.5608*/5609getDomNode(): HTMLElement;5610/**5611* Get the placement of the content widget.5612* If null is returned, the content widget will be placed off screen.5613*/5614getPosition(): IContentWidgetPosition | null;5615/**5616* Optional function that is invoked before rendering5617* the content widget. If a dimension is returned the editor will5618* attempt to use it.5619*/5620beforeRender?(): IDimension | null;5621/**5622* Optional function that is invoked after rendering the content5623* widget. Is being invoked with the selected position preference5624* or `null` if not rendered.5625*/5626afterRender?(position: ContentWidgetPositionPreference | null, coordinate: IContentWidgetRenderedCoordinate | null): void;5627}56285629/**5630* Coordinatees passed in {@link IContentWidget.afterRender}5631*/5632export interface IContentWidgetRenderedCoordinate {5633/**5634* Top position relative to the editor content.5635*/5636readonly top: number;5637/**5638* Left position relative to the editor content.5639*/5640readonly left: number;5641}56425643/**5644* A positioning preference for rendering overlay widgets.5645*/5646export enum OverlayWidgetPositionPreference {5647/**5648* Position the overlay widget in the top right corner5649*/5650TOP_RIGHT_CORNER = 0,5651/**5652* Position the overlay widget in the bottom right corner5653*/5654BOTTOM_RIGHT_CORNER = 1,5655/**5656* Position the overlay widget in the top center5657*/5658TOP_CENTER = 25659}56605661/**5662* Represents editor-relative coordinates of an overlay widget.5663*/5664export interface IOverlayWidgetPositionCoordinates {5665/**5666* The top position for the overlay widget, relative to the editor.5667*/5668top: number;5669/**5670* The left position for the overlay widget, relative to the editor.5671*/5672left: number;5673}56745675/**5676* A position for rendering overlay widgets.5677*/5678export interface IOverlayWidgetPosition {5679/**5680* The position preference for the overlay widget.5681*/5682preference: OverlayWidgetPositionPreference | IOverlayWidgetPositionCoordinates | null;5683/**5684* When set, stacks with other overlay widgets with the same preference,5685* in an order determined by the ordinal value.5686*/5687stackOrdinal?: number;5688}56895690/**5691* An overlay widgets renders on top of the text.5692*/5693export interface IOverlayWidget {5694/**5695* Event fired when the widget layout changes.5696*/5697readonly onDidLayout?: IEvent<void>;5698/**5699* Render this overlay widget in a location where it could overflow the editor's view dom node.5700*/5701allowEditorOverflow?: boolean;5702/**5703* Get a unique identifier of the overlay widget.5704*/5705getId(): string;5706/**5707* Get the dom node of the overlay widget.5708*/5709getDomNode(): HTMLElement;5710/**5711* Get the placement of the overlay widget.5712* If null is returned, the overlay widget is responsible to place itself.5713*/5714getPosition(): IOverlayWidgetPosition | null;5715/**5716* The editor will ensure that the scroll width is >= than this value.5717*/5718getMinContentWidthInPx?(): number;5719}57205721/**5722* A glyph margin widget renders in the editor glyph margin.5723*/5724export interface IGlyphMarginWidget {5725/**5726* Get a unique identifier of the glyph widget.5727*/5728getId(): string;5729/**5730* Get the dom node of the glyph widget.5731*/5732getDomNode(): HTMLElement;5733/**5734* Get the placement of the glyph widget.5735*/5736getPosition(): IGlyphMarginWidgetPosition;5737}57385739/**5740* A position for rendering glyph margin widgets.5741*/5742export interface IGlyphMarginWidgetPosition {5743/**5744* The glyph margin lane where the widget should be shown.5745*/5746lane: GlyphMarginLane;5747/**5748* The priority order of the widget, used for determining which widget5749* to render when there are multiple.5750*/5751zIndex: number;5752/**5753* The editor range that this widget applies to.5754*/5755range: IRange;5756}57575758/**5759* Type of hit element with the mouse in the editor.5760*/5761export enum MouseTargetType {5762/**5763* Mouse is on top of an unknown element.5764*/5765UNKNOWN = 0,5766/**5767* Mouse is on top of the textarea used for input.5768*/5769TEXTAREA = 1,5770/**5771* Mouse is on top of the glyph margin5772*/5773GUTTER_GLYPH_MARGIN = 2,5774/**5775* Mouse is on top of the line numbers5776*/5777GUTTER_LINE_NUMBERS = 3,5778/**5779* Mouse is on top of the line decorations5780*/5781GUTTER_LINE_DECORATIONS = 4,5782/**5783* Mouse is on top of the whitespace left in the gutter by a view zone.5784*/5785GUTTER_VIEW_ZONE = 5,5786/**5787* Mouse is on top of text in the content.5788*/5789CONTENT_TEXT = 6,5790/**5791* Mouse is on top of empty space in the content (e.g. after line text or below last line)5792*/5793CONTENT_EMPTY = 7,5794/**5795* Mouse is on top of a view zone in the content.5796*/5797CONTENT_VIEW_ZONE = 8,5798/**5799* Mouse is on top of a content widget.5800*/5801CONTENT_WIDGET = 9,5802/**5803* Mouse is on top of the decorations overview ruler.5804*/5805OVERVIEW_RULER = 10,5806/**5807* Mouse is on top of a scrollbar.5808*/5809SCROLLBAR = 11,5810/**5811* Mouse is on top of an overlay widget.5812*/5813OVERLAY_WIDGET = 12,5814/**5815* Mouse is outside of the editor.5816*/5817OUTSIDE_EDITOR = 135818}58195820export interface IBaseMouseTarget {5821/**5822* The target element5823*/5824readonly element: HTMLElement | null;5825/**5826* The 'approximate' editor position5827*/5828readonly position: Position | null;5829/**5830* Desired mouse column (e.g. when position.column gets clamped to text length -- clicking after text on a line).5831*/5832readonly mouseColumn: number;5833/**5834* The 'approximate' editor range5835*/5836readonly range: Range | null;5837}58385839export interface IMouseTargetUnknown extends IBaseMouseTarget {5840readonly type: MouseTargetType.UNKNOWN;5841}58425843export interface IMouseTargetTextarea extends IBaseMouseTarget {5844readonly type: MouseTargetType.TEXTAREA;5845readonly position: null;5846readonly range: null;5847}58485849export interface IMouseTargetMarginData {5850readonly isAfterLines: boolean;5851readonly glyphMarginLeft: number;5852readonly glyphMarginWidth: number;5853readonly glyphMarginLane?: GlyphMarginLane;5854readonly lineNumbersWidth: number;5855readonly offsetX: number;5856}58575858export interface IMouseTargetMargin extends IBaseMouseTarget {5859readonly type: MouseTargetType.GUTTER_GLYPH_MARGIN | MouseTargetType.GUTTER_LINE_NUMBERS | MouseTargetType.GUTTER_LINE_DECORATIONS;5860readonly position: Position;5861readonly range: Range;5862readonly detail: IMouseTargetMarginData;5863}58645865export interface IMouseTargetViewZoneData {5866readonly viewZoneId: string;5867readonly positionBefore: Position | null;5868readonly positionAfter: Position | null;5869readonly position: Position;5870readonly afterLineNumber: number;5871}58725873export interface IMouseTargetViewZone extends IBaseMouseTarget {5874readonly type: MouseTargetType.GUTTER_VIEW_ZONE | MouseTargetType.CONTENT_VIEW_ZONE;5875readonly position: Position;5876readonly range: Range;5877readonly detail: IMouseTargetViewZoneData;5878}58795880export interface IMouseTargetContentTextData {5881readonly mightBeForeignElement: boolean;5882}58835884export interface IMouseTargetContentText extends IBaseMouseTarget {5885readonly type: MouseTargetType.CONTENT_TEXT;5886readonly position: Position;5887readonly range: Range;5888readonly detail: IMouseTargetContentTextData;5889}58905891export interface IMouseTargetContentEmptyData {5892readonly isAfterLines: boolean;5893readonly horizontalDistanceToText?: number;5894}58955896export interface IMouseTargetContentEmpty extends IBaseMouseTarget {5897readonly type: MouseTargetType.CONTENT_EMPTY;5898readonly position: Position;5899readonly range: Range;5900readonly detail: IMouseTargetContentEmptyData;5901}59025903export interface IMouseTargetContentWidget extends IBaseMouseTarget {5904readonly type: MouseTargetType.CONTENT_WIDGET;5905readonly position: null;5906readonly range: null;5907readonly detail: string;5908}59095910export interface IMouseTargetOverlayWidget extends IBaseMouseTarget {5911readonly type: MouseTargetType.OVERLAY_WIDGET;5912readonly position: null;5913readonly range: null;5914readonly detail: string;5915}59165917export interface IMouseTargetScrollbar extends IBaseMouseTarget {5918readonly type: MouseTargetType.SCROLLBAR;5919readonly position: Position;5920readonly range: Range;5921}59225923export interface IMouseTargetOverviewRuler extends IBaseMouseTarget {5924readonly type: MouseTargetType.OVERVIEW_RULER;5925}59265927export interface IMouseTargetOutsideEditor extends IBaseMouseTarget {5928readonly type: MouseTargetType.OUTSIDE_EDITOR;5929readonly outsidePosition: 'above' | 'below' | 'left' | 'right';5930readonly outsideDistance: number;5931}59325933/**5934* Target hit with the mouse in the editor.5935*/5936export type IMouseTarget = (IMouseTargetUnknown | IMouseTargetTextarea | IMouseTargetMargin | IMouseTargetViewZone | IMouseTargetContentText | IMouseTargetContentEmpty | IMouseTargetContentWidget | IMouseTargetOverlayWidget | IMouseTargetScrollbar | IMouseTargetOverviewRuler | IMouseTargetOutsideEditor);59375938/**5939* A mouse event originating from the editor.5940*/5941export interface IEditorMouseEvent {5942readonly event: IMouseEvent;5943readonly target: IMouseTarget;5944}59455946export interface IPartialEditorMouseEvent {5947readonly event: IMouseEvent;5948readonly target: IMouseTarget | null;5949}59505951/**5952* A paste event originating from the editor.5953*/5954export interface IPasteEvent {5955readonly range: Range;5956readonly languageId: string | null;5957readonly clipboardEvent?: ClipboardEvent;5958}59595960export interface IDiffEditorConstructionOptions extends IDiffEditorOptions, IEditorConstructionOptions {5961/**5962* Place overflow widgets inside an external DOM node.5963* Defaults to an internal DOM node.5964*/5965overflowWidgetsDomNode?: HTMLElement;5966/**5967* Aria label for original editor.5968*/5969originalAriaLabel?: string;5970/**5971* Aria label for modified editor.5972*/5973modifiedAriaLabel?: string;5974}59755976/**5977* A rich code editor.5978*/5979export interface ICodeEditor extends IEditor {5980/**5981* An event emitted when the content of the current model has changed.5982* @event5983*/5984readonly onDidChangeModelContent: IEvent<IModelContentChangedEvent>;5985/**5986* An event emitted when the language of the current model has changed.5987* @event5988*/5989readonly onDidChangeModelLanguage: IEvent<IModelLanguageChangedEvent>;5990/**5991* An event emitted when the language configuration of the current model has changed.5992* @event5993*/5994readonly onDidChangeModelLanguageConfiguration: IEvent<IModelLanguageConfigurationChangedEvent>;5995/**5996* An event emitted when the options of the current model has changed.5997* @event5998*/5999readonly onDidChangeModelOptions: IEvent<IModelOptionsChangedEvent>;6000/**6001* An event emitted when the configuration of the editor has changed. (e.g. `editor.updateOptions()`)6002* @event6003*/6004readonly onDidChangeConfiguration: IEvent<ConfigurationChangedEvent>;6005/**6006* An event emitted when the cursor position has changed.6007* @event6008*/6009readonly onDidChangeCursorPosition: IEvent<ICursorPositionChangedEvent>;6010/**6011* An event emitted when the cursor selection has changed.6012* @event6013*/6014readonly onDidChangeCursorSelection: IEvent<ICursorSelectionChangedEvent>;6015/**6016* An event emitted when the model of this editor is about to change (e.g. from `editor.setModel()`).6017* @event6018*/6019readonly onWillChangeModel: IEvent<IModelChangedEvent>;6020/**6021* An event emitted when the model of this editor has changed (e.g. `editor.setModel()`).6022* @event6023*/6024readonly onDidChangeModel: IEvent<IModelChangedEvent>;6025/**6026* An event emitted when the decorations of the current model have changed.6027* @event6028*/6029readonly onDidChangeModelDecorations: IEvent<IModelDecorationsChangedEvent>;6030/**6031* An event emitted when the text inside this editor gained focus (i.e. cursor starts blinking).6032* @event6033*/6034readonly onDidFocusEditorText: IEvent<void>;6035/**6036* An event emitted when the text inside this editor lost focus (i.e. cursor stops blinking).6037* @event6038*/6039readonly onDidBlurEditorText: IEvent<void>;6040/**6041* An event emitted when the text inside this editor or an editor widget gained focus.6042* @event6043*/6044readonly onDidFocusEditorWidget: IEvent<void>;6045/**6046* An event emitted when the text inside this editor or an editor widget lost focus.6047* @event6048*/6049readonly onDidBlurEditorWidget: IEvent<void>;6050/**6051* Boolean indicating whether input is in composition6052*/6053readonly inComposition: boolean;6054/**6055* An event emitted after composition has started.6056*/6057readonly onDidCompositionStart: IEvent<void>;6058/**6059* An event emitted after composition has ended.6060*/6061readonly onDidCompositionEnd: IEvent<void>;6062/**6063* An event emitted when editing failed because the editor is read-only.6064* @event6065*/6066readonly onDidAttemptReadOnlyEdit: IEvent<void>;6067/**6068* An event emitted when users paste text in the editor.6069* @event6070*/6071readonly onDidPaste: IEvent<IPasteEvent>;6072/**6073* An event emitted on a "mouseup".6074* @event6075*/6076readonly onMouseUp: IEvent<IEditorMouseEvent>;6077/**6078* An event emitted on a "mousedown".6079* @event6080*/6081readonly onMouseDown: IEvent<IEditorMouseEvent>;6082/**6083* An event emitted on a "contextmenu".6084* @event6085*/6086readonly onContextMenu: IEvent<IEditorMouseEvent>;6087/**6088* An event emitted on a "mousemove".6089* @event6090*/6091readonly onMouseMove: IEvent<IEditorMouseEvent>;6092/**6093* An event emitted on a "mouseleave".6094* @event6095*/6096readonly onMouseLeave: IEvent<IPartialEditorMouseEvent>;6097/**6098* An event emitted on a "keyup".6099* @event6100*/6101readonly onKeyUp: IEvent<IKeyboardEvent>;6102/**6103* An event emitted on a "keydown".6104* @event6105*/6106readonly onKeyDown: IEvent<IKeyboardEvent>;6107/**6108* An event emitted when the layout of the editor has changed.6109* @event6110*/6111readonly onDidLayoutChange: IEvent<EditorLayoutInfo>;6112/**6113* An event emitted when the content width or content height in the editor has changed.6114* @event6115*/6116readonly onDidContentSizeChange: IEvent<IContentSizeChangedEvent>;6117/**6118* An event emitted when the scroll in the editor has changed.6119* @event6120*/6121readonly onDidScrollChange: IEvent<IScrollEvent>;6122/**6123* An event emitted when hidden areas change in the editor (e.g. due to folding).6124* @event6125*/6126readonly onDidChangeHiddenAreas: IEvent<void>;6127/**6128* Some editor operations fire multiple events at once.6129* To allow users to react to multiple events fired by a single operation,6130* the editor fires a begin update before the operation and an end update after the operation.6131* Whenever the editor fires `onBeginUpdate`, it will also fire `onEndUpdate` once the operation finishes.6132* Note that not all operations are bracketed by `onBeginUpdate` and `onEndUpdate`.6133*/6134readonly onBeginUpdate: IEvent<void>;6135/**6136* Fires after the editor completes the operation it fired `onBeginUpdate` for.6137*/6138readonly onEndUpdate: IEvent<void>;6139readonly onDidChangeViewZones: IEvent<void>;6140/**6141* Saves current view state of the editor in a serializable object.6142*/6143saveViewState(): ICodeEditorViewState | null;6144/**6145* Restores the view state of the editor from a serializable object generated by `saveViewState`.6146*/6147restoreViewState(state: ICodeEditorViewState | null): void;6148/**6149* Returns true if the text inside this editor or an editor widget has focus.6150*/6151hasWidgetFocus(): boolean;6152/**6153* Get a contribution of this editor.6154* @id Unique identifier of the contribution.6155* @return The contribution or null if contribution not found.6156*/6157getContribution<T extends IEditorContribution>(id: string): T | null;6158/**6159* Type the getModel() of IEditor.6160*/6161getModel(): ITextModel | null;6162/**6163* Sets the current model attached to this editor.6164* If the previous model was created by the editor via the value key in the options6165* literal object, it will be destroyed. Otherwise, if the previous model was set6166* via setModel, or the model key in the options literal object, the previous model6167* will not be destroyed.6168* It is safe to call setModel(null) to simply detach the current model from the editor.6169*/6170setModel(model: ITextModel | null): void;6171/**6172* Gets all the editor computed options.6173*/6174getOptions(): IComputedEditorOptions;6175/**6176* Gets a specific editor option.6177*/6178getOption<T extends EditorOption>(id: T): FindComputedEditorOptionValueById<T>;6179/**6180* Returns the editor's configuration (without any validation or defaults).6181*/6182getRawOptions(): IEditorOptions;6183/**6184* Get value of the current model attached to this editor.6185* @see {@link ITextModel.getValue}6186*/6187getValue(options?: {6188preserveBOM: boolean;6189lineEnding: string;6190}): string;6191/**6192* Set the value of the current model attached to this editor.6193* @see {@link ITextModel.setValue}6194*/6195setValue(newValue: string): void;6196/**6197* Get the width of the editor's content.6198* This is information that is "erased" when computing `scrollWidth = Math.max(contentWidth, width)`6199*/6200getContentWidth(): number;6201/**6202* Get the scrollWidth of the editor's viewport.6203*/6204getScrollWidth(): number;6205/**6206* Get the scrollLeft of the editor's viewport.6207*/6208getScrollLeft(): number;6209/**6210* Get the height of the editor's content.6211* This is information that is "erased" when computing `scrollHeight = Math.max(contentHeight, height)`6212*/6213getContentHeight(): number;6214/**6215* Get the scrollHeight of the editor's viewport.6216*/6217getScrollHeight(): number;6218/**6219* Get the scrollTop of the editor's viewport.6220*/6221getScrollTop(): number;6222/**6223* Change the scrollLeft of the editor's viewport.6224*/6225setScrollLeft(newScrollLeft: number, scrollType?: ScrollType): void;6226/**6227* Change the scrollTop of the editor's viewport.6228*/6229setScrollTop(newScrollTop: number, scrollType?: ScrollType): void;6230/**6231* Change the scroll position of the editor's viewport.6232*/6233setScrollPosition(position: INewScrollPosition, scrollType?: ScrollType): void;6234/**6235* Check if the editor is currently scrolling towards a different scroll position.6236*/6237hasPendingScrollAnimation(): boolean;6238/**6239* Get an action that is a contribution to this editor.6240* @id Unique identifier of the contribution.6241* @return The action or null if action not found.6242*/6243getAction(id: string): IEditorAction | null;6244/**6245* Execute a command on the editor.6246* The edits will land on the undo-redo stack, but no "undo stop" will be pushed.6247* @param source The source of the call.6248* @param command The command to execute6249*/6250executeCommand(source: string | null | undefined, command: ICommand): void;6251/**6252* Create an "undo stop" in the undo-redo stack.6253*/6254pushUndoStop(): boolean;6255/**6256* Remove the "undo stop" in the undo-redo stack.6257*/6258popUndoStop(): boolean;6259/**6260* Execute edits on the editor.6261* The edits will land on the undo-redo stack, but no "undo stop" will be pushed.6262* @param source The source of the call.6263* @param edits The edits to execute.6264* @param endCursorState Cursor state after the edits were applied.6265*/6266executeEdits(source: string | null | undefined, edits: IIdentifiedSingleEditOperation[], endCursorState?: ICursorStateComputer | Selection[]): boolean;6267/**6268* Execute multiple (concomitant) commands on the editor.6269* @param source The source of the call.6270* @param command The commands to execute6271*/6272executeCommands(source: string | null | undefined, commands: (ICommand | null)[]): void;6273/**6274* Scroll vertically or horizontally as necessary and reveal the current cursors.6275*/6276revealAllCursors(revealHorizontal: boolean, minimalReveal?: boolean): void;6277/**6278* Get all the decorations on a line (filtering out decorations from other editors).6279*/6280getLineDecorations(lineNumber: number): IModelDecoration[] | null;6281/**6282* Get all the decorations for a range (filtering out decorations from other editors).6283*/6284getDecorationsInRange(range: Range): IModelDecoration[] | null;6285/**6286* Get the font size at a given position6287* @param position the position for which to fetch the font size6288*/6289getFontSizeAtPosition(position: IPosition): string | null;6290/**6291* All decorations added through this call will get the ownerId of this editor.6292* @deprecated Use `createDecorationsCollection`6293* @see createDecorationsCollection6294*/6295deltaDecorations(oldDecorations: string[], newDecorations: IModelDeltaDecoration[]): string[];6296/**6297* Remove previously added decorations.6298*/6299removeDecorations(decorationIds: string[]): void;6300/**6301* Get the layout info for the editor.6302*/6303getLayoutInfo(): EditorLayoutInfo;6304/**6305* Returns the ranges that are currently visible.6306* Does not account for horizontal scrolling.6307*/6308getVisibleRanges(): Range[];6309/**6310* Get the vertical position (top offset) for the line's top w.r.t. to the first line.6311*/6312getTopForLineNumber(lineNumber: number, includeViewZones?: boolean): number;6313/**6314* Get the vertical position (top offset) for the line's bottom w.r.t. to the first line.6315*/6316getBottomForLineNumber(lineNumber: number): number;6317/**6318* Get the vertical position (top offset) for the position w.r.t. to the first line.6319*/6320getTopForPosition(lineNumber: number, column: number): number;6321/**6322* Get the line height for a model position.6323*/6324getLineHeightForPosition(position: IPosition): number;6325/**6326* Write the screen reader content to be the current selection6327*/6328writeScreenReaderContent(reason: string): void;6329/**6330* Returns the editor's container dom node6331*/6332getContainerDomNode(): HTMLElement;6333/**6334* Returns the editor's dom node6335*/6336getDomNode(): HTMLElement | null;6337/**6338* Add a content widget. Widgets must have unique ids, otherwise they will be overwritten.6339*/6340addContentWidget(widget: IContentWidget): void;6341/**6342* Layout/Reposition a content widget. This is a ping to the editor to call widget.getPosition()6343* and update appropriately.6344*/6345layoutContentWidget(widget: IContentWidget): void;6346/**6347* Remove a content widget.6348*/6349removeContentWidget(widget: IContentWidget): void;6350/**6351* Add an overlay widget. Widgets must have unique ids, otherwise they will be overwritten.6352*/6353addOverlayWidget(widget: IOverlayWidget): void;6354/**6355* Layout/Reposition an overlay widget. This is a ping to the editor to call widget.getPosition()6356* and update appropriately.6357*/6358layoutOverlayWidget(widget: IOverlayWidget): void;6359/**6360* Remove an overlay widget.6361*/6362removeOverlayWidget(widget: IOverlayWidget): void;6363/**6364* Add a glyph margin widget. Widgets must have unique ids, otherwise they will be overwritten.6365*/6366addGlyphMarginWidget(widget: IGlyphMarginWidget): void;6367/**6368* Layout/Reposition a glyph margin widget. This is a ping to the editor to call widget.getPosition()6369* and update appropriately.6370*/6371layoutGlyphMarginWidget(widget: IGlyphMarginWidget): void;6372/**6373* Remove a glyph margin widget.6374*/6375removeGlyphMarginWidget(widget: IGlyphMarginWidget): void;6376/**6377* Change the view zones. View zones are lost when a new model is attached to the editor.6378*/6379changeViewZones(callback: (accessor: IViewZoneChangeAccessor) => void): void;6380/**6381* Get the horizontal position (left offset) for the column w.r.t to the beginning of the line.6382* This method works only if the line `lineNumber` is currently rendered (in the editor's viewport).6383* Use this method with caution.6384*/6385getOffsetForColumn(lineNumber: number, column: number): number;6386getWidthOfLine(lineNumber: number): number;6387/**6388* Force an editor render now.6389*/6390render(forceRedraw?: boolean): void;6391/**6392* Render the editor at the next animation frame.6393*/6394renderAsync(forceRedraw?: boolean): void;6395/**6396* Get the hit test target at coordinates `clientX` and `clientY`.6397* The coordinates are relative to the top-left of the viewport.6398*6399* @returns Hit test target or null if the coordinates fall outside the editor or the editor has no model.6400*/6401getTargetAtClientPoint(clientX: number, clientY: number): IMouseTarget | null;6402/**6403* Get the visible position for `position`.6404* The result position takes scrolling into account and is relative to the top left corner of the editor.6405* Explanation 1: the results of this method will change for the same `position` if the user scrolls the editor.6406* Explanation 2: the results of this method will not change if the container of the editor gets repositioned.6407* Warning: the results of this method are inaccurate for positions that are outside the current editor viewport.6408*/6409getScrolledVisiblePosition(position: IPosition): {6410top: number;6411left: number;6412height: number;6413} | null;6414/**6415* Apply the same font settings as the editor to `target`.6416*/6417applyFontInfo(target: HTMLElement): void;6418setBanner(bannerDomNode: HTMLElement | null, height: number): void;6419/**6420* Is called when the model has been set, view state was restored and options are updated.6421* This is the best place to compute data for the viewport (such as tokens).6422*/6423handleInitialized?(): void;6424}64256426/**6427* A rich diff editor.6428*/6429export interface IDiffEditor extends IEditor {6430/**6431* @see {@link ICodeEditor.getContainerDomNode}6432*/6433getContainerDomNode(): HTMLElement;6434/**6435* An event emitted when the diff information computed by this diff editor has been updated.6436* @event6437*/6438readonly onDidUpdateDiff: IEvent<void>;6439/**6440* An event emitted when the diff model is changed (i.e. the diff editor shows new content).6441* @event6442*/6443readonly onDidChangeModel: IEvent<void>;6444/**6445* Saves current view state of the editor in a serializable object.6446*/6447saveViewState(): IDiffEditorViewState | null;6448/**6449* Restores the view state of the editor from a serializable object generated by `saveViewState`.6450*/6451restoreViewState(state: IDiffEditorViewState | null): void;6452/**6453* Type the getModel() of IEditor.6454*/6455getModel(): IDiffEditorModel | null;6456createViewModel(model: IDiffEditorModel): IDiffEditorViewModel;6457/**6458* Sets the current model attached to this editor.6459* If the previous model was created by the editor via the value key in the options6460* literal object, it will be destroyed. Otherwise, if the previous model was set6461* via setModel, or the model key in the options literal object, the previous model6462* will not be destroyed.6463* It is safe to call setModel(null) to simply detach the current model from the editor.6464*/6465setModel(model: IDiffEditorModel | IDiffEditorViewModel | null): void;6466/**6467* Get the `original` editor.6468*/6469getOriginalEditor(): ICodeEditor;6470/**6471* Get the `modified` editor.6472*/6473getModifiedEditor(): ICodeEditor;6474/**6475* Get the computed diff information.6476*/6477getLineChanges(): ILineChange[] | null;6478/**6479* Update the editor's options after the editor has been created.6480*/6481updateOptions(newOptions: IDiffEditorOptions): void;6482/**6483* Jumps to the next or previous diff.6484*/6485goToDiff(target: 'next' | 'previous'): void;6486/**6487* Scrolls to the first diff.6488* (Waits until the diff computation finished.)6489*/6490revealFirstDiff(): unknown;6491accessibleDiffViewerNext(): void;6492accessibleDiffViewerPrev(): void;6493handleInitialized(): void;6494}64956496export class FontInfo extends BareFontInfo {6497readonly _editorStylingBrand: void;6498readonly version: number;6499readonly isTrusted: boolean;6500readonly isMonospace: boolean;6501readonly typicalHalfwidthCharacterWidth: number;6502readonly typicalFullwidthCharacterWidth: number;6503readonly canUseHalfwidthRightwardsArrow: boolean;6504readonly spaceWidth: number;6505readonly middotWidth: number;6506readonly wsmiddotWidth: number;6507readonly maxDigitWidth: number;6508}65096510export class BareFontInfo {6511readonly _bareFontInfoBrand: void;6512readonly pixelRatio: number;6513readonly fontFamily: string;6514readonly fontWeight: string;6515readonly fontSize: number;6516readonly fontFeatureSettings: string;6517readonly fontVariationSettings: string;6518readonly lineHeight: number;6519readonly letterSpacing: number;6520}65216522export const EditorZoom: IEditorZoom;65236524export interface IEditorZoom {6525readonly onDidChangeZoomLevel: IEvent<number>;6526getZoomLevel(): number;6527setZoomLevel(zoomLevel: number): void;6528}65296530//compatibility:6531export type IReadOnlyModel = ITextModel;6532export type IModel = ITextModel;6533}65346535declare namespace monaco.languages {653665376538export class EditDeltaInfo {6539readonly linesAdded: number;6540readonly linesRemoved: number;6541readonly charsAdded: number;6542readonly charsRemoved: number;6543static fromText(text: string): EditDeltaInfo;6544static tryCreate(linesAdded: number | undefined, linesRemoved: number | undefined, charsAdded: number | undefined, charsRemoved: number | undefined): EditDeltaInfo | undefined;6545constructor(linesAdded: number, linesRemoved: number, charsAdded: number, charsRemoved: number);6546}6547export interface IRelativePattern {6548/**6549* A base file path to which this pattern will be matched against relatively.6550*/6551readonly base: string;6552/**6553* A file glob pattern like `*.{ts,js}` that will be matched on file paths6554* relative to the base path.6555*6556* Example: Given a base of `/home/work/folder` and a file path of `/home/work/folder/index.js`,6557* the file glob pattern will match on `index.js`.6558*/6559readonly pattern: string;6560}65616562export type LanguageSelector = string | LanguageFilter | ReadonlyArray<string | LanguageFilter>;65636564export interface LanguageFilter {6565readonly language?: string;6566readonly scheme?: string;6567readonly pattern?: string | IRelativePattern;6568readonly notebookType?: string;6569/**6570* This provider is implemented in the UI thread.6571*/6572readonly hasAccessToAllModels?: boolean;6573readonly exclusive?: boolean;6574/**6575* This provider comes from a builtin extension.6576*/6577readonly isBuiltin?: boolean;6578}65796580/**6581* Register information about a new language.6582*/6583export function register(language: ILanguageExtensionPoint): void;65846585/**6586* Get the information of all the registered languages.6587*/6588export function getLanguages(): ILanguageExtensionPoint[];65896590export function getEncodedLanguageId(languageId: string): number;65916592/**6593* An event emitted when a language is associated for the first time with a text model.6594* @event6595*/6596export function onLanguage(languageId: string, callback: () => void): IDisposable;65976598/**6599* An event emitted when a language is associated for the first time with a text model or6600* when a language is encountered during the tokenization of another language.6601* @event6602*/6603export function onLanguageEncountered(languageId: string, callback: () => void): IDisposable;66046605/**6606* Set the editing configuration for a language.6607*/6608export function setLanguageConfiguration(languageId: string, configuration: LanguageConfiguration): IDisposable;66096610/**6611* A token.6612*/6613export interface IToken {6614startIndex: number;6615scopes: string;6616}66176618/**6619* The result of a line tokenization.6620*/6621export interface ILineTokens {6622/**6623* The list of tokens on the line.6624*/6625tokens: IToken[];6626/**6627* The tokenization end state.6628* A pointer will be held to this and the object should not be modified by the tokenizer after the pointer is returned.6629*/6630endState: IState;6631}66326633/**6634* The result of a line tokenization.6635*/6636export interface IEncodedLineTokens {6637/**6638* The tokens on the line in a binary, encoded format. Each token occupies two array indices. For token i:6639* - at offset 2*i => startIndex6640* - at offset 2*i + 1 => metadata6641* Meta data is in binary format:6642* - -------------------------------------------6643* 3322 2222 2222 1111 1111 1100 0000 00006644* 1098 7654 3210 9876 5432 1098 7654 32106645* - -------------------------------------------6646* bbbb bbbb bfff ffff ffFF FFTT LLLL LLLL6647* - -------------------------------------------6648* - L = EncodedLanguageId (8 bits): Use `getEncodedLanguageId` to get the encoded ID of a language.6649* - T = StandardTokenType (2 bits): Other = 0, Comment = 1, String = 2, RegEx = 3.6650* - F = FontStyle (4 bits): None = 0, Italic = 1, Bold = 2, Underline = 4, Strikethrough = 8.6651* - f = foreground ColorId (9 bits)6652* - b = background ColorId (9 bits)6653* - The color value for each colorId is defined in IStandaloneThemeData.customTokenColors:6654* e.g. colorId = 1 is stored in IStandaloneThemeData.customTokenColors[1]. Color id = 0 means no color,6655* id = 1 is for the default foreground color, id = 2 for the default background.6656*/6657tokens: Uint32Array;6658/**6659* The tokenization end state.6660* A pointer will be held to this and the object should not be modified by the tokenizer after the pointer is returned.6661*/6662endState: IState;6663}66646665/**6666* A factory for token providers.6667*/6668export interface TokensProviderFactory {6669create(): ProviderResult<TokensProvider | EncodedTokensProvider | IMonarchLanguage>;6670}66716672/**6673* A "manual" provider of tokens.6674*/6675export interface TokensProvider {6676/**6677* The initial state of a language. Will be the state passed in to tokenize the first line.6678*/6679getInitialState(): IState;6680/**6681* Tokenize a line given the state at the beginning of the line.6682*/6683tokenize(line: string, state: IState): ILineTokens;6684}66856686/**6687* A "manual" provider of tokens, returning tokens in a binary form.6688*/6689export interface EncodedTokensProvider {6690/**6691* The initial state of a language. Will be the state passed in to tokenize the first line.6692*/6693getInitialState(): IState;6694/**6695* Tokenize a line given the state at the beginning of the line.6696*/6697tokenizeEncoded(line: string, state: IState): IEncodedLineTokens;6698/**6699* Tokenize a line given the state at the beginning of the line.6700*/6701tokenize?(line: string, state: IState): ILineTokens;6702}67036704/**6705* Change the color map that is used for token colors.6706* Supported formats (hex): #RRGGBB, $RRGGBBAA, #RGB, #RGBA6707*/6708export function setColorMap(colorMap: string[] | null): void;67096710/**6711* Register a tokens provider factory for a language. This tokenizer will be exclusive with a tokenizer6712* set using `setTokensProvider` or one created using `setMonarchTokensProvider`, but will work together6713* with a tokens provider set using `registerDocumentSemanticTokensProvider` or `registerDocumentRangeSemanticTokensProvider`.6714*/6715export function registerTokensProviderFactory(languageId: string, factory: TokensProviderFactory): IDisposable;67166717/**6718* Set the tokens provider for a language (manual implementation). This tokenizer will be exclusive6719* with a tokenizer created using `setMonarchTokensProvider`, or with `registerTokensProviderFactory`,6720* but will work together with a tokens provider set using `registerDocumentSemanticTokensProvider`6721* or `registerDocumentRangeSemanticTokensProvider`.6722*/6723export function setTokensProvider(languageId: string, provider: TokensProvider | EncodedTokensProvider | Thenable<TokensProvider | EncodedTokensProvider>): IDisposable;67246725/**6726* Set the tokens provider for a language (monarch implementation). This tokenizer will be exclusive6727* with a tokenizer set using `setTokensProvider`, or with `registerTokensProviderFactory`, but will6728* work together with a tokens provider set using `registerDocumentSemanticTokensProvider` or6729* `registerDocumentRangeSemanticTokensProvider`.6730*/6731export function setMonarchTokensProvider(languageId: string, languageDef: IMonarchLanguage | Thenable<IMonarchLanguage>): IDisposable;67326733/**6734* Register a reference provider (used by e.g. reference search).6735*/6736export function registerReferenceProvider(languageSelector: LanguageSelector, provider: ReferenceProvider): IDisposable;67376738/**6739* Register a rename provider (used by e.g. rename symbol).6740*/6741export function registerRenameProvider(languageSelector: LanguageSelector, provider: RenameProvider): IDisposable;67426743/**6744* Register a new symbol-name provider (e.g., when a symbol is being renamed, show new possible symbol-names)6745*/6746export function registerNewSymbolNameProvider(languageSelector: LanguageSelector, provider: NewSymbolNamesProvider): IDisposable;67476748/**6749* Register a signature help provider (used by e.g. parameter hints).6750*/6751export function registerSignatureHelpProvider(languageSelector: LanguageSelector, provider: SignatureHelpProvider): IDisposable;67526753/**6754* Register a hover provider (used by e.g. editor hover).6755*/6756export function registerHoverProvider(languageSelector: LanguageSelector, provider: HoverProvider): IDisposable;67576758/**6759* Register a document symbol provider (used by e.g. outline).6760*/6761export function registerDocumentSymbolProvider(languageSelector: LanguageSelector, provider: DocumentSymbolProvider): IDisposable;67626763/**6764* Register a document highlight provider (used by e.g. highlight occurrences).6765*/6766export function registerDocumentHighlightProvider(languageSelector: LanguageSelector, provider: DocumentHighlightProvider): IDisposable;67676768/**6769* Register an linked editing range provider.6770*/6771export function registerLinkedEditingRangeProvider(languageSelector: LanguageSelector, provider: LinkedEditingRangeProvider): IDisposable;67726773/**6774* Register a definition provider (used by e.g. go to definition).6775*/6776export function registerDefinitionProvider(languageSelector: LanguageSelector, provider: DefinitionProvider): IDisposable;67776778/**6779* Register a implementation provider (used by e.g. go to implementation).6780*/6781export function registerImplementationProvider(languageSelector: LanguageSelector, provider: ImplementationProvider): IDisposable;67826783/**6784* Register a type definition provider (used by e.g. go to type definition).6785*/6786export function registerTypeDefinitionProvider(languageSelector: LanguageSelector, provider: TypeDefinitionProvider): IDisposable;67876788/**6789* Register a code lens provider (used by e.g. inline code lenses).6790*/6791export function registerCodeLensProvider(languageSelector: LanguageSelector, provider: CodeLensProvider): IDisposable;67926793/**6794* Register a code action provider (used by e.g. quick fix).6795*/6796export function registerCodeActionProvider(languageSelector: LanguageSelector, provider: CodeActionProvider, metadata?: CodeActionProviderMetadata): IDisposable;67976798/**6799* Register a formatter that can handle only entire models.6800*/6801export function registerDocumentFormattingEditProvider(languageSelector: LanguageSelector, provider: DocumentFormattingEditProvider): IDisposable;68026803/**6804* Register a formatter that can handle a range inside a model.6805*/6806export function registerDocumentRangeFormattingEditProvider(languageSelector: LanguageSelector, provider: DocumentRangeFormattingEditProvider): IDisposable;68076808/**6809* Register a formatter than can do formatting as the user types.6810*/6811export function registerOnTypeFormattingEditProvider(languageSelector: LanguageSelector, provider: OnTypeFormattingEditProvider): IDisposable;68126813/**6814* Register a link provider that can find links in text.6815*/6816export function registerLinkProvider(languageSelector: LanguageSelector, provider: LinkProvider): IDisposable;68176818/**6819* Register a completion item provider (use by e.g. suggestions).6820*/6821export function registerCompletionItemProvider(languageSelector: LanguageSelector, provider: CompletionItemProvider): IDisposable;68226823/**6824* Register a document color provider (used by Color Picker, Color Decorator).6825*/6826export function registerColorProvider(languageSelector: LanguageSelector, provider: DocumentColorProvider): IDisposable;68276828/**6829* Register a folding range provider6830*/6831export function registerFoldingRangeProvider(languageSelector: LanguageSelector, provider: FoldingRangeProvider): IDisposable;68326833/**6834* Register a declaration provider6835*/6836export function registerDeclarationProvider(languageSelector: LanguageSelector, provider: DeclarationProvider): IDisposable;68376838/**6839* Register a selection range provider6840*/6841export function registerSelectionRangeProvider(languageSelector: LanguageSelector, provider: SelectionRangeProvider): IDisposable;68426843/**6844* Register a document semantic tokens provider. A semantic tokens provider will complement and enhance a6845* simple top-down tokenizer. Simple top-down tokenizers can be set either via `setMonarchTokensProvider`6846* or `setTokensProvider`.6847*6848* For the best user experience, register both a semantic tokens provider and a top-down tokenizer.6849*/6850export function registerDocumentSemanticTokensProvider(languageSelector: LanguageSelector, provider: DocumentSemanticTokensProvider): IDisposable;68516852/**6853* Register a document range semantic tokens provider. A semantic tokens provider will complement and enhance a6854* simple top-down tokenizer. Simple top-down tokenizers can be set either via `setMonarchTokensProvider`6855* or `setTokensProvider`.6856*6857* For the best user experience, register both a semantic tokens provider and a top-down tokenizer.6858*/6859export function registerDocumentRangeSemanticTokensProvider(languageSelector: LanguageSelector, provider: DocumentRangeSemanticTokensProvider): IDisposable;68606861/**6862* Register an inline completions provider.6863*/6864export function registerInlineCompletionsProvider(languageSelector: LanguageSelector, provider: InlineCompletionsProvider): IDisposable;68656866/**6867* Register an inlay hints provider.6868*/6869export function registerInlayHintsProvider(languageSelector: LanguageSelector, provider: InlayHintsProvider): IDisposable;68706871/**6872* Contains additional diagnostic information about the context in which6873* a [code action](#CodeActionProvider.provideCodeActions) is run.6874*/6875export interface CodeActionContext {6876/**6877* An array of diagnostics.6878*/6879readonly markers: editor.IMarkerData[];6880/**6881* Requested kind of actions to return.6882*/6883readonly only?: string;6884/**6885* The reason why code actions were requested.6886*/6887readonly trigger: CodeActionTriggerType;6888}68896890/**6891* The code action interface defines the contract between extensions and6892* the [light bulb](https://code.visualstudio.com/docs/editor/editingevolved#_code-action) feature.6893*/6894export interface CodeActionProvider {6895/**6896* Provide commands for the given document and range.6897*/6898provideCodeActions(model: editor.ITextModel, range: Range, context: CodeActionContext, token: CancellationToken): ProviderResult<CodeActionList>;6899/**6900* Given a code action fill in the edit. Will only invoked when missing.6901*/6902resolveCodeAction?(codeAction: CodeAction, token: CancellationToken): ProviderResult<CodeAction>;6903}69046905/**6906* Metadata about the type of code actions that a {@link CodeActionProvider} provides.6907*/6908export interface CodeActionProviderMetadata {6909/**6910* List of code action kinds that a {@link CodeActionProvider} may return.6911*6912* This list is used to determine if a given `CodeActionProvider` should be invoked or not.6913* To avoid unnecessary computation, every `CodeActionProvider` should list use `providedCodeActionKinds`. The6914* list of kinds may either be generic, such as `["quickfix", "refactor", "source"]`, or list out every kind provided,6915* such as `["quickfix.removeLine", "source.fixAll" ...]`.6916*/6917readonly providedCodeActionKinds?: readonly string[];6918readonly documentation?: ReadonlyArray<{6919readonly kind: string;6920readonly command: Command;6921}>;6922}69236924/**6925* Configuration for line comments.6926*/6927export interface LineCommentConfig {6928/**6929* The line comment token, like `//`6930*/6931comment: string;6932/**6933* Whether the comment token should not be indented and placed at the first column.6934* Defaults to false.6935*/6936noIndent?: boolean;6937}69386939/**6940* Describes how comments for a language work.6941*/6942export interface CommentRule {6943/**6944* The line comment token, like `// this is a comment`.6945* Can be a string or an object with comment and optional noIndent properties.6946*/6947lineComment?: string | LineCommentConfig | null;6948/**6949* The block comment character pair, like `/* block comment */`6950*/6951blockComment?: CharacterPair | null;6952}69536954/**6955* The language configuration interface defines the contract between extensions and6956* various editor features, like automatic bracket insertion, automatic indentation etc.6957*/6958export interface LanguageConfiguration {6959/**6960* The language's comment settings.6961*/6962comments?: CommentRule;6963/**6964* The language's brackets.6965* This configuration implicitly affects pressing Enter around these brackets.6966*/6967brackets?: CharacterPair[];6968/**6969* The language's word definition.6970* If the language supports Unicode identifiers (e.g. JavaScript), it is preferable6971* to provide a word definition that uses exclusion of known separators.6972* e.g.: A regex that matches anything except known separators (and dot is allowed to occur in a floating point number):6973* /(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g6974*/6975wordPattern?: RegExp;6976/**6977* The language's indentation settings.6978*/6979indentationRules?: IndentationRule;6980/**6981* The language's rules to be evaluated when pressing Enter.6982*/6983onEnterRules?: OnEnterRule[];6984/**6985* The language's auto closing pairs. The 'close' character is automatically inserted with the6986* 'open' character is typed. If not set, the configured brackets will be used.6987*/6988autoClosingPairs?: IAutoClosingPairConditional[];6989/**6990* The language's surrounding pairs. When the 'open' character is typed on a selection, the6991* selected string is surrounded by the open and close characters. If not set, the autoclosing pairs6992* settings will be used.6993*/6994surroundingPairs?: IAutoClosingPair[];6995/**6996* Defines a list of bracket pairs that are colorized depending on their nesting level.6997* If not set, the configured brackets will be used.6998*/6999colorizedBracketPairs?: CharacterPair[];7000/**7001* Defines what characters must be after the cursor for bracket or quote autoclosing to occur when using the \'languageDefined\' autoclosing setting.7002*7003* This is typically the set of characters which can not start an expression, such as whitespace, closing brackets, non-unary operators, etc.7004*/7005autoCloseBefore?: string;7006/**7007* The language's folding rules.7008*/7009folding?: FoldingRules;7010/**7011* **Deprecated** Do not use.7012*7013* @deprecated Will be replaced by a better API soon.7014*/7015__electricCharacterSupport?: {7016docComment?: IDocComment;7017};7018}70197020/**7021* Describes indentation rules for a language.7022*/7023export interface IndentationRule {7024/**7025* If a line matches this pattern, then all the lines after it should be unindented once (until another rule matches).7026*/7027decreaseIndentPattern: RegExp;7028/**7029* If a line matches this pattern, then all the lines after it should be indented once (until another rule matches).7030*/7031increaseIndentPattern: RegExp;7032/**7033* If a line matches this pattern, then **only the next line** after it should be indented once.7034*/7035indentNextLinePattern?: RegExp | null;7036/**7037* If a line matches this pattern, then its indentation should not be changed and it should not be evaluated against the other rules.7038*/7039unIndentedLinePattern?: RegExp | null;7040}70417042/**7043* Describes language specific folding markers such as '#region' and '#endregion'.7044* The start and end regexes will be tested against the contents of all lines and must be designed efficiently:7045* - the regex should start with '^'7046* - regexp flags (i, g) are ignored7047*/7048export interface FoldingMarkers {7049start: RegExp;7050end: RegExp;7051}70527053/**7054* Describes folding rules for a language.7055*/7056export interface FoldingRules {7057/**7058* Used by the indentation based strategy to decide whether empty lines belong to the previous or the next block.7059* A language adheres to the off-side rule if blocks in that language are expressed by their indentation.7060* See [wikipedia](https://en.wikipedia.org/wiki/Off-side_rule) for more information.7061* If not set, `false` is used and empty lines belong to the previous block.7062*/7063offSide?: boolean;7064/**7065* Region markers used by the language.7066*/7067markers?: FoldingMarkers;7068}70697070/**7071* Describes a rule to be evaluated when pressing Enter.7072*/7073export interface OnEnterRule {7074/**7075* This rule will only execute if the text before the cursor matches this regular expression.7076*/7077beforeText: RegExp;7078/**7079* This rule will only execute if the text after the cursor matches this regular expression.7080*/7081afterText?: RegExp;7082/**7083* This rule will only execute if the text above the this line matches this regular expression.7084*/7085previousLineText?: RegExp;7086/**7087* The action to execute.7088*/7089action: EnterAction;7090}70917092/**7093* Definition of documentation comments (e.g. Javadoc/JSdoc)7094*/7095export interface IDocComment {7096/**7097* The string that starts a doc comment (e.g. '/**')7098*/7099open: string;7100/**7101* The string that appears on the last line and closes the doc comment (e.g. ' * /').7102*/7103close?: string;7104}71057106/**7107* A tuple of two characters, like a pair of7108* opening and closing brackets.7109*/7110export type CharacterPair = [string, string];71117112export interface IAutoClosingPair {7113open: string;7114close: string;7115}71167117export interface IAutoClosingPairConditional extends IAutoClosingPair {7118notIn?: string[];7119}71207121/**7122* Describes what to do with the indentation when pressing Enter.7123*/7124export enum IndentAction {7125/**7126* Insert new line and copy the previous line's indentation.7127*/7128None = 0,7129/**7130* Insert new line and indent once (relative to the previous line's indentation).7131*/7132Indent = 1,7133/**7134* Insert two new lines:7135* - the first one indented which will hold the cursor7136* - the second one at the same indentation level7137*/7138IndentOutdent = 2,7139/**7140* Insert new line and outdent once (relative to the previous line's indentation).7141*/7142Outdent = 37143}71447145/**7146* Describes what to do when pressing Enter.7147*/7148export interface EnterAction {7149/**7150* Describe what to do with the indentation.7151*/7152indentAction: IndentAction;7153/**7154* Describes text to be appended after the new line and after the indentation.7155*/7156appendText?: string;7157/**7158* Describes the number of characters to remove from the new line's indentation.7159*/7160removeText?: number;7161}71627163export interface SyntaxNode {7164startIndex: number;7165endIndex: number;7166startPosition: IPosition;7167endPosition: IPosition;7168}71697170export interface QueryCapture {7171name: string;7172text?: string;7173node: SyntaxNode;7174encodedLanguageId: number;7175}71767177/**7178* The state of the tokenizer between two lines.7179* It is useful to store flags such as in multiline comment, etc.7180* The model will clone the previous line's state and pass it in to tokenize the next line.7181*/7182export interface IState {7183clone(): IState;7184equals(other: IState): boolean;7185}71867187/**7188* A provider result represents the values a provider, like the {@link HoverProvider},7189* may return. For once this is the actual result type `T`, like `Hover`, or a thenable that resolves7190* to that type `T`. In addition, `null` and `undefined` can be returned - either directly or from a7191* thenable.7192*/7193export type ProviderResult<T> = T | undefined | null | Thenable<T | undefined | null>;71947195/**7196* A hover represents additional information for a symbol or word. Hovers are7197* rendered in a tooltip-like widget.7198*/7199export interface Hover {7200/**7201* The contents of this hover.7202*/7203contents: IMarkdownString[];7204/**7205* The range to which this hover applies. When missing, the7206* editor will use the range at the current position or the7207* current position itself.7208*/7209range?: IRange;7210/**7211* Can increase the verbosity of the hover7212*/7213canIncreaseVerbosity?: boolean;7214/**7215* Can decrease the verbosity of the hover7216*/7217canDecreaseVerbosity?: boolean;7218}72197220/**7221* The hover provider interface defines the contract between extensions and7222* the [hover](https://code.visualstudio.com/docs/editor/intellisense)-feature.7223*/7224export interface HoverProvider<THover = Hover> {7225/**7226* Provide a hover for the given position, context and document. Multiple hovers at the same7227* position will be merged by the editor. A hover can have a range which defaults7228* to the word range at the position when omitted.7229*/7230provideHover(model: editor.ITextModel, position: Position, token: CancellationToken, context?: HoverContext<THover>): ProviderResult<THover>;7231}72327233export interface HoverContext<THover = Hover> {7234/**7235* Hover verbosity request7236*/7237verbosityRequest?: HoverVerbosityRequest<THover>;7238}72397240export interface HoverVerbosityRequest<THover = Hover> {7241/**7242* The delta by which to increase/decrease the hover verbosity level7243*/7244verbosityDelta: number;7245/**7246* The previous hover for the same position7247*/7248previousHover: THover;7249}72507251export enum HoverVerbosityAction {7252/**7253* Increase the verbosity of the hover7254*/7255Increase = 0,7256/**7257* Decrease the verbosity of the hover7258*/7259Decrease = 17260}72617262export enum CompletionItemKind {7263Method = 0,7264Function = 1,7265Constructor = 2,7266Field = 3,7267Variable = 4,7268Class = 5,7269Struct = 6,7270Interface = 7,7271Module = 8,7272Property = 9,7273Event = 10,7274Operator = 11,7275Unit = 12,7276Value = 13,7277Constant = 14,7278Enum = 15,7279EnumMember = 16,7280Keyword = 17,7281Text = 18,7282Color = 19,7283File = 20,7284Reference = 21,7285Customcolor = 22,7286Folder = 23,7287TypeParameter = 24,7288User = 25,7289Issue = 26,7290Tool = 27,7291Snippet = 287292}72937294export interface CompletionItemLabel {7295label: string;7296detail?: string;7297description?: string;7298}72997300export enum CompletionItemTag {7301Deprecated = 17302}73037304export enum CompletionItemInsertTextRule {7305None = 0,7306/**7307* Adjust whitespace/indentation of multiline insert texts to7308* match the current line indentation.7309*/7310KeepWhitespace = 1,7311/**7312* `insertText` is a snippet.7313*/7314InsertAsSnippet = 47315}73167317export interface CompletionItemRanges {7318insert: IRange;7319replace: IRange;7320}73217322/**7323* A completion item represents a text snippet that is7324* proposed to complete text that is being typed.7325*/7326export interface CompletionItem {7327/**7328* The label of this completion item. By default7329* this is also the text that is inserted when selecting7330* this completion.7331*/7332label: string | CompletionItemLabel;7333/**7334* The kind of this completion item. Based on the kind7335* an icon is chosen by the editor.7336*/7337kind: CompletionItemKind;7338/**7339* A modifier to the `kind` which affect how the item7340* is rendered, e.g. Deprecated is rendered with a strikeout7341*/7342tags?: ReadonlyArray<CompletionItemTag>;7343/**7344* A human-readable string with additional information7345* about this item, like type or symbol information.7346*/7347detail?: string;7348/**7349* A human-readable string that represents a doc-comment.7350*/7351documentation?: string | IMarkdownString;7352/**7353* A string that should be used when comparing this item7354* with other items. When `falsy` the {@link CompletionItem.label label}7355* is used.7356*/7357sortText?: string;7358/**7359* A string that should be used when filtering a set of7360* completion items. When `falsy` the {@link CompletionItem.label label}7361* is used.7362*/7363filterText?: string;7364/**7365* Select this item when showing. *Note* that only one completion item can be selected and7366* that the editor decides which item that is. The rule is that the *first* item of those7367* that match best is selected.7368*/7369preselect?: boolean;7370/**7371* A string or snippet that should be inserted in a document when selecting7372* this completion.7373*/7374insertText: string;7375/**7376* Additional rules (as bitmask) that should be applied when inserting7377* this completion.7378*/7379insertTextRules?: CompletionItemInsertTextRule;7380/**7381* A range of text that should be replaced by this completion item.7382*7383* *Note:* The range must be a {@link Range.isSingleLine single line} and it must7384* {@link Range.contains contain} the position at which completion has been {@link CompletionItemProvider.provideCompletionItems requested}.7385*/7386range: IRange | CompletionItemRanges;7387/**7388* An optional set of characters that when pressed while this completion is active will accept it first and7389* then type that character. *Note* that all commit characters should have `length=1` and that superfluous7390* characters will be ignored.7391*/7392commitCharacters?: string[];7393/**7394* An optional array of additional text edits that are applied when7395* selecting this completion. Edits must not overlap with the main edit7396* nor with themselves.7397*/7398additionalTextEdits?: editor.ISingleEditOperation[];7399/**7400* A command that should be run upon acceptance of this item.7401*/7402command?: Command;7403/**7404* A command that should be run upon acceptance of this item.7405*/7406action?: Command;7407}74087409export interface CompletionList {7410suggestions: CompletionItem[];7411incomplete?: boolean;7412dispose?(): void;7413}74147415/**7416* Info provided on partial acceptance.7417*/7418export interface PartialAcceptInfo {7419kind: PartialAcceptTriggerKind;7420acceptedLength: number;7421}74227423/**7424* How a partial acceptance was triggered.7425*/7426export enum PartialAcceptTriggerKind {7427Word = 0,7428Line = 1,7429Suggest = 27430}74317432/**7433* How a suggest provider was triggered.7434*/7435export enum CompletionTriggerKind {7436Invoke = 0,7437TriggerCharacter = 1,7438TriggerForIncompleteCompletions = 27439}74407441/**7442* Contains additional information about the context in which7443* {@link CompletionItemProvider.provideCompletionItems completion provider} is triggered.7444*/7445export interface CompletionContext {7446/**7447* How the completion was triggered.7448*/7449triggerKind: CompletionTriggerKind;7450/**7451* Character that triggered the completion item provider.7452*7453* `undefined` if provider was not triggered by a character.7454*/7455triggerCharacter?: string;7456}74577458/**7459* The completion item provider interface defines the contract between extensions and7460* the [IntelliSense](https://code.visualstudio.com/docs/editor/intellisense).7461*7462* When computing *complete* completion items is expensive, providers can optionally implement7463* the `resolveCompletionItem`-function. In that case it is enough to return completion7464* items with a {@link CompletionItem.label label} from the7465* {@link CompletionItemProvider.provideCompletionItems provideCompletionItems}-function. Subsequently,7466* when a completion item is shown in the UI and gains focus this provider is asked to resolve7467* the item, like adding {@link CompletionItem.documentation doc-comment} or {@link CompletionItem.detail details}.7468*/7469export interface CompletionItemProvider {7470triggerCharacters?: string[];7471/**7472* Provide completion items for the given position and document.7473*/7474provideCompletionItems(model: editor.ITextModel, position: Position, context: CompletionContext, token: CancellationToken): ProviderResult<CompletionList>;7475/**7476* Given a completion item fill in more data, like {@link CompletionItem.documentation doc-comment}7477* or {@link CompletionItem.detail details}.7478*7479* The editor will only resolve a completion item once.7480*/7481resolveCompletionItem?(item: CompletionItem, token: CancellationToken): ProviderResult<CompletionItem>;7482}74837484/**7485* How an {@link InlineCompletionsProvider inline completion provider} was triggered.7486*/7487export enum InlineCompletionTriggerKind {7488/**7489* Completion was triggered automatically while editing.7490* It is sufficient to return a single completion item in this case.7491*/7492Automatic = 0,7493/**7494* Completion was triggered explicitly by a user gesture.7495* Return multiple completion items to enable cycling through them.7496*/7497Explicit = 17498}74997500/**7501* Arbitrary data that the provider can pass when firing {@link InlineCompletionsProvider.onDidChangeInlineCompletions}.7502* This data is passed back to the provider in {@link InlineCompletionContext.changeHint}.7503*/7504export interface IInlineCompletionChangeHint {7505/**7506* Arbitrary data that the provider can use to identify what triggered the change.7507* This data must be JSON serializable.7508*/7509readonly data?: unknown;7510}75117512export interface InlineCompletionContext {7513/**7514* How the completion was triggered.7515*/7516readonly triggerKind: InlineCompletionTriggerKind;7517readonly selectedSuggestionInfo: SelectedSuggestionInfo | undefined;7518readonly includeInlineEdits: boolean;7519readonly includeInlineCompletions: boolean;7520readonly requestIssuedDateTime: number;7521readonly earliestShownDateTime: number;7522/**7523* The change hint that was passed to {@link InlineCompletionsProvider.onDidChangeInlineCompletions}.7524* Only set if this request was triggered by such an event.7525*/7526readonly changeHint?: IInlineCompletionChangeHint;7527}75287529export interface IInlineCompletionModelInfo {7530models: IInlineCompletionModel[];7531currentModelId: string;7532}75337534export interface IInlineCompletionModel {7535name: string;7536id: string;7537}75387539export class SelectedSuggestionInfo {7540readonly range: IRange;7541readonly text: string;7542readonly completionKind: CompletionItemKind;7543readonly isSnippetText: boolean;7544constructor(range: IRange, text: string, completionKind: CompletionItemKind, isSnippetText: boolean);7545equals(other: SelectedSuggestionInfo): boolean;7546}75477548export interface InlineCompletion {7549/**7550* The text to insert.7551* If the text contains a line break, the range must end at the end of a line.7552* If existing text should be replaced, the existing text must be a prefix of the text to insert.7553*7554* The text can also be a snippet. In that case, a preview with default parameters is shown.7555* When accepting the suggestion, the full snippet is inserted.7556*/7557readonly insertText: string | {7558snippet: string;7559} | undefined;7560/**7561* The range to replace.7562* Must begin and end on the same line.7563* Refers to the current document or `uri` if provided.7564*/7565readonly range?: IRange;7566/**7567* An optional array of additional text edits that are applied when7568* selecting this completion. Edits must not overlap with the main edit7569* nor with themselves.7570* Refers to the current document or `uri` if provided.7571*/7572readonly additionalTextEdits?: editor.ISingleEditOperation[];7573/**7574* The file for which the edit applies to.7575*/7576readonly uri?: UriComponents;7577/**7578* A command that is run upon acceptance of this item.7579*/7580readonly command?: Command;7581readonly gutterMenuLinkAction?: Command;7582/**7583* Is called the first time an inline completion is shown.7584* @deprecated. Use `onDidShow` of the provider instead.7585*/7586readonly shownCommand?: Command;7587/**7588* If set to `true`, unopened closing brackets are removed and unclosed opening brackets are closed.7589* Defaults to `false`.7590*/7591readonly completeBracketPairs?: boolean;7592readonly isInlineEdit?: boolean;7593readonly showInlineEditMenu?: boolean;7594/** Only show the inline suggestion when the cursor is in the showRange. */7595readonly showRange?: IRange;7596readonly warning?: InlineCompletionWarning;7597readonly hint?: IInlineCompletionHint;7598readonly supportsRename?: boolean;7599/**7600* Used for telemetry.7601*/7602readonly correlationId?: string | undefined;7603readonly jumpToPosition?: IPosition;7604readonly doNotLog?: boolean;7605}76067607export interface InlineCompletionWarning {7608message: IMarkdownString | string;7609icon?: IconPath;7610}76117612export enum InlineCompletionHintStyle {7613Code = 1,7614Label = 27615}76167617export interface IInlineCompletionHint {7618/** Refers to the current document. */7619range: IRange;7620style: InlineCompletionHintStyle;7621content: string;7622}76237624export type IconPath = editor.ThemeIcon;76257626export interface InlineCompletions<TItem extends InlineCompletion = InlineCompletion> {7627readonly items: readonly TItem[];7628/**7629* A list of commands associated with the inline completions of this list.7630*/7631readonly commands?: InlineCompletionCommand[];7632readonly suppressSuggestions?: boolean | undefined;7633/**7634* When set and the user types a suggestion without derivating from it, the inline suggestion is not updated.7635*/7636readonly enableForwardStability?: boolean | undefined;7637}76387639export type InlineCompletionCommand = {7640command: Command;7641icon?: editor.ThemeIcon;7642};76437644export type InlineCompletionProviderGroupId = string;76457646export interface InlineCompletionsProvider<T extends InlineCompletions = InlineCompletions> {7647provideInlineCompletions(model: editor.ITextModel, position: Position, context: InlineCompletionContext, token: CancellationToken): ProviderResult<T>;7648/**7649* Will be called when an item is shown.7650* @param updatedInsertText Is useful to understand bracket completion.7651*/7652handleItemDidShow?(completions: T, item: T['items'][number], updatedInsertText: string, editDeltaInfo: EditDeltaInfo): void;7653/**7654* Will be called when an item is partially accepted. TODO: also handle full acceptance here!7655* @param acceptedCharacters Deprecated. Use `info.acceptedCharacters` instead.7656*/7657handlePartialAccept?(completions: T, item: T['items'][number], acceptedCharacters: number, info: PartialAcceptInfo): void;7658/**7659* @deprecated Use `handleEndOfLifetime` instead.7660*/7661handleRejection?(completions: T, item: T['items'][number]): void;7662/**7663* Is called when an inline completion item is no longer being used.7664* Provides a reason of why it is not used anymore.7665*/7666handleEndOfLifetime?(completions: T, item: T['items'][number], reason: InlineCompletionEndOfLifeReason<T['items'][number]>, lifetimeSummary: LifetimeSummary): void;7667/**7668* Will be called when a completions list is no longer in use and can be garbage-collected.7669*/7670disposeInlineCompletions(completions: T, reason: InlineCompletionsDisposeReason): void;7671/**7672* Fired when the provider wants to trigger a new completion request.7673* The event can pass a {@link IInlineCompletionChangeHint} which will be7674* included in the {@link InlineCompletionContext} of the subsequent request.7675*/7676onDidChangeInlineCompletions?: IEvent<IInlineCompletionChangeHint | void>;7677/**7678* Only used for {@link yieldsToGroupIds}.7679* Multiple providers can have the same group id.7680*/7681groupId?: InlineCompletionProviderGroupId;7682/**7683* Returns a list of preferred provider {@link groupId}s.7684* The current provider is only requested for completions if no provider with a preferred group id returned a result.7685*/7686yieldsToGroupIds?: InlineCompletionProviderGroupId[];7687excludesGroupIds?: InlineCompletionProviderGroupId[];7688displayName?: string;7689debounceDelayMs?: number;7690modelInfo?: IInlineCompletionModelInfo;7691onDidModelInfoChange?: IEvent<void>;7692setModelId?(modelId: string): Promise<void>;7693toString?(): string;7694}76957696export type InlineCompletionsDisposeReason = {7697kind: 'lostRace' | 'tokenCancellation' | 'other' | 'empty' | 'notTaken';7698};76997700export enum InlineCompletionEndOfLifeReasonKind {7701Accepted = 0,7702Rejected = 1,7703Ignored = 27704}77057706export type InlineCompletionEndOfLifeReason<TInlineCompletion = InlineCompletion> = {7707kind: InlineCompletionEndOfLifeReasonKind.Accepted;7708alternativeAction: boolean;7709} | {7710kind: InlineCompletionEndOfLifeReasonKind.Rejected;7711} | {7712kind: InlineCompletionEndOfLifeReasonKind.Ignored;7713supersededBy?: TInlineCompletion;7714userTypingDisagreed: boolean;7715};77167717export type LifetimeSummary = {7718requestUuid: string;7719correlationId: string | undefined;7720partiallyAccepted: number;7721partiallyAcceptedCountSinceOriginal: number;7722partiallyAcceptedRatioSinceOriginal: number;7723partiallyAcceptedCharactersSinceOriginal: number;7724shown: boolean;7725shownDuration: number;7726shownDurationUncollapsed: number;7727timeUntilShown: number | undefined;7728timeUntilActuallyShown: number | undefined;7729timeUntilProviderRequest: number;7730timeUntilProviderResponse: number;7731notShownReason: string | undefined;7732editorType: string;7733viewKind: string | undefined;7734preceeded: boolean;7735languageId: string;7736requestReason: string;7737performanceMarkers?: string;7738cursorColumnDistance?: number;7739cursorLineDistance?: number;7740lineCountOriginal?: number;7741lineCountModified?: number;7742characterCountOriginal?: number;7743characterCountModified?: number;7744disjointReplacements?: number;7745sameShapeReplacements?: boolean;7746typingInterval: number;7747typingIntervalCharacterCount: number;7748selectedSuggestionInfo: boolean;7749availableProviders: string;7750skuPlan: string | undefined;7751skuType: string | undefined;7752renameCreated: boolean | undefined;7753renameDuration: number | undefined;7754renameTimedOut: boolean | undefined;7755renameDroppedOtherEdits: number | undefined;7756renameDroppedRenameEdits: number | undefined;7757editKind: string | undefined;7758longDistanceHintVisible?: boolean;7759longDistanceHintDistance?: number;7760};77617762export interface CodeAction {7763title: string;7764command?: Command;7765edit?: WorkspaceEdit;7766diagnostics?: editor.IMarkerData[];7767kind?: string;7768isPreferred?: boolean;7769isAI?: boolean;7770disabled?: string;7771ranges?: IRange[];7772}77737774export enum CodeActionTriggerType {7775Invoke = 1,7776Auto = 27777}77787779export interface CodeActionList extends IDisposable {7780readonly actions: ReadonlyArray<CodeAction>;7781}77827783/**7784* Represents a parameter of a callable-signature. A parameter can7785* have a label and a doc-comment.7786*/7787export interface ParameterInformation {7788/**7789* The label of this signature. Will be shown in7790* the UI.7791*/7792label: string | [number, number];7793/**7794* The human-readable doc-comment of this signature. Will be shown7795* in the UI but can be omitted.7796*/7797documentation?: string | IMarkdownString;7798}77997800/**7801* Represents the signature of something callable. A signature7802* can have a label, like a function-name, a doc-comment, and7803* a set of parameters.7804*/7805export interface SignatureInformation {7806/**7807* The label of this signature. Will be shown in7808* the UI.7809*/7810label: string;7811/**7812* The human-readable doc-comment of this signature. Will be shown7813* in the UI but can be omitted.7814*/7815documentation?: string | IMarkdownString;7816/**7817* The parameters of this signature.7818*/7819parameters: ParameterInformation[];7820/**7821* Index of the active parameter.7822*7823* If provided, this is used in place of `SignatureHelp.activeSignature`.7824*/7825activeParameter?: number;7826}78277828/**7829* Signature help represents the signature of something7830* callable. There can be multiple signatures but only one7831* active and only one active parameter.7832*/7833export interface SignatureHelp {7834/**7835* One or more signatures.7836*/7837signatures: SignatureInformation[];7838/**7839* The active signature.7840*/7841activeSignature: number;7842/**7843* The active parameter of the active signature.7844*/7845activeParameter: number;7846}78477848export interface SignatureHelpResult extends IDisposable {7849value: SignatureHelp;7850}78517852export enum SignatureHelpTriggerKind {7853Invoke = 1,7854TriggerCharacter = 2,7855ContentChange = 37856}78577858export interface SignatureHelpContext {7859readonly triggerKind: SignatureHelpTriggerKind;7860readonly triggerCharacter?: string;7861readonly isRetrigger: boolean;7862readonly activeSignatureHelp?: SignatureHelp;7863}78647865/**7866* The signature help provider interface defines the contract between extensions and7867* the [parameter hints](https://code.visualstudio.com/docs/editor/intellisense)-feature.7868*/7869export interface SignatureHelpProvider {7870readonly signatureHelpTriggerCharacters?: ReadonlyArray<string>;7871readonly signatureHelpRetriggerCharacters?: ReadonlyArray<string>;7872/**7873* Provide help for the signature at the given position and document.7874*/7875provideSignatureHelp(model: editor.ITextModel, position: Position, token: CancellationToken, context: SignatureHelpContext): ProviderResult<SignatureHelpResult>;7876}78777878/**7879* A document highlight kind.7880*/7881export enum DocumentHighlightKind {7882/**7883* A textual occurrence.7884*/7885Text = 0,7886/**7887* Read-access of a symbol, like reading a variable.7888*/7889Read = 1,7890/**7891* Write-access of a symbol, like writing to a variable.7892*/7893Write = 27894}78957896/**7897* A document highlight is a range inside a text document which deserves7898* special attention. Usually a document highlight is visualized by changing7899* the background color of its range.7900*/7901export interface DocumentHighlight {7902/**7903* The range this highlight applies to.7904*/7905range: IRange;7906/**7907* The highlight kind, default is {@link DocumentHighlightKind.Text text}.7908*/7909kind?: DocumentHighlightKind;7910}79117912/**7913* Represents a set of document highlights for a specific Uri.7914*/7915export interface MultiDocumentHighlight {7916/**7917* The Uri of the document that the highlights belong to.7918*/7919uri: Uri;7920/**7921* The set of highlights for the document.7922*/7923highlights: DocumentHighlight[];7924}79257926/**7927* The document highlight provider interface defines the contract between extensions and7928* the word-highlight-feature.7929*/7930export interface DocumentHighlightProvider {7931/**7932* Provide a set of document highlights, like all occurrences of a variable or7933* all exit-points of a function.7934*/7935provideDocumentHighlights(model: editor.ITextModel, position: Position, token: CancellationToken): ProviderResult<DocumentHighlight[]>;7936}79377938/**7939* A provider that can provide document highlights across multiple documents.7940*/7941export interface MultiDocumentHighlightProvider {7942readonly selector: LanguageSelector;7943/**7944* Provide a Map of Uri --> document highlights, like all occurrences of a variable or7945* all exit-points of a function.7946*7947* Used in cases such as split view, notebooks, etc. where there can be multiple documents7948* with shared symbols.7949*7950* @param primaryModel The primary text model.7951* @param position The position at which to provide document highlights.7952* @param otherModels The other text models to search for document highlights.7953* @param token A cancellation token.7954* @returns A map of Uri to document highlights.7955*/7956provideMultiDocumentHighlights(primaryModel: editor.ITextModel, position: Position, otherModels: editor.ITextModel[], token: CancellationToken): ProviderResult<Map<Uri, DocumentHighlight[]>>;7957}79587959/**7960* The linked editing range provider interface defines the contract between extensions and7961* the linked editing feature.7962*/7963export interface LinkedEditingRangeProvider {7964/**7965* Provide a list of ranges that can be edited together.7966*/7967provideLinkedEditingRanges(model: editor.ITextModel, position: Position, token: CancellationToken): ProviderResult<LinkedEditingRanges>;7968}79697970/**7971* Represents a list of ranges that can be edited together along with a word pattern to describe valid contents.7972*/7973export interface LinkedEditingRanges {7974/**7975* A list of ranges that can be edited together. The ranges must have7976* identical length and text content. The ranges cannot overlap7977*/7978ranges: IRange[];7979/**7980* An optional word pattern that describes valid contents for the given ranges.7981* If no pattern is provided, the language configuration's word pattern will be used.7982*/7983wordPattern?: RegExp;7984}79857986/**7987* Value-object that contains additional information when7988* requesting references.7989*/7990export interface ReferenceContext {7991/**7992* Include the declaration of the current symbol.7993*/7994includeDeclaration: boolean;7995}79967997/**7998* The reference provider interface defines the contract between extensions and7999* the [find references](https://code.visualstudio.com/docs/editor/editingevolved#_peek)-feature.8000*/8001export interface ReferenceProvider {8002/**8003* Provide a set of project-wide references for the given position and document.8004*/8005provideReferences(model: editor.ITextModel, position: Position, context: ReferenceContext, token: CancellationToken): ProviderResult<Location[]>;8006}80078008/**8009* Represents a location inside a resource, such as a line8010* inside a text file.8011*/8012export interface Location {8013/**8014* The resource identifier of this location.8015*/8016uri: Uri;8017/**8018* The document range of this locations.8019*/8020range: IRange;8021}80228023export interface LocationLink {8024/**8025* A range to select where this link originates from.8026*/8027originSelectionRange?: IRange;8028/**8029* The target uri this link points to.8030*/8031uri: Uri;8032/**8033* The full range this link points to.8034*/8035range: IRange;8036/**8037* A range to select this link points to. Must be contained8038* in `LocationLink.range`.8039*/8040targetSelectionRange?: IRange;8041}80428043export type Definition = Location | Location[] | LocationLink[];80448045/**8046* The definition provider interface defines the contract between extensions and8047* the [go to definition](https://code.visualstudio.com/docs/editor/editingevolved#_go-to-definition)8048* and peek definition features.8049*/8050export interface DefinitionProvider {8051/**8052* Provide the definition of the symbol at the given position and document.8053*/8054provideDefinition(model: editor.ITextModel, position: Position, token: CancellationToken): ProviderResult<Definition | LocationLink[]>;8055}80568057/**8058* The definition provider interface defines the contract between extensions and8059* the [go to definition](https://code.visualstudio.com/docs/editor/editingevolved#_go-to-definition)8060* and peek definition features.8061*/8062export interface DeclarationProvider {8063/**8064* Provide the declaration of the symbol at the given position and document.8065*/8066provideDeclaration(model: editor.ITextModel, position: Position, token: CancellationToken): ProviderResult<Definition | LocationLink[]>;8067}80688069/**8070* The implementation provider interface defines the contract between extensions and8071* the go to implementation feature.8072*/8073export interface ImplementationProvider {8074/**8075* Provide the implementation of the symbol at the given position and document.8076*/8077provideImplementation(model: editor.ITextModel, position: Position, token: CancellationToken): ProviderResult<Definition | LocationLink[]>;8078}80798080/**8081* The type definition provider interface defines the contract between extensions and8082* the go to type definition feature.8083*/8084export interface TypeDefinitionProvider {8085/**8086* Provide the type definition of the symbol at the given position and document.8087*/8088provideTypeDefinition(model: editor.ITextModel, position: Position, token: CancellationToken): ProviderResult<Definition | LocationLink[]>;8089}80908091/**8092* A symbol kind.8093*/8094export enum SymbolKind {8095File = 0,8096Module = 1,8097Namespace = 2,8098Package = 3,8099Class = 4,8100Method = 5,8101Property = 6,8102Field = 7,8103Constructor = 8,8104Enum = 9,8105Interface = 10,8106Function = 11,8107Variable = 12,8108Constant = 13,8109String = 14,8110Number = 15,8111Boolean = 16,8112Array = 17,8113Object = 18,8114Key = 19,8115Null = 20,8116EnumMember = 21,8117Struct = 22,8118Event = 23,8119Operator = 24,8120TypeParameter = 258121}81228123export enum SymbolTag {8124Deprecated = 18125}81268127export interface DocumentSymbol {8128name: string;8129detail: string;8130kind: SymbolKind;8131tags: ReadonlyArray<SymbolTag>;8132containerName?: string;8133range: IRange;8134selectionRange: IRange;8135children?: DocumentSymbol[];8136}81378138/**8139* The document symbol provider interface defines the contract between extensions and8140* the [go to symbol](https://code.visualstudio.com/docs/editor/editingevolved#_go-to-symbol)-feature.8141*/8142export interface DocumentSymbolProvider {8143displayName?: string;8144/**8145* Provide symbol information for the given document.8146*/8147provideDocumentSymbols(model: editor.ITextModel, token: CancellationToken): ProviderResult<DocumentSymbol[]>;8148}81498150export interface TextEdit {8151range: IRange;8152text: string;8153eol?: editor.EndOfLineSequence;8154}81558156/**8157* Interface used to format a model8158*/8159export interface FormattingOptions {8160/**8161* Size of a tab in spaces.8162*/8163tabSize: number;8164/**8165* Prefer spaces over tabs.8166*/8167insertSpaces: boolean;8168}81698170/**8171* The document formatting provider interface defines the contract between extensions and8172* the formatting-feature.8173*/8174export interface DocumentFormattingEditProvider {8175readonly displayName?: string;8176/**8177* Provide formatting edits for a whole document.8178*/8179provideDocumentFormattingEdits(model: editor.ITextModel, options: FormattingOptions, token: CancellationToken): ProviderResult<TextEdit[]>;8180}81818182/**8183* The document formatting provider interface defines the contract between extensions and8184* the formatting-feature.8185*/8186export interface DocumentRangeFormattingEditProvider {8187readonly displayName?: string;8188/**8189* Provide formatting edits for a range in a document.8190*8191* The given range is a hint and providers can decide to format a smaller8192* or larger range. Often this is done by adjusting the start and end8193* of the range to full syntax nodes.8194*/8195provideDocumentRangeFormattingEdits(model: editor.ITextModel, range: Range, options: FormattingOptions, token: CancellationToken): ProviderResult<TextEdit[]>;8196provideDocumentRangesFormattingEdits?(model: editor.ITextModel, ranges: Range[], options: FormattingOptions, token: CancellationToken): ProviderResult<TextEdit[]>;8197}81988199/**8200* The document formatting provider interface defines the contract between extensions and8201* the formatting-feature.8202*/8203export interface OnTypeFormattingEditProvider {8204autoFormatTriggerCharacters: string[];8205/**8206* Provide formatting edits after a character has been typed.8207*8208* The given position and character should hint to the provider8209* what range the position to expand to, like find the matching `{`8210* when `}` has been entered.8211*/8212provideOnTypeFormattingEdits(model: editor.ITextModel, position: Position, ch: string, options: FormattingOptions, token: CancellationToken): ProviderResult<TextEdit[]>;8213}82148215/**8216* A link inside the editor.8217*/8218export interface ILink {8219range: IRange;8220url?: Uri | string;8221tooltip?: string;8222}82238224export interface ILinksList {8225links: ILink[];8226dispose?(): void;8227}82288229/**8230* A provider of links.8231*/8232export interface LinkProvider {8233provideLinks(model: editor.ITextModel, token: CancellationToken): ProviderResult<ILinksList>;8234resolveLink?: (link: ILink, token: CancellationToken) => ProviderResult<ILink>;8235}82368237/**8238* A color in RGBA format.8239*/8240export interface IColor {8241/**8242* The red component in the range [0-1].8243*/8244readonly red: number;8245/**8246* The green component in the range [0-1].8247*/8248readonly green: number;8249/**8250* The blue component in the range [0-1].8251*/8252readonly blue: number;8253/**8254* The alpha component in the range [0-1].8255*/8256readonly alpha: number;8257}82588259/**8260* String representations for a color8261*/8262export interface IColorPresentation {8263/**8264* The label of this color presentation. It will be shown on the color8265* picker header. By default this is also the text that is inserted when selecting8266* this color presentation.8267*/8268label: string;8269/**8270* An {@link TextEdit edit} which is applied to a document when selecting8271* this presentation for the color.8272*/8273textEdit?: TextEdit;8274/**8275* An optional array of additional {@link TextEdit text edits} that are applied when8276* selecting this color presentation.8277*/8278additionalTextEdits?: TextEdit[];8279}82808281/**8282* A color range is a range in a text model which represents a color.8283*/8284export interface IColorInformation {8285/**8286* The range within the model.8287*/8288range: IRange;8289/**8290* The color represented in this range.8291*/8292color: IColor;8293}82948295/**8296* A provider of colors for editor models.8297*/8298export interface DocumentColorProvider {8299/**8300* Provides the color ranges for a specific model.8301*/8302provideDocumentColors(model: editor.ITextModel, token: CancellationToken): ProviderResult<IColorInformation[]>;8303/**8304* Provide the string representations for a color.8305*/8306provideColorPresentations(model: editor.ITextModel, colorInfo: IColorInformation, token: CancellationToken): ProviderResult<IColorPresentation[]>;8307}83088309export interface SelectionRange {8310range: IRange;8311}83128313export interface SelectionRangeProvider {8314/**8315* Provide ranges that should be selected from the given position.8316*/8317provideSelectionRanges(model: editor.ITextModel, positions: Position[], token: CancellationToken): ProviderResult<SelectionRange[][]>;8318}83198320export interface FoldingContext {8321}83228323/**8324* A provider of folding ranges for editor models.8325*/8326export interface FoldingRangeProvider {8327/**8328* An optional event to signal that the folding ranges from this provider have changed.8329*/8330onDidChange?: IEvent<this>;8331/**8332* Provides the folding ranges for a specific model.8333*/8334provideFoldingRanges(model: editor.ITextModel, context: FoldingContext, token: CancellationToken): ProviderResult<FoldingRange[]>;8335}83368337export interface FoldingRange {8338/**8339* The one-based start line of the range to fold. The folded area starts after the line's last character.8340*/8341start: number;8342/**8343* The one-based end line of the range to fold. The folded area ends with the line's last character.8344*/8345end: number;8346/**8347* Describes the {@link FoldingRangeKind Kind} of the folding range such as {@link FoldingRangeKind.Comment Comment} or8348* {@link FoldingRangeKind.Region Region}. The kind is used to categorize folding ranges and used by commands8349* like 'Fold all comments'. See8350* {@link FoldingRangeKind} for an enumeration of standardized kinds.8351*/8352kind?: FoldingRangeKind;8353}83548355export class FoldingRangeKind {8356value: string;8357/**8358* Kind for folding range representing a comment. The value of the kind is 'comment'.8359*/8360static readonly Comment: FoldingRangeKind;8361/**8362* Kind for folding range representing a import. The value of the kind is 'imports'.8363*/8364static readonly Imports: FoldingRangeKind;8365/**8366* Kind for folding range representing regions (for example marked by `#region`, `#endregion`).8367* The value of the kind is 'region'.8368*/8369static readonly Region: FoldingRangeKind;8370/**8371* Returns a {@link FoldingRangeKind} for the given value.8372*8373* @param value of the kind.8374*/8375static fromValue(value: string): FoldingRangeKind;8376/**8377* Creates a new {@link FoldingRangeKind}.8378*8379* @param value of the kind.8380*/8381constructor(value: string);8382}83838384export interface WorkspaceEditMetadata {8385needsConfirmation: boolean;8386label: string;8387description?: string;8388}83898390export interface WorkspaceFileEditOptions {8391overwrite?: boolean;8392ignoreIfNotExists?: boolean;8393ignoreIfExists?: boolean;8394recursive?: boolean;8395copy?: boolean;8396folder?: boolean;8397skipTrashBin?: boolean;8398maxSize?: number;8399}84008401export interface IWorkspaceFileEdit {8402oldResource?: Uri;8403newResource?: Uri;8404options?: WorkspaceFileEditOptions;8405metadata?: WorkspaceEditMetadata;8406}84078408export interface IWorkspaceTextEdit {8409resource: Uri;8410textEdit: TextEdit & {8411insertAsSnippet?: boolean;8412keepWhitespace?: boolean;8413};8414versionId: number | undefined;8415metadata?: WorkspaceEditMetadata;8416}84178418export interface WorkspaceEdit {8419edits: Array<IWorkspaceTextEdit | IWorkspaceFileEdit | ICustomEdit>;8420}84218422export interface ICustomEdit {8423readonly resource: Uri;8424readonly metadata?: WorkspaceEditMetadata;8425undo(): Promise<void> | void;8426redo(): Promise<void> | void;8427}84288429export interface Rejection {8430rejectReason?: string;8431}84328433export interface RenameLocation {8434range: IRange;8435text: string;8436}84378438export interface RenameProvider {8439provideRenameEdits(model: editor.ITextModel, position: Position, newName: string, token: CancellationToken): ProviderResult<WorkspaceEdit & Rejection>;8440resolveRenameLocation?(model: editor.ITextModel, position: Position, token: CancellationToken): ProviderResult<RenameLocation & Rejection>;8441}84428443export enum NewSymbolNameTag {8444AIGenerated = 18445}84468447export enum NewSymbolNameTriggerKind {8448Invoke = 0,8449Automatic = 18450}84518452export interface NewSymbolName {8453readonly newSymbolName: string;8454readonly tags?: readonly NewSymbolNameTag[];8455}84568457export interface NewSymbolNamesProvider {8458supportsAutomaticNewSymbolNamesTriggerKind?: Promise<boolean | undefined>;8459provideNewSymbolNames(model: editor.ITextModel, range: IRange, triggerKind: NewSymbolNameTriggerKind, token: CancellationToken): ProviderResult<NewSymbolName[]>;8460}84618462export interface Command {8463id: string;8464title: string;8465tooltip?: string;8466arguments?: unknown[];8467}84688469export interface CommentThreadRevealOptions {8470preserveFocus: boolean;8471focusReply: boolean;8472}84738474export interface CommentAuthorInformation {8475name: string;8476iconPath?: UriComponents;8477}84788479export interface PendingCommentThread {8480range: IRange | undefined;8481uri: Uri;8482uniqueOwner: string;8483isReply: boolean;8484comment: PendingComment;8485}84868487export interface PendingComment {8488body: string;8489cursor: IPosition;8490}84918492export interface CodeLens {8493range: IRange;8494id?: string;8495command?: Command;8496}84978498export interface CodeLensList {8499readonly lenses: readonly CodeLens[];8500dispose?(): void;8501}85028503export interface CodeLensProvider {8504onDidChange?: IEvent<this>;8505provideCodeLenses(model: editor.ITextModel, token: CancellationToken): ProviderResult<CodeLensList>;8506resolveCodeLens?(model: editor.ITextModel, codeLens: CodeLens, token: CancellationToken): ProviderResult<CodeLens>;8507}85088509export enum InlayHintKind {8510Type = 1,8511Parameter = 28512}85138514export interface InlayHintLabelPart {8515label: string;8516tooltip?: string | IMarkdownString;8517command?: Command;8518location?: Location;8519}85208521export interface InlayHint {8522label: string | InlayHintLabelPart[];8523tooltip?: string | IMarkdownString;8524textEdits?: TextEdit[];8525position: IPosition;8526kind?: InlayHintKind;8527paddingLeft?: boolean;8528paddingRight?: boolean;8529}85308531export interface InlayHintList {8532hints: InlayHint[];8533dispose(): void;8534}85358536export interface InlayHintsProvider {8537displayName?: string;8538onDidChangeInlayHints?: IEvent<void>;8539provideInlayHints(model: editor.ITextModel, range: Range, token: CancellationToken): ProviderResult<InlayHintList>;8540resolveInlayHint?(hint: InlayHint, token: CancellationToken): ProviderResult<InlayHint>;8541}85428543export interface SemanticTokensLegend {8544readonly tokenTypes: string[];8545readonly tokenModifiers: string[];8546}85478548export interface SemanticTokens {8549readonly resultId?: string;8550readonly data: Uint32Array;8551}85528553export interface SemanticTokensEdit {8554readonly start: number;8555readonly deleteCount: number;8556readonly data?: Uint32Array;8557}85588559export interface SemanticTokensEdits {8560readonly resultId?: string;8561readonly edits: SemanticTokensEdit[];8562}85638564export interface DocumentSemanticTokensProvider {8565readonly onDidChange?: IEvent<void>;8566getLegend(): SemanticTokensLegend;8567provideDocumentSemanticTokens(model: editor.ITextModel, lastResultId: string | null, token: CancellationToken): ProviderResult<SemanticTokens | SemanticTokensEdits>;8568releaseDocumentSemanticTokens(resultId: string | undefined): void;8569}85708571export interface DocumentRangeSemanticTokensProvider {8572readonly onDidChange?: IEvent<void>;8573getLegend(): SemanticTokensLegend;8574provideDocumentRangeSemanticTokens(model: editor.ITextModel, range: Range, token: CancellationToken): ProviderResult<SemanticTokens>;8575}85768577export interface ILanguageExtensionPoint {8578id: string;8579extensions?: string[];8580filenames?: string[];8581filenamePatterns?: string[];8582firstLine?: string;8583aliases?: string[];8584mimetypes?: string[];8585configuration?: Uri;8586}8587/**8588* A Monarch language definition8589*/8590export interface IMonarchLanguage {8591/**8592* map from string to ILanguageRule[]8593*/8594tokenizer: {8595[name: string]: IMonarchLanguageRule[];8596};8597/**8598* is the language case insensitive?8599*/8600ignoreCase?: boolean;8601/**8602* is the language unicode-aware? (i.e., /\u{1D306}/)8603*/8604unicode?: boolean;8605/**8606* if no match in the tokenizer assign this token class (default 'source')8607*/8608defaultToken?: string;8609/**8610* for example [['{','}','delimiter.curly']]8611*/8612brackets?: IMonarchLanguageBracket[];8613/**8614* start symbol in the tokenizer (by default the first entry is used)8615*/8616start?: string;8617/**8618* attach this to every token class (by default '.' + name)8619*/8620tokenPostfix?: string;8621/**8622* include line feeds (in the form of a \n character) at the end of lines8623* Defaults to false8624*/8625includeLF?: boolean;8626/**8627* Other keys that can be referred to by the tokenizer.8628*/8629[key: string]: any;8630}86318632/**8633* A rule is either a regular expression and an action8634* shorthands: [reg,act] == { regex: reg, action: act}8635* and : [reg,act,nxt] == { regex: reg, action: act{ next: nxt }}8636*/8637export type IShortMonarchLanguageRule1 = [string | RegExp, IMonarchLanguageAction];86388639export type IShortMonarchLanguageRule2 = [string | RegExp, IMonarchLanguageAction, string];86408641export interface IExpandedMonarchLanguageRule {8642/**8643* match tokens8644*/8645regex?: string | RegExp;8646/**8647* action to take on match8648*/8649action?: IMonarchLanguageAction;8650/**8651* or an include rule. include all rules from the included state8652*/8653include?: string;8654}86558656export type IMonarchLanguageRule = IShortMonarchLanguageRule1 | IShortMonarchLanguageRule2 | IExpandedMonarchLanguageRule;86578658/**8659* An action is either an array of actions...8660* ... or a case statement with guards...8661* ... or a basic action with a token value.8662*/8663export type IShortMonarchLanguageAction = string;86648665export interface IExpandedMonarchLanguageAction {8666/**8667* array of actions for each parenthesized match group8668*/8669group?: IMonarchLanguageAction[];8670/**8671* map from string to ILanguageAction8672*/8673cases?: Object;8674/**8675* token class (ie. css class) (or "@brackets" or "@rematch")8676*/8677token?: string;8678/**8679* the next state to push, or "@push", "@pop", "@popall"8680*/8681next?: string;8682/**8683* switch to this state8684*/8685switchTo?: string;8686/**8687* go back n characters in the stream8688*/8689goBack?: number;8690/**8691* @open or @close8692*/8693bracket?: string;8694/**8695* switch to embedded language (using the mimetype) or get out using "@pop"8696*/8697nextEmbedded?: string;8698/**8699* log a message to the browser console window8700*/8701log?: string;8702}87038704export type IMonarchLanguageAction = IShortMonarchLanguageAction | IExpandedMonarchLanguageAction | (IShortMonarchLanguageAction | IExpandedMonarchLanguageAction)[];87058706/**8707* This interface can be shortened as an array, ie. ['{','}','delimiter.curly']8708*/8709export interface IMonarchLanguageBracket {8710/**8711* open bracket8712*/8713open: string;8714/**8715* closing bracket8716*/8717close: string;8718/**8719* token class8720*/8721token: string;8722}87238724}87258726declare namespace monaco.worker {872787288729export interface IMirrorTextModel {8730readonly version: number;8731}87328733export interface IMirrorModel extends IMirrorTextModel {8734readonly uri: Uri;8735readonly version: number;8736getValue(): string;8737}87388739export interface IWorkerContext<H = {}> {8740/**8741* A proxy to the main thread host object.8742*/8743host: H;8744/**8745* Get all available mirror models in this worker.8746*/8747getMirrorModels(): IMirrorModel[];8748}87498750}87518752//dtsv=3875387548755