/*---------------------------------------------------------------------------------------------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: any) => any, thisArgs?: any, 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: any): 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;773isSingleLine(): boolean;774static fromPositions(start: IPosition, end?: IPosition): Range;775/**776* Create a `Range` from an `IRange`.777*/778static lift(range: undefined | null): null;779static lift(range: IRange): Range;780static lift(range: IRange | undefined | null): Range | null;781/**782* Test if `obj` is an `IRange`.783*/784static isIRange(obj: any): obj is IRange;785/**786* Test if the two ranges are touching in any way.787*/788static areIntersectingOrTouching(a: IRange, b: IRange): boolean;789/**790* Test if the two ranges are intersecting. If the ranges are touching it returns true.791*/792static areIntersecting(a: IRange, b: IRange): boolean;793/**794* Test if the two ranges are intersecting, but not touching at all.795*/796static areOnlyIntersecting(a: IRange, b: IRange): boolean;797/**798* A function that compares ranges, useful for sorting ranges799* It will first compare ranges on the startPosition and then on the endPosition800*/801static compareRangesUsingStarts(a: IRange | null | undefined, b: IRange | null | undefined): number;802/**803* A function that compares ranges, useful for sorting ranges804* It will first compare ranges on the endPosition and then on the startPosition805*/806static compareRangesUsingEnds(a: IRange, b: IRange): number;807/**808* Test if the range spans multiple lines.809*/810static spansMultipleLines(range: IRange): boolean;811toJSON(): IRange;812}813814/**815* A selection in the editor.816* The selection is a range that has an orientation.817*/818export interface ISelection {819/**820* The line number on which the selection has started.821*/822readonly selectionStartLineNumber: number;823/**824* The column on `selectionStartLineNumber` where the selection has started.825*/826readonly selectionStartColumn: number;827/**828* The line number on which the selection has ended.829*/830readonly positionLineNumber: number;831/**832* The column on `positionLineNumber` where the selection has ended.833*/834readonly positionColumn: number;835}836837/**838* A selection in the editor.839* The selection is a range that has an orientation.840*/841export class Selection extends Range {842/**843* The line number on which the selection has started.844*/845readonly selectionStartLineNumber: number;846/**847* The column on `selectionStartLineNumber` where the selection has started.848*/849readonly selectionStartColumn: number;850/**851* The line number on which the selection has ended.852*/853readonly positionLineNumber: number;854/**855* The column on `positionLineNumber` where the selection has ended.856*/857readonly positionColumn: number;858constructor(selectionStartLineNumber: number, selectionStartColumn: number, positionLineNumber: number, positionColumn: number);859/**860* Transform to a human-readable representation.861*/862toString(): string;863/**864* Test if equals other selection.865*/866equalsSelection(other: ISelection): boolean;867/**868* Test if the two selections are equal.869*/870static selectionsEqual(a: ISelection, b: ISelection): boolean;871/**872* Get directions (LTR or RTL).873*/874getDirection(): SelectionDirection;875/**876* Create a new selection with a different `positionLineNumber` and `positionColumn`.877*/878setEndPosition(endLineNumber: number, endColumn: number): Selection;879/**880* Get the position at `positionLineNumber` and `positionColumn`.881*/882getPosition(): Position;883/**884* Get the position at the start of the selection.885*/886getSelectionStart(): Position;887/**888* Create a new selection with a different `selectionStartLineNumber` and `selectionStartColumn`.889*/890setStartPosition(startLineNumber: number, startColumn: number): Selection;891/**892* Create a `Selection` from one or two positions893*/894static fromPositions(start: IPosition, end?: IPosition): Selection;895/**896* Creates a `Selection` from a range, given a direction.897*/898static fromRange(range: Range, direction: SelectionDirection): Selection;899/**900* Create a `Selection` from an `ISelection`.901*/902static liftSelection(sel: ISelection): Selection;903/**904* `a` equals `b`.905*/906static selectionsArrEqual(a: ISelection[], b: ISelection[]): boolean;907/**908* Test if `obj` is an `ISelection`.909*/910static isISelection(obj: any): obj is ISelection;911/**912* Create with a direction.913*/914static createWithDirection(startLineNumber: number, startColumn: number, endLineNumber: number, endColumn: number, direction: SelectionDirection): Selection;915}916917/**918* The direction of a selection.919*/920export enum SelectionDirection {921/**922* The selection starts above where it ends.923*/924LTR = 0,925/**926* The selection starts below where it ends.927*/928RTL = 1929}930931export class Token {932readonly offset: number;933readonly type: string;934readonly language: string;935_tokenBrand: void;936constructor(offset: number, type: string, language: string);937toString(): string;938}939}940941declare namespace monaco.editor {942943/**944* Create a new editor under `domElement`.945* `domElement` should be empty (not contain other dom nodes).946* The editor will read the size of `domElement`.947*/948export function create(domElement: HTMLElement, options?: IStandaloneEditorConstructionOptions, override?: IEditorOverrideServices): IStandaloneCodeEditor;949950/**951* Emitted when an editor is created.952* Creating a diff editor might cause this listener to be invoked with the two editors.953* @event954*/955export function onDidCreateEditor(listener: (codeEditor: ICodeEditor) => void): IDisposable;956957/**958* Emitted when an diff editor is created.959* @event960*/961export function onDidCreateDiffEditor(listener: (diffEditor: IDiffEditor) => void): IDisposable;962963/**964* Get all the created editors.965*/966export function getEditors(): readonly ICodeEditor[];967968/**969* Get all the created diff editors.970*/971export function getDiffEditors(): readonly IDiffEditor[];972973/**974* Create a new diff editor under `domElement`.975* `domElement` should be empty (not contain other dom nodes).976* The editor will read the size of `domElement`.977*/978export function createDiffEditor(domElement: HTMLElement, options?: IStandaloneDiffEditorConstructionOptions, override?: IEditorOverrideServices): IStandaloneDiffEditor;979980export function createMultiFileDiffEditor(domElement: HTMLElement, override?: IEditorOverrideServices): any;981982/**983* Description of a command contribution984*/985export interface ICommandDescriptor {986/**987* An unique identifier of the contributed command.988*/989id: string;990/**991* Callback that will be executed when the command is triggered.992*/993run: ICommandHandler;994}995996/**997* Add a command.998*/999export function addCommand(descriptor: ICommandDescriptor): IDisposable;10001001/**1002* Add an action to all editors.1003*/1004export function addEditorAction(descriptor: IActionDescriptor): IDisposable;10051006/**1007* A keybinding rule.1008*/1009export interface IKeybindingRule {1010keybinding: number;1011command?: string | null;1012commandArgs?: any;1013when?: string | null;1014}10151016/**1017* Add a keybinding rule.1018*/1019export function addKeybindingRule(rule: IKeybindingRule): IDisposable;10201021/**1022* Add keybinding rules.1023*/1024export function addKeybindingRules(rules: IKeybindingRule[]): IDisposable;10251026/**1027* Create a new editor model.1028* You can specify the language that should be set for this model or let the language be inferred from the `uri`.1029*/1030export function createModel(value: string, language?: string, uri?: Uri): ITextModel;10311032/**1033* Change the language for a model.1034*/1035export function setModelLanguage(model: ITextModel, mimeTypeOrLanguageId: string): void;10361037/**1038* Set the markers for a model.1039*/1040export function setModelMarkers(model: ITextModel, owner: string, markers: IMarkerData[]): void;10411042/**1043* Remove all markers of an owner.1044*/1045export function removeAllMarkers(owner: string): void;10461047/**1048* Get markers for owner and/or resource1049*1050* @returns list of markers1051*/1052export function getModelMarkers(filter: {1053owner?: string;1054resource?: Uri;1055take?: number;1056}): IMarker[];10571058/**1059* Emitted when markers change for a model.1060* @event1061*/1062export function onDidChangeMarkers(listener: (e: readonly Uri[]) => void): IDisposable;10631064/**1065* Get the model that has `uri` if it exists.1066*/1067export function getModel(uri: Uri): ITextModel | null;10681069/**1070* Get all the created models.1071*/1072export function getModels(): ITextModel[];10731074/**1075* Emitted when a model is created.1076* @event1077*/1078export function onDidCreateModel(listener: (model: ITextModel) => void): IDisposable;10791080/**1081* Emitted right before a model is disposed.1082* @event1083*/1084export function onWillDisposeModel(listener: (model: ITextModel) => void): IDisposable;10851086/**1087* Emitted when a different language is set to a model.1088* @event1089*/1090export function onDidChangeModelLanguage(listener: (e: {1091readonly model: ITextModel;1092readonly oldLanguage: string;1093}) => void): IDisposable;10941095/**1096* Create a new web worker that has model syncing capabilities built in.1097* Specify an AMD module to load that will `create` an object that will be proxied.1098*/1099export function createWebWorker<T extends object>(opts: IInternalWebWorkerOptions): MonacoWebWorker<T>;11001101/**1102* Colorize the contents of `domNode` using attribute `data-lang`.1103*/1104export function colorizeElement(domNode: HTMLElement, options: IColorizerElementOptions): Promise<void>;11051106/**1107* Colorize `text` using language `languageId`.1108*/1109export function colorize(text: string, languageId: string, options: IColorizerOptions): Promise<string>;11101111/**1112* Colorize a line in a model.1113*/1114export function colorizeModelLine(model: ITextModel, lineNumber: number, tabSize?: number): string;11151116/**1117* Tokenize `text` using language `languageId`1118*/1119export function tokenize(text: string, languageId: string): Token[][];11201121/**1122* Define a new theme or update an existing theme.1123*/1124export function defineTheme(themeName: string, themeData: IStandaloneThemeData): void;11251126/**1127* Switches to a theme.1128*/1129export function setTheme(themeName: string): void;11301131/**1132* Clears all cached font measurements and triggers re-measurement.1133*/1134export function remeasureFonts(): void;11351136/**1137* Register a command.1138*/1139export function registerCommand(id: string, handler: (accessor: any, ...args: any[]) => void): IDisposable;11401141export interface ILinkOpener {1142open(resource: Uri): boolean | Promise<boolean>;1143}11441145/**1146* 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.1147* The handler that was registered last will be called first when a link is opened.1148*1149* Returns a disposable that can unregister the opener again.1150*/1151export function registerLinkOpener(opener: ILinkOpener): IDisposable;11521153/**1154* Represents an object that can handle editor open operations (e.g. when "go to definition" is called1155* with a resource other than the current model).1156*/1157export interface ICodeEditorOpener {1158/**1159* Callback that is invoked when a resource other than the current model should be opened (e.g. when "go to definition" is called).1160* The callback should return `true` if the request was handled and `false` otherwise.1161* @param source The code editor instance that initiated the request.1162* @param resource The Uri of the resource that should be opened.1163* @param selectionOrPosition An optional position or selection inside the model corresponding to `resource` that can be used to set the cursor.1164*/1165openCodeEditor(source: ICodeEditor, resource: Uri, selectionOrPosition?: IRange | IPosition): boolean | Promise<boolean>;1166}11671168/**1169* 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").1170* The handler callback should return `true` if the request was handled and `false` otherwise.1171*1172* Returns a disposable that can unregister the opener again.1173*1174* If no handler is registered the default behavior is to do nothing for models other than the currently attached one.1175*/1176export function registerEditorOpener(opener: ICodeEditorOpener): IDisposable;11771178export type BuiltinTheme = 'vs' | 'vs-dark' | 'hc-black' | 'hc-light';11791180export interface IStandaloneThemeData {1181base: BuiltinTheme;1182inherit: boolean;1183rules: ITokenThemeRule[];1184encodedTokensColors?: string[];1185colors: IColors;1186}11871188export type IColors = {1189[colorId: string]: string;1190};11911192export interface ITokenThemeRule {1193token: string;1194foreground?: string;1195background?: string;1196fontStyle?: string;1197}11981199/**1200* A web worker that can provide a proxy to an arbitrary file.1201*/1202export interface MonacoWebWorker<T> {1203/**1204* Terminate the web worker, thus invalidating the returned proxy.1205*/1206dispose(): void;1207/**1208* Get a proxy to the arbitrary loaded code.1209*/1210getProxy(): Promise<T>;1211/**1212* Synchronize (send) the models at `resources` to the web worker,1213* making them available in the monaco.worker.getMirrorModels().1214*/1215withSyncedResources(resources: Uri[]): Promise<T>;1216}12171218export interface IInternalWebWorkerOptions {1219/**1220* The worker.1221*/1222worker: Worker | Promise<Worker>;1223/**1224* An object that can be used by the web worker to make calls back to the main thread.1225*/1226host?: any;1227/**1228* Keep idle models.1229* Defaults to false, which means that idle models will stop syncing after a while.1230*/1231keepIdleModels?: boolean;1232}12331234/**1235* Description of an action contribution1236*/1237export interface IActionDescriptor {1238/**1239* An unique identifier of the contributed action.1240*/1241id: string;1242/**1243* A label of the action that will be presented to the user.1244*/1245label: string;1246/**1247* Precondition rule. The value should be a [context key expression](https://code.visualstudio.com/docs/getstarted/keybindings#_when-clause-contexts).1248*/1249precondition?: string;1250/**1251* An array of keybindings for the action.1252*/1253keybindings?: number[];1254/**1255* The keybinding rule (condition on top of precondition).1256*/1257keybindingContext?: string;1258/**1259* Control if the action should show up in the context menu and where.1260* The context menu of the editor has these default:1261* navigation - The navigation group comes first in all cases.1262* 1_modification - This group comes next and contains commands that modify your code.1263* 9_cutcopypaste - The last default group with the basic editing commands.1264* You can also create your own group.1265* Defaults to null (don't show in context menu).1266*/1267contextMenuGroupId?: string;1268/**1269* Control the order in the context menu group.1270*/1271contextMenuOrder?: number;1272/**1273* Method that will be executed when the action is triggered.1274* @param editor The editor instance is passed in as a convenience1275*/1276run(editor: ICodeEditor, ...args: any[]): void | Promise<void>;1277}12781279/**1280* Options which apply for all editors.1281*/1282export interface IGlobalEditorOptions {1283/**1284* The number of spaces a tab is equal to.1285* This setting is overridden based on the file contents when `detectIndentation` is on.1286* Defaults to 4.1287*/1288tabSize?: number;1289/**1290* Insert spaces when pressing `Tab`.1291* This setting is overridden based on the file contents when `detectIndentation` is on.1292* Defaults to true.1293*/1294insertSpaces?: boolean;1295/**1296* Controls whether `tabSize` and `insertSpaces` will be automatically detected when a file is opened based on the file contents.1297* Defaults to true.1298*/1299detectIndentation?: boolean;1300/**1301* Remove trailing auto inserted whitespace.1302* Defaults to true.1303*/1304trimAutoWhitespace?: boolean;1305/**1306* Special handling for large files to disable certain memory intensive features.1307* Defaults to true.1308*/1309largeFileOptimizations?: boolean;1310/**1311* Controls whether completions should be computed based on words in the document.1312* Defaults to true.1313*/1314wordBasedSuggestions?: 'off' | 'currentDocument' | 'matchingDocuments' | 'allDocuments';1315/**1316* Controls whether word based completions should be included from opened documents of the same language or any language.1317*/1318wordBasedSuggestionsOnlySameLanguage?: boolean;1319/**1320* Controls whether the semanticHighlighting is shown for the languages that support it.1321* true: semanticHighlighting is enabled for all themes1322* false: semanticHighlighting is disabled for all themes1323* 'configuredByTheme': semanticHighlighting is controlled by the current color theme's semanticHighlighting setting.1324* Defaults to 'byTheme'.1325*/1326'semanticHighlighting.enabled'?: true | false | 'configuredByTheme';1327/**1328* Keep peek editors open even when double-clicking their content or when hitting `Escape`.1329* Defaults to false.1330*/1331stablePeek?: boolean;1332/**1333* Lines above this length will not be tokenized for performance reasons.1334* Defaults to 20000.1335*/1336maxTokenizationLineLength?: number;1337/**1338* Theme to be used for rendering.1339* The current out-of-the-box available themes are: 'vs' (default), 'vs-dark', 'hc-black', 'hc-light'.1340* You can create custom themes via `monaco.editor.defineTheme`.1341* To switch a theme, use `monaco.editor.setTheme`.1342* **NOTE**: The theme might be overwritten if the OS is in high contrast mode, unless `autoDetectHighContrast` is set to false.1343*/1344theme?: string;1345/**1346* If enabled, will automatically change to high contrast theme if the OS is using a high contrast theme.1347* Defaults to true.1348*/1349autoDetectHighContrast?: boolean;1350}13511352/**1353* The options to create an editor.1354*/1355export interface IStandaloneEditorConstructionOptions extends IEditorConstructionOptions, IGlobalEditorOptions {1356/**1357* The initial model associated with this code editor.1358*/1359model?: ITextModel | null;1360/**1361* The initial value of the auto created model in the editor.1362* To not automatically create a model, use `model: null`.1363*/1364value?: string;1365/**1366* The initial language of the auto created model in the editor.1367* To not automatically create a model, use `model: null`.1368*/1369language?: string;1370/**1371* Initial theme to be used for rendering.1372* The current out-of-the-box available themes are: 'vs' (default), 'vs-dark', 'hc-black', 'hc-light.1373* You can create custom themes via `monaco.editor.defineTheme`.1374* To switch a theme, use `monaco.editor.setTheme`.1375* **NOTE**: The theme might be overwritten if the OS is in high contrast mode, unless `autoDetectHighContrast` is set to false.1376*/1377theme?: string;1378/**1379* If enabled, will automatically change to high contrast theme if the OS is using a high contrast theme.1380* Defaults to true.1381*/1382autoDetectHighContrast?: boolean;1383/**1384* An URL to open when Ctrl+H (Windows and Linux) or Cmd+H (OSX) is pressed in1385* the accessibility help dialog in the editor.1386*1387* Defaults to "https://go.microsoft.com/fwlink/?linkid=852450"1388*/1389accessibilityHelpUrl?: string;1390/**1391* Container element to use for ARIA messages.1392* Defaults to document.body.1393*/1394ariaContainerElement?: HTMLElement;1395}13961397/**1398* The options to create a diff editor.1399*/1400export interface IStandaloneDiffEditorConstructionOptions extends IDiffEditorConstructionOptions {1401/**1402* Initial theme to be used for rendering.1403* The current out-of-the-box available themes are: 'vs' (default), 'vs-dark', 'hc-black', 'hc-light.1404* You can create custom themes via `monaco.editor.defineTheme`.1405* To switch a theme, use `monaco.editor.setTheme`.1406* **NOTE**: The theme might be overwritten if the OS is in high contrast mode, unless `autoDetectHighContrast` is set to false.1407*/1408theme?: string;1409/**1410* If enabled, will automatically change to high contrast theme if the OS is using a high contrast theme.1411* Defaults to true.1412*/1413autoDetectHighContrast?: boolean;1414}14151416export interface IStandaloneCodeEditor extends ICodeEditor {1417updateOptions(newOptions: IEditorOptions & IGlobalEditorOptions): void;1418addCommand(keybinding: number, handler: ICommandHandler, context?: string): string | null;1419createContextKey<T extends ContextKeyValue = ContextKeyValue>(key: string, defaultValue: T): IContextKey<T>;1420addAction(descriptor: IActionDescriptor): IDisposable;1421}14221423export interface IStandaloneDiffEditor extends IDiffEditor {1424addCommand(keybinding: number, handler: ICommandHandler, context?: string): string | null;1425createContextKey<T extends ContextKeyValue = ContextKeyValue>(key: string, defaultValue: T): IContextKey<T>;1426addAction(descriptor: IActionDescriptor): IDisposable;1427getOriginalEditor(): IStandaloneCodeEditor;1428getModifiedEditor(): IStandaloneCodeEditor;1429}1430export interface ICommandHandler {1431(...args: any[]): void;1432}1433export interface ILocalizedString {1434original: string;1435value: string;1436}1437export interface ICommandMetadata {1438readonly description: ILocalizedString | string;1439}14401441export interface IContextKey<T extends ContextKeyValue = ContextKeyValue> {1442set(value: T): void;1443reset(): void;1444get(): T | undefined;1445}14461447export type ContextKeyValue = null | undefined | boolean | number | string | Array<null | undefined | boolean | number | string> | Record<string, null | undefined | boolean | number | string>;14481449export interface IEditorOverrideServices {1450[index: string]: any;1451}14521453export interface IMarker {1454owner: string;1455resource: Uri;1456severity: MarkerSeverity;1457code?: string | {1458value: string;1459target: Uri;1460};1461message: string;1462source?: string;1463startLineNumber: number;1464startColumn: number;1465endLineNumber: number;1466endColumn: number;1467modelVersionId?: number;1468relatedInformation?: IRelatedInformation[];1469tags?: MarkerTag[];1470origin?: string | undefined;1471}14721473/**1474* A structure defining a problem/warning/etc.1475*/1476export interface IMarkerData {1477code?: string | {1478value: string;1479target: Uri;1480};1481severity: MarkerSeverity;1482message: string;1483source?: string;1484startLineNumber: number;1485startColumn: number;1486endLineNumber: number;1487endColumn: number;1488modelVersionId?: number;1489relatedInformation?: IRelatedInformation[];1490tags?: MarkerTag[];1491origin?: string | undefined;1492}14931494/**1495*1496*/1497export interface IRelatedInformation {1498resource: Uri;1499message: string;1500startLineNumber: number;1501startColumn: number;1502endLineNumber: number;1503endColumn: number;1504}15051506export interface IColorizerOptions {1507tabSize?: number;1508}15091510export interface IColorizerElementOptions extends IColorizerOptions {1511theme?: string;1512mimeType?: string;1513}15141515export enum ScrollbarVisibility {1516Auto = 1,1517Hidden = 2,1518Visible = 31519}15201521export interface ThemeColor {1522id: string;1523}15241525export interface ThemeIcon {1526readonly id: string;1527readonly color?: ThemeColor;1528}15291530/**1531* A single edit operation, that acts as a simple replace.1532* i.e. Replace text at `range` with `text` in model.1533*/1534export interface ISingleEditOperation {1535/**1536* The range to replace. This can be empty to emulate a simple insert.1537*/1538range: IRange;1539/**1540* The text to replace with. This can be null to emulate a simple delete.1541*/1542text: string | null;1543/**1544* This indicates that this operation has "insert" semantics.1545* i.e. forceMoveMarkers = true => if `range` is collapsed, all markers at the position will be moved.1546*/1547forceMoveMarkers?: boolean;1548}15491550/**1551* Word inside a model.1552*/1553export interface IWordAtPosition {1554/**1555* The word.1556*/1557readonly word: string;1558/**1559* The column where the word starts.1560*/1561readonly startColumn: number;1562/**1563* The column where the word ends.1564*/1565readonly endColumn: number;1566}15671568/**1569* Vertical Lane in the overview ruler of the editor.1570*/1571export enum OverviewRulerLane {1572Left = 1,1573Center = 2,1574Right = 4,1575Full = 71576}15771578/**1579* Vertical Lane in the glyph margin of the editor.1580*/1581export enum GlyphMarginLane {1582Left = 1,1583Center = 2,1584Right = 31585}15861587export interface IGlyphMarginLanesModel {1588/**1589* The number of lanes that should be rendered in the editor.1590*/1591readonly requiredLanes: number;1592/**1593* Gets the lanes that should be rendered starting at a given line number.1594*/1595getLanesAtLine(lineNumber: number): GlyphMarginLane[];1596/**1597* Resets the model and ensures it can contain at least `maxLine` lines.1598*/1599reset(maxLine: number): void;1600/**1601* Registers that a lane should be visible at the Range in the model.1602* @param persist - if true, notes that the lane should always be visible,1603* even on lines where there's no specific request for that lane.1604*/1605push(lane: GlyphMarginLane, range: Range, persist?: boolean): void;1606}16071608/**1609* Position in the minimap to render the decoration.1610*/1611export enum MinimapPosition {1612Inline = 1,1613Gutter = 21614}16151616/**1617* Section header style.1618*/1619export enum MinimapSectionHeaderStyle {1620Normal = 1,1621Underlined = 21622}16231624export interface IDecorationOptions {1625/**1626* CSS color to render.1627* e.g.: rgba(100, 100, 100, 0.5) or a color from the color registry1628*/1629color: string | ThemeColor | undefined;1630/**1631* CSS color to render.1632* e.g.: rgba(100, 100, 100, 0.5) or a color from the color registry1633*/1634darkColor?: string | ThemeColor;1635}16361637export interface IModelDecorationGlyphMarginOptions {1638/**1639* The position in the glyph margin.1640*/1641position: GlyphMarginLane;1642/**1643* Whether the glyph margin lane in {@link position} should be rendered even1644* outside of this decoration's range.1645*/1646persistLane?: boolean;1647}16481649/**1650* Options for rendering a model decoration in the overview ruler.1651*/1652export interface IModelDecorationOverviewRulerOptions extends IDecorationOptions {1653/**1654* The position in the overview ruler.1655*/1656position: OverviewRulerLane;1657}16581659/**1660* Options for rendering a model decoration in the minimap.1661*/1662export interface IModelDecorationMinimapOptions extends IDecorationOptions {1663/**1664* The position in the minimap.1665*/1666position: MinimapPosition;1667/**1668* If the decoration is for a section header, which header style.1669*/1670sectionHeaderStyle?: MinimapSectionHeaderStyle | null;1671/**1672* If the decoration is for a section header, the header text.1673*/1674sectionHeaderText?: string | null;1675}16761677/**1678* Options for a model decoration.1679*/1680export interface IModelDecorationOptions {1681/**1682* Customize the growing behavior of the decoration when typing at the edges of the decoration.1683* Defaults to TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges1684*/1685stickiness?: TrackedRangeStickiness;1686/**1687* CSS class name describing the decoration.1688*/1689className?: string | null;1690/**1691* Indicates whether the decoration should span across the entire line when it continues onto the next line.1692*/1693shouldFillLineOnLineBreak?: boolean | null;1694blockClassName?: string | null;1695/**1696* Indicates if this block should be rendered after the last line.1697* In this case, the range must be empty and set to the last line.1698*/1699blockIsAfterEnd?: boolean | null;1700blockDoesNotCollapse?: boolean | null;1701blockPadding?: [top: number, right: number, bottom: number, left: number] | null;1702/**1703* Message to be rendered when hovering over the glyph margin decoration.1704*/1705glyphMarginHoverMessage?: IMarkdownString | IMarkdownString[] | null;1706/**1707* Array of MarkdownString to render as the decoration message.1708*/1709hoverMessage?: IMarkdownString | IMarkdownString[] | null;1710/**1711* Array of MarkdownString to render as the line number message.1712*/1713lineNumberHoverMessage?: IMarkdownString | IMarkdownString[] | null;1714/**1715* Should the decoration expand to encompass a whole line.1716*/1717isWholeLine?: boolean;1718/**1719* Always render the decoration (even when the range it encompasses is collapsed).1720*/1721showIfCollapsed?: boolean;1722/**1723* Specifies the stack order of a decoration.1724* A decoration with greater stack order is always in front of a decoration with1725* a lower stack order when the decorations are on the same line.1726*/1727zIndex?: number;1728/**1729* If set, render this decoration in the overview ruler.1730*/1731overviewRuler?: IModelDecorationOverviewRulerOptions | null;1732/**1733* If set, render this decoration in the minimap.1734*/1735minimap?: IModelDecorationMinimapOptions | null;1736/**1737* If set, the decoration will be rendered in the glyph margin with this CSS class name.1738*/1739glyphMarginClassName?: string | null;1740/**1741* If set and the decoration has {@link glyphMarginClassName} set, render this decoration1742* with the specified {@link IModelDecorationGlyphMarginOptions} in the glyph margin.1743*/1744glyphMargin?: IModelDecorationGlyphMarginOptions | null;1745/**1746* If set, the decoration will override the line height of the lines it spans. Maximum value is 300px.1747*/1748lineHeight?: number | null;1749/**1750* Font family1751*/1752fontFamily?: string | null;1753/**1754* Font size1755*/1756fontSize?: string | null;1757/**1758* Font weight1759*/1760fontWeight?: string | null;1761/**1762* Font style1763*/1764fontStyle?: string | null;1765/**1766* If set, the decoration will be rendered in the lines decorations with this CSS class name.1767*/1768linesDecorationsClassName?: string | null;1769/**1770* Controls the tooltip text of the line decoration.1771*/1772linesDecorationsTooltip?: string | null;1773/**1774* If set, the decoration will be rendered on the line number.1775*/1776lineNumberClassName?: string | null;1777/**1778* 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.1779*/1780firstLineDecorationClassName?: string | null;1781/**1782* If set, the decoration will be rendered in the margin (covering its full width) with this CSS class name.1783*/1784marginClassName?: string | null;1785/**1786* If set, the decoration will be rendered inline with the text with this CSS class name.1787* Please use this only for CSS rules that must impact the text. For example, use `className`1788* to have a background color decoration.1789*/1790inlineClassName?: string | null;1791/**1792* If there is an `inlineClassName` which affects letter spacing.1793*/1794inlineClassNameAffectsLetterSpacing?: boolean;1795/**1796* If set, the decoration will be rendered before the text with this CSS class name.1797*/1798beforeContentClassName?: string | null;1799/**1800* If set, the decoration will be rendered after the text with this CSS class name.1801*/1802afterContentClassName?: string | null;1803/**1804* If set, text will be injected in the view after the range.1805*/1806after?: InjectedTextOptions | null;1807/**1808* If set, text will be injected in the view before the range.1809*/1810before?: InjectedTextOptions | null;1811/**1812* The text direction of the decoration.1813*/1814textDirection?: TextDirection | null;1815}18161817/**1818* Text Direction for a decoration.1819*/1820export enum TextDirection {1821LTR = 0,1822RTL = 11823}18241825/**1826* Configures text that is injected into the view without changing the underlying document.1827*/1828export interface InjectedTextOptions {1829/**1830* Sets the text to inject. Must be a single line.1831*/1832readonly content: string;1833/**1834* If set, the decoration will be rendered inline with the text with this CSS class name.1835*/1836readonly inlineClassName?: string | null;1837/**1838* If there is an `inlineClassName` which affects letter spacing.1839*/1840readonly inlineClassNameAffectsLetterSpacing?: boolean;1841/**1842* This field allows to attach data to this injected text.1843* The data can be read when injected texts at a given position are queried.1844*/1845readonly attachedData?: unknown;1846/**1847* Configures cursor stops around injected text.1848* Defaults to {@link InjectedTextCursorStops.Both}.1849*/1850readonly cursorStops?: InjectedTextCursorStops | null;1851}18521853export enum InjectedTextCursorStops {1854Both = 0,1855Right = 1,1856Left = 2,1857None = 31858}18591860/**1861* New model decorations.1862*/1863export interface IModelDeltaDecoration {1864/**1865* Range that this decoration covers.1866*/1867range: IRange;1868/**1869* Options associated with this decoration.1870*/1871options: IModelDecorationOptions;1872}18731874/**1875* A decoration in the model.1876*/1877export interface IModelDecoration {1878/**1879* Identifier for a decoration.1880*/1881readonly id: string;1882/**1883* Identifier for a decoration's owner.1884*/1885readonly ownerId: number;1886/**1887* Range that this decoration covers.1888*/1889readonly range: Range;1890/**1891* Options associated with this decoration.1892*/1893readonly options: IModelDecorationOptions;1894}18951896/**1897* End of line character preference.1898*/1899export enum EndOfLinePreference {1900/**1901* Use the end of line character identified in the text buffer.1902*/1903TextDefined = 0,1904/**1905* Use line feed (\n) as the end of line character.1906*/1907LF = 1,1908/**1909* Use carriage return and line feed (\r\n) as the end of line character.1910*/1911CRLF = 21912}19131914/**1915* The default end of line to use when instantiating models.1916*/1917export enum DefaultEndOfLine {1918/**1919* Use line feed (\n) as the end of line character.1920*/1921LF = 1,1922/**1923* Use carriage return and line feed (\r\n) as the end of line character.1924*/1925CRLF = 21926}19271928/**1929* End of line character preference.1930*/1931export enum EndOfLineSequence {1932/**1933* Use line feed (\n) as the end of line character.1934*/1935LF = 0,1936/**1937* Use carriage return and line feed (\r\n) as the end of line character.1938*/1939CRLF = 11940}19411942/**1943* A single edit operation, that has an identifier.1944*/1945export interface IIdentifiedSingleEditOperation extends ISingleEditOperation {1946}19471948export interface IValidEditOperation {1949/**1950* The range to replace. This can be empty to emulate a simple insert.1951*/1952range: Range;1953/**1954* The text to replace with. This can be empty to emulate a simple delete.1955*/1956text: string;1957}19581959/**1960* A callback that can compute the cursor state after applying a series of edit operations.1961*/1962export interface ICursorStateComputer {1963/**1964* A callback that can compute the resulting cursors state after some edit operations have been executed.1965*/1966(inverseEditOperations: IValidEditOperation[]): Selection[] | null;1967}19681969export class TextModelResolvedOptions {1970_textModelResolvedOptionsBrand: void;1971readonly tabSize: number;1972readonly indentSize: number;1973readonly insertSpaces: boolean;1974readonly defaultEOL: DefaultEndOfLine;1975readonly trimAutoWhitespace: boolean;1976readonly bracketPairColorizationOptions: BracketPairColorizationOptions;1977get originalIndentSize(): number | 'tabSize';1978}19791980export interface BracketPairColorizationOptions {1981enabled: boolean;1982independentColorPoolPerBracketType: boolean;1983}19841985export interface ITextModelUpdateOptions {1986tabSize?: number;1987indentSize?: number | 'tabSize';1988insertSpaces?: boolean;1989trimAutoWhitespace?: boolean;1990bracketColorizationOptions?: BracketPairColorizationOptions;1991}19921993export class FindMatch {1994_findMatchBrand: void;1995readonly range: Range;1996readonly matches: string[] | null;1997}19981999/**2000* Describes the behavior of decorations when typing/editing near their edges.2001* Note: Please do not edit the values, as they very carefully match `DecorationRangeBehavior`2002*/2003export enum TrackedRangeStickiness {2004AlwaysGrowsWhenTypingAtEdges = 0,2005NeverGrowsWhenTypingAtEdges = 1,2006GrowsOnlyWhenTypingBefore = 2,2007GrowsOnlyWhenTypingAfter = 32008}20092010/**2011* Text snapshot that works like an iterator.2012* Will try to return chunks of roughly ~64KB size.2013* Will return null when finished.2014*/2015export interface ITextSnapshot {2016read(): string | null;2017}20182019/**2020* A model.2021*/2022export interface ITextModel {2023/**2024* Gets the resource associated with this editor model.2025*/2026readonly uri: Uri;2027/**2028* A unique identifier associated with this model.2029*/2030readonly id: string;2031/**2032* Get the resolved options for this model.2033*/2034getOptions(): TextModelResolvedOptions;2035/**2036* Get the current version id of the model.2037* Anytime a change happens to the model (even undo/redo),2038* the version id is incremented.2039*/2040getVersionId(): number;2041/**2042* Get the alternative version id of the model.2043* This alternative version id is not always incremented,2044* it will return the same values in the case of undo-redo.2045*/2046getAlternativeVersionId(): number;2047/**2048* Replace the entire text buffer value contained in this model.2049*/2050setValue(newValue: string | ITextSnapshot): void;2051/**2052* Get the text stored in this model.2053* @param eol The end of line character preference. Defaults to `EndOfLinePreference.TextDefined`.2054* @param preserverBOM Preserve a BOM character if it was detected when the model was constructed.2055* @return The text.2056*/2057getValue(eol?: EndOfLinePreference, preserveBOM?: boolean): string;2058/**2059* Get the text stored in this model.2060* @param preserverBOM Preserve a BOM character if it was detected when the model was constructed.2061* @return The text snapshot (it is safe to consume it asynchronously).2062*/2063createSnapshot(preserveBOM?: boolean): ITextSnapshot;2064/**2065* Get the length of the text stored in this model.2066*/2067getValueLength(eol?: EndOfLinePreference, preserveBOM?: boolean): number;2068/**2069* Get the text in a certain range.2070* @param range The range describing what text to get.2071* @param eol The end of line character preference. This will only be used for multiline ranges. Defaults to `EndOfLinePreference.TextDefined`.2072* @return The text.2073*/2074getValueInRange(range: IRange, eol?: EndOfLinePreference): string;2075/**2076* Get the length of text in a certain range.2077* @param range The range describing what text length to get.2078* @return The text length.2079*/2080getValueLengthInRange(range: IRange, eol?: EndOfLinePreference): number;2081/**2082* Get the character count of text in a certain range.2083* @param range The range describing what text length to get.2084*/2085getCharacterCountInRange(range: IRange, eol?: EndOfLinePreference): number;2086/**2087* Get the number of lines in the model.2088*/2089getLineCount(): number;2090/**2091* Get the text for a certain line.2092*/2093getLineContent(lineNumber: number): string;2094/**2095* Get the text length for a certain line.2096*/2097getLineLength(lineNumber: number): number;2098/**2099* Get the text for all lines.2100*/2101getLinesContent(): string[];2102/**2103* Get the end of line sequence predominantly used in the text buffer.2104* @return EOL char sequence (e.g.: '\n' or '\r\n').2105*/2106getEOL(): string;2107/**2108* Get the end of line sequence predominantly used in the text buffer.2109*/2110getEndOfLineSequence(): EndOfLineSequence;2111/**2112* Get the minimum legal column for line at `lineNumber`2113*/2114getLineMinColumn(lineNumber: number): number;2115/**2116* Get the maximum legal column for line at `lineNumber`2117*/2118getLineMaxColumn(lineNumber: number): number;2119/**2120* Returns the column before the first non whitespace character for line at `lineNumber`.2121* Returns 0 if line is empty or contains only whitespace.2122*/2123getLineFirstNonWhitespaceColumn(lineNumber: number): number;2124/**2125* Returns the column after the last non whitespace character for line at `lineNumber`.2126* Returns 0 if line is empty or contains only whitespace.2127*/2128getLineLastNonWhitespaceColumn(lineNumber: number): number;2129/**2130* Create a valid position.2131*/2132validatePosition(position: IPosition): Position;2133/**2134* Advances the given position by the given offset (negative offsets are also accepted)2135* and returns it as a new valid position.2136*2137* If the offset and position are such that their combination goes beyond the beginning or2138* end of the model, throws an exception.2139*2140* If the offset is such that the new position would be in the middle of a multi-byte2141* line terminator, throws an exception.2142*/2143modifyPosition(position: IPosition, offset: number): Position;2144/**2145* Create a valid range.2146*/2147validateRange(range: IRange): Range;2148/**2149* Verifies the range is valid.2150*/2151isValidRange(range: IRange): boolean;2152/**2153* Converts the position to a zero-based offset.2154*2155* The position will be [adjusted](#TextDocument.validatePosition).2156*2157* @param position A position.2158* @return A valid zero-based offset.2159*/2160getOffsetAt(position: IPosition): number;2161/**2162* Converts a zero-based offset to a position.2163*2164* @param offset A zero-based offset.2165* @return A valid [position](#Position).2166*/2167getPositionAt(offset: number): Position;2168/**2169* Get a range covering the entire model.2170*/2171getFullModelRange(): Range;2172/**2173* Returns if the model was disposed or not.2174*/2175isDisposed(): boolean;2176/**2177* Search the model.2178* @param searchString The string used to search. If it is a regular expression, set `isRegex` to true.2179* @param searchOnlyEditableRange Limit the searching to only search inside the editable range of the model.2180* @param isRegex Used to indicate that `searchString` is a regular expression.2181* @param matchCase Force the matching to match lower/upper case exactly.2182* @param wordSeparators Force the matching to match entire words only. Pass null otherwise.2183* @param captureMatches The result will contain the captured groups.2184* @param limitResultCount Limit the number of results2185* @return The ranges where the matches are. It is empty if not matches have been found.2186*/2187findMatches(searchString: string, searchOnlyEditableRange: boolean, isRegex: boolean, matchCase: boolean, wordSeparators: string | null, captureMatches: boolean, limitResultCount?: number): FindMatch[];2188/**2189* Search the model.2190* @param searchString The string used to search. If it is a regular expression, set `isRegex` to true.2191* @param searchScope Limit the searching to only search inside these ranges.2192* @param isRegex Used to indicate that `searchString` is a regular expression.2193* @param matchCase Force the matching to match lower/upper case exactly.2194* @param wordSeparators Force the matching to match entire words only. Pass null otherwise.2195* @param captureMatches The result will contain the captured groups.2196* @param limitResultCount Limit the number of results2197* @return The ranges where the matches are. It is empty if no matches have been found.2198*/2199findMatches(searchString: string, searchScope: IRange | IRange[], isRegex: boolean, matchCase: boolean, wordSeparators: string | null, captureMatches: boolean, limitResultCount?: number): FindMatch[];2200/**2201* Search the model for the next match. Loops to the beginning of the model if needed.2202* @param searchString The string used to search. If it is a regular expression, set `isRegex` to true.2203* @param searchStart Start the searching at the specified position.2204* @param isRegex Used to indicate that `searchString` is a regular expression.2205* @param matchCase Force the matching to match lower/upper case exactly.2206* @param wordSeparators Force the matching to match entire words only. Pass null otherwise.2207* @param captureMatches The result will contain the captured groups.2208* @return The range where the next match is. It is null if no next match has been found.2209*/2210findNextMatch(searchString: string, searchStart: IPosition, isRegex: boolean, matchCase: boolean, wordSeparators: string | null, captureMatches: boolean): FindMatch | null;2211/**2212* Search the model for the previous match. Loops to the end of the model if needed.2213* @param searchString The string used to search. If it is a regular expression, set `isRegex` to true.2214* @param searchStart Start the searching at the specified position.2215* @param isRegex Used to indicate that `searchString` is a regular expression.2216* @param matchCase Force the matching to match lower/upper case exactly.2217* @param wordSeparators Force the matching to match entire words only. Pass null otherwise.2218* @param captureMatches The result will contain the captured groups.2219* @return The range where the previous match is. It is null if no previous match has been found.2220*/2221findPreviousMatch(searchString: string, searchStart: IPosition, isRegex: boolean, matchCase: boolean, wordSeparators: string | null, captureMatches: boolean): FindMatch | null;2222/**2223* Get the language associated with this model.2224*/2225getLanguageId(): string;2226/**2227* Get the word under or besides `position`.2228* @param position The position to look for a word.2229* @return The word under or besides `position`. Might be null.2230*/2231getWordAtPosition(position: IPosition): IWordAtPosition | null;2232/**2233* Get the word under or besides `position` trimmed to `position`.column2234* @param position The position to look for a word.2235* @return The word under or besides `position`. Will never be null.2236*/2237getWordUntilPosition(position: IPosition): IWordAtPosition;2238/**2239* Perform a minimum amount of operations, in order to transform the decorations2240* identified by `oldDecorations` to the decorations described by `newDecorations`2241* and returns the new identifiers associated with the resulting decorations.2242*2243* @param oldDecorations Array containing previous decorations identifiers.2244* @param newDecorations Array describing what decorations should result after the call.2245* @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.2246* @return An array containing the new decorations identifiers.2247*/2248deltaDecorations(oldDecorations: string[], newDecorations: IModelDeltaDecoration[], ownerId?: number): string[];2249/**2250* Get the options associated with a decoration.2251* @param id The decoration id.2252* @return The decoration options or null if the decoration was not found.2253*/2254getDecorationOptions(id: string): IModelDecorationOptions | null;2255/**2256* Get the range associated with a decoration.2257* @param id The decoration id.2258* @return The decoration range or null if the decoration was not found.2259*/2260getDecorationRange(id: string): Range | null;2261/**2262* Gets all the decorations for the line `lineNumber` as an array.2263* @param lineNumber The line number2264* @param ownerId If set, it will ignore decorations belonging to other owners.2265* @param filterOutValidation If set, it will ignore decorations specific to validation (i.e. warnings, errors).2266* @param filterFontDecorations If set, it will ignore font decorations.2267* @return An array with the decorations2268*/2269getLineDecorations(lineNumber: number, ownerId?: number, filterOutValidation?: boolean, filterFontDecorations?: boolean): IModelDecoration[];2270/**2271* Gets all the decorations for the lines between `startLineNumber` and `endLineNumber` as an array.2272* @param startLineNumber The start line number2273* @param endLineNumber The end line number2274* @param ownerId If set, it will ignore decorations belonging to other owners.2275* @param filterOutValidation If set, it will ignore decorations specific to validation (i.e. warnings, errors).2276* @param filterFontDecorations If set, it will ignore font decorations.2277* @return An array with the decorations2278*/2279getLinesDecorations(startLineNumber: number, endLineNumber: number, ownerId?: number, filterOutValidation?: boolean, filterFontDecorations?: boolean): IModelDecoration[];2280/**2281* Gets all the decorations in a range as an array. Only `startLineNumber` and `endLineNumber` from `range` are used for filtering.2282* So for now it returns all the decorations on the same line as `range`.2283* @param range The range to search in2284* @param ownerId If set, it will ignore decorations belonging to other owners.2285* @param filterOutValidation If set, it will ignore decorations specific to validation (i.e. warnings, errors).2286* @param filterFontDecorations If set, it will ignore font decorations.2287* @param onlyMinimapDecorations If set, it will return only decorations that render in the minimap.2288* @param onlyMarginDecorations If set, it will return only decorations that render in the glyph margin.2289* @return An array with the decorations2290*/2291getDecorationsInRange(range: IRange, ownerId?: number, filterOutValidation?: boolean, filterFontDecorations?: boolean, onlyMinimapDecorations?: boolean, onlyMarginDecorations?: boolean): IModelDecoration[];2292/**2293* Gets all the decorations as an array.2294* @param ownerId If set, it will ignore decorations belonging to other owners.2295* @param filterOutValidation If set, it will ignore decorations specific to validation (i.e. warnings, errors).2296* @param filterFontDecorations If set, it will ignore font decorations.2297*/2298getAllDecorations(ownerId?: number, filterOutValidation?: boolean, filterFontDecorations?: boolean): IModelDecoration[];2299/**2300* Gets all decorations that render in the glyph margin as an array.2301* @param ownerId If set, it will ignore decorations belonging to other owners.2302*/2303getAllMarginDecorations(ownerId?: number): IModelDecoration[];2304/**2305* Gets all the decorations that should be rendered in the overview ruler as an array.2306* @param ownerId If set, it will ignore decorations belonging to other owners.2307* @param filterOutValidation If set, it will ignore decorations specific to validation (i.e. warnings, errors).2308* @param filterFontDecorations If set, it will ignore font decorations.2309*/2310getOverviewRulerDecorations(ownerId?: number, filterOutValidation?: boolean, filterFontDecorations?: boolean): IModelDecoration[];2311/**2312* Gets all the decorations that contain injected text.2313* @param ownerId If set, it will ignore decorations belonging to other owners.2314*/2315getInjectedTextDecorations(ownerId?: number): IModelDecoration[];2316/**2317* Gets all the decorations that contain custom line heights.2318* @param ownerId If set, it will ignore decorations belonging to other owners.2319*/2320getCustomLineHeightsDecorations(ownerId?: number): IModelDecoration[];2321/**2322* Normalize a string containing whitespace according to indentation rules (converts to spaces or to tabs).2323*/2324normalizeIndentation(str: string): string;2325/**2326* Change the options of this model.2327*/2328updateOptions(newOpts: ITextModelUpdateOptions): void;2329/**2330* Detect the indentation options for this model from its content.2331*/2332detectIndentation(defaultInsertSpaces: boolean, defaultTabSize: number): void;2333/**2334* Close the current undo-redo element.2335* This offers a way to create an undo/redo stop point.2336*/2337pushStackElement(): void;2338/**2339* Open the current undo-redo element.2340* This offers a way to remove the current undo/redo stop point.2341*/2342popStackElement(): void;2343/**2344* Push edit operations, basically editing the model. This is the preferred way2345* of editing the model. The edit operations will land on the undo stack.2346* @param beforeCursorState The cursor state before the edit operations. This cursor state will be returned when `undo` or `redo` are invoked.2347* @param editOperations The edit operations.2348* @param cursorStateComputer A callback that can compute the resulting cursors state after the edit operations have been executed.2349* @return The cursor state returned by the `cursorStateComputer`.2350*/2351pushEditOperations(beforeCursorState: Selection[] | null, editOperations: IIdentifiedSingleEditOperation[], cursorStateComputer: ICursorStateComputer): Selection[] | null;2352/**2353* Change the end of line sequence. This is the preferred way of2354* changing the eol sequence. This will land on the undo stack.2355*/2356pushEOL(eol: EndOfLineSequence): void;2357/**2358* Edit the model without adding the edits to the undo stack.2359* This can have dire consequences on the undo stack! See @pushEditOperations for the preferred way.2360* @param operations The edit operations.2361* @return If desired, the inverse edit operations, that, when applied, will bring the model back to the previous state.2362*/2363applyEdits(operations: readonly IIdentifiedSingleEditOperation[]): void;2364applyEdits(operations: readonly IIdentifiedSingleEditOperation[], computeUndoEdits: false): void;2365applyEdits(operations: readonly IIdentifiedSingleEditOperation[], computeUndoEdits: true): IValidEditOperation[];2366/**2367* Change the end of line sequence without recording in the undo stack.2368* This can have dire consequences on the undo stack! See @pushEOL for the preferred way.2369*/2370setEOL(eol: EndOfLineSequence): void;2371/**2372* Undo edit operations until the previous undo/redo point.2373* The inverse edit operations will be pushed on the redo stack.2374*/2375undo(): void | Promise<void>;2376/**2377* Is there anything in the undo stack?2378*/2379canUndo(): boolean;2380/**2381* Redo edit operations until the next undo/redo point.2382* The inverse edit operations will be pushed on the undo stack.2383*/2384redo(): void | Promise<void>;2385/**2386* Is there anything in the redo stack?2387*/2388canRedo(): boolean;2389/**2390* An event emitted when the contents of the model have changed.2391* @event2392*/2393onDidChangeContent(listener: (e: IModelContentChangedEvent) => void): IDisposable;2394/**2395* An event emitted when decorations of the model have changed.2396* @event2397*/2398readonly onDidChangeDecorations: IEvent<IModelDecorationsChangedEvent>;2399/**2400* An event emitted when the model options have changed.2401* @event2402*/2403readonly onDidChangeOptions: IEvent<IModelOptionsChangedEvent>;2404/**2405* An event emitted when the language associated with the model has changed.2406* @event2407*/2408readonly onDidChangeLanguage: IEvent<IModelLanguageChangedEvent>;2409/**2410* An event emitted when the language configuration associated with the model has changed.2411* @event2412*/2413readonly onDidChangeLanguageConfiguration: IEvent<IModelLanguageConfigurationChangedEvent>;2414/**2415* An event emitted when the model has been attached to the first editor or detached from the last editor.2416* @event2417*/2418readonly onDidChangeAttached: IEvent<void>;2419/**2420* An event emitted right before disposing the model.2421* @event2422*/2423readonly onWillDispose: IEvent<void>;2424/**2425* Destroy this model.2426*/2427dispose(): void;2428/**2429* Returns if this model is attached to an editor or not.2430*/2431isAttachedToEditor(): boolean;2432}24332434export enum PositionAffinity {2435/**2436* Prefers the left most position.2437*/2438Left = 0,2439/**2440* Prefers the right most position.2441*/2442Right = 1,2443/**2444* No preference.2445*/2446None = 2,2447/**2448* If the given position is on injected text, prefers the position left of it.2449*/2450LeftOfInjectedText = 3,2451/**2452* If the given position is on injected text, prefers the position right of it.2453*/2454RightOfInjectedText = 42455}24562457/**2458* A change2459*/2460export interface IChange {2461readonly originalStartLineNumber: number;2462readonly originalEndLineNumber: number;2463readonly modifiedStartLineNumber: number;2464readonly modifiedEndLineNumber: number;2465}24662467/**2468* A character level change.2469*/2470export interface ICharChange extends IChange {2471readonly originalStartColumn: number;2472readonly originalEndColumn: number;2473readonly modifiedStartColumn: number;2474readonly modifiedEndColumn: number;2475}24762477/**2478* A line change2479*/2480export interface ILineChange extends IChange {2481readonly charChanges: ICharChange[] | undefined;2482}2483export interface IDimension {2484width: number;2485height: number;2486}24872488/**2489* A builder and helper for edit operations for a command.2490*/2491export interface IEditOperationBuilder {2492/**2493* Add a new edit operation (a replace operation).2494* @param range The range to replace (delete). May be empty to represent a simple insert.2495* @param text The text to replace with. May be null to represent a simple delete.2496*/2497addEditOperation(range: IRange, text: string | null, forceMoveMarkers?: boolean): void;2498/**2499* Add a new edit operation (a replace operation).2500* The inverse edits will be accessible in `ICursorStateComputerData.getInverseEditOperations()`2501* @param range The range to replace (delete). May be empty to represent a simple insert.2502* @param text The text to replace with. May be null to represent a simple delete.2503*/2504addTrackedEditOperation(range: IRange, text: string | null, forceMoveMarkers?: boolean): void;2505/**2506* Track `selection` when applying edit operations.2507* A best effort will be made to not grow/expand the selection.2508* An empty selection will clamp to a nearby character.2509* @param selection The selection to track.2510* @param trackPreviousOnEmpty If set, and the selection is empty, indicates whether the selection2511* should clamp to the previous or the next character.2512* @return A unique identifier.2513*/2514trackSelection(selection: Selection, trackPreviousOnEmpty?: boolean): string;2515}25162517/**2518* A helper for computing cursor state after a command.2519*/2520export interface ICursorStateComputerData {2521/**2522* Get the inverse edit operations of the added edit operations.2523*/2524getInverseEditOperations(): IValidEditOperation[];2525/**2526* Get a previously tracked selection.2527* @param id The unique identifier returned by `trackSelection`.2528* @return The selection.2529*/2530getTrackedSelection(id: string): Selection;2531}25322533/**2534* A command that modifies text / cursor state on a model.2535*/2536export interface ICommand {2537/**2538* Get the edit operations needed to execute this command.2539* @param model The model the command will execute on.2540* @param builder A helper to collect the needed edit operations and to track selections.2541*/2542getEditOperations(model: ITextModel, builder: IEditOperationBuilder): void;2543/**2544* Compute the cursor state after the edit operations were applied.2545* @param model The model the command has executed on.2546* @param helper A helper to get inverse edit operations and to get previously tracked selections.2547* @return The cursor state after the command executed.2548*/2549computeCursorState(model: ITextModel, helper: ICursorStateComputerData): Selection;2550}25512552/**2553* A model for the diff editor.2554*/2555export interface IDiffEditorModel {2556/**2557* Original model.2558*/2559original: ITextModel;2560/**2561* Modified model.2562*/2563modified: ITextModel;2564}25652566export interface IDiffEditorViewModel extends IDisposable {2567readonly model: IDiffEditorModel;2568waitForDiff(): Promise<void>;2569}25702571/**2572* An event describing that an editor has had its model reset (i.e. `editor.setModel()`).2573*/2574export interface IModelChangedEvent {2575/**2576* The `uri` of the previous model or null.2577*/2578readonly oldModelUrl: Uri | null;2579/**2580* The `uri` of the new model or null.2581*/2582readonly newModelUrl: Uri | null;2583}25842585export interface IContentSizeChangedEvent {2586readonly contentWidth: number;2587readonly contentHeight: number;2588readonly contentWidthChanged: boolean;2589readonly contentHeightChanged: boolean;2590}25912592export interface INewScrollPosition {2593scrollLeft?: number;2594scrollTop?: number;2595}25962597export interface IEditorAction {2598readonly id: string;2599readonly label: string;2600readonly alias: string;2601readonly metadata: ICommandMetadata | undefined;2602isSupported(): boolean;2603run(args?: unknown): Promise<void>;2604}26052606export type IEditorModel = ITextModel | IDiffEditorModel | IDiffEditorViewModel;26072608/**2609* A (serializable) state of the cursors.2610*/2611export interface ICursorState {2612inSelectionMode: boolean;2613selectionStart: IPosition;2614position: IPosition;2615}26162617/**2618* A (serializable) state of the view.2619*/2620export interface IViewState {2621/** written by previous versions */2622scrollTop?: number;2623/** written by previous versions */2624scrollTopWithoutViewZones?: number;2625scrollLeft: number;2626firstPosition: IPosition;2627firstPositionDeltaTop: number;2628}26292630/**2631* A (serializable) state of the code editor.2632*/2633export interface ICodeEditorViewState {2634cursorState: ICursorState[];2635viewState: IViewState;2636contributionsState: {2637[id: string]: any;2638};2639}26402641/**2642* (Serializable) View state for the diff editor.2643*/2644export interface IDiffEditorViewState {2645original: ICodeEditorViewState | null;2646modified: ICodeEditorViewState | null;2647modelState?: unknown;2648}26492650/**2651* An editor view state.2652*/2653export type IEditorViewState = ICodeEditorViewState | IDiffEditorViewState;26542655export enum ScrollType {2656Smooth = 0,2657Immediate = 12658}26592660/**2661* An editor.2662*/2663export interface IEditor {2664/**2665* An event emitted when the editor has been disposed.2666* @event2667*/2668onDidDispose(listener: () => void): IDisposable;2669/**2670* Dispose the editor.2671*/2672dispose(): void;2673/**2674* Get a unique id for this editor instance.2675*/2676getId(): string;2677/**2678* Get the editor type. Please see `EditorType`.2679* This is to avoid an instanceof check2680*/2681getEditorType(): string;2682/**2683* Update the editor's options after the editor has been created.2684*/2685updateOptions(newOptions: IEditorOptions): void;2686/**2687* Instructs the editor to remeasure its container. This method should2688* be called when the container of the editor gets resized.2689*2690* If a dimension is passed in, the passed in value will be used.2691*2692* By default, this will also render the editor immediately.2693* If you prefer to delay rendering to the next animation frame, use postponeRendering == true.2694*/2695layout(dimension?: IDimension, postponeRendering?: boolean): void;2696/**2697* Brings browser focus to the editor text2698*/2699focus(): void;2700/**2701* Returns true if the text inside this editor is focused (i.e. cursor is blinking).2702*/2703hasTextFocus(): boolean;2704/**2705* Returns all actions associated with this editor.2706*/2707getSupportedActions(): IEditorAction[];2708/**2709* Saves current view state of the editor in a serializable object.2710*/2711saveViewState(): IEditorViewState | null;2712/**2713* Restores the view state of the editor from a serializable object generated by `saveViewState`.2714*/2715restoreViewState(state: IEditorViewState | null): void;2716/**2717* Given a position, returns a column number that takes tab-widths into account.2718*/2719getVisibleColumnFromPosition(position: IPosition): number;2720/**2721* Returns the primary position of the cursor.2722*/2723getPosition(): Position | null;2724/**2725* Set the primary position of the cursor. This will remove any secondary cursors.2726* @param position New primary cursor's position2727* @param source Source of the call that caused the position2728*/2729setPosition(position: IPosition, source?: string): void;2730/**2731* Scroll vertically as necessary and reveal a line.2732*/2733revealLine(lineNumber: number, scrollType?: ScrollType): void;2734/**2735* Scroll vertically as necessary and reveal a line centered vertically.2736*/2737revealLineInCenter(lineNumber: number, scrollType?: ScrollType): void;2738/**2739* Scroll vertically as necessary and reveal a line centered vertically only if it lies outside the viewport.2740*/2741revealLineInCenterIfOutsideViewport(lineNumber: number, scrollType?: ScrollType): void;2742/**2743* Scroll vertically as necessary and reveal a line close to the top of the viewport,2744* optimized for viewing a code definition.2745*/2746revealLineNearTop(lineNumber: number, scrollType?: ScrollType): void;2747/**2748* Scroll vertically or horizontally as necessary and reveal a position.2749*/2750revealPosition(position: IPosition, scrollType?: ScrollType): void;2751/**2752* Scroll vertically or horizontally as necessary and reveal a position centered vertically.2753*/2754revealPositionInCenter(position: IPosition, scrollType?: ScrollType): void;2755/**2756* Scroll vertically or horizontally as necessary and reveal a position centered vertically only if it lies outside the viewport.2757*/2758revealPositionInCenterIfOutsideViewport(position: IPosition, scrollType?: ScrollType): void;2759/**2760* Scroll vertically or horizontally as necessary and reveal a position close to the top of the viewport,2761* optimized for viewing a code definition.2762*/2763revealPositionNearTop(position: IPosition, scrollType?: ScrollType): void;2764/**2765* Returns the primary selection of the editor.2766*/2767getSelection(): Selection | null;2768/**2769* Returns all the selections of the editor.2770*/2771getSelections(): Selection[] | null;2772/**2773* Set the primary selection of the editor. This will remove any secondary cursors.2774* @param selection The new selection2775* @param source Source of the call that caused the selection2776*/2777setSelection(selection: IRange, source?: string): void;2778/**2779* Set the primary selection of the editor. This will remove any secondary cursors.2780* @param selection The new selection2781* @param source Source of the call that caused the selection2782*/2783setSelection(selection: Range, source?: string): void;2784/**2785* Set the primary selection of the editor. This will remove any secondary cursors.2786* @param selection The new selection2787* @param source Source of the call that caused the selection2788*/2789setSelection(selection: ISelection, source?: string): void;2790/**2791* Set the primary selection of the editor. This will remove any secondary cursors.2792* @param selection The new selection2793* @param source Source of the call that caused the selection2794*/2795setSelection(selection: Selection, source?: string): void;2796/**2797* Set the selections for all the cursors of the editor.2798* Cursors will be removed or added, as necessary.2799* @param selections The new selection2800* @param source Source of the call that caused the selection2801*/2802setSelections(selections: readonly ISelection[], source?: string): void;2803/**2804* Scroll vertically as necessary and reveal lines.2805*/2806revealLines(startLineNumber: number, endLineNumber: number, scrollType?: ScrollType): void;2807/**2808* Scroll vertically as necessary and reveal lines centered vertically.2809*/2810revealLinesInCenter(lineNumber: number, endLineNumber: number, scrollType?: ScrollType): void;2811/**2812* Scroll vertically as necessary and reveal lines centered vertically only if it lies outside the viewport.2813*/2814revealLinesInCenterIfOutsideViewport(lineNumber: number, endLineNumber: number, scrollType?: ScrollType): void;2815/**2816* Scroll vertically as necessary and reveal lines close to the top of the viewport,2817* optimized for viewing a code definition.2818*/2819revealLinesNearTop(lineNumber: number, endLineNumber: number, scrollType?: ScrollType): void;2820/**2821* Scroll vertically or horizontally as necessary and reveal a range.2822*/2823revealRange(range: IRange, scrollType?: ScrollType): void;2824/**2825* Scroll vertically or horizontally as necessary and reveal a range centered vertically.2826*/2827revealRangeInCenter(range: IRange, scrollType?: ScrollType): void;2828/**2829* Scroll vertically or horizontally as necessary and reveal a range at the top of the viewport.2830*/2831revealRangeAtTop(range: IRange, scrollType?: ScrollType): void;2832/**2833* Scroll vertically or horizontally as necessary and reveal a range centered vertically only if it lies outside the viewport.2834*/2835revealRangeInCenterIfOutsideViewport(range: IRange, scrollType?: ScrollType): void;2836/**2837* Scroll vertically or horizontally as necessary and reveal a range close to the top of the viewport,2838* optimized for viewing a code definition.2839*/2840revealRangeNearTop(range: IRange, scrollType?: ScrollType): void;2841/**2842* Scroll vertically or horizontally as necessary and reveal a range close to the top of the viewport,2843* optimized for viewing a code definition. Only if it lies outside the viewport.2844*/2845revealRangeNearTopIfOutsideViewport(range: IRange, scrollType?: ScrollType): void;2846/**2847* Directly trigger a handler or an editor action.2848* @param source The source of the call.2849* @param handlerId The id of the handler or the id of a contribution.2850* @param payload Extra data to be sent to the handler.2851*/2852trigger(source: string | null | undefined, handlerId: string, payload: any): void;2853/**2854* Gets the current model attached to this editor.2855*/2856getModel(): IEditorModel | null;2857/**2858* Sets the current model attached to this editor.2859* If the previous model was created by the editor via the value key in the options2860* literal object, it will be destroyed. Otherwise, if the previous model was set2861* via setModel, or the model key in the options literal object, the previous model2862* will not be destroyed.2863* It is safe to call setModel(null) to simply detach the current model from the editor.2864*/2865setModel(model: IEditorModel | null): void;2866/**2867* Create a collection of decorations. All decorations added through this collection2868* will get the ownerId of the editor (meaning they will not show up in other editors).2869* These decorations will be automatically cleared when the editor's model changes.2870*/2871createDecorationsCollection(decorations?: IModelDeltaDecoration[]): IEditorDecorationsCollection;2872}28732874/**2875* A collection of decorations2876*/2877export interface IEditorDecorationsCollection {2878/**2879* An event emitted when decorations change in the editor,2880* but the change is not caused by us setting or clearing the collection.2881*/2882onDidChange: IEvent<IModelDecorationsChangedEvent>;2883/**2884* Get the decorations count.2885*/2886length: number;2887/**2888* Get the range for a decoration.2889*/2890getRange(index: number): Range | null;2891/**2892* Get all ranges for decorations.2893*/2894getRanges(): Range[];2895/**2896* Determine if a decoration is in this collection.2897*/2898has(decoration: IModelDecoration): boolean;2899/**2900* Replace all previous decorations with `newDecorations`.2901*/2902set(newDecorations: readonly IModelDeltaDecoration[]): string[];2903/**2904* Append `newDecorations` to this collection.2905*/2906append(newDecorations: readonly IModelDeltaDecoration[]): string[];2907/**2908* Remove all previous decorations.2909*/2910clear(): void;2911}29122913/**2914* An editor contribution that gets created every time a new editor gets created and gets disposed when the editor gets disposed.2915*/2916export interface IEditorContribution {2917/**2918* Dispose this contribution.2919*/2920dispose(): void;2921/**2922* Store view state.2923*/2924saveViewState?(): any;2925/**2926* Restore view state.2927*/2928restoreViewState?(state: any): void;2929}29302931/**2932* The type of the `IEditor`.2933*/2934export const EditorType: {2935ICodeEditor: string;2936IDiffEditor: string;2937};29382939/**2940* An event describing that the current language associated with a model has changed.2941*/2942export interface IModelLanguageChangedEvent {2943/**2944* Previous language2945*/2946readonly oldLanguage: string;2947/**2948* New language2949*/2950readonly newLanguage: string;2951/**2952* Source of the call that caused the event.2953*/2954readonly source: string;2955}29562957/**2958* An event describing that the language configuration associated with a model has changed.2959*/2960export interface IModelLanguageConfigurationChangedEvent {2961}29622963/**2964* An event describing a change in the text of a model.2965*/2966export interface IModelContentChangedEvent {2967/**2968* The changes are ordered from the end of the document to the beginning, so they should be safe to apply in sequence.2969*/2970readonly changes: IModelContentChange[];2971/**2972* The (new) end-of-line character.2973*/2974readonly eol: string;2975/**2976* The new version id the model has transitioned to.2977*/2978readonly versionId: number;2979/**2980* Flag that indicates that this event was generated while undoing.2981*/2982readonly isUndoing: boolean;2983/**2984* Flag that indicates that this event was generated while redoing.2985*/2986readonly isRedoing: boolean;2987/**2988* Flag that indicates that all decorations were lost with this edit.2989* The model has been reset to a new value.2990*/2991readonly isFlush: boolean;2992/**2993* Flag that indicates that this event describes an eol change.2994*/2995readonly isEolChange: boolean;2996/**2997* The sum of these lengths equals changes.length.2998* The length of this array must equal the length of detailedReasons.2999*/3000readonly detailedReasonsChangeLengths: number[];3001}30023003export interface ISerializedModelContentChangedEvent {3004/**3005* The changes are ordered from the end of the document to the beginning, so they should be safe to apply in sequence.3006*/3007readonly changes: IModelContentChange[];3008/**3009* The (new) end-of-line character.3010*/3011readonly eol: string;3012/**3013* The new version id the model has transitioned to.3014*/3015readonly versionId: number;3016/**3017* Flag that indicates that this event was generated while undoing.3018*/3019readonly isUndoing: boolean;3020/**3021* Flag that indicates that this event was generated while redoing.3022*/3023readonly isRedoing: boolean;3024/**3025* Flag that indicates that all decorations were lost with this edit.3026* The model has been reset to a new value.3027*/3028readonly isFlush: boolean;3029/**3030* Flag that indicates that this event describes an eol change.3031*/3032readonly isEolChange: boolean;3033}30343035/**3036* An event describing that model decorations have changed.3037*/3038export interface IModelDecorationsChangedEvent {3039readonly affectsMinimap: boolean;3040readonly affectsOverviewRuler: boolean;3041readonly affectsGlyphMargin: boolean;3042readonly affectsLineNumber: boolean;3043}30443045export interface IModelOptionsChangedEvent {3046readonly tabSize: boolean;3047readonly indentSize: boolean;3048readonly insertSpaces: boolean;3049readonly trimAutoWhitespace: boolean;3050}30513052export interface IModelContentChange {3053/**3054* The old range that got replaced.3055*/3056readonly range: IRange;3057/**3058* The offset of the range that got replaced.3059*/3060readonly rangeOffset: number;3061/**3062* The length of the range that got replaced.3063*/3064readonly rangeLength: number;3065/**3066* The new text for the range.3067*/3068readonly text: string;3069}30703071/**3072* Describes the reason the cursor has changed its position.3073*/3074export enum CursorChangeReason {3075/**3076* Unknown or not set.3077*/3078NotSet = 0,3079/**3080* A `model.setValue()` was called.3081*/3082ContentFlush = 1,3083/**3084* The `model` has been changed outside of this cursor and the cursor recovers its position from associated markers.3085*/3086RecoverFromMarkers = 2,3087/**3088* There was an explicit user gesture.3089*/3090Explicit = 3,3091/**3092* There was a Paste.3093*/3094Paste = 4,3095/**3096* There was an Undo.3097*/3098Undo = 5,3099/**3100* There was a Redo.3101*/3102Redo = 63103}31043105/**3106* An event describing that the cursor position has changed.3107*/3108export interface ICursorPositionChangedEvent {3109/**3110* Primary cursor's position.3111*/3112readonly position: Position;3113/**3114* Secondary cursors' position.3115*/3116readonly secondaryPositions: Position[];3117/**3118* Reason.3119*/3120readonly reason: CursorChangeReason;3121/**3122* Source of the call that caused the event.3123*/3124readonly source: string;3125}31263127/**3128* An event describing that the cursor selection has changed.3129*/3130export interface ICursorSelectionChangedEvent {3131/**3132* The primary selection.3133*/3134readonly selection: Selection;3135/**3136* The secondary selections.3137*/3138readonly secondarySelections: Selection[];3139/**3140* The model version id.3141*/3142readonly modelVersionId: number;3143/**3144* The old selections.3145*/3146readonly oldSelections: Selection[] | null;3147/**3148* The model version id the that `oldSelections` refer to.3149*/3150readonly oldModelVersionId: number;3151/**3152* Source of the call that caused the event.3153*/3154readonly source: string;3155/**3156* Reason.3157*/3158readonly reason: CursorChangeReason;3159}31603161export enum AccessibilitySupport {3162/**3163* This should be the browser case where it is not known if a screen reader is attached or no.3164*/3165Unknown = 0,3166Disabled = 1,3167Enabled = 23168}31693170/**3171* Configuration options for auto closing quotes and brackets3172*/3173export type EditorAutoClosingStrategy = 'always' | 'languageDefined' | 'beforeWhitespace' | 'never';31743175/**3176* Configuration options for auto wrapping quotes and brackets3177*/3178export type EditorAutoSurroundStrategy = 'languageDefined' | 'quotes' | 'brackets' | 'never';31793180/**3181* Configuration options for typing over closing quotes or brackets3182*/3183export type EditorAutoClosingEditStrategy = 'always' | 'auto' | 'never';31843185/**3186* Configuration options for auto indentation in the editor3187*/3188export enum EditorAutoIndentStrategy {3189None = 0,3190Keep = 1,3191Brackets = 2,3192Advanced = 3,3193Full = 43194}31953196/**3197* Configuration options for the editor.3198*/3199export interface IEditorOptions {3200/**3201* This editor is used inside a diff editor.3202*/3203inDiffEditor?: boolean;3204/**3205* This editor is allowed to use variable line heights.3206*/3207allowVariableLineHeights?: boolean;3208/**3209* This editor is allowed to use variable font-sizes and font-families3210*/3211allowVariableFonts?: boolean;3212/**3213* This editor is allowed to use variable font-sizes and font-families in accessibility mode3214*/3215allowVariableFontsInAccessibilityMode?: boolean;3216/**3217* The aria label for the editor's textarea (when it is focused).3218*/3219ariaLabel?: string;3220/**3221* Whether the aria-required attribute should be set on the editors textarea.3222*/3223ariaRequired?: boolean;3224/**3225* Control whether a screen reader announces inline suggestion content immediately.3226*/3227screenReaderAnnounceInlineSuggestion?: boolean;3228/**3229* The `tabindex` property of the editor's textarea3230*/3231tabIndex?: number;3232/**3233* Render vertical lines at the specified columns.3234* Defaults to empty array.3235*/3236rulers?: (number | IRulerOption)[];3237/**3238* Locales used for segmenting lines into words when doing word related navigations or operations.3239*3240* Specify the BCP 47 language tag of the word you wish to recognize (e.g., ja, zh-CN, zh-Hant-TW, etc.).3241* Defaults to empty array3242*/3243wordSegmenterLocales?: string | string[];3244/**3245* A string containing the word separators used when doing word navigation.3246* Defaults to `~!@#$%^&*()-=+[{]}\\|;:\'",.<>/?3247*/3248wordSeparators?: string;3249/**3250* Enable Linux primary clipboard.3251* Defaults to true.3252*/3253selectionClipboard?: boolean;3254/**3255* Control the rendering of line numbers.3256* If it is a function, it will be invoked when rendering a line number and the return value will be rendered.3257* Otherwise, if it is a truthy, line numbers will be rendered normally (equivalent of using an identity function).3258* Otherwise, line numbers will not be rendered.3259* Defaults to `on`.3260*/3261lineNumbers?: LineNumbersType;3262/**3263* Controls the minimal number of visible leading and trailing lines surrounding the cursor.3264* Defaults to 0.3265*/3266cursorSurroundingLines?: number;3267/**3268* Controls when `cursorSurroundingLines` should be enforced3269* Defaults to `default`, `cursorSurroundingLines` is not enforced when cursor position is changed3270* by mouse.3271*/3272cursorSurroundingLinesStyle?: 'default' | 'all';3273/**3274* Render last line number when the file ends with a newline.3275* Defaults to 'on' for Windows and macOS and 'dimmed' for Linux.3276*/3277renderFinalNewline?: 'on' | 'off' | 'dimmed';3278/**3279* Remove unusual line terminators like LINE SEPARATOR (LS), PARAGRAPH SEPARATOR (PS).3280* Defaults to 'prompt'.3281*/3282unusualLineTerminators?: 'auto' | 'off' | 'prompt';3283/**3284* Should the corresponding line be selected when clicking on the line number?3285* Defaults to true.3286*/3287selectOnLineNumbers?: boolean;3288/**3289* Control the width of line numbers, by reserving horizontal space for rendering at least an amount of digits.3290* Defaults to 5.3291*/3292lineNumbersMinChars?: number;3293/**3294* Enable the rendering of the glyph margin.3295* Defaults to true in vscode and to false in monaco-editor.3296*/3297glyphMargin?: boolean;3298/**3299* The width reserved for line decorations (in px).3300* Line decorations are placed between line numbers and the editor content.3301* You can pass in a string in the format floating point followed by "ch". e.g. 1.3ch.3302* Defaults to 10.3303*/3304lineDecorationsWidth?: number | string;3305/**3306* When revealing the cursor, a virtual padding (px) is added to the cursor, turning it into a rectangle.3307* This virtual padding ensures that the cursor gets revealed before hitting the edge of the viewport.3308* Defaults to 30 (px).3309*/3310revealHorizontalRightPadding?: number;3311/**3312* Render the editor selection with rounded borders.3313* Defaults to true.3314*/3315roundedSelection?: boolean;3316/**3317* Class name to be added to the editor.3318*/3319extraEditorClassName?: string;3320/**3321* Should the editor be read only. See also `domReadOnly`.3322* Defaults to false.3323*/3324readOnly?: boolean;3325/**3326* The message to display when the editor is readonly.3327*/3328readOnlyMessage?: IMarkdownString;3329/**3330* Should the textarea used for input use the DOM `readonly` attribute.3331* Defaults to false.3332*/3333domReadOnly?: boolean;3334/**3335* Enable linked editing.3336* Defaults to false.3337*/3338linkedEditing?: boolean;3339/**3340* deprecated, use linkedEditing instead3341*/3342renameOnType?: boolean;3343/**3344* Should the editor render validation decorations.3345* Defaults to editable.3346*/3347renderValidationDecorations?: 'editable' | 'on' | 'off';3348/**3349* Control the behavior and rendering of the scrollbars.3350*/3351scrollbar?: IEditorScrollbarOptions;3352/**3353* Control the behavior of sticky scroll options3354*/3355stickyScroll?: IEditorStickyScrollOptions;3356/**3357* Control the behavior and rendering of the minimap.3358*/3359minimap?: IEditorMinimapOptions;3360/**3361* Control the behavior of the find widget.3362*/3363find?: IEditorFindOptions;3364/**3365* Display overflow widgets as `fixed`.3366* Defaults to `false`.3367*/3368fixedOverflowWidgets?: boolean;3369/**3370* Allow content widgets and overflow widgets to overflow the editor viewport.3371* Defaults to `true`.3372*/3373allowOverflow?: boolean;3374/**3375* The number of vertical lanes the overview ruler should render.3376* Defaults to 3.3377*/3378overviewRulerLanes?: number;3379/**3380* Controls if a border should be drawn around the overview ruler.3381* Defaults to `true`.3382*/3383overviewRulerBorder?: boolean;3384/**3385* Control the cursor animation style, possible values are 'blink', 'smooth', 'phase', 'expand' and 'solid'.3386* Defaults to 'blink'.3387*/3388cursorBlinking?: 'blink' | 'smooth' | 'phase' | 'expand' | 'solid';3389/**3390* Zoom the font in the editor when using the mouse wheel in combination with holding Ctrl.3391* Defaults to false.3392*/3393mouseWheelZoom?: boolean;3394/**3395* Control the mouse pointer style, either 'text' or 'default' or 'copy'3396* Defaults to 'text'3397*/3398mouseStyle?: 'text' | 'default' | 'copy';3399/**3400* Enable smooth caret animation.3401* Defaults to 'off'.3402*/3403cursorSmoothCaretAnimation?: 'off' | 'explicit' | 'on';3404/**3405* Control the cursor style in insert mode.3406* Defaults to 'line'.3407*/3408cursorStyle?: 'line' | 'block' | 'underline' | 'line-thin' | 'block-outline' | 'underline-thin';3409/**3410* Control the cursor style in overtype mode.3411* Defaults to 'block'.3412*/3413overtypeCursorStyle?: 'line' | 'block' | 'underline' | 'line-thin' | 'block-outline' | 'underline-thin';3414/**3415* Controls whether paste in overtype mode should overwrite or insert.3416*/3417overtypeOnPaste?: boolean;3418/**3419* Control the width of the cursor when cursorStyle is set to 'line'3420*/3421cursorWidth?: number;3422/**3423* Control the height of the cursor when cursorStyle is set to 'line'3424*/3425cursorHeight?: number;3426/**3427* Enable font ligatures.3428* Defaults to false.3429*/3430fontLigatures?: boolean | string;3431/**3432* Enable font variations.3433* Defaults to false.3434*/3435fontVariations?: boolean | string;3436/**3437* Controls whether to use default color decorations or not using the default document color provider3438*/3439defaultColorDecorators?: 'auto' | 'always' | 'never';3440/**3441* Disable the use of `transform: translate3d(0px, 0px, 0px)` for the editor margin and lines layers.3442* The usage of `transform: translate3d(0px, 0px, 0px)` acts as a hint for browsers to create an extra layer.3443* Defaults to false.3444*/3445disableLayerHinting?: boolean;3446/**3447* Disable the optimizations for monospace fonts.3448* Defaults to false.3449*/3450disableMonospaceOptimizations?: boolean;3451/**3452* Should the cursor be hidden in the overview ruler.3453* Defaults to false.3454*/3455hideCursorInOverviewRuler?: boolean;3456/**3457* Enable that scrolling can go one screen size after the last line.3458* Defaults to true.3459*/3460scrollBeyondLastLine?: boolean;3461/**3462* Scroll editor on middle click3463*/3464scrollOnMiddleClick?: boolean;3465/**3466* Enable that scrolling can go beyond the last column by a number of columns.3467* Defaults to 5.3468*/3469scrollBeyondLastColumn?: number;3470/**3471* Enable that the editor animates scrolling to a position.3472* Defaults to false.3473*/3474smoothScrolling?: boolean;3475/**3476* Enable that the editor will install a ResizeObserver to check if its container dom node size has changed.3477* Defaults to false.3478*/3479automaticLayout?: boolean;3480/**3481* Control the wrapping of the editor.3482* When `wordWrap` = "off", the lines will never wrap.3483* When `wordWrap` = "on", the lines will wrap at the viewport width.3484* When `wordWrap` = "wordWrapColumn", the lines will wrap at `wordWrapColumn`.3485* When `wordWrap` = "bounded", the lines will wrap at min(viewport width, wordWrapColumn).3486* Defaults to "off".3487*/3488wordWrap?: 'off' | 'on' | 'wordWrapColumn' | 'bounded';3489/**3490* Override the `wordWrap` setting.3491*/3492wordWrapOverride1?: 'off' | 'on' | 'inherit';3493/**3494* Override the `wordWrapOverride1` setting.3495*/3496wordWrapOverride2?: 'off' | 'on' | 'inherit';3497/**3498* Control the wrapping of the editor.3499* When `wordWrap` = "off", the lines will never wrap.3500* When `wordWrap` = "on", the lines will wrap at the viewport width.3501* When `wordWrap` = "wordWrapColumn", the lines will wrap at `wordWrapColumn`.3502* When `wordWrap` = "bounded", the lines will wrap at min(viewport width, wordWrapColumn).3503* Defaults to 80.3504*/3505wordWrapColumn?: number;3506/**3507* Control indentation of wrapped lines. Can be: 'none', 'same', 'indent' or 'deepIndent'.3508* Defaults to 'same' in vscode and to 'none' in monaco-editor.3509*/3510wrappingIndent?: 'none' | 'same' | 'indent' | 'deepIndent';3511/**3512* Controls the wrapping strategy to use.3513* Defaults to 'simple'.3514*/3515wrappingStrategy?: 'simple' | 'advanced';3516/**3517* Create a softwrap on every quoted "\n" literal.3518* Defaults to false.3519*/3520wrapOnEscapedLineFeeds?: boolean;3521/**3522* Configure word wrapping characters. A break will be introduced before these characters.3523*/3524wordWrapBreakBeforeCharacters?: string;3525/**3526* Configure word wrapping characters. A break will be introduced after these characters.3527*/3528wordWrapBreakAfterCharacters?: string;3529/**3530* Sets whether line breaks appear wherever the text would otherwise overflow its content box.3531* When wordBreak = 'normal', Use the default line break rule.3532* 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.3533*/3534wordBreak?: 'normal' | 'keepAll';3535/**3536* Performance guard: Stop rendering a line after x characters.3537* Defaults to 10000.3538* Use -1 to never stop rendering3539*/3540stopRenderingLineAfter?: number;3541/**3542* Configure the editor's hover.3543*/3544hover?: IEditorHoverOptions;3545/**3546* Enable detecting links and making them clickable.3547* Defaults to true.3548*/3549links?: boolean;3550/**3551* Enable inline color decorators and color picker rendering.3552*/3553colorDecorators?: boolean;3554/**3555* Controls what is the condition to spawn a color picker from a color dectorator3556*/3557colorDecoratorsActivatedOn?: 'clickAndHover' | 'click' | 'hover';3558/**3559* Controls the max number of color decorators that can be rendered in an editor at once.3560*/3561colorDecoratorsLimit?: number;3562/**3563* Control the behaviour of comments in the editor.3564*/3565comments?: IEditorCommentsOptions;3566/**3567* Enable custom contextmenu.3568* Defaults to true.3569*/3570contextmenu?: boolean;3571/**3572* A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.3573* Defaults to 1.3574*/3575mouseWheelScrollSensitivity?: number;3576/**3577* FastScrolling mulitplier speed when pressing `Alt`3578* Defaults to 5.3579*/3580fastScrollSensitivity?: number;3581/**3582* Enable that the editor scrolls only the predominant axis. Prevents horizontal drift when scrolling vertically on a trackpad.3583* Defaults to true.3584*/3585scrollPredominantAxis?: boolean;3586/**3587* Make scrolling inertial - mostly useful with touchpad on linux.3588*/3589inertialScroll?: boolean;3590/**3591* Enable that the selection with the mouse and keys is doing column selection.3592* Defaults to false.3593*/3594columnSelection?: boolean;3595/**3596* The modifier to be used to add multiple cursors with the mouse.3597* Defaults to 'alt'3598*/3599multiCursorModifier?: 'ctrlCmd' | 'alt';3600/**3601* Merge overlapping selections.3602* Defaults to true3603*/3604multiCursorMergeOverlapping?: boolean;3605/**3606* Configure the behaviour when pasting a text with the line count equal to the cursor count.3607* Defaults to 'spread'.3608*/3609multiCursorPaste?: 'spread' | 'full';3610/**3611* Controls the max number of text cursors that can be in an active editor at once.3612*/3613multiCursorLimit?: number;3614/**3615* Configure the editor's accessibility support.3616* Defaults to 'auto'. It is best to leave this to 'auto'.3617*/3618accessibilitySupport?: 'auto' | 'off' | 'on';3619/**3620* Controls the number of lines in the editor that can be read out by a screen reader3621*/3622accessibilityPageSize?: number;3623/**3624* Suggest options.3625*/3626suggest?: ISuggestOptions;3627inlineSuggest?: IInlineSuggestOptions;3628/**3629* Smart select options.3630*/3631smartSelect?: ISmartSelectOptions;3632/**3633*3634*/3635gotoLocation?: IGotoLocationOptions;3636/**3637* Enable quick suggestions (shadow suggestions)3638* Defaults to true.3639*/3640quickSuggestions?: boolean | IQuickSuggestionsOptions;3641/**3642* Quick suggestions show delay (in ms)3643* Defaults to 10 (ms)3644*/3645quickSuggestionsDelay?: number;3646/**3647* Controls the spacing around the editor.3648*/3649padding?: IEditorPaddingOptions;3650/**3651* Parameter hint options.3652*/3653parameterHints?: IEditorParameterHintOptions;3654/**3655* Options for auto closing brackets.3656* Defaults to language defined behavior.3657*/3658autoClosingBrackets?: EditorAutoClosingStrategy;3659/**3660* Options for auto closing comments.3661* Defaults to language defined behavior.3662*/3663autoClosingComments?: EditorAutoClosingStrategy;3664/**3665* Options for auto closing quotes.3666* Defaults to language defined behavior.3667*/3668autoClosingQuotes?: EditorAutoClosingStrategy;3669/**3670* Options for pressing backspace near quotes or bracket pairs.3671*/3672autoClosingDelete?: EditorAutoClosingEditStrategy;3673/**3674* Options for typing over closing quotes or brackets.3675*/3676autoClosingOvertype?: EditorAutoClosingEditStrategy;3677/**3678* Options for auto surrounding.3679* Defaults to always allowing auto surrounding.3680*/3681autoSurround?: EditorAutoSurroundStrategy;3682/**3683* Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.3684* Defaults to advanced.3685*/3686autoIndent?: 'none' | 'keep' | 'brackets' | 'advanced' | 'full';3687/**3688* Boolean which controls whether to autoindent on paste3689*/3690autoIndentOnPaste?: boolean;3691/**3692* Boolean which controls whether to autoindent on paste within a string when autoIndentOnPaste is enabled.3693*/3694autoIndentOnPasteWithinString?: boolean;3695/**3696* Emulate selection behaviour of tab characters when using spaces for indentation.3697* This means selection will stick to tab stops.3698*/3699stickyTabStops?: boolean;3700/**3701* Enable format on type.3702* Defaults to false.3703*/3704formatOnType?: boolean;3705/**3706* Enable format on paste.3707* Defaults to false.3708*/3709formatOnPaste?: boolean;3710/**3711* Controls if the editor should allow to move selections via drag and drop.3712* Defaults to false.3713*/3714dragAndDrop?: boolean;3715/**3716* Enable the suggestion box to pop-up on trigger characters.3717* Defaults to true.3718*/3719suggestOnTriggerCharacters?: boolean;3720/**3721* Accept suggestions on ENTER.3722* Defaults to 'on'.3723*/3724acceptSuggestionOnEnter?: 'on' | 'smart' | 'off';3725/**3726* Accept suggestions on provider defined characters.3727* Defaults to true.3728*/3729acceptSuggestionOnCommitCharacter?: boolean;3730/**3731* Enable snippet suggestions. Default to 'true'.3732*/3733snippetSuggestions?: 'top' | 'bottom' | 'inline' | 'none';3734/**3735* Copying without a selection copies the current line.3736*/3737emptySelectionClipboard?: boolean;3738/**3739* Syntax highlighting is copied.3740*/3741copyWithSyntaxHighlighting?: boolean;3742/**3743* The history mode for suggestions.3744*/3745suggestSelection?: 'first' | 'recentlyUsed' | 'recentlyUsedByPrefix';3746/**3747* The font size for the suggest widget.3748* Defaults to the editor font size.3749*/3750suggestFontSize?: number;3751/**3752* The line height for the suggest widget.3753* Defaults to the editor line height.3754*/3755suggestLineHeight?: number;3756/**3757* Enable tab completion.3758*/3759tabCompletion?: 'on' | 'off' | 'onlySnippets';3760/**3761* Enable selection highlight.3762* Defaults to true.3763*/3764selectionHighlight?: boolean;3765/**3766* Enable selection highlight for multiline selections.3767* Defaults to false.3768*/3769selectionHighlightMultiline?: boolean;3770/**3771* Maximum length (in characters) for selection highlights.3772* Set to 0 to have an unlimited length.3773*/3774selectionHighlightMaxLength?: number;3775/**3776* Enable semantic occurrences highlight.3777* Defaults to 'singleFile'.3778* 'off' disables occurrence highlighting3779* 'singleFile' triggers occurrence highlighting in the current document3780* 'multiFile' triggers occurrence highlighting across valid open documents3781*/3782occurrencesHighlight?: 'off' | 'singleFile' | 'multiFile';3783/**3784* Controls delay for occurrences highlighting3785* Defaults to 250.3786* Minimum value is 03787* Maximum value is 20003788*/3789occurrencesHighlightDelay?: number;3790/**3791* Show code lens3792* Defaults to true.3793*/3794codeLens?: boolean;3795/**3796* Code lens font family. Defaults to editor font family.3797*/3798codeLensFontFamily?: string;3799/**3800* Code lens font size. Default to 90% of the editor font size3801*/3802codeLensFontSize?: number;3803/**3804* Control the behavior and rendering of the code action lightbulb.3805*/3806lightbulb?: IEditorLightbulbOptions;3807/**3808* Timeout for running code actions on save.3809*/3810codeActionsOnSaveTimeout?: number;3811/**3812* Enable code folding.3813* Defaults to true.3814*/3815folding?: boolean;3816/**3817* Selects the folding strategy. 'auto' uses the strategies contributed for the current document, 'indentation' uses the indentation based folding strategy.3818* Defaults to 'auto'.3819*/3820foldingStrategy?: 'auto' | 'indentation';3821/**3822* Enable highlight for folded regions.3823* Defaults to true.3824*/3825foldingHighlight?: boolean;3826/**3827* Auto fold imports folding regions.3828* Defaults to true.3829*/3830foldingImportsByDefault?: boolean;3831/**3832* Maximum number of foldable regions.3833* Defaults to 5000.3834*/3835foldingMaximumRegions?: number;3836/**3837* Controls whether the fold actions in the gutter stay always visible or hide unless the mouse is over the gutter.3838* Defaults to 'mouseover'.3839*/3840showFoldingControls?: 'always' | 'never' | 'mouseover';3841/**3842* Controls whether clicking on the empty content after a folded line will unfold the line.3843* Defaults to false.3844*/3845unfoldOnClickAfterEndOfLine?: boolean;3846/**3847* Enable highlighting of matching brackets.3848* Defaults to 'always'.3849*/3850matchBrackets?: 'never' | 'near' | 'always';3851/**3852* Enable experimental rendering using WebGPU.3853* Defaults to 'off'.3854*/3855experimentalGpuAcceleration?: 'on' | 'off';3856/**3857* Enable experimental whitespace rendering.3858* Defaults to 'svg'.3859*/3860experimentalWhitespaceRendering?: 'svg' | 'font' | 'off';3861/**3862* Enable rendering of whitespace.3863* Defaults to 'selection'.3864*/3865renderWhitespace?: 'none' | 'boundary' | 'selection' | 'trailing' | 'all';3866/**3867* Enable rendering of control characters.3868* Defaults to true.3869*/3870renderControlCharacters?: boolean;3871/**3872* Enable rendering of current line highlight.3873* Defaults to all.3874*/3875renderLineHighlight?: 'none' | 'gutter' | 'line' | 'all';3876/**3877* Control if the current line highlight should be rendered only the editor is focused.3878* Defaults to false.3879*/3880renderLineHighlightOnlyWhenFocus?: boolean;3881/**3882* Inserting and deleting whitespace follows tab stops.3883*/3884useTabStops?: boolean;3885/**3886* Controls whether the editor should automatically remove indentation whitespace when joining lines with Delete.3887* Defaults to false.3888*/3889trimWhitespaceOnDelete?: boolean;3890/**3891* The font family3892*/3893fontFamily?: string;3894/**3895* The font weight3896*/3897fontWeight?: string;3898/**3899* The font size3900*/3901fontSize?: number;3902/**3903* The line height3904*/3905lineHeight?: number;3906/**3907* The letter spacing3908*/3909letterSpacing?: number;3910/**3911* Controls fading out of unused variables.3912*/3913showUnused?: boolean;3914/**3915* Controls whether to focus the inline editor in the peek widget by default.3916* Defaults to false.3917*/3918peekWidgetDefaultFocus?: 'tree' | 'editor';3919/**3920* Sets a placeholder for the editor.3921* If set, the placeholder is shown if the editor is empty.3922*/3923placeholder?: string | undefined;3924/**3925* Controls whether the definition link opens element in the peek widget.3926* Defaults to false.3927*/3928definitionLinkOpensInPeek?: boolean;3929/**3930* Controls strikethrough deprecated variables.3931*/3932showDeprecated?: boolean;3933/**3934* Controls whether suggestions allow matches in the middle of the word instead of only at the beginning3935*/3936matchOnWordStartOnly?: boolean;3937/**3938* Control the behavior and rendering of the inline hints.3939*/3940inlayHints?: IEditorInlayHintsOptions;3941/**3942* Control if the editor should use shadow DOM.3943*/3944useShadowDOM?: boolean;3945/**3946* Controls the behavior of editor guides.3947*/3948guides?: IGuidesOptions;3949/**3950* Controls the behavior of the unicode highlight feature3951* (by default, ambiguous and invisible characters are highlighted).3952*/3953unicodeHighlight?: IUnicodeHighlightOptions;3954/**3955* Configures bracket pair colorization (disabled by default).3956*/3957bracketPairColorization?: IBracketPairColorizationOptions;3958/**3959* Controls dropping into the editor from an external source.3960*3961* When enabled, this shows a preview of the drop location and triggers an `onDropIntoEditor` event.3962*/3963dropIntoEditor?: IDropIntoEditorOptions;3964/**3965* Sets whether the new experimental edit context should be used instead of the text area.3966*/3967editContext?: boolean;3968/**3969* Controls whether to render rich HTML screen reader content when the EditContext is enabled3970*/3971renderRichScreenReaderContent?: boolean;3972/**3973* Controls support for changing how content is pasted into the editor.3974*/3975pasteAs?: IPasteAsOptions;3976/**3977* Controls whether the editor / terminal receives tabs or defers them to the workbench for navigation.3978*/3979tabFocusMode?: boolean;3980/**3981* Controls whether the accessibility hint should be provided to screen reader users when an inline completion is shown.3982*/3983inlineCompletionsAccessibilityVerbose?: boolean;3984}39853986export interface IDiffEditorBaseOptions {3987/**3988* Allow the user to resize the diff editor split view.3989* Defaults to true.3990*/3991enableSplitViewResizing?: boolean;3992/**3993* The default ratio when rendering side-by-side editors.3994* Must be a number between 0 and 1, min sizes apply.3995* Defaults to 0.53996*/3997splitViewDefaultRatio?: number;3998/**3999* Render the differences in two side-by-side editors.4000* Defaults to true.4001*/4002renderSideBySide?: boolean;4003/**4004* When `renderSideBySide` is enabled, `useInlineViewWhenSpaceIsLimited` is set,4005* and the diff editor has a width less than `renderSideBySideInlineBreakpoint`, the inline view is used.4006*/4007renderSideBySideInlineBreakpoint?: number | undefined;4008/**4009* When `renderSideBySide` is enabled, `useInlineViewWhenSpaceIsLimited` is set,4010* and the diff editor has a width less than `renderSideBySideInlineBreakpoint`, the inline view is used.4011*/4012useInlineViewWhenSpaceIsLimited?: boolean;4013/**4014* If set, the diff editor is optimized for small views.4015* Defaults to `false`.4016*/4017compactMode?: boolean;4018/**4019* Timeout in milliseconds after which diff computation is cancelled.4020* Defaults to 5000.4021*/4022maxComputationTime?: number;4023/**4024* Maximum supported file size in MB.4025* Defaults to 50.4026*/4027maxFileSize?: number;4028/**4029* Compute the diff by ignoring leading/trailing whitespace4030* Defaults to true.4031*/4032ignoreTrimWhitespace?: boolean;4033/**4034* Render +/- indicators for added/deleted changes.4035* Defaults to true.4036*/4037renderIndicators?: boolean;4038/**4039* Shows icons in the glyph margin to revert changes.4040* Default to true.4041*/4042renderMarginRevertIcon?: boolean;4043/**4044* Indicates if the gutter menu should be rendered.4045*/4046renderGutterMenu?: boolean;4047/**4048* Original model should be editable?4049* Defaults to false.4050*/4051originalEditable?: boolean;4052/**4053* Should the diff editor enable code lens?4054* Defaults to false.4055*/4056diffCodeLens?: boolean;4057/**4058* Is the diff editor should render overview ruler4059* Defaults to true4060*/4061renderOverviewRuler?: boolean;4062/**4063* Control the wrapping of the diff editor.4064*/4065diffWordWrap?: 'off' | 'on' | 'inherit';4066/**4067* Diff Algorithm4068*/4069diffAlgorithm?: 'legacy' | 'advanced';4070/**4071* Whether the diff editor aria label should be verbose.4072*/4073accessibilityVerbose?: boolean;4074experimental?: {4075/**4076* Defaults to false.4077*/4078showMoves?: boolean;4079showEmptyDecorations?: boolean;4080/**4081* Only applies when `renderSideBySide` is set to false.4082*/4083useTrueInlineView?: boolean;4084};4085/**4086* Is the diff editor inside another editor4087* Defaults to false4088*/4089isInEmbeddedEditor?: boolean;4090/**4091* If the diff editor should only show the difference review mode.4092*/4093onlyShowAccessibleDiffViewer?: boolean;4094hideUnchangedRegions?: {4095enabled?: boolean;4096revealLineCount?: number;4097minimumLineCount?: number;4098contextLineCount?: number;4099};4100}41014102/**4103* Configuration options for the diff editor.4104*/4105export interface IDiffEditorOptions extends IEditorOptions, IDiffEditorBaseOptions {4106}41074108/**4109* An event describing that the configuration of the editor has changed.4110*/4111export class ConfigurationChangedEvent {4112hasChanged(id: EditorOption): boolean;4113}41144115/**4116* All computed editor options.4117*/4118export interface IComputedEditorOptions {4119get<T extends EditorOption>(id: T): FindComputedEditorOptionValueById<T>;4120}41214122export interface IEditorOption<K extends EditorOption, V> {4123readonly id: K;4124readonly name: string;4125defaultValue: V;4126/**4127* Might modify `value`.4128*/4129applyUpdate(value: V | undefined, update: V): ApplyUpdateResult<V>;4130}41314132export class ApplyUpdateResult<T> {4133readonly newValue: T;4134readonly didChange: boolean;4135constructor(newValue: T, didChange: boolean);4136}41374138/**4139* Configuration options for editor comments4140*/4141export interface IEditorCommentsOptions {4142/**4143* Insert a space after the line comment token and inside the block comments tokens.4144* Defaults to true.4145*/4146insertSpace?: boolean;4147/**4148* Ignore empty lines when inserting line comments.4149* Defaults to true.4150*/4151ignoreEmptyLines?: boolean;4152}41534154/**4155* The kind of animation in which the editor's cursor should be rendered.4156*/4157export enum TextEditorCursorBlinkingStyle {4158/**4159* Hidden4160*/4161Hidden = 0,4162/**4163* Blinking4164*/4165Blink = 1,4166/**4167* Blinking with smooth fading4168*/4169Smooth = 2,4170/**4171* Blinking with prolonged filled state and smooth fading4172*/4173Phase = 3,4174/**4175* Expand collapse animation on the y axis4176*/4177Expand = 4,4178/**4179* No-Blinking4180*/4181Solid = 54182}41834184/**4185* The style in which the editor's cursor should be rendered.4186*/4187export enum TextEditorCursorStyle {4188/**4189* As a vertical line (sitting between two characters).4190*/4191Line = 1,4192/**4193* As a block (sitting on top of a character).4194*/4195Block = 2,4196/**4197* As a horizontal line (sitting under a character).4198*/4199Underline = 3,4200/**4201* As a thin vertical line (sitting between two characters).4202*/4203LineThin = 4,4204/**4205* As an outlined block (sitting on top of a character).4206*/4207BlockOutline = 5,4208/**4209* As a thin horizontal line (sitting under a character).4210*/4211UnderlineThin = 64212}42134214/**4215* Configuration options for editor find widget4216*/4217export interface IEditorFindOptions {4218/**4219* Controls whether the cursor should move to find matches while typing.4220*/4221cursorMoveOnType?: boolean;4222/**4223* Controls whether the find widget should search as you type.4224*/4225findOnType?: boolean;4226/**4227* Controls if we seed search string in the Find Widget with editor selection.4228*/4229seedSearchStringFromSelection?: 'never' | 'always' | 'selection';4230/**4231* Controls if Find in Selection flag is turned on in the editor.4232*/4233autoFindInSelection?: 'never' | 'always' | 'multiline';4234addExtraSpaceOnTop?: boolean;4235/**4236* Controls whether the search result and diff result automatically restarts from the beginning (or the end) when no further matches can be found4237*/4238loop?: boolean;4239}42404241export type GoToLocationValues = 'peek' | 'gotoAndPeek' | 'goto';42424243/**4244* Configuration options for go to location4245*/4246export interface IGotoLocationOptions {4247multiple?: GoToLocationValues;4248multipleDefinitions?: GoToLocationValues;4249multipleTypeDefinitions?: GoToLocationValues;4250multipleDeclarations?: GoToLocationValues;4251multipleImplementations?: GoToLocationValues;4252multipleReferences?: GoToLocationValues;4253multipleTests?: GoToLocationValues;4254alternativeDefinitionCommand?: string;4255alternativeTypeDefinitionCommand?: string;4256alternativeDeclarationCommand?: string;4257alternativeImplementationCommand?: string;4258alternativeReferenceCommand?: string;4259alternativeTestsCommand?: string;4260}42614262/**4263* Configuration options for editor hover4264*/4265export interface IEditorHoverOptions {4266/**4267* Enable the hover.4268* Defaults to true.4269*/4270enabled?: boolean;4271/**4272* Delay for showing the hover.4273* Defaults to 300.4274*/4275delay?: number;4276/**4277* Is the hover sticky such that it can be clicked and its contents selected?4278* Defaults to true.4279*/4280sticky?: boolean;4281/**4282* Controls how long the hover is visible after you hovered out of it.4283* Require sticky setting to be true.4284*/4285hidingDelay?: number;4286/**4287* Should the hover be shown above the line if possible?4288* Defaults to false.4289*/4290above?: boolean;4291}42924293/**4294* A description for the overview ruler position.4295*/4296export interface OverviewRulerPosition {4297/**4298* Width of the overview ruler4299*/4300readonly width: number;4301/**4302* Height of the overview ruler4303*/4304readonly height: number;4305/**4306* Top position for the overview ruler4307*/4308readonly top: number;4309/**4310* Right position for the overview ruler4311*/4312readonly right: number;4313}43144315export enum RenderMinimap {4316None = 0,4317Text = 1,4318Blocks = 24319}43204321/**4322* The internal layout details of the editor.4323*/4324export interface EditorLayoutInfo {4325/**4326* Full editor width.4327*/4328readonly width: number;4329/**4330* Full editor height.4331*/4332readonly height: number;4333/**4334* Left position for the glyph margin.4335*/4336readonly glyphMarginLeft: number;4337/**4338* The width of the glyph margin.4339*/4340readonly glyphMarginWidth: number;4341/**4342* The number of decoration lanes to render in the glyph margin.4343*/4344readonly glyphMarginDecorationLaneCount: number;4345/**4346* Left position for the line numbers.4347*/4348readonly lineNumbersLeft: number;4349/**4350* The width of the line numbers.4351*/4352readonly lineNumbersWidth: number;4353/**4354* Left position for the line decorations.4355*/4356readonly decorationsLeft: number;4357/**4358* The width of the line decorations.4359*/4360readonly decorationsWidth: number;4361/**4362* Left position for the content (actual text)4363*/4364readonly contentLeft: number;4365/**4366* The width of the content (actual text)4367*/4368readonly contentWidth: number;4369/**4370* Layout information for the minimap4371*/4372readonly minimap: EditorMinimapLayoutInfo;4373/**4374* The number of columns (of typical characters) fitting on a viewport line.4375*/4376readonly viewportColumn: number;4377readonly isWordWrapMinified: boolean;4378readonly isViewportWrapping: boolean;4379readonly wrappingColumn: number;4380/**4381* The width of the vertical scrollbar.4382*/4383readonly verticalScrollbarWidth: number;4384/**4385* The height of the horizontal scrollbar.4386*/4387readonly horizontalScrollbarHeight: number;4388/**4389* The position of the overview ruler.4390*/4391readonly overviewRuler: OverviewRulerPosition;4392}43934394/**4395* The internal layout details of the editor.4396*/4397export interface EditorMinimapLayoutInfo {4398readonly renderMinimap: RenderMinimap;4399readonly minimapLeft: number;4400readonly minimapWidth: number;4401readonly minimapHeightIsEditorHeight: boolean;4402readonly minimapIsSampling: boolean;4403readonly minimapScale: number;4404readonly minimapLineHeight: number;4405readonly minimapCanvasInnerWidth: number;4406readonly minimapCanvasInnerHeight: number;4407readonly minimapCanvasOuterWidth: number;4408readonly minimapCanvasOuterHeight: number;4409}44104411export enum ShowLightbulbIconMode {4412Off = 'off',4413OnCode = 'onCode',4414On = 'on'4415}44164417/**4418* Configuration options for editor lightbulb4419*/4420export interface IEditorLightbulbOptions {4421/**4422* Enable the lightbulb code action.4423* The three possible values are `off`, `on` and `onCode` and the default is `onCode`.4424* `off` disables the code action menu.4425* `on` shows the code action menu on code and on empty lines.4426* `onCode` shows the code action menu on code only.4427*/4428enabled?: ShowLightbulbIconMode;4429}44304431export interface IEditorStickyScrollOptions {4432/**4433* Enable the sticky scroll4434*/4435enabled?: boolean;4436/**4437* Maximum number of sticky lines to show4438*/4439maxLineCount?: number;4440/**4441* Model to choose for sticky scroll by default4442*/4443defaultModel?: 'outlineModel' | 'foldingProviderModel' | 'indentationModel';4444/**4445* Define whether to scroll sticky scroll with editor horizontal scrollbae4446*/4447scrollWithEditor?: boolean;4448}44494450/**4451* Configuration options for editor inlayHints4452*/4453export interface IEditorInlayHintsOptions {4454/**4455* Enable the inline hints.4456* Defaults to true.4457*/4458enabled?: 'on' | 'off' | 'offUnlessPressed' | 'onUnlessPressed';4459/**4460* Font size of inline hints.4461* Default to 90% of the editor font size.4462*/4463fontSize?: number;4464/**4465* Font family of inline hints.4466* Defaults to editor font family.4467*/4468fontFamily?: string;4469/**4470* Enables the padding around the inlay hint.4471* Defaults to false.4472*/4473padding?: boolean;4474/**4475* Maximum length for inlay hints per line4476* Set to 0 to have an unlimited length.4477*/4478maximumLength?: number;4479}44804481/**4482* Configuration options for editor minimap4483*/4484export interface IEditorMinimapOptions {4485/**4486* Enable the rendering of the minimap.4487* Defaults to true.4488*/4489enabled?: boolean;4490/**4491* Control the rendering of minimap.4492*/4493autohide?: 'none' | 'mouseover' | 'scroll';4494/**4495* Control the side of the minimap in editor.4496* Defaults to 'right'.4497*/4498side?: 'right' | 'left';4499/**4500* Control the minimap rendering mode.4501* Defaults to 'actual'.4502*/4503size?: 'proportional' | 'fill' | 'fit';4504/**4505* Control the rendering of the minimap slider.4506* Defaults to 'mouseover'.4507*/4508showSlider?: 'always' | 'mouseover';4509/**4510* Render the actual text on a line (as opposed to color blocks).4511* Defaults to true.4512*/4513renderCharacters?: boolean;4514/**4515* Limit the width of the minimap to render at most a certain number of columns.4516* Defaults to 120.4517*/4518maxColumn?: number;4519/**4520* Relative size of the font in the minimap. Defaults to 1.4521*/4522scale?: number;4523/**4524* Whether to show named regions as section headers. Defaults to true.4525*/4526showRegionSectionHeaders?: boolean;4527/**4528* Whether to show MARK: comments as section headers. Defaults to true.4529*/4530showMarkSectionHeaders?: boolean;4531/**4532* When specified, is used to create a custom section header parser regexp.4533* Must contain a match group named 'label' (written as (?<label>.+)) that encapsulates the section header.4534* Optionally can include another match group named 'separator'.4535* To match multi-line headers like:4536* // ==========4537* // My Section4538* // ==========4539* Use a pattern like: ^={3,}\n^\/\/ *(?<label>[^\n]*?)\n^={3,}$4540*/4541markSectionHeaderRegex?: string;4542/**4543* Font size of section headers. Defaults to 9.4544*/4545sectionHeaderFontSize?: number;4546/**4547* Spacing between the section header characters (in CSS px). Defaults to 1.4548*/4549sectionHeaderLetterSpacing?: number;4550}45514552/**4553* Configuration options for editor padding4554*/4555export interface IEditorPaddingOptions {4556/**4557* Spacing between top edge of editor and first line.4558*/4559top?: number;4560/**4561* Spacing between bottom edge of editor and last line.4562*/4563bottom?: number;4564}45654566/**4567* Configuration options for parameter hints4568*/4569export interface IEditorParameterHintOptions {4570/**4571* Enable parameter hints.4572* Defaults to true.4573*/4574enabled?: boolean;4575/**4576* Enable cycling of parameter hints.4577* Defaults to false.4578*/4579cycle?: boolean;4580}45814582export type QuickSuggestionsValue = 'on' | 'inline' | 'off';45834584/**4585* Configuration options for quick suggestions4586*/4587export interface IQuickSuggestionsOptions {4588other?: boolean | QuickSuggestionsValue;4589comments?: boolean | QuickSuggestionsValue;4590strings?: boolean | QuickSuggestionsValue;4591}45924593export interface InternalQuickSuggestionsOptions {4594readonly other: QuickSuggestionsValue;4595readonly comments: QuickSuggestionsValue;4596readonly strings: QuickSuggestionsValue;4597}45984599export type LineNumbersType = 'on' | 'off' | 'relative' | 'interval' | ((lineNumber: number) => string);46004601export enum RenderLineNumbersType {4602Off = 0,4603On = 1,4604Relative = 2,4605Interval = 3,4606Custom = 44607}46084609export interface InternalEditorRenderLineNumbersOptions {4610readonly renderType: RenderLineNumbersType;4611readonly renderFn: ((lineNumber: number) => string) | null;4612}46134614export interface IRulerOption {4615readonly column: number;4616readonly color: string | null;4617}46184619/**4620* Configuration options for editor scrollbars4621*/4622export interface IEditorScrollbarOptions {4623/**4624* The size of arrows (if displayed).4625* Defaults to 11.4626* **NOTE**: This option cannot be updated using `updateOptions()`4627*/4628arrowSize?: number;4629/**4630* Render vertical scrollbar.4631* Defaults to 'auto'.4632*/4633vertical?: 'auto' | 'visible' | 'hidden';4634/**4635* Render horizontal scrollbar.4636* Defaults to 'auto'.4637*/4638horizontal?: 'auto' | 'visible' | 'hidden';4639/**4640* Cast horizontal and vertical shadows when the content is scrolled.4641* Defaults to true.4642* **NOTE**: This option cannot be updated using `updateOptions()`4643*/4644useShadows?: boolean;4645/**4646* Render arrows at the top and bottom of the vertical scrollbar.4647* Defaults to false.4648* **NOTE**: This option cannot be updated using `updateOptions()`4649*/4650verticalHasArrows?: boolean;4651/**4652* Render arrows at the left and right of the horizontal scrollbar.4653* Defaults to false.4654* **NOTE**: This option cannot be updated using `updateOptions()`4655*/4656horizontalHasArrows?: boolean;4657/**4658* Listen to mouse wheel events and react to them by scrolling.4659* Defaults to true.4660*/4661handleMouseWheel?: boolean;4662/**4663* Always consume mouse wheel events (always call preventDefault() and stopPropagation() on the browser events).4664* Defaults to true.4665* **NOTE**: This option cannot be updated using `updateOptions()`4666*/4667alwaysConsumeMouseWheel?: boolean;4668/**4669* Height in pixels for the horizontal scrollbar.4670* Defaults to 12 (px).4671*/4672horizontalScrollbarSize?: number;4673/**4674* Width in pixels for the vertical scrollbar.4675* Defaults to 14 (px).4676*/4677verticalScrollbarSize?: number;4678/**4679* Width in pixels for the vertical slider.4680* Defaults to `verticalScrollbarSize`.4681* **NOTE**: This option cannot be updated using `updateOptions()`4682*/4683verticalSliderSize?: number;4684/**4685* Height in pixels for the horizontal slider.4686* Defaults to `horizontalScrollbarSize`.4687* **NOTE**: This option cannot be updated using `updateOptions()`4688*/4689horizontalSliderSize?: number;4690/**4691* Scroll gutter clicks move by page vs jump to position.4692* Defaults to false.4693*/4694scrollByPage?: boolean;4695/**4696* When set, the horizontal scrollbar will not increase content height.4697* Defaults to false.4698*/4699ignoreHorizontalScrollbarInContentHeight?: boolean;4700}47014702export interface InternalEditorScrollbarOptions {4703readonly arrowSize: number;4704readonly vertical: ScrollbarVisibility;4705readonly horizontal: ScrollbarVisibility;4706readonly useShadows: boolean;4707readonly verticalHasArrows: boolean;4708readonly horizontalHasArrows: boolean;4709readonly handleMouseWheel: boolean;4710readonly alwaysConsumeMouseWheel: boolean;4711readonly horizontalScrollbarSize: number;4712readonly horizontalSliderSize: number;4713readonly verticalScrollbarSize: number;4714readonly verticalSliderSize: number;4715readonly scrollByPage: boolean;4716readonly ignoreHorizontalScrollbarInContentHeight: boolean;4717}47184719export type InUntrustedWorkspace = 'inUntrustedWorkspace';47204721/**4722* Configuration options for unicode highlighting.4723*/4724export interface IUnicodeHighlightOptions {4725/**4726* 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.4727*/4728nonBasicASCII?: boolean | InUntrustedWorkspace;4729/**4730* Controls whether characters that just reserve space or have no width at all are highlighted.4731*/4732invisibleCharacters?: boolean;4733/**4734* Controls whether characters are highlighted that can be confused with basic ASCII characters, except those that are common in the current user locale.4735*/4736ambiguousCharacters?: boolean;4737/**4738* Controls whether characters in comments should also be subject to unicode highlighting.4739*/4740includeComments?: boolean | InUntrustedWorkspace;4741/**4742* Controls whether characters in strings should also be subject to unicode highlighting.4743*/4744includeStrings?: boolean | InUntrustedWorkspace;4745/**4746* Defines allowed characters that are not being highlighted.4747*/4748allowedCharacters?: Record<string, true>;4749/**4750* Unicode characters that are common in allowed locales are not being highlighted.4751*/4752allowedLocales?: Record<string | '_os' | '_vscode', true>;4753}47544755export interface IInlineSuggestOptions {4756/**4757* Enable or disable the rendering of automatic inline completions.4758*/4759enabled?: boolean;4760/**4761* Configures the mode.4762* Use `prefix` to only show ghost text if the text to replace is a prefix of the suggestion text.4763* Use `subword` to only show ghost text if the replace text is a subword of the suggestion text.4764* 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.4765* Defaults to `prefix`.4766*/4767mode?: 'prefix' | 'subword' | 'subwordSmart';4768showToolbar?: 'always' | 'onHover' | 'never';4769syntaxHighlightingEnabled?: boolean;4770suppressSuggestions?: boolean;4771minShowDelay?: number;4772/**4773* Does not clear active inline suggestions when the editor loses focus.4774*/4775keepOnBlur?: boolean;4776/**4777* Font family for inline suggestions.4778*/4779fontFamily?: string | 'default';4780}47814782type RequiredRecursive<T> = {4783[P in keyof T]-?: T[P] extends object | undefined ? RequiredRecursive<T[P]> : T[P];4784};47854786export interface IBracketPairColorizationOptions {4787/**4788* Enable or disable bracket pair colorization.4789*/4790enabled?: boolean;4791/**4792* Use independent color pool per bracket type.4793*/4794independentColorPoolPerBracketType?: boolean;4795}47964797export interface IGuidesOptions {4798/**4799* Enable rendering of bracket pair guides.4800* Defaults to false.4801*/4802bracketPairs?: boolean | 'active';4803/**4804* Enable rendering of vertical bracket pair guides.4805* Defaults to 'active'.4806*/4807bracketPairsHorizontal?: boolean | 'active';4808/**4809* Enable highlighting of the active bracket pair.4810* Defaults to true.4811*/4812highlightActiveBracketPair?: boolean;4813/**4814* Enable rendering of indent guides.4815* Defaults to true.4816*/4817indentation?: boolean;4818/**4819* Enable highlighting of the active indent guide.4820* Defaults to true.4821*/4822highlightActiveIndentation?: boolean | 'always';4823}48244825/**4826* Configuration options for editor suggest widget4827*/4828export interface ISuggestOptions {4829/**4830* Overwrite word ends on accept. Default to false.4831*/4832insertMode?: 'insert' | 'replace';4833/**4834* Enable graceful matching. Defaults to true.4835*/4836filterGraceful?: boolean;4837/**4838* Prevent quick suggestions when a snippet is active. Defaults to true.4839*/4840snippetsPreventQuickSuggestions?: boolean;4841/**4842* Favors words that appear close to the cursor.4843*/4844localityBonus?: boolean;4845/**4846* Enable using global storage for remembering suggestions.4847*/4848shareSuggestSelections?: boolean;4849/**4850* Select suggestions when triggered via quick suggest or trigger characters4851*/4852selectionMode?: 'always' | 'never' | 'whenTriggerCharacter' | 'whenQuickSuggestion';4853/**4854* Enable or disable icons in suggestions. Defaults to true.4855*/4856showIcons?: boolean;4857/**4858* Enable or disable the suggest status bar.4859*/4860showStatusBar?: boolean;4861/**4862* Enable or disable the rendering of the suggestion preview.4863*/4864preview?: boolean;4865/**4866* Configures the mode of the preview.4867*/4868previewMode?: 'prefix' | 'subword' | 'subwordSmart';4869/**4870* Show details inline with the label. Defaults to true.4871*/4872showInlineDetails?: boolean;4873/**4874* Show method-suggestions.4875*/4876showMethods?: boolean;4877/**4878* Show function-suggestions.4879*/4880showFunctions?: boolean;4881/**4882* Show constructor-suggestions.4883*/4884showConstructors?: boolean;4885/**4886* Show deprecated-suggestions.4887*/4888showDeprecated?: boolean;4889/**4890* Controls whether suggestions allow matches in the middle of the word instead of only at the beginning4891*/4892matchOnWordStartOnly?: boolean;4893/**4894* Show field-suggestions.4895*/4896showFields?: boolean;4897/**4898* Show variable-suggestions.4899*/4900showVariables?: boolean;4901/**4902* Show class-suggestions.4903*/4904showClasses?: boolean;4905/**4906* Show struct-suggestions.4907*/4908showStructs?: boolean;4909/**4910* Show interface-suggestions.4911*/4912showInterfaces?: boolean;4913/**4914* Show module-suggestions.4915*/4916showModules?: boolean;4917/**4918* Show property-suggestions.4919*/4920showProperties?: boolean;4921/**4922* Show event-suggestions.4923*/4924showEvents?: boolean;4925/**4926* Show operator-suggestions.4927*/4928showOperators?: boolean;4929/**4930* Show unit-suggestions.4931*/4932showUnits?: boolean;4933/**4934* Show value-suggestions.4935*/4936showValues?: boolean;4937/**4938* Show constant-suggestions.4939*/4940showConstants?: boolean;4941/**4942* Show enum-suggestions.4943*/4944showEnums?: boolean;4945/**4946* Show enumMember-suggestions.4947*/4948showEnumMembers?: boolean;4949/**4950* Show keyword-suggestions.4951*/4952showKeywords?: boolean;4953/**4954* Show text-suggestions.4955*/4956showWords?: boolean;4957/**4958* Show color-suggestions.4959*/4960showColors?: boolean;4961/**4962* Show file-suggestions.4963*/4964showFiles?: boolean;4965/**4966* Show reference-suggestions.4967*/4968showReferences?: boolean;4969/**4970* Show folder-suggestions.4971*/4972showFolders?: boolean;4973/**4974* Show typeParameter-suggestions.4975*/4976showTypeParameters?: boolean;4977/**4978* Show issue-suggestions.4979*/4980showIssues?: boolean;4981/**4982* Show user-suggestions.4983*/4984showUsers?: boolean;4985/**4986* Show snippet-suggestions.4987*/4988showSnippets?: boolean;4989}49904991export interface ISmartSelectOptions {4992selectLeadingAndTrailingWhitespace?: boolean;4993selectSubwords?: boolean;4994}49954996/**4997* Describes how to indent wrapped lines.4998*/4999export enum WrappingIndent {5000/**5001* No indentation => wrapped lines begin at column 1.5002*/5003None = 0,5004/**5005* Same => wrapped lines get the same indentation as the parent.5006*/5007Same = 1,5008/**5009* Indent => wrapped lines get +1 indentation toward the parent.5010*/5011Indent = 2,5012/**5013* DeepIndent => wrapped lines get +2 indentation toward the parent.5014*/5015DeepIndent = 35016}50175018export interface EditorWrappingInfo {5019readonly isDominatedByLongLines: boolean;5020readonly isWordWrapMinified: boolean;5021readonly isViewportWrapping: boolean;5022readonly wrappingColumn: number;5023}50245025/**5026* Configuration options for editor drop into behavior5027*/5028export interface IDropIntoEditorOptions {5029/**5030* Enable dropping into editor.5031* Defaults to true.5032*/5033enabled?: boolean;5034/**5035* Controls if a widget is shown after a drop.5036* Defaults to 'afterDrop'.5037*/5038showDropSelector?: 'afterDrop' | 'never';5039}50405041/**5042* Configuration options for editor pasting as into behavior5043*/5044export interface IPasteAsOptions {5045/**5046* Enable paste as functionality in editors.5047* Defaults to true.5048*/5049enabled?: boolean;5050/**5051* Controls if a widget is shown after a drop.5052* Defaults to 'afterPaste'.5053*/5054showPasteSelector?: 'afterPaste' | 'never';5055}50565057export enum EditorOption {5058acceptSuggestionOnCommitCharacter = 0,5059acceptSuggestionOnEnter = 1,5060accessibilitySupport = 2,5061accessibilityPageSize = 3,5062allowOverflow = 4,5063allowVariableLineHeights = 5,5064allowVariableFonts = 6,5065allowVariableFontsInAccessibilityMode = 7,5066ariaLabel = 8,5067ariaRequired = 9,5068autoClosingBrackets = 10,5069autoClosingComments = 11,5070screenReaderAnnounceInlineSuggestion = 12,5071autoClosingDelete = 13,5072autoClosingOvertype = 14,5073autoClosingQuotes = 15,5074autoIndent = 16,5075autoIndentOnPaste = 17,5076autoIndentOnPasteWithinString = 18,5077automaticLayout = 19,5078autoSurround = 20,5079bracketPairColorization = 21,5080guides = 22,5081codeLens = 23,5082codeLensFontFamily = 24,5083codeLensFontSize = 25,5084colorDecorators = 26,5085colorDecoratorsLimit = 27,5086columnSelection = 28,5087comments = 29,5088contextmenu = 30,5089copyWithSyntaxHighlighting = 31,5090cursorBlinking = 32,5091cursorSmoothCaretAnimation = 33,5092cursorStyle = 34,5093cursorSurroundingLines = 35,5094cursorSurroundingLinesStyle = 36,5095cursorWidth = 37,5096cursorHeight = 38,5097disableLayerHinting = 39,5098disableMonospaceOptimizations = 40,5099domReadOnly = 41,5100dragAndDrop = 42,5101dropIntoEditor = 43,5102editContext = 44,5103emptySelectionClipboard = 45,5104experimentalGpuAcceleration = 46,5105experimentalWhitespaceRendering = 47,5106extraEditorClassName = 48,5107fastScrollSensitivity = 49,5108find = 50,5109fixedOverflowWidgets = 51,5110folding = 52,5111foldingStrategy = 53,5112foldingHighlight = 54,5113foldingImportsByDefault = 55,5114foldingMaximumRegions = 56,5115unfoldOnClickAfterEndOfLine = 57,5116fontFamily = 58,5117fontInfo = 59,5118fontLigatures = 60,5119fontSize = 61,5120fontWeight = 62,5121fontVariations = 63,5122formatOnPaste = 64,5123formatOnType = 65,5124glyphMargin = 66,5125gotoLocation = 67,5126hideCursorInOverviewRuler = 68,5127hover = 69,5128inDiffEditor = 70,5129inlineSuggest = 71,5130letterSpacing = 72,5131lightbulb = 73,5132lineDecorationsWidth = 74,5133lineHeight = 75,5134lineNumbers = 76,5135lineNumbersMinChars = 77,5136linkedEditing = 78,5137links = 79,5138matchBrackets = 80,5139minimap = 81,5140mouseStyle = 82,5141mouseWheelScrollSensitivity = 83,5142mouseWheelZoom = 84,5143multiCursorMergeOverlapping = 85,5144multiCursorModifier = 86,5145multiCursorPaste = 87,5146multiCursorLimit = 88,5147occurrencesHighlight = 89,5148occurrencesHighlightDelay = 90,5149overtypeCursorStyle = 91,5150overtypeOnPaste = 92,5151overviewRulerBorder = 93,5152overviewRulerLanes = 94,5153padding = 95,5154pasteAs = 96,5155parameterHints = 97,5156peekWidgetDefaultFocus = 98,5157placeholder = 99,5158definitionLinkOpensInPeek = 100,5159quickSuggestions = 101,5160quickSuggestionsDelay = 102,5161readOnly = 103,5162readOnlyMessage = 104,5163renameOnType = 105,5164renderRichScreenReaderContent = 106,5165renderControlCharacters = 107,5166renderFinalNewline = 108,5167renderLineHighlight = 109,5168renderLineHighlightOnlyWhenFocus = 110,5169renderValidationDecorations = 111,5170renderWhitespace = 112,5171revealHorizontalRightPadding = 113,5172roundedSelection = 114,5173rulers = 115,5174scrollbar = 116,5175scrollBeyondLastColumn = 117,5176scrollBeyondLastLine = 118,5177scrollPredominantAxis = 119,5178selectionClipboard = 120,5179selectionHighlight = 121,5180selectionHighlightMaxLength = 122,5181selectionHighlightMultiline = 123,5182selectOnLineNumbers = 124,5183showFoldingControls = 125,5184showUnused = 126,5185snippetSuggestions = 127,5186smartSelect = 128,5187smoothScrolling = 129,5188stickyScroll = 130,5189stickyTabStops = 131,5190stopRenderingLineAfter = 132,5191suggest = 133,5192suggestFontSize = 134,5193suggestLineHeight = 135,5194suggestOnTriggerCharacters = 136,5195suggestSelection = 137,5196tabCompletion = 138,5197tabIndex = 139,5198trimWhitespaceOnDelete = 140,5199unicodeHighlighting = 141,5200unusualLineTerminators = 142,5201useShadowDOM = 143,5202useTabStops = 144,5203wordBreak = 145,5204wordSegmenterLocales = 146,5205wordSeparators = 147,5206wordWrap = 148,5207wordWrapBreakAfterCharacters = 149,5208wordWrapBreakBeforeCharacters = 150,5209wordWrapColumn = 151,5210wordWrapOverride1 = 152,5211wordWrapOverride2 = 153,5212wrappingIndent = 154,5213wrappingStrategy = 155,5214showDeprecated = 156,5215inertialScroll = 157,5216inlayHints = 158,5217wrapOnEscapedLineFeeds = 159,5218effectiveCursorStyle = 160,5219editorClassName = 161,5220pixelRatio = 162,5221tabFocusMode = 163,5222layoutInfo = 164,5223wrappingInfo = 165,5224defaultColorDecorators = 166,5225colorDecoratorsActivatedOn = 167,5226inlineCompletionsAccessibilityVerbose = 168,5227effectiveEditContext = 169,5228scrollOnMiddleClick = 170,5229effectiveAllowVariableFonts = 1715230}52315232export const EditorOptions: {5233acceptSuggestionOnCommitCharacter: IEditorOption<EditorOption.acceptSuggestionOnCommitCharacter, boolean>;5234acceptSuggestionOnEnter: IEditorOption<EditorOption.acceptSuggestionOnEnter, 'on' | 'off' | 'smart'>;5235accessibilitySupport: IEditorOption<EditorOption.accessibilitySupport, AccessibilitySupport>;5236accessibilityPageSize: IEditorOption<EditorOption.accessibilityPageSize, number>;5237allowOverflow: IEditorOption<EditorOption.allowOverflow, boolean>;5238allowVariableLineHeights: IEditorOption<EditorOption.allowVariableLineHeights, boolean>;5239allowVariableFonts: IEditorOption<EditorOption.allowVariableFonts, boolean>;5240allowVariableFontsInAccessibilityMode: IEditorOption<EditorOption.allowVariableFontsInAccessibilityMode, boolean>;5241ariaLabel: IEditorOption<EditorOption.ariaLabel, string>;5242ariaRequired: IEditorOption<EditorOption.ariaRequired, boolean>;5243screenReaderAnnounceInlineSuggestion: IEditorOption<EditorOption.screenReaderAnnounceInlineSuggestion, boolean>;5244autoClosingBrackets: IEditorOption<EditorOption.autoClosingBrackets, 'always' | 'never' | 'languageDefined' | 'beforeWhitespace'>;5245autoClosingComments: IEditorOption<EditorOption.autoClosingComments, 'always' | 'never' | 'languageDefined' | 'beforeWhitespace'>;5246autoClosingDelete: IEditorOption<EditorOption.autoClosingDelete, 'auto' | 'always' | 'never'>;5247autoClosingOvertype: IEditorOption<EditorOption.autoClosingOvertype, 'auto' | 'always' | 'never'>;5248autoClosingQuotes: IEditorOption<EditorOption.autoClosingQuotes, 'always' | 'never' | 'languageDefined' | 'beforeWhitespace'>;5249autoIndent: IEditorOption<EditorOption.autoIndent, EditorAutoIndentStrategy>;5250autoIndentOnPaste: IEditorOption<EditorOption.autoIndentOnPaste, boolean>;5251autoIndentOnPasteWithinString: IEditorOption<EditorOption.autoIndentOnPasteWithinString, boolean>;5252automaticLayout: IEditorOption<EditorOption.automaticLayout, boolean>;5253autoSurround: IEditorOption<EditorOption.autoSurround, 'never' | 'languageDefined' | 'quotes' | 'brackets'>;5254bracketPairColorization: IEditorOption<EditorOption.bracketPairColorization, Readonly<Required<IBracketPairColorizationOptions>>>;5255bracketPairGuides: IEditorOption<EditorOption.guides, Readonly<Required<IGuidesOptions>>>;5256stickyTabStops: IEditorOption<EditorOption.stickyTabStops, boolean>;5257codeLens: IEditorOption<EditorOption.codeLens, boolean>;5258codeLensFontFamily: IEditorOption<EditorOption.codeLensFontFamily, string>;5259codeLensFontSize: IEditorOption<EditorOption.codeLensFontSize, number>;5260colorDecorators: IEditorOption<EditorOption.colorDecorators, boolean>;5261colorDecoratorActivatedOn: IEditorOption<EditorOption.colorDecoratorsActivatedOn, 'hover' | 'clickAndHover' | 'click'>;5262colorDecoratorsLimit: IEditorOption<EditorOption.colorDecoratorsLimit, number>;5263columnSelection: IEditorOption<EditorOption.columnSelection, boolean>;5264comments: IEditorOption<EditorOption.comments, Readonly<Required<IEditorCommentsOptions>>>;5265contextmenu: IEditorOption<EditorOption.contextmenu, boolean>;5266copyWithSyntaxHighlighting: IEditorOption<EditorOption.copyWithSyntaxHighlighting, boolean>;5267cursorBlinking: IEditorOption<EditorOption.cursorBlinking, TextEditorCursorBlinkingStyle>;5268cursorSmoothCaretAnimation: IEditorOption<EditorOption.cursorSmoothCaretAnimation, 'on' | 'off' | 'explicit'>;5269cursorStyle: IEditorOption<EditorOption.cursorStyle, TextEditorCursorStyle>;5270overtypeCursorStyle: IEditorOption<EditorOption.overtypeCursorStyle, TextEditorCursorStyle>;5271cursorSurroundingLines: IEditorOption<EditorOption.cursorSurroundingLines, number>;5272cursorSurroundingLinesStyle: IEditorOption<EditorOption.cursorSurroundingLinesStyle, 'default' | 'all'>;5273cursorWidth: IEditorOption<EditorOption.cursorWidth, number>;5274cursorHeight: IEditorOption<EditorOption.cursorHeight, number>;5275disableLayerHinting: IEditorOption<EditorOption.disableLayerHinting, boolean>;5276disableMonospaceOptimizations: IEditorOption<EditorOption.disableMonospaceOptimizations, boolean>;5277domReadOnly: IEditorOption<EditorOption.domReadOnly, boolean>;5278dragAndDrop: IEditorOption<EditorOption.dragAndDrop, boolean>;5279emptySelectionClipboard: IEditorOption<EditorOption.emptySelectionClipboard, boolean>;5280dropIntoEditor: IEditorOption<EditorOption.dropIntoEditor, Readonly<Required<IDropIntoEditorOptions>>>;5281editContext: IEditorOption<EditorOption.editContext, boolean>;5282renderRichScreenReaderContent: IEditorOption<EditorOption.renderRichScreenReaderContent, boolean>;5283stickyScroll: IEditorOption<EditorOption.stickyScroll, Readonly<Required<IEditorStickyScrollOptions>>>;5284experimentalGpuAcceleration: IEditorOption<EditorOption.experimentalGpuAcceleration, 'on' | 'off'>;5285experimentalWhitespaceRendering: IEditorOption<EditorOption.experimentalWhitespaceRendering, 'off' | 'svg' | 'font'>;5286extraEditorClassName: IEditorOption<EditorOption.extraEditorClassName, string>;5287fastScrollSensitivity: IEditorOption<EditorOption.fastScrollSensitivity, number>;5288find: IEditorOption<EditorOption.find, Readonly<Required<IEditorFindOptions>>>;5289fixedOverflowWidgets: IEditorOption<EditorOption.fixedOverflowWidgets, boolean>;5290folding: IEditorOption<EditorOption.folding, boolean>;5291foldingStrategy: IEditorOption<EditorOption.foldingStrategy, 'auto' | 'indentation'>;5292foldingHighlight: IEditorOption<EditorOption.foldingHighlight, boolean>;5293foldingImportsByDefault: IEditorOption<EditorOption.foldingImportsByDefault, boolean>;5294foldingMaximumRegions: IEditorOption<EditorOption.foldingMaximumRegions, number>;5295unfoldOnClickAfterEndOfLine: IEditorOption<EditorOption.unfoldOnClickAfterEndOfLine, boolean>;5296fontFamily: IEditorOption<EditorOption.fontFamily, string>;5297fontInfo: IEditorOption<EditorOption.fontInfo, FontInfo>;5298fontLigatures2: IEditorOption<EditorOption.fontLigatures, string>;5299fontSize: IEditorOption<EditorOption.fontSize, number>;5300fontWeight: IEditorOption<EditorOption.fontWeight, string>;5301fontVariations: IEditorOption<EditorOption.fontVariations, string>;5302formatOnPaste: IEditorOption<EditorOption.formatOnPaste, boolean>;5303formatOnType: IEditorOption<EditorOption.formatOnType, boolean>;5304glyphMargin: IEditorOption<EditorOption.glyphMargin, boolean>;5305gotoLocation: IEditorOption<EditorOption.gotoLocation, Readonly<Required<IGotoLocationOptions>>>;5306hideCursorInOverviewRuler: IEditorOption<EditorOption.hideCursorInOverviewRuler, boolean>;5307hover: IEditorOption<EditorOption.hover, Readonly<Required<IEditorHoverOptions>>>;5308inDiffEditor: IEditorOption<EditorOption.inDiffEditor, boolean>;5309inertialScroll: IEditorOption<EditorOption.inertialScroll, boolean>;5310letterSpacing: IEditorOption<EditorOption.letterSpacing, number>;5311lightbulb: IEditorOption<EditorOption.lightbulb, Readonly<Required<IEditorLightbulbOptions>>>;5312lineDecorationsWidth: IEditorOption<EditorOption.lineDecorationsWidth, number>;5313lineHeight: IEditorOption<EditorOption.lineHeight, number>;5314lineNumbers: IEditorOption<EditorOption.lineNumbers, InternalEditorRenderLineNumbersOptions>;5315lineNumbersMinChars: IEditorOption<EditorOption.lineNumbersMinChars, number>;5316linkedEditing: IEditorOption<EditorOption.linkedEditing, boolean>;5317links: IEditorOption<EditorOption.links, boolean>;5318matchBrackets: IEditorOption<EditorOption.matchBrackets, 'always' | 'never' | 'near'>;5319minimap: IEditorOption<EditorOption.minimap, Readonly<Required<IEditorMinimapOptions>>>;5320mouseStyle: IEditorOption<EditorOption.mouseStyle, 'default' | 'text' | 'copy'>;5321mouseWheelScrollSensitivity: IEditorOption<EditorOption.mouseWheelScrollSensitivity, number>;5322mouseWheelZoom: IEditorOption<EditorOption.mouseWheelZoom, boolean>;5323multiCursorMergeOverlapping: IEditorOption<EditorOption.multiCursorMergeOverlapping, boolean>;5324multiCursorModifier: IEditorOption<EditorOption.multiCursorModifier, 'altKey' | 'metaKey' | 'ctrlKey'>;5325multiCursorPaste: IEditorOption<EditorOption.multiCursorPaste, 'spread' | 'full'>;5326multiCursorLimit: IEditorOption<EditorOption.multiCursorLimit, number>;5327occurrencesHighlight: IEditorOption<EditorOption.occurrencesHighlight, 'off' | 'singleFile' | 'multiFile'>;5328occurrencesHighlightDelay: IEditorOption<EditorOption.occurrencesHighlightDelay, number>;5329overtypeOnPaste: IEditorOption<EditorOption.overtypeOnPaste, boolean>;5330overviewRulerBorder: IEditorOption<EditorOption.overviewRulerBorder, boolean>;5331overviewRulerLanes: IEditorOption<EditorOption.overviewRulerLanes, number>;5332padding: IEditorOption<EditorOption.padding, Readonly<Required<IEditorPaddingOptions>>>;5333pasteAs: IEditorOption<EditorOption.pasteAs, Readonly<Required<IPasteAsOptions>>>;5334parameterHints: IEditorOption<EditorOption.parameterHints, Readonly<Required<IEditorParameterHintOptions>>>;5335peekWidgetDefaultFocus: IEditorOption<EditorOption.peekWidgetDefaultFocus, 'tree' | 'editor'>;5336placeholder: IEditorOption<EditorOption.placeholder, string>;5337definitionLinkOpensInPeek: IEditorOption<EditorOption.definitionLinkOpensInPeek, boolean>;5338quickSuggestions: IEditorOption<EditorOption.quickSuggestions, InternalQuickSuggestionsOptions>;5339quickSuggestionsDelay: IEditorOption<EditorOption.quickSuggestionsDelay, number>;5340readOnly: IEditorOption<EditorOption.readOnly, boolean>;5341readOnlyMessage: IEditorOption<EditorOption.readOnlyMessage, any>;5342renameOnType: IEditorOption<EditorOption.renameOnType, boolean>;5343renderControlCharacters: IEditorOption<EditorOption.renderControlCharacters, boolean>;5344renderFinalNewline: IEditorOption<EditorOption.renderFinalNewline, 'on' | 'off' | 'dimmed'>;5345renderLineHighlight: IEditorOption<EditorOption.renderLineHighlight, 'all' | 'line' | 'none' | 'gutter'>;5346renderLineHighlightOnlyWhenFocus: IEditorOption<EditorOption.renderLineHighlightOnlyWhenFocus, boolean>;5347renderValidationDecorations: IEditorOption<EditorOption.renderValidationDecorations, 'on' | 'off' | 'editable'>;5348renderWhitespace: IEditorOption<EditorOption.renderWhitespace, 'all' | 'none' | 'boundary' | 'selection' | 'trailing'>;5349revealHorizontalRightPadding: IEditorOption<EditorOption.revealHorizontalRightPadding, number>;5350roundedSelection: IEditorOption<EditorOption.roundedSelection, boolean>;5351rulers: IEditorOption<EditorOption.rulers, {}>;5352scrollbar: IEditorOption<EditorOption.scrollbar, InternalEditorScrollbarOptions>;5353scrollBeyondLastColumn: IEditorOption<EditorOption.scrollBeyondLastColumn, number>;5354scrollBeyondLastLine: IEditorOption<EditorOption.scrollBeyondLastLine, boolean>;5355scrollOnMiddleClick: IEditorOption<EditorOption.scrollOnMiddleClick, boolean>;5356scrollPredominantAxis: IEditorOption<EditorOption.scrollPredominantAxis, boolean>;5357selectionClipboard: IEditorOption<EditorOption.selectionClipboard, boolean>;5358selectionHighlight: IEditorOption<EditorOption.selectionHighlight, boolean>;5359selectionHighlightMaxLength: IEditorOption<EditorOption.selectionHighlightMaxLength, number>;5360selectionHighlightMultiline: IEditorOption<EditorOption.selectionHighlightMultiline, boolean>;5361selectOnLineNumbers: IEditorOption<EditorOption.selectOnLineNumbers, boolean>;5362showFoldingControls: IEditorOption<EditorOption.showFoldingControls, 'always' | 'never' | 'mouseover'>;5363showUnused: IEditorOption<EditorOption.showUnused, boolean>;5364showDeprecated: IEditorOption<EditorOption.showDeprecated, boolean>;5365inlayHints: IEditorOption<EditorOption.inlayHints, Readonly<Required<IEditorInlayHintsOptions>>>;5366snippetSuggestions: IEditorOption<EditorOption.snippetSuggestions, 'none' | 'top' | 'bottom' | 'inline'>;5367smartSelect: IEditorOption<EditorOption.smartSelect, Readonly<Required<ISmartSelectOptions>>>;5368smoothScrolling: IEditorOption<EditorOption.smoothScrolling, boolean>;5369stopRenderingLineAfter: IEditorOption<EditorOption.stopRenderingLineAfter, number>;5370suggest: IEditorOption<EditorOption.suggest, Readonly<Required<ISuggestOptions>>>;5371inlineSuggest: IEditorOption<EditorOption.inlineSuggest, Readonly<RequiredRecursive<IInlineSuggestOptions>>>;5372inlineCompletionsAccessibilityVerbose: IEditorOption<EditorOption.inlineCompletionsAccessibilityVerbose, boolean>;5373suggestFontSize: IEditorOption<EditorOption.suggestFontSize, number>;5374suggestLineHeight: IEditorOption<EditorOption.suggestLineHeight, number>;5375suggestOnTriggerCharacters: IEditorOption<EditorOption.suggestOnTriggerCharacters, boolean>;5376suggestSelection: IEditorOption<EditorOption.suggestSelection, 'first' | 'recentlyUsed' | 'recentlyUsedByPrefix'>;5377tabCompletion: IEditorOption<EditorOption.tabCompletion, 'on' | 'off' | 'onlySnippets'>;5378tabIndex: IEditorOption<EditorOption.tabIndex, number>;5379trimWhitespaceOnDelete: IEditorOption<EditorOption.trimWhitespaceOnDelete, boolean>;5380unicodeHighlight: IEditorOption<EditorOption.unicodeHighlighting, any>;5381unusualLineTerminators: IEditorOption<EditorOption.unusualLineTerminators, 'off' | 'auto' | 'prompt'>;5382useShadowDOM: IEditorOption<EditorOption.useShadowDOM, boolean>;5383useTabStops: IEditorOption<EditorOption.useTabStops, boolean>;5384wordBreak: IEditorOption<EditorOption.wordBreak, 'normal' | 'keepAll'>;5385wordSegmenterLocales: IEditorOption<EditorOption.wordSegmenterLocales, {}>;5386wordSeparators: IEditorOption<EditorOption.wordSeparators, string>;5387wordWrap: IEditorOption<EditorOption.wordWrap, 'wordWrapColumn' | 'on' | 'off' | 'bounded'>;5388wordWrapBreakAfterCharacters: IEditorOption<EditorOption.wordWrapBreakAfterCharacters, string>;5389wordWrapBreakBeforeCharacters: IEditorOption<EditorOption.wordWrapBreakBeforeCharacters, string>;5390wordWrapColumn: IEditorOption<EditorOption.wordWrapColumn, number>;5391wordWrapOverride1: IEditorOption<EditorOption.wordWrapOverride1, 'on' | 'off' | 'inherit'>;5392wordWrapOverride2: IEditorOption<EditorOption.wordWrapOverride2, 'on' | 'off' | 'inherit'>;5393wrapOnEscapedLineFeeds: IEditorOption<EditorOption.wrapOnEscapedLineFeeds, boolean>;5394effectiveCursorStyle: IEditorOption<EditorOption.effectiveCursorStyle, TextEditorCursorStyle>;5395editorClassName: IEditorOption<EditorOption.editorClassName, string>;5396defaultColorDecorators: IEditorOption<EditorOption.defaultColorDecorators, 'auto' | 'always' | 'never'>;5397pixelRatio: IEditorOption<EditorOption.pixelRatio, number>;5398tabFocusMode: IEditorOption<EditorOption.tabFocusMode, boolean>;5399layoutInfo: IEditorOption<EditorOption.layoutInfo, EditorLayoutInfo>;5400wrappingInfo: IEditorOption<EditorOption.wrappingInfo, EditorWrappingInfo>;5401wrappingIndent: IEditorOption<EditorOption.wrappingIndent, WrappingIndent>;5402wrappingStrategy: IEditorOption<EditorOption.wrappingStrategy, 'simple' | 'advanced'>;5403effectiveEditContextEnabled: IEditorOption<EditorOption.effectiveEditContext, boolean>;5404effectiveAllowVariableFonts: IEditorOption<EditorOption.effectiveAllowVariableFonts, boolean>;5405};54065407type EditorOptionsType = typeof EditorOptions;54085409type FindEditorOptionsKeyById<T extends EditorOption> = {5410[K in keyof EditorOptionsType]: EditorOptionsType[K]['id'] extends T ? K : never;5411}[keyof EditorOptionsType];54125413type ComputedEditorOptionValue<T extends IEditorOption<any, any>> = T extends IEditorOption<any, infer R> ? R : never;54145415export type FindComputedEditorOptionValueById<T extends EditorOption> = NonNullable<ComputedEditorOptionValue<EditorOptionsType[FindEditorOptionsKeyById<T>]>>;54165417export interface IEditorConstructionOptions extends IEditorOptions {5418/**5419* The initial editor dimension (to avoid measuring the container).5420*/5421dimension?: IDimension;5422/**5423* Place overflow widgets inside an external DOM node.5424* Defaults to an internal DOM node.5425*/5426overflowWidgetsDomNode?: HTMLElement;5427}54285429/**5430* A view zone is a full horizontal rectangle that 'pushes' text down.5431* The editor reserves space for view zones when rendering.5432*/5433export interface IViewZone {5434/**5435* The line number after which this zone should appear.5436* Use 0 to place a view zone before the first line number.5437*/5438afterLineNumber: number;5439/**5440* The column after which this zone should appear.5441* If not set, the maxLineColumn of `afterLineNumber` will be used.5442* This is relevant for wrapped lines.5443*/5444afterColumn?: number;5445/**5446* If the `afterColumn` has multiple view columns, the affinity specifies which one to use. Defaults to `none`.5447*/5448afterColumnAffinity?: PositionAffinity;5449/**5450* Render the zone even when its line is hidden.5451*/5452showInHiddenAreas?: boolean;5453/**5454* Tiebreaker that is used when multiple view zones want to be after the same line.5455* Defaults to `afterColumn` otherwise 10000;5456*/5457ordinal?: number;5458/**5459* Suppress mouse down events.5460* If set, the editor will attach a mouse down listener to the view zone and .preventDefault on it.5461* Defaults to false5462*/5463suppressMouseDown?: boolean;5464/**5465* The height in lines of the view zone.5466* If specified, `heightInPx` will be used instead of this.5467* If neither `heightInPx` nor `heightInLines` is specified, a default of `heightInLines` = 1 will be chosen.5468*/5469heightInLines?: number;5470/**5471* The height in px of the view zone.5472* If this is set, the editor will give preference to it rather than `heightInLines` above.5473* If neither `heightInPx` nor `heightInLines` is specified, a default of `heightInLines` = 1 will be chosen.5474*/5475heightInPx?: number;5476/**5477* The minimum width in px of the view zone.5478* If this is set, the editor will ensure that the scroll width is >= than this value.5479*/5480minWidthInPx?: number;5481/**5482* The dom node of the view zone5483*/5484domNode: HTMLElement;5485/**5486* An optional dom node for the view zone that will be placed in the margin area.5487*/5488marginDomNode?: HTMLElement | null;5489/**5490* Callback which gives the relative top of the view zone as it appears (taking scrolling into account).5491*/5492onDomNodeTop?: (top: number) => void;5493/**5494* Callback which gives the height in pixels of the view zone.5495*/5496onComputedHeight?: (height: number) => void;5497}54985499/**5500* An accessor that allows for zones to be added or removed.5501*/5502export interface IViewZoneChangeAccessor {5503/**5504* Create a new view zone.5505* @param zone Zone to create5506* @return A unique identifier to the view zone.5507*/5508addZone(zone: IViewZone): string;5509/**5510* Remove a zone5511* @param id A unique identifier to the view zone, as returned by the `addZone` call.5512*/5513removeZone(id: string): void;5514/**5515* Change a zone's position.5516* The editor will rescan the `afterLineNumber` and `afterColumn` properties of a view zone.5517*/5518layoutZone(id: string): void;5519}55205521/**5522* A positioning preference for rendering content widgets.5523*/5524export enum ContentWidgetPositionPreference {5525/**5526* Place the content widget exactly at a position5527*/5528EXACT = 0,5529/**5530* Place the content widget above a position5531*/5532ABOVE = 1,5533/**5534* Place the content widget below a position5535*/5536BELOW = 25537}55385539/**5540* A position for rendering content widgets.5541*/5542export interface IContentWidgetPosition {5543/**5544* Desired position which serves as an anchor for placing the content widget.5545* The widget will be placed above, at, or below the specified position, based on the5546* provided preference. The widget will always touch this position.5547*5548* Given sufficient horizontal space, the widget will be placed to the right of the5549* passed in position. This can be tweaked by providing a `secondaryPosition`.5550*5551* @see preference5552* @see secondaryPosition5553*/5554position: IPosition | null;5555/**5556* Optionally, a secondary position can be provided to further define the placing of5557* the content widget. The secondary position must have the same line number as the5558* primary position. If possible, the widget will be placed such that it also touches5559* the secondary position.5560*/5561secondaryPosition?: IPosition | null;5562/**5563* Placement preference for position, in order of preference.5564*/5565preference: ContentWidgetPositionPreference[];5566/**5567* Placement preference when multiple view positions refer to the same (model) position.5568* This plays a role when injected text is involved.5569*/5570positionAffinity?: PositionAffinity;5571}55725573/**5574* A content widget renders inline with the text and can be easily placed 'near' an editor position.5575*/5576export interface IContentWidget {5577/**5578* Render this content widget in a location where it could overflow the editor's view dom node.5579*/5580allowEditorOverflow?: boolean;5581/**5582* Call preventDefault() on mousedown events that target the content widget.5583*/5584suppressMouseDown?: boolean;5585/**5586* Get a unique identifier of the content widget.5587*/5588getId(): string;5589/**5590* Get the dom node of the content widget.5591*/5592getDomNode(): HTMLElement;5593/**5594* Get the placement of the content widget.5595* If null is returned, the content widget will be placed off screen.5596*/5597getPosition(): IContentWidgetPosition | null;5598/**5599* Optional function that is invoked before rendering5600* the content widget. If a dimension is returned the editor will5601* attempt to use it.5602*/5603beforeRender?(): IDimension | null;5604/**5605* Optional function that is invoked after rendering the content5606* widget. Is being invoked with the selected position preference5607* or `null` if not rendered.5608*/5609afterRender?(position: ContentWidgetPositionPreference | null, coordinate: IContentWidgetRenderedCoordinate | null): void;5610}56115612/**5613* Coordinatees passed in {@link IContentWidget.afterRender}5614*/5615export interface IContentWidgetRenderedCoordinate {5616/**5617* Top position relative to the editor content.5618*/5619readonly top: number;5620/**5621* Left position relative to the editor content.5622*/5623readonly left: number;5624}56255626/**5627* A positioning preference for rendering overlay widgets.5628*/5629export enum OverlayWidgetPositionPreference {5630/**5631* Position the overlay widget in the top right corner5632*/5633TOP_RIGHT_CORNER = 0,5634/**5635* Position the overlay widget in the bottom right corner5636*/5637BOTTOM_RIGHT_CORNER = 1,5638/**5639* Position the overlay widget in the top center5640*/5641TOP_CENTER = 25642}56435644/**5645* Represents editor-relative coordinates of an overlay widget.5646*/5647export interface IOverlayWidgetPositionCoordinates {5648/**5649* The top position for the overlay widget, relative to the editor.5650*/5651top: number;5652/**5653* The left position for the overlay widget, relative to the editor.5654*/5655left: number;5656}56575658/**5659* A position for rendering overlay widgets.5660*/5661export interface IOverlayWidgetPosition {5662/**5663* The position preference for the overlay widget.5664*/5665preference: OverlayWidgetPositionPreference | IOverlayWidgetPositionCoordinates | null;5666/**5667* When set, stacks with other overlay widgets with the same preference,5668* in an order determined by the ordinal value.5669*/5670stackOridinal?: number;5671}56725673/**5674* An overlay widgets renders on top of the text.5675*/5676export interface IOverlayWidget {5677/**5678* Event fired when the widget layout changes.5679*/5680onDidLayout?: IEvent<void>;5681/**5682* Render this overlay widget in a location where it could overflow the editor's view dom node.5683*/5684allowEditorOverflow?: boolean;5685/**5686* Get a unique identifier of the overlay widget.5687*/5688getId(): string;5689/**5690* Get the dom node of the overlay widget.5691*/5692getDomNode(): HTMLElement;5693/**5694* Get the placement of the overlay widget.5695* If null is returned, the overlay widget is responsible to place itself.5696*/5697getPosition(): IOverlayWidgetPosition | null;5698/**5699* The editor will ensure that the scroll width is >= than this value.5700*/5701getMinContentWidthInPx?(): number;5702}57035704/**5705* A glyph margin widget renders in the editor glyph margin.5706*/5707export interface IGlyphMarginWidget {5708/**5709* Get a unique identifier of the glyph widget.5710*/5711getId(): string;5712/**5713* Get the dom node of the glyph widget.5714*/5715getDomNode(): HTMLElement;5716/**5717* Get the placement of the glyph widget.5718*/5719getPosition(): IGlyphMarginWidgetPosition;5720}57215722/**5723* A position for rendering glyph margin widgets.5724*/5725export interface IGlyphMarginWidgetPosition {5726/**5727* The glyph margin lane where the widget should be shown.5728*/5729lane: GlyphMarginLane;5730/**5731* The priority order of the widget, used for determining which widget5732* to render when there are multiple.5733*/5734zIndex: number;5735/**5736* The editor range that this widget applies to.5737*/5738range: IRange;5739}57405741/**5742* Type of hit element with the mouse in the editor.5743*/5744export enum MouseTargetType {5745/**5746* Mouse is on top of an unknown element.5747*/5748UNKNOWN = 0,5749/**5750* Mouse is on top of the textarea used for input.5751*/5752TEXTAREA = 1,5753/**5754* Mouse is on top of the glyph margin5755*/5756GUTTER_GLYPH_MARGIN = 2,5757/**5758* Mouse is on top of the line numbers5759*/5760GUTTER_LINE_NUMBERS = 3,5761/**5762* Mouse is on top of the line decorations5763*/5764GUTTER_LINE_DECORATIONS = 4,5765/**5766* Mouse is on top of the whitespace left in the gutter by a view zone.5767*/5768GUTTER_VIEW_ZONE = 5,5769/**5770* Mouse is on top of text in the content.5771*/5772CONTENT_TEXT = 6,5773/**5774* Mouse is on top of empty space in the content (e.g. after line text or below last line)5775*/5776CONTENT_EMPTY = 7,5777/**5778* Mouse is on top of a view zone in the content.5779*/5780CONTENT_VIEW_ZONE = 8,5781/**5782* Mouse is on top of a content widget.5783*/5784CONTENT_WIDGET = 9,5785/**5786* Mouse is on top of the decorations overview ruler.5787*/5788OVERVIEW_RULER = 10,5789/**5790* Mouse is on top of a scrollbar.5791*/5792SCROLLBAR = 11,5793/**5794* Mouse is on top of an overlay widget.5795*/5796OVERLAY_WIDGET = 12,5797/**5798* Mouse is outside of the editor.5799*/5800OUTSIDE_EDITOR = 135801}58025803export interface IBaseMouseTarget {5804/**5805* The target element5806*/5807readonly element: HTMLElement | null;5808/**5809* The 'approximate' editor position5810*/5811readonly position: Position | null;5812/**5813* Desired mouse column (e.g. when position.column gets clamped to text length -- clicking after text on a line).5814*/5815readonly mouseColumn: number;5816/**5817* The 'approximate' editor range5818*/5819readonly range: Range | null;5820}58215822export interface IMouseTargetUnknown extends IBaseMouseTarget {5823readonly type: MouseTargetType.UNKNOWN;5824}58255826export interface IMouseTargetTextarea extends IBaseMouseTarget {5827readonly type: MouseTargetType.TEXTAREA;5828readonly position: null;5829readonly range: null;5830}58315832export interface IMouseTargetMarginData {5833readonly isAfterLines: boolean;5834readonly glyphMarginLeft: number;5835readonly glyphMarginWidth: number;5836readonly glyphMarginLane?: GlyphMarginLane;5837readonly lineNumbersWidth: number;5838readonly offsetX: number;5839}58405841export interface IMouseTargetMargin extends IBaseMouseTarget {5842readonly type: MouseTargetType.GUTTER_GLYPH_MARGIN | MouseTargetType.GUTTER_LINE_NUMBERS | MouseTargetType.GUTTER_LINE_DECORATIONS;5843readonly position: Position;5844readonly range: Range;5845readonly detail: IMouseTargetMarginData;5846}58475848export interface IMouseTargetViewZoneData {5849readonly viewZoneId: string;5850readonly positionBefore: Position | null;5851readonly positionAfter: Position | null;5852readonly position: Position;5853readonly afterLineNumber: number;5854}58555856export interface IMouseTargetViewZone extends IBaseMouseTarget {5857readonly type: MouseTargetType.GUTTER_VIEW_ZONE | MouseTargetType.CONTENT_VIEW_ZONE;5858readonly position: Position;5859readonly range: Range;5860readonly detail: IMouseTargetViewZoneData;5861}58625863export interface IMouseTargetContentTextData {5864readonly mightBeForeignElement: boolean;5865}58665867export interface IMouseTargetContentText extends IBaseMouseTarget {5868readonly type: MouseTargetType.CONTENT_TEXT;5869readonly position: Position;5870readonly range: Range;5871readonly detail: IMouseTargetContentTextData;5872}58735874export interface IMouseTargetContentEmptyData {5875readonly isAfterLines: boolean;5876readonly horizontalDistanceToText?: number;5877}58785879export interface IMouseTargetContentEmpty extends IBaseMouseTarget {5880readonly type: MouseTargetType.CONTENT_EMPTY;5881readonly position: Position;5882readonly range: Range;5883readonly detail: IMouseTargetContentEmptyData;5884}58855886export interface IMouseTargetContentWidget extends IBaseMouseTarget {5887readonly type: MouseTargetType.CONTENT_WIDGET;5888readonly position: null;5889readonly range: null;5890readonly detail: string;5891}58925893export interface IMouseTargetOverlayWidget extends IBaseMouseTarget {5894readonly type: MouseTargetType.OVERLAY_WIDGET;5895readonly position: null;5896readonly range: null;5897readonly detail: string;5898}58995900export interface IMouseTargetScrollbar extends IBaseMouseTarget {5901readonly type: MouseTargetType.SCROLLBAR;5902readonly position: Position;5903readonly range: Range;5904}59055906export interface IMouseTargetOverviewRuler extends IBaseMouseTarget {5907readonly type: MouseTargetType.OVERVIEW_RULER;5908}59095910export interface IMouseTargetOutsideEditor extends IBaseMouseTarget {5911readonly type: MouseTargetType.OUTSIDE_EDITOR;5912readonly outsidePosition: 'above' | 'below' | 'left' | 'right';5913readonly outsideDistance: number;5914}59155916/**5917* Target hit with the mouse in the editor.5918*/5919export type IMouseTarget = (IMouseTargetUnknown | IMouseTargetTextarea | IMouseTargetMargin | IMouseTargetViewZone | IMouseTargetContentText | IMouseTargetContentEmpty | IMouseTargetContentWidget | IMouseTargetOverlayWidget | IMouseTargetScrollbar | IMouseTargetOverviewRuler | IMouseTargetOutsideEditor);59205921/**5922* A mouse event originating from the editor.5923*/5924export interface IEditorMouseEvent {5925readonly event: IMouseEvent;5926readonly target: IMouseTarget;5927}59285929export interface IPartialEditorMouseEvent {5930readonly event: IMouseEvent;5931readonly target: IMouseTarget | null;5932}59335934/**5935* A paste event originating from the editor.5936*/5937export interface IPasteEvent {5938readonly range: Range;5939readonly languageId: string | null;5940readonly clipboardEvent?: ClipboardEvent;5941}59425943export interface IDiffEditorConstructionOptions extends IDiffEditorOptions, IEditorConstructionOptions {5944/**5945* Place overflow widgets inside an external DOM node.5946* Defaults to an internal DOM node.5947*/5948overflowWidgetsDomNode?: HTMLElement;5949/**5950* Aria label for original editor.5951*/5952originalAriaLabel?: string;5953/**5954* Aria label for modified editor.5955*/5956modifiedAriaLabel?: string;5957}59585959/**5960* A rich code editor.5961*/5962export interface ICodeEditor extends IEditor {5963/**5964* An event emitted when the content of the current model has changed.5965* @event5966*/5967readonly onDidChangeModelContent: IEvent<IModelContentChangedEvent>;5968/**5969* An event emitted when the language of the current model has changed.5970* @event5971*/5972readonly onDidChangeModelLanguage: IEvent<IModelLanguageChangedEvent>;5973/**5974* An event emitted when the language configuration of the current model has changed.5975* @event5976*/5977readonly onDidChangeModelLanguageConfiguration: IEvent<IModelLanguageConfigurationChangedEvent>;5978/**5979* An event emitted when the options of the current model has changed.5980* @event5981*/5982readonly onDidChangeModelOptions: IEvent<IModelOptionsChangedEvent>;5983/**5984* An event emitted when the configuration of the editor has changed. (e.g. `editor.updateOptions()`)5985* @event5986*/5987readonly onDidChangeConfiguration: IEvent<ConfigurationChangedEvent>;5988/**5989* An event emitted when the cursor position has changed.5990* @event5991*/5992readonly onDidChangeCursorPosition: IEvent<ICursorPositionChangedEvent>;5993/**5994* An event emitted when the cursor selection has changed.5995* @event5996*/5997readonly onDidChangeCursorSelection: IEvent<ICursorSelectionChangedEvent>;5998/**5999* An event emitted when the model of this editor is about to change (e.g. from `editor.setModel()`).6000* @event6001*/6002readonly onWillChangeModel: IEvent<IModelChangedEvent>;6003/**6004* An event emitted when the model of this editor has changed (e.g. `editor.setModel()`).6005* @event6006*/6007readonly onDidChangeModel: IEvent<IModelChangedEvent>;6008/**6009* An event emitted when the decorations of the current model have changed.6010* @event6011*/6012readonly onDidChangeModelDecorations: IEvent<IModelDecorationsChangedEvent>;6013/**6014* An event emitted when the text inside this editor gained focus (i.e. cursor starts blinking).6015* @event6016*/6017readonly onDidFocusEditorText: IEvent<void>;6018/**6019* An event emitted when the text inside this editor lost focus (i.e. cursor stops blinking).6020* @event6021*/6022readonly onDidBlurEditorText: IEvent<void>;6023/**6024* An event emitted when the text inside this editor or an editor widget gained focus.6025* @event6026*/6027readonly onDidFocusEditorWidget: IEvent<void>;6028/**6029* An event emitted when the text inside this editor or an editor widget lost focus.6030* @event6031*/6032readonly onDidBlurEditorWidget: IEvent<void>;6033/**6034* Boolean indicating whether input is in composition6035*/6036readonly inComposition: boolean;6037/**6038* An event emitted after composition has started.6039*/6040readonly onDidCompositionStart: IEvent<void>;6041/**6042* An event emitted after composition has ended.6043*/6044readonly onDidCompositionEnd: IEvent<void>;6045/**6046* An event emitted when editing failed because the editor is read-only.6047* @event6048*/6049readonly onDidAttemptReadOnlyEdit: IEvent<void>;6050/**6051* An event emitted when users paste text in the editor.6052* @event6053*/6054readonly onDidPaste: IEvent<IPasteEvent>;6055/**6056* An event emitted on a "mouseup".6057* @event6058*/6059readonly onMouseUp: IEvent<IEditorMouseEvent>;6060/**6061* An event emitted on a "mousedown".6062* @event6063*/6064readonly onMouseDown: IEvent<IEditorMouseEvent>;6065/**6066* An event emitted on a "contextmenu".6067* @event6068*/6069readonly onContextMenu: IEvent<IEditorMouseEvent>;6070/**6071* An event emitted on a "mousemove".6072* @event6073*/6074readonly onMouseMove: IEvent<IEditorMouseEvent>;6075/**6076* An event emitted on a "mouseleave".6077* @event6078*/6079readonly onMouseLeave: IEvent<IPartialEditorMouseEvent>;6080/**6081* An event emitted on a "keyup".6082* @event6083*/6084readonly onKeyUp: IEvent<IKeyboardEvent>;6085/**6086* An event emitted on a "keydown".6087* @event6088*/6089readonly onKeyDown: IEvent<IKeyboardEvent>;6090/**6091* An event emitted when the layout of the editor has changed.6092* @event6093*/6094readonly onDidLayoutChange: IEvent<EditorLayoutInfo>;6095/**6096* An event emitted when the content width or content height in the editor has changed.6097* @event6098*/6099readonly onDidContentSizeChange: IEvent<IContentSizeChangedEvent>;6100/**6101* An event emitted when the scroll in the editor has changed.6102* @event6103*/6104readonly onDidScrollChange: IEvent<IScrollEvent>;6105/**6106* An event emitted when hidden areas change in the editor (e.g. due to folding).6107* @event6108*/6109readonly onDidChangeHiddenAreas: IEvent<void>;6110/**6111* Some editor operations fire multiple events at once.6112* To allow users to react to multiple events fired by a single operation,6113* the editor fires a begin update before the operation and an end update after the operation.6114* Whenever the editor fires `onBeginUpdate`, it will also fire `onEndUpdate` once the operation finishes.6115* Note that not all operations are bracketed by `onBeginUpdate` and `onEndUpdate`.6116*/6117readonly onBeginUpdate: IEvent<void>;6118/**6119* Fires after the editor completes the operation it fired `onBeginUpdate` for.6120*/6121readonly onEndUpdate: IEvent<void>;6122/**6123* Saves current view state of the editor in a serializable object.6124*/6125saveViewState(): ICodeEditorViewState | null;6126/**6127* Restores the view state of the editor from a serializable object generated by `saveViewState`.6128*/6129restoreViewState(state: ICodeEditorViewState | null): void;6130/**6131* Returns true if the text inside this editor or an editor widget has focus.6132*/6133hasWidgetFocus(): boolean;6134/**6135* Get a contribution of this editor.6136* @id Unique identifier of the contribution.6137* @return The contribution or null if contribution not found.6138*/6139getContribution<T extends IEditorContribution>(id: string): T | null;6140/**6141* Type the getModel() of IEditor.6142*/6143getModel(): ITextModel | null;6144/**6145* Sets the current model attached to this editor.6146* If the previous model was created by the editor via the value key in the options6147* literal object, it will be destroyed. Otherwise, if the previous model was set6148* via setModel, or the model key in the options literal object, the previous model6149* will not be destroyed.6150* It is safe to call setModel(null) to simply detach the current model from the editor.6151*/6152setModel(model: ITextModel | null): void;6153/**6154* Gets all the editor computed options.6155*/6156getOptions(): IComputedEditorOptions;6157/**6158* Gets a specific editor option.6159*/6160getOption<T extends EditorOption>(id: T): FindComputedEditorOptionValueById<T>;6161/**6162* Returns the editor's configuration (without any validation or defaults).6163*/6164getRawOptions(): IEditorOptions;6165/**6166* Get value of the current model attached to this editor.6167* @see {@link ITextModel.getValue}6168*/6169getValue(options?: {6170preserveBOM: boolean;6171lineEnding: string;6172}): string;6173/**6174* Set the value of the current model attached to this editor.6175* @see {@link ITextModel.setValue}6176*/6177setValue(newValue: string): void;6178/**6179* Get the width of the editor's content.6180* This is information that is "erased" when computing `scrollWidth = Math.max(contentWidth, width)`6181*/6182getContentWidth(): number;6183/**6184* Get the scrollWidth of the editor's viewport.6185*/6186getScrollWidth(): number;6187/**6188* Get the scrollLeft of the editor's viewport.6189*/6190getScrollLeft(): number;6191/**6192* Get the height of the editor's content.6193* This is information that is "erased" when computing `scrollHeight = Math.max(contentHeight, height)`6194*/6195getContentHeight(): number;6196/**6197* Get the scrollHeight of the editor's viewport.6198*/6199getScrollHeight(): number;6200/**6201* Get the scrollTop of the editor's viewport.6202*/6203getScrollTop(): number;6204/**6205* Change the scrollLeft of the editor's viewport.6206*/6207setScrollLeft(newScrollLeft: number, scrollType?: ScrollType): void;6208/**6209* Change the scrollTop of the editor's viewport.6210*/6211setScrollTop(newScrollTop: number, scrollType?: ScrollType): void;6212/**6213* Change the scroll position of the editor's viewport.6214*/6215setScrollPosition(position: INewScrollPosition, scrollType?: ScrollType): void;6216/**6217* Check if the editor is currently scrolling towards a different scroll position.6218*/6219hasPendingScrollAnimation(): boolean;6220/**6221* Get an action that is a contribution to this editor.6222* @id Unique identifier of the contribution.6223* @return The action or null if action not found.6224*/6225getAction(id: string): IEditorAction | null;6226/**6227* Execute a command on the editor.6228* The edits will land on the undo-redo stack, but no "undo stop" will be pushed.6229* @param source The source of the call.6230* @param command The command to execute6231*/6232executeCommand(source: string | null | undefined, command: ICommand): void;6233/**6234* Create an "undo stop" in the undo-redo stack.6235*/6236pushUndoStop(): boolean;6237/**6238* Remove the "undo stop" in the undo-redo stack.6239*/6240popUndoStop(): boolean;6241/**6242* Execute edits on the editor.6243* The edits will land on the undo-redo stack, but no "undo stop" will be pushed.6244* @param source The source of the call.6245* @param edits The edits to execute.6246* @param endCursorState Cursor state after the edits were applied.6247*/6248executeEdits(source: string | null | undefined, edits: IIdentifiedSingleEditOperation[], endCursorState?: ICursorStateComputer | Selection[]): boolean;6249/**6250* Execute multiple (concomitant) commands on the editor.6251* @param source The source of the call.6252* @param command The commands to execute6253*/6254executeCommands(source: string | null | undefined, commands: (ICommand | null)[]): void;6255/**6256* Get all the decorations on a line (filtering out decorations from other editors).6257*/6258getLineDecorations(lineNumber: number): IModelDecoration[] | null;6259/**6260* Get all the decorations for a range (filtering out decorations from other editors).6261*/6262getDecorationsInRange(range: Range): IModelDecoration[] | null;6263/**6264* Get the font size at a given position6265* @param position the position for which to fetch the font size6266*/6267getFontSizeAtPosition(position: IPosition): string | null;6268/**6269* All decorations added through this call will get the ownerId of this editor.6270* @deprecated Use `createDecorationsCollection`6271* @see createDecorationsCollection6272*/6273deltaDecorations(oldDecorations: string[], newDecorations: IModelDeltaDecoration[]): string[];6274/**6275* Remove previously added decorations.6276*/6277removeDecorations(decorationIds: string[]): void;6278/**6279* Get the layout info for the editor.6280*/6281getLayoutInfo(): EditorLayoutInfo;6282/**6283* Returns the ranges that are currently visible.6284* Does not account for horizontal scrolling.6285*/6286getVisibleRanges(): Range[];6287/**6288* Get the vertical position (top offset) for the line's top w.r.t. to the first line.6289*/6290getTopForLineNumber(lineNumber: number, includeViewZones?: boolean): number;6291/**6292* Get the vertical position (top offset) for the line's bottom w.r.t. to the first line.6293*/6294getBottomForLineNumber(lineNumber: number): number;6295/**6296* Get the vertical position (top offset) for the position w.r.t. to the first line.6297*/6298getTopForPosition(lineNumber: number, column: number): number;6299/**6300* Get the line height for a model position.6301*/6302getLineHeightForPosition(position: IPosition): number;6303/**6304* Write the screen reader content to be the current selection6305*/6306writeScreenReaderContent(reason: string): void;6307/**6308* Returns the editor's container dom node6309*/6310getContainerDomNode(): HTMLElement;6311/**6312* Returns the editor's dom node6313*/6314getDomNode(): HTMLElement | null;6315/**6316* Add a content widget. Widgets must have unique ids, otherwise they will be overwritten.6317*/6318addContentWidget(widget: IContentWidget): void;6319/**6320* Layout/Reposition a content widget. This is a ping to the editor to call widget.getPosition()6321* and update appropriately.6322*/6323layoutContentWidget(widget: IContentWidget): void;6324/**6325* Remove a content widget.6326*/6327removeContentWidget(widget: IContentWidget): void;6328/**6329* Add an overlay widget. Widgets must have unique ids, otherwise they will be overwritten.6330*/6331addOverlayWidget(widget: IOverlayWidget): void;6332/**6333* Layout/Reposition an overlay widget. This is a ping to the editor to call widget.getPosition()6334* and update appropriately.6335*/6336layoutOverlayWidget(widget: IOverlayWidget): void;6337/**6338* Remove an overlay widget.6339*/6340removeOverlayWidget(widget: IOverlayWidget): void;6341/**6342* Add a glyph margin widget. Widgets must have unique ids, otherwise they will be overwritten.6343*/6344addGlyphMarginWidget(widget: IGlyphMarginWidget): void;6345/**6346* Layout/Reposition a glyph margin widget. This is a ping to the editor to call widget.getPosition()6347* and update appropriately.6348*/6349layoutGlyphMarginWidget(widget: IGlyphMarginWidget): void;6350/**6351* Remove a glyph margin widget.6352*/6353removeGlyphMarginWidget(widget: IGlyphMarginWidget): void;6354/**6355* Change the view zones. View zones are lost when a new model is attached to the editor.6356*/6357changeViewZones(callback: (accessor: IViewZoneChangeAccessor) => void): void;6358/**6359* Get the horizontal position (left offset) for the column w.r.t to the beginning of the line.6360* This method works only if the line `lineNumber` is currently rendered (in the editor's viewport).6361* Use this method with caution.6362*/6363getOffsetForColumn(lineNumber: number, column: number): number;6364/**6365* Force an editor render now.6366*/6367render(forceRedraw?: boolean): void;6368/**6369* Get the hit test target at coordinates `clientX` and `clientY`.6370* The coordinates are relative to the top-left of the viewport.6371*6372* @returns Hit test target or null if the coordinates fall outside the editor or the editor has no model.6373*/6374getTargetAtClientPoint(clientX: number, clientY: number): IMouseTarget | null;6375/**6376* Get the visible position for `position`.6377* The result position takes scrolling into account and is relative to the top left corner of the editor.6378* Explanation 1: the results of this method will change for the same `position` if the user scrolls the editor.6379* Explanation 2: the results of this method will not change if the container of the editor gets repositioned.6380* Warning: the results of this method are inaccurate for positions that are outside the current editor viewport.6381*/6382getScrolledVisiblePosition(position: IPosition): {6383top: number;6384left: number;6385height: number;6386} | null;6387/**6388* Apply the same font settings as the editor to `target`.6389*/6390applyFontInfo(target: HTMLElement): void;6391setBanner(bannerDomNode: HTMLElement | null, height: number): void;6392/**6393* Is called when the model has been set, view state was restored and options are updated.6394* This is the best place to compute data for the viewport (such as tokens).6395*/6396handleInitialized?(): void;6397}63986399/**6400* A rich diff editor.6401*/6402export interface IDiffEditor extends IEditor {6403/**6404* @see {@link ICodeEditor.getContainerDomNode}6405*/6406getContainerDomNode(): HTMLElement;6407/**6408* An event emitted when the diff information computed by this diff editor has been updated.6409* @event6410*/6411readonly onDidUpdateDiff: IEvent<void>;6412/**6413* An event emitted when the diff model is changed (i.e. the diff editor shows new content).6414* @event6415*/6416readonly onDidChangeModel: IEvent<void>;6417/**6418* Saves current view state of the editor in a serializable object.6419*/6420saveViewState(): IDiffEditorViewState | null;6421/**6422* Restores the view state of the editor from a serializable object generated by `saveViewState`.6423*/6424restoreViewState(state: IDiffEditorViewState | null): void;6425/**6426* Type the getModel() of IEditor.6427*/6428getModel(): IDiffEditorModel | null;6429createViewModel(model: IDiffEditorModel): IDiffEditorViewModel;6430/**6431* Sets the current model attached to this editor.6432* If the previous model was created by the editor via the value key in the options6433* literal object, it will be destroyed. Otherwise, if the previous model was set6434* via setModel, or the model key in the options literal object, the previous model6435* will not be destroyed.6436* It is safe to call setModel(null) to simply detach the current model from the editor.6437*/6438setModel(model: IDiffEditorModel | IDiffEditorViewModel | null): void;6439/**6440* Get the `original` editor.6441*/6442getOriginalEditor(): ICodeEditor;6443/**6444* Get the `modified` editor.6445*/6446getModifiedEditor(): ICodeEditor;6447/**6448* Get the computed diff information.6449*/6450getLineChanges(): ILineChange[] | null;6451/**6452* Update the editor's options after the editor has been created.6453*/6454updateOptions(newOptions: IDiffEditorOptions): void;6455/**6456* Jumps to the next or previous diff.6457*/6458goToDiff(target: 'next' | 'previous'): void;6459/**6460* Scrolls to the first diff.6461* (Waits until the diff computation finished.)6462*/6463revealFirstDiff(): unknown;6464accessibleDiffViewerNext(): void;6465accessibleDiffViewerPrev(): void;6466handleInitialized(): void;6467}64686469export class FontInfo extends BareFontInfo {6470readonly _editorStylingBrand: void;6471readonly version: number;6472readonly isTrusted: boolean;6473readonly isMonospace: boolean;6474readonly typicalHalfwidthCharacterWidth: number;6475readonly typicalFullwidthCharacterWidth: number;6476readonly canUseHalfwidthRightwardsArrow: boolean;6477readonly spaceWidth: number;6478readonly middotWidth: number;6479readonly wsmiddotWidth: number;6480readonly maxDigitWidth: number;6481}64826483export class BareFontInfo {6484readonly _bareFontInfoBrand: void;6485readonly pixelRatio: number;6486readonly fontFamily: string;6487readonly fontWeight: string;6488readonly fontSize: number;6489readonly fontFeatureSettings: string;6490readonly fontVariationSettings: string;6491readonly lineHeight: number;6492readonly letterSpacing: number;6493}64946495export const EditorZoom: IEditorZoom;64966497export interface IEditorZoom {6498onDidChangeZoomLevel: IEvent<number>;6499getZoomLevel(): number;6500setZoomLevel(zoomLevel: number): void;6501}65026503//compatibility:6504export type IReadOnlyModel = ITextModel;6505export type IModel = ITextModel;6506}65076508declare namespace monaco.languages {65096510export interface IRelativePattern {6511/**6512* A base file path to which this pattern will be matched against relatively.6513*/6514readonly base: string;6515/**6516* A file glob pattern like `*.{ts,js}` that will be matched on file paths6517* relative to the base path.6518*6519* Example: Given a base of `/home/work/folder` and a file path of `/home/work/folder/index.js`,6520* the file glob pattern will match on `index.js`.6521*/6522readonly pattern: string;6523}65246525export type LanguageSelector = string | LanguageFilter | ReadonlyArray<string | LanguageFilter>;65266527export interface LanguageFilter {6528readonly language?: string;6529readonly scheme?: string;6530readonly pattern?: string | IRelativePattern;6531readonly notebookType?: string;6532/**6533* This provider is implemented in the UI thread.6534*/6535readonly hasAccessToAllModels?: boolean;6536readonly exclusive?: boolean;6537/**6538* This provider comes from a builtin extension.6539*/6540readonly isBuiltin?: boolean;6541}65426543/**6544* Register information about a new language.6545*/6546export function register(language: ILanguageExtensionPoint): void;65476548/**6549* Get the information of all the registered languages.6550*/6551export function getLanguages(): ILanguageExtensionPoint[];65526553export function getEncodedLanguageId(languageId: string): number;65546555/**6556* An event emitted when a language is associated for the first time with a text model.6557* @event6558*/6559export function onLanguage(languageId: string, callback: () => void): IDisposable;65606561/**6562* An event emitted when a language is associated for the first time with a text model or6563* when a language is encountered during the tokenization of another language.6564* @event6565*/6566export function onLanguageEncountered(languageId: string, callback: () => void): IDisposable;65676568/**6569* Set the editing configuration for a language.6570*/6571export function setLanguageConfiguration(languageId: string, configuration: LanguageConfiguration): IDisposable;65726573/**6574* A token.6575*/6576export interface IToken {6577startIndex: number;6578scopes: string;6579}65806581/**6582* The result of a line tokenization.6583*/6584export interface ILineTokens {6585/**6586* The list of tokens on the line.6587*/6588tokens: IToken[];6589/**6590* The tokenization end state.6591* A pointer will be held to this and the object should not be modified by the tokenizer after the pointer is returned.6592*/6593endState: IState;6594}65956596/**6597* The result of a line tokenization.6598*/6599export interface IEncodedLineTokens {6600/**6601* The tokens on the line in a binary, encoded format. Each token occupies two array indices. For token i:6602* - at offset 2*i => startIndex6603* - at offset 2*i + 1 => metadata6604* Meta data is in binary format:6605* - -------------------------------------------6606* 3322 2222 2222 1111 1111 1100 0000 00006607* 1098 7654 3210 9876 5432 1098 7654 32106608* - -------------------------------------------6609* bbbb bbbb bfff ffff ffFF FFTT LLLL LLLL6610* - -------------------------------------------6611* - L = EncodedLanguageId (8 bits): Use `getEncodedLanguageId` to get the encoded ID of a language.6612* - T = StandardTokenType (2 bits): Other = 0, Comment = 1, String = 2, RegEx = 3.6613* - F = FontStyle (4 bits): None = 0, Italic = 1, Bold = 2, Underline = 4, Strikethrough = 8.6614* - f = foreground ColorId (9 bits)6615* - b = background ColorId (9 bits)6616* - The color value for each colorId is defined in IStandaloneThemeData.customTokenColors:6617* e.g. colorId = 1 is stored in IStandaloneThemeData.customTokenColors[1]. Color id = 0 means no color,6618* id = 1 is for the default foreground color, id = 2 for the default background.6619*/6620tokens: Uint32Array;6621/**6622* The tokenization end state.6623* A pointer will be held to this and the object should not be modified by the tokenizer after the pointer is returned.6624*/6625endState: IState;6626}66276628/**6629* A factory for token providers.6630*/6631export interface TokensProviderFactory {6632create(): ProviderResult<TokensProvider | EncodedTokensProvider | IMonarchLanguage>;6633}66346635/**6636* A "manual" provider of tokens.6637*/6638export interface TokensProvider {6639/**6640* The initial state of a language. Will be the state passed in to tokenize the first line.6641*/6642getInitialState(): IState;6643/**6644* Tokenize a line given the state at the beginning of the line.6645*/6646tokenize(line: string, state: IState): ILineTokens;6647}66486649/**6650* A "manual" provider of tokens, returning tokens in a binary form.6651*/6652export interface EncodedTokensProvider {6653/**6654* The initial state of a language. Will be the state passed in to tokenize the first line.6655*/6656getInitialState(): IState;6657/**6658* Tokenize a line given the state at the beginning of the line.6659*/6660tokenizeEncoded(line: string, state: IState): IEncodedLineTokens;6661/**6662* Tokenize a line given the state at the beginning of the line.6663*/6664tokenize?(line: string, state: IState): ILineTokens;6665}66666667/**6668* Change the color map that is used for token colors.6669* Supported formats (hex): #RRGGBB, $RRGGBBAA, #RGB, #RGBA6670*/6671export function setColorMap(colorMap: string[] | null): void;66726673/**6674* Register a tokens provider factory for a language. This tokenizer will be exclusive with a tokenizer6675* set using `setTokensProvider` or one created using `setMonarchTokensProvider`, but will work together6676* with a tokens provider set using `registerDocumentSemanticTokensProvider` or `registerDocumentRangeSemanticTokensProvider`.6677*/6678export function registerTokensProviderFactory(languageId: string, factory: TokensProviderFactory): IDisposable;66796680/**6681* Set the tokens provider for a language (manual implementation). This tokenizer will be exclusive6682* with a tokenizer created using `setMonarchTokensProvider`, or with `registerTokensProviderFactory`,6683* but will work together with a tokens provider set using `registerDocumentSemanticTokensProvider`6684* or `registerDocumentRangeSemanticTokensProvider`.6685*/6686export function setTokensProvider(languageId: string, provider: TokensProvider | EncodedTokensProvider | Thenable<TokensProvider | EncodedTokensProvider>): IDisposable;66876688/**6689* Set the tokens provider for a language (monarch implementation). This tokenizer will be exclusive6690* with a tokenizer set using `setTokensProvider`, or with `registerTokensProviderFactory`, but will6691* work together with a tokens provider set using `registerDocumentSemanticTokensProvider` or6692* `registerDocumentRangeSemanticTokensProvider`.6693*/6694export function setMonarchTokensProvider(languageId: string, languageDef: IMonarchLanguage | Thenable<IMonarchLanguage>): IDisposable;66956696/**6697* Register a reference provider (used by e.g. reference search).6698*/6699export function registerReferenceProvider(languageSelector: LanguageSelector, provider: ReferenceProvider): IDisposable;67006701/**6702* Register a rename provider (used by e.g. rename symbol).6703*/6704export function registerRenameProvider(languageSelector: LanguageSelector, provider: RenameProvider): IDisposable;67056706/**6707* Register a new symbol-name provider (e.g., when a symbol is being renamed, show new possible symbol-names)6708*/6709export function registerNewSymbolNameProvider(languageSelector: LanguageSelector, provider: NewSymbolNamesProvider): IDisposable;67106711/**6712* Register a signature help provider (used by e.g. parameter hints).6713*/6714export function registerSignatureHelpProvider(languageSelector: LanguageSelector, provider: SignatureHelpProvider): IDisposable;67156716/**6717* Register a hover provider (used by e.g. editor hover).6718*/6719export function registerHoverProvider(languageSelector: LanguageSelector, provider: HoverProvider): IDisposable;67206721/**6722* Register a document symbol provider (used by e.g. outline).6723*/6724export function registerDocumentSymbolProvider(languageSelector: LanguageSelector, provider: DocumentSymbolProvider): IDisposable;67256726/**6727* Register a document highlight provider (used by e.g. highlight occurrences).6728*/6729export function registerDocumentHighlightProvider(languageSelector: LanguageSelector, provider: DocumentHighlightProvider): IDisposable;67306731/**6732* Register an linked editing range provider.6733*/6734export function registerLinkedEditingRangeProvider(languageSelector: LanguageSelector, provider: LinkedEditingRangeProvider): IDisposable;67356736/**6737* Register a definition provider (used by e.g. go to definition).6738*/6739export function registerDefinitionProvider(languageSelector: LanguageSelector, provider: DefinitionProvider): IDisposable;67406741/**6742* Register a implementation provider (used by e.g. go to implementation).6743*/6744export function registerImplementationProvider(languageSelector: LanguageSelector, provider: ImplementationProvider): IDisposable;67456746/**6747* Register a type definition provider (used by e.g. go to type definition).6748*/6749export function registerTypeDefinitionProvider(languageSelector: LanguageSelector, provider: TypeDefinitionProvider): IDisposable;67506751/**6752* Register a code lens provider (used by e.g. inline code lenses).6753*/6754export function registerCodeLensProvider(languageSelector: LanguageSelector, provider: CodeLensProvider): IDisposable;67556756/**6757* Register a code action provider (used by e.g. quick fix).6758*/6759export function registerCodeActionProvider(languageSelector: LanguageSelector, provider: CodeActionProvider, metadata?: CodeActionProviderMetadata): IDisposable;67606761/**6762* Register a formatter that can handle only entire models.6763*/6764export function registerDocumentFormattingEditProvider(languageSelector: LanguageSelector, provider: DocumentFormattingEditProvider): IDisposable;67656766/**6767* Register a formatter that can handle a range inside a model.6768*/6769export function registerDocumentRangeFormattingEditProvider(languageSelector: LanguageSelector, provider: DocumentRangeFormattingEditProvider): IDisposable;67706771/**6772* Register a formatter than can do formatting as the user types.6773*/6774export function registerOnTypeFormattingEditProvider(languageSelector: LanguageSelector, provider: OnTypeFormattingEditProvider): IDisposable;67756776/**6777* Register a link provider that can find links in text.6778*/6779export function registerLinkProvider(languageSelector: LanguageSelector, provider: LinkProvider): IDisposable;67806781/**6782* Register a completion item provider (use by e.g. suggestions).6783*/6784export function registerCompletionItemProvider(languageSelector: LanguageSelector, provider: CompletionItemProvider): IDisposable;67856786/**6787* Register a document color provider (used by Color Picker, Color Decorator).6788*/6789export function registerColorProvider(languageSelector: LanguageSelector, provider: DocumentColorProvider): IDisposable;67906791/**6792* Register a folding range provider6793*/6794export function registerFoldingRangeProvider(languageSelector: LanguageSelector, provider: FoldingRangeProvider): IDisposable;67956796/**6797* Register a declaration provider6798*/6799export function registerDeclarationProvider(languageSelector: LanguageSelector, provider: DeclarationProvider): IDisposable;68006801/**6802* Register a selection range provider6803*/6804export function registerSelectionRangeProvider(languageSelector: LanguageSelector, provider: SelectionRangeProvider): IDisposable;68056806/**6807* Register a document semantic tokens provider. A semantic tokens provider will complement and enhance a6808* simple top-down tokenizer. Simple top-down tokenizers can be set either via `setMonarchTokensProvider`6809* or `setTokensProvider`.6810*6811* For the best user experience, register both a semantic tokens provider and a top-down tokenizer.6812*/6813export function registerDocumentSemanticTokensProvider(languageSelector: LanguageSelector, provider: DocumentSemanticTokensProvider): IDisposable;68146815/**6816* Register a document range semantic tokens provider. A semantic tokens provider will complement and enhance a6817* simple top-down tokenizer. Simple top-down tokenizers can be set either via `setMonarchTokensProvider`6818* or `setTokensProvider`.6819*6820* For the best user experience, register both a semantic tokens provider and a top-down tokenizer.6821*/6822export function registerDocumentRangeSemanticTokensProvider(languageSelector: LanguageSelector, provider: DocumentRangeSemanticTokensProvider): IDisposable;68236824/**6825* Register an inline completions provider.6826*/6827export function registerInlineCompletionsProvider(languageSelector: LanguageSelector, provider: InlineCompletionsProvider): IDisposable;68286829/**6830* Register an inlay hints provider.6831*/6832export function registerInlayHintsProvider(languageSelector: LanguageSelector, provider: InlayHintsProvider): IDisposable;68336834/**6835* Contains additional diagnostic information about the context in which6836* a [code action](#CodeActionProvider.provideCodeActions) is run.6837*/6838export interface CodeActionContext {6839/**6840* An array of diagnostics.6841*/6842readonly markers: editor.IMarkerData[];6843/**6844* Requested kind of actions to return.6845*/6846readonly only?: string;6847/**6848* The reason why code actions were requested.6849*/6850readonly trigger: CodeActionTriggerType;6851}68526853/**6854* The code action interface defines the contract between extensions and6855* the [light bulb](https://code.visualstudio.com/docs/editor/editingevolved#_code-action) feature.6856*/6857export interface CodeActionProvider {6858/**6859* Provide commands for the given document and range.6860*/6861provideCodeActions(model: editor.ITextModel, range: Range, context: CodeActionContext, token: CancellationToken): ProviderResult<CodeActionList>;6862/**6863* Given a code action fill in the edit. Will only invoked when missing.6864*/6865resolveCodeAction?(codeAction: CodeAction, token: CancellationToken): ProviderResult<CodeAction>;6866}68676868/**6869* Metadata about the type of code actions that a {@link CodeActionProvider} provides.6870*/6871export interface CodeActionProviderMetadata {6872/**6873* List of code action kinds that a {@link CodeActionProvider} may return.6874*6875* This list is used to determine if a given `CodeActionProvider` should be invoked or not.6876* To avoid unnecessary computation, every `CodeActionProvider` should list use `providedCodeActionKinds`. The6877* list of kinds may either be generic, such as `["quickfix", "refactor", "source"]`, or list out every kind provided,6878* such as `["quickfix.removeLine", "source.fixAll" ...]`.6879*/6880readonly providedCodeActionKinds?: readonly string[];6881readonly documentation?: ReadonlyArray<{6882readonly kind: string;6883readonly command: Command;6884}>;6885}68866887/**6888* Configuration for line comments.6889*/6890export interface LineCommentConfig {6891/**6892* The line comment token, like `//`6893*/6894comment: string;6895/**6896* Whether the comment token should not be indented and placed at the first column.6897* Defaults to false.6898*/6899noIndent?: boolean;6900}69016902/**6903* Describes how comments for a language work.6904*/6905export interface CommentRule {6906/**6907* The line comment token, like `// this is a comment`.6908* Can be a string or an object with comment and optional noIndent properties.6909*/6910lineComment?: string | LineCommentConfig | null;6911/**6912* The block comment character pair, like `/* block comment */`6913*/6914blockComment?: CharacterPair | null;6915}69166917/**6918* The language configuration interface defines the contract between extensions and6919* various editor features, like automatic bracket insertion, automatic indentation etc.6920*/6921export interface LanguageConfiguration {6922/**6923* The language's comment settings.6924*/6925comments?: CommentRule;6926/**6927* The language's brackets.6928* This configuration implicitly affects pressing Enter around these brackets.6929*/6930brackets?: CharacterPair[];6931/**6932* The language's word definition.6933* If the language supports Unicode identifiers (e.g. JavaScript), it is preferable6934* to provide a word definition that uses exclusion of known separators.6935* e.g.: A regex that matches anything except known separators (and dot is allowed to occur in a floating point number):6936* /(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g6937*/6938wordPattern?: RegExp;6939/**6940* The language's indentation settings.6941*/6942indentationRules?: IndentationRule;6943/**6944* The language's rules to be evaluated when pressing Enter.6945*/6946onEnterRules?: OnEnterRule[];6947/**6948* The language's auto closing pairs. The 'close' character is automatically inserted with the6949* 'open' character is typed. If not set, the configured brackets will be used.6950*/6951autoClosingPairs?: IAutoClosingPairConditional[];6952/**6953* The language's surrounding pairs. When the 'open' character is typed on a selection, the6954* selected string is surrounded by the open and close characters. If not set, the autoclosing pairs6955* settings will be used.6956*/6957surroundingPairs?: IAutoClosingPair[];6958/**6959* Defines a list of bracket pairs that are colorized depending on their nesting level.6960* If not set, the configured brackets will be used.6961*/6962colorizedBracketPairs?: CharacterPair[];6963/**6964* Defines what characters must be after the cursor for bracket or quote autoclosing to occur when using the \'languageDefined\' autoclosing setting.6965*6966* This is typically the set of characters which can not start an expression, such as whitespace, closing brackets, non-unary operators, etc.6967*/6968autoCloseBefore?: string;6969/**6970* The language's folding rules.6971*/6972folding?: FoldingRules;6973/**6974* **Deprecated** Do not use.6975*6976* @deprecated Will be replaced by a better API soon.6977*/6978__electricCharacterSupport?: {6979docComment?: IDocComment;6980};6981}69826983/**6984* Describes indentation rules for a language.6985*/6986export interface IndentationRule {6987/**6988* If a line matches this pattern, then all the lines after it should be unindented once (until another rule matches).6989*/6990decreaseIndentPattern: RegExp;6991/**6992* If a line matches this pattern, then all the lines after it should be indented once (until another rule matches).6993*/6994increaseIndentPattern: RegExp;6995/**6996* If a line matches this pattern, then **only the next line** after it should be indented once.6997*/6998indentNextLinePattern?: RegExp | null;6999/**7000* If a line matches this pattern, then its indentation should not be changed and it should not be evaluated against the other rules.7001*/7002unIndentedLinePattern?: RegExp | null;7003}70047005/**7006* Describes language specific folding markers such as '#region' and '#endregion'.7007* The start and end regexes will be tested against the contents of all lines and must be designed efficiently:7008* - the regex should start with '^'7009* - regexp flags (i, g) are ignored7010*/7011export interface FoldingMarkers {7012start: RegExp;7013end: RegExp;7014}70157016/**7017* Describes folding rules for a language.7018*/7019export interface FoldingRules {7020/**7021* Used by the indentation based strategy to decide whether empty lines belong to the previous or the next block.7022* A language adheres to the off-side rule if blocks in that language are expressed by their indentation.7023* See [wikipedia](https://en.wikipedia.org/wiki/Off-side_rule) for more information.7024* If not set, `false` is used and empty lines belong to the previous block.7025*/7026offSide?: boolean;7027/**7028* Region markers used by the language.7029*/7030markers?: FoldingMarkers;7031}70327033/**7034* Describes a rule to be evaluated when pressing Enter.7035*/7036export interface OnEnterRule {7037/**7038* This rule will only execute if the text before the cursor matches this regular expression.7039*/7040beforeText: RegExp;7041/**7042* This rule will only execute if the text after the cursor matches this regular expression.7043*/7044afterText?: RegExp;7045/**7046* This rule will only execute if the text above the this line matches this regular expression.7047*/7048previousLineText?: RegExp;7049/**7050* The action to execute.7051*/7052action: EnterAction;7053}70547055/**7056* Definition of documentation comments (e.g. Javadoc/JSdoc)7057*/7058export interface IDocComment {7059/**7060* The string that starts a doc comment (e.g. '/**')7061*/7062open: string;7063/**7064* The string that appears on the last line and closes the doc comment (e.g. ' * /').7065*/7066close?: string;7067}70687069/**7070* A tuple of two characters, like a pair of7071* opening and closing brackets.7072*/7073export type CharacterPair = [string, string];70747075export interface IAutoClosingPair {7076open: string;7077close: string;7078}70797080export interface IAutoClosingPairConditional extends IAutoClosingPair {7081notIn?: string[];7082}70837084/**7085* Describes what to do with the indentation when pressing Enter.7086*/7087export enum IndentAction {7088/**7089* Insert new line and copy the previous line's indentation.7090*/7091None = 0,7092/**7093* Insert new line and indent once (relative to the previous line's indentation).7094*/7095Indent = 1,7096/**7097* Insert two new lines:7098* - the first one indented which will hold the cursor7099* - the second one at the same indentation level7100*/7101IndentOutdent = 2,7102/**7103* Insert new line and outdent once (relative to the previous line's indentation).7104*/7105Outdent = 37106}71077108/**7109* Describes what to do when pressing Enter.7110*/7111export interface EnterAction {7112/**7113* Describe what to do with the indentation.7114*/7115indentAction: IndentAction;7116/**7117* Describes text to be appended after the new line and after the indentation.7118*/7119appendText?: string;7120/**7121* Describes the number of characters to remove from the new line's indentation.7122*/7123removeText?: number;7124}71257126export interface SyntaxNode {7127startIndex: number;7128endIndex: number;7129startPosition: IPosition;7130endPosition: IPosition;7131}71327133export interface QueryCapture {7134name: string;7135text?: string;7136node: SyntaxNode;7137encodedLanguageId: number;7138}71397140/**7141* The state of the tokenizer between two lines.7142* It is useful to store flags such as in multiline comment, etc.7143* The model will clone the previous line's state and pass it in to tokenize the next line.7144*/7145export interface IState {7146clone(): IState;7147equals(other: IState): boolean;7148}71497150/**7151* A provider result represents the values a provider, like the {@link HoverProvider},7152* may return. For once this is the actual result type `T`, like `Hover`, or a thenable that resolves7153* to that type `T`. In addition, `null` and `undefined` can be returned - either directly or from a7154* thenable.7155*/7156export type ProviderResult<T> = T | undefined | null | Thenable<T | undefined | null>;71577158/**7159* A hover represents additional information for a symbol or word. Hovers are7160* rendered in a tooltip-like widget.7161*/7162export interface Hover {7163/**7164* The contents of this hover.7165*/7166contents: IMarkdownString[];7167/**7168* The range to which this hover applies. When missing, the7169* editor will use the range at the current position or the7170* current position itself.7171*/7172range?: IRange;7173/**7174* Can increase the verbosity of the hover7175*/7176canIncreaseVerbosity?: boolean;7177/**7178* Can decrease the verbosity of the hover7179*/7180canDecreaseVerbosity?: boolean;7181}71827183/**7184* The hover provider interface defines the contract between extensions and7185* the [hover](https://code.visualstudio.com/docs/editor/intellisense)-feature.7186*/7187export interface HoverProvider<THover = Hover> {7188/**7189* Provide a hover for the given position, context and document. Multiple hovers at the same7190* position will be merged by the editor. A hover can have a range which defaults7191* to the word range at the position when omitted.7192*/7193provideHover(model: editor.ITextModel, position: Position, token: CancellationToken, context?: HoverContext<THover>): ProviderResult<THover>;7194}71957196export interface HoverContext<THover = Hover> {7197/**7198* Hover verbosity request7199*/7200verbosityRequest?: HoverVerbosityRequest<THover>;7201}72027203export interface HoverVerbosityRequest<THover = Hover> {7204/**7205* The delta by which to increase/decrease the hover verbosity level7206*/7207verbosityDelta: number;7208/**7209* The previous hover for the same position7210*/7211previousHover: THover;7212}72137214export enum HoverVerbosityAction {7215/**7216* Increase the verbosity of the hover7217*/7218Increase = 0,7219/**7220* Decrease the verbosity of the hover7221*/7222Decrease = 17223}72247225export enum CompletionItemKind {7226Method = 0,7227Function = 1,7228Constructor = 2,7229Field = 3,7230Variable = 4,7231Class = 5,7232Struct = 6,7233Interface = 7,7234Module = 8,7235Property = 9,7236Event = 10,7237Operator = 11,7238Unit = 12,7239Value = 13,7240Constant = 14,7241Enum = 15,7242EnumMember = 16,7243Keyword = 17,7244Text = 18,7245Color = 19,7246File = 20,7247Reference = 21,7248Customcolor = 22,7249Folder = 23,7250TypeParameter = 24,7251User = 25,7252Issue = 26,7253Tool = 27,7254Snippet = 287255}72567257export interface CompletionItemLabel {7258label: string;7259detail?: string;7260description?: string;7261}72627263export enum CompletionItemTag {7264Deprecated = 17265}72667267export enum CompletionItemInsertTextRule {7268None = 0,7269/**7270* Adjust whitespace/indentation of multiline insert texts to7271* match the current line indentation.7272*/7273KeepWhitespace = 1,7274/**7275* `insertText` is a snippet.7276*/7277InsertAsSnippet = 47278}72797280export interface CompletionItemRanges {7281insert: IRange;7282replace: IRange;7283}72847285/**7286* A completion item represents a text snippet that is7287* proposed to complete text that is being typed.7288*/7289export interface CompletionItem {7290/**7291* The label of this completion item. By default7292* this is also the text that is inserted when selecting7293* this completion.7294*/7295label: string | CompletionItemLabel;7296/**7297* The kind of this completion item. Based on the kind7298* an icon is chosen by the editor.7299*/7300kind: CompletionItemKind;7301/**7302* A modifier to the `kind` which affect how the item7303* is rendered, e.g. Deprecated is rendered with a strikeout7304*/7305tags?: ReadonlyArray<CompletionItemTag>;7306/**7307* A human-readable string with additional information7308* about this item, like type or symbol information.7309*/7310detail?: string;7311/**7312* A human-readable string that represents a doc-comment.7313*/7314documentation?: string | IMarkdownString;7315/**7316* A string that should be used when comparing this item7317* with other items. When `falsy` the {@link CompletionItem.label label}7318* is used.7319*/7320sortText?: string;7321/**7322* A string that should be used when filtering a set of7323* completion items. When `falsy` the {@link CompletionItem.label label}7324* is used.7325*/7326filterText?: string;7327/**7328* Select this item when showing. *Note* that only one completion item can be selected and7329* that the editor decides which item that is. The rule is that the *first* item of those7330* that match best is selected.7331*/7332preselect?: boolean;7333/**7334* A string or snippet that should be inserted in a document when selecting7335* this completion.7336*/7337insertText: string;7338/**7339* Additional rules (as bitmask) that should be applied when inserting7340* this completion.7341*/7342insertTextRules?: CompletionItemInsertTextRule;7343/**7344* A range of text that should be replaced by this completion item.7345*7346* *Note:* The range must be a {@link Range.isSingleLine single line} and it must7347* {@link Range.contains contain} the position at which completion has been {@link CompletionItemProvider.provideCompletionItems requested}.7348*/7349range: IRange | CompletionItemRanges;7350/**7351* An optional set of characters that when pressed while this completion is active will accept it first and7352* then type that character. *Note* that all commit characters should have `length=1` and that superfluous7353* characters will be ignored.7354*/7355commitCharacters?: string[];7356/**7357* An optional array of additional text edits that are applied when7358* selecting this completion. Edits must not overlap with the main edit7359* nor with themselves.7360*/7361additionalTextEdits?: editor.ISingleEditOperation[];7362/**7363* A command that should be run upon acceptance of this item.7364*/7365command?: Command;7366/**7367* A command that should be run upon acceptance of this item.7368*/7369action?: Command;7370}73717372export interface CompletionList {7373suggestions: CompletionItem[];7374incomplete?: boolean;7375dispose?(): void;7376}73777378/**7379* Info provided on partial acceptance.7380*/7381export interface PartialAcceptInfo {7382kind: PartialAcceptTriggerKind;7383acceptedLength: number;7384}73857386/**7387* How a partial acceptance was triggered.7388*/7389export enum PartialAcceptTriggerKind {7390Word = 0,7391Line = 1,7392Suggest = 27393}73947395/**7396* How a suggest provider was triggered.7397*/7398export enum CompletionTriggerKind {7399Invoke = 0,7400TriggerCharacter = 1,7401TriggerForIncompleteCompletions = 27402}74037404/**7405* Contains additional information about the context in which7406* {@link CompletionItemProvider.provideCompletionItems completion provider} is triggered.7407*/7408export interface CompletionContext {7409/**7410* How the completion was triggered.7411*/7412triggerKind: CompletionTriggerKind;7413/**7414* Character that triggered the completion item provider.7415*7416* `undefined` if provider was not triggered by a character.7417*/7418triggerCharacter?: string;7419}74207421/**7422* The completion item provider interface defines the contract between extensions and7423* the [IntelliSense](https://code.visualstudio.com/docs/editor/intellisense).7424*7425* When computing *complete* completion items is expensive, providers can optionally implement7426* the `resolveCompletionItem`-function. In that case it is enough to return completion7427* items with a {@link CompletionItem.label label} from the7428* {@link CompletionItemProvider.provideCompletionItems provideCompletionItems}-function. Subsequently,7429* when a completion item is shown in the UI and gains focus this provider is asked to resolve7430* the item, like adding {@link CompletionItem.documentation doc-comment} or {@link CompletionItem.detail details}.7431*/7432export interface CompletionItemProvider {7433triggerCharacters?: string[];7434/**7435* Provide completion items for the given position and document.7436*/7437provideCompletionItems(model: editor.ITextModel, position: Position, context: CompletionContext, token: CancellationToken): ProviderResult<CompletionList>;7438/**7439* Given a completion item fill in more data, like {@link CompletionItem.documentation doc-comment}7440* or {@link CompletionItem.detail details}.7441*7442* The editor will only resolve a completion item once.7443*/7444resolveCompletionItem?(item: CompletionItem, token: CancellationToken): ProviderResult<CompletionItem>;7445}74467447/**7448* How an {@link InlineCompletionsProvider inline completion provider} was triggered.7449*/7450export enum InlineCompletionTriggerKind {7451/**7452* Completion was triggered automatically while editing.7453* It is sufficient to return a single completion item in this case.7454*/7455Automatic = 0,7456/**7457* Completion was triggered explicitly by a user gesture.7458* Return multiple completion items to enable cycling through them.7459*/7460Explicit = 17461}74627463export interface InlineCompletionContext {7464/**7465* How the completion was triggered.7466*/7467readonly triggerKind: InlineCompletionTriggerKind;7468readonly selectedSuggestionInfo: SelectedSuggestionInfo | undefined;7469readonly includeInlineEdits: boolean;7470readonly includeInlineCompletions: boolean;7471readonly requestIssuedDateTime: number;7472readonly earliestShownDateTime: number;7473}74747475export class SelectedSuggestionInfo {7476readonly range: IRange;7477readonly text: string;7478readonly completionKind: CompletionItemKind;7479readonly isSnippetText: boolean;7480constructor(range: IRange, text: string, completionKind: CompletionItemKind, isSnippetText: boolean);7481equals(other: SelectedSuggestionInfo): boolean;7482}74837484export interface InlineCompletion {7485/**7486* The text to insert.7487* If the text contains a line break, the range must end at the end of a line.7488* If existing text should be replaced, the existing text must be a prefix of the text to insert.7489*7490* The text can also be a snippet. In that case, a preview with default parameters is shown.7491* When accepting the suggestion, the full snippet is inserted.7492*/7493readonly insertText: string | {7494snippet: string;7495};7496/**7497* A text that is used to decide if this inline completion should be shown.7498* An inline completion is shown if the text to replace is a subword of the filter text.7499*/7500readonly filterText?: string;7501/**7502* An optional array of additional text edits that are applied when7503* selecting this completion. Edits must not overlap with the main edit7504* nor with themselves.7505*/7506readonly additionalTextEdits?: editor.ISingleEditOperation[];7507/**7508* The range to replace.7509* Must begin and end on the same line.7510*/7511readonly range?: IRange;7512readonly command?: Command;7513readonly action?: Command;7514/**7515* Is called the first time an inline completion is shown.7516* @deprecated. Use `onDidShow` of the provider instead.7517*/7518readonly shownCommand?: Command;7519/**7520* If set to `true`, unopened closing brackets are removed and unclosed opening brackets are closed.7521* Defaults to `false`.7522*/7523readonly completeBracketPairs?: boolean;7524readonly isInlineEdit?: boolean;7525readonly showInlineEditMenu?: boolean;7526readonly showRange?: IRange;7527readonly warning?: InlineCompletionWarning;7528readonly displayLocation?: InlineCompletionDisplayLocation;7529/**7530* Used for telemetry.7531*/7532readonly correlationId?: string | undefined;7533}75347535export interface InlineCompletionWarning {7536message: IMarkdownString | string;7537icon?: IconPath;7538}75397540export enum InlineCompletionDisplayLocationKind {7541Code = 1,7542Label = 27543}75447545export interface InlineCompletionDisplayLocation {7546range: IRange;7547kind: InlineCompletionDisplayLocationKind;7548label: string;7549}75507551/**7552* TODO: add `| Uri | { light: Uri; dark: Uri }`.7553*/7554export type IconPath = editor.ThemeIcon;75557556export interface InlineCompletions<TItem extends InlineCompletion = InlineCompletion> {7557readonly items: readonly TItem[];7558/**7559* A list of commands associated with the inline completions of this list.7560*/7561readonly commands?: InlineCompletionCommand[];7562readonly suppressSuggestions?: boolean | undefined;7563/**7564* When set and the user types a suggestion without derivating from it, the inline suggestion is not updated.7565*/7566readonly enableForwardStability?: boolean | undefined;7567}75687569export type InlineCompletionCommand = {7570command: Command;7571icon?: editor.ThemeIcon;7572};75737574export type InlineCompletionProviderGroupId = string;75757576export interface InlineCompletionsProvider<T extends InlineCompletions = InlineCompletions> {7577provideInlineCompletions(model: editor.ITextModel, position: Position, context: InlineCompletionContext, token: CancellationToken): ProviderResult<T>;7578/**7579* Will be called when an item is shown.7580* @param updatedInsertText Is useful to understand bracket completion.7581*/7582handleItemDidShow?(completions: T, item: T['items'][number], updatedInsertText: string): void;7583/**7584* Will be called when an item is partially accepted. TODO: also handle full acceptance here!7585* @param acceptedCharacters Deprecated. Use `info.acceptedCharacters` instead.7586*/7587handlePartialAccept?(completions: T, item: T['items'][number], acceptedCharacters: number, info: PartialAcceptInfo): void;7588/**7589* @deprecated Use `handleEndOfLifetime` instead.7590*/7591handleRejection?(completions: T, item: T['items'][number]): void;7592/**7593* Is called when an inline completion item is no longer being used.7594* Provides a reason of why it is not used anymore.7595*/7596handleEndOfLifetime?(completions: T, item: T['items'][number], reason: InlineCompletionEndOfLifeReason<T['items'][number]>, lifetimeSummary: LifetimeSummary): void;7597/**7598* Will be called when a completions list is no longer in use and can be garbage-collected.7599*/7600disposeInlineCompletions(completions: T, reason: InlineCompletionsDisposeReason): void;7601onDidChangeInlineCompletions?: IEvent<void>;7602/**7603* Only used for {@link yieldsToGroupIds}.7604* Multiple providers can have the same group id.7605*/7606groupId?: InlineCompletionProviderGroupId;7607/**7608* Returns a list of preferred provider {@link groupId}s.7609* The current provider is only requested for completions if no provider with a preferred group id returned a result.7610*/7611yieldsToGroupIds?: InlineCompletionProviderGroupId[];7612excludesGroupIds?: InlineCompletionProviderGroupId[];7613displayName?: string;7614debounceDelayMs?: number;7615toString?(): string;7616}76177618export type InlineCompletionsDisposeReason = {7619kind: 'lostRace' | 'tokenCancellation' | 'other' | 'empty' | 'notTaken';7620};76217622export enum InlineCompletionEndOfLifeReasonKind {7623Accepted = 0,7624Rejected = 1,7625Ignored = 27626}76277628export type InlineCompletionEndOfLifeReason<TInlineCompletion = InlineCompletion> = {7629kind: InlineCompletionEndOfLifeReasonKind.Accepted;7630} | {7631kind: InlineCompletionEndOfLifeReasonKind.Rejected;7632} | {7633kind: InlineCompletionEndOfLifeReasonKind.Ignored;7634supersededBy?: TInlineCompletion;7635userTypingDisagreed: boolean;7636};76377638export type LifetimeSummary = {7639requestUuid: string;7640correlationId: string | undefined;7641partiallyAccepted: number;7642partiallyAcceptedCountSinceOriginal: number;7643partiallyAcceptedRatioSinceOriginal: number;7644partiallyAcceptedCharactersSinceOriginal: number;7645shown: boolean;7646shownDuration: number;7647shownDurationUncollapsed: number;7648timeUntilShown: number | undefined;7649timeUntilProviderRequest: number;7650timeUntilProviderResponse: number;7651editorType: string;7652viewKind: string | undefined;7653error: string | undefined;7654preceeded: boolean;7655languageId: string;7656requestReason: string;7657cursorColumnDistance?: number;7658cursorLineDistance?: number;7659lineCountOriginal?: number;7660lineCountModified?: number;7661characterCountOriginal?: number;7662characterCountModified?: number;7663disjointReplacements?: number;7664sameShapeReplacements?: boolean;7665typingInterval: number;7666typingIntervalCharacterCount: number;7667};76687669export interface CodeAction {7670title: string;7671command?: Command;7672edit?: WorkspaceEdit;7673diagnostics?: editor.IMarkerData[];7674kind?: string;7675isPreferred?: boolean;7676isAI?: boolean;7677disabled?: string;7678ranges?: IRange[];7679}76807681export enum CodeActionTriggerType {7682Invoke = 1,7683Auto = 27684}76857686export interface CodeActionList extends IDisposable {7687readonly actions: ReadonlyArray<CodeAction>;7688}76897690/**7691* Represents a parameter of a callable-signature. A parameter can7692* have a label and a doc-comment.7693*/7694export interface ParameterInformation {7695/**7696* The label of this signature. Will be shown in7697* the UI.7698*/7699label: string | [number, number];7700/**7701* The human-readable doc-comment of this signature. Will be shown7702* in the UI but can be omitted.7703*/7704documentation?: string | IMarkdownString;7705}77067707/**7708* Represents the signature of something callable. A signature7709* can have a label, like a function-name, a doc-comment, and7710* a set of parameters.7711*/7712export interface SignatureInformation {7713/**7714* The label of this signature. Will be shown in7715* the UI.7716*/7717label: string;7718/**7719* The human-readable doc-comment of this signature. Will be shown7720* in the UI but can be omitted.7721*/7722documentation?: string | IMarkdownString;7723/**7724* The parameters of this signature.7725*/7726parameters: ParameterInformation[];7727/**7728* Index of the active parameter.7729*7730* If provided, this is used in place of `SignatureHelp.activeSignature`.7731*/7732activeParameter?: number;7733}77347735/**7736* Signature help represents the signature of something7737* callable. There can be multiple signatures but only one7738* active and only one active parameter.7739*/7740export interface SignatureHelp {7741/**7742* One or more signatures.7743*/7744signatures: SignatureInformation[];7745/**7746* The active signature.7747*/7748activeSignature: number;7749/**7750* The active parameter of the active signature.7751*/7752activeParameter: number;7753}77547755export interface SignatureHelpResult extends IDisposable {7756value: SignatureHelp;7757}77587759export enum SignatureHelpTriggerKind {7760Invoke = 1,7761TriggerCharacter = 2,7762ContentChange = 37763}77647765export interface SignatureHelpContext {7766readonly triggerKind: SignatureHelpTriggerKind;7767readonly triggerCharacter?: string;7768readonly isRetrigger: boolean;7769readonly activeSignatureHelp?: SignatureHelp;7770}77717772/**7773* The signature help provider interface defines the contract between extensions and7774* the [parameter hints](https://code.visualstudio.com/docs/editor/intellisense)-feature.7775*/7776export interface SignatureHelpProvider {7777readonly signatureHelpTriggerCharacters?: ReadonlyArray<string>;7778readonly signatureHelpRetriggerCharacters?: ReadonlyArray<string>;7779/**7780* Provide help for the signature at the given position and document.7781*/7782provideSignatureHelp(model: editor.ITextModel, position: Position, token: CancellationToken, context: SignatureHelpContext): ProviderResult<SignatureHelpResult>;7783}77847785/**7786* A document highlight kind.7787*/7788export enum DocumentHighlightKind {7789/**7790* A textual occurrence.7791*/7792Text = 0,7793/**7794* Read-access of a symbol, like reading a variable.7795*/7796Read = 1,7797/**7798* Write-access of a symbol, like writing to a variable.7799*/7800Write = 27801}78027803/**7804* A document highlight is a range inside a text document which deserves7805* special attention. Usually a document highlight is visualized by changing7806* the background color of its range.7807*/7808export interface DocumentHighlight {7809/**7810* The range this highlight applies to.7811*/7812range: IRange;7813/**7814* The highlight kind, default is {@link DocumentHighlightKind.Text text}.7815*/7816kind?: DocumentHighlightKind;7817}78187819/**7820* Represents a set of document highlights for a specific Uri.7821*/7822export interface MultiDocumentHighlight {7823/**7824* The Uri of the document that the highlights belong to.7825*/7826uri: Uri;7827/**7828* The set of highlights for the document.7829*/7830highlights: DocumentHighlight[];7831}78327833/**7834* The document highlight provider interface defines the contract between extensions and7835* the word-highlight-feature.7836*/7837export interface DocumentHighlightProvider {7838/**7839* Provide a set of document highlights, like all occurrences of a variable or7840* all exit-points of a function.7841*/7842provideDocumentHighlights(model: editor.ITextModel, position: Position, token: CancellationToken): ProviderResult<DocumentHighlight[]>;7843}78447845/**7846* A provider that can provide document highlights across multiple documents.7847*/7848export interface MultiDocumentHighlightProvider {7849readonly selector: LanguageSelector;7850/**7851* Provide a Map of Uri --> document highlights, like all occurrences of a variable or7852* all exit-points of a function.7853*7854* Used in cases such as split view, notebooks, etc. where there can be multiple documents7855* with shared symbols.7856*7857* @param primaryModel The primary text model.7858* @param position The position at which to provide document highlights.7859* @param otherModels The other text models to search for document highlights.7860* @param token A cancellation token.7861* @returns A map of Uri to document highlights.7862*/7863provideMultiDocumentHighlights(primaryModel: editor.ITextModel, position: Position, otherModels: editor.ITextModel[], token: CancellationToken): ProviderResult<Map<Uri, DocumentHighlight[]>>;7864}78657866/**7867* The linked editing range provider interface defines the contract between extensions and7868* the linked editing feature.7869*/7870export interface LinkedEditingRangeProvider {7871/**7872* Provide a list of ranges that can be edited together.7873*/7874provideLinkedEditingRanges(model: editor.ITextModel, position: Position, token: CancellationToken): ProviderResult<LinkedEditingRanges>;7875}78767877/**7878* Represents a list of ranges that can be edited together along with a word pattern to describe valid contents.7879*/7880export interface LinkedEditingRanges {7881/**7882* A list of ranges that can be edited together. The ranges must have7883* identical length and text content. The ranges cannot overlap7884*/7885ranges: IRange[];7886/**7887* An optional word pattern that describes valid contents for the given ranges.7888* If no pattern is provided, the language configuration's word pattern will be used.7889*/7890wordPattern?: RegExp;7891}78927893/**7894* Value-object that contains additional information when7895* requesting references.7896*/7897export interface ReferenceContext {7898/**7899* Include the declaration of the current symbol.7900*/7901includeDeclaration: boolean;7902}79037904/**7905* The reference provider interface defines the contract between extensions and7906* the [find references](https://code.visualstudio.com/docs/editor/editingevolved#_peek)-feature.7907*/7908export interface ReferenceProvider {7909/**7910* Provide a set of project-wide references for the given position and document.7911*/7912provideReferences(model: editor.ITextModel, position: Position, context: ReferenceContext, token: CancellationToken): ProviderResult<Location[]>;7913}79147915/**7916* Represents a location inside a resource, such as a line7917* inside a text file.7918*/7919export interface Location {7920/**7921* The resource identifier of this location.7922*/7923uri: Uri;7924/**7925* The document range of this locations.7926*/7927range: IRange;7928}79297930export interface LocationLink {7931/**7932* A range to select where this link originates from.7933*/7934originSelectionRange?: IRange;7935/**7936* The target uri this link points to.7937*/7938uri: Uri;7939/**7940* The full range this link points to.7941*/7942range: IRange;7943/**7944* A range to select this link points to. Must be contained7945* in `LocationLink.range`.7946*/7947targetSelectionRange?: IRange;7948}79497950export type Definition = Location | Location[] | LocationLink[];79517952/**7953* The definition provider interface defines the contract between extensions and7954* the [go to definition](https://code.visualstudio.com/docs/editor/editingevolved#_go-to-definition)7955* and peek definition features.7956*/7957export interface DefinitionProvider {7958/**7959* Provide the definition of the symbol at the given position and document.7960*/7961provideDefinition(model: editor.ITextModel, position: Position, token: CancellationToken): ProviderResult<Definition | LocationLink[]>;7962}79637964/**7965* The definition provider interface defines the contract between extensions and7966* the [go to definition](https://code.visualstudio.com/docs/editor/editingevolved#_go-to-definition)7967* and peek definition features.7968*/7969export interface DeclarationProvider {7970/**7971* Provide the declaration of the symbol at the given position and document.7972*/7973provideDeclaration(model: editor.ITextModel, position: Position, token: CancellationToken): ProviderResult<Definition | LocationLink[]>;7974}79757976/**7977* The implementation provider interface defines the contract between extensions and7978* the go to implementation feature.7979*/7980export interface ImplementationProvider {7981/**7982* Provide the implementation of the symbol at the given position and document.7983*/7984provideImplementation(model: editor.ITextModel, position: Position, token: CancellationToken): ProviderResult<Definition | LocationLink[]>;7985}79867987/**7988* The type definition provider interface defines the contract between extensions and7989* the go to type definition feature.7990*/7991export interface TypeDefinitionProvider {7992/**7993* Provide the type definition of the symbol at the given position and document.7994*/7995provideTypeDefinition(model: editor.ITextModel, position: Position, token: CancellationToken): ProviderResult<Definition | LocationLink[]>;7996}79977998/**7999* A symbol kind.8000*/8001export enum SymbolKind {8002File = 0,8003Module = 1,8004Namespace = 2,8005Package = 3,8006Class = 4,8007Method = 5,8008Property = 6,8009Field = 7,8010Constructor = 8,8011Enum = 9,8012Interface = 10,8013Function = 11,8014Variable = 12,8015Constant = 13,8016String = 14,8017Number = 15,8018Boolean = 16,8019Array = 17,8020Object = 18,8021Key = 19,8022Null = 20,8023EnumMember = 21,8024Struct = 22,8025Event = 23,8026Operator = 24,8027TypeParameter = 258028}80298030export enum SymbolTag {8031Deprecated = 18032}80338034export interface DocumentSymbol {8035name: string;8036detail: string;8037kind: SymbolKind;8038tags: ReadonlyArray<SymbolTag>;8039containerName?: string;8040range: IRange;8041selectionRange: IRange;8042children?: DocumentSymbol[];8043}80448045/**8046* The document symbol provider interface defines the contract between extensions and8047* the [go to symbol](https://code.visualstudio.com/docs/editor/editingevolved#_go-to-symbol)-feature.8048*/8049export interface DocumentSymbolProvider {8050displayName?: string;8051/**8052* Provide symbol information for the given document.8053*/8054provideDocumentSymbols(model: editor.ITextModel, token: CancellationToken): ProviderResult<DocumentSymbol[]>;8055}80568057export interface TextEdit {8058range: IRange;8059text: string;8060eol?: editor.EndOfLineSequence;8061}80628063/**8064* Interface used to format a model8065*/8066export interface FormattingOptions {8067/**8068* Size of a tab in spaces.8069*/8070tabSize: number;8071/**8072* Prefer spaces over tabs.8073*/8074insertSpaces: boolean;8075}80768077/**8078* The document formatting provider interface defines the contract between extensions and8079* the formatting-feature.8080*/8081export interface DocumentFormattingEditProvider {8082readonly displayName?: string;8083/**8084* Provide formatting edits for a whole document.8085*/8086provideDocumentFormattingEdits(model: editor.ITextModel, options: FormattingOptions, token: CancellationToken): ProviderResult<TextEdit[]>;8087}80888089/**8090* The document formatting provider interface defines the contract between extensions and8091* the formatting-feature.8092*/8093export interface DocumentRangeFormattingEditProvider {8094readonly displayName?: string;8095/**8096* Provide formatting edits for a range in a document.8097*8098* The given range is a hint and providers can decide to format a smaller8099* or larger range. Often this is done by adjusting the start and end8100* of the range to full syntax nodes.8101*/8102provideDocumentRangeFormattingEdits(model: editor.ITextModel, range: Range, options: FormattingOptions, token: CancellationToken): ProviderResult<TextEdit[]>;8103provideDocumentRangesFormattingEdits?(model: editor.ITextModel, ranges: Range[], options: FormattingOptions, token: CancellationToken): ProviderResult<TextEdit[]>;8104}81058106/**8107* The document formatting provider interface defines the contract between extensions and8108* the formatting-feature.8109*/8110export interface OnTypeFormattingEditProvider {8111autoFormatTriggerCharacters: string[];8112/**8113* Provide formatting edits after a character has been typed.8114*8115* The given position and character should hint to the provider8116* what range the position to expand to, like find the matching `{`8117* when `}` has been entered.8118*/8119provideOnTypeFormattingEdits(model: editor.ITextModel, position: Position, ch: string, options: FormattingOptions, token: CancellationToken): ProviderResult<TextEdit[]>;8120}81218122/**8123* A link inside the editor.8124*/8125export interface ILink {8126range: IRange;8127url?: Uri | string;8128tooltip?: string;8129}81308131export interface ILinksList {8132links: ILink[];8133dispose?(): void;8134}81358136/**8137* A provider of links.8138*/8139export interface LinkProvider {8140provideLinks(model: editor.ITextModel, token: CancellationToken): ProviderResult<ILinksList>;8141resolveLink?: (link: ILink, token: CancellationToken) => ProviderResult<ILink>;8142}81438144/**8145* A color in RGBA format.8146*/8147export interface IColor {8148/**8149* The red component in the range [0-1].8150*/8151readonly red: number;8152/**8153* The green component in the range [0-1].8154*/8155readonly green: number;8156/**8157* The blue component in the range [0-1].8158*/8159readonly blue: number;8160/**8161* The alpha component in the range [0-1].8162*/8163readonly alpha: number;8164}81658166/**8167* String representations for a color8168*/8169export interface IColorPresentation {8170/**8171* The label of this color presentation. It will be shown on the color8172* picker header. By default this is also the text that is inserted when selecting8173* this color presentation.8174*/8175label: string;8176/**8177* An {@link TextEdit edit} which is applied to a document when selecting8178* this presentation for the color.8179*/8180textEdit?: TextEdit;8181/**8182* An optional array of additional {@link TextEdit text edits} that are applied when8183* selecting this color presentation.8184*/8185additionalTextEdits?: TextEdit[];8186}81878188/**8189* A color range is a range in a text model which represents a color.8190*/8191export interface IColorInformation {8192/**8193* The range within the model.8194*/8195range: IRange;8196/**8197* The color represented in this range.8198*/8199color: IColor;8200}82018202/**8203* A provider of colors for editor models.8204*/8205export interface DocumentColorProvider {8206/**8207* Provides the color ranges for a specific model.8208*/8209provideDocumentColors(model: editor.ITextModel, token: CancellationToken): ProviderResult<IColorInformation[]>;8210/**8211* Provide the string representations for a color.8212*/8213provideColorPresentations(model: editor.ITextModel, colorInfo: IColorInformation, token: CancellationToken): ProviderResult<IColorPresentation[]>;8214}82158216export interface SelectionRange {8217range: IRange;8218}82198220export interface SelectionRangeProvider {8221/**8222* Provide ranges that should be selected from the given position.8223*/8224provideSelectionRanges(model: editor.ITextModel, positions: Position[], token: CancellationToken): ProviderResult<SelectionRange[][]>;8225}82268227export interface FoldingContext {8228}82298230/**8231* A provider of folding ranges for editor models.8232*/8233export interface FoldingRangeProvider {8234/**8235* An optional event to signal that the folding ranges from this provider have changed.8236*/8237onDidChange?: IEvent<this>;8238/**8239* Provides the folding ranges for a specific model.8240*/8241provideFoldingRanges(model: editor.ITextModel, context: FoldingContext, token: CancellationToken): ProviderResult<FoldingRange[]>;8242}82438244export interface FoldingRange {8245/**8246* The one-based start line of the range to fold. The folded area starts after the line's last character.8247*/8248start: number;8249/**8250* The one-based end line of the range to fold. The folded area ends with the line's last character.8251*/8252end: number;8253/**8254* Describes the {@link FoldingRangeKind Kind} of the folding range such as {@link FoldingRangeKind.Comment Comment} or8255* {@link FoldingRangeKind.Region Region}. The kind is used to categorize folding ranges and used by commands8256* like 'Fold all comments'. See8257* {@link FoldingRangeKind} for an enumeration of standardized kinds.8258*/8259kind?: FoldingRangeKind;8260}82618262export class FoldingRangeKind {8263value: string;8264/**8265* Kind for folding range representing a comment. The value of the kind is 'comment'.8266*/8267static readonly Comment: FoldingRangeKind;8268/**8269* Kind for folding range representing a import. The value of the kind is 'imports'.8270*/8271static readonly Imports: FoldingRangeKind;8272/**8273* Kind for folding range representing regions (for example marked by `#region`, `#endregion`).8274* The value of the kind is 'region'.8275*/8276static readonly Region: FoldingRangeKind;8277/**8278* Returns a {@link FoldingRangeKind} for the given value.8279*8280* @param value of the kind.8281*/8282static fromValue(value: string): FoldingRangeKind;8283/**8284* Creates a new {@link FoldingRangeKind}.8285*8286* @param value of the kind.8287*/8288constructor(value: string);8289}82908291export interface WorkspaceEditMetadata {8292needsConfirmation: boolean;8293label: string;8294description?: string;8295}82968297export interface WorkspaceFileEditOptions {8298overwrite?: boolean;8299ignoreIfNotExists?: boolean;8300ignoreIfExists?: boolean;8301recursive?: boolean;8302copy?: boolean;8303folder?: boolean;8304skipTrashBin?: boolean;8305maxSize?: number;8306}83078308export interface IWorkspaceFileEdit {8309oldResource?: Uri;8310newResource?: Uri;8311options?: WorkspaceFileEditOptions;8312metadata?: WorkspaceEditMetadata;8313}83148315export interface IWorkspaceTextEdit {8316resource: Uri;8317textEdit: TextEdit & {8318insertAsSnippet?: boolean;8319keepWhitespace?: boolean;8320};8321versionId: number | undefined;8322metadata?: WorkspaceEditMetadata;8323}83248325export interface WorkspaceEdit {8326edits: Array<IWorkspaceTextEdit | IWorkspaceFileEdit | ICustomEdit>;8327}83288329export interface ICustomEdit {8330readonly resource: Uri;8331readonly metadata?: WorkspaceEditMetadata;8332undo(): Promise<void> | void;8333redo(): Promise<void> | void;8334}83358336export interface Rejection {8337rejectReason?: string;8338}83398340export interface RenameLocation {8341range: IRange;8342text: string;8343}83448345export interface RenameProvider {8346provideRenameEdits(model: editor.ITextModel, position: Position, newName: string, token: CancellationToken): ProviderResult<WorkspaceEdit & Rejection>;8347resolveRenameLocation?(model: editor.ITextModel, position: Position, token: CancellationToken): ProviderResult<RenameLocation & Rejection>;8348}83498350export enum NewSymbolNameTag {8351AIGenerated = 18352}83538354export enum NewSymbolNameTriggerKind {8355Invoke = 0,8356Automatic = 18357}83588359export interface NewSymbolName {8360readonly newSymbolName: string;8361readonly tags?: readonly NewSymbolNameTag[];8362}83638364export interface NewSymbolNamesProvider {8365supportsAutomaticNewSymbolNamesTriggerKind?: Promise<boolean | undefined>;8366provideNewSymbolNames(model: editor.ITextModel, range: IRange, triggerKind: NewSymbolNameTriggerKind, token: CancellationToken): ProviderResult<NewSymbolName[]>;8367}83688369export interface Command {8370id: string;8371title: string;8372tooltip?: string;8373arguments?: any[];8374}83758376export interface CommentThreadRevealOptions {8377preserveFocus: boolean;8378focusReply: boolean;8379}83808381export interface CommentAuthorInformation {8382name: string;8383iconPath?: UriComponents;8384}83858386export interface PendingCommentThread {8387range: IRange | undefined;8388uri: Uri;8389uniqueOwner: string;8390isReply: boolean;8391comment: PendingComment;8392}83938394export interface PendingComment {8395body: string;8396cursor: IPosition;8397}83988399export interface CodeLens {8400range: IRange;8401id?: string;8402command?: Command;8403}84048405export interface CodeLensList {8406readonly lenses: readonly CodeLens[];8407dispose?(): void;8408}84098410export interface CodeLensProvider {8411onDidChange?: IEvent<this>;8412provideCodeLenses(model: editor.ITextModel, token: CancellationToken): ProviderResult<CodeLensList>;8413resolveCodeLens?(model: editor.ITextModel, codeLens: CodeLens, token: CancellationToken): ProviderResult<CodeLens>;8414}84158416export enum InlayHintKind {8417Type = 1,8418Parameter = 28419}84208421export interface InlayHintLabelPart {8422label: string;8423tooltip?: string | IMarkdownString;8424command?: Command;8425location?: Location;8426}84278428export interface InlayHint {8429label: string | InlayHintLabelPart[];8430tooltip?: string | IMarkdownString;8431textEdits?: TextEdit[];8432position: IPosition;8433kind?: InlayHintKind;8434paddingLeft?: boolean;8435paddingRight?: boolean;8436}84378438export interface InlayHintList {8439hints: InlayHint[];8440dispose(): void;8441}84428443export interface InlayHintsProvider {8444displayName?: string;8445onDidChangeInlayHints?: IEvent<void>;8446provideInlayHints(model: editor.ITextModel, range: Range, token: CancellationToken): ProviderResult<InlayHintList>;8447resolveInlayHint?(hint: InlayHint, token: CancellationToken): ProviderResult<InlayHint>;8448}84498450export interface SemanticTokensLegend {8451readonly tokenTypes: string[];8452readonly tokenModifiers: string[];8453}84548455export interface SemanticTokens {8456readonly resultId?: string;8457readonly data: Uint32Array;8458}84598460export interface SemanticTokensEdit {8461readonly start: number;8462readonly deleteCount: number;8463readonly data?: Uint32Array;8464}84658466export interface SemanticTokensEdits {8467readonly resultId?: string;8468readonly edits: SemanticTokensEdit[];8469}84708471export interface DocumentSemanticTokensProvider {8472onDidChange?: IEvent<void>;8473getLegend(): SemanticTokensLegend;8474provideDocumentSemanticTokens(model: editor.ITextModel, lastResultId: string | null, token: CancellationToken): ProviderResult<SemanticTokens | SemanticTokensEdits>;8475releaseDocumentSemanticTokens(resultId: string | undefined): void;8476}84778478export interface DocumentRangeSemanticTokensProvider {8479getLegend(): SemanticTokensLegend;8480provideDocumentRangeSemanticTokens(model: editor.ITextModel, range: Range, token: CancellationToken): ProviderResult<SemanticTokens>;8481}84828483export interface ILanguageExtensionPoint {8484id: string;8485extensions?: string[];8486filenames?: string[];8487filenamePatterns?: string[];8488firstLine?: string;8489aliases?: string[];8490mimetypes?: string[];8491configuration?: Uri;8492}8493/**8494* A Monarch language definition8495*/8496export interface IMonarchLanguage {8497/**8498* map from string to ILanguageRule[]8499*/8500tokenizer: {8501[name: string]: IMonarchLanguageRule[];8502};8503/**8504* is the language case insensitive?8505*/8506ignoreCase?: boolean;8507/**8508* is the language unicode-aware? (i.e., /\u{1D306}/)8509*/8510unicode?: boolean;8511/**8512* if no match in the tokenizer assign this token class (default 'source')8513*/8514defaultToken?: string;8515/**8516* for example [['{','}','delimiter.curly']]8517*/8518brackets?: IMonarchLanguageBracket[];8519/**8520* start symbol in the tokenizer (by default the first entry is used)8521*/8522start?: string;8523/**8524* attach this to every token class (by default '.' + name)8525*/8526tokenPostfix?: string;8527/**8528* include line feeds (in the form of a \n character) at the end of lines8529* Defaults to false8530*/8531includeLF?: boolean;8532/**8533* Other keys that can be referred to by the tokenizer.8534*/8535[key: string]: any;8536}85378538/**8539* A rule is either a regular expression and an action8540* shorthands: [reg,act] == { regex: reg, action: act}8541* and : [reg,act,nxt] == { regex: reg, action: act{ next: nxt }}8542*/8543export type IShortMonarchLanguageRule1 = [string | RegExp, IMonarchLanguageAction];85448545export type IShortMonarchLanguageRule2 = [string | RegExp, IMonarchLanguageAction, string];85468547export interface IExpandedMonarchLanguageRule {8548/**8549* match tokens8550*/8551regex?: string | RegExp;8552/**8553* action to take on match8554*/8555action?: IMonarchLanguageAction;8556/**8557* or an include rule. include all rules from the included state8558*/8559include?: string;8560}85618562export type IMonarchLanguageRule = IShortMonarchLanguageRule1 | IShortMonarchLanguageRule2 | IExpandedMonarchLanguageRule;85638564/**8565* An action is either an array of actions...8566* ... or a case statement with guards...8567* ... or a basic action with a token value.8568*/8569export type IShortMonarchLanguageAction = string;85708571export interface IExpandedMonarchLanguageAction {8572/**8573* array of actions for each parenthesized match group8574*/8575group?: IMonarchLanguageAction[];8576/**8577* map from string to ILanguageAction8578*/8579cases?: Object;8580/**8581* token class (ie. css class) (or "@brackets" or "@rematch")8582*/8583token?: string;8584/**8585* the next state to push, or "@push", "@pop", "@popall"8586*/8587next?: string;8588/**8589* switch to this state8590*/8591switchTo?: string;8592/**8593* go back n characters in the stream8594*/8595goBack?: number;8596/**8597* @open or @close8598*/8599bracket?: string;8600/**8601* switch to embedded language (using the mimetype) or get out using "@pop"8602*/8603nextEmbedded?: string;8604/**8605* log a message to the browser console window8606*/8607log?: string;8608}86098610export type IMonarchLanguageAction = IShortMonarchLanguageAction | IExpandedMonarchLanguageAction | (IShortMonarchLanguageAction | IExpandedMonarchLanguageAction)[];86118612/**8613* This interface can be shortened as an array, ie. ['{','}','delimiter.curly']8614*/8615export interface IMonarchLanguageBracket {8616/**8617* open bracket8618*/8619open: string;8620/**8621* closing bracket8622*/8623close: string;8624/**8625* token class8626*/8627token: string;8628}86298630}86318632declare namespace monaco.worker {863386348635export interface IMirrorTextModel {8636readonly version: number;8637}86388639export interface IMirrorModel extends IMirrorTextModel {8640readonly uri: Uri;8641readonly version: number;8642getValue(): string;8643}86448645export interface IWorkerContext<H = {}> {8646/**8647* A proxy to the main thread host object.8648*/8649host: H;8650/**8651* Get all available mirror models in this worker.8652*/8653getMirrorModels(): IMirrorModel[];8654}86558656}86578658//dtsv=3865986608661