@codingame/monaco-vscode-editor-api 20.1.1 → 20.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/vscode/src/vs/editor/editor.api.d.ts +728 -827
- package/vscode/src/vs/editor/standalone/browser/standalone-tokens.css +14 -1
- package/vscode/src/vs/editor/standalone/browser/standaloneEditor.d.ts +145 -0
- package/vscode/src/vs/editor/standalone/browser/standaloneLanguages.d.ts +232 -0
- package/vscode/src/vs/editor/standalone/browser/standaloneWebWorker.d.ts +27 -0
- package/vscode/src/vs/editor/standalone/common/monarch/monarchCommon.d.ts +34 -0
- package/vscode/src/vs/editor/standalone/common/monarch/monarchCompile.d.ts +9 -0
- package/vscode/src/vs/editor/standalone/common/monarch/monarchLexer.d.ts +4 -0
- package/vscode/src/vs/editor/standalone/common/monarch/monarchTypes.d.ts +89 -0
|
@@ -1,27 +1,17 @@
|
|
|
1
|
-
/*!-----------------------------------------------------------
|
|
2
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* Type definitions for monaco-editor
|
|
4
|
-
* Released under the MIT license
|
|
5
|
-
*-----------------------------------------------------------*/
|
|
6
1
|
/*---------------------------------------------------------------------------------------------
|
|
7
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
8
3
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
9
4
|
*--------------------------------------------------------------------------------------------*/
|
|
10
|
-
|
|
11
5
|
declare global {
|
|
12
6
|
let MonacoEnvironment: Environment | undefined;
|
|
13
|
-
|
|
14
7
|
interface Window {
|
|
15
8
|
MonacoEnvironment?: Environment | undefined;
|
|
16
9
|
}
|
|
17
10
|
}
|
|
18
|
-
|
|
19
11
|
interface Window {
|
|
20
12
|
MonacoEnvironment?: Environment | undefined;
|
|
21
13
|
}
|
|
22
|
-
|
|
23
14
|
export type Thenable<T> = PromiseLike<T>;
|
|
24
|
-
|
|
25
15
|
export interface Environment {
|
|
26
16
|
/**
|
|
27
17
|
* Define a global `monaco` symbol.
|
|
@@ -45,33 +35,25 @@ export interface Environment {
|
|
|
45
35
|
/**
|
|
46
36
|
* Create a trusted types policy (same API as window.trustedTypes.createPolicy)
|
|
47
37
|
*/
|
|
48
|
-
createTrustedTypesPolicy?(
|
|
49
|
-
policyName: string,
|
|
50
|
-
policyOptions?: ITrustedTypePolicyOptions,
|
|
51
|
-
): undefined | ITrustedTypePolicy;
|
|
38
|
+
createTrustedTypesPolicy?(policyName: string, policyOptions?: ITrustedTypePolicyOptions): undefined | ITrustedTypePolicy;
|
|
52
39
|
}
|
|
53
|
-
|
|
54
40
|
export interface ITrustedTypePolicyOptions {
|
|
55
41
|
createHTML?: (input: string, ...arguments: any[]) => string;
|
|
56
42
|
createScript?: (input: string, ...arguments: any[]) => string;
|
|
57
43
|
createScriptURL?: (input: string, ...arguments: any[]) => string;
|
|
58
44
|
}
|
|
59
|
-
|
|
60
45
|
export interface ITrustedTypePolicy {
|
|
61
46
|
readonly name: string;
|
|
62
47
|
createHTML?(input: string): any;
|
|
63
48
|
createScript?(input: string): any;
|
|
64
49
|
createScriptURL?(input: string): any;
|
|
65
50
|
}
|
|
66
|
-
|
|
67
51
|
export interface IDisposable {
|
|
68
52
|
dispose(): void;
|
|
69
53
|
}
|
|
70
|
-
|
|
71
54
|
export interface IEvent<T> {
|
|
72
55
|
(listener: (e: T) => any, thisArg?: any): IDisposable;
|
|
73
56
|
}
|
|
74
|
-
|
|
75
57
|
/**
|
|
76
58
|
* A helper that allows to emit and listen to typed events
|
|
77
59
|
*/
|
|
@@ -81,26 +63,22 @@ export class Emitter<T> {
|
|
|
81
63
|
fire(event: T): void;
|
|
82
64
|
dispose(): void;
|
|
83
65
|
}
|
|
84
|
-
|
|
85
66
|
export enum MarkerTag {
|
|
86
67
|
Unnecessary = 1,
|
|
87
68
|
Deprecated = 2
|
|
88
69
|
}
|
|
89
|
-
|
|
90
70
|
export enum MarkerSeverity {
|
|
91
71
|
Hint = 1,
|
|
92
72
|
Info = 2,
|
|
93
73
|
Warning = 4,
|
|
94
74
|
Error = 8
|
|
95
75
|
}
|
|
96
|
-
|
|
97
76
|
export class CancellationTokenSource {
|
|
98
77
|
constructor(parent?: CancellationToken);
|
|
99
78
|
get token(): CancellationToken;
|
|
100
79
|
cancel(): void;
|
|
101
80
|
dispose(cancel?: boolean): void;
|
|
102
81
|
}
|
|
103
|
-
|
|
104
82
|
export interface CancellationToken {
|
|
105
83
|
/**
|
|
106
84
|
* A flag signalling is cancellation has been requested.
|
|
@@ -133,7 +111,7 @@ export interface CancellationToken {
|
|
|
133
111
|
* ```
|
|
134
112
|
*/
|
|
135
113
|
export class Uri implements UriComponents {
|
|
136
|
-
static isUri(thing:
|
|
114
|
+
static isUri(thing: unknown): thing is Uri;
|
|
137
115
|
/**
|
|
138
116
|
* scheme is the 'http' part of 'http://www.example.com/some/path?query#fragment'.
|
|
139
117
|
* The part before the first colon.
|
|
@@ -261,7 +239,6 @@ export class Uri implements UriComponents {
|
|
|
261
239
|
static revive(data: UriComponents | Uri | null): Uri | null;
|
|
262
240
|
static revive(data: UriComponents | Uri | undefined | null): Uri | undefined | null;
|
|
263
241
|
}
|
|
264
|
-
|
|
265
242
|
export interface UriComponents {
|
|
266
243
|
scheme: string;
|
|
267
244
|
authority?: string;
|
|
@@ -480,7 +457,6 @@ export class KeyMod {
|
|
|
480
457
|
static readonly WinCtrl: number;
|
|
481
458
|
static chord(firstPart: number, secondPart: number): number;
|
|
482
459
|
}
|
|
483
|
-
|
|
484
460
|
export interface IMarkdownString {
|
|
485
461
|
readonly value: string;
|
|
486
462
|
readonly isTrusted?: boolean | MarkdownStringTrustedOptions;
|
|
@@ -491,11 +467,9 @@ export interface IMarkdownString {
|
|
|
491
467
|
[href: string]: UriComponents;
|
|
492
468
|
};
|
|
493
469
|
}
|
|
494
|
-
|
|
495
470
|
export interface MarkdownStringTrustedOptions {
|
|
496
471
|
readonly enabledCommands: readonly string[];
|
|
497
472
|
}
|
|
498
|
-
|
|
499
473
|
export interface IKeyboardEvent {
|
|
500
474
|
readonly _standardKeyboardEventBrand: true;
|
|
501
475
|
readonly browserEvent: KeyboardEvent;
|
|
@@ -526,10 +500,10 @@ export interface IMouseEvent {
|
|
|
526
500
|
readonly altKey: boolean;
|
|
527
501
|
readonly metaKey: boolean;
|
|
528
502
|
readonly timestamp: number;
|
|
503
|
+
readonly defaultPrevented: boolean;
|
|
529
504
|
preventDefault(): void;
|
|
530
505
|
stopPropagation(): void;
|
|
531
506
|
}
|
|
532
|
-
|
|
533
507
|
export interface IScrollEvent {
|
|
534
508
|
readonly scrollTop: number;
|
|
535
509
|
readonly scrollLeft: number;
|
|
@@ -553,7 +527,6 @@ export interface IPosition {
|
|
|
553
527
|
*/
|
|
554
528
|
readonly column: number;
|
|
555
529
|
}
|
|
556
|
-
|
|
557
530
|
/**
|
|
558
531
|
* A position in the editor.
|
|
559
532
|
*/
|
|
@@ -631,7 +604,6 @@ export class Position {
|
|
|
631
604
|
static isIPosition(obj: any): obj is IPosition;
|
|
632
605
|
toJSON(): IPosition;
|
|
633
606
|
}
|
|
634
|
-
|
|
635
607
|
/**
|
|
636
608
|
* A range in the editor. This interface is suitable for serialization.
|
|
637
609
|
*/
|
|
@@ -653,7 +625,6 @@ export interface IRange {
|
|
|
653
625
|
*/
|
|
654
626
|
readonly endColumn: number;
|
|
655
627
|
}
|
|
656
|
-
|
|
657
628
|
/**
|
|
658
629
|
* A range in the editor. (startLineNumber,startColumn) is <= (endLineNumber,endColumn)
|
|
659
630
|
*/
|
|
@@ -781,6 +752,7 @@ export class Range {
|
|
|
781
752
|
* Moves the range by the given amount of lines.
|
|
782
753
|
*/
|
|
783
754
|
delta(lineCount: number): Range;
|
|
755
|
+
isSingleLine(): boolean;
|
|
784
756
|
static fromPositions(start: IPosition, end?: IPosition): Range;
|
|
785
757
|
/**
|
|
786
758
|
* Create a `Range` from an `IRange`.
|
|
@@ -800,6 +772,10 @@ export class Range {
|
|
|
800
772
|
* Test if the two ranges are intersecting. If the ranges are touching it returns true.
|
|
801
773
|
*/
|
|
802
774
|
static areIntersecting(a: IRange, b: IRange): boolean;
|
|
775
|
+
/**
|
|
776
|
+
* Test if the two ranges are intersecting, but not touching at all.
|
|
777
|
+
*/
|
|
778
|
+
static areOnlyIntersecting(a: IRange, b: IRange): boolean;
|
|
803
779
|
/**
|
|
804
780
|
* A function that compares ranges, useful for sorting ranges
|
|
805
781
|
* It will first compare ranges on the startPosition and then on the endPosition
|
|
@@ -816,7 +792,6 @@ export class Range {
|
|
|
816
792
|
static spansMultipleLines(range: IRange): boolean;
|
|
817
793
|
toJSON(): IRange;
|
|
818
794
|
}
|
|
819
|
-
|
|
820
795
|
/**
|
|
821
796
|
* A selection in the editor.
|
|
822
797
|
* The selection is a range that has an orientation.
|
|
@@ -839,7 +814,6 @@ export interface ISelection {
|
|
|
839
814
|
*/
|
|
840
815
|
readonly positionColumn: number;
|
|
841
816
|
}
|
|
842
|
-
|
|
843
817
|
/**
|
|
844
818
|
* A selection in the editor.
|
|
845
819
|
* The selection is a range that has an orientation.
|
|
@@ -919,7 +893,6 @@ export class Selection extends Range {
|
|
|
919
893
|
*/
|
|
920
894
|
static createWithDirection(startLineNumber: number, startColumn: number, endLineNumber: number, endColumn: number, direction: SelectionDirection): Selection;
|
|
921
895
|
}
|
|
922
|
-
|
|
923
896
|
/**
|
|
924
897
|
* The direction of a selection.
|
|
925
898
|
*/
|
|
@@ -933,7 +906,6 @@ export enum SelectionDirection {
|
|
|
933
906
|
*/
|
|
934
907
|
RTL = 1
|
|
935
908
|
}
|
|
936
|
-
|
|
937
909
|
export class Token {
|
|
938
910
|
readonly offset: number;
|
|
939
911
|
readonly type: string;
|
|
@@ -942,48 +914,39 @@ export class Token {
|
|
|
942
914
|
constructor(offset: number, type: string, language: string);
|
|
943
915
|
toString(): string;
|
|
944
916
|
}
|
|
945
|
-
|
|
946
917
|
export namespace editor {
|
|
947
|
-
|
|
948
918
|
/**
|
|
949
919
|
* Create a new editor under `domElement`.
|
|
950
920
|
* `domElement` should be empty (not contain other dom nodes).
|
|
951
921
|
* The editor will read the size of `domElement`.
|
|
952
922
|
*/
|
|
953
923
|
export function create(domElement: HTMLElement, options?: IStandaloneEditorConstructionOptions, override?: IEditorOverrideServices): IStandaloneCodeEditor;
|
|
954
|
-
|
|
955
924
|
/**
|
|
956
925
|
* Emitted when an editor is created.
|
|
957
926
|
* Creating a diff editor might cause this listener to be invoked with the two editors.
|
|
958
927
|
* @event
|
|
959
928
|
*/
|
|
960
929
|
export function onDidCreateEditor(listener: (codeEditor: ICodeEditor) => void): IDisposable;
|
|
961
|
-
|
|
962
930
|
/**
|
|
963
931
|
* Emitted when an diff editor is created.
|
|
964
932
|
* @event
|
|
965
933
|
*/
|
|
966
934
|
export function onDidCreateDiffEditor(listener: (diffEditor: IDiffEditor) => void): IDisposable;
|
|
967
|
-
|
|
968
935
|
/**
|
|
969
936
|
* Get all the created editors.
|
|
970
937
|
*/
|
|
971
938
|
export function getEditors(): readonly ICodeEditor[];
|
|
972
|
-
|
|
973
939
|
/**
|
|
974
940
|
* Get all the created diff editors.
|
|
975
941
|
*/
|
|
976
942
|
export function getDiffEditors(): readonly IDiffEditor[];
|
|
977
|
-
|
|
978
943
|
/**
|
|
979
944
|
* Create a new diff editor under `domElement`.
|
|
980
945
|
* `domElement` should be empty (not contain other dom nodes).
|
|
981
946
|
* The editor will read the size of `domElement`.
|
|
982
947
|
*/
|
|
983
948
|
export function createDiffEditor(domElement: HTMLElement, options?: IStandaloneDiffEditorConstructionOptions, override?: IEditorOverrideServices): IStandaloneDiffEditor;
|
|
984
|
-
|
|
985
949
|
export function createMultiFileDiffEditor(domElement: HTMLElement, override?: IEditorOverrideServices): any;
|
|
986
|
-
|
|
987
950
|
/**
|
|
988
951
|
* Description of a command contribution
|
|
989
952
|
*/
|
|
@@ -997,17 +960,14 @@ export namespace editor {
|
|
|
997
960
|
*/
|
|
998
961
|
run: ICommandHandler;
|
|
999
962
|
}
|
|
1000
|
-
|
|
1001
963
|
/**
|
|
1002
964
|
* Add a command.
|
|
1003
965
|
*/
|
|
1004
966
|
export function addCommand(descriptor: ICommandDescriptor): IDisposable;
|
|
1005
|
-
|
|
1006
967
|
/**
|
|
1007
968
|
* Add an action to all editors.
|
|
1008
969
|
*/
|
|
1009
970
|
export function addEditorAction(descriptor: IActionDescriptor): IDisposable;
|
|
1010
|
-
|
|
1011
971
|
/**
|
|
1012
972
|
* A keybinding rule.
|
|
1013
973
|
*/
|
|
@@ -1017,38 +977,31 @@ export namespace editor {
|
|
|
1017
977
|
commandArgs?: any;
|
|
1018
978
|
when?: string | null;
|
|
1019
979
|
}
|
|
1020
|
-
|
|
1021
980
|
/**
|
|
1022
981
|
* Add a keybinding rule.
|
|
1023
982
|
*/
|
|
1024
983
|
export function addKeybindingRule(rule: IKeybindingRule): IDisposable;
|
|
1025
|
-
|
|
1026
984
|
/**
|
|
1027
985
|
* Add keybinding rules.
|
|
1028
986
|
*/
|
|
1029
987
|
export function addKeybindingRules(rules: IKeybindingRule[]): IDisposable;
|
|
1030
|
-
|
|
1031
988
|
/**
|
|
1032
989
|
* Create a new editor model.
|
|
1033
990
|
* You can specify the language that should be set for this model or let the language be inferred from the `uri`.
|
|
1034
991
|
*/
|
|
1035
992
|
export function createModel(value: string, language?: string, uri?: Uri): ITextModel;
|
|
1036
|
-
|
|
1037
993
|
/**
|
|
1038
994
|
* Change the language for a model.
|
|
1039
995
|
*/
|
|
1040
996
|
export function setModelLanguage(model: ITextModel, mimeTypeOrLanguageId: string): void;
|
|
1041
|
-
|
|
1042
997
|
/**
|
|
1043
998
|
* Set the markers for a model.
|
|
1044
999
|
*/
|
|
1045
1000
|
export function setModelMarkers(model: ITextModel, owner: string, markers: IMarkerData[]): void;
|
|
1046
|
-
|
|
1047
1001
|
/**
|
|
1048
1002
|
* Remove all markers of an owner.
|
|
1049
1003
|
*/
|
|
1050
1004
|
export function removeAllMarkers(owner: string): void;
|
|
1051
|
-
|
|
1052
1005
|
/**
|
|
1053
1006
|
* Get markers for owner and/or resource
|
|
1054
1007
|
*
|
|
@@ -1059,35 +1012,29 @@ export namespace editor {
|
|
|
1059
1012
|
resource?: Uri;
|
|
1060
1013
|
take?: number;
|
|
1061
1014
|
}): IMarker[];
|
|
1062
|
-
|
|
1063
1015
|
/**
|
|
1064
1016
|
* Emitted when markers change for a model.
|
|
1065
1017
|
* @event
|
|
1066
1018
|
*/
|
|
1067
1019
|
export function onDidChangeMarkers(listener: (e: readonly Uri[]) => void): IDisposable;
|
|
1068
|
-
|
|
1069
1020
|
/**
|
|
1070
1021
|
* Get the model that has `uri` if it exists.
|
|
1071
1022
|
*/
|
|
1072
1023
|
export function getModel(uri: Uri): ITextModel | null;
|
|
1073
|
-
|
|
1074
1024
|
/**
|
|
1075
1025
|
* Get all the created models.
|
|
1076
1026
|
*/
|
|
1077
1027
|
export function getModels(): ITextModel[];
|
|
1078
|
-
|
|
1079
1028
|
/**
|
|
1080
1029
|
* Emitted when a model is created.
|
|
1081
1030
|
* @event
|
|
1082
1031
|
*/
|
|
1083
1032
|
export function onDidCreateModel(listener: (model: ITextModel) => void): IDisposable;
|
|
1084
|
-
|
|
1085
1033
|
/**
|
|
1086
1034
|
* Emitted right before a model is disposed.
|
|
1087
1035
|
* @event
|
|
1088
1036
|
*/
|
|
1089
1037
|
export function onWillDisposeModel(listener: (model: ITextModel) => void): IDisposable;
|
|
1090
|
-
|
|
1091
1038
|
/**
|
|
1092
1039
|
* Emitted when a different language is set to a model.
|
|
1093
1040
|
* @event
|
|
@@ -1096,57 +1043,46 @@ export namespace editor {
|
|
|
1096
1043
|
readonly model: ITextModel;
|
|
1097
1044
|
readonly oldLanguage: string;
|
|
1098
1045
|
}) => void): IDisposable;
|
|
1099
|
-
|
|
1100
1046
|
/**
|
|
1101
1047
|
* Create a new web worker that has model syncing capabilities built in.
|
|
1102
1048
|
* Specify an AMD module to load that will `create` an object that will be proxied.
|
|
1103
1049
|
*/
|
|
1104
|
-
export function createWebWorker<T extends object>(opts:
|
|
1105
|
-
|
|
1050
|
+
export function createWebWorker<T extends object>(opts: IInternalWebWorkerOptions): MonacoWebWorker<T>;
|
|
1106
1051
|
/**
|
|
1107
1052
|
* Colorize the contents of `domNode` using attribute `data-lang`.
|
|
1108
1053
|
*/
|
|
1109
1054
|
export function colorizeElement(domNode: HTMLElement, options: IColorizerElementOptions): Promise<void>;
|
|
1110
|
-
|
|
1111
1055
|
/**
|
|
1112
1056
|
* Colorize `text` using language `languageId`.
|
|
1113
1057
|
*/
|
|
1114
1058
|
export function colorize(text: string, languageId: string, options: IColorizerOptions): Promise<string>;
|
|
1115
|
-
|
|
1116
1059
|
/**
|
|
1117
1060
|
* Colorize a line in a model.
|
|
1118
1061
|
*/
|
|
1119
1062
|
export function colorizeModelLine(model: ITextModel, lineNumber: number, tabSize?: number): string;
|
|
1120
|
-
|
|
1121
1063
|
/**
|
|
1122
1064
|
* Tokenize `text` using language `languageId`
|
|
1123
1065
|
*/
|
|
1124
1066
|
export function tokenize(text: string, languageId: string): Token[][];
|
|
1125
|
-
|
|
1126
1067
|
/**
|
|
1127
1068
|
* Define a new theme or update an existing theme.
|
|
1128
1069
|
*/
|
|
1129
1070
|
export function defineTheme(themeName: string, themeData: IStandaloneThemeData): void;
|
|
1130
|
-
|
|
1131
1071
|
/**
|
|
1132
1072
|
* Switches to a theme.
|
|
1133
1073
|
*/
|
|
1134
1074
|
export function setTheme(themeName: string): void;
|
|
1135
|
-
|
|
1136
1075
|
/**
|
|
1137
1076
|
* Clears all cached font measurements and triggers re-measurement.
|
|
1138
1077
|
*/
|
|
1139
1078
|
export function remeasureFonts(): void;
|
|
1140
|
-
|
|
1141
1079
|
/**
|
|
1142
1080
|
* Register a command.
|
|
1143
1081
|
*/
|
|
1144
1082
|
export function registerCommand(id: string, handler: (accessor: any, ...args: any[]) => void): IDisposable;
|
|
1145
|
-
|
|
1146
1083
|
export interface ILinkOpener {
|
|
1147
1084
|
open(resource: Uri): boolean | Promise<boolean>;
|
|
1148
1085
|
}
|
|
1149
|
-
|
|
1150
1086
|
/**
|
|
1151
1087
|
* 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.
|
|
1152
1088
|
* The handler that was registered last will be called first when a link is opened.
|
|
@@ -1154,7 +1090,6 @@ export namespace editor {
|
|
|
1154
1090
|
* Returns a disposable that can unregister the opener again.
|
|
1155
1091
|
*/
|
|
1156
1092
|
export function registerLinkOpener(opener: ILinkOpener): IDisposable;
|
|
1157
|
-
|
|
1158
1093
|
/**
|
|
1159
1094
|
* Represents an object that can handle editor open operations (e.g. when "go to definition" is called
|
|
1160
1095
|
* with a resource other than the current model).
|
|
@@ -1169,7 +1104,6 @@ export namespace editor {
|
|
|
1169
1104
|
*/
|
|
1170
1105
|
openCodeEditor(source: ICodeEditor, resource: Uri, selectionOrPosition?: IRange | IPosition): boolean | Promise<boolean>;
|
|
1171
1106
|
}
|
|
1172
|
-
|
|
1173
1107
|
/**
|
|
1174
1108
|
* 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").
|
|
1175
1109
|
* The handler callback should return `true` if the request was handled and `false` otherwise.
|
|
@@ -1179,9 +1113,7 @@ export namespace editor {
|
|
|
1179
1113
|
* If no handler is registered the default behavior is to do nothing for models other than the currently attached one.
|
|
1180
1114
|
*/
|
|
1181
1115
|
export function registerEditorOpener(opener: ICodeEditorOpener): IDisposable;
|
|
1182
|
-
|
|
1183
|
-
export type BuiltinTheme = 'vs' | 'vs-dark' | 'hc-black' | 'hc-light';
|
|
1184
|
-
|
|
1116
|
+
export type BuiltinTheme = "vs" | "vs-dark" | "hc-black" | "hc-light";
|
|
1185
1117
|
export interface IStandaloneThemeData {
|
|
1186
1118
|
base: BuiltinTheme;
|
|
1187
1119
|
inherit: boolean;
|
|
@@ -1189,18 +1121,15 @@ export namespace editor {
|
|
|
1189
1121
|
encodedTokensColors?: string[];
|
|
1190
1122
|
colors: IColors;
|
|
1191
1123
|
}
|
|
1192
|
-
|
|
1193
1124
|
export type IColors = {
|
|
1194
1125
|
[colorId: string]: string;
|
|
1195
1126
|
};
|
|
1196
|
-
|
|
1197
1127
|
export interface ITokenThemeRule {
|
|
1198
1128
|
token: string;
|
|
1199
1129
|
foreground?: string;
|
|
1200
1130
|
background?: string;
|
|
1201
1131
|
fontStyle?: string;
|
|
1202
1132
|
}
|
|
1203
|
-
|
|
1204
1133
|
/**
|
|
1205
1134
|
* A web worker that can provide a proxy to an arbitrary file.
|
|
1206
1135
|
*/
|
|
@@ -1219,21 +1148,11 @@ export namespace editor {
|
|
|
1219
1148
|
*/
|
|
1220
1149
|
withSyncedResources(resources: Uri[]): Promise<T>;
|
|
1221
1150
|
}
|
|
1222
|
-
|
|
1223
|
-
export interface IWebWorkerOptions {
|
|
1151
|
+
export interface IInternalWebWorkerOptions {
|
|
1224
1152
|
/**
|
|
1225
|
-
* The
|
|
1226
|
-
* It should export a function `create` that should return the exported proxy.
|
|
1153
|
+
* The worker.
|
|
1227
1154
|
*/
|
|
1228
|
-
|
|
1229
|
-
/**
|
|
1230
|
-
* The data to send over when calling create on the module.
|
|
1231
|
-
*/
|
|
1232
|
-
createData?: any;
|
|
1233
|
-
/**
|
|
1234
|
-
* A label to be used to identify the web worker for debugging purposes.
|
|
1235
|
-
*/
|
|
1236
|
-
label?: string;
|
|
1155
|
+
worker: Worker | Promise<Worker>;
|
|
1237
1156
|
/**
|
|
1238
1157
|
* An object that can be used by the web worker to make calls back to the main thread.
|
|
1239
1158
|
*/
|
|
@@ -1244,7 +1163,6 @@ export namespace editor {
|
|
|
1244
1163
|
*/
|
|
1245
1164
|
keepIdleModels?: boolean;
|
|
1246
1165
|
}
|
|
1247
|
-
|
|
1248
1166
|
/**
|
|
1249
1167
|
* Description of an action contribution
|
|
1250
1168
|
*/
|
|
@@ -1289,7 +1207,6 @@ export namespace editor {
|
|
|
1289
1207
|
*/
|
|
1290
1208
|
run(editor: ICodeEditor, ...args: any[]): void | Promise<void>;
|
|
1291
1209
|
}
|
|
1292
|
-
|
|
1293
1210
|
/**
|
|
1294
1211
|
* Options which apply for all editors.
|
|
1295
1212
|
*/
|
|
@@ -1325,7 +1242,7 @@ export namespace editor {
|
|
|
1325
1242
|
* Controls whether completions should be computed based on words in the document.
|
|
1326
1243
|
* Defaults to true.
|
|
1327
1244
|
*/
|
|
1328
|
-
wordBasedSuggestions?:
|
|
1245
|
+
wordBasedSuggestions?: "off" | "currentDocument" | "matchingDocuments" | "allDocuments";
|
|
1329
1246
|
/**
|
|
1330
1247
|
* Controls whether word based completions should be included from opened documents of the same language or any language.
|
|
1331
1248
|
*/
|
|
@@ -1337,7 +1254,7 @@ export namespace editor {
|
|
|
1337
1254
|
* 'configuredByTheme': semanticHighlighting is controlled by the current color theme's semanticHighlighting setting.
|
|
1338
1255
|
* Defaults to 'byTheme'.
|
|
1339
1256
|
*/
|
|
1340
|
-
|
|
1257
|
+
"semanticHighlighting.enabled"?: true | false | "configuredByTheme";
|
|
1341
1258
|
/**
|
|
1342
1259
|
* Keep peek editors open even when double-clicking their content or when hitting `Escape`.
|
|
1343
1260
|
* Defaults to false.
|
|
@@ -1362,7 +1279,6 @@ export namespace editor {
|
|
|
1362
1279
|
*/
|
|
1363
1280
|
autoDetectHighContrast?: boolean;
|
|
1364
1281
|
}
|
|
1365
|
-
|
|
1366
1282
|
/**
|
|
1367
1283
|
* The options to create an editor.
|
|
1368
1284
|
*/
|
|
@@ -1407,7 +1323,6 @@ export namespace editor {
|
|
|
1407
1323
|
*/
|
|
1408
1324
|
ariaContainerElement?: HTMLElement;
|
|
1409
1325
|
}
|
|
1410
|
-
|
|
1411
1326
|
/**
|
|
1412
1327
|
* The options to create a diff editor.
|
|
1413
1328
|
*/
|
|
@@ -1426,14 +1341,12 @@ export namespace editor {
|
|
|
1426
1341
|
*/
|
|
1427
1342
|
autoDetectHighContrast?: boolean;
|
|
1428
1343
|
}
|
|
1429
|
-
|
|
1430
1344
|
export interface IStandaloneCodeEditor extends ICodeEditor {
|
|
1431
1345
|
updateOptions(newOptions: IEditorOptions & IGlobalEditorOptions): void;
|
|
1432
1346
|
addCommand(keybinding: number, handler: ICommandHandler, context?: string): string | null;
|
|
1433
1347
|
createContextKey<T extends ContextKeyValue = ContextKeyValue>(key: string, defaultValue: T): IContextKey<T>;
|
|
1434
1348
|
addAction(descriptor: IActionDescriptor): IDisposable;
|
|
1435
1349
|
}
|
|
1436
|
-
|
|
1437
1350
|
export interface IStandaloneDiffEditor extends IDiffEditor {
|
|
1438
1351
|
addCommand(keybinding: number, handler: ICommandHandler, context?: string): string | null;
|
|
1439
1352
|
createContextKey<T extends ContextKeyValue = ContextKeyValue>(key: string, defaultValue: T): IContextKey<T>;
|
|
@@ -1451,19 +1364,15 @@ export namespace editor {
|
|
|
1451
1364
|
export interface ICommandMetadata {
|
|
1452
1365
|
readonly description: ILocalizedString | string;
|
|
1453
1366
|
}
|
|
1454
|
-
|
|
1455
1367
|
export interface IContextKey<T extends ContextKeyValue = ContextKeyValue> {
|
|
1456
1368
|
set(value: T): void;
|
|
1457
1369
|
reset(): void;
|
|
1458
1370
|
get(): T | undefined;
|
|
1459
1371
|
}
|
|
1460
|
-
|
|
1461
1372
|
export type ContextKeyValue = null | undefined | boolean | number | string | Array<null | undefined | boolean | number | string> | Record<string, null | undefined | boolean | number | string>;
|
|
1462
|
-
|
|
1463
1373
|
export interface IEditorOverrideServices {
|
|
1464
1374
|
[index: string]: any;
|
|
1465
1375
|
}
|
|
1466
|
-
|
|
1467
1376
|
export interface IMarker {
|
|
1468
1377
|
owner: string;
|
|
1469
1378
|
resource: Uri;
|
|
@@ -1481,8 +1390,8 @@ export namespace editor {
|
|
|
1481
1390
|
modelVersionId?: number;
|
|
1482
1391
|
relatedInformation?: IRelatedInformation[];
|
|
1483
1392
|
tags?: MarkerTag[];
|
|
1393
|
+
origin?: string | undefined;
|
|
1484
1394
|
}
|
|
1485
|
-
|
|
1486
1395
|
/**
|
|
1487
1396
|
* A structure defining a problem/warning/etc.
|
|
1488
1397
|
*/
|
|
@@ -1501,8 +1410,8 @@ export namespace editor {
|
|
|
1501
1410
|
modelVersionId?: number;
|
|
1502
1411
|
relatedInformation?: IRelatedInformation[];
|
|
1503
1412
|
tags?: MarkerTag[];
|
|
1413
|
+
origin?: string | undefined;
|
|
1504
1414
|
}
|
|
1505
|
-
|
|
1506
1415
|
/**
|
|
1507
1416
|
*
|
|
1508
1417
|
*/
|
|
@@ -1514,26 +1423,25 @@ export namespace editor {
|
|
|
1514
1423
|
endLineNumber: number;
|
|
1515
1424
|
endColumn: number;
|
|
1516
1425
|
}
|
|
1517
|
-
|
|
1518
1426
|
export interface IColorizerOptions {
|
|
1519
1427
|
tabSize?: number;
|
|
1520
1428
|
}
|
|
1521
|
-
|
|
1522
1429
|
export interface IColorizerElementOptions extends IColorizerOptions {
|
|
1523
1430
|
theme?: string;
|
|
1524
1431
|
mimeType?: string;
|
|
1525
1432
|
}
|
|
1526
|
-
|
|
1527
1433
|
export enum ScrollbarVisibility {
|
|
1528
1434
|
Auto = 1,
|
|
1529
1435
|
Hidden = 2,
|
|
1530
1436
|
Visible = 3
|
|
1531
1437
|
}
|
|
1532
|
-
|
|
1533
1438
|
export interface ThemeColor {
|
|
1534
1439
|
id: string;
|
|
1535
1440
|
}
|
|
1536
|
-
|
|
1441
|
+
export interface ThemeIcon {
|
|
1442
|
+
readonly id: string;
|
|
1443
|
+
readonly color?: ThemeColor;
|
|
1444
|
+
}
|
|
1537
1445
|
/**
|
|
1538
1446
|
* A single edit operation, that acts as a simple replace.
|
|
1539
1447
|
* i.e. Replace text at `range` with `text` in model.
|
|
@@ -1553,7 +1461,6 @@ export namespace editor {
|
|
|
1553
1461
|
*/
|
|
1554
1462
|
forceMoveMarkers?: boolean;
|
|
1555
1463
|
}
|
|
1556
|
-
|
|
1557
1464
|
/**
|
|
1558
1465
|
* Word inside a model.
|
|
1559
1466
|
*/
|
|
@@ -1571,7 +1478,6 @@ export namespace editor {
|
|
|
1571
1478
|
*/
|
|
1572
1479
|
readonly endColumn: number;
|
|
1573
1480
|
}
|
|
1574
|
-
|
|
1575
1481
|
/**
|
|
1576
1482
|
* Vertical Lane in the overview ruler of the editor.
|
|
1577
1483
|
*/
|
|
@@ -1581,7 +1487,6 @@ export namespace editor {
|
|
|
1581
1487
|
Right = 4,
|
|
1582
1488
|
Full = 7
|
|
1583
1489
|
}
|
|
1584
|
-
|
|
1585
1490
|
/**
|
|
1586
1491
|
* Vertical Lane in the glyph margin of the editor.
|
|
1587
1492
|
*/
|
|
@@ -1590,7 +1495,6 @@ export namespace editor {
|
|
|
1590
1495
|
Center = 2,
|
|
1591
1496
|
Right = 3
|
|
1592
1497
|
}
|
|
1593
|
-
|
|
1594
1498
|
export interface IGlyphMarginLanesModel {
|
|
1595
1499
|
/**
|
|
1596
1500
|
* The number of lanes that should be rendered in the editor.
|
|
@@ -1611,7 +1515,6 @@ export namespace editor {
|
|
|
1611
1515
|
*/
|
|
1612
1516
|
push(lane: GlyphMarginLane, range: Range, persist?: boolean): void;
|
|
1613
1517
|
}
|
|
1614
|
-
|
|
1615
1518
|
/**
|
|
1616
1519
|
* Position in the minimap to render the decoration.
|
|
1617
1520
|
*/
|
|
@@ -1619,7 +1522,6 @@ export namespace editor {
|
|
|
1619
1522
|
Inline = 1,
|
|
1620
1523
|
Gutter = 2
|
|
1621
1524
|
}
|
|
1622
|
-
|
|
1623
1525
|
/**
|
|
1624
1526
|
* Section header style.
|
|
1625
1527
|
*/
|
|
@@ -1627,7 +1529,6 @@ export namespace editor {
|
|
|
1627
1529
|
Normal = 1,
|
|
1628
1530
|
Underlined = 2
|
|
1629
1531
|
}
|
|
1630
|
-
|
|
1631
1532
|
export interface IDecorationOptions {
|
|
1632
1533
|
/**
|
|
1633
1534
|
* CSS color to render.
|
|
@@ -1640,7 +1541,6 @@ export namespace editor {
|
|
|
1640
1541
|
*/
|
|
1641
1542
|
darkColor?: string | ThemeColor;
|
|
1642
1543
|
}
|
|
1643
|
-
|
|
1644
1544
|
export interface IModelDecorationGlyphMarginOptions {
|
|
1645
1545
|
/**
|
|
1646
1546
|
* The position in the glyph margin.
|
|
@@ -1652,7 +1552,6 @@ export namespace editor {
|
|
|
1652
1552
|
*/
|
|
1653
1553
|
persistLane?: boolean;
|
|
1654
1554
|
}
|
|
1655
|
-
|
|
1656
1555
|
/**
|
|
1657
1556
|
* Options for rendering a model decoration in the overview ruler.
|
|
1658
1557
|
*/
|
|
@@ -1662,7 +1561,6 @@ export namespace editor {
|
|
|
1662
1561
|
*/
|
|
1663
1562
|
position: OverviewRulerLane;
|
|
1664
1563
|
}
|
|
1665
|
-
|
|
1666
1564
|
/**
|
|
1667
1565
|
* Options for rendering a model decoration in the minimap.
|
|
1668
1566
|
*/
|
|
@@ -1680,7 +1578,6 @@ export namespace editor {
|
|
|
1680
1578
|
*/
|
|
1681
1579
|
sectionHeaderText?: string | null;
|
|
1682
1580
|
}
|
|
1683
|
-
|
|
1684
1581
|
/**
|
|
1685
1582
|
* Options for a model decoration.
|
|
1686
1583
|
*/
|
|
@@ -1705,7 +1602,12 @@ export namespace editor {
|
|
|
1705
1602
|
*/
|
|
1706
1603
|
blockIsAfterEnd?: boolean | null;
|
|
1707
1604
|
blockDoesNotCollapse?: boolean | null;
|
|
1708
|
-
blockPadding?: [
|
|
1605
|
+
blockPadding?: [
|
|
1606
|
+
top: number,
|
|
1607
|
+
right: number,
|
|
1608
|
+
bottom: number,
|
|
1609
|
+
left: number
|
|
1610
|
+
] | null;
|
|
1709
1611
|
/**
|
|
1710
1612
|
* Message to be rendered when hovering over the glyph margin decoration.
|
|
1711
1613
|
*/
|
|
@@ -1749,6 +1651,26 @@ export namespace editor {
|
|
|
1749
1651
|
* with the specified {@link IModelDecorationGlyphMarginOptions} in the glyph margin.
|
|
1750
1652
|
*/
|
|
1751
1653
|
glyphMargin?: IModelDecorationGlyphMarginOptions | null;
|
|
1654
|
+
/**
|
|
1655
|
+
* If set, the decoration will override the line height of the lines it spans. Maximum value is 300px.
|
|
1656
|
+
*/
|
|
1657
|
+
lineHeight?: number | null;
|
|
1658
|
+
/**
|
|
1659
|
+
* Font family
|
|
1660
|
+
*/
|
|
1661
|
+
fontFamily?: string | null;
|
|
1662
|
+
/**
|
|
1663
|
+
* Font size
|
|
1664
|
+
*/
|
|
1665
|
+
fontSize?: string | null;
|
|
1666
|
+
/**
|
|
1667
|
+
* Font weight
|
|
1668
|
+
*/
|
|
1669
|
+
fontWeight?: string | null;
|
|
1670
|
+
/**
|
|
1671
|
+
* Font style
|
|
1672
|
+
*/
|
|
1673
|
+
fontStyle?: string | null;
|
|
1752
1674
|
/**
|
|
1753
1675
|
* If set, the decoration will be rendered in the lines decorations with this CSS class name.
|
|
1754
1676
|
*/
|
|
@@ -1795,8 +1717,18 @@ export namespace editor {
|
|
|
1795
1717
|
* If set, text will be injected in the view before the range.
|
|
1796
1718
|
*/
|
|
1797
1719
|
before?: InjectedTextOptions | null;
|
|
1720
|
+
/**
|
|
1721
|
+
* The text direction of the decoration.
|
|
1722
|
+
*/
|
|
1723
|
+
textDirection?: TextDirection | null;
|
|
1724
|
+
}
|
|
1725
|
+
/**
|
|
1726
|
+
* Text Direction for a decoration.
|
|
1727
|
+
*/
|
|
1728
|
+
export enum TextDirection {
|
|
1729
|
+
LTR = 0,
|
|
1730
|
+
RTL = 1
|
|
1798
1731
|
}
|
|
1799
|
-
|
|
1800
1732
|
/**
|
|
1801
1733
|
* Configures text that is injected into the view without changing the underlying document.
|
|
1802
1734
|
*/
|
|
@@ -1824,14 +1756,12 @@ export namespace editor {
|
|
|
1824
1756
|
*/
|
|
1825
1757
|
readonly cursorStops?: InjectedTextCursorStops | null;
|
|
1826
1758
|
}
|
|
1827
|
-
|
|
1828
1759
|
export enum InjectedTextCursorStops {
|
|
1829
1760
|
Both = 0,
|
|
1830
1761
|
Right = 1,
|
|
1831
1762
|
Left = 2,
|
|
1832
1763
|
None = 3
|
|
1833
1764
|
}
|
|
1834
|
-
|
|
1835
1765
|
/**
|
|
1836
1766
|
* New model decorations.
|
|
1837
1767
|
*/
|
|
@@ -1845,7 +1775,6 @@ export namespace editor {
|
|
|
1845
1775
|
*/
|
|
1846
1776
|
options: IModelDecorationOptions;
|
|
1847
1777
|
}
|
|
1848
|
-
|
|
1849
1778
|
/**
|
|
1850
1779
|
* A decoration in the model.
|
|
1851
1780
|
*/
|
|
@@ -1867,7 +1796,6 @@ export namespace editor {
|
|
|
1867
1796
|
*/
|
|
1868
1797
|
readonly options: IModelDecorationOptions;
|
|
1869
1798
|
}
|
|
1870
|
-
|
|
1871
1799
|
/**
|
|
1872
1800
|
* End of line character preference.
|
|
1873
1801
|
*/
|
|
@@ -1885,7 +1813,6 @@ export namespace editor {
|
|
|
1885
1813
|
*/
|
|
1886
1814
|
CRLF = 2
|
|
1887
1815
|
}
|
|
1888
|
-
|
|
1889
1816
|
/**
|
|
1890
1817
|
* The default end of line to use when instantiating models.
|
|
1891
1818
|
*/
|
|
@@ -1899,7 +1826,6 @@ export namespace editor {
|
|
|
1899
1826
|
*/
|
|
1900
1827
|
CRLF = 2
|
|
1901
1828
|
}
|
|
1902
|
-
|
|
1903
1829
|
/**
|
|
1904
1830
|
* End of line character preference.
|
|
1905
1831
|
*/
|
|
@@ -1913,13 +1839,11 @@ export namespace editor {
|
|
|
1913
1839
|
*/
|
|
1914
1840
|
CRLF = 1
|
|
1915
1841
|
}
|
|
1916
|
-
|
|
1917
1842
|
/**
|
|
1918
1843
|
* A single edit operation, that has an identifier.
|
|
1919
1844
|
*/
|
|
1920
1845
|
export interface IIdentifiedSingleEditOperation extends ISingleEditOperation {
|
|
1921
1846
|
}
|
|
1922
|
-
|
|
1923
1847
|
export interface IValidEditOperation {
|
|
1924
1848
|
/**
|
|
1925
1849
|
* The range to replace. This can be empty to emulate a simple insert.
|
|
@@ -1930,7 +1854,6 @@ export namespace editor {
|
|
|
1930
1854
|
*/
|
|
1931
1855
|
text: string;
|
|
1932
1856
|
}
|
|
1933
|
-
|
|
1934
1857
|
/**
|
|
1935
1858
|
* A callback that can compute the cursor state after applying a series of edit operations.
|
|
1936
1859
|
*/
|
|
@@ -1940,7 +1863,6 @@ export namespace editor {
|
|
|
1940
1863
|
*/
|
|
1941
1864
|
(inverseEditOperations: IValidEditOperation[]): Selection[] | null;
|
|
1942
1865
|
}
|
|
1943
|
-
|
|
1944
1866
|
export class TextModelResolvedOptions {
|
|
1945
1867
|
_textModelResolvedOptionsBrand: void;
|
|
1946
1868
|
readonly tabSize: number;
|
|
@@ -1949,28 +1871,24 @@ export namespace editor {
|
|
|
1949
1871
|
readonly defaultEOL: DefaultEndOfLine;
|
|
1950
1872
|
readonly trimAutoWhitespace: boolean;
|
|
1951
1873
|
readonly bracketPairColorizationOptions: BracketPairColorizationOptions;
|
|
1952
|
-
get originalIndentSize(): number |
|
|
1874
|
+
get originalIndentSize(): number | "tabSize";
|
|
1953
1875
|
}
|
|
1954
|
-
|
|
1955
1876
|
export interface BracketPairColorizationOptions {
|
|
1956
1877
|
enabled: boolean;
|
|
1957
1878
|
independentColorPoolPerBracketType: boolean;
|
|
1958
1879
|
}
|
|
1959
|
-
|
|
1960
1880
|
export interface ITextModelUpdateOptions {
|
|
1961
1881
|
tabSize?: number;
|
|
1962
|
-
indentSize?: number |
|
|
1882
|
+
indentSize?: number | "tabSize";
|
|
1963
1883
|
insertSpaces?: boolean;
|
|
1964
1884
|
trimAutoWhitespace?: boolean;
|
|
1965
1885
|
bracketColorizationOptions?: BracketPairColorizationOptions;
|
|
1966
1886
|
}
|
|
1967
|
-
|
|
1968
1887
|
export class FindMatch {
|
|
1969
1888
|
_findMatchBrand: void;
|
|
1970
1889
|
readonly range: Range;
|
|
1971
1890
|
readonly matches: string[] | null;
|
|
1972
1891
|
}
|
|
1973
|
-
|
|
1974
1892
|
/**
|
|
1975
1893
|
* Describes the behavior of decorations when typing/editing near their edges.
|
|
1976
1894
|
* Note: Please do not edit the values, as they very carefully match `DecorationRangeBehavior`
|
|
@@ -1981,7 +1899,6 @@ export namespace editor {
|
|
|
1981
1899
|
GrowsOnlyWhenTypingBefore = 2,
|
|
1982
1900
|
GrowsOnlyWhenTypingAfter = 3
|
|
1983
1901
|
}
|
|
1984
|
-
|
|
1985
1902
|
/**
|
|
1986
1903
|
* Text snapshot that works like an iterator.
|
|
1987
1904
|
* Will try to return chunks of roughly ~64KB size.
|
|
@@ -1990,7 +1907,6 @@ export namespace editor {
|
|
|
1990
1907
|
export interface ITextSnapshot {
|
|
1991
1908
|
read(): string | null;
|
|
1992
1909
|
}
|
|
1993
|
-
|
|
1994
1910
|
/**
|
|
1995
1911
|
* A model.
|
|
1996
1912
|
*/
|
|
@@ -2120,6 +2036,10 @@ export namespace editor {
|
|
|
2120
2036
|
* Create a valid range.
|
|
2121
2037
|
*/
|
|
2122
2038
|
validateRange(range: IRange): Range;
|
|
2039
|
+
/**
|
|
2040
|
+
* Verifies the range is valid.
|
|
2041
|
+
*/
|
|
2042
|
+
isValidRange(range: IRange): boolean;
|
|
2123
2043
|
/**
|
|
2124
2044
|
* Converts the position to a zero-based offset.
|
|
2125
2045
|
*
|
|
@@ -2234,35 +2154,39 @@ export namespace editor {
|
|
|
2234
2154
|
* @param lineNumber The line number
|
|
2235
2155
|
* @param ownerId If set, it will ignore decorations belonging to other owners.
|
|
2236
2156
|
* @param filterOutValidation If set, it will ignore decorations specific to validation (i.e. warnings, errors).
|
|
2157
|
+
* @param filterFontDecorations If set, it will ignore font decorations.
|
|
2237
2158
|
* @return An array with the decorations
|
|
2238
2159
|
*/
|
|
2239
|
-
getLineDecorations(lineNumber: number, ownerId?: number, filterOutValidation?: boolean): IModelDecoration[];
|
|
2160
|
+
getLineDecorations(lineNumber: number, ownerId?: number, filterOutValidation?: boolean, filterFontDecorations?: boolean): IModelDecoration[];
|
|
2240
2161
|
/**
|
|
2241
2162
|
* Gets all the decorations for the lines between `startLineNumber` and `endLineNumber` as an array.
|
|
2242
2163
|
* @param startLineNumber The start line number
|
|
2243
2164
|
* @param endLineNumber The end line number
|
|
2244
2165
|
* @param ownerId If set, it will ignore decorations belonging to other owners.
|
|
2245
2166
|
* @param filterOutValidation If set, it will ignore decorations specific to validation (i.e. warnings, errors).
|
|
2167
|
+
* @param filterFontDecorations If set, it will ignore font decorations.
|
|
2246
2168
|
* @return An array with the decorations
|
|
2247
2169
|
*/
|
|
2248
|
-
getLinesDecorations(startLineNumber: number, endLineNumber: number, ownerId?: number, filterOutValidation?: boolean): IModelDecoration[];
|
|
2170
|
+
getLinesDecorations(startLineNumber: number, endLineNumber: number, ownerId?: number, filterOutValidation?: boolean, filterFontDecorations?: boolean): IModelDecoration[];
|
|
2249
2171
|
/**
|
|
2250
2172
|
* Gets all the decorations in a range as an array. Only `startLineNumber` and `endLineNumber` from `range` are used for filtering.
|
|
2251
2173
|
* So for now it returns all the decorations on the same line as `range`.
|
|
2252
2174
|
* @param range The range to search in
|
|
2253
2175
|
* @param ownerId If set, it will ignore decorations belonging to other owners.
|
|
2254
2176
|
* @param filterOutValidation If set, it will ignore decorations specific to validation (i.e. warnings, errors).
|
|
2177
|
+
* @param filterFontDecorations If set, it will ignore font decorations.
|
|
2255
2178
|
* @param onlyMinimapDecorations If set, it will return only decorations that render in the minimap.
|
|
2256
2179
|
* @param onlyMarginDecorations If set, it will return only decorations that render in the glyph margin.
|
|
2257
2180
|
* @return An array with the decorations
|
|
2258
2181
|
*/
|
|
2259
|
-
getDecorationsInRange(range: IRange, ownerId?: number, filterOutValidation?: boolean, onlyMinimapDecorations?: boolean, onlyMarginDecorations?: boolean): IModelDecoration[];
|
|
2182
|
+
getDecorationsInRange(range: IRange, ownerId?: number, filterOutValidation?: boolean, filterFontDecorations?: boolean, onlyMinimapDecorations?: boolean, onlyMarginDecorations?: boolean): IModelDecoration[];
|
|
2260
2183
|
/**
|
|
2261
2184
|
* Gets all the decorations as an array.
|
|
2262
2185
|
* @param ownerId If set, it will ignore decorations belonging to other owners.
|
|
2263
2186
|
* @param filterOutValidation If set, it will ignore decorations specific to validation (i.e. warnings, errors).
|
|
2187
|
+
* @param filterFontDecorations If set, it will ignore font decorations.
|
|
2264
2188
|
*/
|
|
2265
|
-
getAllDecorations(ownerId?: number, filterOutValidation?: boolean): IModelDecoration[];
|
|
2189
|
+
getAllDecorations(ownerId?: number, filterOutValidation?: boolean, filterFontDecorations?: boolean): IModelDecoration[];
|
|
2266
2190
|
/**
|
|
2267
2191
|
* Gets all decorations that render in the glyph margin as an array.
|
|
2268
2192
|
* @param ownerId If set, it will ignore decorations belonging to other owners.
|
|
@@ -2272,13 +2196,19 @@ export namespace editor {
|
|
|
2272
2196
|
* Gets all the decorations that should be rendered in the overview ruler as an array.
|
|
2273
2197
|
* @param ownerId If set, it will ignore decorations belonging to other owners.
|
|
2274
2198
|
* @param filterOutValidation If set, it will ignore decorations specific to validation (i.e. warnings, errors).
|
|
2199
|
+
* @param filterFontDecorations If set, it will ignore font decorations.
|
|
2275
2200
|
*/
|
|
2276
|
-
getOverviewRulerDecorations(ownerId?: number, filterOutValidation?: boolean): IModelDecoration[];
|
|
2201
|
+
getOverviewRulerDecorations(ownerId?: number, filterOutValidation?: boolean, filterFontDecorations?: boolean): IModelDecoration[];
|
|
2277
2202
|
/**
|
|
2278
2203
|
* Gets all the decorations that contain injected text.
|
|
2279
2204
|
* @param ownerId If set, it will ignore decorations belonging to other owners.
|
|
2280
2205
|
*/
|
|
2281
2206
|
getInjectedTextDecorations(ownerId?: number): IModelDecoration[];
|
|
2207
|
+
/**
|
|
2208
|
+
* Gets all the decorations that contain custom line heights.
|
|
2209
|
+
* @param ownerId If set, it will ignore decorations belonging to other owners.
|
|
2210
|
+
*/
|
|
2211
|
+
getCustomLineHeightsDecorations(ownerId?: number): IModelDecoration[];
|
|
2282
2212
|
/**
|
|
2283
2213
|
* Normalize a string containing whitespace according to indentation rules (converts to spaces or to tabs).
|
|
2284
2214
|
*/
|
|
@@ -2321,14 +2251,32 @@ export namespace editor {
|
|
|
2321
2251
|
* @param operations The edit operations.
|
|
2322
2252
|
* @return If desired, the inverse edit operations, that, when applied, will bring the model back to the previous state.
|
|
2323
2253
|
*/
|
|
2324
|
-
applyEdits(operations: IIdentifiedSingleEditOperation[]): void;
|
|
2325
|
-
applyEdits(operations: IIdentifiedSingleEditOperation[], computeUndoEdits: false): void;
|
|
2326
|
-
applyEdits(operations: IIdentifiedSingleEditOperation[], computeUndoEdits: true): IValidEditOperation[];
|
|
2254
|
+
applyEdits(operations: readonly IIdentifiedSingleEditOperation[]): void;
|
|
2255
|
+
applyEdits(operations: readonly IIdentifiedSingleEditOperation[], computeUndoEdits: false): void;
|
|
2256
|
+
applyEdits(operations: readonly IIdentifiedSingleEditOperation[], computeUndoEdits: true): IValidEditOperation[];
|
|
2327
2257
|
/**
|
|
2328
2258
|
* Change the end of line sequence without recording in the undo stack.
|
|
2329
2259
|
* This can have dire consequences on the undo stack! See @pushEOL for the preferred way.
|
|
2330
2260
|
*/
|
|
2331
2261
|
setEOL(eol: EndOfLineSequence): void;
|
|
2262
|
+
/**
|
|
2263
|
+
* Undo edit operations until the previous undo/redo point.
|
|
2264
|
+
* The inverse edit operations will be pushed on the redo stack.
|
|
2265
|
+
*/
|
|
2266
|
+
undo(): void | Promise<void>;
|
|
2267
|
+
/**
|
|
2268
|
+
* Is there anything in the undo stack?
|
|
2269
|
+
*/
|
|
2270
|
+
canUndo(): boolean;
|
|
2271
|
+
/**
|
|
2272
|
+
* Redo edit operations until the next undo/redo point.
|
|
2273
|
+
* The inverse edit operations will be pushed on the undo stack.
|
|
2274
|
+
*/
|
|
2275
|
+
redo(): void | Promise<void>;
|
|
2276
|
+
/**
|
|
2277
|
+
* Is there anything in the redo stack?
|
|
2278
|
+
*/
|
|
2279
|
+
canRedo(): boolean;
|
|
2332
2280
|
/**
|
|
2333
2281
|
* An event emitted when the contents of the model have changed.
|
|
2334
2282
|
* @event
|
|
@@ -2373,7 +2321,6 @@ export namespace editor {
|
|
|
2373
2321
|
*/
|
|
2374
2322
|
isAttachedToEditor(): boolean;
|
|
2375
2323
|
}
|
|
2376
|
-
|
|
2377
2324
|
export enum PositionAffinity {
|
|
2378
2325
|
/**
|
|
2379
2326
|
* Prefers the left most position.
|
|
@@ -2396,7 +2343,6 @@ export namespace editor {
|
|
|
2396
2343
|
*/
|
|
2397
2344
|
RightOfInjectedText = 4
|
|
2398
2345
|
}
|
|
2399
|
-
|
|
2400
2346
|
/**
|
|
2401
2347
|
* A change
|
|
2402
2348
|
*/
|
|
@@ -2406,7 +2352,6 @@ export namespace editor {
|
|
|
2406
2352
|
readonly modifiedStartLineNumber: number;
|
|
2407
2353
|
readonly modifiedEndLineNumber: number;
|
|
2408
2354
|
}
|
|
2409
|
-
|
|
2410
2355
|
/**
|
|
2411
2356
|
* A character level change.
|
|
2412
2357
|
*/
|
|
@@ -2416,7 +2361,6 @@ export namespace editor {
|
|
|
2416
2361
|
readonly modifiedStartColumn: number;
|
|
2417
2362
|
readonly modifiedEndColumn: number;
|
|
2418
2363
|
}
|
|
2419
|
-
|
|
2420
2364
|
/**
|
|
2421
2365
|
* A line change
|
|
2422
2366
|
*/
|
|
@@ -2427,7 +2371,6 @@ export namespace editor {
|
|
|
2427
2371
|
width: number;
|
|
2428
2372
|
height: number;
|
|
2429
2373
|
}
|
|
2430
|
-
|
|
2431
2374
|
/**
|
|
2432
2375
|
* A builder and helper for edit operations for a command.
|
|
2433
2376
|
*/
|
|
@@ -2456,7 +2399,6 @@ export namespace editor {
|
|
|
2456
2399
|
*/
|
|
2457
2400
|
trackSelection(selection: Selection, trackPreviousOnEmpty?: boolean): string;
|
|
2458
2401
|
}
|
|
2459
|
-
|
|
2460
2402
|
/**
|
|
2461
2403
|
* A helper for computing cursor state after a command.
|
|
2462
2404
|
*/
|
|
@@ -2472,7 +2414,6 @@ export namespace editor {
|
|
|
2472
2414
|
*/
|
|
2473
2415
|
getTrackedSelection(id: string): Selection;
|
|
2474
2416
|
}
|
|
2475
|
-
|
|
2476
2417
|
/**
|
|
2477
2418
|
* A command that modifies text / cursor state on a model.
|
|
2478
2419
|
*/
|
|
@@ -2491,7 +2432,6 @@ export namespace editor {
|
|
|
2491
2432
|
*/
|
|
2492
2433
|
computeCursorState(model: ITextModel, helper: ICursorStateComputerData): Selection;
|
|
2493
2434
|
}
|
|
2494
|
-
|
|
2495
2435
|
/**
|
|
2496
2436
|
* A model for the diff editor.
|
|
2497
2437
|
*/
|
|
@@ -2505,12 +2445,10 @@ export namespace editor {
|
|
|
2505
2445
|
*/
|
|
2506
2446
|
modified: ITextModel;
|
|
2507
2447
|
}
|
|
2508
|
-
|
|
2509
2448
|
export interface IDiffEditorViewModel extends IDisposable {
|
|
2510
2449
|
readonly model: IDiffEditorModel;
|
|
2511
2450
|
waitForDiff(): Promise<void>;
|
|
2512
2451
|
}
|
|
2513
|
-
|
|
2514
2452
|
/**
|
|
2515
2453
|
* An event describing that an editor has had its model reset (i.e. `editor.setModel()`).
|
|
2516
2454
|
*/
|
|
@@ -2524,19 +2462,16 @@ export namespace editor {
|
|
|
2524
2462
|
*/
|
|
2525
2463
|
readonly newModelUrl: Uri | null;
|
|
2526
2464
|
}
|
|
2527
|
-
|
|
2528
2465
|
export interface IContentSizeChangedEvent {
|
|
2529
2466
|
readonly contentWidth: number;
|
|
2530
2467
|
readonly contentHeight: number;
|
|
2531
2468
|
readonly contentWidthChanged: boolean;
|
|
2532
2469
|
readonly contentHeightChanged: boolean;
|
|
2533
2470
|
}
|
|
2534
|
-
|
|
2535
2471
|
export interface INewScrollPosition {
|
|
2536
2472
|
scrollLeft?: number;
|
|
2537
2473
|
scrollTop?: number;
|
|
2538
2474
|
}
|
|
2539
|
-
|
|
2540
2475
|
export interface IEditorAction {
|
|
2541
2476
|
readonly id: string;
|
|
2542
2477
|
readonly label: string;
|
|
@@ -2545,9 +2480,7 @@ export namespace editor {
|
|
|
2545
2480
|
isSupported(): boolean;
|
|
2546
2481
|
run(args?: unknown): Promise<void>;
|
|
2547
2482
|
}
|
|
2548
|
-
|
|
2549
2483
|
export type IEditorModel = ITextModel | IDiffEditorModel | IDiffEditorViewModel;
|
|
2550
|
-
|
|
2551
2484
|
/**
|
|
2552
2485
|
* A (serializable) state of the cursors.
|
|
2553
2486
|
*/
|
|
@@ -2556,7 +2489,6 @@ export namespace editor {
|
|
|
2556
2489
|
selectionStart: IPosition;
|
|
2557
2490
|
position: IPosition;
|
|
2558
2491
|
}
|
|
2559
|
-
|
|
2560
2492
|
/**
|
|
2561
2493
|
* A (serializable) state of the view.
|
|
2562
2494
|
*/
|
|
@@ -2569,7 +2501,6 @@ export namespace editor {
|
|
|
2569
2501
|
firstPosition: IPosition;
|
|
2570
2502
|
firstPositionDeltaTop: number;
|
|
2571
2503
|
}
|
|
2572
|
-
|
|
2573
2504
|
/**
|
|
2574
2505
|
* A (serializable) state of the code editor.
|
|
2575
2506
|
*/
|
|
@@ -2580,7 +2511,6 @@ export namespace editor {
|
|
|
2580
2511
|
[id: string]: any;
|
|
2581
2512
|
};
|
|
2582
2513
|
}
|
|
2583
|
-
|
|
2584
2514
|
/**
|
|
2585
2515
|
* (Serializable) View state for the diff editor.
|
|
2586
2516
|
*/
|
|
@@ -2589,17 +2519,14 @@ export namespace editor {
|
|
|
2589
2519
|
modified: ICodeEditorViewState | null;
|
|
2590
2520
|
modelState?: unknown;
|
|
2591
2521
|
}
|
|
2592
|
-
|
|
2593
2522
|
/**
|
|
2594
2523
|
* An editor view state.
|
|
2595
2524
|
*/
|
|
2596
2525
|
export type IEditorViewState = ICodeEditorViewState | IDiffEditorViewState;
|
|
2597
|
-
|
|
2598
2526
|
export enum ScrollType {
|
|
2599
2527
|
Smooth = 0,
|
|
2600
2528
|
Immediate = 1
|
|
2601
2529
|
}
|
|
2602
|
-
|
|
2603
2530
|
/**
|
|
2604
2531
|
* An editor.
|
|
2605
2532
|
*/
|
|
@@ -2813,7 +2740,6 @@ export namespace editor {
|
|
|
2813
2740
|
*/
|
|
2814
2741
|
createDecorationsCollection(decorations?: IModelDeltaDecoration[]): IEditorDecorationsCollection;
|
|
2815
2742
|
}
|
|
2816
|
-
|
|
2817
2743
|
/**
|
|
2818
2744
|
* A collection of decorations
|
|
2819
2745
|
*/
|
|
@@ -2852,7 +2778,6 @@ export namespace editor {
|
|
|
2852
2778
|
*/
|
|
2853
2779
|
clear(): void;
|
|
2854
2780
|
}
|
|
2855
|
-
|
|
2856
2781
|
/**
|
|
2857
2782
|
* An editor contribution that gets created every time a new editor gets created and gets disposed when the editor gets disposed.
|
|
2858
2783
|
*/
|
|
@@ -2870,7 +2795,6 @@ export namespace editor {
|
|
|
2870
2795
|
*/
|
|
2871
2796
|
restoreViewState?(state: any): void;
|
|
2872
2797
|
}
|
|
2873
|
-
|
|
2874
2798
|
/**
|
|
2875
2799
|
* The type of the `IEditor`.
|
|
2876
2800
|
*/
|
|
@@ -2878,7 +2802,6 @@ export namespace editor {
|
|
|
2878
2802
|
ICodeEditor: string;
|
|
2879
2803
|
IDiffEditor: string;
|
|
2880
2804
|
};
|
|
2881
|
-
|
|
2882
2805
|
/**
|
|
2883
2806
|
* An event describing that the current language associated with a model has changed.
|
|
2884
2807
|
*/
|
|
@@ -2896,16 +2819,14 @@ export namespace editor {
|
|
|
2896
2819
|
*/
|
|
2897
2820
|
readonly source: string;
|
|
2898
2821
|
}
|
|
2899
|
-
|
|
2900
2822
|
/**
|
|
2901
2823
|
* An event describing that the language configuration associated with a model has changed.
|
|
2902
2824
|
*/
|
|
2903
2825
|
export interface IModelLanguageConfigurationChangedEvent {
|
|
2904
2826
|
}
|
|
2905
|
-
|
|
2906
2827
|
export interface IModelContentChange {
|
|
2907
2828
|
/**
|
|
2908
|
-
* The range that got replaced.
|
|
2829
|
+
* The old range that got replaced.
|
|
2909
2830
|
*/
|
|
2910
2831
|
readonly range: IRange;
|
|
2911
2832
|
/**
|
|
@@ -2921,7 +2842,6 @@ export namespace editor {
|
|
|
2921
2842
|
*/
|
|
2922
2843
|
readonly text: string;
|
|
2923
2844
|
}
|
|
2924
|
-
|
|
2925
2845
|
/**
|
|
2926
2846
|
* An event describing a change in the text of a model.
|
|
2927
2847
|
*/
|
|
@@ -2955,8 +2875,43 @@ export namespace editor {
|
|
|
2955
2875
|
* Flag that indicates that this event describes an eol change.
|
|
2956
2876
|
*/
|
|
2957
2877
|
readonly isEolChange: boolean;
|
|
2878
|
+
/**
|
|
2879
|
+
* The sum of these lengths equals changes.length.
|
|
2880
|
+
* The length of this array must equal the length of detailedReasons.
|
|
2881
|
+
*/
|
|
2882
|
+
readonly detailedReasonsChangeLengths: number[];
|
|
2883
|
+
}
|
|
2884
|
+
export interface ISerializedModelContentChangedEvent {
|
|
2885
|
+
/**
|
|
2886
|
+
* The changes are ordered from the end of the document to the beginning, so they should be safe to apply in sequence.
|
|
2887
|
+
*/
|
|
2888
|
+
readonly changes: IModelContentChange[];
|
|
2889
|
+
/**
|
|
2890
|
+
* The (new) end-of-line character.
|
|
2891
|
+
*/
|
|
2892
|
+
readonly eol: string;
|
|
2893
|
+
/**
|
|
2894
|
+
* The new version id the model has transitioned to.
|
|
2895
|
+
*/
|
|
2896
|
+
readonly versionId: number;
|
|
2897
|
+
/**
|
|
2898
|
+
* Flag that indicates that this event was generated while undoing.
|
|
2899
|
+
*/
|
|
2900
|
+
readonly isUndoing: boolean;
|
|
2901
|
+
/**
|
|
2902
|
+
* Flag that indicates that this event was generated while redoing.
|
|
2903
|
+
*/
|
|
2904
|
+
readonly isRedoing: boolean;
|
|
2905
|
+
/**
|
|
2906
|
+
* Flag that indicates that all decorations were lost with this edit.
|
|
2907
|
+
* The model has been reset to a new value.
|
|
2908
|
+
*/
|
|
2909
|
+
readonly isFlush: boolean;
|
|
2910
|
+
/**
|
|
2911
|
+
* Flag that indicates that this event describes an eol change.
|
|
2912
|
+
*/
|
|
2913
|
+
readonly isEolChange: boolean;
|
|
2958
2914
|
}
|
|
2959
|
-
|
|
2960
2915
|
/**
|
|
2961
2916
|
* An event describing that model decorations have changed.
|
|
2962
2917
|
*/
|
|
@@ -2966,14 +2921,12 @@ export namespace editor {
|
|
|
2966
2921
|
readonly affectsGlyphMargin: boolean;
|
|
2967
2922
|
readonly affectsLineNumber: boolean;
|
|
2968
2923
|
}
|
|
2969
|
-
|
|
2970
2924
|
export interface IModelOptionsChangedEvent {
|
|
2971
2925
|
readonly tabSize: boolean;
|
|
2972
2926
|
readonly indentSize: boolean;
|
|
2973
2927
|
readonly insertSpaces: boolean;
|
|
2974
2928
|
readonly trimAutoWhitespace: boolean;
|
|
2975
2929
|
}
|
|
2976
|
-
|
|
2977
2930
|
/**
|
|
2978
2931
|
* Describes the reason the cursor has changed its position.
|
|
2979
2932
|
*/
|
|
@@ -3007,7 +2960,6 @@ export namespace editor {
|
|
|
3007
2960
|
*/
|
|
3008
2961
|
Redo = 6
|
|
3009
2962
|
}
|
|
3010
|
-
|
|
3011
2963
|
/**
|
|
3012
2964
|
* An event describing that the cursor position has changed.
|
|
3013
2965
|
*/
|
|
@@ -3029,7 +2981,6 @@ export namespace editor {
|
|
|
3029
2981
|
*/
|
|
3030
2982
|
readonly source: string;
|
|
3031
2983
|
}
|
|
3032
|
-
|
|
3033
2984
|
/**
|
|
3034
2985
|
* An event describing that the cursor selection has changed.
|
|
3035
2986
|
*/
|
|
@@ -3063,7 +3014,6 @@ export namespace editor {
|
|
|
3063
3014
|
*/
|
|
3064
3015
|
readonly reason: CursorChangeReason;
|
|
3065
3016
|
}
|
|
3066
|
-
|
|
3067
3017
|
export enum AccessibilitySupport {
|
|
3068
3018
|
/**
|
|
3069
3019
|
* This should be the browser case where it is not known if a screen reader is attached or no.
|
|
@@ -3072,22 +3022,18 @@ export namespace editor {
|
|
|
3072
3022
|
Disabled = 1,
|
|
3073
3023
|
Enabled = 2
|
|
3074
3024
|
}
|
|
3075
|
-
|
|
3076
3025
|
/**
|
|
3077
3026
|
* Configuration options for auto closing quotes and brackets
|
|
3078
3027
|
*/
|
|
3079
|
-
export type EditorAutoClosingStrategy =
|
|
3080
|
-
|
|
3028
|
+
export type EditorAutoClosingStrategy = "always" | "languageDefined" | "beforeWhitespace" | "never";
|
|
3081
3029
|
/**
|
|
3082
3030
|
* Configuration options for auto wrapping quotes and brackets
|
|
3083
3031
|
*/
|
|
3084
|
-
export type EditorAutoSurroundStrategy =
|
|
3085
|
-
|
|
3032
|
+
export type EditorAutoSurroundStrategy = "languageDefined" | "quotes" | "brackets" | "never";
|
|
3086
3033
|
/**
|
|
3087
3034
|
* Configuration options for typing over closing quotes or brackets
|
|
3088
3035
|
*/
|
|
3089
|
-
export type EditorAutoClosingEditStrategy =
|
|
3090
|
-
|
|
3036
|
+
export type EditorAutoClosingEditStrategy = "always" | "auto" | "never";
|
|
3091
3037
|
/**
|
|
3092
3038
|
* Configuration options for auto indentation in the editor
|
|
3093
3039
|
*/
|
|
@@ -3098,7 +3044,6 @@ export namespace editor {
|
|
|
3098
3044
|
Advanced = 3,
|
|
3099
3045
|
Full = 4
|
|
3100
3046
|
}
|
|
3101
|
-
|
|
3102
3047
|
/**
|
|
3103
3048
|
* Configuration options for the editor.
|
|
3104
3049
|
*/
|
|
@@ -3107,6 +3052,18 @@ export namespace editor {
|
|
|
3107
3052
|
* This editor is used inside a diff editor.
|
|
3108
3053
|
*/
|
|
3109
3054
|
inDiffEditor?: boolean;
|
|
3055
|
+
/**
|
|
3056
|
+
* This editor is allowed to use variable line heights.
|
|
3057
|
+
*/
|
|
3058
|
+
allowVariableLineHeights?: boolean;
|
|
3059
|
+
/**
|
|
3060
|
+
* This editor is allowed to use variable font-sizes and font-families
|
|
3061
|
+
*/
|
|
3062
|
+
allowVariableFonts?: boolean;
|
|
3063
|
+
/**
|
|
3064
|
+
* This editor is allowed to use variable font-sizes and font-families in accessibility mode
|
|
3065
|
+
*/
|
|
3066
|
+
allowVariableFontsInAccessibilityMode?: boolean;
|
|
3110
3067
|
/**
|
|
3111
3068
|
* The aria label for the editor's textarea (when it is focused).
|
|
3112
3069
|
*/
|
|
@@ -3163,17 +3120,17 @@ export namespace editor {
|
|
|
3163
3120
|
* Defaults to `default`, `cursorSurroundingLines` is not enforced when cursor position is changed
|
|
3164
3121
|
* by mouse.
|
|
3165
3122
|
*/
|
|
3166
|
-
cursorSurroundingLinesStyle?:
|
|
3123
|
+
cursorSurroundingLinesStyle?: "default" | "all";
|
|
3167
3124
|
/**
|
|
3168
3125
|
* Render last line number when the file ends with a newline.
|
|
3169
3126
|
* Defaults to 'on' for Windows and macOS and 'dimmed' for Linux.
|
|
3170
3127
|
*/
|
|
3171
|
-
renderFinalNewline?:
|
|
3128
|
+
renderFinalNewline?: "on" | "off" | "dimmed";
|
|
3172
3129
|
/**
|
|
3173
3130
|
* Remove unusual line terminators like LINE SEPARATOR (LS), PARAGRAPH SEPARATOR (PS).
|
|
3174
3131
|
* Defaults to 'prompt'.
|
|
3175
3132
|
*/
|
|
3176
|
-
unusualLineTerminators?:
|
|
3133
|
+
unusualLineTerminators?: "auto" | "off" | "prompt";
|
|
3177
3134
|
/**
|
|
3178
3135
|
* Should the corresponding line be selected when clicking on the line number?
|
|
3179
3136
|
* Defaults to true.
|
|
@@ -3238,7 +3195,7 @@ export namespace editor {
|
|
|
3238
3195
|
* Should the editor render validation decorations.
|
|
3239
3196
|
* Defaults to editable.
|
|
3240
3197
|
*/
|
|
3241
|
-
renderValidationDecorations?:
|
|
3198
|
+
renderValidationDecorations?: "editable" | "on" | "off";
|
|
3242
3199
|
/**
|
|
3243
3200
|
* Control the behavior and rendering of the scrollbars.
|
|
3244
3201
|
*/
|
|
@@ -3260,6 +3217,11 @@ export namespace editor {
|
|
|
3260
3217
|
* Defaults to `false`.
|
|
3261
3218
|
*/
|
|
3262
3219
|
fixedOverflowWidgets?: boolean;
|
|
3220
|
+
/**
|
|
3221
|
+
* Allow content widgets and overflow widgets to overflow the editor viewport.
|
|
3222
|
+
* Defaults to `true`.
|
|
3223
|
+
*/
|
|
3224
|
+
allowOverflow?: boolean;
|
|
3263
3225
|
/**
|
|
3264
3226
|
* The number of vertical lanes the overview ruler should render.
|
|
3265
3227
|
* Defaults to 3.
|
|
@@ -3274,7 +3236,7 @@ export namespace editor {
|
|
|
3274
3236
|
* Control the cursor animation style, possible values are 'blink', 'smooth', 'phase', 'expand' and 'solid'.
|
|
3275
3237
|
* Defaults to 'blink'.
|
|
3276
3238
|
*/
|
|
3277
|
-
cursorBlinking?:
|
|
3239
|
+
cursorBlinking?: "blink" | "smooth" | "phase" | "expand" | "solid";
|
|
3278
3240
|
/**
|
|
3279
3241
|
* Zoom the font in the editor when using the mouse wheel in combination with holding Ctrl.
|
|
3280
3242
|
* Defaults to false.
|
|
@@ -3284,21 +3246,34 @@ export namespace editor {
|
|
|
3284
3246
|
* Control the mouse pointer style, either 'text' or 'default' or 'copy'
|
|
3285
3247
|
* Defaults to 'text'
|
|
3286
3248
|
*/
|
|
3287
|
-
mouseStyle?:
|
|
3249
|
+
mouseStyle?: "text" | "default" | "copy";
|
|
3288
3250
|
/**
|
|
3289
3251
|
* Enable smooth caret animation.
|
|
3290
3252
|
* Defaults to 'off'.
|
|
3291
3253
|
*/
|
|
3292
|
-
cursorSmoothCaretAnimation?:
|
|
3254
|
+
cursorSmoothCaretAnimation?: "off" | "explicit" | "on";
|
|
3293
3255
|
/**
|
|
3294
|
-
* Control the cursor style
|
|
3256
|
+
* Control the cursor style in insert mode.
|
|
3295
3257
|
* Defaults to 'line'.
|
|
3296
3258
|
*/
|
|
3297
|
-
cursorStyle?:
|
|
3259
|
+
cursorStyle?: "line" | "block" | "underline" | "line-thin" | "block-outline" | "underline-thin";
|
|
3260
|
+
/**
|
|
3261
|
+
* Control the cursor style in overtype mode.
|
|
3262
|
+
* Defaults to 'block'.
|
|
3263
|
+
*/
|
|
3264
|
+
overtypeCursorStyle?: "line" | "block" | "underline" | "line-thin" | "block-outline" | "underline-thin";
|
|
3265
|
+
/**
|
|
3266
|
+
* Controls whether paste in overtype mode should overwrite or insert.
|
|
3267
|
+
*/
|
|
3268
|
+
overtypeOnPaste?: boolean;
|
|
3298
3269
|
/**
|
|
3299
3270
|
* Control the width of the cursor when cursorStyle is set to 'line'
|
|
3300
3271
|
*/
|
|
3301
3272
|
cursorWidth?: number;
|
|
3273
|
+
/**
|
|
3274
|
+
* Control the height of the cursor when cursorStyle is set to 'line'
|
|
3275
|
+
*/
|
|
3276
|
+
cursorHeight?: number;
|
|
3302
3277
|
/**
|
|
3303
3278
|
* Enable font ligatures.
|
|
3304
3279
|
* Defaults to false.
|
|
@@ -3312,7 +3287,7 @@ export namespace editor {
|
|
|
3312
3287
|
/**
|
|
3313
3288
|
* Controls whether to use default color decorations or not using the default document color provider
|
|
3314
3289
|
*/
|
|
3315
|
-
defaultColorDecorators?:
|
|
3290
|
+
defaultColorDecorators?: "auto" | "always" | "never";
|
|
3316
3291
|
/**
|
|
3317
3292
|
* Disable the use of `transform: translate3d(0px, 0px, 0px)` for the editor margin and lines layers.
|
|
3318
3293
|
* The usage of `transform: translate3d(0px, 0px, 0px)` acts as a hint for browsers to create an extra layer.
|
|
@@ -3334,6 +3309,10 @@ export namespace editor {
|
|
|
3334
3309
|
* Defaults to true.
|
|
3335
3310
|
*/
|
|
3336
3311
|
scrollBeyondLastLine?: boolean;
|
|
3312
|
+
/**
|
|
3313
|
+
* Scroll editor on middle click
|
|
3314
|
+
*/
|
|
3315
|
+
scrollOnMiddleClick?: boolean;
|
|
3337
3316
|
/**
|
|
3338
3317
|
* Enable that scrolling can go beyond the last column by a number of columns.
|
|
3339
3318
|
* Defaults to 5.
|
|
@@ -3357,15 +3336,15 @@ export namespace editor {
|
|
|
3357
3336
|
* When `wordWrap` = "bounded", the lines will wrap at min(viewport width, wordWrapColumn).
|
|
3358
3337
|
* Defaults to "off".
|
|
3359
3338
|
*/
|
|
3360
|
-
wordWrap?:
|
|
3339
|
+
wordWrap?: "off" | "on" | "wordWrapColumn" | "bounded";
|
|
3361
3340
|
/**
|
|
3362
3341
|
* Override the `wordWrap` setting.
|
|
3363
3342
|
*/
|
|
3364
|
-
wordWrapOverride1?:
|
|
3343
|
+
wordWrapOverride1?: "off" | "on" | "inherit";
|
|
3365
3344
|
/**
|
|
3366
3345
|
* Override the `wordWrapOverride1` setting.
|
|
3367
3346
|
*/
|
|
3368
|
-
wordWrapOverride2?:
|
|
3347
|
+
wordWrapOverride2?: "off" | "on" | "inherit";
|
|
3369
3348
|
/**
|
|
3370
3349
|
* Control the wrapping of the editor.
|
|
3371
3350
|
* When `wordWrap` = "off", the lines will never wrap.
|
|
@@ -3379,12 +3358,17 @@ export namespace editor {
|
|
|
3379
3358
|
* Control indentation of wrapped lines. Can be: 'none', 'same', 'indent' or 'deepIndent'.
|
|
3380
3359
|
* Defaults to 'same' in vscode and to 'none' in monaco-editor.
|
|
3381
3360
|
*/
|
|
3382
|
-
wrappingIndent?:
|
|
3361
|
+
wrappingIndent?: "none" | "same" | "indent" | "deepIndent";
|
|
3383
3362
|
/**
|
|
3384
3363
|
* Controls the wrapping strategy to use.
|
|
3385
3364
|
* Defaults to 'simple'.
|
|
3386
3365
|
*/
|
|
3387
|
-
wrappingStrategy?:
|
|
3366
|
+
wrappingStrategy?: "simple" | "advanced";
|
|
3367
|
+
/**
|
|
3368
|
+
* Create a softwrap on every quoted "\n" literal.
|
|
3369
|
+
* Defaults to false.
|
|
3370
|
+
*/
|
|
3371
|
+
wrapOnEscapedLineFeeds?: boolean;
|
|
3388
3372
|
/**
|
|
3389
3373
|
* Configure word wrapping characters. A break will be introduced before these characters.
|
|
3390
3374
|
*/
|
|
@@ -3398,7 +3382,7 @@ export namespace editor {
|
|
|
3398
3382
|
* When wordBreak = 'normal', Use the default line break rule.
|
|
3399
3383
|
* 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.
|
|
3400
3384
|
*/
|
|
3401
|
-
wordBreak?:
|
|
3385
|
+
wordBreak?: "normal" | "keepAll";
|
|
3402
3386
|
/**
|
|
3403
3387
|
* Performance guard: Stop rendering a line after x characters.
|
|
3404
3388
|
* Defaults to 10000.
|
|
@@ -3421,7 +3405,7 @@ export namespace editor {
|
|
|
3421
3405
|
/**
|
|
3422
3406
|
* Controls what is the condition to spawn a color picker from a color dectorator
|
|
3423
3407
|
*/
|
|
3424
|
-
colorDecoratorsActivatedOn?:
|
|
3408
|
+
colorDecoratorsActivatedOn?: "clickAndHover" | "click" | "hover";
|
|
3425
3409
|
/**
|
|
3426
3410
|
* Controls the max number of color decorators that can be rendered in an editor at once.
|
|
3427
3411
|
*/
|
|
@@ -3450,6 +3434,10 @@ export namespace editor {
|
|
|
3450
3434
|
* Defaults to true.
|
|
3451
3435
|
*/
|
|
3452
3436
|
scrollPredominantAxis?: boolean;
|
|
3437
|
+
/**
|
|
3438
|
+
* Make scrolling inertial - mostly useful with touchpad on linux.
|
|
3439
|
+
*/
|
|
3440
|
+
inertialScroll?: boolean;
|
|
3453
3441
|
/**
|
|
3454
3442
|
* Enable that the selection with the mouse and keys is doing column selection.
|
|
3455
3443
|
* Defaults to false.
|
|
@@ -3459,7 +3447,7 @@ export namespace editor {
|
|
|
3459
3447
|
* The modifier to be used to add multiple cursors with the mouse.
|
|
3460
3448
|
* Defaults to 'alt'
|
|
3461
3449
|
*/
|
|
3462
|
-
multiCursorModifier?:
|
|
3450
|
+
multiCursorModifier?: "ctrlCmd" | "alt";
|
|
3463
3451
|
/**
|
|
3464
3452
|
* Merge overlapping selections.
|
|
3465
3453
|
* Defaults to true
|
|
@@ -3469,7 +3457,7 @@ export namespace editor {
|
|
|
3469
3457
|
* Configure the behaviour when pasting a text with the line count equal to the cursor count.
|
|
3470
3458
|
* Defaults to 'spread'.
|
|
3471
3459
|
*/
|
|
3472
|
-
multiCursorPaste?:
|
|
3460
|
+
multiCursorPaste?: "spread" | "full";
|
|
3473
3461
|
/**
|
|
3474
3462
|
* Controls the max number of text cursors that can be in an active editor at once.
|
|
3475
3463
|
*/
|
|
@@ -3478,7 +3466,7 @@ export namespace editor {
|
|
|
3478
3466
|
* Configure the editor's accessibility support.
|
|
3479
3467
|
* Defaults to 'auto'. It is best to leave this to 'auto'.
|
|
3480
3468
|
*/
|
|
3481
|
-
accessibilitySupport?:
|
|
3469
|
+
accessibilitySupport?: "auto" | "off" | "on";
|
|
3482
3470
|
/**
|
|
3483
3471
|
* Controls the number of lines in the editor that can be read out by a screen reader
|
|
3484
3472
|
*/
|
|
@@ -3488,7 +3476,6 @@ export namespace editor {
|
|
|
3488
3476
|
*/
|
|
3489
3477
|
suggest?: ISuggestOptions;
|
|
3490
3478
|
inlineSuggest?: IInlineSuggestOptions;
|
|
3491
|
-
experimentalInlineEdit?: IInlineEditOptions;
|
|
3492
3479
|
/**
|
|
3493
3480
|
* Smart select options.
|
|
3494
3481
|
*/
|
|
@@ -3547,7 +3534,15 @@ export namespace editor {
|
|
|
3547
3534
|
* Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.
|
|
3548
3535
|
* Defaults to advanced.
|
|
3549
3536
|
*/
|
|
3550
|
-
autoIndent?:
|
|
3537
|
+
autoIndent?: "none" | "keep" | "brackets" | "advanced" | "full";
|
|
3538
|
+
/**
|
|
3539
|
+
* Boolean which controls whether to autoindent on paste
|
|
3540
|
+
*/
|
|
3541
|
+
autoIndentOnPaste?: boolean;
|
|
3542
|
+
/**
|
|
3543
|
+
* Boolean which controls whether to autoindent on paste within a string when autoIndentOnPaste is enabled.
|
|
3544
|
+
*/
|
|
3545
|
+
autoIndentOnPasteWithinString?: boolean;
|
|
3551
3546
|
/**
|
|
3552
3547
|
* Emulate selection behaviour of tab characters when using spaces for indentation.
|
|
3553
3548
|
* This means selection will stick to tab stops.
|
|
@@ -3577,7 +3572,7 @@ export namespace editor {
|
|
|
3577
3572
|
* Accept suggestions on ENTER.
|
|
3578
3573
|
* Defaults to 'on'.
|
|
3579
3574
|
*/
|
|
3580
|
-
acceptSuggestionOnEnter?:
|
|
3575
|
+
acceptSuggestionOnEnter?: "on" | "smart" | "off";
|
|
3581
3576
|
/**
|
|
3582
3577
|
* Accept suggestions on provider defined characters.
|
|
3583
3578
|
* Defaults to true.
|
|
@@ -3586,7 +3581,7 @@ export namespace editor {
|
|
|
3586
3581
|
/**
|
|
3587
3582
|
* Enable snippet suggestions. Default to 'true'.
|
|
3588
3583
|
*/
|
|
3589
|
-
snippetSuggestions?:
|
|
3584
|
+
snippetSuggestions?: "top" | "bottom" | "inline" | "none";
|
|
3590
3585
|
/**
|
|
3591
3586
|
* Copying without a selection copies the current line.
|
|
3592
3587
|
*/
|
|
@@ -3598,7 +3593,7 @@ export namespace editor {
|
|
|
3598
3593
|
/**
|
|
3599
3594
|
* The history mode for suggestions.
|
|
3600
3595
|
*/
|
|
3601
|
-
suggestSelection?:
|
|
3596
|
+
suggestSelection?: "first" | "recentlyUsed" | "recentlyUsedByPrefix";
|
|
3602
3597
|
/**
|
|
3603
3598
|
* The font size for the suggest widget.
|
|
3604
3599
|
* Defaults to the editor font size.
|
|
@@ -3612,12 +3607,22 @@ export namespace editor {
|
|
|
3612
3607
|
/**
|
|
3613
3608
|
* Enable tab completion.
|
|
3614
3609
|
*/
|
|
3615
|
-
tabCompletion?:
|
|
3610
|
+
tabCompletion?: "on" | "off" | "onlySnippets";
|
|
3616
3611
|
/**
|
|
3617
3612
|
* Enable selection highlight.
|
|
3618
3613
|
* Defaults to true.
|
|
3619
3614
|
*/
|
|
3620
3615
|
selectionHighlight?: boolean;
|
|
3616
|
+
/**
|
|
3617
|
+
* Enable selection highlight for multiline selections.
|
|
3618
|
+
* Defaults to false.
|
|
3619
|
+
*/
|
|
3620
|
+
selectionHighlightMultiline?: boolean;
|
|
3621
|
+
/**
|
|
3622
|
+
* Maximum length (in characters) for selection highlights.
|
|
3623
|
+
* Set to 0 to have an unlimited length.
|
|
3624
|
+
*/
|
|
3625
|
+
selectionHighlightMaxLength?: number;
|
|
3621
3626
|
/**
|
|
3622
3627
|
* Enable semantic occurrences highlight.
|
|
3623
3628
|
* Defaults to 'singleFile'.
|
|
@@ -3625,7 +3630,14 @@ export namespace editor {
|
|
|
3625
3630
|
* 'singleFile' triggers occurrence highlighting in the current document
|
|
3626
3631
|
* 'multiFile' triggers occurrence highlighting across valid open documents
|
|
3627
3632
|
*/
|
|
3628
|
-
occurrencesHighlight?:
|
|
3633
|
+
occurrencesHighlight?: "off" | "singleFile" | "multiFile";
|
|
3634
|
+
/**
|
|
3635
|
+
* Controls delay for occurrences highlighting
|
|
3636
|
+
* Defaults to 250.
|
|
3637
|
+
* Minimum value is 0
|
|
3638
|
+
* Maximum value is 2000
|
|
3639
|
+
*/
|
|
3640
|
+
occurrencesHighlightDelay?: number;
|
|
3629
3641
|
/**
|
|
3630
3642
|
* Show code lens
|
|
3631
3643
|
* Defaults to true.
|
|
@@ -3656,7 +3668,7 @@ export namespace editor {
|
|
|
3656
3668
|
* Selects the folding strategy. 'auto' uses the strategies contributed for the current document, 'indentation' uses the indentation based folding strategy.
|
|
3657
3669
|
* Defaults to 'auto'.
|
|
3658
3670
|
*/
|
|
3659
|
-
foldingStrategy?:
|
|
3671
|
+
foldingStrategy?: "auto" | "indentation";
|
|
3660
3672
|
/**
|
|
3661
3673
|
* Enable highlight for folded regions.
|
|
3662
3674
|
* Defaults to true.
|
|
@@ -3676,7 +3688,7 @@ export namespace editor {
|
|
|
3676
3688
|
* Controls whether the fold actions in the gutter stay always visible or hide unless the mouse is over the gutter.
|
|
3677
3689
|
* Defaults to 'mouseover'.
|
|
3678
3690
|
*/
|
|
3679
|
-
showFoldingControls?:
|
|
3691
|
+
showFoldingControls?: "always" | "never" | "mouseover";
|
|
3680
3692
|
/**
|
|
3681
3693
|
* Controls whether clicking on the empty content after a folded line will unfold the line.
|
|
3682
3694
|
* Defaults to false.
|
|
@@ -3686,17 +3698,22 @@ export namespace editor {
|
|
|
3686
3698
|
* Enable highlighting of matching brackets.
|
|
3687
3699
|
* Defaults to 'always'.
|
|
3688
3700
|
*/
|
|
3689
|
-
matchBrackets?:
|
|
3701
|
+
matchBrackets?: "never" | "near" | "always";
|
|
3690
3702
|
/**
|
|
3691
|
-
* Enable experimental
|
|
3703
|
+
* Enable experimental rendering using WebGPU.
|
|
3704
|
+
* Defaults to 'off'.
|
|
3705
|
+
*/
|
|
3706
|
+
experimentalGpuAcceleration?: "on" | "off";
|
|
3707
|
+
/**
|
|
3708
|
+
* Enable experimental whitespace rendering.
|
|
3692
3709
|
* Defaults to 'svg'.
|
|
3693
3710
|
*/
|
|
3694
|
-
experimentalWhitespaceRendering?:
|
|
3711
|
+
experimentalWhitespaceRendering?: "svg" | "font" | "off";
|
|
3695
3712
|
/**
|
|
3696
3713
|
* Enable rendering of whitespace.
|
|
3697
3714
|
* Defaults to 'selection'.
|
|
3698
3715
|
*/
|
|
3699
|
-
renderWhitespace?:
|
|
3716
|
+
renderWhitespace?: "none" | "boundary" | "selection" | "trailing" | "all";
|
|
3700
3717
|
/**
|
|
3701
3718
|
* Enable rendering of control characters.
|
|
3702
3719
|
* Defaults to true.
|
|
@@ -3706,7 +3723,7 @@ export namespace editor {
|
|
|
3706
3723
|
* Enable rendering of current line highlight.
|
|
3707
3724
|
* Defaults to all.
|
|
3708
3725
|
*/
|
|
3709
|
-
renderLineHighlight?:
|
|
3726
|
+
renderLineHighlight?: "none" | "gutter" | "line" | "all";
|
|
3710
3727
|
/**
|
|
3711
3728
|
* Control if the current line highlight should be rendered only the editor is focused.
|
|
3712
3729
|
* Defaults to false.
|
|
@@ -3716,6 +3733,11 @@ export namespace editor {
|
|
|
3716
3733
|
* Inserting and deleting whitespace follows tab stops.
|
|
3717
3734
|
*/
|
|
3718
3735
|
useTabStops?: boolean;
|
|
3736
|
+
/**
|
|
3737
|
+
* Controls whether the editor should automatically remove indentation whitespace when joining lines with Delete.
|
|
3738
|
+
* Defaults to false.
|
|
3739
|
+
*/
|
|
3740
|
+
trimWhitespaceOnDelete?: boolean;
|
|
3719
3741
|
/**
|
|
3720
3742
|
* The font family
|
|
3721
3743
|
*/
|
|
@@ -3744,7 +3766,7 @@ export namespace editor {
|
|
|
3744
3766
|
* Controls whether to focus the inline editor in the peek widget by default.
|
|
3745
3767
|
* Defaults to false.
|
|
3746
3768
|
*/
|
|
3747
|
-
peekWidgetDefaultFocus?:
|
|
3769
|
+
peekWidgetDefaultFocus?: "tree" | "editor";
|
|
3748
3770
|
/**
|
|
3749
3771
|
* Sets a placeholder for the editor.
|
|
3750
3772
|
* If set, the placeholder is shown if the editor is empty.
|
|
@@ -3790,6 +3812,14 @@ export namespace editor {
|
|
|
3790
3812
|
* When enabled, this shows a preview of the drop location and triggers an `onDropIntoEditor` event.
|
|
3791
3813
|
*/
|
|
3792
3814
|
dropIntoEditor?: IDropIntoEditorOptions;
|
|
3815
|
+
/**
|
|
3816
|
+
* Sets whether the new experimental edit context should be used instead of the text area.
|
|
3817
|
+
*/
|
|
3818
|
+
editContext?: boolean;
|
|
3819
|
+
/**
|
|
3820
|
+
* Controls whether to render rich HTML screen reader content when the EditContext is enabled
|
|
3821
|
+
*/
|
|
3822
|
+
renderRichScreenReaderContent?: boolean;
|
|
3793
3823
|
/**
|
|
3794
3824
|
* Controls support for changing how content is pasted into the editor.
|
|
3795
3825
|
*/
|
|
@@ -3803,7 +3833,6 @@ export namespace editor {
|
|
|
3803
3833
|
*/
|
|
3804
3834
|
inlineCompletionsAccessibilityVerbose?: boolean;
|
|
3805
3835
|
}
|
|
3806
|
-
|
|
3807
3836
|
export interface IDiffEditorBaseOptions {
|
|
3808
3837
|
/**
|
|
3809
3838
|
* Allow the user to resize the diff editor split view.
|
|
@@ -3883,11 +3912,11 @@ export namespace editor {
|
|
|
3883
3912
|
/**
|
|
3884
3913
|
* Control the wrapping of the diff editor.
|
|
3885
3914
|
*/
|
|
3886
|
-
diffWordWrap?:
|
|
3915
|
+
diffWordWrap?: "off" | "on" | "inherit";
|
|
3887
3916
|
/**
|
|
3888
3917
|
* Diff Algorithm
|
|
3889
3918
|
*/
|
|
3890
|
-
diffAlgorithm?:
|
|
3919
|
+
diffAlgorithm?: "legacy" | "advanced";
|
|
3891
3920
|
/**
|
|
3892
3921
|
* Whether the diff editor aria label should be verbose.
|
|
3893
3922
|
*/
|
|
@@ -3919,27 +3948,23 @@ export namespace editor {
|
|
|
3919
3948
|
contextLineCount?: number;
|
|
3920
3949
|
};
|
|
3921
3950
|
}
|
|
3922
|
-
|
|
3923
3951
|
/**
|
|
3924
3952
|
* Configuration options for the diff editor.
|
|
3925
3953
|
*/
|
|
3926
3954
|
export interface IDiffEditorOptions extends IEditorOptions, IDiffEditorBaseOptions {
|
|
3927
3955
|
}
|
|
3928
|
-
|
|
3929
3956
|
/**
|
|
3930
3957
|
* An event describing that the configuration of the editor has changed.
|
|
3931
3958
|
*/
|
|
3932
3959
|
export class ConfigurationChangedEvent {
|
|
3933
3960
|
hasChanged(id: EditorOption): boolean;
|
|
3934
3961
|
}
|
|
3935
|
-
|
|
3936
3962
|
/**
|
|
3937
3963
|
* All computed editor options.
|
|
3938
3964
|
*/
|
|
3939
3965
|
export interface IComputedEditorOptions {
|
|
3940
3966
|
get<T extends EditorOption>(id: T): FindComputedEditorOptionValueById<T>;
|
|
3941
3967
|
}
|
|
3942
|
-
|
|
3943
3968
|
export interface IEditorOption<K extends EditorOption, V> {
|
|
3944
3969
|
readonly id: K;
|
|
3945
3970
|
readonly name: string;
|
|
@@ -3949,13 +3974,11 @@ export namespace editor {
|
|
|
3949
3974
|
*/
|
|
3950
3975
|
applyUpdate(value: V | undefined, update: V): ApplyUpdateResult<V>;
|
|
3951
3976
|
}
|
|
3952
|
-
|
|
3953
3977
|
export class ApplyUpdateResult<T> {
|
|
3954
3978
|
readonly newValue: T;
|
|
3955
3979
|
readonly didChange: boolean;
|
|
3956
3980
|
constructor(newValue: T, didChange: boolean);
|
|
3957
3981
|
}
|
|
3958
|
-
|
|
3959
3982
|
/**
|
|
3960
3983
|
* Configuration options for editor comments
|
|
3961
3984
|
*/
|
|
@@ -3971,7 +3994,6 @@ export namespace editor {
|
|
|
3971
3994
|
*/
|
|
3972
3995
|
ignoreEmptyLines?: boolean;
|
|
3973
3996
|
}
|
|
3974
|
-
|
|
3975
3997
|
/**
|
|
3976
3998
|
* The kind of animation in which the editor's cursor should be rendered.
|
|
3977
3999
|
*/
|
|
@@ -4001,7 +4023,6 @@ export namespace editor {
|
|
|
4001
4023
|
*/
|
|
4002
4024
|
Solid = 5
|
|
4003
4025
|
}
|
|
4004
|
-
|
|
4005
4026
|
/**
|
|
4006
4027
|
* The style in which the editor's cursor should be rendered.
|
|
4007
4028
|
*/
|
|
@@ -4031,7 +4052,6 @@ export namespace editor {
|
|
|
4031
4052
|
*/
|
|
4032
4053
|
UnderlineThin = 6
|
|
4033
4054
|
}
|
|
4034
|
-
|
|
4035
4055
|
/**
|
|
4036
4056
|
* Configuration options for editor find widget
|
|
4037
4057
|
*/
|
|
@@ -4040,23 +4060,25 @@ export namespace editor {
|
|
|
4040
4060
|
* Controls whether the cursor should move to find matches while typing.
|
|
4041
4061
|
*/
|
|
4042
4062
|
cursorMoveOnType?: boolean;
|
|
4063
|
+
/**
|
|
4064
|
+
* Controls whether the find widget should search as you type.
|
|
4065
|
+
*/
|
|
4066
|
+
findOnType?: boolean;
|
|
4043
4067
|
/**
|
|
4044
4068
|
* Controls if we seed search string in the Find Widget with editor selection.
|
|
4045
4069
|
*/
|
|
4046
|
-
seedSearchStringFromSelection?:
|
|
4070
|
+
seedSearchStringFromSelection?: "never" | "always" | "selection";
|
|
4047
4071
|
/**
|
|
4048
4072
|
* Controls if Find in Selection flag is turned on in the editor.
|
|
4049
4073
|
*/
|
|
4050
|
-
autoFindInSelection?:
|
|
4074
|
+
autoFindInSelection?: "never" | "always" | "multiline";
|
|
4051
4075
|
addExtraSpaceOnTop?: boolean;
|
|
4052
4076
|
/**
|
|
4053
4077
|
* Controls whether the search result and diff result automatically restarts from the beginning (or the end) when no further matches can be found
|
|
4054
4078
|
*/
|
|
4055
4079
|
loop?: boolean;
|
|
4056
4080
|
}
|
|
4057
|
-
|
|
4058
|
-
export type GoToLocationValues = 'peek' | 'gotoAndPeek' | 'goto';
|
|
4059
|
-
|
|
4081
|
+
export type GoToLocationValues = "peek" | "gotoAndPeek" | "goto";
|
|
4060
4082
|
/**
|
|
4061
4083
|
* Configuration options for go to location
|
|
4062
4084
|
*/
|
|
@@ -4075,7 +4097,6 @@ export namespace editor {
|
|
|
4075
4097
|
alternativeReferenceCommand?: string;
|
|
4076
4098
|
alternativeTestsCommand?: string;
|
|
4077
4099
|
}
|
|
4078
|
-
|
|
4079
4100
|
/**
|
|
4080
4101
|
* Configuration options for editor hover
|
|
4081
4102
|
*/
|
|
@@ -4106,7 +4127,6 @@ export namespace editor {
|
|
|
4106
4127
|
*/
|
|
4107
4128
|
above?: boolean;
|
|
4108
4129
|
}
|
|
4109
|
-
|
|
4110
4130
|
/**
|
|
4111
4131
|
* A description for the overview ruler position.
|
|
4112
4132
|
*/
|
|
@@ -4128,13 +4148,11 @@ export namespace editor {
|
|
|
4128
4148
|
*/
|
|
4129
4149
|
readonly right: number;
|
|
4130
4150
|
}
|
|
4131
|
-
|
|
4132
4151
|
export enum RenderMinimap {
|
|
4133
4152
|
None = 0,
|
|
4134
4153
|
Text = 1,
|
|
4135
4154
|
Blocks = 2
|
|
4136
4155
|
}
|
|
4137
|
-
|
|
4138
4156
|
/**
|
|
4139
4157
|
* The internal layout details of the editor.
|
|
4140
4158
|
*/
|
|
@@ -4207,7 +4225,6 @@ export namespace editor {
|
|
|
4207
4225
|
*/
|
|
4208
4226
|
readonly overviewRuler: OverviewRulerPosition;
|
|
4209
4227
|
}
|
|
4210
|
-
|
|
4211
4228
|
/**
|
|
4212
4229
|
* The internal layout details of the editor.
|
|
4213
4230
|
*/
|
|
@@ -4224,13 +4241,11 @@ export namespace editor {
|
|
|
4224
4241
|
readonly minimapCanvasOuterWidth: number;
|
|
4225
4242
|
readonly minimapCanvasOuterHeight: number;
|
|
4226
4243
|
}
|
|
4227
|
-
|
|
4228
4244
|
export enum ShowLightbulbIconMode {
|
|
4229
|
-
Off =
|
|
4230
|
-
OnCode =
|
|
4231
|
-
On =
|
|
4245
|
+
Off = "off",
|
|
4246
|
+
OnCode = "onCode",
|
|
4247
|
+
On = "on"
|
|
4232
4248
|
}
|
|
4233
|
-
|
|
4234
4249
|
/**
|
|
4235
4250
|
* Configuration options for editor lightbulb
|
|
4236
4251
|
*/
|
|
@@ -4244,7 +4259,6 @@ export namespace editor {
|
|
|
4244
4259
|
*/
|
|
4245
4260
|
enabled?: ShowLightbulbIconMode;
|
|
4246
4261
|
}
|
|
4247
|
-
|
|
4248
4262
|
export interface IEditorStickyScrollOptions {
|
|
4249
4263
|
/**
|
|
4250
4264
|
* Enable the sticky scroll
|
|
@@ -4257,13 +4271,12 @@ export namespace editor {
|
|
|
4257
4271
|
/**
|
|
4258
4272
|
* Model to choose for sticky scroll by default
|
|
4259
4273
|
*/
|
|
4260
|
-
defaultModel?:
|
|
4274
|
+
defaultModel?: "outlineModel" | "foldingProviderModel" | "indentationModel";
|
|
4261
4275
|
/**
|
|
4262
4276
|
* Define whether to scroll sticky scroll with editor horizontal scrollbae
|
|
4263
4277
|
*/
|
|
4264
4278
|
scrollWithEditor?: boolean;
|
|
4265
4279
|
}
|
|
4266
|
-
|
|
4267
4280
|
/**
|
|
4268
4281
|
* Configuration options for editor inlayHints
|
|
4269
4282
|
*/
|
|
@@ -4272,7 +4285,7 @@ export namespace editor {
|
|
|
4272
4285
|
* Enable the inline hints.
|
|
4273
4286
|
* Defaults to true.
|
|
4274
4287
|
*/
|
|
4275
|
-
enabled?:
|
|
4288
|
+
enabled?: "on" | "off" | "offUnlessPressed" | "onUnlessPressed";
|
|
4276
4289
|
/**
|
|
4277
4290
|
* Font size of inline hints.
|
|
4278
4291
|
* Default to 90% of the editor font size.
|
|
@@ -4288,8 +4301,12 @@ export namespace editor {
|
|
|
4288
4301
|
* Defaults to false.
|
|
4289
4302
|
*/
|
|
4290
4303
|
padding?: boolean;
|
|
4304
|
+
/**
|
|
4305
|
+
* Maximum length for inlay hints per line
|
|
4306
|
+
* Set to 0 to have an unlimited length.
|
|
4307
|
+
*/
|
|
4308
|
+
maximumLength?: number;
|
|
4291
4309
|
}
|
|
4292
|
-
|
|
4293
4310
|
/**
|
|
4294
4311
|
* Configuration options for editor minimap
|
|
4295
4312
|
*/
|
|
@@ -4302,22 +4319,22 @@ export namespace editor {
|
|
|
4302
4319
|
/**
|
|
4303
4320
|
* Control the rendering of minimap.
|
|
4304
4321
|
*/
|
|
4305
|
-
autohide?:
|
|
4322
|
+
autohide?: "none" | "mouseover" | "scroll";
|
|
4306
4323
|
/**
|
|
4307
4324
|
* Control the side of the minimap in editor.
|
|
4308
4325
|
* Defaults to 'right'.
|
|
4309
4326
|
*/
|
|
4310
|
-
side?:
|
|
4327
|
+
side?: "right" | "left";
|
|
4311
4328
|
/**
|
|
4312
4329
|
* Control the minimap rendering mode.
|
|
4313
4330
|
* Defaults to 'actual'.
|
|
4314
4331
|
*/
|
|
4315
|
-
size?:
|
|
4332
|
+
size?: "proportional" | "fill" | "fit";
|
|
4316
4333
|
/**
|
|
4317
4334
|
* Control the rendering of the minimap slider.
|
|
4318
4335
|
* Defaults to 'mouseover'.
|
|
4319
4336
|
*/
|
|
4320
|
-
showSlider?:
|
|
4337
|
+
showSlider?: "always" | "mouseover";
|
|
4321
4338
|
/**
|
|
4322
4339
|
* Render the actual text on a line (as opposed to color blocks).
|
|
4323
4340
|
* Defaults to true.
|
|
@@ -4340,6 +4357,17 @@ export namespace editor {
|
|
|
4340
4357
|
* Whether to show MARK: comments as section headers. Defaults to true.
|
|
4341
4358
|
*/
|
|
4342
4359
|
showMarkSectionHeaders?: boolean;
|
|
4360
|
+
/**
|
|
4361
|
+
* When specified, is used to create a custom section header parser regexp.
|
|
4362
|
+
* Must contain a match group named 'label' (written as (?<label>.+)) that encapsulates the section header.
|
|
4363
|
+
* Optionally can include another match group named 'separator'.
|
|
4364
|
+
* To match multi-line headers like:
|
|
4365
|
+
* // ==========
|
|
4366
|
+
* // My Section
|
|
4367
|
+
* // ==========
|
|
4368
|
+
* Use a pattern like: ^={3,}\n^\/\/ *(?<label>[^\n]*?)\n^={3,}$
|
|
4369
|
+
*/
|
|
4370
|
+
markSectionHeaderRegex?: string;
|
|
4343
4371
|
/**
|
|
4344
4372
|
* Font size of section headers. Defaults to 9.
|
|
4345
4373
|
*/
|
|
@@ -4349,7 +4377,6 @@ export namespace editor {
|
|
|
4349
4377
|
*/
|
|
4350
4378
|
sectionHeaderLetterSpacing?: number;
|
|
4351
4379
|
}
|
|
4352
|
-
|
|
4353
4380
|
/**
|
|
4354
4381
|
* Configuration options for editor padding
|
|
4355
4382
|
*/
|
|
@@ -4363,7 +4390,6 @@ export namespace editor {
|
|
|
4363
4390
|
*/
|
|
4364
4391
|
bottom?: number;
|
|
4365
4392
|
}
|
|
4366
|
-
|
|
4367
4393
|
/**
|
|
4368
4394
|
* Configuration options for parameter hints
|
|
4369
4395
|
*/
|
|
@@ -4379,9 +4405,7 @@ export namespace editor {
|
|
|
4379
4405
|
*/
|
|
4380
4406
|
cycle?: boolean;
|
|
4381
4407
|
}
|
|
4382
|
-
|
|
4383
|
-
export type QuickSuggestionsValue = 'on' | 'inline' | 'off';
|
|
4384
|
-
|
|
4408
|
+
export type QuickSuggestionsValue = "on" | "inline" | "off";
|
|
4385
4409
|
/**
|
|
4386
4410
|
* Configuration options for quick suggestions
|
|
4387
4411
|
*/
|
|
@@ -4390,15 +4414,12 @@ export namespace editor {
|
|
|
4390
4414
|
comments?: boolean | QuickSuggestionsValue;
|
|
4391
4415
|
strings?: boolean | QuickSuggestionsValue;
|
|
4392
4416
|
}
|
|
4393
|
-
|
|
4394
4417
|
export interface InternalQuickSuggestionsOptions {
|
|
4395
4418
|
readonly other: QuickSuggestionsValue;
|
|
4396
4419
|
readonly comments: QuickSuggestionsValue;
|
|
4397
4420
|
readonly strings: QuickSuggestionsValue;
|
|
4398
4421
|
}
|
|
4399
|
-
|
|
4400
|
-
export type LineNumbersType = 'on' | 'off' | 'relative' | 'interval' | ((lineNumber: number) => string);
|
|
4401
|
-
|
|
4422
|
+
export type LineNumbersType = "on" | "off" | "relative" | "interval" | ((lineNumber: number) => string);
|
|
4402
4423
|
export enum RenderLineNumbersType {
|
|
4403
4424
|
Off = 0,
|
|
4404
4425
|
On = 1,
|
|
@@ -4406,17 +4427,14 @@ export namespace editor {
|
|
|
4406
4427
|
Interval = 3,
|
|
4407
4428
|
Custom = 4
|
|
4408
4429
|
}
|
|
4409
|
-
|
|
4410
4430
|
export interface InternalEditorRenderLineNumbersOptions {
|
|
4411
4431
|
readonly renderType: RenderLineNumbersType;
|
|
4412
4432
|
readonly renderFn: ((lineNumber: number) => string) | null;
|
|
4413
4433
|
}
|
|
4414
|
-
|
|
4415
4434
|
export interface IRulerOption {
|
|
4416
4435
|
readonly column: number;
|
|
4417
4436
|
readonly color: string | null;
|
|
4418
4437
|
}
|
|
4419
|
-
|
|
4420
4438
|
/**
|
|
4421
4439
|
* Configuration options for editor scrollbars
|
|
4422
4440
|
*/
|
|
@@ -4431,12 +4449,12 @@ export namespace editor {
|
|
|
4431
4449
|
* Render vertical scrollbar.
|
|
4432
4450
|
* Defaults to 'auto'.
|
|
4433
4451
|
*/
|
|
4434
|
-
vertical?:
|
|
4452
|
+
vertical?: "auto" | "visible" | "hidden";
|
|
4435
4453
|
/**
|
|
4436
4454
|
* Render horizontal scrollbar.
|
|
4437
4455
|
* Defaults to 'auto'.
|
|
4438
4456
|
*/
|
|
4439
|
-
horizontal?:
|
|
4457
|
+
horizontal?: "auto" | "visible" | "hidden";
|
|
4440
4458
|
/**
|
|
4441
4459
|
* Cast horizontal and vertical shadows when the content is scrolled.
|
|
4442
4460
|
* Defaults to true.
|
|
@@ -4468,12 +4486,12 @@ export namespace editor {
|
|
|
4468
4486
|
alwaysConsumeMouseWheel?: boolean;
|
|
4469
4487
|
/**
|
|
4470
4488
|
* Height in pixels for the horizontal scrollbar.
|
|
4471
|
-
* Defaults to
|
|
4489
|
+
* Defaults to 12 (px).
|
|
4472
4490
|
*/
|
|
4473
4491
|
horizontalScrollbarSize?: number;
|
|
4474
4492
|
/**
|
|
4475
4493
|
* Width in pixels for the vertical scrollbar.
|
|
4476
|
-
* Defaults to
|
|
4494
|
+
* Defaults to 14 (px).
|
|
4477
4495
|
*/
|
|
4478
4496
|
verticalScrollbarSize?: number;
|
|
4479
4497
|
/**
|
|
@@ -4499,7 +4517,6 @@ export namespace editor {
|
|
|
4499
4517
|
*/
|
|
4500
4518
|
ignoreHorizontalScrollbarInContentHeight?: boolean;
|
|
4501
4519
|
}
|
|
4502
|
-
|
|
4503
4520
|
export interface InternalEditorScrollbarOptions {
|
|
4504
4521
|
readonly arrowSize: number;
|
|
4505
4522
|
readonly vertical: ScrollbarVisibility;
|
|
@@ -4516,9 +4533,7 @@ export namespace editor {
|
|
|
4516
4533
|
readonly scrollByPage: boolean;
|
|
4517
4534
|
readonly ignoreHorizontalScrollbarInContentHeight: boolean;
|
|
4518
4535
|
}
|
|
4519
|
-
|
|
4520
|
-
export type InUntrustedWorkspace = 'inUntrustedWorkspace';
|
|
4521
|
-
|
|
4536
|
+
export type InUntrustedWorkspace = "inUntrustedWorkspace";
|
|
4522
4537
|
/**
|
|
4523
4538
|
* Configuration options for unicode highlighting.
|
|
4524
4539
|
*/
|
|
@@ -4550,9 +4565,8 @@ export namespace editor {
|
|
|
4550
4565
|
/**
|
|
4551
4566
|
* Unicode characters that are common in allowed locales are not being highlighted.
|
|
4552
4567
|
*/
|
|
4553
|
-
allowedLocales?: Record<string |
|
|
4568
|
+
allowedLocales?: Record<string | "_os" | "_vscode", true>;
|
|
4554
4569
|
}
|
|
4555
|
-
|
|
4556
4570
|
export interface IInlineSuggestOptions {
|
|
4557
4571
|
/**
|
|
4558
4572
|
* Enable or disable the rendering of automatic inline completions.
|
|
@@ -4565,8 +4579,9 @@ export namespace editor {
|
|
|
4565
4579
|
* 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.
|
|
4566
4580
|
* Defaults to `prefix`.
|
|
4567
4581
|
*/
|
|
4568
|
-
mode?:
|
|
4569
|
-
showToolbar?:
|
|
4582
|
+
mode?: "prefix" | "subword" | "subwordSmart";
|
|
4583
|
+
showToolbar?: "always" | "onHover" | "never";
|
|
4584
|
+
syntaxHighlightingEnabled?: boolean;
|
|
4570
4585
|
suppressSuggestions?: boolean;
|
|
4571
4586
|
/**
|
|
4572
4587
|
* Does not clear active inline suggestions when the editor loses focus.
|
|
@@ -4575,25 +4590,11 @@ export namespace editor {
|
|
|
4575
4590
|
/**
|
|
4576
4591
|
* Font family for inline suggestions.
|
|
4577
4592
|
*/
|
|
4578
|
-
fontFamily?: string |
|
|
4593
|
+
fontFamily?: string | "default";
|
|
4579
4594
|
}
|
|
4580
|
-
|
|
4581
|
-
|
|
4582
|
-
|
|
4583
|
-
* Enable or disable the rendering of automatic inline edit.
|
|
4584
|
-
*/
|
|
4585
|
-
enabled?: boolean;
|
|
4586
|
-
showToolbar?: 'always' | 'onHover' | 'never';
|
|
4587
|
-
/**
|
|
4588
|
-
* Font family for inline suggestions.
|
|
4589
|
-
*/
|
|
4590
|
-
fontFamily?: string | 'default';
|
|
4591
|
-
/**
|
|
4592
|
-
* Does not clear active inline suggestions when the editor loses focus.
|
|
4593
|
-
*/
|
|
4594
|
-
keepOnBlur?: boolean;
|
|
4595
|
-
}
|
|
4596
|
-
|
|
4595
|
+
type RequiredRecursive<T> = {
|
|
4596
|
+
[P in keyof T]-?: T[P] extends object | undefined ? RequiredRecursive<T[P]> : T[P];
|
|
4597
|
+
};
|
|
4597
4598
|
export interface IBracketPairColorizationOptions {
|
|
4598
4599
|
/**
|
|
4599
4600
|
* Enable or disable bracket pair colorization.
|
|
@@ -4604,18 +4605,17 @@ export namespace editor {
|
|
|
4604
4605
|
*/
|
|
4605
4606
|
independentColorPoolPerBracketType?: boolean;
|
|
4606
4607
|
}
|
|
4607
|
-
|
|
4608
4608
|
export interface IGuidesOptions {
|
|
4609
4609
|
/**
|
|
4610
4610
|
* Enable rendering of bracket pair guides.
|
|
4611
4611
|
* Defaults to false.
|
|
4612
4612
|
*/
|
|
4613
|
-
bracketPairs?: boolean |
|
|
4613
|
+
bracketPairs?: boolean | "active";
|
|
4614
4614
|
/**
|
|
4615
4615
|
* Enable rendering of vertical bracket pair guides.
|
|
4616
4616
|
* Defaults to 'active'.
|
|
4617
4617
|
*/
|
|
4618
|
-
bracketPairsHorizontal?: boolean |
|
|
4618
|
+
bracketPairsHorizontal?: boolean | "active";
|
|
4619
4619
|
/**
|
|
4620
4620
|
* Enable highlighting of the active bracket pair.
|
|
4621
4621
|
* Defaults to true.
|
|
@@ -4630,9 +4630,8 @@ export namespace editor {
|
|
|
4630
4630
|
* Enable highlighting of the active indent guide.
|
|
4631
4631
|
* Defaults to true.
|
|
4632
4632
|
*/
|
|
4633
|
-
highlightActiveIndentation?: boolean |
|
|
4633
|
+
highlightActiveIndentation?: boolean | "always";
|
|
4634
4634
|
}
|
|
4635
|
-
|
|
4636
4635
|
/**
|
|
4637
4636
|
* Configuration options for editor suggest widget
|
|
4638
4637
|
*/
|
|
@@ -4640,7 +4639,7 @@ export namespace editor {
|
|
|
4640
4639
|
/**
|
|
4641
4640
|
* Overwrite word ends on accept. Default to false.
|
|
4642
4641
|
*/
|
|
4643
|
-
insertMode?:
|
|
4642
|
+
insertMode?: "insert" | "replace";
|
|
4644
4643
|
/**
|
|
4645
4644
|
* Enable graceful matching. Defaults to true.
|
|
4646
4645
|
*/
|
|
@@ -4660,7 +4659,7 @@ export namespace editor {
|
|
|
4660
4659
|
/**
|
|
4661
4660
|
* Select suggestions when triggered via quick suggest or trigger characters
|
|
4662
4661
|
*/
|
|
4663
|
-
selectionMode?:
|
|
4662
|
+
selectionMode?: "always" | "never" | "whenTriggerCharacter" | "whenQuickSuggestion";
|
|
4664
4663
|
/**
|
|
4665
4664
|
* Enable or disable icons in suggestions. Defaults to true.
|
|
4666
4665
|
*/
|
|
@@ -4676,7 +4675,7 @@ export namespace editor {
|
|
|
4676
4675
|
/**
|
|
4677
4676
|
* Configures the mode of the preview.
|
|
4678
4677
|
*/
|
|
4679
|
-
previewMode?:
|
|
4678
|
+
previewMode?: "prefix" | "subword" | "subwordSmart";
|
|
4680
4679
|
/**
|
|
4681
4680
|
* Show details inline with the label. Defaults to true.
|
|
4682
4681
|
*/
|
|
@@ -4798,12 +4797,10 @@ export namespace editor {
|
|
|
4798
4797
|
*/
|
|
4799
4798
|
showSnippets?: boolean;
|
|
4800
4799
|
}
|
|
4801
|
-
|
|
4802
4800
|
export interface ISmartSelectOptions {
|
|
4803
4801
|
selectLeadingAndTrailingWhitespace?: boolean;
|
|
4804
4802
|
selectSubwords?: boolean;
|
|
4805
4803
|
}
|
|
4806
|
-
|
|
4807
4804
|
/**
|
|
4808
4805
|
* Describes how to indent wrapped lines.
|
|
4809
4806
|
*/
|
|
@@ -4825,14 +4822,12 @@ export namespace editor {
|
|
|
4825
4822
|
*/
|
|
4826
4823
|
DeepIndent = 3
|
|
4827
4824
|
}
|
|
4828
|
-
|
|
4829
4825
|
export interface EditorWrappingInfo {
|
|
4830
4826
|
readonly isDominatedByLongLines: boolean;
|
|
4831
4827
|
readonly isWordWrapMinified: boolean;
|
|
4832
4828
|
readonly isViewportWrapping: boolean;
|
|
4833
4829
|
readonly wrappingColumn: number;
|
|
4834
4830
|
}
|
|
4835
|
-
|
|
4836
4831
|
/**
|
|
4837
4832
|
* Configuration options for editor drop into behavior
|
|
4838
4833
|
*/
|
|
@@ -4846,9 +4841,8 @@ export namespace editor {
|
|
|
4846
4841
|
* Controls if a widget is shown after a drop.
|
|
4847
4842
|
* Defaults to 'afterDrop'.
|
|
4848
4843
|
*/
|
|
4849
|
-
showDropSelector?:
|
|
4844
|
+
showDropSelector?: "afterDrop" | "never";
|
|
4850
4845
|
}
|
|
4851
|
-
|
|
4852
4846
|
/**
|
|
4853
4847
|
* Configuration options for editor pasting as into behavior
|
|
4854
4848
|
*/
|
|
@@ -4862,179 +4856,204 @@ export namespace editor {
|
|
|
4862
4856
|
* Controls if a widget is shown after a drop.
|
|
4863
4857
|
* Defaults to 'afterPaste'.
|
|
4864
4858
|
*/
|
|
4865
|
-
showPasteSelector?:
|
|
4859
|
+
showPasteSelector?: "afterPaste" | "never";
|
|
4866
4860
|
}
|
|
4867
|
-
|
|
4868
4861
|
export enum EditorOption {
|
|
4869
4862
|
acceptSuggestionOnCommitCharacter = 0,
|
|
4870
4863
|
acceptSuggestionOnEnter = 1,
|
|
4871
4864
|
accessibilitySupport = 2,
|
|
4872
4865
|
accessibilityPageSize = 3,
|
|
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
|
-
|
|
5011
|
-
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
4866
|
+
allowOverflow = 4,
|
|
4867
|
+
allowVariableLineHeights = 5,
|
|
4868
|
+
allowVariableFonts = 6,
|
|
4869
|
+
allowVariableFontsInAccessibilityMode = 7,
|
|
4870
|
+
ariaLabel = 8,
|
|
4871
|
+
ariaRequired = 9,
|
|
4872
|
+
autoClosingBrackets = 10,
|
|
4873
|
+
autoClosingComments = 11,
|
|
4874
|
+
screenReaderAnnounceInlineSuggestion = 12,
|
|
4875
|
+
autoClosingDelete = 13,
|
|
4876
|
+
autoClosingOvertype = 14,
|
|
4877
|
+
autoClosingQuotes = 15,
|
|
4878
|
+
autoIndent = 16,
|
|
4879
|
+
autoIndentOnPaste = 17,
|
|
4880
|
+
autoIndentOnPasteWithinString = 18,
|
|
4881
|
+
automaticLayout = 19,
|
|
4882
|
+
autoSurround = 20,
|
|
4883
|
+
bracketPairColorization = 21,
|
|
4884
|
+
guides = 22,
|
|
4885
|
+
codeLens = 23,
|
|
4886
|
+
codeLensFontFamily = 24,
|
|
4887
|
+
codeLensFontSize = 25,
|
|
4888
|
+
colorDecorators = 26,
|
|
4889
|
+
colorDecoratorsLimit = 27,
|
|
4890
|
+
columnSelection = 28,
|
|
4891
|
+
comments = 29,
|
|
4892
|
+
contextmenu = 30,
|
|
4893
|
+
copyWithSyntaxHighlighting = 31,
|
|
4894
|
+
cursorBlinking = 32,
|
|
4895
|
+
cursorSmoothCaretAnimation = 33,
|
|
4896
|
+
cursorStyle = 34,
|
|
4897
|
+
cursorSurroundingLines = 35,
|
|
4898
|
+
cursorSurroundingLinesStyle = 36,
|
|
4899
|
+
cursorWidth = 37,
|
|
4900
|
+
cursorHeight = 38,
|
|
4901
|
+
disableLayerHinting = 39,
|
|
4902
|
+
disableMonospaceOptimizations = 40,
|
|
4903
|
+
domReadOnly = 41,
|
|
4904
|
+
dragAndDrop = 42,
|
|
4905
|
+
dropIntoEditor = 43,
|
|
4906
|
+
editContext = 44,
|
|
4907
|
+
emptySelectionClipboard = 45,
|
|
4908
|
+
experimentalGpuAcceleration = 46,
|
|
4909
|
+
experimentalWhitespaceRendering = 47,
|
|
4910
|
+
extraEditorClassName = 48,
|
|
4911
|
+
fastScrollSensitivity = 49,
|
|
4912
|
+
find = 50,
|
|
4913
|
+
fixedOverflowWidgets = 51,
|
|
4914
|
+
folding = 52,
|
|
4915
|
+
foldingStrategy = 53,
|
|
4916
|
+
foldingHighlight = 54,
|
|
4917
|
+
foldingImportsByDefault = 55,
|
|
4918
|
+
foldingMaximumRegions = 56,
|
|
4919
|
+
unfoldOnClickAfterEndOfLine = 57,
|
|
4920
|
+
fontFamily = 58,
|
|
4921
|
+
fontInfo = 59,
|
|
4922
|
+
fontLigatures = 60,
|
|
4923
|
+
fontSize = 61,
|
|
4924
|
+
fontWeight = 62,
|
|
4925
|
+
fontVariations = 63,
|
|
4926
|
+
formatOnPaste = 64,
|
|
4927
|
+
formatOnType = 65,
|
|
4928
|
+
glyphMargin = 66,
|
|
4929
|
+
gotoLocation = 67,
|
|
4930
|
+
hideCursorInOverviewRuler = 68,
|
|
4931
|
+
hover = 69,
|
|
4932
|
+
inDiffEditor = 70,
|
|
4933
|
+
inlineSuggest = 71,
|
|
4934
|
+
letterSpacing = 72,
|
|
4935
|
+
lightbulb = 73,
|
|
4936
|
+
lineDecorationsWidth = 74,
|
|
4937
|
+
lineHeight = 75,
|
|
4938
|
+
lineNumbers = 76,
|
|
4939
|
+
lineNumbersMinChars = 77,
|
|
4940
|
+
linkedEditing = 78,
|
|
4941
|
+
links = 79,
|
|
4942
|
+
matchBrackets = 80,
|
|
4943
|
+
minimap = 81,
|
|
4944
|
+
mouseStyle = 82,
|
|
4945
|
+
mouseWheelScrollSensitivity = 83,
|
|
4946
|
+
mouseWheelZoom = 84,
|
|
4947
|
+
multiCursorMergeOverlapping = 85,
|
|
4948
|
+
multiCursorModifier = 86,
|
|
4949
|
+
multiCursorPaste = 87,
|
|
4950
|
+
multiCursorLimit = 88,
|
|
4951
|
+
occurrencesHighlight = 89,
|
|
4952
|
+
occurrencesHighlightDelay = 90,
|
|
4953
|
+
overtypeCursorStyle = 91,
|
|
4954
|
+
overtypeOnPaste = 92,
|
|
4955
|
+
overviewRulerBorder = 93,
|
|
4956
|
+
overviewRulerLanes = 94,
|
|
4957
|
+
padding = 95,
|
|
4958
|
+
pasteAs = 96,
|
|
4959
|
+
parameterHints = 97,
|
|
4960
|
+
peekWidgetDefaultFocus = 98,
|
|
4961
|
+
placeholder = 99,
|
|
4962
|
+
definitionLinkOpensInPeek = 100,
|
|
4963
|
+
quickSuggestions = 101,
|
|
4964
|
+
quickSuggestionsDelay = 102,
|
|
4965
|
+
readOnly = 103,
|
|
4966
|
+
readOnlyMessage = 104,
|
|
4967
|
+
renameOnType = 105,
|
|
4968
|
+
renderRichScreenReaderContent = 106,
|
|
4969
|
+
renderControlCharacters = 107,
|
|
4970
|
+
renderFinalNewline = 108,
|
|
4971
|
+
renderLineHighlight = 109,
|
|
4972
|
+
renderLineHighlightOnlyWhenFocus = 110,
|
|
4973
|
+
renderValidationDecorations = 111,
|
|
4974
|
+
renderWhitespace = 112,
|
|
4975
|
+
revealHorizontalRightPadding = 113,
|
|
4976
|
+
roundedSelection = 114,
|
|
4977
|
+
rulers = 115,
|
|
4978
|
+
scrollbar = 116,
|
|
4979
|
+
scrollBeyondLastColumn = 117,
|
|
4980
|
+
scrollBeyondLastLine = 118,
|
|
4981
|
+
scrollPredominantAxis = 119,
|
|
4982
|
+
selectionClipboard = 120,
|
|
4983
|
+
selectionHighlight = 121,
|
|
4984
|
+
selectionHighlightMaxLength = 122,
|
|
4985
|
+
selectionHighlightMultiline = 123,
|
|
4986
|
+
selectOnLineNumbers = 124,
|
|
4987
|
+
showFoldingControls = 125,
|
|
4988
|
+
showUnused = 126,
|
|
4989
|
+
snippetSuggestions = 127,
|
|
4990
|
+
smartSelect = 128,
|
|
4991
|
+
smoothScrolling = 129,
|
|
4992
|
+
stickyScroll = 130,
|
|
4993
|
+
stickyTabStops = 131,
|
|
4994
|
+
stopRenderingLineAfter = 132,
|
|
4995
|
+
suggest = 133,
|
|
4996
|
+
suggestFontSize = 134,
|
|
4997
|
+
suggestLineHeight = 135,
|
|
4998
|
+
suggestOnTriggerCharacters = 136,
|
|
4999
|
+
suggestSelection = 137,
|
|
5000
|
+
tabCompletion = 138,
|
|
5001
|
+
tabIndex = 139,
|
|
5002
|
+
trimWhitespaceOnDelete = 140,
|
|
5003
|
+
unicodeHighlighting = 141,
|
|
5004
|
+
unusualLineTerminators = 142,
|
|
5005
|
+
useShadowDOM = 143,
|
|
5006
|
+
useTabStops = 144,
|
|
5007
|
+
wordBreak = 145,
|
|
5008
|
+
wordSegmenterLocales = 146,
|
|
5009
|
+
wordSeparators = 147,
|
|
5010
|
+
wordWrap = 148,
|
|
5011
|
+
wordWrapBreakAfterCharacters = 149,
|
|
5012
|
+
wordWrapBreakBeforeCharacters = 150,
|
|
5013
|
+
wordWrapColumn = 151,
|
|
5014
|
+
wordWrapOverride1 = 152,
|
|
5015
|
+
wordWrapOverride2 = 153,
|
|
5016
|
+
wrappingIndent = 154,
|
|
5017
|
+
wrappingStrategy = 155,
|
|
5018
|
+
showDeprecated = 156,
|
|
5019
|
+
inertialScroll = 157,
|
|
5020
|
+
inlayHints = 158,
|
|
5021
|
+
wrapOnEscapedLineFeeds = 159,
|
|
5022
|
+
effectiveCursorStyle = 160,
|
|
5023
|
+
editorClassName = 161,
|
|
5024
|
+
pixelRatio = 162,
|
|
5025
|
+
tabFocusMode = 163,
|
|
5026
|
+
layoutInfo = 164,
|
|
5027
|
+
wrappingInfo = 165,
|
|
5028
|
+
defaultColorDecorators = 166,
|
|
5029
|
+
colorDecoratorsActivatedOn = 167,
|
|
5030
|
+
inlineCompletionsAccessibilityVerbose = 168,
|
|
5031
|
+
effectiveEditContext = 169,
|
|
5032
|
+
scrollOnMiddleClick = 170,
|
|
5033
|
+
effectiveAllowVariableFonts = 171
|
|
5020
5034
|
}
|
|
5021
|
-
|
|
5022
5035
|
export const EditorOptions: {
|
|
5023
5036
|
acceptSuggestionOnCommitCharacter: IEditorOption<EditorOption.acceptSuggestionOnCommitCharacter, boolean>;
|
|
5024
|
-
acceptSuggestionOnEnter: IEditorOption<EditorOption.acceptSuggestionOnEnter,
|
|
5037
|
+
acceptSuggestionOnEnter: IEditorOption<EditorOption.acceptSuggestionOnEnter, "on" | "off" | "smart">;
|
|
5025
5038
|
accessibilitySupport: IEditorOption<EditorOption.accessibilitySupport, AccessibilitySupport>;
|
|
5026
5039
|
accessibilityPageSize: IEditorOption<EditorOption.accessibilityPageSize, number>;
|
|
5040
|
+
allowOverflow: IEditorOption<EditorOption.allowOverflow, boolean>;
|
|
5041
|
+
allowVariableLineHeights: IEditorOption<EditorOption.allowVariableLineHeights, boolean>;
|
|
5042
|
+
allowVariableFonts: IEditorOption<EditorOption.allowVariableFonts, boolean>;
|
|
5043
|
+
allowVariableFontsInAccessibilityMode: IEditorOption<EditorOption.allowVariableFontsInAccessibilityMode, boolean>;
|
|
5027
5044
|
ariaLabel: IEditorOption<EditorOption.ariaLabel, string>;
|
|
5028
5045
|
ariaRequired: IEditorOption<EditorOption.ariaRequired, boolean>;
|
|
5029
5046
|
screenReaderAnnounceInlineSuggestion: IEditorOption<EditorOption.screenReaderAnnounceInlineSuggestion, boolean>;
|
|
5030
|
-
autoClosingBrackets: IEditorOption<EditorOption.autoClosingBrackets,
|
|
5031
|
-
autoClosingComments: IEditorOption<EditorOption.autoClosingComments,
|
|
5032
|
-
autoClosingDelete: IEditorOption<EditorOption.autoClosingDelete,
|
|
5033
|
-
autoClosingOvertype: IEditorOption<EditorOption.autoClosingOvertype,
|
|
5034
|
-
autoClosingQuotes: IEditorOption<EditorOption.autoClosingQuotes,
|
|
5047
|
+
autoClosingBrackets: IEditorOption<EditorOption.autoClosingBrackets, "always" | "never" | "languageDefined" | "beforeWhitespace">;
|
|
5048
|
+
autoClosingComments: IEditorOption<EditorOption.autoClosingComments, "always" | "never" | "languageDefined" | "beforeWhitespace">;
|
|
5049
|
+
autoClosingDelete: IEditorOption<EditorOption.autoClosingDelete, "auto" | "always" | "never">;
|
|
5050
|
+
autoClosingOvertype: IEditorOption<EditorOption.autoClosingOvertype, "auto" | "always" | "never">;
|
|
5051
|
+
autoClosingQuotes: IEditorOption<EditorOption.autoClosingQuotes, "always" | "never" | "languageDefined" | "beforeWhitespace">;
|
|
5035
5052
|
autoIndent: IEditorOption<EditorOption.autoIndent, EditorAutoIndentStrategy>;
|
|
5053
|
+
autoIndentOnPaste: IEditorOption<EditorOption.autoIndentOnPaste, boolean>;
|
|
5054
|
+
autoIndentOnPasteWithinString: IEditorOption<EditorOption.autoIndentOnPasteWithinString, boolean>;
|
|
5036
5055
|
automaticLayout: IEditorOption<EditorOption.automaticLayout, boolean>;
|
|
5037
|
-
autoSurround: IEditorOption<EditorOption.autoSurround,
|
|
5056
|
+
autoSurround: IEditorOption<EditorOption.autoSurround, "never" | "languageDefined" | "quotes" | "brackets">;
|
|
5038
5057
|
bracketPairColorization: IEditorOption<EditorOption.bracketPairColorization, Readonly<Required<IBracketPairColorizationOptions>>>;
|
|
5039
5058
|
bracketPairGuides: IEditorOption<EditorOption.guides, Readonly<Required<IGuidesOptions>>>;
|
|
5040
5059
|
stickyTabStops: IEditorOption<EditorOption.stickyTabStops, boolean>;
|
|
@@ -5042,32 +5061,37 @@ export namespace editor {
|
|
|
5042
5061
|
codeLensFontFamily: IEditorOption<EditorOption.codeLensFontFamily, string>;
|
|
5043
5062
|
codeLensFontSize: IEditorOption<EditorOption.codeLensFontSize, number>;
|
|
5044
5063
|
colorDecorators: IEditorOption<EditorOption.colorDecorators, boolean>;
|
|
5045
|
-
colorDecoratorActivatedOn: IEditorOption<EditorOption.colorDecoratorsActivatedOn,
|
|
5064
|
+
colorDecoratorActivatedOn: IEditorOption<EditorOption.colorDecoratorsActivatedOn, "hover" | "clickAndHover" | "click">;
|
|
5046
5065
|
colorDecoratorsLimit: IEditorOption<EditorOption.colorDecoratorsLimit, number>;
|
|
5047
5066
|
columnSelection: IEditorOption<EditorOption.columnSelection, boolean>;
|
|
5048
5067
|
comments: IEditorOption<EditorOption.comments, Readonly<Required<IEditorCommentsOptions>>>;
|
|
5049
5068
|
contextmenu: IEditorOption<EditorOption.contextmenu, boolean>;
|
|
5050
5069
|
copyWithSyntaxHighlighting: IEditorOption<EditorOption.copyWithSyntaxHighlighting, boolean>;
|
|
5051
5070
|
cursorBlinking: IEditorOption<EditorOption.cursorBlinking, TextEditorCursorBlinkingStyle>;
|
|
5052
|
-
cursorSmoothCaretAnimation: IEditorOption<EditorOption.cursorSmoothCaretAnimation,
|
|
5071
|
+
cursorSmoothCaretAnimation: IEditorOption<EditorOption.cursorSmoothCaretAnimation, "on" | "off" | "explicit">;
|
|
5053
5072
|
cursorStyle: IEditorOption<EditorOption.cursorStyle, TextEditorCursorStyle>;
|
|
5073
|
+
overtypeCursorStyle: IEditorOption<EditorOption.overtypeCursorStyle, TextEditorCursorStyle>;
|
|
5054
5074
|
cursorSurroundingLines: IEditorOption<EditorOption.cursorSurroundingLines, number>;
|
|
5055
|
-
cursorSurroundingLinesStyle: IEditorOption<EditorOption.cursorSurroundingLinesStyle,
|
|
5075
|
+
cursorSurroundingLinesStyle: IEditorOption<EditorOption.cursorSurroundingLinesStyle, "default" | "all">;
|
|
5056
5076
|
cursorWidth: IEditorOption<EditorOption.cursorWidth, number>;
|
|
5077
|
+
cursorHeight: IEditorOption<EditorOption.cursorHeight, number>;
|
|
5057
5078
|
disableLayerHinting: IEditorOption<EditorOption.disableLayerHinting, boolean>;
|
|
5058
5079
|
disableMonospaceOptimizations: IEditorOption<EditorOption.disableMonospaceOptimizations, boolean>;
|
|
5059
5080
|
domReadOnly: IEditorOption<EditorOption.domReadOnly, boolean>;
|
|
5060
5081
|
dragAndDrop: IEditorOption<EditorOption.dragAndDrop, boolean>;
|
|
5061
5082
|
emptySelectionClipboard: IEditorOption<EditorOption.emptySelectionClipboard, boolean>;
|
|
5062
5083
|
dropIntoEditor: IEditorOption<EditorOption.dropIntoEditor, Readonly<Required<IDropIntoEditorOptions>>>;
|
|
5084
|
+
editContext: IEditorOption<EditorOption.editContext, boolean>;
|
|
5085
|
+
renderRichScreenReaderContent: IEditorOption<EditorOption.renderRichScreenReaderContent, boolean>;
|
|
5063
5086
|
stickyScroll: IEditorOption<EditorOption.stickyScroll, Readonly<Required<IEditorStickyScrollOptions>>>;
|
|
5064
|
-
|
|
5087
|
+
experimentalGpuAcceleration: IEditorOption<EditorOption.experimentalGpuAcceleration, "on" | "off">;
|
|
5088
|
+
experimentalWhitespaceRendering: IEditorOption<EditorOption.experimentalWhitespaceRendering, "off" | "svg" | "font">;
|
|
5065
5089
|
extraEditorClassName: IEditorOption<EditorOption.extraEditorClassName, string>;
|
|
5066
5090
|
fastScrollSensitivity: IEditorOption<EditorOption.fastScrollSensitivity, number>;
|
|
5067
5091
|
find: IEditorOption<EditorOption.find, Readonly<Required<IEditorFindOptions>>>;
|
|
5068
5092
|
fixedOverflowWidgets: IEditorOption<EditorOption.fixedOverflowWidgets, boolean>;
|
|
5069
5093
|
folding: IEditorOption<EditorOption.folding, boolean>;
|
|
5070
|
-
foldingStrategy: IEditorOption<EditorOption.foldingStrategy,
|
|
5094
|
+
foldingStrategy: IEditorOption<EditorOption.foldingStrategy, "auto" | "indentation">;
|
|
5071
5095
|
foldingHighlight: IEditorOption<EditorOption.foldingHighlight, boolean>;
|
|
5072
5096
|
foldingImportsByDefault: IEditorOption<EditorOption.foldingImportsByDefault, boolean>;
|
|
5073
5097
|
foldingMaximumRegions: IEditorOption<EditorOption.foldingMaximumRegions, number>;
|
|
@@ -5085,6 +5109,7 @@ export namespace editor {
|
|
|
5085
5109
|
hideCursorInOverviewRuler: IEditorOption<EditorOption.hideCursorInOverviewRuler, boolean>;
|
|
5086
5110
|
hover: IEditorOption<EditorOption.hover, Readonly<Required<IEditorHoverOptions>>>;
|
|
5087
5111
|
inDiffEditor: IEditorOption<EditorOption.inDiffEditor, boolean>;
|
|
5112
|
+
inertialScroll: IEditorOption<EditorOption.inertialScroll, boolean>;
|
|
5088
5113
|
letterSpacing: IEditorOption<EditorOption.letterSpacing, number>;
|
|
5089
5114
|
lightbulb: IEditorOption<EditorOption.lightbulb, Readonly<Required<IEditorLightbulbOptions>>>;
|
|
5090
5115
|
lineDecorationsWidth: IEditorOption<EditorOption.lineDecorationsWidth, number>;
|
|
@@ -5093,22 +5118,24 @@ export namespace editor {
|
|
|
5093
5118
|
lineNumbersMinChars: IEditorOption<EditorOption.lineNumbersMinChars, number>;
|
|
5094
5119
|
linkedEditing: IEditorOption<EditorOption.linkedEditing, boolean>;
|
|
5095
5120
|
links: IEditorOption<EditorOption.links, boolean>;
|
|
5096
|
-
matchBrackets: IEditorOption<EditorOption.matchBrackets,
|
|
5121
|
+
matchBrackets: IEditorOption<EditorOption.matchBrackets, "always" | "never" | "near">;
|
|
5097
5122
|
minimap: IEditorOption<EditorOption.minimap, Readonly<Required<IEditorMinimapOptions>>>;
|
|
5098
|
-
mouseStyle: IEditorOption<EditorOption.mouseStyle,
|
|
5123
|
+
mouseStyle: IEditorOption<EditorOption.mouseStyle, "default" | "text" | "copy">;
|
|
5099
5124
|
mouseWheelScrollSensitivity: IEditorOption<EditorOption.mouseWheelScrollSensitivity, number>;
|
|
5100
5125
|
mouseWheelZoom: IEditorOption<EditorOption.mouseWheelZoom, boolean>;
|
|
5101
5126
|
multiCursorMergeOverlapping: IEditorOption<EditorOption.multiCursorMergeOverlapping, boolean>;
|
|
5102
|
-
multiCursorModifier: IEditorOption<EditorOption.multiCursorModifier,
|
|
5103
|
-
multiCursorPaste: IEditorOption<EditorOption.multiCursorPaste,
|
|
5127
|
+
multiCursorModifier: IEditorOption<EditorOption.multiCursorModifier, "altKey" | "metaKey" | "ctrlKey">;
|
|
5128
|
+
multiCursorPaste: IEditorOption<EditorOption.multiCursorPaste, "spread" | "full">;
|
|
5104
5129
|
multiCursorLimit: IEditorOption<EditorOption.multiCursorLimit, number>;
|
|
5105
|
-
occurrencesHighlight: IEditorOption<EditorOption.occurrencesHighlight,
|
|
5130
|
+
occurrencesHighlight: IEditorOption<EditorOption.occurrencesHighlight, "off" | "singleFile" | "multiFile">;
|
|
5131
|
+
occurrencesHighlightDelay: IEditorOption<EditorOption.occurrencesHighlightDelay, number>;
|
|
5132
|
+
overtypeOnPaste: IEditorOption<EditorOption.overtypeOnPaste, boolean>;
|
|
5106
5133
|
overviewRulerBorder: IEditorOption<EditorOption.overviewRulerBorder, boolean>;
|
|
5107
5134
|
overviewRulerLanes: IEditorOption<EditorOption.overviewRulerLanes, number>;
|
|
5108
5135
|
padding: IEditorOption<EditorOption.padding, Readonly<Required<IEditorPaddingOptions>>>;
|
|
5109
5136
|
pasteAs: IEditorOption<EditorOption.pasteAs, Readonly<Required<IPasteAsOptions>>>;
|
|
5110
5137
|
parameterHints: IEditorOption<EditorOption.parameterHints, Readonly<Required<IEditorParameterHintOptions>>>;
|
|
5111
|
-
peekWidgetDefaultFocus: IEditorOption<EditorOption.peekWidgetDefaultFocus,
|
|
5138
|
+
peekWidgetDefaultFocus: IEditorOption<EditorOption.peekWidgetDefaultFocus, "tree" | "editor">;
|
|
5112
5139
|
placeholder: IEditorOption<EditorOption.placeholder, string>;
|
|
5113
5140
|
definitionLinkOpensInPeek: IEditorOption<EditorOption.definitionLinkOpensInPeek, boolean>;
|
|
5114
5141
|
quickSuggestions: IEditorOption<EditorOption.quickSuggestions, InternalQuickSuggestionsOptions>;
|
|
@@ -5117,72 +5144,74 @@ export namespace editor {
|
|
|
5117
5144
|
readOnlyMessage: IEditorOption<EditorOption.readOnlyMessage, any>;
|
|
5118
5145
|
renameOnType: IEditorOption<EditorOption.renameOnType, boolean>;
|
|
5119
5146
|
renderControlCharacters: IEditorOption<EditorOption.renderControlCharacters, boolean>;
|
|
5120
|
-
renderFinalNewline: IEditorOption<EditorOption.renderFinalNewline,
|
|
5121
|
-
renderLineHighlight: IEditorOption<EditorOption.renderLineHighlight,
|
|
5147
|
+
renderFinalNewline: IEditorOption<EditorOption.renderFinalNewline, "on" | "off" | "dimmed">;
|
|
5148
|
+
renderLineHighlight: IEditorOption<EditorOption.renderLineHighlight, "all" | "line" | "none" | "gutter">;
|
|
5122
5149
|
renderLineHighlightOnlyWhenFocus: IEditorOption<EditorOption.renderLineHighlightOnlyWhenFocus, boolean>;
|
|
5123
|
-
renderValidationDecorations: IEditorOption<EditorOption.renderValidationDecorations,
|
|
5124
|
-
renderWhitespace: IEditorOption<EditorOption.renderWhitespace,
|
|
5150
|
+
renderValidationDecorations: IEditorOption<EditorOption.renderValidationDecorations, "on" | "off" | "editable">;
|
|
5151
|
+
renderWhitespace: IEditorOption<EditorOption.renderWhitespace, "all" | "none" | "boundary" | "selection" | "trailing">;
|
|
5125
5152
|
revealHorizontalRightPadding: IEditorOption<EditorOption.revealHorizontalRightPadding, number>;
|
|
5126
5153
|
roundedSelection: IEditorOption<EditorOption.roundedSelection, boolean>;
|
|
5127
5154
|
rulers: IEditorOption<EditorOption.rulers, {}>;
|
|
5128
5155
|
scrollbar: IEditorOption<EditorOption.scrollbar, InternalEditorScrollbarOptions>;
|
|
5129
5156
|
scrollBeyondLastColumn: IEditorOption<EditorOption.scrollBeyondLastColumn, number>;
|
|
5130
5157
|
scrollBeyondLastLine: IEditorOption<EditorOption.scrollBeyondLastLine, boolean>;
|
|
5158
|
+
scrollOnMiddleClick: IEditorOption<EditorOption.scrollOnMiddleClick, boolean>;
|
|
5131
5159
|
scrollPredominantAxis: IEditorOption<EditorOption.scrollPredominantAxis, boolean>;
|
|
5132
5160
|
selectionClipboard: IEditorOption<EditorOption.selectionClipboard, boolean>;
|
|
5133
5161
|
selectionHighlight: IEditorOption<EditorOption.selectionHighlight, boolean>;
|
|
5162
|
+
selectionHighlightMaxLength: IEditorOption<EditorOption.selectionHighlightMaxLength, number>;
|
|
5163
|
+
selectionHighlightMultiline: IEditorOption<EditorOption.selectionHighlightMultiline, boolean>;
|
|
5134
5164
|
selectOnLineNumbers: IEditorOption<EditorOption.selectOnLineNumbers, boolean>;
|
|
5135
|
-
showFoldingControls: IEditorOption<EditorOption.showFoldingControls,
|
|
5165
|
+
showFoldingControls: IEditorOption<EditorOption.showFoldingControls, "always" | "never" | "mouseover">;
|
|
5136
5166
|
showUnused: IEditorOption<EditorOption.showUnused, boolean>;
|
|
5137
5167
|
showDeprecated: IEditorOption<EditorOption.showDeprecated, boolean>;
|
|
5138
5168
|
inlayHints: IEditorOption<EditorOption.inlayHints, Readonly<Required<IEditorInlayHintsOptions>>>;
|
|
5139
|
-
snippetSuggestions: IEditorOption<EditorOption.snippetSuggestions,
|
|
5169
|
+
snippetSuggestions: IEditorOption<EditorOption.snippetSuggestions, "none" | "top" | "bottom" | "inline">;
|
|
5140
5170
|
smartSelect: IEditorOption<EditorOption.smartSelect, Readonly<Required<ISmartSelectOptions>>>;
|
|
5141
5171
|
smoothScrolling: IEditorOption<EditorOption.smoothScrolling, boolean>;
|
|
5142
5172
|
stopRenderingLineAfter: IEditorOption<EditorOption.stopRenderingLineAfter, number>;
|
|
5143
5173
|
suggest: IEditorOption<EditorOption.suggest, Readonly<Required<ISuggestOptions>>>;
|
|
5144
|
-
inlineSuggest: IEditorOption<EditorOption.inlineSuggest, Readonly<
|
|
5145
|
-
inlineEdit: IEditorOption<EditorOption.inlineEdit, Readonly<Required<IInlineEditOptions>>>;
|
|
5174
|
+
inlineSuggest: IEditorOption<EditorOption.inlineSuggest, Readonly<RequiredRecursive<IInlineSuggestOptions>>>;
|
|
5146
5175
|
inlineCompletionsAccessibilityVerbose: IEditorOption<EditorOption.inlineCompletionsAccessibilityVerbose, boolean>;
|
|
5147
5176
|
suggestFontSize: IEditorOption<EditorOption.suggestFontSize, number>;
|
|
5148
5177
|
suggestLineHeight: IEditorOption<EditorOption.suggestLineHeight, number>;
|
|
5149
5178
|
suggestOnTriggerCharacters: IEditorOption<EditorOption.suggestOnTriggerCharacters, boolean>;
|
|
5150
|
-
suggestSelection: IEditorOption<EditorOption.suggestSelection,
|
|
5151
|
-
tabCompletion: IEditorOption<EditorOption.tabCompletion,
|
|
5179
|
+
suggestSelection: IEditorOption<EditorOption.suggestSelection, "first" | "recentlyUsed" | "recentlyUsedByPrefix">;
|
|
5180
|
+
tabCompletion: IEditorOption<EditorOption.tabCompletion, "on" | "off" | "onlySnippets">;
|
|
5152
5181
|
tabIndex: IEditorOption<EditorOption.tabIndex, number>;
|
|
5182
|
+
trimWhitespaceOnDelete: IEditorOption<EditorOption.trimWhitespaceOnDelete, boolean>;
|
|
5153
5183
|
unicodeHighlight: IEditorOption<EditorOption.unicodeHighlighting, any>;
|
|
5154
|
-
unusualLineTerminators: IEditorOption<EditorOption.unusualLineTerminators,
|
|
5184
|
+
unusualLineTerminators: IEditorOption<EditorOption.unusualLineTerminators, "off" | "auto" | "prompt">;
|
|
5155
5185
|
useShadowDOM: IEditorOption<EditorOption.useShadowDOM, boolean>;
|
|
5156
5186
|
useTabStops: IEditorOption<EditorOption.useTabStops, boolean>;
|
|
5157
|
-
wordBreak: IEditorOption<EditorOption.wordBreak,
|
|
5187
|
+
wordBreak: IEditorOption<EditorOption.wordBreak, "normal" | "keepAll">;
|
|
5158
5188
|
wordSegmenterLocales: IEditorOption<EditorOption.wordSegmenterLocales, {}>;
|
|
5159
5189
|
wordSeparators: IEditorOption<EditorOption.wordSeparators, string>;
|
|
5160
|
-
wordWrap: IEditorOption<EditorOption.wordWrap,
|
|
5190
|
+
wordWrap: IEditorOption<EditorOption.wordWrap, "wordWrapColumn" | "on" | "off" | "bounded">;
|
|
5161
5191
|
wordWrapBreakAfterCharacters: IEditorOption<EditorOption.wordWrapBreakAfterCharacters, string>;
|
|
5162
5192
|
wordWrapBreakBeforeCharacters: IEditorOption<EditorOption.wordWrapBreakBeforeCharacters, string>;
|
|
5163
5193
|
wordWrapColumn: IEditorOption<EditorOption.wordWrapColumn, number>;
|
|
5164
|
-
wordWrapOverride1: IEditorOption<EditorOption.wordWrapOverride1,
|
|
5165
|
-
wordWrapOverride2: IEditorOption<EditorOption.wordWrapOverride2,
|
|
5194
|
+
wordWrapOverride1: IEditorOption<EditorOption.wordWrapOverride1, "on" | "off" | "inherit">;
|
|
5195
|
+
wordWrapOverride2: IEditorOption<EditorOption.wordWrapOverride2, "on" | "off" | "inherit">;
|
|
5196
|
+
wrapOnEscapedLineFeeds: IEditorOption<EditorOption.wrapOnEscapedLineFeeds, boolean>;
|
|
5197
|
+
effectiveCursorStyle: IEditorOption<EditorOption.effectiveCursorStyle, TextEditorCursorStyle>;
|
|
5166
5198
|
editorClassName: IEditorOption<EditorOption.editorClassName, string>;
|
|
5167
|
-
defaultColorDecorators: IEditorOption<EditorOption.defaultColorDecorators,
|
|
5199
|
+
defaultColorDecorators: IEditorOption<EditorOption.defaultColorDecorators, "auto" | "always" | "never">;
|
|
5168
5200
|
pixelRatio: IEditorOption<EditorOption.pixelRatio, number>;
|
|
5169
5201
|
tabFocusMode: IEditorOption<EditorOption.tabFocusMode, boolean>;
|
|
5170
5202
|
layoutInfo: IEditorOption<EditorOption.layoutInfo, EditorLayoutInfo>;
|
|
5171
5203
|
wrappingInfo: IEditorOption<EditorOption.wrappingInfo, EditorWrappingInfo>;
|
|
5172
5204
|
wrappingIndent: IEditorOption<EditorOption.wrappingIndent, WrappingIndent>;
|
|
5173
|
-
wrappingStrategy: IEditorOption<EditorOption.wrappingStrategy,
|
|
5205
|
+
wrappingStrategy: IEditorOption<EditorOption.wrappingStrategy, "simple" | "advanced">;
|
|
5206
|
+
effectiveEditContextEnabled: IEditorOption<EditorOption.effectiveEditContext, boolean>;
|
|
5207
|
+
effectiveAllowVariableFonts: IEditorOption<EditorOption.effectiveAllowVariableFonts, boolean>;
|
|
5174
5208
|
};
|
|
5175
|
-
|
|
5176
5209
|
type EditorOptionsType = typeof EditorOptions;
|
|
5177
|
-
|
|
5178
5210
|
type FindEditorOptionsKeyById<T extends EditorOption> = {
|
|
5179
|
-
[K in keyof EditorOptionsType]: EditorOptionsType[K][
|
|
5211
|
+
[K in keyof EditorOptionsType]: EditorOptionsType[K]["id"] extends T ? K : never;
|
|
5180
5212
|
}[keyof EditorOptionsType];
|
|
5181
|
-
|
|
5182
5213
|
type ComputedEditorOptionValue<T extends IEditorOption<any, any>> = T extends IEditorOption<any, infer R> ? R : never;
|
|
5183
|
-
|
|
5184
5214
|
export type FindComputedEditorOptionValueById<T extends EditorOption> = NonNullable<ComputedEditorOptionValue<EditorOptionsType[FindEditorOptionsKeyById<T>]>>;
|
|
5185
|
-
|
|
5186
5215
|
export interface IEditorConstructionOptions extends IEditorOptions {
|
|
5187
5216
|
/**
|
|
5188
5217
|
* The initial editor dimension (to avoid measuring the container).
|
|
@@ -5194,7 +5223,6 @@ export namespace editor {
|
|
|
5194
5223
|
*/
|
|
5195
5224
|
overflowWidgetsDomNode?: HTMLElement;
|
|
5196
5225
|
}
|
|
5197
|
-
|
|
5198
5226
|
/**
|
|
5199
5227
|
* A view zone is a full horizontal rectangle that 'pushes' text down.
|
|
5200
5228
|
* The editor reserves space for view zones when rendering.
|
|
@@ -5264,7 +5292,6 @@ export namespace editor {
|
|
|
5264
5292
|
*/
|
|
5265
5293
|
onComputedHeight?: (height: number) => void;
|
|
5266
5294
|
}
|
|
5267
|
-
|
|
5268
5295
|
/**
|
|
5269
5296
|
* An accessor that allows for zones to be added or removed.
|
|
5270
5297
|
*/
|
|
@@ -5286,7 +5313,6 @@ export namespace editor {
|
|
|
5286
5313
|
*/
|
|
5287
5314
|
layoutZone(id: string): void;
|
|
5288
5315
|
}
|
|
5289
|
-
|
|
5290
5316
|
/**
|
|
5291
5317
|
* A positioning preference for rendering content widgets.
|
|
5292
5318
|
*/
|
|
@@ -5304,7 +5330,6 @@ export namespace editor {
|
|
|
5304
5330
|
*/
|
|
5305
5331
|
BELOW = 2
|
|
5306
5332
|
}
|
|
5307
|
-
|
|
5308
5333
|
/**
|
|
5309
5334
|
* A position for rendering content widgets.
|
|
5310
5335
|
*/
|
|
@@ -5338,7 +5363,6 @@ export namespace editor {
|
|
|
5338
5363
|
*/
|
|
5339
5364
|
positionAffinity?: PositionAffinity;
|
|
5340
5365
|
}
|
|
5341
|
-
|
|
5342
5366
|
/**
|
|
5343
5367
|
* A content widget renders inline with the text and can be easily placed 'near' an editor position.
|
|
5344
5368
|
*/
|
|
@@ -5375,9 +5399,21 @@ export namespace editor {
|
|
|
5375
5399
|
* widget. Is being invoked with the selected position preference
|
|
5376
5400
|
* or `null` if not rendered.
|
|
5377
5401
|
*/
|
|
5378
|
-
afterRender?(position: ContentWidgetPositionPreference | null): void;
|
|
5402
|
+
afterRender?(position: ContentWidgetPositionPreference | null, coordinate: IContentWidgetRenderedCoordinate | null): void;
|
|
5403
|
+
}
|
|
5404
|
+
/**
|
|
5405
|
+
* Coordinatees passed in {@link IContentWidget.afterRender}
|
|
5406
|
+
*/
|
|
5407
|
+
export interface IContentWidgetRenderedCoordinate {
|
|
5408
|
+
/**
|
|
5409
|
+
* Top position relative to the editor content.
|
|
5410
|
+
*/
|
|
5411
|
+
readonly top: number;
|
|
5412
|
+
/**
|
|
5413
|
+
* Left position relative to the editor content.
|
|
5414
|
+
*/
|
|
5415
|
+
readonly left: number;
|
|
5379
5416
|
}
|
|
5380
|
-
|
|
5381
5417
|
/**
|
|
5382
5418
|
* A positioning preference for rendering overlay widgets.
|
|
5383
5419
|
*/
|
|
@@ -5395,7 +5431,6 @@ export namespace editor {
|
|
|
5395
5431
|
*/
|
|
5396
5432
|
TOP_CENTER = 2
|
|
5397
5433
|
}
|
|
5398
|
-
|
|
5399
5434
|
/**
|
|
5400
5435
|
* Represents editor-relative coordinates of an overlay widget.
|
|
5401
5436
|
*/
|
|
@@ -5409,7 +5444,6 @@ export namespace editor {
|
|
|
5409
5444
|
*/
|
|
5410
5445
|
left: number;
|
|
5411
5446
|
}
|
|
5412
|
-
|
|
5413
5447
|
/**
|
|
5414
5448
|
* A position for rendering overlay widgets.
|
|
5415
5449
|
*/
|
|
@@ -5424,7 +5458,6 @@ export namespace editor {
|
|
|
5424
5458
|
*/
|
|
5425
5459
|
stackOridinal?: number;
|
|
5426
5460
|
}
|
|
5427
|
-
|
|
5428
5461
|
/**
|
|
5429
5462
|
* An overlay widgets renders on top of the text.
|
|
5430
5463
|
*/
|
|
@@ -5455,7 +5488,6 @@ export namespace editor {
|
|
|
5455
5488
|
*/
|
|
5456
5489
|
getMinContentWidthInPx?(): number;
|
|
5457
5490
|
}
|
|
5458
|
-
|
|
5459
5491
|
/**
|
|
5460
5492
|
* A glyph margin widget renders in the editor glyph margin.
|
|
5461
5493
|
*/
|
|
@@ -5473,7 +5505,6 @@ export namespace editor {
|
|
|
5473
5505
|
*/
|
|
5474
5506
|
getPosition(): IGlyphMarginWidgetPosition;
|
|
5475
5507
|
}
|
|
5476
|
-
|
|
5477
5508
|
/**
|
|
5478
5509
|
* A position for rendering glyph margin widgets.
|
|
5479
5510
|
*/
|
|
@@ -5492,7 +5523,6 @@ export namespace editor {
|
|
|
5492
5523
|
*/
|
|
5493
5524
|
range: IRange;
|
|
5494
5525
|
}
|
|
5495
|
-
|
|
5496
5526
|
/**
|
|
5497
5527
|
* Type of hit element with the mouse in the editor.
|
|
5498
5528
|
*/
|
|
@@ -5554,7 +5584,6 @@ export namespace editor {
|
|
|
5554
5584
|
*/
|
|
5555
5585
|
OUTSIDE_EDITOR = 13
|
|
5556
5586
|
}
|
|
5557
|
-
|
|
5558
5587
|
export interface IBaseMouseTarget {
|
|
5559
5588
|
/**
|
|
5560
5589
|
* The target element
|
|
@@ -5573,17 +5602,14 @@ export namespace editor {
|
|
|
5573
5602
|
*/
|
|
5574
5603
|
readonly range: Range | null;
|
|
5575
5604
|
}
|
|
5576
|
-
|
|
5577
5605
|
export interface IMouseTargetUnknown extends IBaseMouseTarget {
|
|
5578
5606
|
readonly type: MouseTargetType.UNKNOWN;
|
|
5579
5607
|
}
|
|
5580
|
-
|
|
5581
5608
|
export interface IMouseTargetTextarea extends IBaseMouseTarget {
|
|
5582
5609
|
readonly type: MouseTargetType.TEXTAREA;
|
|
5583
5610
|
readonly position: null;
|
|
5584
5611
|
readonly range: null;
|
|
5585
5612
|
}
|
|
5586
|
-
|
|
5587
5613
|
export interface IMouseTargetMarginData {
|
|
5588
5614
|
readonly isAfterLines: boolean;
|
|
5589
5615
|
readonly glyphMarginLeft: number;
|
|
@@ -5592,14 +5618,12 @@ export namespace editor {
|
|
|
5592
5618
|
readonly lineNumbersWidth: number;
|
|
5593
5619
|
readonly offsetX: number;
|
|
5594
5620
|
}
|
|
5595
|
-
|
|
5596
5621
|
export interface IMouseTargetMargin extends IBaseMouseTarget {
|
|
5597
5622
|
readonly type: MouseTargetType.GUTTER_GLYPH_MARGIN | MouseTargetType.GUTTER_LINE_NUMBERS | MouseTargetType.GUTTER_LINE_DECORATIONS;
|
|
5598
5623
|
readonly position: Position;
|
|
5599
5624
|
readonly range: Range;
|
|
5600
5625
|
readonly detail: IMouseTargetMarginData;
|
|
5601
5626
|
}
|
|
5602
|
-
|
|
5603
5627
|
export interface IMouseTargetViewZoneData {
|
|
5604
5628
|
readonly viewZoneId: string;
|
|
5605
5629
|
readonly positionBefore: Position | null;
|
|
@@ -5607,72 +5631,60 @@ export namespace editor {
|
|
|
5607
5631
|
readonly position: Position;
|
|
5608
5632
|
readonly afterLineNumber: number;
|
|
5609
5633
|
}
|
|
5610
|
-
|
|
5611
5634
|
export interface IMouseTargetViewZone extends IBaseMouseTarget {
|
|
5612
5635
|
readonly type: MouseTargetType.GUTTER_VIEW_ZONE | MouseTargetType.CONTENT_VIEW_ZONE;
|
|
5613
5636
|
readonly position: Position;
|
|
5614
5637
|
readonly range: Range;
|
|
5615
5638
|
readonly detail: IMouseTargetViewZoneData;
|
|
5616
5639
|
}
|
|
5617
|
-
|
|
5618
5640
|
export interface IMouseTargetContentTextData {
|
|
5619
5641
|
readonly mightBeForeignElement: boolean;
|
|
5620
5642
|
}
|
|
5621
|
-
|
|
5622
5643
|
export interface IMouseTargetContentText extends IBaseMouseTarget {
|
|
5623
5644
|
readonly type: MouseTargetType.CONTENT_TEXT;
|
|
5624
5645
|
readonly position: Position;
|
|
5625
5646
|
readonly range: Range;
|
|
5626
5647
|
readonly detail: IMouseTargetContentTextData;
|
|
5627
5648
|
}
|
|
5628
|
-
|
|
5629
5649
|
export interface IMouseTargetContentEmptyData {
|
|
5630
5650
|
readonly isAfterLines: boolean;
|
|
5631
5651
|
readonly horizontalDistanceToText?: number;
|
|
5632
5652
|
}
|
|
5633
|
-
|
|
5634
5653
|
export interface IMouseTargetContentEmpty extends IBaseMouseTarget {
|
|
5635
5654
|
readonly type: MouseTargetType.CONTENT_EMPTY;
|
|
5636
5655
|
readonly position: Position;
|
|
5637
5656
|
readonly range: Range;
|
|
5638
5657
|
readonly detail: IMouseTargetContentEmptyData;
|
|
5639
5658
|
}
|
|
5640
|
-
|
|
5641
5659
|
export interface IMouseTargetContentWidget extends IBaseMouseTarget {
|
|
5642
5660
|
readonly type: MouseTargetType.CONTENT_WIDGET;
|
|
5643
5661
|
readonly position: null;
|
|
5644
5662
|
readonly range: null;
|
|
5645
5663
|
readonly detail: string;
|
|
5646
5664
|
}
|
|
5647
|
-
|
|
5648
5665
|
export interface IMouseTargetOverlayWidget extends IBaseMouseTarget {
|
|
5649
5666
|
readonly type: MouseTargetType.OVERLAY_WIDGET;
|
|
5650
5667
|
readonly position: null;
|
|
5651
5668
|
readonly range: null;
|
|
5652
5669
|
readonly detail: string;
|
|
5653
5670
|
}
|
|
5654
|
-
|
|
5655
5671
|
export interface IMouseTargetScrollbar extends IBaseMouseTarget {
|
|
5656
5672
|
readonly type: MouseTargetType.SCROLLBAR;
|
|
5657
5673
|
readonly position: Position;
|
|
5658
5674
|
readonly range: Range;
|
|
5659
5675
|
}
|
|
5660
|
-
|
|
5661
5676
|
export interface IMouseTargetOverviewRuler extends IBaseMouseTarget {
|
|
5662
5677
|
readonly type: MouseTargetType.OVERVIEW_RULER;
|
|
5663
5678
|
}
|
|
5664
|
-
|
|
5665
5679
|
export interface IMouseTargetOutsideEditor extends IBaseMouseTarget {
|
|
5666
5680
|
readonly type: MouseTargetType.OUTSIDE_EDITOR;
|
|
5667
|
-
readonly outsidePosition:
|
|
5681
|
+
readonly outsidePosition: "above" | "below" | "left" | "right";
|
|
5668
5682
|
readonly outsideDistance: number;
|
|
5669
5683
|
}
|
|
5670
|
-
|
|
5671
5684
|
/**
|
|
5672
5685
|
* Target hit with the mouse in the editor.
|
|
5673
5686
|
*/
|
|
5674
5687
|
export type IMouseTarget = (IMouseTargetUnknown | IMouseTargetTextarea | IMouseTargetMargin | IMouseTargetViewZone | IMouseTargetContentText | IMouseTargetContentEmpty | IMouseTargetContentWidget | IMouseTargetOverlayWidget | IMouseTargetScrollbar | IMouseTargetOverviewRuler | IMouseTargetOutsideEditor);
|
|
5675
|
-
|
|
5676
5688
|
/**
|
|
5677
5689
|
* A mouse event originating from the editor.
|
|
5678
5690
|
*/
|
|
@@ -5680,12 +5692,10 @@ export namespace editor {
|
|
|
5680
5692
|
readonly event: IMouseEvent;
|
|
5681
5693
|
readonly target: IMouseTarget;
|
|
5682
5694
|
}
|
|
5683
|
-
|
|
5684
5695
|
export interface IPartialEditorMouseEvent {
|
|
5685
5696
|
readonly event: IMouseEvent;
|
|
5686
5697
|
readonly target: IMouseTarget | null;
|
|
5687
5698
|
}
|
|
5688
|
-
|
|
5689
5699
|
/**
|
|
5690
5700
|
* A paste event originating from the editor.
|
|
5691
5701
|
*/
|
|
@@ -5694,7 +5704,6 @@ export namespace editor {
|
|
|
5694
5704
|
readonly languageId: string | null;
|
|
5695
5705
|
readonly clipboardEvent?: ClipboardEvent;
|
|
5696
5706
|
}
|
|
5697
|
-
|
|
5698
5707
|
export interface IDiffEditorConstructionOptions extends IDiffEditorOptions, IEditorConstructionOptions {
|
|
5699
5708
|
/**
|
|
5700
5709
|
* Place overflow widgets inside an external DOM node.
|
|
@@ -5710,7 +5719,6 @@ export namespace editor {
|
|
|
5710
5719
|
*/
|
|
5711
5720
|
modifiedAriaLabel?: string;
|
|
5712
5721
|
}
|
|
5713
|
-
|
|
5714
5722
|
/**
|
|
5715
5723
|
* A rich code editor.
|
|
5716
5724
|
*/
|
|
@@ -5785,6 +5793,10 @@ export namespace editor {
|
|
|
5785
5793
|
* @event
|
|
5786
5794
|
*/
|
|
5787
5795
|
readonly onDidBlurEditorWidget: IEvent<void>;
|
|
5796
|
+
/**
|
|
5797
|
+
* Boolean indicating whether input is in composition
|
|
5798
|
+
*/
|
|
5799
|
+
readonly inComposition: boolean;
|
|
5788
5800
|
/**
|
|
5789
5801
|
* An event emitted after composition has started.
|
|
5790
5802
|
*/
|
|
@@ -6011,6 +6023,11 @@ export namespace editor {
|
|
|
6011
6023
|
* Get all the decorations for a range (filtering out decorations from other editors).
|
|
6012
6024
|
*/
|
|
6013
6025
|
getDecorationsInRange(range: Range): IModelDecoration[] | null;
|
|
6026
|
+
/**
|
|
6027
|
+
* Get the font size at a given position
|
|
6028
|
+
* @param position the position for which to fetch the font size
|
|
6029
|
+
*/
|
|
6030
|
+
getFontSizeAtPosition(position: IPosition): string | null;
|
|
6014
6031
|
/**
|
|
6015
6032
|
* All decorations added through this call will get the ownerId of this editor.
|
|
6016
6033
|
* @deprecated Use `createDecorationsCollection`
|
|
@@ -6042,6 +6059,10 @@ export namespace editor {
|
|
|
6042
6059
|
* Get the vertical position (top offset) for the position w.r.t. to the first line.
|
|
6043
6060
|
*/
|
|
6044
6061
|
getTopForPosition(lineNumber: number, column: number): number;
|
|
6062
|
+
/**
|
|
6063
|
+
* Get the line height for a model position.
|
|
6064
|
+
*/
|
|
6065
|
+
getLineHeightForPosition(position: IPosition): number;
|
|
6045
6066
|
/**
|
|
6046
6067
|
* Write the screen reader content to be the current selection
|
|
6047
6068
|
*/
|
|
@@ -6137,7 +6158,6 @@ export namespace editor {
|
|
|
6137
6158
|
*/
|
|
6138
6159
|
handleInitialized?(): void;
|
|
6139
6160
|
}
|
|
6140
|
-
|
|
6141
6161
|
/**
|
|
6142
6162
|
* A rich diff editor.
|
|
6143
6163
|
*/
|
|
@@ -6197,7 +6217,7 @@ export namespace editor {
|
|
|
6197
6217
|
/**
|
|
6198
6218
|
* Jumps to the next or previous diff.
|
|
6199
6219
|
*/
|
|
6200
|
-
goToDiff(target:
|
|
6220
|
+
goToDiff(target: "next" | "previous"): void;
|
|
6201
6221
|
/**
|
|
6202
6222
|
* Scrolls to the first diff.
|
|
6203
6223
|
* (Waits until the diff computation finished.)
|
|
@@ -6207,7 +6227,6 @@ export namespace editor {
|
|
|
6207
6227
|
accessibleDiffViewerPrev(): void;
|
|
6208
6228
|
handleInitialized(): void;
|
|
6209
6229
|
}
|
|
6210
|
-
|
|
6211
6230
|
export class FontInfo extends BareFontInfo {
|
|
6212
6231
|
readonly _editorStylingBrand: void;
|
|
6213
6232
|
readonly version: number;
|
|
@@ -6221,7 +6240,6 @@ export namespace editor {
|
|
|
6221
6240
|
readonly wsmiddotWidth: number;
|
|
6222
6241
|
readonly maxDigitWidth: number;
|
|
6223
6242
|
}
|
|
6224
|
-
|
|
6225
6243
|
export class BareFontInfo {
|
|
6226
6244
|
readonly _bareFontInfoBrand: void;
|
|
6227
6245
|
readonly pixelRatio: number;
|
|
@@ -6233,22 +6251,17 @@ export namespace editor {
|
|
|
6233
6251
|
readonly lineHeight: number;
|
|
6234
6252
|
readonly letterSpacing: number;
|
|
6235
6253
|
}
|
|
6236
|
-
|
|
6237
6254
|
export const EditorZoom: IEditorZoom;
|
|
6238
|
-
|
|
6239
6255
|
export interface IEditorZoom {
|
|
6240
6256
|
onDidChangeZoomLevel: IEvent<number>;
|
|
6241
6257
|
getZoomLevel(): number;
|
|
6242
6258
|
setZoomLevel(zoomLevel: number): void;
|
|
6243
6259
|
}
|
|
6244
|
-
|
|
6245
6260
|
//compatibility:
|
|
6246
6261
|
export type IReadOnlyModel = ITextModel;
|
|
6247
6262
|
export type IModel = ITextModel;
|
|
6248
6263
|
}
|
|
6249
|
-
|
|
6250
6264
|
export namespace languages {
|
|
6251
|
-
|
|
6252
6265
|
export interface IRelativePattern {
|
|
6253
6266
|
/**
|
|
6254
6267
|
* A base file path to which this pattern will be matched against relatively.
|
|
@@ -6263,9 +6276,7 @@ export namespace languages {
|
|
|
6263
6276
|
*/
|
|
6264
6277
|
readonly pattern: string;
|
|
6265
6278
|
}
|
|
6266
|
-
|
|
6267
6279
|
export type LanguageSelector = string | LanguageFilter | ReadonlyArray<string | LanguageFilter>;
|
|
6268
|
-
|
|
6269
6280
|
export interface LanguageFilter {
|
|
6270
6281
|
readonly language?: string;
|
|
6271
6282
|
readonly scheme?: string;
|
|
@@ -6281,37 +6292,30 @@ export namespace languages {
|
|
|
6281
6292
|
*/
|
|
6282
6293
|
readonly isBuiltin?: boolean;
|
|
6283
6294
|
}
|
|
6284
|
-
|
|
6285
6295
|
/**
|
|
6286
6296
|
* Register information about a new language.
|
|
6287
6297
|
*/
|
|
6288
6298
|
export function register(language: ILanguageExtensionPoint): void;
|
|
6289
|
-
|
|
6290
6299
|
/**
|
|
6291
6300
|
* Get the information of all the registered languages.
|
|
6292
6301
|
*/
|
|
6293
6302
|
export function getLanguages(): ILanguageExtensionPoint[];
|
|
6294
|
-
|
|
6295
6303
|
export function getEncodedLanguageId(languageId: string): number;
|
|
6296
|
-
|
|
6297
6304
|
/**
|
|
6298
6305
|
* An event emitted when a language is associated for the first time with a text model.
|
|
6299
6306
|
* @event
|
|
6300
6307
|
*/
|
|
6301
6308
|
export function onLanguage(languageId: string, callback: () => void): IDisposable;
|
|
6302
|
-
|
|
6303
6309
|
/**
|
|
6304
6310
|
* An event emitted when a language is associated for the first time with a text model or
|
|
6305
6311
|
* when a language is encountered during the tokenization of another language.
|
|
6306
6312
|
* @event
|
|
6307
6313
|
*/
|
|
6308
6314
|
export function onLanguageEncountered(languageId: string, callback: () => void): IDisposable;
|
|
6309
|
-
|
|
6310
6315
|
/**
|
|
6311
6316
|
* Set the editing configuration for a language.
|
|
6312
6317
|
*/
|
|
6313
6318
|
export function setLanguageConfiguration(languageId: string, configuration: LanguageConfiguration): IDisposable;
|
|
6314
|
-
|
|
6315
6319
|
/**
|
|
6316
6320
|
* A token.
|
|
6317
6321
|
*/
|
|
@@ -6319,7 +6323,6 @@ export namespace languages {
|
|
|
6319
6323
|
startIndex: number;
|
|
6320
6324
|
scopes: string;
|
|
6321
6325
|
}
|
|
6322
|
-
|
|
6323
6326
|
/**
|
|
6324
6327
|
* The result of a line tokenization.
|
|
6325
6328
|
*/
|
|
@@ -6334,7 +6337,6 @@ export namespace languages {
|
|
|
6334
6337
|
*/
|
|
6335
6338
|
endState: IState;
|
|
6336
6339
|
}
|
|
6337
|
-
|
|
6338
6340
|
/**
|
|
6339
6341
|
* The result of a line tokenization.
|
|
6340
6342
|
*/
|
|
@@ -6366,14 +6368,12 @@ export namespace languages {
|
|
|
6366
6368
|
*/
|
|
6367
6369
|
endState: IState;
|
|
6368
6370
|
}
|
|
6369
|
-
|
|
6370
6371
|
/**
|
|
6371
6372
|
* A factory for token providers.
|
|
6372
6373
|
*/
|
|
6373
6374
|
export interface TokensProviderFactory {
|
|
6374
6375
|
create(): ProviderResult<TokensProvider | EncodedTokensProvider | IMonarchLanguage>;
|
|
6375
6376
|
}
|
|
6376
|
-
|
|
6377
6377
|
/**
|
|
6378
6378
|
* A "manual" provider of tokens.
|
|
6379
6379
|
*/
|
|
@@ -6387,7 +6387,6 @@ export namespace languages {
|
|
|
6387
6387
|
*/
|
|
6388
6388
|
tokenize(line: string, state: IState): ILineTokens;
|
|
6389
6389
|
}
|
|
6390
|
-
|
|
6391
6390
|
/**
|
|
6392
6391
|
* A "manual" provider of tokens, returning tokens in a binary form.
|
|
6393
6392
|
*/
|
|
@@ -6405,20 +6404,17 @@ export namespace languages {
|
|
|
6405
6404
|
*/
|
|
6406
6405
|
tokenize?(line: string, state: IState): ILineTokens;
|
|
6407
6406
|
}
|
|
6408
|
-
|
|
6409
6407
|
/**
|
|
6410
6408
|
* Change the color map that is used for token colors.
|
|
6411
6409
|
* Supported formats (hex): #RRGGBB, $RRGGBBAA, #RGB, #RGBA
|
|
6412
6410
|
*/
|
|
6413
6411
|
export function setColorMap(colorMap: string[] | null): void;
|
|
6414
|
-
|
|
6415
6412
|
/**
|
|
6416
6413
|
* Register a tokens provider factory for a language. This tokenizer will be exclusive with a tokenizer
|
|
6417
6414
|
* set using `setTokensProvider` or one created using `setMonarchTokensProvider`, but will work together
|
|
6418
6415
|
* with a tokens provider set using `registerDocumentSemanticTokensProvider` or `registerDocumentRangeSemanticTokensProvider`.
|
|
6419
6416
|
*/
|
|
6420
6417
|
export function registerTokensProviderFactory(languageId: string, factory: TokensProviderFactory): IDisposable;
|
|
6421
|
-
|
|
6422
6418
|
/**
|
|
6423
6419
|
* Set the tokens provider for a language (manual implementation). This tokenizer will be exclusive
|
|
6424
6420
|
* with a tokenizer created using `setMonarchTokensProvider`, or with `registerTokensProviderFactory`,
|
|
@@ -6426,7 +6422,6 @@ export namespace languages {
|
|
|
6426
6422
|
* or `registerDocumentRangeSemanticTokensProvider`.
|
|
6427
6423
|
*/
|
|
6428
6424
|
export function setTokensProvider(languageId: string, provider: TokensProvider | EncodedTokensProvider | Thenable<TokensProvider | EncodedTokensProvider>): IDisposable;
|
|
6429
|
-
|
|
6430
6425
|
/**
|
|
6431
6426
|
* Set the tokens provider for a language (monarch implementation). This tokenizer will be exclusive
|
|
6432
6427
|
* with a tokenizer set using `setTokensProvider`, or with `registerTokensProviderFactory`, but will
|
|
@@ -6434,117 +6429,94 @@ export namespace languages {
|
|
|
6434
6429
|
* `registerDocumentRangeSemanticTokensProvider`.
|
|
6435
6430
|
*/
|
|
6436
6431
|
export function setMonarchTokensProvider(languageId: string, languageDef: IMonarchLanguage | Thenable<IMonarchLanguage>): IDisposable;
|
|
6437
|
-
|
|
6438
6432
|
/**
|
|
6439
6433
|
* Register a reference provider (used by e.g. reference search).
|
|
6440
6434
|
*/
|
|
6441
6435
|
export function registerReferenceProvider(languageSelector: LanguageSelector, provider: ReferenceProvider): IDisposable;
|
|
6442
|
-
|
|
6443
6436
|
/**
|
|
6444
6437
|
* Register a rename provider (used by e.g. rename symbol).
|
|
6445
6438
|
*/
|
|
6446
6439
|
export function registerRenameProvider(languageSelector: LanguageSelector, provider: RenameProvider): IDisposable;
|
|
6447
|
-
|
|
6448
6440
|
/**
|
|
6449
6441
|
* Register a new symbol-name provider (e.g., when a symbol is being renamed, show new possible symbol-names)
|
|
6450
6442
|
*/
|
|
6451
6443
|
export function registerNewSymbolNameProvider(languageSelector: LanguageSelector, provider: NewSymbolNamesProvider): IDisposable;
|
|
6452
|
-
|
|
6453
6444
|
/**
|
|
6454
6445
|
* Register a signature help provider (used by e.g. parameter hints).
|
|
6455
6446
|
*/
|
|
6456
6447
|
export function registerSignatureHelpProvider(languageSelector: LanguageSelector, provider: SignatureHelpProvider): IDisposable;
|
|
6457
|
-
|
|
6458
6448
|
/**
|
|
6459
6449
|
* Register a hover provider (used by e.g. editor hover).
|
|
6460
6450
|
*/
|
|
6461
6451
|
export function registerHoverProvider(languageSelector: LanguageSelector, provider: HoverProvider): IDisposable;
|
|
6462
|
-
|
|
6463
6452
|
/**
|
|
6464
6453
|
* Register a document symbol provider (used by e.g. outline).
|
|
6465
6454
|
*/
|
|
6466
6455
|
export function registerDocumentSymbolProvider(languageSelector: LanguageSelector, provider: DocumentSymbolProvider): IDisposable;
|
|
6467
|
-
|
|
6468
6456
|
/**
|
|
6469
6457
|
* Register a document highlight provider (used by e.g. highlight occurrences).
|
|
6470
6458
|
*/
|
|
6471
6459
|
export function registerDocumentHighlightProvider(languageSelector: LanguageSelector, provider: DocumentHighlightProvider): IDisposable;
|
|
6472
|
-
|
|
6473
6460
|
/**
|
|
6474
6461
|
* Register an linked editing range provider.
|
|
6475
6462
|
*/
|
|
6476
6463
|
export function registerLinkedEditingRangeProvider(languageSelector: LanguageSelector, provider: LinkedEditingRangeProvider): IDisposable;
|
|
6477
|
-
|
|
6478
6464
|
/**
|
|
6479
6465
|
* Register a definition provider (used by e.g. go to definition).
|
|
6480
6466
|
*/
|
|
6481
6467
|
export function registerDefinitionProvider(languageSelector: LanguageSelector, provider: DefinitionProvider): IDisposable;
|
|
6482
|
-
|
|
6483
6468
|
/**
|
|
6484
6469
|
* Register a implementation provider (used by e.g. go to implementation).
|
|
6485
6470
|
*/
|
|
6486
6471
|
export function registerImplementationProvider(languageSelector: LanguageSelector, provider: ImplementationProvider): IDisposable;
|
|
6487
|
-
|
|
6488
6472
|
/**
|
|
6489
6473
|
* Register a type definition provider (used by e.g. go to type definition).
|
|
6490
6474
|
*/
|
|
6491
6475
|
export function registerTypeDefinitionProvider(languageSelector: LanguageSelector, provider: TypeDefinitionProvider): IDisposable;
|
|
6492
|
-
|
|
6493
6476
|
/**
|
|
6494
6477
|
* Register a code lens provider (used by e.g. inline code lenses).
|
|
6495
6478
|
*/
|
|
6496
6479
|
export function registerCodeLensProvider(languageSelector: LanguageSelector, provider: CodeLensProvider): IDisposable;
|
|
6497
|
-
|
|
6498
6480
|
/**
|
|
6499
6481
|
* Register a code action provider (used by e.g. quick fix).
|
|
6500
6482
|
*/
|
|
6501
6483
|
export function registerCodeActionProvider(languageSelector: LanguageSelector, provider: CodeActionProvider, metadata?: CodeActionProviderMetadata): IDisposable;
|
|
6502
|
-
|
|
6503
6484
|
/**
|
|
6504
6485
|
* Register a formatter that can handle only entire models.
|
|
6505
6486
|
*/
|
|
6506
6487
|
export function registerDocumentFormattingEditProvider(languageSelector: LanguageSelector, provider: DocumentFormattingEditProvider): IDisposable;
|
|
6507
|
-
|
|
6508
6488
|
/**
|
|
6509
6489
|
* Register a formatter that can handle a range inside a model.
|
|
6510
6490
|
*/
|
|
6511
6491
|
export function registerDocumentRangeFormattingEditProvider(languageSelector: LanguageSelector, provider: DocumentRangeFormattingEditProvider): IDisposable;
|
|
6512
|
-
|
|
6513
6492
|
/**
|
|
6514
6493
|
* Register a formatter than can do formatting as the user types.
|
|
6515
6494
|
*/
|
|
6516
6495
|
export function registerOnTypeFormattingEditProvider(languageSelector: LanguageSelector, provider: OnTypeFormattingEditProvider): IDisposable;
|
|
6517
|
-
|
|
6518
6496
|
/**
|
|
6519
6497
|
* Register a link provider that can find links in text.
|
|
6520
6498
|
*/
|
|
6521
6499
|
export function registerLinkProvider(languageSelector: LanguageSelector, provider: LinkProvider): IDisposable;
|
|
6522
|
-
|
|
6523
6500
|
/**
|
|
6524
6501
|
* Register a completion item provider (use by e.g. suggestions).
|
|
6525
6502
|
*/
|
|
6526
6503
|
export function registerCompletionItemProvider(languageSelector: LanguageSelector, provider: CompletionItemProvider): IDisposable;
|
|
6527
|
-
|
|
6528
6504
|
/**
|
|
6529
6505
|
* Register a document color provider (used by Color Picker, Color Decorator).
|
|
6530
6506
|
*/
|
|
6531
6507
|
export function registerColorProvider(languageSelector: LanguageSelector, provider: DocumentColorProvider): IDisposable;
|
|
6532
|
-
|
|
6533
6508
|
/**
|
|
6534
6509
|
* Register a folding range provider
|
|
6535
6510
|
*/
|
|
6536
6511
|
export function registerFoldingRangeProvider(languageSelector: LanguageSelector, provider: FoldingRangeProvider): IDisposable;
|
|
6537
|
-
|
|
6538
6512
|
/**
|
|
6539
6513
|
* Register a declaration provider
|
|
6540
6514
|
*/
|
|
6541
6515
|
export function registerDeclarationProvider(languageSelector: LanguageSelector, provider: DeclarationProvider): IDisposable;
|
|
6542
|
-
|
|
6543
6516
|
/**
|
|
6544
6517
|
* Register a selection range provider
|
|
6545
6518
|
*/
|
|
6546
6519
|
export function registerSelectionRangeProvider(languageSelector: LanguageSelector, provider: SelectionRangeProvider): IDisposable;
|
|
6547
|
-
|
|
6548
6520
|
/**
|
|
6549
6521
|
* Register a document semantic tokens provider. A semantic tokens provider will complement and enhance a
|
|
6550
6522
|
* simple top-down tokenizer. Simple top-down tokenizers can be set either via `setMonarchTokensProvider`
|
|
@@ -6553,7 +6525,6 @@ export namespace languages {
|
|
|
6553
6525
|
* For the best user experience, register both a semantic tokens provider and a top-down tokenizer.
|
|
6554
6526
|
*/
|
|
6555
6527
|
export function registerDocumentSemanticTokensProvider(languageSelector: LanguageSelector, provider: DocumentSemanticTokensProvider): IDisposable;
|
|
6556
|
-
|
|
6557
6528
|
/**
|
|
6558
6529
|
* Register a document range semantic tokens provider. A semantic tokens provider will complement and enhance a
|
|
6559
6530
|
* simple top-down tokenizer. Simple top-down tokenizers can be set either via `setMonarchTokensProvider`
|
|
@@ -6562,19 +6533,14 @@ export namespace languages {
|
|
|
6562
6533
|
* For the best user experience, register both a semantic tokens provider and a top-down tokenizer.
|
|
6563
6534
|
*/
|
|
6564
6535
|
export function registerDocumentRangeSemanticTokensProvider(languageSelector: LanguageSelector, provider: DocumentRangeSemanticTokensProvider): IDisposable;
|
|
6565
|
-
|
|
6566
6536
|
/**
|
|
6567
6537
|
* Register an inline completions provider.
|
|
6568
6538
|
*/
|
|
6569
6539
|
export function registerInlineCompletionsProvider(languageSelector: LanguageSelector, provider: InlineCompletionsProvider): IDisposable;
|
|
6570
|
-
|
|
6571
|
-
export function registerInlineEditProvider(languageSelector: LanguageSelector, provider: InlineEditProvider): IDisposable;
|
|
6572
|
-
|
|
6573
6540
|
/**
|
|
6574
6541
|
* Register an inlay hints provider.
|
|
6575
6542
|
*/
|
|
6576
6543
|
export function registerInlayHintsProvider(languageSelector: LanguageSelector, provider: InlayHintsProvider): IDisposable;
|
|
6577
|
-
|
|
6578
6544
|
/**
|
|
6579
6545
|
* Contains additional diagnostic information about the context in which
|
|
6580
6546
|
* a [code action](#CodeActionProvider.provideCodeActions) is run.
|
|
@@ -6593,7 +6559,6 @@ export namespace languages {
|
|
|
6593
6559
|
*/
|
|
6594
6560
|
readonly trigger: CodeActionTriggerType;
|
|
6595
6561
|
}
|
|
6596
|
-
|
|
6597
6562
|
/**
|
|
6598
6563
|
* The code action interface defines the contract between extensions and
|
|
6599
6564
|
* the [light bulb](https://code.visualstudio.com/docs/editor/editingevolved#_code-action) feature.
|
|
@@ -6608,7 +6573,6 @@ export namespace languages {
|
|
|
6608
6573
|
*/
|
|
6609
6574
|
resolveCodeAction?(codeAction: CodeAction, token: CancellationToken): ProviderResult<CodeAction>;
|
|
6610
6575
|
}
|
|
6611
|
-
|
|
6612
6576
|
/**
|
|
6613
6577
|
* Metadata about the type of code actions that a {@link CodeActionProvider} provides.
|
|
6614
6578
|
*/
|
|
@@ -6627,21 +6591,34 @@ export namespace languages {
|
|
|
6627
6591
|
readonly command: Command;
|
|
6628
6592
|
}>;
|
|
6629
6593
|
}
|
|
6630
|
-
|
|
6594
|
+
/**
|
|
6595
|
+
* Configuration for line comments.
|
|
6596
|
+
*/
|
|
6597
|
+
export interface LineCommentConfig {
|
|
6598
|
+
/**
|
|
6599
|
+
* The line comment token, like `//`
|
|
6600
|
+
*/
|
|
6601
|
+
comment: string;
|
|
6602
|
+
/**
|
|
6603
|
+
* Whether the comment token should not be indented and placed at the first column.
|
|
6604
|
+
* Defaults to false.
|
|
6605
|
+
*/
|
|
6606
|
+
noIndent?: boolean;
|
|
6607
|
+
}
|
|
6631
6608
|
/**
|
|
6632
6609
|
* Describes how comments for a language work.
|
|
6633
6610
|
*/
|
|
6634
6611
|
export interface CommentRule {
|
|
6635
6612
|
/**
|
|
6636
|
-
* The line comment token, like `// this is a comment
|
|
6613
|
+
* The line comment token, like `// this is a comment`.
|
|
6614
|
+
* Can be a string or an object with comment and optional noIndent properties.
|
|
6637
6615
|
*/
|
|
6638
|
-
lineComment?: string | null;
|
|
6616
|
+
lineComment?: string | LineCommentConfig | null;
|
|
6639
6617
|
/**
|
|
6640
6618
|
* The block comment character pair, like `/* block comment */`
|
|
6641
6619
|
*/
|
|
6642
6620
|
blockComment?: CharacterPair | null;
|
|
6643
6621
|
}
|
|
6644
|
-
|
|
6645
6622
|
/**
|
|
6646
6623
|
* The language configuration interface defines the contract between extensions and
|
|
6647
6624
|
* various editor features, like automatic bracket insertion, automatic indentation etc.
|
|
@@ -6707,7 +6684,6 @@ export namespace languages {
|
|
|
6707
6684
|
docComment?: IDocComment;
|
|
6708
6685
|
};
|
|
6709
6686
|
}
|
|
6710
|
-
|
|
6711
6687
|
/**
|
|
6712
6688
|
* Describes indentation rules for a language.
|
|
6713
6689
|
*/
|
|
@@ -6729,7 +6705,6 @@ export namespace languages {
|
|
|
6729
6705
|
*/
|
|
6730
6706
|
unIndentedLinePattern?: RegExp | null;
|
|
6731
6707
|
}
|
|
6732
|
-
|
|
6733
6708
|
/**
|
|
6734
6709
|
* Describes language specific folding markers such as '#region' and '#endregion'.
|
|
6735
6710
|
* The start and end regexes will be tested against the contents of all lines and must be designed efficiently:
|
|
@@ -6740,7 +6715,6 @@ export namespace languages {
|
|
|
6740
6715
|
start: RegExp;
|
|
6741
6716
|
end: RegExp;
|
|
6742
6717
|
}
|
|
6743
|
-
|
|
6744
6718
|
/**
|
|
6745
6719
|
* Describes folding rules for a language.
|
|
6746
6720
|
*/
|
|
@@ -6757,7 +6731,6 @@ export namespace languages {
|
|
|
6757
6731
|
*/
|
|
6758
6732
|
markers?: FoldingMarkers;
|
|
6759
6733
|
}
|
|
6760
|
-
|
|
6761
6734
|
/**
|
|
6762
6735
|
* Describes a rule to be evaluated when pressing Enter.
|
|
6763
6736
|
*/
|
|
@@ -6779,7 +6752,6 @@ export namespace languages {
|
|
|
6779
6752
|
*/
|
|
6780
6753
|
action: EnterAction;
|
|
6781
6754
|
}
|
|
6782
|
-
|
|
6783
6755
|
/**
|
|
6784
6756
|
* Definition of documentation comments (e.g. Javadoc/JSdoc)
|
|
6785
6757
|
*/
|
|
@@ -6793,22 +6765,21 @@ export namespace languages {
|
|
|
6793
6765
|
*/
|
|
6794
6766
|
close?: string;
|
|
6795
6767
|
}
|
|
6796
|
-
|
|
6797
6768
|
/**
|
|
6798
6769
|
* A tuple of two characters, like a pair of
|
|
6799
6770
|
* opening and closing brackets.
|
|
6800
6771
|
*/
|
|
6801
|
-
export type CharacterPair = [
|
|
6802
|
-
|
|
6772
|
+
export type CharacterPair = [
|
|
6773
|
+
string,
|
|
6774
|
+
string
|
|
6775
|
+
];
|
|
6803
6776
|
export interface IAutoClosingPair {
|
|
6804
6777
|
open: string;
|
|
6805
6778
|
close: string;
|
|
6806
6779
|
}
|
|
6807
|
-
|
|
6808
6780
|
export interface IAutoClosingPairConditional extends IAutoClosingPair {
|
|
6809
6781
|
notIn?: string[];
|
|
6810
6782
|
}
|
|
6811
|
-
|
|
6812
6783
|
/**
|
|
6813
6784
|
* Describes what to do with the indentation when pressing Enter.
|
|
6814
6785
|
*/
|
|
@@ -6832,7 +6803,6 @@ export namespace languages {
|
|
|
6832
6803
|
*/
|
|
6833
6804
|
Outdent = 3
|
|
6834
6805
|
}
|
|
6835
|
-
|
|
6836
6806
|
/**
|
|
6837
6807
|
* Describes what to do when pressing Enter.
|
|
6838
6808
|
*/
|
|
@@ -6850,7 +6820,18 @@ export namespace languages {
|
|
|
6850
6820
|
*/
|
|
6851
6821
|
removeText?: number;
|
|
6852
6822
|
}
|
|
6853
|
-
|
|
6823
|
+
export interface SyntaxNode {
|
|
6824
|
+
startIndex: number;
|
|
6825
|
+
endIndex: number;
|
|
6826
|
+
startPosition: IPosition;
|
|
6827
|
+
endPosition: IPosition;
|
|
6828
|
+
}
|
|
6829
|
+
export interface QueryCapture {
|
|
6830
|
+
name: string;
|
|
6831
|
+
text?: string;
|
|
6832
|
+
node: SyntaxNode;
|
|
6833
|
+
encodedLanguageId: number;
|
|
6834
|
+
}
|
|
6854
6835
|
/**
|
|
6855
6836
|
* The state of the tokenizer between two lines.
|
|
6856
6837
|
* It is useful to store flags such as in multiline comment, etc.
|
|
@@ -6860,7 +6841,6 @@ export namespace languages {
|
|
|
6860
6841
|
clone(): IState;
|
|
6861
6842
|
equals(other: IState): boolean;
|
|
6862
6843
|
}
|
|
6863
|
-
|
|
6864
6844
|
/**
|
|
6865
6845
|
* A provider result represents the values a provider, like the {@link HoverProvider},
|
|
6866
6846
|
* may return. For once this is the actual result type `T`, like `Hover`, or a thenable that resolves
|
|
@@ -6868,7 +6848,6 @@ export namespace languages {
|
|
|
6868
6848
|
* thenable.
|
|
6869
6849
|
*/
|
|
6870
6850
|
export type ProviderResult<T> = T | undefined | null | Thenable<T | undefined | null>;
|
|
6871
|
-
|
|
6872
6851
|
/**
|
|
6873
6852
|
* A hover represents additional information for a symbol or word. Hovers are
|
|
6874
6853
|
* rendered in a tooltip-like widget.
|
|
@@ -6893,7 +6872,6 @@ export namespace languages {
|
|
|
6893
6872
|
*/
|
|
6894
6873
|
canDecreaseVerbosity?: boolean;
|
|
6895
6874
|
}
|
|
6896
|
-
|
|
6897
6875
|
/**
|
|
6898
6876
|
* The hover provider interface defines the contract between extensions and
|
|
6899
6877
|
* the [hover](https://code.visualstudio.com/docs/editor/intellisense)-feature.
|
|
@@ -6906,14 +6884,12 @@ export namespace languages {
|
|
|
6906
6884
|
*/
|
|
6907
6885
|
provideHover(model: editor.ITextModel, position: Position, token: CancellationToken, context?: HoverContext<THover>): ProviderResult<THover>;
|
|
6908
6886
|
}
|
|
6909
|
-
|
|
6910
6887
|
export interface HoverContext<THover = Hover> {
|
|
6911
6888
|
/**
|
|
6912
6889
|
* Hover verbosity request
|
|
6913
6890
|
*/
|
|
6914
6891
|
verbosityRequest?: HoverVerbosityRequest<THover>;
|
|
6915
6892
|
}
|
|
6916
|
-
|
|
6917
6893
|
export interface HoverVerbosityRequest<THover = Hover> {
|
|
6918
6894
|
/**
|
|
6919
6895
|
* The delta by which to increase/decrease the hover verbosity level
|
|
@@ -6924,7 +6900,6 @@ export namespace languages {
|
|
|
6924
6900
|
*/
|
|
6925
6901
|
previousHover: THover;
|
|
6926
6902
|
}
|
|
6927
|
-
|
|
6928
6903
|
export enum HoverVerbosityAction {
|
|
6929
6904
|
/**
|
|
6930
6905
|
* Increase the verbosity of the hover
|
|
@@ -6935,7 +6910,6 @@ export namespace languages {
|
|
|
6935
6910
|
*/
|
|
6936
6911
|
Decrease = 1
|
|
6937
6912
|
}
|
|
6938
|
-
|
|
6939
6913
|
export enum CompletionItemKind {
|
|
6940
6914
|
Method = 0,
|
|
6941
6915
|
Function = 1,
|
|
@@ -6964,19 +6938,17 @@ export namespace languages {
|
|
|
6964
6938
|
TypeParameter = 24,
|
|
6965
6939
|
User = 25,
|
|
6966
6940
|
Issue = 26,
|
|
6967
|
-
|
|
6941
|
+
Tool = 27,
|
|
6942
|
+
Snippet = 28
|
|
6968
6943
|
}
|
|
6969
|
-
|
|
6970
6944
|
export interface CompletionItemLabel {
|
|
6971
6945
|
label: string;
|
|
6972
6946
|
detail?: string;
|
|
6973
6947
|
description?: string;
|
|
6974
6948
|
}
|
|
6975
|
-
|
|
6976
6949
|
export enum CompletionItemTag {
|
|
6977
6950
|
Deprecated = 1
|
|
6978
6951
|
}
|
|
6979
|
-
|
|
6980
6952
|
export enum CompletionItemInsertTextRule {
|
|
6981
6953
|
None = 0,
|
|
6982
6954
|
/**
|
|
@@ -6989,12 +6961,10 @@ export namespace languages {
|
|
|
6989
6961
|
*/
|
|
6990
6962
|
InsertAsSnippet = 4
|
|
6991
6963
|
}
|
|
6992
|
-
|
|
6993
6964
|
export interface CompletionItemRanges {
|
|
6994
6965
|
insert: IRange;
|
|
6995
6966
|
replace: IRange;
|
|
6996
6967
|
}
|
|
6997
|
-
|
|
6998
6968
|
/**
|
|
6999
6969
|
* A completion item represents a text snippet that is
|
|
7000
6970
|
* proposed to complete text that is being typed.
|
|
@@ -7056,9 +7026,6 @@ export namespace languages {
|
|
|
7056
7026
|
/**
|
|
7057
7027
|
* A range of text that should be replaced by this completion item.
|
|
7058
7028
|
*
|
|
7059
|
-
* Defaults to a range from the start of the {@link TextDocument.getWordRangeAtPosition current word} to the
|
|
7060
|
-
* current position.
|
|
7061
|
-
*
|
|
7062
7029
|
* *Note:* The range must be a {@link Range.isSingleLine single line} and it must
|
|
7063
7030
|
* {@link Range.contains contain} the position at which completion has been {@link CompletionItemProvider.provideCompletionItems requested}.
|
|
7064
7031
|
*/
|
|
@@ -7079,21 +7046,23 @@ export namespace languages {
|
|
|
7079
7046
|
* A command that should be run upon acceptance of this item.
|
|
7080
7047
|
*/
|
|
7081
7048
|
command?: Command;
|
|
7049
|
+
/**
|
|
7050
|
+
* A command that should be run upon acceptance of this item.
|
|
7051
|
+
*/
|
|
7052
|
+
action?: Command;
|
|
7082
7053
|
}
|
|
7083
|
-
|
|
7084
7054
|
export interface CompletionList {
|
|
7085
7055
|
suggestions: CompletionItem[];
|
|
7086
7056
|
incomplete?: boolean;
|
|
7087
7057
|
dispose?(): void;
|
|
7088
7058
|
}
|
|
7089
|
-
|
|
7090
7059
|
/**
|
|
7091
7060
|
* Info provided on partial acceptance.
|
|
7092
7061
|
*/
|
|
7093
7062
|
export interface PartialAcceptInfo {
|
|
7094
7063
|
kind: PartialAcceptTriggerKind;
|
|
7064
|
+
acceptedLength: number;
|
|
7095
7065
|
}
|
|
7096
|
-
|
|
7097
7066
|
/**
|
|
7098
7067
|
* How a partial acceptance was triggered.
|
|
7099
7068
|
*/
|
|
@@ -7102,7 +7071,6 @@ export namespace languages {
|
|
|
7102
7071
|
Line = 1,
|
|
7103
7072
|
Suggest = 2
|
|
7104
7073
|
}
|
|
7105
|
-
|
|
7106
7074
|
/**
|
|
7107
7075
|
* How a suggest provider was triggered.
|
|
7108
7076
|
*/
|
|
@@ -7111,7 +7079,6 @@ export namespace languages {
|
|
|
7111
7079
|
TriggerCharacter = 1,
|
|
7112
7080
|
TriggerForIncompleteCompletions = 2
|
|
7113
7081
|
}
|
|
7114
|
-
|
|
7115
7082
|
/**
|
|
7116
7083
|
* Contains additional information about the context in which
|
|
7117
7084
|
* {@link CompletionItemProvider.provideCompletionItems completion provider} is triggered.
|
|
@@ -7128,7 +7095,6 @@ export namespace languages {
|
|
|
7128
7095
|
*/
|
|
7129
7096
|
triggerCharacter?: string;
|
|
7130
7097
|
}
|
|
7131
|
-
|
|
7132
7098
|
/**
|
|
7133
7099
|
* The completion item provider interface defines the contract between extensions and
|
|
7134
7100
|
* the [IntelliSense](https://code.visualstudio.com/docs/editor/intellisense).
|
|
@@ -7154,7 +7120,6 @@ export namespace languages {
|
|
|
7154
7120
|
*/
|
|
7155
7121
|
resolveCompletionItem?(item: CompletionItem, token: CancellationToken): ProviderResult<CompletionItem>;
|
|
7156
7122
|
}
|
|
7157
|
-
|
|
7158
7123
|
/**
|
|
7159
7124
|
* How an {@link InlineCompletionsProvider inline completion provider} was triggered.
|
|
7160
7125
|
*/
|
|
@@ -7170,15 +7135,16 @@ export namespace languages {
|
|
|
7170
7135
|
*/
|
|
7171
7136
|
Explicit = 1
|
|
7172
7137
|
}
|
|
7173
|
-
|
|
7174
7138
|
export interface InlineCompletionContext {
|
|
7175
7139
|
/**
|
|
7176
7140
|
* How the completion was triggered.
|
|
7177
7141
|
*/
|
|
7178
7142
|
readonly triggerKind: InlineCompletionTriggerKind;
|
|
7179
7143
|
readonly selectedSuggestionInfo: SelectedSuggestionInfo | undefined;
|
|
7144
|
+
readonly includeInlineEdits: boolean;
|
|
7145
|
+
readonly includeInlineCompletions: boolean;
|
|
7146
|
+
readonly requestIssuedDateTime: number;
|
|
7180
7147
|
}
|
|
7181
|
-
|
|
7182
7148
|
export class SelectedSuggestionInfo {
|
|
7183
7149
|
readonly range: IRange;
|
|
7184
7150
|
readonly text: string;
|
|
@@ -7187,7 +7153,6 @@ export namespace languages {
|
|
|
7187
7153
|
constructor(range: IRange, text: string, completionKind: CompletionItemKind, isSnippetText: boolean);
|
|
7188
7154
|
equals(other: SelectedSuggestionInfo): boolean;
|
|
7189
7155
|
}
|
|
7190
|
-
|
|
7191
7156
|
export interface InlineCompletion {
|
|
7192
7157
|
/**
|
|
7193
7158
|
* The text to insert.
|
|
@@ -7217,43 +7182,78 @@ export namespace languages {
|
|
|
7217
7182
|
*/
|
|
7218
7183
|
readonly range?: IRange;
|
|
7219
7184
|
readonly command?: Command;
|
|
7185
|
+
readonly action?: Command;
|
|
7186
|
+
/**
|
|
7187
|
+
* Is called the first time an inline completion is shown.
|
|
7188
|
+
* @deprecated. Use `onDidShow` of the provider instead.
|
|
7189
|
+
*/
|
|
7190
|
+
readonly shownCommand?: Command;
|
|
7220
7191
|
/**
|
|
7221
7192
|
* If set to `true`, unopened closing brackets are removed and unclosed opening brackets are closed.
|
|
7222
7193
|
* Defaults to `false`.
|
|
7223
7194
|
*/
|
|
7224
7195
|
readonly completeBracketPairs?: boolean;
|
|
7196
|
+
readonly isInlineEdit?: boolean;
|
|
7197
|
+
readonly showInlineEditMenu?: boolean;
|
|
7198
|
+
readonly showRange?: IRange;
|
|
7199
|
+
readonly warning?: InlineCompletionWarning;
|
|
7200
|
+
readonly displayLocation?: InlineCompletionDisplayLocation;
|
|
7225
7201
|
}
|
|
7226
|
-
|
|
7202
|
+
export interface InlineCompletionWarning {
|
|
7203
|
+
message: IMarkdownString | string;
|
|
7204
|
+
icon?: IconPath;
|
|
7205
|
+
}
|
|
7206
|
+
export interface InlineCompletionDisplayLocation {
|
|
7207
|
+
range: IRange;
|
|
7208
|
+
label: string;
|
|
7209
|
+
}
|
|
7210
|
+
/**
|
|
7211
|
+
* TODO: add `| Uri | { light: Uri; dark: Uri }`.
|
|
7212
|
+
*/
|
|
7213
|
+
export type IconPath = editor.ThemeIcon;
|
|
7227
7214
|
export interface InlineCompletions<TItem extends InlineCompletion = InlineCompletion> {
|
|
7228
7215
|
readonly items: readonly TItem[];
|
|
7229
7216
|
/**
|
|
7230
7217
|
* A list of commands associated with the inline completions of this list.
|
|
7231
7218
|
*/
|
|
7232
|
-
readonly commands?:
|
|
7219
|
+
readonly commands?: InlineCompletionCommand[];
|
|
7233
7220
|
readonly suppressSuggestions?: boolean | undefined;
|
|
7234
7221
|
/**
|
|
7235
7222
|
* When set and the user types a suggestion without derivating from it, the inline suggestion is not updated.
|
|
7236
7223
|
*/
|
|
7237
7224
|
readonly enableForwardStability?: boolean | undefined;
|
|
7238
7225
|
}
|
|
7239
|
-
|
|
7226
|
+
export type InlineCompletionCommand = {
|
|
7227
|
+
command: Command;
|
|
7228
|
+
icon?: editor.ThemeIcon;
|
|
7229
|
+
};
|
|
7240
7230
|
export type InlineCompletionProviderGroupId = string;
|
|
7241
|
-
|
|
7242
7231
|
export interface InlineCompletionsProvider<T extends InlineCompletions = InlineCompletions> {
|
|
7243
7232
|
provideInlineCompletions(model: editor.ITextModel, position: Position, context: InlineCompletionContext, token: CancellationToken): ProviderResult<T>;
|
|
7244
7233
|
/**
|
|
7245
7234
|
* Will be called when an item is shown.
|
|
7246
7235
|
* @param updatedInsertText Is useful to understand bracket completion.
|
|
7247
7236
|
*/
|
|
7248
|
-
handleItemDidShow?(completions: T, item: T[
|
|
7237
|
+
handleItemDidShow?(completions: T, item: T["items"][number], updatedInsertText: string): void;
|
|
7249
7238
|
/**
|
|
7250
|
-
* Will be called when an item is partially accepted.
|
|
7239
|
+
* Will be called when an item is partially accepted. TODO: also handle full acceptance here!
|
|
7240
|
+
* @param acceptedCharacters Deprecated. Use `info.acceptedCharacters` instead.
|
|
7251
7241
|
*/
|
|
7252
|
-
handlePartialAccept?(completions: T, item: T[
|
|
7242
|
+
handlePartialAccept?(completions: T, item: T["items"][number], acceptedCharacters: number, info: PartialAcceptInfo): void;
|
|
7243
|
+
/**
|
|
7244
|
+
* @deprecated Use `handleEndOfLifetime` instead.
|
|
7245
|
+
*/
|
|
7246
|
+
handleRejection?(completions: T, item: T["items"][number]): void;
|
|
7247
|
+
/**
|
|
7248
|
+
* Is called when an inline completion item is no longer being used.
|
|
7249
|
+
* Provides a reason of why it is not used anymore.
|
|
7250
|
+
*/
|
|
7251
|
+
handleEndOfLifetime?(completions: T, item: T["items"][number], reason: InlineCompletionEndOfLifeReason<T["items"][number]>, lifetimeSummary: LifetimeSummary): void;
|
|
7253
7252
|
/**
|
|
7254
7253
|
* Will be called when a completions list is no longer in use and can be garbage-collected.
|
|
7255
7254
|
*/
|
|
7256
|
-
|
|
7255
|
+
disposeInlineCompletions(completions: T, reason: InlineCompletionsDisposeReason): void;
|
|
7256
|
+
onDidChangeInlineCompletions?: IEvent<void>;
|
|
7257
7257
|
/**
|
|
7258
7258
|
* Only used for {@link yieldsToGroupIds}.
|
|
7259
7259
|
* Multiple providers can have the same group id.
|
|
@@ -7264,9 +7264,51 @@ export namespace languages {
|
|
|
7264
7264
|
* The current provider is only requested for completions if no provider with a preferred group id returned a result.
|
|
7265
7265
|
*/
|
|
7266
7266
|
yieldsToGroupIds?: InlineCompletionProviderGroupId[];
|
|
7267
|
+
displayName?: string;
|
|
7268
|
+
debounceDelayMs?: number;
|
|
7267
7269
|
toString?(): string;
|
|
7268
7270
|
}
|
|
7269
|
-
|
|
7271
|
+
export type InlineCompletionsDisposeReason = {
|
|
7272
|
+
kind: "lostRace" | "tokenCancellation" | "other" | "empty" | "notTaken";
|
|
7273
|
+
};
|
|
7274
|
+
export enum InlineCompletionEndOfLifeReasonKind {
|
|
7275
|
+
Accepted = 0,
|
|
7276
|
+
Rejected = 1,
|
|
7277
|
+
Ignored = 2
|
|
7278
|
+
}
|
|
7279
|
+
export type InlineCompletionEndOfLifeReason<TInlineCompletion = InlineCompletion> = {
|
|
7280
|
+
kind: InlineCompletionEndOfLifeReasonKind.Accepted;
|
|
7281
|
+
} | {
|
|
7282
|
+
kind: InlineCompletionEndOfLifeReasonKind.Rejected;
|
|
7283
|
+
} | {
|
|
7284
|
+
kind: InlineCompletionEndOfLifeReasonKind.Ignored;
|
|
7285
|
+
supersededBy?: TInlineCompletion;
|
|
7286
|
+
userTypingDisagreed: boolean;
|
|
7287
|
+
};
|
|
7288
|
+
export type LifetimeSummary = {
|
|
7289
|
+
requestUuid: string;
|
|
7290
|
+
partiallyAccepted: number;
|
|
7291
|
+
shown: boolean;
|
|
7292
|
+
shownDuration: number;
|
|
7293
|
+
shownDurationUncollapsed: number;
|
|
7294
|
+
timeUntilShown: number | undefined;
|
|
7295
|
+
editorType: string;
|
|
7296
|
+
viewKind: string | undefined;
|
|
7297
|
+
error: string | undefined;
|
|
7298
|
+
preceeded: boolean;
|
|
7299
|
+
languageId: string;
|
|
7300
|
+
requestReason: string;
|
|
7301
|
+
cursorColumnDistance?: number;
|
|
7302
|
+
cursorLineDistance?: number;
|
|
7303
|
+
lineCountOriginal?: number;
|
|
7304
|
+
lineCountModified?: number;
|
|
7305
|
+
characterCountOriginal?: number;
|
|
7306
|
+
characterCountModified?: number;
|
|
7307
|
+
disjointReplacements?: number;
|
|
7308
|
+
sameShapeReplacements?: boolean;
|
|
7309
|
+
typingInterval: number;
|
|
7310
|
+
typingIntervalCharacterCount: number;
|
|
7311
|
+
};
|
|
7270
7312
|
export interface CodeAction {
|
|
7271
7313
|
title: string;
|
|
7272
7314
|
command?: Command;
|
|
@@ -7278,16 +7320,13 @@ export namespace languages {
|
|
|
7278
7320
|
disabled?: string;
|
|
7279
7321
|
ranges?: IRange[];
|
|
7280
7322
|
}
|
|
7281
|
-
|
|
7282
7323
|
export enum CodeActionTriggerType {
|
|
7283
7324
|
Invoke = 1,
|
|
7284
7325
|
Auto = 2
|
|
7285
7326
|
}
|
|
7286
|
-
|
|
7287
7327
|
export interface CodeActionList extends IDisposable {
|
|
7288
7328
|
readonly actions: ReadonlyArray<CodeAction>;
|
|
7289
7329
|
}
|
|
7290
|
-
|
|
7291
7330
|
/**
|
|
7292
7331
|
* Represents a parameter of a callable-signature. A parameter can
|
|
7293
7332
|
* have a label and a doc-comment.
|
|
@@ -7297,14 +7336,16 @@ export namespace languages {
|
|
|
7297
7336
|
* The label of this signature. Will be shown in
|
|
7298
7337
|
* the UI.
|
|
7299
7338
|
*/
|
|
7300
|
-
label: string | [
|
|
7339
|
+
label: string | [
|
|
7340
|
+
number,
|
|
7341
|
+
number
|
|
7342
|
+
];
|
|
7301
7343
|
/**
|
|
7302
7344
|
* The human-readable doc-comment of this signature. Will be shown
|
|
7303
7345
|
* in the UI but can be omitted.
|
|
7304
7346
|
*/
|
|
7305
7347
|
documentation?: string | IMarkdownString;
|
|
7306
7348
|
}
|
|
7307
|
-
|
|
7308
7349
|
/**
|
|
7309
7350
|
* Represents the signature of something callable. A signature
|
|
7310
7351
|
* can have a label, like a function-name, a doc-comment, and
|
|
@@ -7332,7 +7373,6 @@ export namespace languages {
|
|
|
7332
7373
|
*/
|
|
7333
7374
|
activeParameter?: number;
|
|
7334
7375
|
}
|
|
7335
|
-
|
|
7336
7376
|
/**
|
|
7337
7377
|
* Signature help represents the signature of something
|
|
7338
7378
|
* callable. There can be multiple signatures but only one
|
|
@@ -7352,24 +7392,20 @@ export namespace languages {
|
|
|
7352
7392
|
*/
|
|
7353
7393
|
activeParameter: number;
|
|
7354
7394
|
}
|
|
7355
|
-
|
|
7356
7395
|
export interface SignatureHelpResult extends IDisposable {
|
|
7357
7396
|
value: SignatureHelp;
|
|
7358
7397
|
}
|
|
7359
|
-
|
|
7360
7398
|
export enum SignatureHelpTriggerKind {
|
|
7361
7399
|
Invoke = 1,
|
|
7362
7400
|
TriggerCharacter = 2,
|
|
7363
7401
|
ContentChange = 3
|
|
7364
7402
|
}
|
|
7365
|
-
|
|
7366
7403
|
export interface SignatureHelpContext {
|
|
7367
7404
|
readonly triggerKind: SignatureHelpTriggerKind;
|
|
7368
7405
|
readonly triggerCharacter?: string;
|
|
7369
7406
|
readonly isRetrigger: boolean;
|
|
7370
7407
|
readonly activeSignatureHelp?: SignatureHelp;
|
|
7371
7408
|
}
|
|
7372
|
-
|
|
7373
7409
|
/**
|
|
7374
7410
|
* The signature help provider interface defines the contract between extensions and
|
|
7375
7411
|
* the [parameter hints](https://code.visualstudio.com/docs/editor/intellisense)-feature.
|
|
@@ -7382,7 +7418,6 @@ export namespace languages {
|
|
|
7382
7418
|
*/
|
|
7383
7419
|
provideSignatureHelp(model: editor.ITextModel, position: Position, token: CancellationToken, context: SignatureHelpContext): ProviderResult<SignatureHelpResult>;
|
|
7384
7420
|
}
|
|
7385
|
-
|
|
7386
7421
|
/**
|
|
7387
7422
|
* A document highlight kind.
|
|
7388
7423
|
*/
|
|
@@ -7400,7 +7435,6 @@ export namespace languages {
|
|
|
7400
7435
|
*/
|
|
7401
7436
|
Write = 2
|
|
7402
7437
|
}
|
|
7403
|
-
|
|
7404
7438
|
/**
|
|
7405
7439
|
* A document highlight is a range inside a text document which deserves
|
|
7406
7440
|
* special attention. Usually a document highlight is visualized by changing
|
|
@@ -7416,7 +7450,6 @@ export namespace languages {
|
|
|
7416
7450
|
*/
|
|
7417
7451
|
kind?: DocumentHighlightKind;
|
|
7418
7452
|
}
|
|
7419
|
-
|
|
7420
7453
|
/**
|
|
7421
7454
|
* Represents a set of document highlights for a specific Uri.
|
|
7422
7455
|
*/
|
|
@@ -7430,7 +7463,6 @@ export namespace languages {
|
|
|
7430
7463
|
*/
|
|
7431
7464
|
highlights: DocumentHighlight[];
|
|
7432
7465
|
}
|
|
7433
|
-
|
|
7434
7466
|
/**
|
|
7435
7467
|
* The document highlight provider interface defines the contract between extensions and
|
|
7436
7468
|
* the word-highlight-feature.
|
|
@@ -7442,7 +7474,6 @@ export namespace languages {
|
|
|
7442
7474
|
*/
|
|
7443
7475
|
provideDocumentHighlights(model: editor.ITextModel, position: Position, token: CancellationToken): ProviderResult<DocumentHighlight[]>;
|
|
7444
7476
|
}
|
|
7445
|
-
|
|
7446
7477
|
/**
|
|
7447
7478
|
* A provider that can provide document highlights across multiple documents.
|
|
7448
7479
|
*/
|
|
@@ -7463,7 +7494,6 @@ export namespace languages {
|
|
|
7463
7494
|
*/
|
|
7464
7495
|
provideMultiDocumentHighlights(primaryModel: editor.ITextModel, position: Position, otherModels: editor.ITextModel[], token: CancellationToken): ProviderResult<Map<Uri, DocumentHighlight[]>>;
|
|
7465
7496
|
}
|
|
7466
|
-
|
|
7467
7497
|
/**
|
|
7468
7498
|
* The linked editing range provider interface defines the contract between extensions and
|
|
7469
7499
|
* the linked editing feature.
|
|
@@ -7474,7 +7504,6 @@ export namespace languages {
|
|
|
7474
7504
|
*/
|
|
7475
7505
|
provideLinkedEditingRanges(model: editor.ITextModel, position: Position, token: CancellationToken): ProviderResult<LinkedEditingRanges>;
|
|
7476
7506
|
}
|
|
7477
|
-
|
|
7478
7507
|
/**
|
|
7479
7508
|
* Represents a list of ranges that can be edited together along with a word pattern to describe valid contents.
|
|
7480
7509
|
*/
|
|
@@ -7490,7 +7519,6 @@ export namespace languages {
|
|
|
7490
7519
|
*/
|
|
7491
7520
|
wordPattern?: RegExp;
|
|
7492
7521
|
}
|
|
7493
|
-
|
|
7494
7522
|
/**
|
|
7495
7523
|
* Value-object that contains additional information when
|
|
7496
7524
|
* requesting references.
|
|
@@ -7501,7 +7529,6 @@ export namespace languages {
|
|
|
7501
7529
|
*/
|
|
7502
7530
|
includeDeclaration: boolean;
|
|
7503
7531
|
}
|
|
7504
|
-
|
|
7505
7532
|
/**
|
|
7506
7533
|
* The reference provider interface defines the contract between extensions and
|
|
7507
7534
|
* the [find references](https://code.visualstudio.com/docs/editor/editingevolved#_peek)-feature.
|
|
@@ -7512,7 +7539,6 @@ export namespace languages {
|
|
|
7512
7539
|
*/
|
|
7513
7540
|
provideReferences(model: editor.ITextModel, position: Position, context: ReferenceContext, token: CancellationToken): ProviderResult<Location[]>;
|
|
7514
7541
|
}
|
|
7515
|
-
|
|
7516
7542
|
/**
|
|
7517
7543
|
* Represents a location inside a resource, such as a line
|
|
7518
7544
|
* inside a text file.
|
|
@@ -7527,7 +7553,6 @@ export namespace languages {
|
|
|
7527
7553
|
*/
|
|
7528
7554
|
range: IRange;
|
|
7529
7555
|
}
|
|
7530
|
-
|
|
7531
7556
|
export interface LocationLink {
|
|
7532
7557
|
/**
|
|
7533
7558
|
* A range to select where this link originates from.
|
|
@@ -7547,9 +7572,7 @@ export namespace languages {
|
|
|
7547
7572
|
*/
|
|
7548
7573
|
targetSelectionRange?: IRange;
|
|
7549
7574
|
}
|
|
7550
|
-
|
|
7551
7575
|
export type Definition = Location | Location[] | LocationLink[];
|
|
7552
|
-
|
|
7553
7576
|
/**
|
|
7554
7577
|
* The definition provider interface defines the contract between extensions and
|
|
7555
7578
|
* the [go to definition](https://code.visualstudio.com/docs/editor/editingevolved#_go-to-definition)
|
|
@@ -7561,7 +7584,6 @@ export namespace languages {
|
|
|
7561
7584
|
*/
|
|
7562
7585
|
provideDefinition(model: editor.ITextModel, position: Position, token: CancellationToken): ProviderResult<Definition | LocationLink[]>;
|
|
7563
7586
|
}
|
|
7564
|
-
|
|
7565
7587
|
/**
|
|
7566
7588
|
* The definition provider interface defines the contract between extensions and
|
|
7567
7589
|
* the [go to definition](https://code.visualstudio.com/docs/editor/editingevolved#_go-to-definition)
|
|
@@ -7573,7 +7595,6 @@ export namespace languages {
|
|
|
7573
7595
|
*/
|
|
7574
7596
|
provideDeclaration(model: editor.ITextModel, position: Position, token: CancellationToken): ProviderResult<Definition | LocationLink[]>;
|
|
7575
7597
|
}
|
|
7576
|
-
|
|
7577
7598
|
/**
|
|
7578
7599
|
* The implementation provider interface defines the contract between extensions and
|
|
7579
7600
|
* the go to implementation feature.
|
|
@@ -7584,7 +7605,6 @@ export namespace languages {
|
|
|
7584
7605
|
*/
|
|
7585
7606
|
provideImplementation(model: editor.ITextModel, position: Position, token: CancellationToken): ProviderResult<Definition | LocationLink[]>;
|
|
7586
7607
|
}
|
|
7587
|
-
|
|
7588
7608
|
/**
|
|
7589
7609
|
* The type definition provider interface defines the contract between extensions and
|
|
7590
7610
|
* the go to type definition feature.
|
|
@@ -7595,7 +7615,6 @@ export namespace languages {
|
|
|
7595
7615
|
*/
|
|
7596
7616
|
provideTypeDefinition(model: editor.ITextModel, position: Position, token: CancellationToken): ProviderResult<Definition | LocationLink[]>;
|
|
7597
7617
|
}
|
|
7598
|
-
|
|
7599
7618
|
/**
|
|
7600
7619
|
* A symbol kind.
|
|
7601
7620
|
*/
|
|
@@ -7627,11 +7646,9 @@ export namespace languages {
|
|
|
7627
7646
|
Operator = 24,
|
|
7628
7647
|
TypeParameter = 25
|
|
7629
7648
|
}
|
|
7630
|
-
|
|
7631
7649
|
export enum SymbolTag {
|
|
7632
7650
|
Deprecated = 1
|
|
7633
7651
|
}
|
|
7634
|
-
|
|
7635
7652
|
export interface DocumentSymbol {
|
|
7636
7653
|
name: string;
|
|
7637
7654
|
detail: string;
|
|
@@ -7642,7 +7659,6 @@ export namespace languages {
|
|
|
7642
7659
|
selectionRange: IRange;
|
|
7643
7660
|
children?: DocumentSymbol[];
|
|
7644
7661
|
}
|
|
7645
|
-
|
|
7646
7662
|
/**
|
|
7647
7663
|
* The document symbol provider interface defines the contract between extensions and
|
|
7648
7664
|
* the [go to symbol](https://code.visualstudio.com/docs/editor/editingevolved#_go-to-symbol)-feature.
|
|
@@ -7654,13 +7670,11 @@ export namespace languages {
|
|
|
7654
7670
|
*/
|
|
7655
7671
|
provideDocumentSymbols(model: editor.ITextModel, token: CancellationToken): ProviderResult<DocumentSymbol[]>;
|
|
7656
7672
|
}
|
|
7657
|
-
|
|
7658
7673
|
export interface TextEdit {
|
|
7659
7674
|
range: IRange;
|
|
7660
7675
|
text: string;
|
|
7661
7676
|
eol?: editor.EndOfLineSequence;
|
|
7662
7677
|
}
|
|
7663
|
-
|
|
7664
7678
|
/**
|
|
7665
7679
|
* Interface used to format a model
|
|
7666
7680
|
*/
|
|
@@ -7674,7 +7688,6 @@ export namespace languages {
|
|
|
7674
7688
|
*/
|
|
7675
7689
|
insertSpaces: boolean;
|
|
7676
7690
|
}
|
|
7677
|
-
|
|
7678
7691
|
/**
|
|
7679
7692
|
* The document formatting provider interface defines the contract between extensions and
|
|
7680
7693
|
* the formatting-feature.
|
|
@@ -7686,7 +7699,6 @@ export namespace languages {
|
|
|
7686
7699
|
*/
|
|
7687
7700
|
provideDocumentFormattingEdits(model: editor.ITextModel, options: FormattingOptions, token: CancellationToken): ProviderResult<TextEdit[]>;
|
|
7688
7701
|
}
|
|
7689
|
-
|
|
7690
7702
|
/**
|
|
7691
7703
|
* The document formatting provider interface defines the contract between extensions and
|
|
7692
7704
|
* the formatting-feature.
|
|
@@ -7703,7 +7715,6 @@ export namespace languages {
|
|
|
7703
7715
|
provideDocumentRangeFormattingEdits(model: editor.ITextModel, range: Range, options: FormattingOptions, token: CancellationToken): ProviderResult<TextEdit[]>;
|
|
7704
7716
|
provideDocumentRangesFormattingEdits?(model: editor.ITextModel, ranges: Range[], options: FormattingOptions, token: CancellationToken): ProviderResult<TextEdit[]>;
|
|
7705
7717
|
}
|
|
7706
|
-
|
|
7707
7718
|
/**
|
|
7708
7719
|
* The document formatting provider interface defines the contract between extensions and
|
|
7709
7720
|
* the formatting-feature.
|
|
@@ -7719,7 +7730,6 @@ export namespace languages {
|
|
|
7719
7730
|
*/
|
|
7720
7731
|
provideOnTypeFormattingEdits(model: editor.ITextModel, position: Position, ch: string, options: FormattingOptions, token: CancellationToken): ProviderResult<TextEdit[]>;
|
|
7721
7732
|
}
|
|
7722
|
-
|
|
7723
7733
|
/**
|
|
7724
7734
|
* A link inside the editor.
|
|
7725
7735
|
*/
|
|
@@ -7728,12 +7738,10 @@ export namespace languages {
|
|
|
7728
7738
|
url?: Uri | string;
|
|
7729
7739
|
tooltip?: string;
|
|
7730
7740
|
}
|
|
7731
|
-
|
|
7732
7741
|
export interface ILinksList {
|
|
7733
7742
|
links: ILink[];
|
|
7734
7743
|
dispose?(): void;
|
|
7735
7744
|
}
|
|
7736
|
-
|
|
7737
7745
|
/**
|
|
7738
7746
|
* A provider of links.
|
|
7739
7747
|
*/
|
|
@@ -7741,7 +7749,6 @@ export namespace languages {
|
|
|
7741
7749
|
provideLinks(model: editor.ITextModel, token: CancellationToken): ProviderResult<ILinksList>;
|
|
7742
7750
|
resolveLink?: (link: ILink, token: CancellationToken) => ProviderResult<ILink>;
|
|
7743
7751
|
}
|
|
7744
|
-
|
|
7745
7752
|
/**
|
|
7746
7753
|
* A color in RGBA format.
|
|
7747
7754
|
*/
|
|
@@ -7763,7 +7770,6 @@ export namespace languages {
|
|
|
7763
7770
|
*/
|
|
7764
7771
|
readonly alpha: number;
|
|
7765
7772
|
}
|
|
7766
|
-
|
|
7767
7773
|
/**
|
|
7768
7774
|
* String representations for a color
|
|
7769
7775
|
*/
|
|
@@ -7785,7 +7791,6 @@ export namespace languages {
|
|
|
7785
7791
|
*/
|
|
7786
7792
|
additionalTextEdits?: TextEdit[];
|
|
7787
7793
|
}
|
|
7788
|
-
|
|
7789
7794
|
/**
|
|
7790
7795
|
* A color range is a range in a text model which represents a color.
|
|
7791
7796
|
*/
|
|
@@ -7799,7 +7804,6 @@ export namespace languages {
|
|
|
7799
7804
|
*/
|
|
7800
7805
|
color: IColor;
|
|
7801
7806
|
}
|
|
7802
|
-
|
|
7803
7807
|
/**
|
|
7804
7808
|
* A provider of colors for editor models.
|
|
7805
7809
|
*/
|
|
@@ -7813,21 +7817,17 @@ export namespace languages {
|
|
|
7813
7817
|
*/
|
|
7814
7818
|
provideColorPresentations(model: editor.ITextModel, colorInfo: IColorInformation, token: CancellationToken): ProviderResult<IColorPresentation[]>;
|
|
7815
7819
|
}
|
|
7816
|
-
|
|
7817
7820
|
export interface SelectionRange {
|
|
7818
7821
|
range: IRange;
|
|
7819
7822
|
}
|
|
7820
|
-
|
|
7821
7823
|
export interface SelectionRangeProvider {
|
|
7822
7824
|
/**
|
|
7823
7825
|
* Provide ranges that should be selected from the given position.
|
|
7824
7826
|
*/
|
|
7825
7827
|
provideSelectionRanges(model: editor.ITextModel, positions: Position[], token: CancellationToken): ProviderResult<SelectionRange[][]>;
|
|
7826
7828
|
}
|
|
7827
|
-
|
|
7828
7829
|
export interface FoldingContext {
|
|
7829
7830
|
}
|
|
7830
|
-
|
|
7831
7831
|
/**
|
|
7832
7832
|
* A provider of folding ranges for editor models.
|
|
7833
7833
|
*/
|
|
@@ -7841,7 +7841,6 @@ export namespace languages {
|
|
|
7841
7841
|
*/
|
|
7842
7842
|
provideFoldingRanges(model: editor.ITextModel, context: FoldingContext, token: CancellationToken): ProviderResult<FoldingRange[]>;
|
|
7843
7843
|
}
|
|
7844
|
-
|
|
7845
7844
|
export interface FoldingRange {
|
|
7846
7845
|
/**
|
|
7847
7846
|
* The one-based start line of the range to fold. The folded area starts after the line's last character.
|
|
@@ -7859,7 +7858,6 @@ export namespace languages {
|
|
|
7859
7858
|
*/
|
|
7860
7859
|
kind?: FoldingRangeKind;
|
|
7861
7860
|
}
|
|
7862
|
-
|
|
7863
7861
|
export class FoldingRangeKind {
|
|
7864
7862
|
value: string;
|
|
7865
7863
|
/**
|
|
@@ -7888,13 +7886,11 @@ export namespace languages {
|
|
|
7888
7886
|
*/
|
|
7889
7887
|
constructor(value: string);
|
|
7890
7888
|
}
|
|
7891
|
-
|
|
7892
7889
|
export interface WorkspaceEditMetadata {
|
|
7893
7890
|
needsConfirmation: boolean;
|
|
7894
7891
|
label: string;
|
|
7895
7892
|
description?: string;
|
|
7896
7893
|
}
|
|
7897
|
-
|
|
7898
7894
|
export interface WorkspaceFileEditOptions {
|
|
7899
7895
|
overwrite?: boolean;
|
|
7900
7896
|
ignoreIfNotExists?: boolean;
|
|
@@ -7905,114 +7901,105 @@ export namespace languages {
|
|
|
7905
7901
|
skipTrashBin?: boolean;
|
|
7906
7902
|
maxSize?: number;
|
|
7907
7903
|
}
|
|
7908
|
-
|
|
7909
7904
|
export interface IWorkspaceFileEdit {
|
|
7910
7905
|
oldResource?: Uri;
|
|
7911
7906
|
newResource?: Uri;
|
|
7912
7907
|
options?: WorkspaceFileEditOptions;
|
|
7913
7908
|
metadata?: WorkspaceEditMetadata;
|
|
7914
7909
|
}
|
|
7915
|
-
|
|
7916
7910
|
export interface IWorkspaceTextEdit {
|
|
7917
7911
|
resource: Uri;
|
|
7918
7912
|
textEdit: TextEdit & {
|
|
7919
7913
|
insertAsSnippet?: boolean;
|
|
7914
|
+
keepWhitespace?: boolean;
|
|
7920
7915
|
};
|
|
7921
7916
|
versionId: number | undefined;
|
|
7922
7917
|
metadata?: WorkspaceEditMetadata;
|
|
7923
7918
|
}
|
|
7924
|
-
|
|
7925
7919
|
export interface WorkspaceEdit {
|
|
7926
|
-
edits: Array<IWorkspaceTextEdit | IWorkspaceFileEdit>;
|
|
7920
|
+
edits: Array<IWorkspaceTextEdit | IWorkspaceFileEdit | ICustomEdit>;
|
|
7921
|
+
}
|
|
7922
|
+
export interface ICustomEdit {
|
|
7923
|
+
readonly resource: Uri;
|
|
7924
|
+
readonly metadata?: WorkspaceEditMetadata;
|
|
7925
|
+
undo(): Promise<void> | void;
|
|
7926
|
+
redo(): Promise<void> | void;
|
|
7927
7927
|
}
|
|
7928
|
-
|
|
7929
7928
|
export interface Rejection {
|
|
7930
7929
|
rejectReason?: string;
|
|
7931
7930
|
}
|
|
7932
|
-
|
|
7933
7931
|
export interface RenameLocation {
|
|
7934
7932
|
range: IRange;
|
|
7935
7933
|
text: string;
|
|
7936
7934
|
}
|
|
7937
|
-
|
|
7938
7935
|
export interface RenameProvider {
|
|
7939
7936
|
provideRenameEdits(model: editor.ITextModel, position: Position, newName: string, token: CancellationToken): ProviderResult<WorkspaceEdit & Rejection>;
|
|
7940
7937
|
resolveRenameLocation?(model: editor.ITextModel, position: Position, token: CancellationToken): ProviderResult<RenameLocation & Rejection>;
|
|
7941
7938
|
}
|
|
7942
|
-
|
|
7943
7939
|
export enum NewSymbolNameTag {
|
|
7944
7940
|
AIGenerated = 1
|
|
7945
7941
|
}
|
|
7946
|
-
|
|
7947
7942
|
export enum NewSymbolNameTriggerKind {
|
|
7948
7943
|
Invoke = 0,
|
|
7949
7944
|
Automatic = 1
|
|
7950
7945
|
}
|
|
7951
|
-
|
|
7952
7946
|
export interface NewSymbolName {
|
|
7953
7947
|
readonly newSymbolName: string;
|
|
7954
7948
|
readonly tags?: readonly NewSymbolNameTag[];
|
|
7955
7949
|
}
|
|
7956
|
-
|
|
7957
7950
|
export interface NewSymbolNamesProvider {
|
|
7958
7951
|
supportsAutomaticNewSymbolNamesTriggerKind?: Promise<boolean | undefined>;
|
|
7959
7952
|
provideNewSymbolNames(model: editor.ITextModel, range: IRange, triggerKind: NewSymbolNameTriggerKind, token: CancellationToken): ProviderResult<NewSymbolName[]>;
|
|
7960
7953
|
}
|
|
7961
|
-
|
|
7962
7954
|
export interface Command {
|
|
7963
7955
|
id: string;
|
|
7964
7956
|
title: string;
|
|
7965
7957
|
tooltip?: string;
|
|
7966
7958
|
arguments?: any[];
|
|
7967
7959
|
}
|
|
7968
|
-
|
|
7969
7960
|
export interface CommentThreadRevealOptions {
|
|
7970
7961
|
preserveFocus: boolean;
|
|
7971
7962
|
focusReply: boolean;
|
|
7972
7963
|
}
|
|
7973
|
-
|
|
7974
7964
|
export interface CommentAuthorInformation {
|
|
7975
7965
|
name: string;
|
|
7976
7966
|
iconPath?: UriComponents;
|
|
7977
7967
|
}
|
|
7978
|
-
|
|
7979
7968
|
export interface PendingCommentThread {
|
|
7980
|
-
body: string;
|
|
7981
7969
|
range: IRange | undefined;
|
|
7982
7970
|
uri: Uri;
|
|
7983
7971
|
uniqueOwner: string;
|
|
7984
7972
|
isReply: boolean;
|
|
7973
|
+
comment: PendingComment;
|
|
7974
|
+
}
|
|
7975
|
+
export interface PendingComment {
|
|
7976
|
+
body: string;
|
|
7977
|
+
cursor: IPosition;
|
|
7985
7978
|
}
|
|
7986
|
-
|
|
7987
7979
|
export interface CodeLens {
|
|
7988
7980
|
range: IRange;
|
|
7989
7981
|
id?: string;
|
|
7990
7982
|
command?: Command;
|
|
7991
7983
|
}
|
|
7992
|
-
|
|
7993
7984
|
export interface CodeLensList {
|
|
7994
7985
|
lenses: CodeLens[];
|
|
7995
|
-
dispose(): void;
|
|
7986
|
+
dispose?(): void;
|
|
7996
7987
|
}
|
|
7997
|
-
|
|
7998
7988
|
export interface CodeLensProvider {
|
|
7999
7989
|
onDidChange?: IEvent<this>;
|
|
8000
7990
|
provideCodeLenses(model: editor.ITextModel, token: CancellationToken): ProviderResult<CodeLensList>;
|
|
8001
7991
|
resolveCodeLens?(model: editor.ITextModel, codeLens: CodeLens, token: CancellationToken): ProviderResult<CodeLens>;
|
|
8002
7992
|
}
|
|
8003
|
-
|
|
8004
7993
|
export enum InlayHintKind {
|
|
8005
7994
|
Type = 1,
|
|
8006
7995
|
Parameter = 2
|
|
8007
7996
|
}
|
|
8008
|
-
|
|
8009
7997
|
export interface InlayHintLabelPart {
|
|
8010
7998
|
label: string;
|
|
8011
7999
|
tooltip?: string | IMarkdownString;
|
|
8012
8000
|
command?: Command;
|
|
8013
8001
|
location?: Location;
|
|
8014
8002
|
}
|
|
8015
|
-
|
|
8016
8003
|
export interface InlayHint {
|
|
8017
8004
|
label: string | InlayHintLabelPart[];
|
|
8018
8005
|
tooltip?: string | IMarkdownString;
|
|
@@ -8022,98 +8009,43 @@ export namespace languages {
|
|
|
8022
8009
|
paddingLeft?: boolean;
|
|
8023
8010
|
paddingRight?: boolean;
|
|
8024
8011
|
}
|
|
8025
|
-
|
|
8026
8012
|
export interface InlayHintList {
|
|
8027
8013
|
hints: InlayHint[];
|
|
8028
8014
|
dispose(): void;
|
|
8029
8015
|
}
|
|
8030
|
-
|
|
8031
8016
|
export interface InlayHintsProvider {
|
|
8032
8017
|
displayName?: string;
|
|
8033
8018
|
onDidChangeInlayHints?: IEvent<void>;
|
|
8034
8019
|
provideInlayHints(model: editor.ITextModel, range: Range, token: CancellationToken): ProviderResult<InlayHintList>;
|
|
8035
8020
|
resolveInlayHint?(hint: InlayHint, token: CancellationToken): ProviderResult<InlayHint>;
|
|
8036
8021
|
}
|
|
8037
|
-
|
|
8038
8022
|
export interface SemanticTokensLegend {
|
|
8039
8023
|
readonly tokenTypes: string[];
|
|
8040
8024
|
readonly tokenModifiers: string[];
|
|
8041
8025
|
}
|
|
8042
|
-
|
|
8043
8026
|
export interface SemanticTokens {
|
|
8044
8027
|
readonly resultId?: string;
|
|
8045
8028
|
readonly data: Uint32Array;
|
|
8046
8029
|
}
|
|
8047
|
-
|
|
8048
8030
|
export interface SemanticTokensEdit {
|
|
8049
8031
|
readonly start: number;
|
|
8050
8032
|
readonly deleteCount: number;
|
|
8051
8033
|
readonly data?: Uint32Array;
|
|
8052
8034
|
}
|
|
8053
|
-
|
|
8054
8035
|
export interface SemanticTokensEdits {
|
|
8055
8036
|
readonly resultId?: string;
|
|
8056
8037
|
readonly edits: SemanticTokensEdit[];
|
|
8057
8038
|
}
|
|
8058
|
-
|
|
8059
8039
|
export interface DocumentSemanticTokensProvider {
|
|
8060
8040
|
onDidChange?: IEvent<void>;
|
|
8061
8041
|
getLegend(): SemanticTokensLegend;
|
|
8062
8042
|
provideDocumentSemanticTokens(model: editor.ITextModel, lastResultId: string | null, token: CancellationToken): ProviderResult<SemanticTokens | SemanticTokensEdits>;
|
|
8063
8043
|
releaseDocumentSemanticTokens(resultId: string | undefined): void;
|
|
8064
8044
|
}
|
|
8065
|
-
|
|
8066
8045
|
export interface DocumentRangeSemanticTokensProvider {
|
|
8067
8046
|
getLegend(): SemanticTokensLegend;
|
|
8068
8047
|
provideDocumentRangeSemanticTokens(model: editor.ITextModel, range: Range, token: CancellationToken): ProviderResult<SemanticTokens>;
|
|
8069
8048
|
}
|
|
8070
|
-
|
|
8071
|
-
export interface DocumentContextItem {
|
|
8072
|
-
readonly uri: Uri;
|
|
8073
|
-
readonly version: number;
|
|
8074
|
-
readonly ranges: IRange[];
|
|
8075
|
-
}
|
|
8076
|
-
|
|
8077
|
-
export interface MappedEditsContext {
|
|
8078
|
-
/** The outer array is sorted by priority - from highest to lowest. The inner arrays contain elements of the same priority. */
|
|
8079
|
-
documents: DocumentContextItem[][];
|
|
8080
|
-
}
|
|
8081
|
-
|
|
8082
|
-
export interface MappedEditsProvider {
|
|
8083
|
-
/**
|
|
8084
|
-
* Provider maps code blocks from the chat into a workspace edit.
|
|
8085
|
-
*
|
|
8086
|
-
* @param document The document to provide mapped edits for.
|
|
8087
|
-
* @param codeBlocks Code blocks that come from an LLM's reply.
|
|
8088
|
-
* "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.
|
|
8089
|
-
* @param context The context for providing mapped edits.
|
|
8090
|
-
* @param token A cancellation token.
|
|
8091
|
-
* @returns A provider result of text edits.
|
|
8092
|
-
*/
|
|
8093
|
-
provideMappedEdits(document: editor.ITextModel, codeBlocks: string[], context: MappedEditsContext, token: CancellationToken): Promise<WorkspaceEdit | null>;
|
|
8094
|
-
}
|
|
8095
|
-
|
|
8096
|
-
export interface IInlineEdit {
|
|
8097
|
-
text: string;
|
|
8098
|
-
range: IRange;
|
|
8099
|
-
accepted?: Command;
|
|
8100
|
-
rejected?: Command;
|
|
8101
|
-
}
|
|
8102
|
-
|
|
8103
|
-
export interface IInlineEditContext {
|
|
8104
|
-
triggerKind: InlineEditTriggerKind;
|
|
8105
|
-
}
|
|
8106
|
-
|
|
8107
|
-
export enum InlineEditTriggerKind {
|
|
8108
|
-
Invoke = 0,
|
|
8109
|
-
Automatic = 1
|
|
8110
|
-
}
|
|
8111
|
-
|
|
8112
|
-
export interface InlineEditProvider<T extends IInlineEdit = IInlineEdit> {
|
|
8113
|
-
provideInlineEdit(model: editor.ITextModel, context: IInlineEditContext, token: CancellationToken): ProviderResult<T>;
|
|
8114
|
-
freeInlineEdit(edit: T): void;
|
|
8115
|
-
}
|
|
8116
|
-
|
|
8117
8049
|
export interface ILanguageExtensionPoint {
|
|
8118
8050
|
id: string;
|
|
8119
8051
|
extensions?: string[];
|
|
@@ -8168,16 +8100,20 @@ export namespace languages {
|
|
|
8168
8100
|
*/
|
|
8169
8101
|
[key: string]: any;
|
|
8170
8102
|
}
|
|
8171
|
-
|
|
8172
8103
|
/**
|
|
8173
8104
|
* A rule is either a regular expression and an action
|
|
8174
8105
|
* shorthands: [reg,act] == { regex: reg, action: act}
|
|
8175
8106
|
* and : [reg,act,nxt] == { regex: reg, action: act{ next: nxt }}
|
|
8176
8107
|
*/
|
|
8177
|
-
export type IShortMonarchLanguageRule1 = [
|
|
8178
|
-
|
|
8179
|
-
|
|
8180
|
-
|
|
8108
|
+
export type IShortMonarchLanguageRule1 = [
|
|
8109
|
+
string | RegExp,
|
|
8110
|
+
IMonarchLanguageAction
|
|
8111
|
+
];
|
|
8112
|
+
export type IShortMonarchLanguageRule2 = [
|
|
8113
|
+
string | RegExp,
|
|
8114
|
+
IMonarchLanguageAction,
|
|
8115
|
+
string
|
|
8116
|
+
];
|
|
8181
8117
|
export interface IExpandedMonarchLanguageRule {
|
|
8182
8118
|
/**
|
|
8183
8119
|
* match tokens
|
|
@@ -8192,16 +8128,13 @@ export namespace languages {
|
|
|
8192
8128
|
*/
|
|
8193
8129
|
include?: string;
|
|
8194
8130
|
}
|
|
8195
|
-
|
|
8196
8131
|
export type IMonarchLanguageRule = IShortMonarchLanguageRule1 | IShortMonarchLanguageRule2 | IExpandedMonarchLanguageRule;
|
|
8197
|
-
|
|
8198
8132
|
/**
|
|
8199
8133
|
* An action is either an array of actions...
|
|
8200
8134
|
* ... or a case statement with guards...
|
|
8201
8135
|
* ... or a basic action with a token value.
|
|
8202
8136
|
*/
|
|
8203
8137
|
export type IShortMonarchLanguageAction = string;
|
|
8204
|
-
|
|
8205
8138
|
export interface IExpandedMonarchLanguageAction {
|
|
8206
8139
|
/**
|
|
8207
8140
|
* array of actions for each parenthesized match group
|
|
@@ -8240,9 +8173,7 @@ export namespace languages {
|
|
|
8240
8173
|
*/
|
|
8241
8174
|
log?: string;
|
|
8242
8175
|
}
|
|
8243
|
-
|
|
8244
8176
|
export type IMonarchLanguageAction = IShortMonarchLanguageAction | IExpandedMonarchLanguageAction | (IShortMonarchLanguageAction | IExpandedMonarchLanguageAction)[];
|
|
8245
|
-
|
|
8246
8177
|
/**
|
|
8247
8178
|
* This interface can be shortened as an array, ie. ['{','}','delimiter.curly']
|
|
8248
8179
|
*/
|
|
@@ -8260,22 +8191,17 @@ export namespace languages {
|
|
|
8260
8191
|
*/
|
|
8261
8192
|
token: string;
|
|
8262
8193
|
}
|
|
8263
|
-
|
|
8264
8194
|
}
|
|
8265
|
-
|
|
8266
8195
|
export namespace worker {
|
|
8267
|
-
|
|
8268
8196
|
export interface IMirrorTextModel {
|
|
8269
8197
|
readonly version: number;
|
|
8270
8198
|
}
|
|
8271
|
-
|
|
8272
8199
|
export interface IMirrorModel extends IMirrorTextModel {
|
|
8273
8200
|
readonly uri: Uri;
|
|
8274
8201
|
readonly version: number;
|
|
8275
8202
|
getValue(): string;
|
|
8276
8203
|
}
|
|
8277
|
-
|
|
8278
|
-
export interface IWorkerContext<H = undefined> {
|
|
8204
|
+
export interface IWorkerContext<H = {}> {
|
|
8279
8205
|
/**
|
|
8280
8206
|
* A proxy to the main thread host object.
|
|
8281
8207
|
*/
|
|
@@ -8285,16 +8211,9 @@ export namespace worker {
|
|
|
8285
8211
|
*/
|
|
8286
8212
|
getMirrorModels(): IMirrorModel[];
|
|
8287
8213
|
}
|
|
8288
|
-
|
|
8289
8214
|
}
|
|
8290
|
-
|
|
8291
8215
|
//dtsv=3
|
|
8292
8216
|
|
|
8293
|
-
/*---------------------------------------------------------------------------------------------
|
|
8294
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
8295
|
-
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
8296
|
-
*--------------------------------------------------------------------------------------------*/
|
|
8297
|
-
|
|
8298
8217
|
export namespace languages.css {
|
|
8299
8218
|
export interface CSSFormatConfiguration {
|
|
8300
8219
|
/** separate selectors with newline (e.g. "a,\nbr" or "a, br"): Default: true */
|
|
@@ -8485,12 +8404,6 @@ export namespace languages.css {
|
|
|
8485
8404
|
}
|
|
8486
8405
|
export type MarkupKind = 'plaintext' | 'markdown';
|
|
8487
8406
|
}
|
|
8488
|
-
|
|
8489
|
-
/*---------------------------------------------------------------------------------------------
|
|
8490
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
8491
|
-
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
8492
|
-
*--------------------------------------------------------------------------------------------*/
|
|
8493
|
-
|
|
8494
8407
|
export namespace languages.html {
|
|
8495
8408
|
export interface HTMLFormatConfiguration {
|
|
8496
8409
|
readonly tabSize: number;
|
|
@@ -8652,12 +8565,6 @@ export namespace languages.html {
|
|
|
8652
8565
|
}
|
|
8653
8566
|
export type MarkupKind = 'plaintext' | 'markdown';
|
|
8654
8567
|
}
|
|
8655
|
-
|
|
8656
|
-
/*---------------------------------------------------------------------------------------------
|
|
8657
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
8658
|
-
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
8659
|
-
*--------------------------------------------------------------------------------------------*/
|
|
8660
|
-
|
|
8661
8568
|
export namespace languages.json {
|
|
8662
8569
|
export interface BaseASTNode {
|
|
8663
8570
|
readonly type: 'object' | 'array' | 'property' | 'string' | 'number' | 'boolean' | 'null';
|
|
@@ -8890,12 +8797,6 @@ export namespace languages.json {
|
|
|
8890
8797
|
}
|
|
8891
8798
|
export const getWorker: () => Promise<(...uris: Uri[]) => Promise<IJSONWorker>>;
|
|
8892
8799
|
}
|
|
8893
|
-
|
|
8894
|
-
/*---------------------------------------------------------------------------------------------
|
|
8895
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
8896
|
-
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
8897
|
-
*--------------------------------------------------------------------------------------------*/
|
|
8898
|
-
|
|
8899
8800
|
export namespace languages.typescript {
|
|
8900
8801
|
export enum ModuleKind {
|
|
8901
8802
|
None = 0,
|