modern-monaco 0.1.9 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -4
- package/dist/{cache.js → cache.mjs} +1 -1
- package/dist/{core.js → core.mjs} +15 -38
- package/dist/{editor-core.js → editor-core.mjs} +108795 -88348
- package/dist/editor-worker-main.mjs +5 -0
- package/dist/{editor-worker.js → editor-worker.mjs} +5854 -4779
- package/dist/{index.js → index.mjs} +6 -6
- package/dist/lsp/css/{setup.js → setup.mjs} +19 -12
- package/dist/lsp/css/{worker.js → worker.mjs} +18 -23
- package/dist/lsp/html/{setup.js → setup.mjs} +19 -12
- package/dist/lsp/html/{worker.js → worker.mjs} +18 -23
- package/dist/lsp/json/{setup.js → setup.mjs} +19 -12
- package/dist/lsp/json/{worker.js → worker.mjs} +19 -24
- package/dist/lsp/{language-service.js → language-service.mjs} +7 -7
- package/dist/lsp/typescript/{setup.js → setup.mjs} +22 -15
- package/dist/lsp/typescript/{worker.js → worker.mjs} +22 -26
- package/dist/{shiki.js → shiki.mjs} +5 -2
- package/dist/ssr/{index.js → index.mjs} +4 -4
- package/dist/ssr/{workerd.js → workerd.mjs} +3 -3
- package/dist/{workspace.js → workspace.mjs} +16 -12
- package/package.json +18 -15
- package/types/index.d.ts +1 -1
- package/types/lsp.d.ts +2 -5
- package/types/monaco.d.ts +652 -278
- package/types/workspace.d.ts +5 -1
- /package/dist/lsp/typescript/{libs.js → libs.mjs} +0 -0
- /package/dist/{shiki-wasm.js → shiki-wasm.mjs} +0 -0
- /package/dist/{util.js → util.mjs} +0 -0
package/types/monaco.d.ts
CHANGED
|
@@ -3,12 +3,9 @@
|
|
|
3
3
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
|
|
6
|
+
// eslint-disable-next-line no-var
|
|
6
7
|
declare global {
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
interface Window {
|
|
11
|
-
MonacoEnvironment?: Environment | undefined;
|
|
8
|
+
var MonacoEnvironment: Environment | undefined;
|
|
12
9
|
}
|
|
13
10
|
|
|
14
11
|
export type Thenable<T> = PromiseLike<T>;
|
|
@@ -124,7 +121,7 @@ export interface CancellationToken {
|
|
|
124
121
|
* ```
|
|
125
122
|
*/
|
|
126
123
|
export class Uri implements UriComponents {
|
|
127
|
-
static isUri(thing:
|
|
124
|
+
static isUri(thing: unknown): thing is Uri;
|
|
128
125
|
/**
|
|
129
126
|
* scheme is the 'http' part of 'http://www.example.com/some/path?query#fragment'.
|
|
130
127
|
* The part before the first colon.
|
|
@@ -517,6 +514,7 @@ export interface IMouseEvent {
|
|
|
517
514
|
readonly altKey: boolean;
|
|
518
515
|
readonly metaKey: boolean;
|
|
519
516
|
readonly timestamp: number;
|
|
517
|
+
readonly defaultPrevented: boolean;
|
|
520
518
|
preventDefault(): void;
|
|
521
519
|
stopPropagation(): void;
|
|
522
520
|
}
|
|
@@ -772,6 +770,7 @@ export class Range {
|
|
|
772
770
|
* Moves the range by the given amount of lines.
|
|
773
771
|
*/
|
|
774
772
|
delta(lineCount: number): Range;
|
|
773
|
+
isSingleLine(): boolean;
|
|
775
774
|
static fromPositions(start: IPosition, end?: IPosition): Range;
|
|
776
775
|
/**
|
|
777
776
|
* Create a `Range` from an `IRange`.
|
|
@@ -791,6 +790,10 @@ export class Range {
|
|
|
791
790
|
* Test if the two ranges are intersecting. If the ranges are touching it returns true.
|
|
792
791
|
*/
|
|
793
792
|
static areIntersecting(a: IRange, b: IRange): boolean;
|
|
793
|
+
/**
|
|
794
|
+
* Test if the two ranges are intersecting, but not touching at all.
|
|
795
|
+
*/
|
|
796
|
+
static areOnlyIntersecting(a: IRange, b: IRange): boolean;
|
|
794
797
|
/**
|
|
795
798
|
* A function that compares ranges, useful for sorting ranges
|
|
796
799
|
* It will first compare ranges on the startPosition and then on the endPosition
|
|
@@ -1092,7 +1095,7 @@ export namespace editor {
|
|
|
1092
1095
|
* Create a new web worker that has model syncing capabilities built in.
|
|
1093
1096
|
* Specify an AMD module to load that will `create` an object that will be proxied.
|
|
1094
1097
|
*/
|
|
1095
|
-
export function createWebWorker<T extends object>(opts:
|
|
1098
|
+
export function createWebWorker<T extends object>(opts: IInternalWebWorkerOptions): MonacoWebWorker<T>;
|
|
1096
1099
|
|
|
1097
1100
|
/**
|
|
1098
1101
|
* Colorize the contents of `domNode` using attribute `data-lang`.
|
|
@@ -1211,20 +1214,11 @@ export namespace editor {
|
|
|
1211
1214
|
withSyncedResources(resources: Uri[]): Promise<T>;
|
|
1212
1215
|
}
|
|
1213
1216
|
|
|
1214
|
-
export interface
|
|
1217
|
+
export interface IInternalWebWorkerOptions {
|
|
1215
1218
|
/**
|
|
1216
|
-
* The
|
|
1217
|
-
* It should export a function `create` that should return the exported proxy.
|
|
1219
|
+
* The worker.
|
|
1218
1220
|
*/
|
|
1219
|
-
|
|
1220
|
-
/**
|
|
1221
|
-
* The data to send over when calling create on the module.
|
|
1222
|
-
*/
|
|
1223
|
-
createData?: any;
|
|
1224
|
-
/**
|
|
1225
|
-
* A label to be used to identify the web worker for debugging purposes.
|
|
1226
|
-
*/
|
|
1227
|
-
label?: string;
|
|
1221
|
+
worker: Worker | Promise<Worker>;
|
|
1228
1222
|
/**
|
|
1229
1223
|
* An object that can be used by the web worker to make calls back to the main thread.
|
|
1230
1224
|
*/
|
|
@@ -1472,6 +1466,7 @@ export namespace editor {
|
|
|
1472
1466
|
modelVersionId?: number;
|
|
1473
1467
|
relatedInformation?: IRelatedInformation[];
|
|
1474
1468
|
tags?: MarkerTag[];
|
|
1469
|
+
origin?: string | undefined;
|
|
1475
1470
|
}
|
|
1476
1471
|
|
|
1477
1472
|
/**
|
|
@@ -1492,6 +1487,7 @@ export namespace editor {
|
|
|
1492
1487
|
modelVersionId?: number;
|
|
1493
1488
|
relatedInformation?: IRelatedInformation[];
|
|
1494
1489
|
tags?: MarkerTag[];
|
|
1490
|
+
origin?: string | undefined;
|
|
1495
1491
|
}
|
|
1496
1492
|
|
|
1497
1493
|
/**
|
|
@@ -1525,6 +1521,11 @@ export namespace editor {
|
|
|
1525
1521
|
id: string;
|
|
1526
1522
|
}
|
|
1527
1523
|
|
|
1524
|
+
export interface ThemeIcon {
|
|
1525
|
+
readonly id: string;
|
|
1526
|
+
readonly color?: ThemeColor;
|
|
1527
|
+
}
|
|
1528
|
+
|
|
1528
1529
|
/**
|
|
1529
1530
|
* A single edit operation, that acts as a simple replace.
|
|
1530
1531
|
* i.e. Replace text at `range` with `text` in model.
|
|
@@ -1740,6 +1741,26 @@ export namespace editor {
|
|
|
1740
1741
|
* with the specified {@link IModelDecorationGlyphMarginOptions} in the glyph margin.
|
|
1741
1742
|
*/
|
|
1742
1743
|
glyphMargin?: IModelDecorationGlyphMarginOptions | null;
|
|
1744
|
+
/**
|
|
1745
|
+
* If set, the decoration will override the line height of the lines it spans. Maximum value is 300px.
|
|
1746
|
+
*/
|
|
1747
|
+
lineHeight?: number | null;
|
|
1748
|
+
/**
|
|
1749
|
+
* Font family
|
|
1750
|
+
*/
|
|
1751
|
+
fontFamily?: string | null;
|
|
1752
|
+
/**
|
|
1753
|
+
* Font size
|
|
1754
|
+
*/
|
|
1755
|
+
fontSize?: string | null;
|
|
1756
|
+
/**
|
|
1757
|
+
* Font weight
|
|
1758
|
+
*/
|
|
1759
|
+
fontWeight?: string | null;
|
|
1760
|
+
/**
|
|
1761
|
+
* Font style
|
|
1762
|
+
*/
|
|
1763
|
+
fontStyle?: string | null;
|
|
1743
1764
|
/**
|
|
1744
1765
|
* If set, the decoration will be rendered in the lines decorations with this CSS class name.
|
|
1745
1766
|
*/
|
|
@@ -1786,6 +1807,18 @@ export namespace editor {
|
|
|
1786
1807
|
* If set, text will be injected in the view before the range.
|
|
1787
1808
|
*/
|
|
1788
1809
|
before?: InjectedTextOptions | null;
|
|
1810
|
+
/**
|
|
1811
|
+
* The text direction of the decoration.
|
|
1812
|
+
*/
|
|
1813
|
+
textDirection?: TextDirection | null;
|
|
1814
|
+
}
|
|
1815
|
+
|
|
1816
|
+
/**
|
|
1817
|
+
* Text Direction for a decoration.
|
|
1818
|
+
*/
|
|
1819
|
+
export enum TextDirection {
|
|
1820
|
+
LTR = 0,
|
|
1821
|
+
RTL = 1
|
|
1789
1822
|
}
|
|
1790
1823
|
|
|
1791
1824
|
/**
|
|
@@ -2111,6 +2144,10 @@ export namespace editor {
|
|
|
2111
2144
|
* Create a valid range.
|
|
2112
2145
|
*/
|
|
2113
2146
|
validateRange(range: IRange): Range;
|
|
2147
|
+
/**
|
|
2148
|
+
* Verifies the range is valid.
|
|
2149
|
+
*/
|
|
2150
|
+
isValidRange(range: IRange): boolean;
|
|
2114
2151
|
/**
|
|
2115
2152
|
* Converts the position to a zero-based offset.
|
|
2116
2153
|
*
|
|
@@ -2225,35 +2262,39 @@ export namespace editor {
|
|
|
2225
2262
|
* @param lineNumber The line number
|
|
2226
2263
|
* @param ownerId If set, it will ignore decorations belonging to other owners.
|
|
2227
2264
|
* @param filterOutValidation If set, it will ignore decorations specific to validation (i.e. warnings, errors).
|
|
2265
|
+
* @param filterFontDecorations If set, it will ignore font decorations.
|
|
2228
2266
|
* @return An array with the decorations
|
|
2229
2267
|
*/
|
|
2230
|
-
getLineDecorations(lineNumber: number, ownerId?: number, filterOutValidation?: boolean): IModelDecoration[];
|
|
2268
|
+
getLineDecorations(lineNumber: number, ownerId?: number, filterOutValidation?: boolean, filterFontDecorations?: boolean): IModelDecoration[];
|
|
2231
2269
|
/**
|
|
2232
2270
|
* Gets all the decorations for the lines between `startLineNumber` and `endLineNumber` as an array.
|
|
2233
2271
|
* @param startLineNumber The start line number
|
|
2234
2272
|
* @param endLineNumber The end line number
|
|
2235
2273
|
* @param ownerId If set, it will ignore decorations belonging to other owners.
|
|
2236
2274
|
* @param filterOutValidation If set, it will ignore decorations specific to validation (i.e. warnings, errors).
|
|
2275
|
+
* @param filterFontDecorations If set, it will ignore font decorations.
|
|
2237
2276
|
* @return An array with the decorations
|
|
2238
2277
|
*/
|
|
2239
|
-
getLinesDecorations(startLineNumber: number, endLineNumber: number, ownerId?: number, filterOutValidation?: boolean): IModelDecoration[];
|
|
2278
|
+
getLinesDecorations(startLineNumber: number, endLineNumber: number, ownerId?: number, filterOutValidation?: boolean, filterFontDecorations?: boolean): IModelDecoration[];
|
|
2240
2279
|
/**
|
|
2241
2280
|
* Gets all the decorations in a range as an array. Only `startLineNumber` and `endLineNumber` from `range` are used for filtering.
|
|
2242
2281
|
* So for now it returns all the decorations on the same line as `range`.
|
|
2243
2282
|
* @param range The range to search in
|
|
2244
2283
|
* @param ownerId If set, it will ignore decorations belonging to other owners.
|
|
2245
2284
|
* @param filterOutValidation If set, it will ignore decorations specific to validation (i.e. warnings, errors).
|
|
2285
|
+
* @param filterFontDecorations If set, it will ignore font decorations.
|
|
2246
2286
|
* @param onlyMinimapDecorations If set, it will return only decorations that render in the minimap.
|
|
2247
2287
|
* @param onlyMarginDecorations If set, it will return only decorations that render in the glyph margin.
|
|
2248
2288
|
* @return An array with the decorations
|
|
2249
2289
|
*/
|
|
2250
|
-
getDecorationsInRange(range: IRange, ownerId?: number, filterOutValidation?: boolean, onlyMinimapDecorations?: boolean, onlyMarginDecorations?: boolean): IModelDecoration[];
|
|
2290
|
+
getDecorationsInRange(range: IRange, ownerId?: number, filterOutValidation?: boolean, filterFontDecorations?: boolean, onlyMinimapDecorations?: boolean, onlyMarginDecorations?: boolean): IModelDecoration[];
|
|
2251
2291
|
/**
|
|
2252
2292
|
* Gets all the decorations as an array.
|
|
2253
2293
|
* @param ownerId If set, it will ignore decorations belonging to other owners.
|
|
2254
2294
|
* @param filterOutValidation If set, it will ignore decorations specific to validation (i.e. warnings, errors).
|
|
2295
|
+
* @param filterFontDecorations If set, it will ignore font decorations.
|
|
2255
2296
|
*/
|
|
2256
|
-
getAllDecorations(ownerId?: number, filterOutValidation?: boolean): IModelDecoration[];
|
|
2297
|
+
getAllDecorations(ownerId?: number, filterOutValidation?: boolean, filterFontDecorations?: boolean): IModelDecoration[];
|
|
2257
2298
|
/**
|
|
2258
2299
|
* Gets all decorations that render in the glyph margin as an array.
|
|
2259
2300
|
* @param ownerId If set, it will ignore decorations belonging to other owners.
|
|
@@ -2263,13 +2304,19 @@ export namespace editor {
|
|
|
2263
2304
|
* Gets all the decorations that should be rendered in the overview ruler as an array.
|
|
2264
2305
|
* @param ownerId If set, it will ignore decorations belonging to other owners.
|
|
2265
2306
|
* @param filterOutValidation If set, it will ignore decorations specific to validation (i.e. warnings, errors).
|
|
2307
|
+
* @param filterFontDecorations If set, it will ignore font decorations.
|
|
2266
2308
|
*/
|
|
2267
|
-
getOverviewRulerDecorations(ownerId?: number, filterOutValidation?: boolean): IModelDecoration[];
|
|
2309
|
+
getOverviewRulerDecorations(ownerId?: number, filterOutValidation?: boolean, filterFontDecorations?: boolean): IModelDecoration[];
|
|
2268
2310
|
/**
|
|
2269
2311
|
* Gets all the decorations that contain injected text.
|
|
2270
2312
|
* @param ownerId If set, it will ignore decorations belonging to other owners.
|
|
2271
2313
|
*/
|
|
2272
2314
|
getInjectedTextDecorations(ownerId?: number): IModelDecoration[];
|
|
2315
|
+
/**
|
|
2316
|
+
* Gets all the decorations that contain custom line heights.
|
|
2317
|
+
* @param ownerId If set, it will ignore decorations belonging to other owners.
|
|
2318
|
+
*/
|
|
2319
|
+
getCustomLineHeightsDecorations(ownerId?: number): IModelDecoration[];
|
|
2273
2320
|
/**
|
|
2274
2321
|
* Normalize a string containing whitespace according to indentation rules (converts to spaces or to tabs).
|
|
2275
2322
|
*/
|
|
@@ -2312,14 +2359,32 @@ export namespace editor {
|
|
|
2312
2359
|
* @param operations The edit operations.
|
|
2313
2360
|
* @return If desired, the inverse edit operations, that, when applied, will bring the model back to the previous state.
|
|
2314
2361
|
*/
|
|
2315
|
-
applyEdits(operations: IIdentifiedSingleEditOperation[]): void;
|
|
2316
|
-
applyEdits(operations: IIdentifiedSingleEditOperation[], computeUndoEdits: false): void;
|
|
2317
|
-
applyEdits(operations: IIdentifiedSingleEditOperation[], computeUndoEdits: true): IValidEditOperation[];
|
|
2362
|
+
applyEdits(operations: readonly IIdentifiedSingleEditOperation[]): void;
|
|
2363
|
+
applyEdits(operations: readonly IIdentifiedSingleEditOperation[], computeUndoEdits: false): void;
|
|
2364
|
+
applyEdits(operations: readonly IIdentifiedSingleEditOperation[], computeUndoEdits: true): IValidEditOperation[];
|
|
2318
2365
|
/**
|
|
2319
2366
|
* Change the end of line sequence without recording in the undo stack.
|
|
2320
2367
|
* This can have dire consequences on the undo stack! See @pushEOL for the preferred way.
|
|
2321
2368
|
*/
|
|
2322
2369
|
setEOL(eol: EndOfLineSequence): void;
|
|
2370
|
+
/**
|
|
2371
|
+
* Undo edit operations until the previous undo/redo point.
|
|
2372
|
+
* The inverse edit operations will be pushed on the redo stack.
|
|
2373
|
+
*/
|
|
2374
|
+
undo(): void | Promise<void>;
|
|
2375
|
+
/**
|
|
2376
|
+
* Is there anything in the undo stack?
|
|
2377
|
+
*/
|
|
2378
|
+
canUndo(): boolean;
|
|
2379
|
+
/**
|
|
2380
|
+
* Redo edit operations until the next undo/redo point.
|
|
2381
|
+
* The inverse edit operations will be pushed on the undo stack.
|
|
2382
|
+
*/
|
|
2383
|
+
redo(): void | Promise<void>;
|
|
2384
|
+
/**
|
|
2385
|
+
* Is there anything in the redo stack?
|
|
2386
|
+
*/
|
|
2387
|
+
canRedo(): boolean;
|
|
2323
2388
|
/**
|
|
2324
2389
|
* An event emitted when the contents of the model have changed.
|
|
2325
2390
|
* @event
|
|
@@ -2894,29 +2959,47 @@ export namespace editor {
|
|
|
2894
2959
|
export interface IModelLanguageConfigurationChangedEvent {
|
|
2895
2960
|
}
|
|
2896
2961
|
|
|
2897
|
-
|
|
2962
|
+
/**
|
|
2963
|
+
* An event describing a change in the text of a model.
|
|
2964
|
+
*/
|
|
2965
|
+
export interface IModelContentChangedEvent {
|
|
2898
2966
|
/**
|
|
2899
|
-
* The
|
|
2967
|
+
* The changes are ordered from the end of the document to the beginning, so they should be safe to apply in sequence.
|
|
2900
2968
|
*/
|
|
2901
|
-
readonly
|
|
2969
|
+
readonly changes: IModelContentChange[];
|
|
2902
2970
|
/**
|
|
2903
|
-
* The
|
|
2971
|
+
* The (new) end-of-line character.
|
|
2904
2972
|
*/
|
|
2905
|
-
readonly
|
|
2973
|
+
readonly eol: string;
|
|
2906
2974
|
/**
|
|
2907
|
-
* The
|
|
2975
|
+
* The new version id the model has transitioned to.
|
|
2908
2976
|
*/
|
|
2909
|
-
readonly
|
|
2977
|
+
readonly versionId: number;
|
|
2910
2978
|
/**
|
|
2911
|
-
*
|
|
2979
|
+
* Flag that indicates that this event was generated while undoing.
|
|
2912
2980
|
*/
|
|
2913
|
-
readonly
|
|
2981
|
+
readonly isUndoing: boolean;
|
|
2982
|
+
/**
|
|
2983
|
+
* Flag that indicates that this event was generated while redoing.
|
|
2984
|
+
*/
|
|
2985
|
+
readonly isRedoing: boolean;
|
|
2986
|
+
/**
|
|
2987
|
+
* Flag that indicates that all decorations were lost with this edit.
|
|
2988
|
+
* The model has been reset to a new value.
|
|
2989
|
+
*/
|
|
2990
|
+
readonly isFlush: boolean;
|
|
2991
|
+
/**
|
|
2992
|
+
* Flag that indicates that this event describes an eol change.
|
|
2993
|
+
*/
|
|
2994
|
+
readonly isEolChange: boolean;
|
|
2995
|
+
/**
|
|
2996
|
+
* The sum of these lengths equals changes.length.
|
|
2997
|
+
* The length of this array must equal the length of detailedReasons.
|
|
2998
|
+
*/
|
|
2999
|
+
readonly detailedReasonsChangeLengths: number[];
|
|
2914
3000
|
}
|
|
2915
3001
|
|
|
2916
|
-
|
|
2917
|
-
* An event describing a change in the text of a model.
|
|
2918
|
-
*/
|
|
2919
|
-
export interface IModelContentChangedEvent {
|
|
3002
|
+
export interface ISerializedModelContentChangedEvent {
|
|
2920
3003
|
/**
|
|
2921
3004
|
* The changes are ordered from the end of the document to the beginning, so they should be safe to apply in sequence.
|
|
2922
3005
|
*/
|
|
@@ -2965,6 +3048,25 @@ export namespace editor {
|
|
|
2965
3048
|
readonly trimAutoWhitespace: boolean;
|
|
2966
3049
|
}
|
|
2967
3050
|
|
|
3051
|
+
export interface IModelContentChange {
|
|
3052
|
+
/**
|
|
3053
|
+
* The old range that got replaced.
|
|
3054
|
+
*/
|
|
3055
|
+
readonly range: IRange;
|
|
3056
|
+
/**
|
|
3057
|
+
* The offset of the range that got replaced.
|
|
3058
|
+
*/
|
|
3059
|
+
readonly rangeOffset: number;
|
|
3060
|
+
/**
|
|
3061
|
+
* The length of the range that got replaced.
|
|
3062
|
+
*/
|
|
3063
|
+
readonly rangeLength: number;
|
|
3064
|
+
/**
|
|
3065
|
+
* The new text for the range.
|
|
3066
|
+
*/
|
|
3067
|
+
readonly text: string;
|
|
3068
|
+
}
|
|
3069
|
+
|
|
2968
3070
|
/**
|
|
2969
3071
|
* Describes the reason the cursor has changed its position.
|
|
2970
3072
|
*/
|
|
@@ -3098,6 +3200,18 @@ export namespace editor {
|
|
|
3098
3200
|
* This editor is used inside a diff editor.
|
|
3099
3201
|
*/
|
|
3100
3202
|
inDiffEditor?: boolean;
|
|
3203
|
+
/**
|
|
3204
|
+
* This editor is allowed to use variable line heights.
|
|
3205
|
+
*/
|
|
3206
|
+
allowVariableLineHeights?: boolean;
|
|
3207
|
+
/**
|
|
3208
|
+
* This editor is allowed to use variable font-sizes and font-families
|
|
3209
|
+
*/
|
|
3210
|
+
allowVariableFonts?: boolean;
|
|
3211
|
+
/**
|
|
3212
|
+
* This editor is allowed to use variable font-sizes and font-families in accessibility mode
|
|
3213
|
+
*/
|
|
3214
|
+
allowVariableFontsInAccessibilityMode?: boolean;
|
|
3101
3215
|
/**
|
|
3102
3216
|
* The aria label for the editor's textarea (when it is focused).
|
|
3103
3217
|
*/
|
|
@@ -3251,6 +3365,11 @@ export namespace editor {
|
|
|
3251
3365
|
* Defaults to `false`.
|
|
3252
3366
|
*/
|
|
3253
3367
|
fixedOverflowWidgets?: boolean;
|
|
3368
|
+
/**
|
|
3369
|
+
* Allow content widgets and overflow widgets to overflow the editor viewport.
|
|
3370
|
+
* Defaults to `true`.
|
|
3371
|
+
*/
|
|
3372
|
+
allowOverflow?: boolean;
|
|
3254
3373
|
/**
|
|
3255
3374
|
* The number of vertical lanes the overview ruler should render.
|
|
3256
3375
|
* Defaults to 3.
|
|
@@ -3282,14 +3401,27 @@ export namespace editor {
|
|
|
3282
3401
|
*/
|
|
3283
3402
|
cursorSmoothCaretAnimation?: 'off' | 'explicit' | 'on';
|
|
3284
3403
|
/**
|
|
3285
|
-
* Control the cursor style
|
|
3404
|
+
* Control the cursor style in insert mode.
|
|
3286
3405
|
* Defaults to 'line'.
|
|
3287
3406
|
*/
|
|
3288
3407
|
cursorStyle?: 'line' | 'block' | 'underline' | 'line-thin' | 'block-outline' | 'underline-thin';
|
|
3408
|
+
/**
|
|
3409
|
+
* Control the cursor style in overtype mode.
|
|
3410
|
+
* Defaults to 'block'.
|
|
3411
|
+
*/
|
|
3412
|
+
overtypeCursorStyle?: 'line' | 'block' | 'underline' | 'line-thin' | 'block-outline' | 'underline-thin';
|
|
3413
|
+
/**
|
|
3414
|
+
* Controls whether paste in overtype mode should overwrite or insert.
|
|
3415
|
+
*/
|
|
3416
|
+
overtypeOnPaste?: boolean;
|
|
3289
3417
|
/**
|
|
3290
3418
|
* Control the width of the cursor when cursorStyle is set to 'line'
|
|
3291
3419
|
*/
|
|
3292
3420
|
cursorWidth?: number;
|
|
3421
|
+
/**
|
|
3422
|
+
* Control the height of the cursor when cursorStyle is set to 'line'
|
|
3423
|
+
*/
|
|
3424
|
+
cursorHeight?: number;
|
|
3293
3425
|
/**
|
|
3294
3426
|
* Enable font ligatures.
|
|
3295
3427
|
* Defaults to false.
|
|
@@ -3303,7 +3435,7 @@ export namespace editor {
|
|
|
3303
3435
|
/**
|
|
3304
3436
|
* Controls whether to use default color decorations or not using the default document color provider
|
|
3305
3437
|
*/
|
|
3306
|
-
defaultColorDecorators?:
|
|
3438
|
+
defaultColorDecorators?: 'auto' | 'always' | 'never';
|
|
3307
3439
|
/**
|
|
3308
3440
|
* Disable the use of `transform: translate3d(0px, 0px, 0px)` for the editor margin and lines layers.
|
|
3309
3441
|
* The usage of `transform: translate3d(0px, 0px, 0px)` acts as a hint for browsers to create an extra layer.
|
|
@@ -3325,6 +3457,10 @@ export namespace editor {
|
|
|
3325
3457
|
* Defaults to true.
|
|
3326
3458
|
*/
|
|
3327
3459
|
scrollBeyondLastLine?: boolean;
|
|
3460
|
+
/**
|
|
3461
|
+
* Scroll editor on middle click
|
|
3462
|
+
*/
|
|
3463
|
+
scrollOnMiddleClick?: boolean;
|
|
3328
3464
|
/**
|
|
3329
3465
|
* Enable that scrolling can go beyond the last column by a number of columns.
|
|
3330
3466
|
* Defaults to 5.
|
|
@@ -3376,6 +3512,11 @@ export namespace editor {
|
|
|
3376
3512
|
* Defaults to 'simple'.
|
|
3377
3513
|
*/
|
|
3378
3514
|
wrappingStrategy?: 'simple' | 'advanced';
|
|
3515
|
+
/**
|
|
3516
|
+
* Create a softwrap on every quoted "\n" literal.
|
|
3517
|
+
* Defaults to false.
|
|
3518
|
+
*/
|
|
3519
|
+
wrapOnEscapedLineFeeds?: boolean;
|
|
3379
3520
|
/**
|
|
3380
3521
|
* Configure word wrapping characters. A break will be introduced before these characters.
|
|
3381
3522
|
*/
|
|
@@ -3441,6 +3582,10 @@ export namespace editor {
|
|
|
3441
3582
|
* Defaults to true.
|
|
3442
3583
|
*/
|
|
3443
3584
|
scrollPredominantAxis?: boolean;
|
|
3585
|
+
/**
|
|
3586
|
+
* Make scrolling inertial - mostly useful with touchpad on linux.
|
|
3587
|
+
*/
|
|
3588
|
+
inertialScroll?: boolean;
|
|
3444
3589
|
/**
|
|
3445
3590
|
* Enable that the selection with the mouse and keys is doing column selection.
|
|
3446
3591
|
* Defaults to false.
|
|
@@ -3479,7 +3624,6 @@ export namespace editor {
|
|
|
3479
3624
|
*/
|
|
3480
3625
|
suggest?: ISuggestOptions;
|
|
3481
3626
|
inlineSuggest?: IInlineSuggestOptions;
|
|
3482
|
-
experimentalInlineEdit?: IInlineEditOptions;
|
|
3483
3627
|
/**
|
|
3484
3628
|
* Smart select options.
|
|
3485
3629
|
*/
|
|
@@ -3539,6 +3683,14 @@ export namespace editor {
|
|
|
3539
3683
|
* Defaults to advanced.
|
|
3540
3684
|
*/
|
|
3541
3685
|
autoIndent?: 'none' | 'keep' | 'brackets' | 'advanced' | 'full';
|
|
3686
|
+
/**
|
|
3687
|
+
* Boolean which controls whether to autoindent on paste
|
|
3688
|
+
*/
|
|
3689
|
+
autoIndentOnPaste?: boolean;
|
|
3690
|
+
/**
|
|
3691
|
+
* Boolean which controls whether to autoindent on paste within a string when autoIndentOnPaste is enabled.
|
|
3692
|
+
*/
|
|
3693
|
+
autoIndentOnPasteWithinString?: boolean;
|
|
3542
3694
|
/**
|
|
3543
3695
|
* Emulate selection behaviour of tab characters when using spaces for indentation.
|
|
3544
3696
|
* This means selection will stick to tab stops.
|
|
@@ -3609,6 +3761,16 @@ export namespace editor {
|
|
|
3609
3761
|
* Defaults to true.
|
|
3610
3762
|
*/
|
|
3611
3763
|
selectionHighlight?: boolean;
|
|
3764
|
+
/**
|
|
3765
|
+
* Enable selection highlight for multiline selections.
|
|
3766
|
+
* Defaults to false.
|
|
3767
|
+
*/
|
|
3768
|
+
selectionHighlightMultiline?: boolean;
|
|
3769
|
+
/**
|
|
3770
|
+
* Maximum length (in characters) for selection highlights.
|
|
3771
|
+
* Set to 0 to have an unlimited length.
|
|
3772
|
+
*/
|
|
3773
|
+
selectionHighlightMaxLength?: number;
|
|
3612
3774
|
/**
|
|
3613
3775
|
* Enable semantic occurrences highlight.
|
|
3614
3776
|
* Defaults to 'singleFile'.
|
|
@@ -3617,6 +3779,13 @@ export namespace editor {
|
|
|
3617
3779
|
* 'multiFile' triggers occurrence highlighting across valid open documents
|
|
3618
3780
|
*/
|
|
3619
3781
|
occurrencesHighlight?: 'off' | 'singleFile' | 'multiFile';
|
|
3782
|
+
/**
|
|
3783
|
+
* Controls delay for occurrences highlighting
|
|
3784
|
+
* Defaults to 250.
|
|
3785
|
+
* Minimum value is 0
|
|
3786
|
+
* Maximum value is 2000
|
|
3787
|
+
*/
|
|
3788
|
+
occurrencesHighlightDelay?: number;
|
|
3620
3789
|
/**
|
|
3621
3790
|
* Show code lens
|
|
3622
3791
|
* Defaults to true.
|
|
@@ -3678,6 +3847,11 @@ export namespace editor {
|
|
|
3678
3847
|
* Defaults to 'always'.
|
|
3679
3848
|
*/
|
|
3680
3849
|
matchBrackets?: 'never' | 'near' | 'always';
|
|
3850
|
+
/**
|
|
3851
|
+
* Enable experimental rendering using WebGPU.
|
|
3852
|
+
* Defaults to 'off'.
|
|
3853
|
+
*/
|
|
3854
|
+
experimentalGpuAcceleration?: 'on' | 'off';
|
|
3681
3855
|
/**
|
|
3682
3856
|
* Enable experimental whitespace rendering.
|
|
3683
3857
|
* Defaults to 'svg'.
|
|
@@ -3707,6 +3881,11 @@ export namespace editor {
|
|
|
3707
3881
|
* Inserting and deleting whitespace follows tab stops.
|
|
3708
3882
|
*/
|
|
3709
3883
|
useTabStops?: boolean;
|
|
3884
|
+
/**
|
|
3885
|
+
* Controls whether the editor should automatically remove indentation whitespace when joining lines with Delete.
|
|
3886
|
+
* Defaults to false.
|
|
3887
|
+
*/
|
|
3888
|
+
trimWhitespaceOnDelete?: boolean;
|
|
3710
3889
|
/**
|
|
3711
3890
|
* The font family
|
|
3712
3891
|
*/
|
|
@@ -3781,6 +3960,14 @@ export namespace editor {
|
|
|
3781
3960
|
* When enabled, this shows a preview of the drop location and triggers an `onDropIntoEditor` event.
|
|
3782
3961
|
*/
|
|
3783
3962
|
dropIntoEditor?: IDropIntoEditorOptions;
|
|
3963
|
+
/**
|
|
3964
|
+
* Sets whether the new experimental edit context should be used instead of the text area.
|
|
3965
|
+
*/
|
|
3966
|
+
editContext?: boolean;
|
|
3967
|
+
/**
|
|
3968
|
+
* Controls whether to render rich HTML screen reader content when the EditContext is enabled
|
|
3969
|
+
*/
|
|
3970
|
+
renderRichScreenReaderContent?: boolean;
|
|
3784
3971
|
/**
|
|
3785
3972
|
* Controls support for changing how content is pasted into the editor.
|
|
3786
3973
|
*/
|
|
@@ -4031,6 +4218,10 @@ export namespace editor {
|
|
|
4031
4218
|
* Controls whether the cursor should move to find matches while typing.
|
|
4032
4219
|
*/
|
|
4033
4220
|
cursorMoveOnType?: boolean;
|
|
4221
|
+
/**
|
|
4222
|
+
* Controls whether the find widget should search as you type.
|
|
4223
|
+
*/
|
|
4224
|
+
findOnType?: boolean;
|
|
4034
4225
|
/**
|
|
4035
4226
|
* Controls if we seed search string in the Find Widget with editor selection.
|
|
4036
4227
|
*/
|
|
@@ -4279,6 +4470,11 @@ export namespace editor {
|
|
|
4279
4470
|
* Defaults to false.
|
|
4280
4471
|
*/
|
|
4281
4472
|
padding?: boolean;
|
|
4473
|
+
/**
|
|
4474
|
+
* Maximum length for inlay hints per line
|
|
4475
|
+
* Set to 0 to have an unlimited length.
|
|
4476
|
+
*/
|
|
4477
|
+
maximumLength?: number;
|
|
4282
4478
|
}
|
|
4283
4479
|
|
|
4284
4480
|
/**
|
|
@@ -4293,7 +4489,7 @@ export namespace editor {
|
|
|
4293
4489
|
/**
|
|
4294
4490
|
* Control the rendering of minimap.
|
|
4295
4491
|
*/
|
|
4296
|
-
autohide?:
|
|
4492
|
+
autohide?: 'none' | 'mouseover' | 'scroll';
|
|
4297
4493
|
/**
|
|
4298
4494
|
* Control the side of the minimap in editor.
|
|
4299
4495
|
* Defaults to 'right'.
|
|
@@ -4331,6 +4527,17 @@ export namespace editor {
|
|
|
4331
4527
|
* Whether to show MARK: comments as section headers. Defaults to true.
|
|
4332
4528
|
*/
|
|
4333
4529
|
showMarkSectionHeaders?: boolean;
|
|
4530
|
+
/**
|
|
4531
|
+
* When specified, is used to create a custom section header parser regexp.
|
|
4532
|
+
* Must contain a match group named 'label' (written as (?<label>.+)) that encapsulates the section header.
|
|
4533
|
+
* Optionally can include another match group named 'separator'.
|
|
4534
|
+
* To match multi-line headers like:
|
|
4535
|
+
* // ==========
|
|
4536
|
+
* // My Section
|
|
4537
|
+
* // ==========
|
|
4538
|
+
* Use a pattern like: ^={3,}\n^\/\/ *(?<label>[^\n]*?)\n^={3,}$
|
|
4539
|
+
*/
|
|
4540
|
+
markSectionHeaderRegex?: string;
|
|
4334
4541
|
/**
|
|
4335
4542
|
* Font size of section headers. Defaults to 9.
|
|
4336
4543
|
*/
|
|
@@ -4459,12 +4666,12 @@ export namespace editor {
|
|
|
4459
4666
|
alwaysConsumeMouseWheel?: boolean;
|
|
4460
4667
|
/**
|
|
4461
4668
|
* Height in pixels for the horizontal scrollbar.
|
|
4462
|
-
* Defaults to
|
|
4669
|
+
* Defaults to 12 (px).
|
|
4463
4670
|
*/
|
|
4464
4671
|
horizontalScrollbarSize?: number;
|
|
4465
4672
|
/**
|
|
4466
4673
|
* Width in pixels for the vertical scrollbar.
|
|
4467
|
-
* Defaults to
|
|
4674
|
+
* Defaults to 14 (px).
|
|
4468
4675
|
*/
|
|
4469
4676
|
verticalScrollbarSize?: number;
|
|
4470
4677
|
/**
|
|
@@ -4558,7 +4765,9 @@ export namespace editor {
|
|
|
4558
4765
|
*/
|
|
4559
4766
|
mode?: 'prefix' | 'subword' | 'subwordSmart';
|
|
4560
4767
|
showToolbar?: 'always' | 'onHover' | 'never';
|
|
4768
|
+
syntaxHighlightingEnabled?: boolean;
|
|
4561
4769
|
suppressSuggestions?: boolean;
|
|
4770
|
+
minShowDelay?: number;
|
|
4562
4771
|
/**
|
|
4563
4772
|
* Does not clear active inline suggestions when the editor loses focus.
|
|
4564
4773
|
*/
|
|
@@ -4569,21 +4778,9 @@ export namespace editor {
|
|
|
4569
4778
|
fontFamily?: string | 'default';
|
|
4570
4779
|
}
|
|
4571
4780
|
|
|
4572
|
-
|
|
4573
|
-
|
|
4574
|
-
|
|
4575
|
-
*/
|
|
4576
|
-
enabled?: boolean;
|
|
4577
|
-
showToolbar?: 'always' | 'onHover' | 'never';
|
|
4578
|
-
/**
|
|
4579
|
-
* Font family for inline suggestions.
|
|
4580
|
-
*/
|
|
4581
|
-
fontFamily?: string | 'default';
|
|
4582
|
-
/**
|
|
4583
|
-
* Does not clear active inline suggestions when the editor loses focus.
|
|
4584
|
-
*/
|
|
4585
|
-
keepOnBlur?: boolean;
|
|
4586
|
-
}
|
|
4781
|
+
type RequiredRecursive<T> = {
|
|
4782
|
+
[P in keyof T]-?: T[P] extends object | undefined ? RequiredRecursive<T[P]> : T[P];
|
|
4783
|
+
};
|
|
4587
4784
|
|
|
4588
4785
|
export interface IBracketPairColorizationOptions {
|
|
4589
4786
|
/**
|
|
@@ -4861,153 +5058,174 @@ export namespace editor {
|
|
|
4861
5058
|
acceptSuggestionOnEnter = 1,
|
|
4862
5059
|
accessibilitySupport = 2,
|
|
4863
5060
|
accessibilityPageSize = 3,
|
|
4864
|
-
|
|
4865
|
-
|
|
4866
|
-
|
|
4867
|
-
|
|
4868
|
-
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
-
|
|
4872
|
-
|
|
4873
|
-
|
|
4874
|
-
|
|
4875
|
-
|
|
4876
|
-
|
|
4877
|
-
|
|
4878
|
-
|
|
4879
|
-
|
|
4880
|
-
|
|
4881
|
-
|
|
4882
|
-
|
|
4883
|
-
|
|
4884
|
-
|
|
4885
|
-
|
|
4886
|
-
|
|
4887
|
-
|
|
4888
|
-
|
|
4889
|
-
|
|
4890
|
-
|
|
4891
|
-
|
|
4892
|
-
|
|
4893
|
-
|
|
4894
|
-
|
|
4895
|
-
|
|
4896
|
-
|
|
4897
|
-
|
|
4898
|
-
|
|
4899
|
-
|
|
4900
|
-
|
|
4901
|
-
|
|
4902
|
-
|
|
4903
|
-
|
|
4904
|
-
|
|
4905
|
-
|
|
4906
|
-
|
|
4907
|
-
|
|
4908
|
-
|
|
4909
|
-
|
|
4910
|
-
|
|
4911
|
-
|
|
4912
|
-
|
|
4913
|
-
|
|
4914
|
-
|
|
4915
|
-
|
|
4916
|
-
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
|
|
4920
|
-
|
|
4921
|
-
|
|
4922
|
-
|
|
4923
|
-
|
|
4924
|
-
|
|
4925
|
-
|
|
4926
|
-
|
|
4927
|
-
|
|
4928
|
-
|
|
4929
|
-
|
|
4930
|
-
|
|
4931
|
-
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
|
|
4944
|
-
|
|
4945
|
-
|
|
4946
|
-
|
|
4947
|
-
|
|
4948
|
-
|
|
4949
|
-
|
|
4950
|
-
|
|
4951
|
-
|
|
4952
|
-
|
|
4953
|
-
|
|
4954
|
-
|
|
4955
|
-
|
|
4956
|
-
|
|
4957
|
-
|
|
4958
|
-
|
|
4959
|
-
|
|
4960
|
-
|
|
4961
|
-
|
|
4962
|
-
|
|
4963
|
-
|
|
4964
|
-
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
|
|
4972
|
-
|
|
4973
|
-
|
|
4974
|
-
|
|
4975
|
-
|
|
4976
|
-
|
|
4977
|
-
|
|
4978
|
-
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
|
|
4984
|
-
|
|
4985
|
-
|
|
4986
|
-
|
|
4987
|
-
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
|
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
5001
|
-
|
|
5002
|
-
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
|
|
5006
|
-
|
|
5007
|
-
|
|
5008
|
-
|
|
5009
|
-
|
|
5010
|
-
|
|
5061
|
+
allowOverflow = 4,
|
|
5062
|
+
allowVariableLineHeights = 5,
|
|
5063
|
+
allowVariableFonts = 6,
|
|
5064
|
+
allowVariableFontsInAccessibilityMode = 7,
|
|
5065
|
+
ariaLabel = 8,
|
|
5066
|
+
ariaRequired = 9,
|
|
5067
|
+
autoClosingBrackets = 10,
|
|
5068
|
+
autoClosingComments = 11,
|
|
5069
|
+
screenReaderAnnounceInlineSuggestion = 12,
|
|
5070
|
+
autoClosingDelete = 13,
|
|
5071
|
+
autoClosingOvertype = 14,
|
|
5072
|
+
autoClosingQuotes = 15,
|
|
5073
|
+
autoIndent = 16,
|
|
5074
|
+
autoIndentOnPaste = 17,
|
|
5075
|
+
autoIndentOnPasteWithinString = 18,
|
|
5076
|
+
automaticLayout = 19,
|
|
5077
|
+
autoSurround = 20,
|
|
5078
|
+
bracketPairColorization = 21,
|
|
5079
|
+
guides = 22,
|
|
5080
|
+
codeLens = 23,
|
|
5081
|
+
codeLensFontFamily = 24,
|
|
5082
|
+
codeLensFontSize = 25,
|
|
5083
|
+
colorDecorators = 26,
|
|
5084
|
+
colorDecoratorsLimit = 27,
|
|
5085
|
+
columnSelection = 28,
|
|
5086
|
+
comments = 29,
|
|
5087
|
+
contextmenu = 30,
|
|
5088
|
+
copyWithSyntaxHighlighting = 31,
|
|
5089
|
+
cursorBlinking = 32,
|
|
5090
|
+
cursorSmoothCaretAnimation = 33,
|
|
5091
|
+
cursorStyle = 34,
|
|
5092
|
+
cursorSurroundingLines = 35,
|
|
5093
|
+
cursorSurroundingLinesStyle = 36,
|
|
5094
|
+
cursorWidth = 37,
|
|
5095
|
+
cursorHeight = 38,
|
|
5096
|
+
disableLayerHinting = 39,
|
|
5097
|
+
disableMonospaceOptimizations = 40,
|
|
5098
|
+
domReadOnly = 41,
|
|
5099
|
+
dragAndDrop = 42,
|
|
5100
|
+
dropIntoEditor = 43,
|
|
5101
|
+
editContext = 44,
|
|
5102
|
+
emptySelectionClipboard = 45,
|
|
5103
|
+
experimentalGpuAcceleration = 46,
|
|
5104
|
+
experimentalWhitespaceRendering = 47,
|
|
5105
|
+
extraEditorClassName = 48,
|
|
5106
|
+
fastScrollSensitivity = 49,
|
|
5107
|
+
find = 50,
|
|
5108
|
+
fixedOverflowWidgets = 51,
|
|
5109
|
+
folding = 52,
|
|
5110
|
+
foldingStrategy = 53,
|
|
5111
|
+
foldingHighlight = 54,
|
|
5112
|
+
foldingImportsByDefault = 55,
|
|
5113
|
+
foldingMaximumRegions = 56,
|
|
5114
|
+
unfoldOnClickAfterEndOfLine = 57,
|
|
5115
|
+
fontFamily = 58,
|
|
5116
|
+
fontInfo = 59,
|
|
5117
|
+
fontLigatures = 60,
|
|
5118
|
+
fontSize = 61,
|
|
5119
|
+
fontWeight = 62,
|
|
5120
|
+
fontVariations = 63,
|
|
5121
|
+
formatOnPaste = 64,
|
|
5122
|
+
formatOnType = 65,
|
|
5123
|
+
glyphMargin = 66,
|
|
5124
|
+
gotoLocation = 67,
|
|
5125
|
+
hideCursorInOverviewRuler = 68,
|
|
5126
|
+
hover = 69,
|
|
5127
|
+
inDiffEditor = 70,
|
|
5128
|
+
inlineSuggest = 71,
|
|
5129
|
+
letterSpacing = 72,
|
|
5130
|
+
lightbulb = 73,
|
|
5131
|
+
lineDecorationsWidth = 74,
|
|
5132
|
+
lineHeight = 75,
|
|
5133
|
+
lineNumbers = 76,
|
|
5134
|
+
lineNumbersMinChars = 77,
|
|
5135
|
+
linkedEditing = 78,
|
|
5136
|
+
links = 79,
|
|
5137
|
+
matchBrackets = 80,
|
|
5138
|
+
minimap = 81,
|
|
5139
|
+
mouseStyle = 82,
|
|
5140
|
+
mouseWheelScrollSensitivity = 83,
|
|
5141
|
+
mouseWheelZoom = 84,
|
|
5142
|
+
multiCursorMergeOverlapping = 85,
|
|
5143
|
+
multiCursorModifier = 86,
|
|
5144
|
+
multiCursorPaste = 87,
|
|
5145
|
+
multiCursorLimit = 88,
|
|
5146
|
+
occurrencesHighlight = 89,
|
|
5147
|
+
occurrencesHighlightDelay = 90,
|
|
5148
|
+
overtypeCursorStyle = 91,
|
|
5149
|
+
overtypeOnPaste = 92,
|
|
5150
|
+
overviewRulerBorder = 93,
|
|
5151
|
+
overviewRulerLanes = 94,
|
|
5152
|
+
padding = 95,
|
|
5153
|
+
pasteAs = 96,
|
|
5154
|
+
parameterHints = 97,
|
|
5155
|
+
peekWidgetDefaultFocus = 98,
|
|
5156
|
+
placeholder = 99,
|
|
5157
|
+
definitionLinkOpensInPeek = 100,
|
|
5158
|
+
quickSuggestions = 101,
|
|
5159
|
+
quickSuggestionsDelay = 102,
|
|
5160
|
+
readOnly = 103,
|
|
5161
|
+
readOnlyMessage = 104,
|
|
5162
|
+
renameOnType = 105,
|
|
5163
|
+
renderRichScreenReaderContent = 106,
|
|
5164
|
+
renderControlCharacters = 107,
|
|
5165
|
+
renderFinalNewline = 108,
|
|
5166
|
+
renderLineHighlight = 109,
|
|
5167
|
+
renderLineHighlightOnlyWhenFocus = 110,
|
|
5168
|
+
renderValidationDecorations = 111,
|
|
5169
|
+
renderWhitespace = 112,
|
|
5170
|
+
revealHorizontalRightPadding = 113,
|
|
5171
|
+
roundedSelection = 114,
|
|
5172
|
+
rulers = 115,
|
|
5173
|
+
scrollbar = 116,
|
|
5174
|
+
scrollBeyondLastColumn = 117,
|
|
5175
|
+
scrollBeyondLastLine = 118,
|
|
5176
|
+
scrollPredominantAxis = 119,
|
|
5177
|
+
selectionClipboard = 120,
|
|
5178
|
+
selectionHighlight = 121,
|
|
5179
|
+
selectionHighlightMaxLength = 122,
|
|
5180
|
+
selectionHighlightMultiline = 123,
|
|
5181
|
+
selectOnLineNumbers = 124,
|
|
5182
|
+
showFoldingControls = 125,
|
|
5183
|
+
showUnused = 126,
|
|
5184
|
+
snippetSuggestions = 127,
|
|
5185
|
+
smartSelect = 128,
|
|
5186
|
+
smoothScrolling = 129,
|
|
5187
|
+
stickyScroll = 130,
|
|
5188
|
+
stickyTabStops = 131,
|
|
5189
|
+
stopRenderingLineAfter = 132,
|
|
5190
|
+
suggest = 133,
|
|
5191
|
+
suggestFontSize = 134,
|
|
5192
|
+
suggestLineHeight = 135,
|
|
5193
|
+
suggestOnTriggerCharacters = 136,
|
|
5194
|
+
suggestSelection = 137,
|
|
5195
|
+
tabCompletion = 138,
|
|
5196
|
+
tabIndex = 139,
|
|
5197
|
+
trimWhitespaceOnDelete = 140,
|
|
5198
|
+
unicodeHighlighting = 141,
|
|
5199
|
+
unusualLineTerminators = 142,
|
|
5200
|
+
useShadowDOM = 143,
|
|
5201
|
+
useTabStops = 144,
|
|
5202
|
+
wordBreak = 145,
|
|
5203
|
+
wordSegmenterLocales = 146,
|
|
5204
|
+
wordSeparators = 147,
|
|
5205
|
+
wordWrap = 148,
|
|
5206
|
+
wordWrapBreakAfterCharacters = 149,
|
|
5207
|
+
wordWrapBreakBeforeCharacters = 150,
|
|
5208
|
+
wordWrapColumn = 151,
|
|
5209
|
+
wordWrapOverride1 = 152,
|
|
5210
|
+
wordWrapOverride2 = 153,
|
|
5211
|
+
wrappingIndent = 154,
|
|
5212
|
+
wrappingStrategy = 155,
|
|
5213
|
+
showDeprecated = 156,
|
|
5214
|
+
inertialScroll = 157,
|
|
5215
|
+
inlayHints = 158,
|
|
5216
|
+
wrapOnEscapedLineFeeds = 159,
|
|
5217
|
+
effectiveCursorStyle = 160,
|
|
5218
|
+
editorClassName = 161,
|
|
5219
|
+
pixelRatio = 162,
|
|
5220
|
+
tabFocusMode = 163,
|
|
5221
|
+
layoutInfo = 164,
|
|
5222
|
+
wrappingInfo = 165,
|
|
5223
|
+
defaultColorDecorators = 166,
|
|
5224
|
+
colorDecoratorsActivatedOn = 167,
|
|
5225
|
+
inlineCompletionsAccessibilityVerbose = 168,
|
|
5226
|
+
effectiveEditContext = 169,
|
|
5227
|
+
scrollOnMiddleClick = 170,
|
|
5228
|
+
effectiveAllowVariableFonts = 171
|
|
5011
5229
|
}
|
|
5012
5230
|
|
|
5013
5231
|
export const EditorOptions: {
|
|
@@ -5015,17 +5233,23 @@ export namespace editor {
|
|
|
5015
5233
|
acceptSuggestionOnEnter: IEditorOption<EditorOption.acceptSuggestionOnEnter, 'on' | 'off' | 'smart'>;
|
|
5016
5234
|
accessibilitySupport: IEditorOption<EditorOption.accessibilitySupport, AccessibilitySupport>;
|
|
5017
5235
|
accessibilityPageSize: IEditorOption<EditorOption.accessibilityPageSize, number>;
|
|
5236
|
+
allowOverflow: IEditorOption<EditorOption.allowOverflow, boolean>;
|
|
5237
|
+
allowVariableLineHeights: IEditorOption<EditorOption.allowVariableLineHeights, boolean>;
|
|
5238
|
+
allowVariableFonts: IEditorOption<EditorOption.allowVariableFonts, boolean>;
|
|
5239
|
+
allowVariableFontsInAccessibilityMode: IEditorOption<EditorOption.allowVariableFontsInAccessibilityMode, boolean>;
|
|
5018
5240
|
ariaLabel: IEditorOption<EditorOption.ariaLabel, string>;
|
|
5019
5241
|
ariaRequired: IEditorOption<EditorOption.ariaRequired, boolean>;
|
|
5020
5242
|
screenReaderAnnounceInlineSuggestion: IEditorOption<EditorOption.screenReaderAnnounceInlineSuggestion, boolean>;
|
|
5021
|
-
autoClosingBrackets: IEditorOption<EditorOption.autoClosingBrackets, 'always' | '
|
|
5022
|
-
autoClosingComments: IEditorOption<EditorOption.autoClosingComments, 'always' | '
|
|
5243
|
+
autoClosingBrackets: IEditorOption<EditorOption.autoClosingBrackets, 'always' | 'never' | 'languageDefined' | 'beforeWhitespace'>;
|
|
5244
|
+
autoClosingComments: IEditorOption<EditorOption.autoClosingComments, 'always' | 'never' | 'languageDefined' | 'beforeWhitespace'>;
|
|
5023
5245
|
autoClosingDelete: IEditorOption<EditorOption.autoClosingDelete, 'auto' | 'always' | 'never'>;
|
|
5024
5246
|
autoClosingOvertype: IEditorOption<EditorOption.autoClosingOvertype, 'auto' | 'always' | 'never'>;
|
|
5025
|
-
autoClosingQuotes: IEditorOption<EditorOption.autoClosingQuotes, 'always' | '
|
|
5247
|
+
autoClosingQuotes: IEditorOption<EditorOption.autoClosingQuotes, 'always' | 'never' | 'languageDefined' | 'beforeWhitespace'>;
|
|
5026
5248
|
autoIndent: IEditorOption<EditorOption.autoIndent, EditorAutoIndentStrategy>;
|
|
5249
|
+
autoIndentOnPaste: IEditorOption<EditorOption.autoIndentOnPaste, boolean>;
|
|
5250
|
+
autoIndentOnPasteWithinString: IEditorOption<EditorOption.autoIndentOnPasteWithinString, boolean>;
|
|
5027
5251
|
automaticLayout: IEditorOption<EditorOption.automaticLayout, boolean>;
|
|
5028
|
-
autoSurround: IEditorOption<EditorOption.autoSurround, '
|
|
5252
|
+
autoSurround: IEditorOption<EditorOption.autoSurround, 'never' | 'languageDefined' | 'quotes' | 'brackets'>;
|
|
5029
5253
|
bracketPairColorization: IEditorOption<EditorOption.bracketPairColorization, Readonly<Required<IBracketPairColorizationOptions>>>;
|
|
5030
5254
|
bracketPairGuides: IEditorOption<EditorOption.guides, Readonly<Required<IGuidesOptions>>>;
|
|
5031
5255
|
stickyTabStops: IEditorOption<EditorOption.stickyTabStops, boolean>;
|
|
@@ -5042,16 +5266,21 @@ export namespace editor {
|
|
|
5042
5266
|
cursorBlinking: IEditorOption<EditorOption.cursorBlinking, TextEditorCursorBlinkingStyle>;
|
|
5043
5267
|
cursorSmoothCaretAnimation: IEditorOption<EditorOption.cursorSmoothCaretAnimation, 'on' | 'off' | 'explicit'>;
|
|
5044
5268
|
cursorStyle: IEditorOption<EditorOption.cursorStyle, TextEditorCursorStyle>;
|
|
5269
|
+
overtypeCursorStyle: IEditorOption<EditorOption.overtypeCursorStyle, TextEditorCursorStyle>;
|
|
5045
5270
|
cursorSurroundingLines: IEditorOption<EditorOption.cursorSurroundingLines, number>;
|
|
5046
5271
|
cursorSurroundingLinesStyle: IEditorOption<EditorOption.cursorSurroundingLinesStyle, 'default' | 'all'>;
|
|
5047
5272
|
cursorWidth: IEditorOption<EditorOption.cursorWidth, number>;
|
|
5273
|
+
cursorHeight: IEditorOption<EditorOption.cursorHeight, number>;
|
|
5048
5274
|
disableLayerHinting: IEditorOption<EditorOption.disableLayerHinting, boolean>;
|
|
5049
5275
|
disableMonospaceOptimizations: IEditorOption<EditorOption.disableMonospaceOptimizations, boolean>;
|
|
5050
5276
|
domReadOnly: IEditorOption<EditorOption.domReadOnly, boolean>;
|
|
5051
5277
|
dragAndDrop: IEditorOption<EditorOption.dragAndDrop, boolean>;
|
|
5052
5278
|
emptySelectionClipboard: IEditorOption<EditorOption.emptySelectionClipboard, boolean>;
|
|
5053
5279
|
dropIntoEditor: IEditorOption<EditorOption.dropIntoEditor, Readonly<Required<IDropIntoEditorOptions>>>;
|
|
5280
|
+
editContext: IEditorOption<EditorOption.editContext, boolean>;
|
|
5281
|
+
renderRichScreenReaderContent: IEditorOption<EditorOption.renderRichScreenReaderContent, boolean>;
|
|
5054
5282
|
stickyScroll: IEditorOption<EditorOption.stickyScroll, Readonly<Required<IEditorStickyScrollOptions>>>;
|
|
5283
|
+
experimentalGpuAcceleration: IEditorOption<EditorOption.experimentalGpuAcceleration, 'on' | 'off'>;
|
|
5055
5284
|
experimentalWhitespaceRendering: IEditorOption<EditorOption.experimentalWhitespaceRendering, 'off' | 'svg' | 'font'>;
|
|
5056
5285
|
extraEditorClassName: IEditorOption<EditorOption.extraEditorClassName, string>;
|
|
5057
5286
|
fastScrollSensitivity: IEditorOption<EditorOption.fastScrollSensitivity, number>;
|
|
@@ -5076,6 +5305,7 @@ export namespace editor {
|
|
|
5076
5305
|
hideCursorInOverviewRuler: IEditorOption<EditorOption.hideCursorInOverviewRuler, boolean>;
|
|
5077
5306
|
hover: IEditorOption<EditorOption.hover, Readonly<Required<IEditorHoverOptions>>>;
|
|
5078
5307
|
inDiffEditor: IEditorOption<EditorOption.inDiffEditor, boolean>;
|
|
5308
|
+
inertialScroll: IEditorOption<EditorOption.inertialScroll, boolean>;
|
|
5079
5309
|
letterSpacing: IEditorOption<EditorOption.letterSpacing, number>;
|
|
5080
5310
|
lightbulb: IEditorOption<EditorOption.lightbulb, Readonly<Required<IEditorLightbulbOptions>>>;
|
|
5081
5311
|
lineDecorationsWidth: IEditorOption<EditorOption.lineDecorationsWidth, number>;
|
|
@@ -5094,6 +5324,8 @@ export namespace editor {
|
|
|
5094
5324
|
multiCursorPaste: IEditorOption<EditorOption.multiCursorPaste, 'spread' | 'full'>;
|
|
5095
5325
|
multiCursorLimit: IEditorOption<EditorOption.multiCursorLimit, number>;
|
|
5096
5326
|
occurrencesHighlight: IEditorOption<EditorOption.occurrencesHighlight, 'off' | 'singleFile' | 'multiFile'>;
|
|
5327
|
+
occurrencesHighlightDelay: IEditorOption<EditorOption.occurrencesHighlightDelay, number>;
|
|
5328
|
+
overtypeOnPaste: IEditorOption<EditorOption.overtypeOnPaste, boolean>;
|
|
5097
5329
|
overviewRulerBorder: IEditorOption<EditorOption.overviewRulerBorder, boolean>;
|
|
5098
5330
|
overviewRulerLanes: IEditorOption<EditorOption.overviewRulerLanes, number>;
|
|
5099
5331
|
padding: IEditorOption<EditorOption.padding, Readonly<Required<IEditorPaddingOptions>>>;
|
|
@@ -5119,9 +5351,12 @@ export namespace editor {
|
|
|
5119
5351
|
scrollbar: IEditorOption<EditorOption.scrollbar, InternalEditorScrollbarOptions>;
|
|
5120
5352
|
scrollBeyondLastColumn: IEditorOption<EditorOption.scrollBeyondLastColumn, number>;
|
|
5121
5353
|
scrollBeyondLastLine: IEditorOption<EditorOption.scrollBeyondLastLine, boolean>;
|
|
5354
|
+
scrollOnMiddleClick: IEditorOption<EditorOption.scrollOnMiddleClick, boolean>;
|
|
5122
5355
|
scrollPredominantAxis: IEditorOption<EditorOption.scrollPredominantAxis, boolean>;
|
|
5123
5356
|
selectionClipboard: IEditorOption<EditorOption.selectionClipboard, boolean>;
|
|
5124
5357
|
selectionHighlight: IEditorOption<EditorOption.selectionHighlight, boolean>;
|
|
5358
|
+
selectionHighlightMaxLength: IEditorOption<EditorOption.selectionHighlightMaxLength, number>;
|
|
5359
|
+
selectionHighlightMultiline: IEditorOption<EditorOption.selectionHighlightMultiline, boolean>;
|
|
5125
5360
|
selectOnLineNumbers: IEditorOption<EditorOption.selectOnLineNumbers, boolean>;
|
|
5126
5361
|
showFoldingControls: IEditorOption<EditorOption.showFoldingControls, 'always' | 'never' | 'mouseover'>;
|
|
5127
5362
|
showUnused: IEditorOption<EditorOption.showUnused, boolean>;
|
|
@@ -5132,8 +5367,7 @@ export namespace editor {
|
|
|
5132
5367
|
smoothScrolling: IEditorOption<EditorOption.smoothScrolling, boolean>;
|
|
5133
5368
|
stopRenderingLineAfter: IEditorOption<EditorOption.stopRenderingLineAfter, number>;
|
|
5134
5369
|
suggest: IEditorOption<EditorOption.suggest, Readonly<Required<ISuggestOptions>>>;
|
|
5135
|
-
inlineSuggest: IEditorOption<EditorOption.inlineSuggest, Readonly<
|
|
5136
|
-
inlineEdit: IEditorOption<EditorOption.inlineEdit, Readonly<Required<IInlineEditOptions>>>;
|
|
5370
|
+
inlineSuggest: IEditorOption<EditorOption.inlineSuggest, Readonly<RequiredRecursive<IInlineSuggestOptions>>>;
|
|
5137
5371
|
inlineCompletionsAccessibilityVerbose: IEditorOption<EditorOption.inlineCompletionsAccessibilityVerbose, boolean>;
|
|
5138
5372
|
suggestFontSize: IEditorOption<EditorOption.suggestFontSize, number>;
|
|
5139
5373
|
suggestLineHeight: IEditorOption<EditorOption.suggestLineHeight, number>;
|
|
@@ -5141,6 +5375,7 @@ export namespace editor {
|
|
|
5141
5375
|
suggestSelection: IEditorOption<EditorOption.suggestSelection, 'first' | 'recentlyUsed' | 'recentlyUsedByPrefix'>;
|
|
5142
5376
|
tabCompletion: IEditorOption<EditorOption.tabCompletion, 'on' | 'off' | 'onlySnippets'>;
|
|
5143
5377
|
tabIndex: IEditorOption<EditorOption.tabIndex, number>;
|
|
5378
|
+
trimWhitespaceOnDelete: IEditorOption<EditorOption.trimWhitespaceOnDelete, boolean>;
|
|
5144
5379
|
unicodeHighlight: IEditorOption<EditorOption.unicodeHighlighting, any>;
|
|
5145
5380
|
unusualLineTerminators: IEditorOption<EditorOption.unusualLineTerminators, 'off' | 'auto' | 'prompt'>;
|
|
5146
5381
|
useShadowDOM: IEditorOption<EditorOption.useShadowDOM, boolean>;
|
|
@@ -5154,14 +5389,18 @@ export namespace editor {
|
|
|
5154
5389
|
wordWrapColumn: IEditorOption<EditorOption.wordWrapColumn, number>;
|
|
5155
5390
|
wordWrapOverride1: IEditorOption<EditorOption.wordWrapOverride1, 'on' | 'off' | 'inherit'>;
|
|
5156
5391
|
wordWrapOverride2: IEditorOption<EditorOption.wordWrapOverride2, 'on' | 'off' | 'inherit'>;
|
|
5392
|
+
wrapOnEscapedLineFeeds: IEditorOption<EditorOption.wrapOnEscapedLineFeeds, boolean>;
|
|
5393
|
+
effectiveCursorStyle: IEditorOption<EditorOption.effectiveCursorStyle, TextEditorCursorStyle>;
|
|
5157
5394
|
editorClassName: IEditorOption<EditorOption.editorClassName, string>;
|
|
5158
|
-
defaultColorDecorators: IEditorOption<EditorOption.defaultColorDecorators,
|
|
5395
|
+
defaultColorDecorators: IEditorOption<EditorOption.defaultColorDecorators, 'auto' | 'always' | 'never'>;
|
|
5159
5396
|
pixelRatio: IEditorOption<EditorOption.pixelRatio, number>;
|
|
5160
5397
|
tabFocusMode: IEditorOption<EditorOption.tabFocusMode, boolean>;
|
|
5161
5398
|
layoutInfo: IEditorOption<EditorOption.layoutInfo, EditorLayoutInfo>;
|
|
5162
5399
|
wrappingInfo: IEditorOption<EditorOption.wrappingInfo, EditorWrappingInfo>;
|
|
5163
5400
|
wrappingIndent: IEditorOption<EditorOption.wrappingIndent, WrappingIndent>;
|
|
5164
5401
|
wrappingStrategy: IEditorOption<EditorOption.wrappingStrategy, 'simple' | 'advanced'>;
|
|
5402
|
+
effectiveEditContextEnabled: IEditorOption<EditorOption.effectiveEditContext, boolean>;
|
|
5403
|
+
effectiveAllowVariableFonts: IEditorOption<EditorOption.effectiveAllowVariableFonts, boolean>;
|
|
5165
5404
|
};
|
|
5166
5405
|
|
|
5167
5406
|
type EditorOptionsType = typeof EditorOptions;
|
|
@@ -5366,7 +5605,21 @@ export namespace editor {
|
|
|
5366
5605
|
* widget. Is being invoked with the selected position preference
|
|
5367
5606
|
* or `null` if not rendered.
|
|
5368
5607
|
*/
|
|
5369
|
-
afterRender?(position: ContentWidgetPositionPreference | null): void;
|
|
5608
|
+
afterRender?(position: ContentWidgetPositionPreference | null, coordinate: IContentWidgetRenderedCoordinate | null): void;
|
|
5609
|
+
}
|
|
5610
|
+
|
|
5611
|
+
/**
|
|
5612
|
+
* Coordinatees passed in {@link IContentWidget.afterRender}
|
|
5613
|
+
*/
|
|
5614
|
+
export interface IContentWidgetRenderedCoordinate {
|
|
5615
|
+
/**
|
|
5616
|
+
* Top position relative to the editor content.
|
|
5617
|
+
*/
|
|
5618
|
+
readonly top: number;
|
|
5619
|
+
/**
|
|
5620
|
+
* Left position relative to the editor content.
|
|
5621
|
+
*/
|
|
5622
|
+
readonly left: number;
|
|
5370
5623
|
}
|
|
5371
5624
|
|
|
5372
5625
|
/**
|
|
@@ -5776,6 +6029,10 @@ export namespace editor {
|
|
|
5776
6029
|
* @event
|
|
5777
6030
|
*/
|
|
5778
6031
|
readonly onDidBlurEditorWidget: IEvent<void>;
|
|
6032
|
+
/**
|
|
6033
|
+
* Boolean indicating whether input is in composition
|
|
6034
|
+
*/
|
|
6035
|
+
readonly inComposition: boolean;
|
|
5779
6036
|
/**
|
|
5780
6037
|
* An event emitted after composition has started.
|
|
5781
6038
|
*/
|
|
@@ -6002,6 +6259,11 @@ export namespace editor {
|
|
|
6002
6259
|
* Get all the decorations for a range (filtering out decorations from other editors).
|
|
6003
6260
|
*/
|
|
6004
6261
|
getDecorationsInRange(range: Range): IModelDecoration[] | null;
|
|
6262
|
+
/**
|
|
6263
|
+
* Get the font size at a given position
|
|
6264
|
+
* @param position the position for which to fetch the font size
|
|
6265
|
+
*/
|
|
6266
|
+
getFontSizeAtPosition(position: IPosition): string | null;
|
|
6005
6267
|
/**
|
|
6006
6268
|
* All decorations added through this call will get the ownerId of this editor.
|
|
6007
6269
|
* @deprecated Use `createDecorationsCollection`
|
|
@@ -6033,6 +6295,10 @@ export namespace editor {
|
|
|
6033
6295
|
* Get the vertical position (top offset) for the position w.r.t. to the first line.
|
|
6034
6296
|
*/
|
|
6035
6297
|
getTopForPosition(lineNumber: number, column: number): number;
|
|
6298
|
+
/**
|
|
6299
|
+
* Get the line height for a model position.
|
|
6300
|
+
*/
|
|
6301
|
+
getLineHeightForPosition(position: IPosition): number;
|
|
6036
6302
|
/**
|
|
6037
6303
|
* Write the screen reader content to be the current selection
|
|
6038
6304
|
*/
|
|
@@ -6559,8 +6825,6 @@ export namespace languages {
|
|
|
6559
6825
|
*/
|
|
6560
6826
|
export function registerInlineCompletionsProvider(languageSelector: LanguageSelector, provider: InlineCompletionsProvider): IDisposable;
|
|
6561
6827
|
|
|
6562
|
-
export function registerInlineEditProvider(languageSelector: LanguageSelector, provider: InlineEditProvider): IDisposable;
|
|
6563
|
-
|
|
6564
6828
|
/**
|
|
6565
6829
|
* Register an inlay hints provider.
|
|
6566
6830
|
*/
|
|
@@ -6619,14 +6883,30 @@ export namespace languages {
|
|
|
6619
6883
|
}>;
|
|
6620
6884
|
}
|
|
6621
6885
|
|
|
6886
|
+
/**
|
|
6887
|
+
* Configuration for line comments.
|
|
6888
|
+
*/
|
|
6889
|
+
export interface LineCommentConfig {
|
|
6890
|
+
/**
|
|
6891
|
+
* The line comment token, like `//`
|
|
6892
|
+
*/
|
|
6893
|
+
comment: string;
|
|
6894
|
+
/**
|
|
6895
|
+
* Whether the comment token should not be indented and placed at the first column.
|
|
6896
|
+
* Defaults to false.
|
|
6897
|
+
*/
|
|
6898
|
+
noIndent?: boolean;
|
|
6899
|
+
}
|
|
6900
|
+
|
|
6622
6901
|
/**
|
|
6623
6902
|
* Describes how comments for a language work.
|
|
6624
6903
|
*/
|
|
6625
6904
|
export interface CommentRule {
|
|
6626
6905
|
/**
|
|
6627
|
-
* The line comment token, like `// this is a comment
|
|
6906
|
+
* The line comment token, like `// this is a comment`.
|
|
6907
|
+
* Can be a string or an object with comment and optional noIndent properties.
|
|
6628
6908
|
*/
|
|
6629
|
-
lineComment?: string | null;
|
|
6909
|
+
lineComment?: string | LineCommentConfig | null;
|
|
6630
6910
|
/**
|
|
6631
6911
|
* The block comment character pair, like `/* block comment */`
|
|
6632
6912
|
*/
|
|
@@ -6842,6 +7122,20 @@ export namespace languages {
|
|
|
6842
7122
|
removeText?: number;
|
|
6843
7123
|
}
|
|
6844
7124
|
|
|
7125
|
+
export interface SyntaxNode {
|
|
7126
|
+
startIndex: number;
|
|
7127
|
+
endIndex: number;
|
|
7128
|
+
startPosition: IPosition;
|
|
7129
|
+
endPosition: IPosition;
|
|
7130
|
+
}
|
|
7131
|
+
|
|
7132
|
+
export interface QueryCapture {
|
|
7133
|
+
name: string;
|
|
7134
|
+
text?: string;
|
|
7135
|
+
node: SyntaxNode;
|
|
7136
|
+
encodedLanguageId: number;
|
|
7137
|
+
}
|
|
7138
|
+
|
|
6845
7139
|
/**
|
|
6846
7140
|
* The state of the tokenizer between two lines.
|
|
6847
7141
|
* It is useful to store flags such as in multiline comment, etc.
|
|
@@ -6955,7 +7249,8 @@ export namespace languages {
|
|
|
6955
7249
|
TypeParameter = 24,
|
|
6956
7250
|
User = 25,
|
|
6957
7251
|
Issue = 26,
|
|
6958
|
-
|
|
7252
|
+
Tool = 27,
|
|
7253
|
+
Snippet = 28
|
|
6959
7254
|
}
|
|
6960
7255
|
|
|
6961
7256
|
export interface CompletionItemLabel {
|
|
@@ -7047,9 +7342,6 @@ export namespace languages {
|
|
|
7047
7342
|
/**
|
|
7048
7343
|
* A range of text that should be replaced by this completion item.
|
|
7049
7344
|
*
|
|
7050
|
-
* Defaults to a range from the start of the {@link TextDocument.getWordRangeAtPosition current word} to the
|
|
7051
|
-
* current position.
|
|
7052
|
-
*
|
|
7053
7345
|
* *Note:* The range must be a {@link Range.isSingleLine single line} and it must
|
|
7054
7346
|
* {@link Range.contains contain} the position at which completion has been {@link CompletionItemProvider.provideCompletionItems requested}.
|
|
7055
7347
|
*/
|
|
@@ -7070,6 +7362,10 @@ export namespace languages {
|
|
|
7070
7362
|
* A command that should be run upon acceptance of this item.
|
|
7071
7363
|
*/
|
|
7072
7364
|
command?: Command;
|
|
7365
|
+
/**
|
|
7366
|
+
* A command that should be run upon acceptance of this item.
|
|
7367
|
+
*/
|
|
7368
|
+
action?: Command;
|
|
7073
7369
|
}
|
|
7074
7370
|
|
|
7075
7371
|
export interface CompletionList {
|
|
@@ -7083,6 +7379,7 @@ export namespace languages {
|
|
|
7083
7379
|
*/
|
|
7084
7380
|
export interface PartialAcceptInfo {
|
|
7085
7381
|
kind: PartialAcceptTriggerKind;
|
|
7382
|
+
acceptedLength: number;
|
|
7086
7383
|
}
|
|
7087
7384
|
|
|
7088
7385
|
/**
|
|
@@ -7168,6 +7465,10 @@ export namespace languages {
|
|
|
7168
7465
|
*/
|
|
7169
7466
|
readonly triggerKind: InlineCompletionTriggerKind;
|
|
7170
7467
|
readonly selectedSuggestionInfo: SelectedSuggestionInfo | undefined;
|
|
7468
|
+
readonly includeInlineEdits: boolean;
|
|
7469
|
+
readonly includeInlineCompletions: boolean;
|
|
7470
|
+
readonly requestIssuedDateTime: number;
|
|
7471
|
+
readonly earliestShownDateTime: number;
|
|
7171
7472
|
}
|
|
7172
7473
|
|
|
7173
7474
|
export class SelectedSuggestionInfo {
|
|
@@ -7208,19 +7509,55 @@ export namespace languages {
|
|
|
7208
7509
|
*/
|
|
7209
7510
|
readonly range?: IRange;
|
|
7210
7511
|
readonly command?: Command;
|
|
7512
|
+
readonly action?: Command;
|
|
7513
|
+
/**
|
|
7514
|
+
* Is called the first time an inline completion is shown.
|
|
7515
|
+
* @deprecated. Use `onDidShow` of the provider instead.
|
|
7516
|
+
*/
|
|
7517
|
+
readonly shownCommand?: Command;
|
|
7211
7518
|
/**
|
|
7212
7519
|
* If set to `true`, unopened closing brackets are removed and unclosed opening brackets are closed.
|
|
7213
7520
|
* Defaults to `false`.
|
|
7214
7521
|
*/
|
|
7215
7522
|
readonly completeBracketPairs?: boolean;
|
|
7523
|
+
readonly isInlineEdit?: boolean;
|
|
7524
|
+
readonly showInlineEditMenu?: boolean;
|
|
7525
|
+
readonly showRange?: IRange;
|
|
7526
|
+
readonly warning?: InlineCompletionWarning;
|
|
7527
|
+
readonly displayLocation?: InlineCompletionDisplayLocation;
|
|
7528
|
+
/**
|
|
7529
|
+
* Used for telemetry.
|
|
7530
|
+
*/
|
|
7531
|
+
readonly correlationId?: string | undefined;
|
|
7532
|
+
}
|
|
7533
|
+
|
|
7534
|
+
export interface InlineCompletionWarning {
|
|
7535
|
+
message: IMarkdownString | string;
|
|
7536
|
+
icon?: IconPath;
|
|
7216
7537
|
}
|
|
7217
7538
|
|
|
7539
|
+
export enum InlineCompletionDisplayLocationKind {
|
|
7540
|
+
Code = 1,
|
|
7541
|
+
Label = 2
|
|
7542
|
+
}
|
|
7543
|
+
|
|
7544
|
+
export interface InlineCompletionDisplayLocation {
|
|
7545
|
+
range: IRange;
|
|
7546
|
+
kind: InlineCompletionDisplayLocationKind;
|
|
7547
|
+
label: string;
|
|
7548
|
+
}
|
|
7549
|
+
|
|
7550
|
+
/**
|
|
7551
|
+
* TODO: add `| Uri | { light: Uri; dark: Uri }`.
|
|
7552
|
+
*/
|
|
7553
|
+
export type IconPath = editor.ThemeIcon;
|
|
7554
|
+
|
|
7218
7555
|
export interface InlineCompletions<TItem extends InlineCompletion = InlineCompletion> {
|
|
7219
7556
|
readonly items: readonly TItem[];
|
|
7220
7557
|
/**
|
|
7221
7558
|
* A list of commands associated with the inline completions of this list.
|
|
7222
7559
|
*/
|
|
7223
|
-
readonly commands?:
|
|
7560
|
+
readonly commands?: InlineCompletionCommand[];
|
|
7224
7561
|
readonly suppressSuggestions?: boolean | undefined;
|
|
7225
7562
|
/**
|
|
7226
7563
|
* When set and the user types a suggestion without derivating from it, the inline suggestion is not updated.
|
|
@@ -7228,6 +7565,11 @@ export namespace languages {
|
|
|
7228
7565
|
readonly enableForwardStability?: boolean | undefined;
|
|
7229
7566
|
}
|
|
7230
7567
|
|
|
7568
|
+
export type InlineCompletionCommand = {
|
|
7569
|
+
command: Command;
|
|
7570
|
+
icon?: editor.ThemeIcon;
|
|
7571
|
+
};
|
|
7572
|
+
|
|
7231
7573
|
export type InlineCompletionProviderGroupId = string;
|
|
7232
7574
|
|
|
7233
7575
|
export interface InlineCompletionsProvider<T extends InlineCompletions = InlineCompletions> {
|
|
@@ -7238,13 +7580,24 @@ export namespace languages {
|
|
|
7238
7580
|
*/
|
|
7239
7581
|
handleItemDidShow?(completions: T, item: T['items'][number], updatedInsertText: string): void;
|
|
7240
7582
|
/**
|
|
7241
|
-
* Will be called when an item is partially accepted.
|
|
7583
|
+
* Will be called when an item is partially accepted. TODO: also handle full acceptance here!
|
|
7584
|
+
* @param acceptedCharacters Deprecated. Use `info.acceptedCharacters` instead.
|
|
7242
7585
|
*/
|
|
7243
7586
|
handlePartialAccept?(completions: T, item: T['items'][number], acceptedCharacters: number, info: PartialAcceptInfo): void;
|
|
7587
|
+
/**
|
|
7588
|
+
* @deprecated Use `handleEndOfLifetime` instead.
|
|
7589
|
+
*/
|
|
7590
|
+
handleRejection?(completions: T, item: T['items'][number]): void;
|
|
7591
|
+
/**
|
|
7592
|
+
* Is called when an inline completion item is no longer being used.
|
|
7593
|
+
* Provides a reason of why it is not used anymore.
|
|
7594
|
+
*/
|
|
7595
|
+
handleEndOfLifetime?(completions: T, item: T['items'][number], reason: InlineCompletionEndOfLifeReason<T['items'][number]>, lifetimeSummary: LifetimeSummary): void;
|
|
7244
7596
|
/**
|
|
7245
7597
|
* Will be called when a completions list is no longer in use and can be garbage-collected.
|
|
7246
7598
|
*/
|
|
7247
|
-
|
|
7599
|
+
disposeInlineCompletions(completions: T, reason: InlineCompletionsDisposeReason): void;
|
|
7600
|
+
onDidChangeInlineCompletions?: IEvent<void>;
|
|
7248
7601
|
/**
|
|
7249
7602
|
* Only used for {@link yieldsToGroupIds}.
|
|
7250
7603
|
* Multiple providers can have the same group id.
|
|
@@ -7255,9 +7608,63 @@ export namespace languages {
|
|
|
7255
7608
|
* The current provider is only requested for completions if no provider with a preferred group id returned a result.
|
|
7256
7609
|
*/
|
|
7257
7610
|
yieldsToGroupIds?: InlineCompletionProviderGroupId[];
|
|
7611
|
+
excludesGroupIds?: InlineCompletionProviderGroupId[];
|
|
7612
|
+
displayName?: string;
|
|
7613
|
+
debounceDelayMs?: number;
|
|
7258
7614
|
toString?(): string;
|
|
7259
7615
|
}
|
|
7260
7616
|
|
|
7617
|
+
export type InlineCompletionsDisposeReason = {
|
|
7618
|
+
kind: 'lostRace' | 'tokenCancellation' | 'other' | 'empty' | 'notTaken';
|
|
7619
|
+
};
|
|
7620
|
+
|
|
7621
|
+
export enum InlineCompletionEndOfLifeReasonKind {
|
|
7622
|
+
Accepted = 0,
|
|
7623
|
+
Rejected = 1,
|
|
7624
|
+
Ignored = 2
|
|
7625
|
+
}
|
|
7626
|
+
|
|
7627
|
+
export type InlineCompletionEndOfLifeReason<TInlineCompletion = InlineCompletion> = {
|
|
7628
|
+
kind: InlineCompletionEndOfLifeReasonKind.Accepted;
|
|
7629
|
+
} | {
|
|
7630
|
+
kind: InlineCompletionEndOfLifeReasonKind.Rejected;
|
|
7631
|
+
} | {
|
|
7632
|
+
kind: InlineCompletionEndOfLifeReasonKind.Ignored;
|
|
7633
|
+
supersededBy?: TInlineCompletion;
|
|
7634
|
+
userTypingDisagreed: boolean;
|
|
7635
|
+
};
|
|
7636
|
+
|
|
7637
|
+
export type LifetimeSummary = {
|
|
7638
|
+
requestUuid: string;
|
|
7639
|
+
correlationId: string | undefined;
|
|
7640
|
+
partiallyAccepted: number;
|
|
7641
|
+
partiallyAcceptedCountSinceOriginal: number;
|
|
7642
|
+
partiallyAcceptedRatioSinceOriginal: number;
|
|
7643
|
+
partiallyAcceptedCharactersSinceOriginal: number;
|
|
7644
|
+
shown: boolean;
|
|
7645
|
+
shownDuration: number;
|
|
7646
|
+
shownDurationUncollapsed: number;
|
|
7647
|
+
timeUntilShown: number | undefined;
|
|
7648
|
+
timeUntilProviderRequest: number;
|
|
7649
|
+
timeUntilProviderResponse: number;
|
|
7650
|
+
editorType: string;
|
|
7651
|
+
viewKind: string | undefined;
|
|
7652
|
+
error: string | undefined;
|
|
7653
|
+
preceeded: boolean;
|
|
7654
|
+
languageId: string;
|
|
7655
|
+
requestReason: string;
|
|
7656
|
+
cursorColumnDistance?: number;
|
|
7657
|
+
cursorLineDistance?: number;
|
|
7658
|
+
lineCountOriginal?: number;
|
|
7659
|
+
lineCountModified?: number;
|
|
7660
|
+
characterCountOriginal?: number;
|
|
7661
|
+
characterCountModified?: number;
|
|
7662
|
+
disjointReplacements?: number;
|
|
7663
|
+
sameShapeReplacements?: boolean;
|
|
7664
|
+
typingInterval: number;
|
|
7665
|
+
typingIntervalCharacterCount: number;
|
|
7666
|
+
};
|
|
7667
|
+
|
|
7261
7668
|
export interface CodeAction {
|
|
7262
7669
|
title: string;
|
|
7263
7670
|
command?: Command;
|
|
@@ -7908,13 +8315,21 @@ export namespace languages {
|
|
|
7908
8315
|
resource: Uri;
|
|
7909
8316
|
textEdit: TextEdit & {
|
|
7910
8317
|
insertAsSnippet?: boolean;
|
|
8318
|
+
keepWhitespace?: boolean;
|
|
7911
8319
|
};
|
|
7912
8320
|
versionId: number | undefined;
|
|
7913
8321
|
metadata?: WorkspaceEditMetadata;
|
|
7914
8322
|
}
|
|
7915
8323
|
|
|
7916
8324
|
export interface WorkspaceEdit {
|
|
7917
|
-
edits: Array<IWorkspaceTextEdit | IWorkspaceFileEdit>;
|
|
8325
|
+
edits: Array<IWorkspaceTextEdit | IWorkspaceFileEdit | ICustomEdit>;
|
|
8326
|
+
}
|
|
8327
|
+
|
|
8328
|
+
export interface ICustomEdit {
|
|
8329
|
+
readonly resource: Uri;
|
|
8330
|
+
readonly metadata?: WorkspaceEditMetadata;
|
|
8331
|
+
undo(): Promise<void> | void;
|
|
8332
|
+
redo(): Promise<void> | void;
|
|
7918
8333
|
}
|
|
7919
8334
|
|
|
7920
8335
|
export interface Rejection {
|
|
@@ -7968,11 +8383,16 @@ export namespace languages {
|
|
|
7968
8383
|
}
|
|
7969
8384
|
|
|
7970
8385
|
export interface PendingCommentThread {
|
|
7971
|
-
body: string;
|
|
7972
8386
|
range: IRange | undefined;
|
|
7973
8387
|
uri: Uri;
|
|
7974
8388
|
uniqueOwner: string;
|
|
7975
8389
|
isReply: boolean;
|
|
8390
|
+
comment: PendingComment;
|
|
8391
|
+
}
|
|
8392
|
+
|
|
8393
|
+
export interface PendingComment {
|
|
8394
|
+
body: string;
|
|
8395
|
+
cursor: IPosition;
|
|
7976
8396
|
}
|
|
7977
8397
|
|
|
7978
8398
|
export interface CodeLens {
|
|
@@ -7982,8 +8402,8 @@ export namespace languages {
|
|
|
7982
8402
|
}
|
|
7983
8403
|
|
|
7984
8404
|
export interface CodeLensList {
|
|
7985
|
-
lenses: CodeLens[];
|
|
7986
|
-
dispose(): void;
|
|
8405
|
+
readonly lenses: readonly CodeLens[];
|
|
8406
|
+
dispose?(): void;
|
|
7987
8407
|
}
|
|
7988
8408
|
|
|
7989
8409
|
export interface CodeLensProvider {
|
|
@@ -8059,52 +8479,6 @@ export namespace languages {
|
|
|
8059
8479
|
provideDocumentRangeSemanticTokens(model: editor.ITextModel, range: Range, token: CancellationToken): ProviderResult<SemanticTokens>;
|
|
8060
8480
|
}
|
|
8061
8481
|
|
|
8062
|
-
export interface DocumentContextItem {
|
|
8063
|
-
readonly uri: Uri;
|
|
8064
|
-
readonly version: number;
|
|
8065
|
-
readonly ranges: IRange[];
|
|
8066
|
-
}
|
|
8067
|
-
|
|
8068
|
-
export interface MappedEditsContext {
|
|
8069
|
-
/** The outer array is sorted by priority - from highest to lowest. The inner arrays contain elements of the same priority. */
|
|
8070
|
-
documents: DocumentContextItem[][];
|
|
8071
|
-
}
|
|
8072
|
-
|
|
8073
|
-
export interface MappedEditsProvider {
|
|
8074
|
-
/**
|
|
8075
|
-
* Provider maps code blocks from the chat into a workspace edit.
|
|
8076
|
-
*
|
|
8077
|
-
* @param document The document to provide mapped edits for.
|
|
8078
|
-
* @param codeBlocks Code blocks that come from an LLM's reply.
|
|
8079
|
-
* "Apply in Editor" in the panel chat only sends one edit that the user clicks on, but inline chat can send multiple blocks and let the lang server decide what to do with them.
|
|
8080
|
-
* @param context The context for providing mapped edits.
|
|
8081
|
-
* @param token A cancellation token.
|
|
8082
|
-
* @returns A provider result of text edits.
|
|
8083
|
-
*/
|
|
8084
|
-
provideMappedEdits(document: editor.ITextModel, codeBlocks: string[], context: MappedEditsContext, token: CancellationToken): Promise<WorkspaceEdit | null>;
|
|
8085
|
-
}
|
|
8086
|
-
|
|
8087
|
-
export interface IInlineEdit {
|
|
8088
|
-
text: string;
|
|
8089
|
-
range: IRange;
|
|
8090
|
-
accepted?: Command;
|
|
8091
|
-
rejected?: Command;
|
|
8092
|
-
}
|
|
8093
|
-
|
|
8094
|
-
export interface IInlineEditContext {
|
|
8095
|
-
triggerKind: InlineEditTriggerKind;
|
|
8096
|
-
}
|
|
8097
|
-
|
|
8098
|
-
export enum InlineEditTriggerKind {
|
|
8099
|
-
Invoke = 0,
|
|
8100
|
-
Automatic = 1
|
|
8101
|
-
}
|
|
8102
|
-
|
|
8103
|
-
export interface InlineEditProvider<T extends IInlineEdit = IInlineEdit> {
|
|
8104
|
-
provideInlineEdit(model: editor.ITextModel, context: IInlineEditContext, token: CancellationToken): ProviderResult<T>;
|
|
8105
|
-
freeInlineEdit(edit: T): void;
|
|
8106
|
-
}
|
|
8107
|
-
|
|
8108
8482
|
export interface ILanguageExtensionPoint {
|
|
8109
8483
|
id: string;
|
|
8110
8484
|
extensions?: string[];
|
|
@@ -8266,7 +8640,7 @@ export namespace worker {
|
|
|
8266
8640
|
getValue(): string;
|
|
8267
8641
|
}
|
|
8268
8642
|
|
|
8269
|
-
export interface IWorkerContext<H =
|
|
8643
|
+
export interface IWorkerContext<H = {}> {
|
|
8270
8644
|
/**
|
|
8271
8645
|
* A proxy to the main thread host object.
|
|
8272
8646
|
*/
|