@codingame/monaco-vscode-api 1.68.6 → 1.69.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +102 -7
- package/dist/api.js +481 -9576
- package/dist/configuration.d.ts +488 -0
- package/dist/configuration.js +582 -0
- package/dist/extHost.js +14881 -0
- package/dist/files.js +1325 -0
- package/dist/injection.js +15 -0
- package/dist/jsonErrorMessages.js +17 -0
- package/dist/keybindings.d.ts +502 -0
- package/dist/keybindings.js +2352 -0
- package/dist/languageConfiguration.d.ts +8 -0
- package/dist/languageConfiguration.js +925 -0
- package/dist/languageService.js +340 -0
- package/dist/languages.d.ts +477 -0
- package/dist/languages.js +21 -0
- package/dist/layoutService.js +4 -0
- package/dist/messages.d.ts +7 -0
- package/dist/messages.js +3624 -0
- package/dist/missing-services.js +7293 -0
- package/dist/modelEditor.d.ts +164 -0
- package/dist/modelEditor.js +739 -0
- package/dist/monaco.d.ts +4914 -0
- package/dist/monaco.js +261 -0
- package/dist/services.d.ts +14806 -2098
- package/dist/services.js +22 -25
- package/dist/services2.js +423 -0
- package/dist/snippets.d.ts +466 -0
- package/dist/snippets.js +864 -0
- package/dist/textmate.d.ts +683 -0
- package/dist/textmate.js +739 -0
- package/dist/theme.d.ts +23 -0
- package/dist/theme.js +4167 -0
- package/dist/tokenClassification.d.ts +479 -0
- package/dist/tokenClassification.js +302 -0
- package/dist/tokenClassificationRegistry.js +472 -0
- package/dist/tools.js +31 -0
- package/dist/tslib.es6.js +21 -0
- package/dist/workbenchThemeService.js +46 -0
- package/dist/workspaceContext.js +49 -0
- package/package.json +106 -37
- package/dist/api.amd.js +0 -10066
- package/dist/api.cjs +0 -10107
- package/dist/services.amd.js +0 -33
- package/dist/services.cjs +0 -33
package/dist/monaco.d.ts
ADDED
|
@@ -0,0 +1,4914 @@
|
|
|
1
|
+
import * as monaco from 'monaco-editor';
|
|
2
|
+
import * as vscode from 'vscode';
|
|
3
|
+
|
|
4
|
+
interface IDisposable {
|
|
5
|
+
dispose(): void;
|
|
6
|
+
}
|
|
7
|
+
declare class DisposableStore implements IDisposable {
|
|
8
|
+
static DISABLE_DISPOSED_WARNING: boolean;
|
|
9
|
+
private _toDispose;
|
|
10
|
+
private _isDisposed;
|
|
11
|
+
constructor();
|
|
12
|
+
/**
|
|
13
|
+
* Dispose of all registered disposables and mark this object as disposed.
|
|
14
|
+
*
|
|
15
|
+
* Any future disposables added to this object will be disposed of on `add`.
|
|
16
|
+
*/
|
|
17
|
+
dispose(): void;
|
|
18
|
+
/**
|
|
19
|
+
* Returns `true` if this object has been disposed
|
|
20
|
+
*/
|
|
21
|
+
get isDisposed(): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Dispose of all registered disposables but do not mark this object as disposed.
|
|
24
|
+
*/
|
|
25
|
+
clear(): void;
|
|
26
|
+
add<T extends IDisposable>(o: T): T;
|
|
27
|
+
}
|
|
28
|
+
declare abstract class Disposable implements IDisposable {
|
|
29
|
+
static readonly None: Readonly<IDisposable>;
|
|
30
|
+
protected readonly _store: DisposableStore;
|
|
31
|
+
constructor();
|
|
32
|
+
dispose(): void;
|
|
33
|
+
protected _register<T extends IDisposable>(o: T): T;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Uniform Resource Identifier (URI) http://tools.ietf.org/html/rfc3986.
|
|
38
|
+
* This class is a simple parser which creates the basic component parts
|
|
39
|
+
* (http://tools.ietf.org/html/rfc3986#section-3) with minimal validation
|
|
40
|
+
* and encoding.
|
|
41
|
+
*
|
|
42
|
+
* ```txt
|
|
43
|
+
* foo://example.com:8042/over/there?name=ferret#nose
|
|
44
|
+
* \_/ \______________/\_________/ \_________/ \__/
|
|
45
|
+
* | | | | |
|
|
46
|
+
* scheme authority path query fragment
|
|
47
|
+
* | _____________________|__
|
|
48
|
+
* / \ / \
|
|
49
|
+
* urn:example:animal:ferret:nose
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
declare class URI implements UriComponents {
|
|
53
|
+
static isUri(thing: any): thing is URI;
|
|
54
|
+
/**
|
|
55
|
+
* scheme is the 'http' part of 'http://www.example.com/some/path?query#fragment'.
|
|
56
|
+
* The part before the first colon.
|
|
57
|
+
*/
|
|
58
|
+
readonly scheme: string;
|
|
59
|
+
/**
|
|
60
|
+
* authority is the 'www.example.com' part of 'http://www.example.com/some/path?query#fragment'.
|
|
61
|
+
* The part between the first double slashes and the next slash.
|
|
62
|
+
*/
|
|
63
|
+
readonly authority: string;
|
|
64
|
+
/**
|
|
65
|
+
* path is the '/some/path' part of 'http://www.example.com/some/path?query#fragment'.
|
|
66
|
+
*/
|
|
67
|
+
readonly path: string;
|
|
68
|
+
/**
|
|
69
|
+
* query is the 'query' part of 'http://www.example.com/some/path?query#fragment'.
|
|
70
|
+
*/
|
|
71
|
+
readonly query: string;
|
|
72
|
+
/**
|
|
73
|
+
* fragment is the 'fragment' part of 'http://www.example.com/some/path?query#fragment'.
|
|
74
|
+
*/
|
|
75
|
+
readonly fragment: string;
|
|
76
|
+
/**
|
|
77
|
+
* @internal
|
|
78
|
+
*/
|
|
79
|
+
protected constructor(scheme: string, authority?: string, path?: string, query?: string, fragment?: string, _strict?: boolean);
|
|
80
|
+
/**
|
|
81
|
+
* @internal
|
|
82
|
+
*/
|
|
83
|
+
protected constructor(components: UriComponents);
|
|
84
|
+
/**
|
|
85
|
+
* Returns a string representing the corresponding file system path of this URI.
|
|
86
|
+
* Will handle UNC paths, normalizes windows drive letters to lower-case, and uses the
|
|
87
|
+
* platform specific path separator.
|
|
88
|
+
*
|
|
89
|
+
* * Will *not* validate the path for invalid characters and semantics.
|
|
90
|
+
* * Will *not* look at the scheme of this URI.
|
|
91
|
+
* * The result shall *not* be used for display purposes but for accessing a file on disk.
|
|
92
|
+
*
|
|
93
|
+
*
|
|
94
|
+
* The *difference* to `URI#path` is the use of the platform specific separator and the handling
|
|
95
|
+
* of UNC paths. See the below sample of a file-uri with an authority (UNC path).
|
|
96
|
+
*
|
|
97
|
+
* ```ts
|
|
98
|
+
const u = URI.parse('file://server/c$/folder/file.txt')
|
|
99
|
+
u.authority === 'server'
|
|
100
|
+
u.path === '/shares/c$/file.txt'
|
|
101
|
+
u.fsPath === '\\server\c$\folder\file.txt'
|
|
102
|
+
```
|
|
103
|
+
*
|
|
104
|
+
* Using `URI#path` to read a file (using fs-apis) would not be enough because parts of the path,
|
|
105
|
+
* namely the server name, would be missing. Therefore `URI#fsPath` exists - it's sugar to ease working
|
|
106
|
+
* with URIs that represent files on disk (`file` scheme).
|
|
107
|
+
*/
|
|
108
|
+
get fsPath(): string;
|
|
109
|
+
with(change: {
|
|
110
|
+
scheme?: string;
|
|
111
|
+
authority?: string | null;
|
|
112
|
+
path?: string | null;
|
|
113
|
+
query?: string | null;
|
|
114
|
+
fragment?: string | null;
|
|
115
|
+
}): URI;
|
|
116
|
+
/**
|
|
117
|
+
* Creates a new URI from a string, e.g. `http://www.example.com/some/path`,
|
|
118
|
+
* `file:///usr/home`, or `scheme:with/path`.
|
|
119
|
+
*
|
|
120
|
+
* @param value A string which represents an URI (see `URI#toString`).
|
|
121
|
+
*/
|
|
122
|
+
static parse(value: string, _strict?: boolean): URI;
|
|
123
|
+
/**
|
|
124
|
+
* Creates a new URI from a file system path, e.g. `c:\my\files`,
|
|
125
|
+
* `/usr/home`, or `\\server\share\some\path`.
|
|
126
|
+
*
|
|
127
|
+
* The *difference* between `URI#parse` and `URI#file` is that the latter treats the argument
|
|
128
|
+
* as path, not as stringified-uri. E.g. `URI.file(path)` is **not the same as**
|
|
129
|
+
* `URI.parse('file://' + path)` because the path might contain characters that are
|
|
130
|
+
* interpreted (# and ?). See the following sample:
|
|
131
|
+
* ```ts
|
|
132
|
+
const good = URI.file('/coding/c#/project1');
|
|
133
|
+
good.scheme === 'file';
|
|
134
|
+
good.path === '/coding/c#/project1';
|
|
135
|
+
good.fragment === '';
|
|
136
|
+
const bad = URI.parse('file://' + '/coding/c#/project1');
|
|
137
|
+
bad.scheme === 'file';
|
|
138
|
+
bad.path === '/coding/c'; // path is now broken
|
|
139
|
+
bad.fragment === '/project1';
|
|
140
|
+
```
|
|
141
|
+
*
|
|
142
|
+
* @param path A file system path (see `URI#fsPath`)
|
|
143
|
+
*/
|
|
144
|
+
static file(path: string): URI;
|
|
145
|
+
static from(components: {
|
|
146
|
+
scheme: string;
|
|
147
|
+
authority?: string;
|
|
148
|
+
path?: string;
|
|
149
|
+
query?: string;
|
|
150
|
+
fragment?: string;
|
|
151
|
+
}): URI;
|
|
152
|
+
/**
|
|
153
|
+
* Join a URI path with path fragments and normalizes the resulting path.
|
|
154
|
+
*
|
|
155
|
+
* @param uri The input URI.
|
|
156
|
+
* @param pathFragment The path fragment to add to the URI path.
|
|
157
|
+
* @returns The resulting URI.
|
|
158
|
+
*/
|
|
159
|
+
static joinPath(uri: URI, ...pathFragment: string[]): URI;
|
|
160
|
+
/**
|
|
161
|
+
* Creates a string representation for this URI. It's guaranteed that calling
|
|
162
|
+
* `URI.parse` with the result of this function creates an URI which is equal
|
|
163
|
+
* to this URI.
|
|
164
|
+
*
|
|
165
|
+
* * The result shall *not* be used for display purposes but for externalization or transport.
|
|
166
|
+
* * The result will be encoded using the percentage encoding and encoding happens mostly
|
|
167
|
+
* ignore the scheme-specific encoding rules.
|
|
168
|
+
*
|
|
169
|
+
* @param skipEncoding Do not encode the result, default is `false`
|
|
170
|
+
*/
|
|
171
|
+
toString(skipEncoding?: boolean): string;
|
|
172
|
+
toJSON(): UriComponents;
|
|
173
|
+
static revive(data: UriComponents | URI): URI;
|
|
174
|
+
static revive(data: UriComponents | URI | undefined): URI | undefined;
|
|
175
|
+
static revive(data: UriComponents | URI | null): URI | null;
|
|
176
|
+
static revive(data: UriComponents | URI | undefined | null): URI | undefined | null;
|
|
177
|
+
}
|
|
178
|
+
interface UriComponents {
|
|
179
|
+
scheme: string;
|
|
180
|
+
authority: string;
|
|
181
|
+
path: string;
|
|
182
|
+
query: string;
|
|
183
|
+
fragment: string;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
interface CancellationToken {
|
|
187
|
+
/**
|
|
188
|
+
* A flag signalling is cancellation has been requested.
|
|
189
|
+
*/
|
|
190
|
+
readonly isCancellationRequested: boolean;
|
|
191
|
+
/**
|
|
192
|
+
* An event which fires when cancellation is requested. This event
|
|
193
|
+
* only ever fires `once` as cancellation can only happen once. Listeners
|
|
194
|
+
* that are registered after cancellation will be called (next event loop run),
|
|
195
|
+
* but also only once.
|
|
196
|
+
*
|
|
197
|
+
* @event
|
|
198
|
+
*/
|
|
199
|
+
readonly onCancellationRequested: (listener: (e: any) => any, thisArgs?: any, disposables?: IDisposable[]) => IDisposable;
|
|
200
|
+
}
|
|
201
|
+
declare namespace CancellationToken {
|
|
202
|
+
function isCancellationToken(thing: unknown): thing is CancellationToken;
|
|
203
|
+
const None: Readonly<CancellationToken>;
|
|
204
|
+
const Cancelled: Readonly<CancellationToken>;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
interface IObservable<T, TChange = void> {
|
|
208
|
+
readonly TChange: TChange;
|
|
209
|
+
/**
|
|
210
|
+
* Reads the current value.
|
|
211
|
+
*
|
|
212
|
+
* Must not be called from {@link IObserver.handleChange}.
|
|
213
|
+
*/
|
|
214
|
+
get(): T;
|
|
215
|
+
/**
|
|
216
|
+
* Adds an observer.
|
|
217
|
+
*/
|
|
218
|
+
addObserver(observer: IObserver): void;
|
|
219
|
+
removeObserver(observer: IObserver): void;
|
|
220
|
+
/**
|
|
221
|
+
* Subscribes the reader to this observable and returns the current value of this observable.
|
|
222
|
+
*/
|
|
223
|
+
read(reader: IReader): T;
|
|
224
|
+
map<TNew>(fn: (value: T) => TNew): IObservable<TNew>;
|
|
225
|
+
readonly debugName: string;
|
|
226
|
+
}
|
|
227
|
+
interface IReader {
|
|
228
|
+
/**
|
|
229
|
+
* Reports an observable that was read.
|
|
230
|
+
*
|
|
231
|
+
* Is called by {@link IObservable.read}.
|
|
232
|
+
*/
|
|
233
|
+
subscribeTo<T>(observable: IObservable<T, any>): void;
|
|
234
|
+
}
|
|
235
|
+
interface IObserver {
|
|
236
|
+
/**
|
|
237
|
+
* Indicates that an update operation is about to begin.
|
|
238
|
+
*
|
|
239
|
+
* During an update, invariants might not hold for subscribed observables and
|
|
240
|
+
* change events might be delayed.
|
|
241
|
+
* However, all changes must be reported before all update operations are over.
|
|
242
|
+
*/
|
|
243
|
+
beginUpdate<T>(observable: IObservable<T>): void;
|
|
244
|
+
/**
|
|
245
|
+
* Is called by a subscribed observable immediately after it notices a change.
|
|
246
|
+
*
|
|
247
|
+
* When {@link IObservable.get} returns and no change has been reported,
|
|
248
|
+
* there has been no change for that observable.
|
|
249
|
+
*
|
|
250
|
+
* Implementations must not call into other observables!
|
|
251
|
+
* The change should be processed when {@link IObserver.endUpdate} is called.
|
|
252
|
+
*/
|
|
253
|
+
handleChange<T, TChange>(observable: IObservable<T, TChange>, change: TChange): void;
|
|
254
|
+
/**
|
|
255
|
+
* Indicates that an update operation has completed.
|
|
256
|
+
*/
|
|
257
|
+
endUpdate<T>(observable: IObservable<T>): void;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* To an event a function with one or zero parameters
|
|
262
|
+
* can be subscribed. The event is the subscriber function itself.
|
|
263
|
+
*/
|
|
264
|
+
type Event<T> = vscode.Event<T>
|
|
265
|
+
declare namespace Event {
|
|
266
|
+
const None: Event<any>;
|
|
267
|
+
/**
|
|
268
|
+
* Given an event, returns another event which only fires once.
|
|
269
|
+
*/
|
|
270
|
+
function once<T>(event: Event<T>): Event<T>;
|
|
271
|
+
/**
|
|
272
|
+
* *NOTE* that this function returns an `Event` and it MUST be called with a `DisposableStore` whenever the returned
|
|
273
|
+
* event is accessible to "third parties", e.g the event is a public property. Otherwise a leaked listener on the
|
|
274
|
+
* returned event causes this utility to leak a listener on the original event.
|
|
275
|
+
*/
|
|
276
|
+
function map<I, O>(event: Event<I>, map: (i: I) => O, disposable?: DisposableStore): Event<O>;
|
|
277
|
+
/**
|
|
278
|
+
* *NOTE* that this function returns an `Event` and it MUST be called with a `DisposableStore` whenever the returned
|
|
279
|
+
* event is accessible to "third parties", e.g the event is a public property. Otherwise a leaked listener on the
|
|
280
|
+
* returned event causes this utility to leak a listener on the original event.
|
|
281
|
+
*/
|
|
282
|
+
function forEach<I>(event: Event<I>, each: (i: I) => void, disposable?: DisposableStore): Event<I>;
|
|
283
|
+
/**
|
|
284
|
+
* *NOTE* that this function returns an `Event` and it MUST be called with a `DisposableStore` whenever the returned
|
|
285
|
+
* event is accessible to "third parties", e.g the event is a public property. Otherwise a leaked listener on the
|
|
286
|
+
* returned event causes this utility to leak a listener on the original event.
|
|
287
|
+
*/
|
|
288
|
+
function filter<T, U>(event: Event<T | U>, filter: (e: T | U) => e is T, disposable?: DisposableStore): Event<T>;
|
|
289
|
+
function filter<T>(event: Event<T>, filter: (e: T) => boolean, disposable?: DisposableStore): Event<T>;
|
|
290
|
+
function filter<T, R>(event: Event<T | R>, filter: (e: T | R) => e is R, disposable?: DisposableStore): Event<R>;
|
|
291
|
+
/**
|
|
292
|
+
* Given an event, returns the same event but typed as `Event<void>`.
|
|
293
|
+
*/
|
|
294
|
+
function signal<T>(event: Event<T>): Event<void>;
|
|
295
|
+
/**
|
|
296
|
+
* Given a collection of events, returns a single event which emits
|
|
297
|
+
* whenever any of the provided events emit.
|
|
298
|
+
*/
|
|
299
|
+
function any<T>(...events: Event<T>[]): Event<T>;
|
|
300
|
+
function any(...events: Event<any>[]): Event<void>;
|
|
301
|
+
/**
|
|
302
|
+
* *NOTE* that this function returns an `Event` and it MUST be called with a `DisposableStore` whenever the returned
|
|
303
|
+
* event is accessible to "third parties", e.g the event is a public property. Otherwise a leaked listener on the
|
|
304
|
+
* returned event causes this utility to leak a listener on the original event.
|
|
305
|
+
*/
|
|
306
|
+
function reduce<I, O>(event: Event<I>, merge: (last: O | undefined, event: I) => O, initial?: O, disposable?: DisposableStore): Event<O>;
|
|
307
|
+
/**
|
|
308
|
+
* *NOTE* that this function returns an `Event` and it MUST be called with a `DisposableStore` whenever the returned
|
|
309
|
+
* event is accessible to "third parties", e.g the event is a public property. Otherwise a leaked listener on the
|
|
310
|
+
* returned event causes this utility to leak a listener on the original event.
|
|
311
|
+
*/
|
|
312
|
+
function debounce<T>(event: Event<T>, merge: (last: T | undefined, event: T) => T, delay?: number, leading?: boolean, leakWarningThreshold?: number, disposable?: DisposableStore): Event<T>;
|
|
313
|
+
/**
|
|
314
|
+
* *NOTE* that this function returns an `Event` and it MUST be called with a `DisposableStore` whenever the returned
|
|
315
|
+
* event is accessible to "third parties", e.g the event is a public property. Otherwise a leaked listener on the
|
|
316
|
+
* returned event causes this utility to leak a listener on the original event.
|
|
317
|
+
*/
|
|
318
|
+
function debounce<I, O>(event: Event<I>, merge: (last: O | undefined, event: I) => O, delay?: number, leading?: boolean, leakWarningThreshold?: number, disposable?: DisposableStore): Event<O>;
|
|
319
|
+
/**
|
|
320
|
+
* *NOTE* that this function returns an `Event` and it MUST be called with a `DisposableStore` whenever the returned
|
|
321
|
+
* event is accessible to "third parties", e.g the event is a public property. Otherwise a leaked listener on the
|
|
322
|
+
* returned event causes this utility to leak a listener on the original event.
|
|
323
|
+
*/
|
|
324
|
+
function latch<T>(event: Event<T>, equals?: (a: T, b: T) => boolean, disposable?: DisposableStore): Event<T>;
|
|
325
|
+
/**
|
|
326
|
+
* *NOTE* that this function returns an `Event` and it MUST be called with a `DisposableStore` whenever the returned
|
|
327
|
+
* event is accessible to "third parties", e.g the event is a public property. Otherwise a leaked listener on the
|
|
328
|
+
* returned event causes this utility to leak a listener on the original event.
|
|
329
|
+
*/
|
|
330
|
+
function split<T, U>(event: Event<T | U>, isT: (e: T | U) => e is T, disposable?: DisposableStore): [Event<T>, Event<U>];
|
|
331
|
+
/**
|
|
332
|
+
* *NOTE* that this function returns an `Event` and it MUST be called with a `DisposableStore` whenever the returned
|
|
333
|
+
* event is accessible to "third parties", e.g the event is a public property. Otherwise a leaked listener on the
|
|
334
|
+
* returned event causes this utility to leak a listener on the original event.
|
|
335
|
+
*/
|
|
336
|
+
function buffer<T>(event: Event<T>, flushAfterTimeout?: boolean, _buffer?: T[]): Event<T>;
|
|
337
|
+
interface IChainableEvent<T> extends IDisposable {
|
|
338
|
+
event: Event<T>;
|
|
339
|
+
map<O>(fn: (i: T) => O): IChainableEvent<O>;
|
|
340
|
+
forEach(fn: (i: T) => void): IChainableEvent<T>;
|
|
341
|
+
filter(fn: (e: T) => boolean): IChainableEvent<T>;
|
|
342
|
+
filter<R>(fn: (e: T | R) => e is R): IChainableEvent<R>;
|
|
343
|
+
reduce<R>(merge: (last: R | undefined, event: T) => R, initial?: R): IChainableEvent<R>;
|
|
344
|
+
latch(): IChainableEvent<T>;
|
|
345
|
+
debounce(merge: (last: T | undefined, event: T) => T, delay?: number, leading?: boolean, leakWarningThreshold?: number): IChainableEvent<T>;
|
|
346
|
+
debounce<R>(merge: (last: R | undefined, event: T) => R, delay?: number, leading?: boolean, leakWarningThreshold?: number): IChainableEvent<R>;
|
|
347
|
+
on(listener: (e: T) => any, thisArgs?: any, disposables?: IDisposable[] | DisposableStore): IDisposable;
|
|
348
|
+
once(listener: (e: T) => any, thisArgs?: any, disposables?: IDisposable[]): IDisposable;
|
|
349
|
+
}
|
|
350
|
+
function chain<T>(event: Event<T>): IChainableEvent<T>;
|
|
351
|
+
interface NodeEventEmitter {
|
|
352
|
+
on(event: string | symbol, listener: Function): unknown;
|
|
353
|
+
removeListener(event: string | symbol, listener: Function): unknown;
|
|
354
|
+
}
|
|
355
|
+
function fromNodeEventEmitter<T>(emitter: NodeEventEmitter, eventName: string, map?: (...args: any[]) => T): Event<T>;
|
|
356
|
+
interface DOMEventEmitter {
|
|
357
|
+
addEventListener(event: string | symbol, listener: Function): void;
|
|
358
|
+
removeEventListener(event: string | symbol, listener: Function): void;
|
|
359
|
+
}
|
|
360
|
+
function fromDOMEventEmitter<T>(emitter: DOMEventEmitter, eventName: string, map?: (...args: any[]) => T): Event<T>;
|
|
361
|
+
function toPromise<T>(event: Event<T>): Promise<T>;
|
|
362
|
+
function runAndSubscribe<T>(event: Event<T>, handler: (e: T | undefined) => any): IDisposable;
|
|
363
|
+
function runAndSubscribeWithStore<T>(event: Event<T>, handler: (e: T | undefined, disposableStore: DisposableStore) => any): IDisposable;
|
|
364
|
+
function fromObservable<T>(obs: IObservable<T, any>, store?: DisposableStore): Event<T>;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
interface ServicesAccessor {
|
|
368
|
+
get<T>(id: ServiceIdentifier<T>): T;
|
|
369
|
+
}
|
|
370
|
+
/**
|
|
371
|
+
* Identifies a service of type `T`.
|
|
372
|
+
*/
|
|
373
|
+
interface ServiceIdentifier<T> {
|
|
374
|
+
(...args: any[]): void;
|
|
375
|
+
type: T;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
interface IContextKeyExprMapper {
|
|
379
|
+
mapDefined(key: string): ContextKeyExpression;
|
|
380
|
+
mapNot(key: string): ContextKeyExpression;
|
|
381
|
+
mapEquals(key: string, value: any): ContextKeyExpression;
|
|
382
|
+
mapNotEquals(key: string, value: any): ContextKeyExpression;
|
|
383
|
+
mapGreater(key: string, value: any): ContextKeyExpression;
|
|
384
|
+
mapGreaterEquals(key: string, value: any): ContextKeyExpression;
|
|
385
|
+
mapSmaller(key: string, value: any): ContextKeyExpression;
|
|
386
|
+
mapSmallerEquals(key: string, value: any): ContextKeyExpression;
|
|
387
|
+
mapRegex(key: string, regexp: RegExp | null): ContextKeyRegexExpr;
|
|
388
|
+
mapIn(key: string, valueKey: string): ContextKeyInExpr;
|
|
389
|
+
mapNotIn(key: string, valueKey: string): ContextKeyNotInExpr;
|
|
390
|
+
}
|
|
391
|
+
interface IContextKeyExpression {
|
|
392
|
+
cmp(other: ContextKeyExpression): number;
|
|
393
|
+
equals(other: ContextKeyExpression): boolean;
|
|
394
|
+
substituteConstants(): ContextKeyExpression | undefined;
|
|
395
|
+
evaluate(context: IContext): boolean;
|
|
396
|
+
serialize(): string;
|
|
397
|
+
keys(): string[];
|
|
398
|
+
map(mapFnc: IContextKeyExprMapper): ContextKeyExpression;
|
|
399
|
+
negate(): ContextKeyExpression;
|
|
400
|
+
}
|
|
401
|
+
declare type ContextKeyExpression = (ContextKeyFalseExpr | ContextKeyTrueExpr | ContextKeyDefinedExpr | ContextKeyNotExpr | ContextKeyEqualsExpr | ContextKeyNotEqualsExpr | ContextKeyRegexExpr | ContextKeyNotRegexExpr | ContextKeyAndExpr | ContextKeyOrExpr | ContextKeyInExpr | ContextKeyNotInExpr | ContextKeyGreaterExpr | ContextKeyGreaterEqualsExpr | ContextKeySmallerExpr | ContextKeySmallerEqualsExpr);
|
|
402
|
+
declare class ContextKeyFalseExpr implements IContextKeyExpression {
|
|
403
|
+
static INSTANCE: ContextKeyFalseExpr;
|
|
404
|
+
readonly type = ContextKeyExprType.False;
|
|
405
|
+
protected constructor();
|
|
406
|
+
cmp(other: ContextKeyExpression): number;
|
|
407
|
+
equals(other: ContextKeyExpression): boolean;
|
|
408
|
+
substituteConstants(): ContextKeyExpression | undefined;
|
|
409
|
+
evaluate(context: IContext): boolean;
|
|
410
|
+
serialize(): string;
|
|
411
|
+
keys(): string[];
|
|
412
|
+
map(mapFnc: IContextKeyExprMapper): ContextKeyExpression;
|
|
413
|
+
negate(): ContextKeyExpression;
|
|
414
|
+
}
|
|
415
|
+
declare class ContextKeyTrueExpr implements IContextKeyExpression {
|
|
416
|
+
static INSTANCE: ContextKeyTrueExpr;
|
|
417
|
+
readonly type = ContextKeyExprType.True;
|
|
418
|
+
protected constructor();
|
|
419
|
+
cmp(other: ContextKeyExpression): number;
|
|
420
|
+
equals(other: ContextKeyExpression): boolean;
|
|
421
|
+
substituteConstants(): ContextKeyExpression | undefined;
|
|
422
|
+
evaluate(context: IContext): boolean;
|
|
423
|
+
serialize(): string;
|
|
424
|
+
keys(): string[];
|
|
425
|
+
map(mapFnc: IContextKeyExprMapper): ContextKeyExpression;
|
|
426
|
+
negate(): ContextKeyExpression;
|
|
427
|
+
}
|
|
428
|
+
declare class ContextKeyDefinedExpr implements IContextKeyExpression {
|
|
429
|
+
readonly key: string;
|
|
430
|
+
private negated;
|
|
431
|
+
static create(key: string, negated?: ContextKeyExpression | null): ContextKeyExpression;
|
|
432
|
+
readonly type = ContextKeyExprType.Defined;
|
|
433
|
+
protected constructor(key: string, negated: ContextKeyExpression | null);
|
|
434
|
+
cmp(other: ContextKeyExpression): number;
|
|
435
|
+
equals(other: ContextKeyExpression): boolean;
|
|
436
|
+
substituteConstants(): ContextKeyExpression | undefined;
|
|
437
|
+
evaluate(context: IContext): boolean;
|
|
438
|
+
serialize(): string;
|
|
439
|
+
keys(): string[];
|
|
440
|
+
map(mapFnc: IContextKeyExprMapper): ContextKeyExpression;
|
|
441
|
+
negate(): ContextKeyExpression;
|
|
442
|
+
}
|
|
443
|
+
declare class ContextKeyEqualsExpr implements IContextKeyExpression {
|
|
444
|
+
private readonly key;
|
|
445
|
+
private readonly value;
|
|
446
|
+
private negated;
|
|
447
|
+
static create(key: string, value: any, negated?: ContextKeyExpression | null): ContextKeyExpression;
|
|
448
|
+
readonly type = ContextKeyExprType.Equals;
|
|
449
|
+
private constructor();
|
|
450
|
+
cmp(other: ContextKeyExpression): number;
|
|
451
|
+
equals(other: ContextKeyExpression): boolean;
|
|
452
|
+
substituteConstants(): ContextKeyExpression | undefined;
|
|
453
|
+
evaluate(context: IContext): boolean;
|
|
454
|
+
serialize(): string;
|
|
455
|
+
keys(): string[];
|
|
456
|
+
map(mapFnc: IContextKeyExprMapper): ContextKeyExpression;
|
|
457
|
+
negate(): ContextKeyExpression;
|
|
458
|
+
}
|
|
459
|
+
declare class ContextKeyInExpr implements IContextKeyExpression {
|
|
460
|
+
private readonly key;
|
|
461
|
+
private readonly valueKey;
|
|
462
|
+
static create(key: string, valueKey: string): ContextKeyInExpr;
|
|
463
|
+
readonly type = ContextKeyExprType.In;
|
|
464
|
+
private negated;
|
|
465
|
+
private constructor();
|
|
466
|
+
cmp(other: ContextKeyExpression): number;
|
|
467
|
+
equals(other: ContextKeyExpression): boolean;
|
|
468
|
+
substituteConstants(): ContextKeyExpression | undefined;
|
|
469
|
+
evaluate(context: IContext): boolean;
|
|
470
|
+
serialize(): string;
|
|
471
|
+
keys(): string[];
|
|
472
|
+
map(mapFnc: IContextKeyExprMapper): ContextKeyInExpr;
|
|
473
|
+
negate(): ContextKeyExpression;
|
|
474
|
+
}
|
|
475
|
+
declare class ContextKeyNotInExpr implements IContextKeyExpression {
|
|
476
|
+
private readonly key;
|
|
477
|
+
private readonly valueKey;
|
|
478
|
+
static create(key: string, valueKey: string): ContextKeyNotInExpr;
|
|
479
|
+
readonly type = ContextKeyExprType.NotIn;
|
|
480
|
+
private readonly _negated;
|
|
481
|
+
private constructor();
|
|
482
|
+
cmp(other: ContextKeyExpression): number;
|
|
483
|
+
equals(other: ContextKeyExpression): boolean;
|
|
484
|
+
substituteConstants(): ContextKeyExpression | undefined;
|
|
485
|
+
evaluate(context: IContext): boolean;
|
|
486
|
+
serialize(): string;
|
|
487
|
+
keys(): string[];
|
|
488
|
+
map(mapFnc: IContextKeyExprMapper): ContextKeyExpression;
|
|
489
|
+
negate(): ContextKeyExpression;
|
|
490
|
+
}
|
|
491
|
+
declare class ContextKeyNotEqualsExpr implements IContextKeyExpression {
|
|
492
|
+
private readonly key;
|
|
493
|
+
private readonly value;
|
|
494
|
+
private negated;
|
|
495
|
+
static create(key: string, value: any, negated?: ContextKeyExpression | null): ContextKeyExpression;
|
|
496
|
+
readonly type = ContextKeyExprType.NotEquals;
|
|
497
|
+
private constructor();
|
|
498
|
+
cmp(other: ContextKeyExpression): number;
|
|
499
|
+
equals(other: ContextKeyExpression): boolean;
|
|
500
|
+
substituteConstants(): ContextKeyExpression | undefined;
|
|
501
|
+
evaluate(context: IContext): boolean;
|
|
502
|
+
serialize(): string;
|
|
503
|
+
keys(): string[];
|
|
504
|
+
map(mapFnc: IContextKeyExprMapper): ContextKeyExpression;
|
|
505
|
+
negate(): ContextKeyExpression;
|
|
506
|
+
}
|
|
507
|
+
declare class ContextKeyNotExpr implements IContextKeyExpression {
|
|
508
|
+
private readonly key;
|
|
509
|
+
private negated;
|
|
510
|
+
static create(key: string, negated?: ContextKeyExpression | null): ContextKeyExpression;
|
|
511
|
+
readonly type = ContextKeyExprType.Not;
|
|
512
|
+
private constructor();
|
|
513
|
+
cmp(other: ContextKeyExpression): number;
|
|
514
|
+
equals(other: ContextKeyExpression): boolean;
|
|
515
|
+
substituteConstants(): ContextKeyExpression | undefined;
|
|
516
|
+
evaluate(context: IContext): boolean;
|
|
517
|
+
serialize(): string;
|
|
518
|
+
keys(): string[];
|
|
519
|
+
map(mapFnc: IContextKeyExprMapper): ContextKeyExpression;
|
|
520
|
+
negate(): ContextKeyExpression;
|
|
521
|
+
}
|
|
522
|
+
declare class ContextKeyGreaterExpr implements IContextKeyExpression {
|
|
523
|
+
private readonly key;
|
|
524
|
+
private readonly value;
|
|
525
|
+
private negated;
|
|
526
|
+
static create(key: string, _value: any, negated?: ContextKeyExpression | null): ContextKeyExpression;
|
|
527
|
+
readonly type = ContextKeyExprType.Greater;
|
|
528
|
+
private constructor();
|
|
529
|
+
cmp(other: ContextKeyExpression): number;
|
|
530
|
+
equals(other: ContextKeyExpression): boolean;
|
|
531
|
+
substituteConstants(): ContextKeyExpression | undefined;
|
|
532
|
+
evaluate(context: IContext): boolean;
|
|
533
|
+
serialize(): string;
|
|
534
|
+
keys(): string[];
|
|
535
|
+
map(mapFnc: IContextKeyExprMapper): ContextKeyExpression;
|
|
536
|
+
negate(): ContextKeyExpression;
|
|
537
|
+
}
|
|
538
|
+
declare class ContextKeyGreaterEqualsExpr implements IContextKeyExpression {
|
|
539
|
+
private readonly key;
|
|
540
|
+
private readonly value;
|
|
541
|
+
private negated;
|
|
542
|
+
static create(key: string, _value: any, negated?: ContextKeyExpression | null): ContextKeyExpression;
|
|
543
|
+
readonly type = ContextKeyExprType.GreaterEquals;
|
|
544
|
+
private constructor();
|
|
545
|
+
cmp(other: ContextKeyExpression): number;
|
|
546
|
+
equals(other: ContextKeyExpression): boolean;
|
|
547
|
+
substituteConstants(): ContextKeyExpression | undefined;
|
|
548
|
+
evaluate(context: IContext): boolean;
|
|
549
|
+
serialize(): string;
|
|
550
|
+
keys(): string[];
|
|
551
|
+
map(mapFnc: IContextKeyExprMapper): ContextKeyExpression;
|
|
552
|
+
negate(): ContextKeyExpression;
|
|
553
|
+
}
|
|
554
|
+
declare class ContextKeySmallerExpr implements IContextKeyExpression {
|
|
555
|
+
private readonly key;
|
|
556
|
+
private readonly value;
|
|
557
|
+
private negated;
|
|
558
|
+
static create(key: string, _value: any, negated?: ContextKeyExpression | null): ContextKeyExpression;
|
|
559
|
+
readonly type = ContextKeyExprType.Smaller;
|
|
560
|
+
private constructor();
|
|
561
|
+
cmp(other: ContextKeyExpression): number;
|
|
562
|
+
equals(other: ContextKeyExpression): boolean;
|
|
563
|
+
substituteConstants(): ContextKeyExpression | undefined;
|
|
564
|
+
evaluate(context: IContext): boolean;
|
|
565
|
+
serialize(): string;
|
|
566
|
+
keys(): string[];
|
|
567
|
+
map(mapFnc: IContextKeyExprMapper): ContextKeyExpression;
|
|
568
|
+
negate(): ContextKeyExpression;
|
|
569
|
+
}
|
|
570
|
+
declare class ContextKeySmallerEqualsExpr implements IContextKeyExpression {
|
|
571
|
+
private readonly key;
|
|
572
|
+
private readonly value;
|
|
573
|
+
private negated;
|
|
574
|
+
static create(key: string, _value: any, negated?: ContextKeyExpression | null): ContextKeyExpression;
|
|
575
|
+
readonly type = ContextKeyExprType.SmallerEquals;
|
|
576
|
+
private constructor();
|
|
577
|
+
cmp(other: ContextKeyExpression): number;
|
|
578
|
+
equals(other: ContextKeyExpression): boolean;
|
|
579
|
+
substituteConstants(): ContextKeyExpression | undefined;
|
|
580
|
+
evaluate(context: IContext): boolean;
|
|
581
|
+
serialize(): string;
|
|
582
|
+
keys(): string[];
|
|
583
|
+
map(mapFnc: IContextKeyExprMapper): ContextKeyExpression;
|
|
584
|
+
negate(): ContextKeyExpression;
|
|
585
|
+
}
|
|
586
|
+
declare class ContextKeyRegexExpr implements IContextKeyExpression {
|
|
587
|
+
private readonly key;
|
|
588
|
+
private readonly regexp;
|
|
589
|
+
static create(key: string, regexp: RegExp | null): ContextKeyRegexExpr;
|
|
590
|
+
readonly type = ContextKeyExprType.Regex;
|
|
591
|
+
private negated;
|
|
592
|
+
private constructor();
|
|
593
|
+
cmp(other: ContextKeyExpression): number;
|
|
594
|
+
equals(other: ContextKeyExpression): boolean;
|
|
595
|
+
substituteConstants(): ContextKeyExpression | undefined;
|
|
596
|
+
evaluate(context: IContext): boolean;
|
|
597
|
+
serialize(): string;
|
|
598
|
+
keys(): string[];
|
|
599
|
+
map(mapFnc: IContextKeyExprMapper): ContextKeyRegexExpr;
|
|
600
|
+
negate(): ContextKeyExpression;
|
|
601
|
+
}
|
|
602
|
+
declare class ContextKeyNotRegexExpr implements IContextKeyExpression {
|
|
603
|
+
private readonly _actual;
|
|
604
|
+
static create(actual: ContextKeyRegexExpr): ContextKeyExpression;
|
|
605
|
+
readonly type = ContextKeyExprType.NotRegex;
|
|
606
|
+
private constructor();
|
|
607
|
+
cmp(other: ContextKeyExpression): number;
|
|
608
|
+
equals(other: ContextKeyExpression): boolean;
|
|
609
|
+
substituteConstants(): ContextKeyExpression | undefined;
|
|
610
|
+
evaluate(context: IContext): boolean;
|
|
611
|
+
serialize(): string;
|
|
612
|
+
keys(): string[];
|
|
613
|
+
map(mapFnc: IContextKeyExprMapper): ContextKeyExpression;
|
|
614
|
+
negate(): ContextKeyExpression;
|
|
615
|
+
}
|
|
616
|
+
declare class ContextKeyAndExpr implements IContextKeyExpression {
|
|
617
|
+
readonly expr: ContextKeyExpression[];
|
|
618
|
+
private negated;
|
|
619
|
+
static create(_expr: ReadonlyArray<ContextKeyExpression | null | undefined>, negated: ContextKeyExpression | null): ContextKeyExpression | undefined;
|
|
620
|
+
readonly type = ContextKeyExprType.And;
|
|
621
|
+
private constructor();
|
|
622
|
+
cmp(other: ContextKeyExpression): number;
|
|
623
|
+
equals(other: ContextKeyExpression): boolean;
|
|
624
|
+
substituteConstants(): ContextKeyExpression | undefined;
|
|
625
|
+
evaluate(context: IContext): boolean;
|
|
626
|
+
private static _normalizeArr;
|
|
627
|
+
serialize(): string;
|
|
628
|
+
keys(): string[];
|
|
629
|
+
map(mapFnc: IContextKeyExprMapper): ContextKeyExpression;
|
|
630
|
+
negate(): ContextKeyExpression;
|
|
631
|
+
}
|
|
632
|
+
declare class ContextKeyOrExpr implements IContextKeyExpression {
|
|
633
|
+
readonly expr: ContextKeyExpression[];
|
|
634
|
+
private negated;
|
|
635
|
+
static create(_expr: ReadonlyArray<ContextKeyExpression | null | undefined>, negated: ContextKeyExpression | null, extraRedundantCheck: boolean): ContextKeyExpression | undefined;
|
|
636
|
+
readonly type = ContextKeyExprType.Or;
|
|
637
|
+
private constructor();
|
|
638
|
+
cmp(other: ContextKeyExpression): number;
|
|
639
|
+
equals(other: ContextKeyExpression): boolean;
|
|
640
|
+
substituteConstants(): ContextKeyExpression | undefined;
|
|
641
|
+
evaluate(context: IContext): boolean;
|
|
642
|
+
private static _normalizeArr;
|
|
643
|
+
serialize(): string;
|
|
644
|
+
keys(): string[];
|
|
645
|
+
map(mapFnc: IContextKeyExprMapper): ContextKeyExpression;
|
|
646
|
+
negate(): ContextKeyExpression;
|
|
647
|
+
}
|
|
648
|
+
declare type ContextKeyValue = null | undefined | boolean | number | string | Array<null | undefined | boolean | number | string> | Record<string, null | undefined | boolean | number | string>;
|
|
649
|
+
interface IContext {
|
|
650
|
+
getValue<T extends ContextKeyValue = ContextKeyValue>(key: string): T | undefined;
|
|
651
|
+
}
|
|
652
|
+
interface IContextKey<T extends ContextKeyValue = ContextKeyValue> {
|
|
653
|
+
set(value: T): void;
|
|
654
|
+
reset(): void;
|
|
655
|
+
get(): T | undefined;
|
|
656
|
+
}
|
|
657
|
+
interface IContextKeyServiceTarget {
|
|
658
|
+
parentElement: IContextKeyServiceTarget | null;
|
|
659
|
+
setAttribute(attr: string, value: string): void;
|
|
660
|
+
removeAttribute(attr: string): void;
|
|
661
|
+
hasAttribute(attr: string): boolean;
|
|
662
|
+
getAttribute(attr: string): string | null;
|
|
663
|
+
}
|
|
664
|
+
interface IReadableSet<T> {
|
|
665
|
+
has(value: T): boolean;
|
|
666
|
+
}
|
|
667
|
+
interface IContextKeyChangeEvent {
|
|
668
|
+
affectsSome(keys: IReadableSet<string>): boolean;
|
|
669
|
+
allKeysContainedIn(keys: IReadableSet<string>): boolean;
|
|
670
|
+
}
|
|
671
|
+
declare const IContextKeyService: ServiceIdentifier<IContextKeyService>;
|
|
672
|
+
interface IContextKeyService {
|
|
673
|
+
readonly _serviceBrand: undefined;
|
|
674
|
+
dispose(): void;
|
|
675
|
+
onDidChangeContext: Event<IContextKeyChangeEvent>;
|
|
676
|
+
bufferChangeEvents(callback: Function): void;
|
|
677
|
+
createKey<T extends ContextKeyValue>(key: string, defaultValue: T | undefined): IContextKey<T>;
|
|
678
|
+
contextMatchesRules(rules: ContextKeyExpression | undefined): boolean;
|
|
679
|
+
getContextKeyValue<T>(key: string): T | undefined;
|
|
680
|
+
createScoped(target: IContextKeyServiceTarget): IContextKeyService;
|
|
681
|
+
createOverlay(overlay: Iterable<[string, any]>): IContextKeyService;
|
|
682
|
+
getContext(target: IContextKeyServiceTarget | null): IContext;
|
|
683
|
+
updateParent(parentContextKeyService: IContextKeyService): void;
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
declare type JSONSchemaType = 'string' | 'number' | 'integer' | 'boolean' | 'null' | 'array' | 'object';
|
|
687
|
+
interface IJSONSchema {
|
|
688
|
+
id?: string;
|
|
689
|
+
$id?: string;
|
|
690
|
+
$schema?: string;
|
|
691
|
+
type?: JSONSchemaType | JSONSchemaType[];
|
|
692
|
+
title?: string;
|
|
693
|
+
default?: any;
|
|
694
|
+
definitions?: IJSONSchemaMap;
|
|
695
|
+
description?: string;
|
|
696
|
+
properties?: IJSONSchemaMap;
|
|
697
|
+
patternProperties?: IJSONSchemaMap;
|
|
698
|
+
additionalProperties?: boolean | IJSONSchema;
|
|
699
|
+
minProperties?: number;
|
|
700
|
+
maxProperties?: number;
|
|
701
|
+
dependencies?: IJSONSchemaMap | {
|
|
702
|
+
[prop: string]: string[];
|
|
703
|
+
};
|
|
704
|
+
items?: IJSONSchema | IJSONSchema[];
|
|
705
|
+
minItems?: number;
|
|
706
|
+
maxItems?: number;
|
|
707
|
+
uniqueItems?: boolean;
|
|
708
|
+
additionalItems?: boolean | IJSONSchema;
|
|
709
|
+
pattern?: string;
|
|
710
|
+
minLength?: number;
|
|
711
|
+
maxLength?: number;
|
|
712
|
+
minimum?: number;
|
|
713
|
+
maximum?: number;
|
|
714
|
+
exclusiveMinimum?: boolean | number;
|
|
715
|
+
exclusiveMaximum?: boolean | number;
|
|
716
|
+
multipleOf?: number;
|
|
717
|
+
required?: string[];
|
|
718
|
+
$ref?: string;
|
|
719
|
+
anyOf?: IJSONSchema[];
|
|
720
|
+
allOf?: IJSONSchema[];
|
|
721
|
+
oneOf?: IJSONSchema[];
|
|
722
|
+
not?: IJSONSchema;
|
|
723
|
+
enum?: any[];
|
|
724
|
+
format?: string;
|
|
725
|
+
const?: any;
|
|
726
|
+
contains?: IJSONSchema;
|
|
727
|
+
propertyNames?: IJSONSchema;
|
|
728
|
+
examples?: any[];
|
|
729
|
+
$comment?: string;
|
|
730
|
+
if?: IJSONSchema;
|
|
731
|
+
then?: IJSONSchema;
|
|
732
|
+
else?: IJSONSchema;
|
|
733
|
+
unevaluatedProperties?: boolean | IJSONSchema;
|
|
734
|
+
unevaluatedItems?: boolean | IJSONSchema;
|
|
735
|
+
minContains?: number;
|
|
736
|
+
maxContains?: number;
|
|
737
|
+
deprecated?: boolean;
|
|
738
|
+
dependentRequired?: {
|
|
739
|
+
[prop: string]: string[];
|
|
740
|
+
};
|
|
741
|
+
dependentSchemas?: IJSONSchemaMap;
|
|
742
|
+
$defs?: {
|
|
743
|
+
[name: string]: IJSONSchema;
|
|
744
|
+
};
|
|
745
|
+
$anchor?: string;
|
|
746
|
+
$recursiveRef?: string;
|
|
747
|
+
$recursiveAnchor?: string;
|
|
748
|
+
$vocabulary?: any;
|
|
749
|
+
prefixItems?: IJSONSchema[];
|
|
750
|
+
$dynamicRef?: string;
|
|
751
|
+
$dynamicAnchor?: string;
|
|
752
|
+
defaultSnippets?: IJSONSchemaSnippet[];
|
|
753
|
+
errorMessage?: string;
|
|
754
|
+
patternErrorMessage?: string;
|
|
755
|
+
deprecationMessage?: string;
|
|
756
|
+
markdownDeprecationMessage?: string;
|
|
757
|
+
enumDescriptions?: string[];
|
|
758
|
+
markdownEnumDescriptions?: string[];
|
|
759
|
+
markdownDescription?: string;
|
|
760
|
+
doNotSuggest?: boolean;
|
|
761
|
+
suggestSortText?: string;
|
|
762
|
+
allowComments?: boolean;
|
|
763
|
+
allowTrailingCommas?: boolean;
|
|
764
|
+
}
|
|
765
|
+
interface IJSONSchemaMap {
|
|
766
|
+
[name: string]: IJSONSchema;
|
|
767
|
+
}
|
|
768
|
+
interface IJSONSchemaSnippet {
|
|
769
|
+
label?: string;
|
|
770
|
+
description?: string;
|
|
771
|
+
body?: any;
|
|
772
|
+
bodyText?: string;
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
/**
|
|
776
|
+
* Configuration options for auto indentation in the editor
|
|
777
|
+
*/
|
|
778
|
+
declare const enum EditorAutoIndentStrategy {
|
|
779
|
+
None = 0,
|
|
780
|
+
Keep = 1,
|
|
781
|
+
Brackets = 2,
|
|
782
|
+
Advanced = 3,
|
|
783
|
+
Full = 4
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
/**
|
|
787
|
+
* A position in the editor. This interface is suitable for serialization.
|
|
788
|
+
*/
|
|
789
|
+
interface IPosition {
|
|
790
|
+
/**
|
|
791
|
+
* line number (starts at 1)
|
|
792
|
+
*/
|
|
793
|
+
readonly lineNumber: number;
|
|
794
|
+
/**
|
|
795
|
+
* column (the first character in a line is between column 1 and column 2)
|
|
796
|
+
*/
|
|
797
|
+
readonly column: number;
|
|
798
|
+
}
|
|
799
|
+
/**
|
|
800
|
+
* A position in the editor.
|
|
801
|
+
*/
|
|
802
|
+
declare class Position {
|
|
803
|
+
/**
|
|
804
|
+
* line number (starts at 1)
|
|
805
|
+
*/
|
|
806
|
+
readonly lineNumber: number;
|
|
807
|
+
/**
|
|
808
|
+
* column (the first character in a line is between column 1 and column 2)
|
|
809
|
+
*/
|
|
810
|
+
readonly column: number;
|
|
811
|
+
constructor(lineNumber: number, column: number);
|
|
812
|
+
/**
|
|
813
|
+
* Create a new position from this position.
|
|
814
|
+
*
|
|
815
|
+
* @param newLineNumber new line number
|
|
816
|
+
* @param newColumn new column
|
|
817
|
+
*/
|
|
818
|
+
with(newLineNumber?: number, newColumn?: number): Position;
|
|
819
|
+
/**
|
|
820
|
+
* Derive a new position from this position.
|
|
821
|
+
*
|
|
822
|
+
* @param deltaLineNumber line number delta
|
|
823
|
+
* @param deltaColumn column delta
|
|
824
|
+
*/
|
|
825
|
+
delta(deltaLineNumber?: number, deltaColumn?: number): Position;
|
|
826
|
+
/**
|
|
827
|
+
* Test if this position equals other position
|
|
828
|
+
*/
|
|
829
|
+
equals(other: IPosition): boolean;
|
|
830
|
+
/**
|
|
831
|
+
* Test if position `a` equals position `b`
|
|
832
|
+
*/
|
|
833
|
+
static equals(a: IPosition | null, b: IPosition | null): boolean;
|
|
834
|
+
/**
|
|
835
|
+
* Test if this position is before other position.
|
|
836
|
+
* If the two positions are equal, the result will be false.
|
|
837
|
+
*/
|
|
838
|
+
isBefore(other: IPosition): boolean;
|
|
839
|
+
/**
|
|
840
|
+
* Test if position `a` is before position `b`.
|
|
841
|
+
* If the two positions are equal, the result will be false.
|
|
842
|
+
*/
|
|
843
|
+
static isBefore(a: IPosition, b: IPosition): boolean;
|
|
844
|
+
/**
|
|
845
|
+
* Test if this position is before other position.
|
|
846
|
+
* If the two positions are equal, the result will be true.
|
|
847
|
+
*/
|
|
848
|
+
isBeforeOrEqual(other: IPosition): boolean;
|
|
849
|
+
/**
|
|
850
|
+
* Test if position `a` is before position `b`.
|
|
851
|
+
* If the two positions are equal, the result will be true.
|
|
852
|
+
*/
|
|
853
|
+
static isBeforeOrEqual(a: IPosition, b: IPosition): boolean;
|
|
854
|
+
/**
|
|
855
|
+
* A function that compares positions, useful for sorting
|
|
856
|
+
*/
|
|
857
|
+
static compare(a: IPosition, b: IPosition): number;
|
|
858
|
+
/**
|
|
859
|
+
* Clone this position.
|
|
860
|
+
*/
|
|
861
|
+
clone(): Position;
|
|
862
|
+
/**
|
|
863
|
+
* Convert to a human-readable representation.
|
|
864
|
+
*/
|
|
865
|
+
toString(): string;
|
|
866
|
+
/**
|
|
867
|
+
* Create a `Position` from an `IPosition`.
|
|
868
|
+
*/
|
|
869
|
+
static lift(pos: IPosition): Position;
|
|
870
|
+
/**
|
|
871
|
+
* Test if `obj` is an `IPosition`.
|
|
872
|
+
*/
|
|
873
|
+
static isIPosition(obj: any): obj is IPosition;
|
|
874
|
+
}
|
|
875
|
+
|
|
876
|
+
/**
|
|
877
|
+
* A range in the editor. This interface is suitable for serialization.
|
|
878
|
+
*/
|
|
879
|
+
interface IRange {
|
|
880
|
+
/**
|
|
881
|
+
* Line number on which the range starts (starts at 1).
|
|
882
|
+
*/
|
|
883
|
+
readonly startLineNumber: number;
|
|
884
|
+
/**
|
|
885
|
+
* Column on which the range starts in line `startLineNumber` (starts at 1).
|
|
886
|
+
*/
|
|
887
|
+
readonly startColumn: number;
|
|
888
|
+
/**
|
|
889
|
+
* Line number on which the range ends.
|
|
890
|
+
*/
|
|
891
|
+
readonly endLineNumber: number;
|
|
892
|
+
/**
|
|
893
|
+
* Column on which the range ends in line `endLineNumber`.
|
|
894
|
+
*/
|
|
895
|
+
readonly endColumn: number;
|
|
896
|
+
}
|
|
897
|
+
/**
|
|
898
|
+
* A range in the editor. (startLineNumber,startColumn) is <= (endLineNumber,endColumn)
|
|
899
|
+
*/
|
|
900
|
+
declare class Range {
|
|
901
|
+
/**
|
|
902
|
+
* Line number on which the range starts (starts at 1).
|
|
903
|
+
*/
|
|
904
|
+
readonly startLineNumber: number;
|
|
905
|
+
/**
|
|
906
|
+
* Column on which the range starts in line `startLineNumber` (starts at 1).
|
|
907
|
+
*/
|
|
908
|
+
readonly startColumn: number;
|
|
909
|
+
/**
|
|
910
|
+
* Line number on which the range ends.
|
|
911
|
+
*/
|
|
912
|
+
readonly endLineNumber: number;
|
|
913
|
+
/**
|
|
914
|
+
* Column on which the range ends in line `endLineNumber`.
|
|
915
|
+
*/
|
|
916
|
+
readonly endColumn: number;
|
|
917
|
+
constructor(startLineNumber: number, startColumn: number, endLineNumber: number, endColumn: number);
|
|
918
|
+
/**
|
|
919
|
+
* Test if this range is empty.
|
|
920
|
+
*/
|
|
921
|
+
isEmpty(): boolean;
|
|
922
|
+
/**
|
|
923
|
+
* Test if `range` is empty.
|
|
924
|
+
*/
|
|
925
|
+
static isEmpty(range: IRange): boolean;
|
|
926
|
+
/**
|
|
927
|
+
* Test if position is in this range. If the position is at the edges, will return true.
|
|
928
|
+
*/
|
|
929
|
+
containsPosition(position: IPosition): boolean;
|
|
930
|
+
/**
|
|
931
|
+
* Test if `position` is in `range`. If the position is at the edges, will return true.
|
|
932
|
+
*/
|
|
933
|
+
static containsPosition(range: IRange, position: IPosition): boolean;
|
|
934
|
+
/**
|
|
935
|
+
* Test if `position` is in `range`. If the position is at the edges, will return false.
|
|
936
|
+
* @internal
|
|
937
|
+
*/
|
|
938
|
+
static strictContainsPosition(range: IRange, position: IPosition): boolean;
|
|
939
|
+
/**
|
|
940
|
+
* Test if range is in this range. If the range is equal to this range, will return true.
|
|
941
|
+
*/
|
|
942
|
+
containsRange(range: IRange): boolean;
|
|
943
|
+
/**
|
|
944
|
+
* Test if `otherRange` is in `range`. If the ranges are equal, will return true.
|
|
945
|
+
*/
|
|
946
|
+
static containsRange(range: IRange, otherRange: IRange): boolean;
|
|
947
|
+
/**
|
|
948
|
+
* Test if `range` is strictly in this range. `range` must start after and end before this range for the result to be true.
|
|
949
|
+
*/
|
|
950
|
+
strictContainsRange(range: IRange): boolean;
|
|
951
|
+
/**
|
|
952
|
+
* Test if `otherRange` is strictly in `range` (must start after, and end before). If the ranges are equal, will return false.
|
|
953
|
+
*/
|
|
954
|
+
static strictContainsRange(range: IRange, otherRange: IRange): boolean;
|
|
955
|
+
/**
|
|
956
|
+
* A reunion of the two ranges.
|
|
957
|
+
* The smallest position will be used as the start point, and the largest one as the end point.
|
|
958
|
+
*/
|
|
959
|
+
plusRange(range: IRange): Range;
|
|
960
|
+
/**
|
|
961
|
+
* A reunion of the two ranges.
|
|
962
|
+
* The smallest position will be used as the start point, and the largest one as the end point.
|
|
963
|
+
*/
|
|
964
|
+
static plusRange(a: IRange, b: IRange): Range;
|
|
965
|
+
/**
|
|
966
|
+
* A intersection of the two ranges.
|
|
967
|
+
*/
|
|
968
|
+
intersectRanges(range: IRange): Range | null;
|
|
969
|
+
/**
|
|
970
|
+
* A intersection of the two ranges.
|
|
971
|
+
*/
|
|
972
|
+
static intersectRanges(a: IRange, b: IRange): Range | null;
|
|
973
|
+
/**
|
|
974
|
+
* Test if this range equals other.
|
|
975
|
+
*/
|
|
976
|
+
equalsRange(other: IRange | null): boolean;
|
|
977
|
+
/**
|
|
978
|
+
* Test if range `a` equals `b`.
|
|
979
|
+
*/
|
|
980
|
+
static equalsRange(a: IRange | null, b: IRange | null): boolean;
|
|
981
|
+
/**
|
|
982
|
+
* Return the end position (which will be after or equal to the start position)
|
|
983
|
+
*/
|
|
984
|
+
getEndPosition(): Position;
|
|
985
|
+
/**
|
|
986
|
+
* Return the end position (which will be after or equal to the start position)
|
|
987
|
+
*/
|
|
988
|
+
static getEndPosition(range: IRange): Position;
|
|
989
|
+
/**
|
|
990
|
+
* Return the start position (which will be before or equal to the end position)
|
|
991
|
+
*/
|
|
992
|
+
getStartPosition(): Position;
|
|
993
|
+
/**
|
|
994
|
+
* Return the start position (which will be before or equal to the end position)
|
|
995
|
+
*/
|
|
996
|
+
static getStartPosition(range: IRange): Position;
|
|
997
|
+
/**
|
|
998
|
+
* Transform to a user presentable string representation.
|
|
999
|
+
*/
|
|
1000
|
+
toString(): string;
|
|
1001
|
+
/**
|
|
1002
|
+
* Create a new range using this range's start position, and using endLineNumber and endColumn as the end position.
|
|
1003
|
+
*/
|
|
1004
|
+
setEndPosition(endLineNumber: number, endColumn: number): Range;
|
|
1005
|
+
/**
|
|
1006
|
+
* Create a new range using this range's end position, and using startLineNumber and startColumn as the start position.
|
|
1007
|
+
*/
|
|
1008
|
+
setStartPosition(startLineNumber: number, startColumn: number): Range;
|
|
1009
|
+
/**
|
|
1010
|
+
* Create a new empty range using this range's start position.
|
|
1011
|
+
*/
|
|
1012
|
+
collapseToStart(): Range;
|
|
1013
|
+
/**
|
|
1014
|
+
* Create a new empty range using this range's start position.
|
|
1015
|
+
*/
|
|
1016
|
+
static collapseToStart(range: IRange): Range;
|
|
1017
|
+
static fromPositions(start: IPosition, end?: IPosition): Range;
|
|
1018
|
+
/**
|
|
1019
|
+
* Create a `Range` from an `IRange`.
|
|
1020
|
+
*/
|
|
1021
|
+
static lift(range: undefined | null): null;
|
|
1022
|
+
static lift(range: IRange): Range;
|
|
1023
|
+
static lift(range: IRange | undefined | null): Range | null;
|
|
1024
|
+
/**
|
|
1025
|
+
* Test if `obj` is an `IRange`.
|
|
1026
|
+
*/
|
|
1027
|
+
static isIRange(obj: any): obj is IRange;
|
|
1028
|
+
/**
|
|
1029
|
+
* Test if the two ranges are touching in any way.
|
|
1030
|
+
*/
|
|
1031
|
+
static areIntersectingOrTouching(a: IRange, b: IRange): boolean;
|
|
1032
|
+
/**
|
|
1033
|
+
* Test if the two ranges are intersecting. If the ranges are touching it returns true.
|
|
1034
|
+
*/
|
|
1035
|
+
static areIntersecting(a: IRange, b: IRange): boolean;
|
|
1036
|
+
/**
|
|
1037
|
+
* A function that compares ranges, useful for sorting ranges
|
|
1038
|
+
* It will first compare ranges on the startPosition and then on the endPosition
|
|
1039
|
+
*/
|
|
1040
|
+
static compareRangesUsingStarts(a: IRange | null | undefined, b: IRange | null | undefined): number;
|
|
1041
|
+
/**
|
|
1042
|
+
* A function that compares ranges, useful for sorting ranges
|
|
1043
|
+
* It will first compare ranges on the endPosition and then on the startPosition
|
|
1044
|
+
*/
|
|
1045
|
+
static compareRangesUsingEnds(a: IRange, b: IRange): number;
|
|
1046
|
+
/**
|
|
1047
|
+
* Test if the range spans multiple lines.
|
|
1048
|
+
*/
|
|
1049
|
+
static spansMultipleLines(range: IRange): boolean;
|
|
1050
|
+
toJSON(): IRange;
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1053
|
+
/**
|
|
1054
|
+
* A selection in the editor.
|
|
1055
|
+
* The selection is a range that has an orientation.
|
|
1056
|
+
*/
|
|
1057
|
+
interface ISelection {
|
|
1058
|
+
/**
|
|
1059
|
+
* The line number on which the selection has started.
|
|
1060
|
+
*/
|
|
1061
|
+
readonly selectionStartLineNumber: number;
|
|
1062
|
+
/**
|
|
1063
|
+
* The column on `selectionStartLineNumber` where the selection has started.
|
|
1064
|
+
*/
|
|
1065
|
+
readonly selectionStartColumn: number;
|
|
1066
|
+
/**
|
|
1067
|
+
* The line number on which the selection has ended.
|
|
1068
|
+
*/
|
|
1069
|
+
readonly positionLineNumber: number;
|
|
1070
|
+
/**
|
|
1071
|
+
* The column on `positionLineNumber` where the selection has ended.
|
|
1072
|
+
*/
|
|
1073
|
+
readonly positionColumn: number;
|
|
1074
|
+
}
|
|
1075
|
+
/**
|
|
1076
|
+
* The direction of a selection.
|
|
1077
|
+
*/
|
|
1078
|
+
declare const enum SelectionDirection {
|
|
1079
|
+
/**
|
|
1080
|
+
* The selection starts above where it ends.
|
|
1081
|
+
*/
|
|
1082
|
+
LTR = 0,
|
|
1083
|
+
/**
|
|
1084
|
+
* The selection starts below where it ends.
|
|
1085
|
+
*/
|
|
1086
|
+
RTL = 1
|
|
1087
|
+
}
|
|
1088
|
+
/**
|
|
1089
|
+
* A selection in the editor.
|
|
1090
|
+
* The selection is a range that has an orientation.
|
|
1091
|
+
*/
|
|
1092
|
+
declare class Selection extends Range {
|
|
1093
|
+
/**
|
|
1094
|
+
* The line number on which the selection has started.
|
|
1095
|
+
*/
|
|
1096
|
+
readonly selectionStartLineNumber: number;
|
|
1097
|
+
/**
|
|
1098
|
+
* The column on `selectionStartLineNumber` where the selection has started.
|
|
1099
|
+
*/
|
|
1100
|
+
readonly selectionStartColumn: number;
|
|
1101
|
+
/**
|
|
1102
|
+
* The line number on which the selection has ended.
|
|
1103
|
+
*/
|
|
1104
|
+
readonly positionLineNumber: number;
|
|
1105
|
+
/**
|
|
1106
|
+
* The column on `positionLineNumber` where the selection has ended.
|
|
1107
|
+
*/
|
|
1108
|
+
readonly positionColumn: number;
|
|
1109
|
+
constructor(selectionStartLineNumber: number, selectionStartColumn: number, positionLineNumber: number, positionColumn: number);
|
|
1110
|
+
/**
|
|
1111
|
+
* Transform to a human-readable representation.
|
|
1112
|
+
*/
|
|
1113
|
+
toString(): string;
|
|
1114
|
+
/**
|
|
1115
|
+
* Test if equals other selection.
|
|
1116
|
+
*/
|
|
1117
|
+
equalsSelection(other: ISelection): boolean;
|
|
1118
|
+
/**
|
|
1119
|
+
* Test if the two selections are equal.
|
|
1120
|
+
*/
|
|
1121
|
+
static selectionsEqual(a: ISelection, b: ISelection): boolean;
|
|
1122
|
+
/**
|
|
1123
|
+
* Get directions (LTR or RTL).
|
|
1124
|
+
*/
|
|
1125
|
+
getDirection(): SelectionDirection;
|
|
1126
|
+
/**
|
|
1127
|
+
* Create a new selection with a different `positionLineNumber` and `positionColumn`.
|
|
1128
|
+
*/
|
|
1129
|
+
setEndPosition(endLineNumber: number, endColumn: number): Selection;
|
|
1130
|
+
/**
|
|
1131
|
+
* Get the position at `positionLineNumber` and `positionColumn`.
|
|
1132
|
+
*/
|
|
1133
|
+
getPosition(): Position;
|
|
1134
|
+
/**
|
|
1135
|
+
* Get the position at the start of the selection.
|
|
1136
|
+
*/
|
|
1137
|
+
getSelectionStart(): Position;
|
|
1138
|
+
/**
|
|
1139
|
+
* Create a new selection with a different `selectionStartLineNumber` and `selectionStartColumn`.
|
|
1140
|
+
*/
|
|
1141
|
+
setStartPosition(startLineNumber: number, startColumn: number): Selection;
|
|
1142
|
+
/**
|
|
1143
|
+
* Create a `Selection` from one or two positions
|
|
1144
|
+
*/
|
|
1145
|
+
static fromPositions(start: IPosition, end?: IPosition): Selection;
|
|
1146
|
+
/**
|
|
1147
|
+
* Creates a `Selection` from a range, given a direction.
|
|
1148
|
+
*/
|
|
1149
|
+
static fromRange(range: Range, direction: SelectionDirection): Selection;
|
|
1150
|
+
/**
|
|
1151
|
+
* Create a `Selection` from an `ISelection`.
|
|
1152
|
+
*/
|
|
1153
|
+
static liftSelection(sel: ISelection): Selection;
|
|
1154
|
+
/**
|
|
1155
|
+
* `a` equals `b`.
|
|
1156
|
+
*/
|
|
1157
|
+
static selectionsArrEqual(a: ISelection[], b: ISelection[]): boolean;
|
|
1158
|
+
/**
|
|
1159
|
+
* Test if `obj` is an `ISelection`.
|
|
1160
|
+
*/
|
|
1161
|
+
static isISelection(obj: any): obj is ISelection;
|
|
1162
|
+
/**
|
|
1163
|
+
* Create with a direction.
|
|
1164
|
+
*/
|
|
1165
|
+
static createWithDirection(startLineNumber: number, startColumn: number, endLineNumber: number, endColumn: number, direction: SelectionDirection): Selection;
|
|
1166
|
+
}
|
|
1167
|
+
|
|
1168
|
+
interface IMarkdownString {
|
|
1169
|
+
readonly value: string;
|
|
1170
|
+
readonly isTrusted?: boolean;
|
|
1171
|
+
readonly supportThemeIcons?: boolean;
|
|
1172
|
+
readonly supportHtml?: boolean;
|
|
1173
|
+
readonly baseUri?: UriComponents;
|
|
1174
|
+
uris?: {
|
|
1175
|
+
[href: string]: UriComponents;
|
|
1176
|
+
};
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1179
|
+
/**
|
|
1180
|
+
* A single edit operation, that acts as a simple replace.
|
|
1181
|
+
* i.e. Replace text at `range` with `text` in model.
|
|
1182
|
+
*/
|
|
1183
|
+
interface ISingleEditOperation {
|
|
1184
|
+
/**
|
|
1185
|
+
* The range to replace. This can be empty to emulate a simple insert.
|
|
1186
|
+
*/
|
|
1187
|
+
range: IRange;
|
|
1188
|
+
/**
|
|
1189
|
+
* The text to replace with. This can be null to emulate a simple delete.
|
|
1190
|
+
*/
|
|
1191
|
+
text: string | null;
|
|
1192
|
+
/**
|
|
1193
|
+
* This indicates that this operation has "insert" semantics.
|
|
1194
|
+
* i.e. forceMoveMarkers = true => if `range` is collapsed, all markers at the position will be moved.
|
|
1195
|
+
*/
|
|
1196
|
+
forceMoveMarkers?: boolean;
|
|
1197
|
+
}
|
|
1198
|
+
|
|
1199
|
+
/**
|
|
1200
|
+
* The Codicon library is a set of default icons that are built-in in VS Code.
|
|
1201
|
+
*
|
|
1202
|
+
* In the product (outside of base) Codicons should only be used as defaults. In order to have all icons in VS Code
|
|
1203
|
+
* themeable, component should define new, UI component specific icons using `iconRegistry.registerIcon`.
|
|
1204
|
+
* In that call a Codicon can be named as default.
|
|
1205
|
+
*/
|
|
1206
|
+
declare class Codicon implements CSSIcon {
|
|
1207
|
+
readonly id: string;
|
|
1208
|
+
readonly definition: IconDefinition;
|
|
1209
|
+
description?: string | undefined;
|
|
1210
|
+
private constructor();
|
|
1211
|
+
get classNames(): string;
|
|
1212
|
+
get classNamesArray(): string[];
|
|
1213
|
+
get cssSelector(): string;
|
|
1214
|
+
private static _allCodicons;
|
|
1215
|
+
/**
|
|
1216
|
+
* @returns Returns all default icons covered by the codicon font. Only to be used by the icon registry in platform.
|
|
1217
|
+
*/
|
|
1218
|
+
static getAll(): readonly Codicon[];
|
|
1219
|
+
static readonly add: Codicon;
|
|
1220
|
+
static readonly plus: Codicon;
|
|
1221
|
+
static readonly gistNew: Codicon;
|
|
1222
|
+
static readonly repoCreate: Codicon;
|
|
1223
|
+
static readonly lightbulb: Codicon;
|
|
1224
|
+
static readonly lightBulb: Codicon;
|
|
1225
|
+
static readonly repo: Codicon;
|
|
1226
|
+
static readonly repoDelete: Codicon;
|
|
1227
|
+
static readonly gistFork: Codicon;
|
|
1228
|
+
static readonly repoForked: Codicon;
|
|
1229
|
+
static readonly gitPullRequest: Codicon;
|
|
1230
|
+
static readonly gitPullRequestAbandoned: Codicon;
|
|
1231
|
+
static readonly recordKeys: Codicon;
|
|
1232
|
+
static readonly keyboard: Codicon;
|
|
1233
|
+
static readonly tag: Codicon;
|
|
1234
|
+
static readonly tagAdd: Codicon;
|
|
1235
|
+
static readonly tagRemove: Codicon;
|
|
1236
|
+
static readonly person: Codicon;
|
|
1237
|
+
static readonly personFollow: Codicon;
|
|
1238
|
+
static readonly personOutline: Codicon;
|
|
1239
|
+
static readonly personFilled: Codicon;
|
|
1240
|
+
static readonly gitBranch: Codicon;
|
|
1241
|
+
static readonly gitBranchCreate: Codicon;
|
|
1242
|
+
static readonly gitBranchDelete: Codicon;
|
|
1243
|
+
static readonly sourceControl: Codicon;
|
|
1244
|
+
static readonly mirror: Codicon;
|
|
1245
|
+
static readonly mirrorPublic: Codicon;
|
|
1246
|
+
static readonly star: Codicon;
|
|
1247
|
+
static readonly starAdd: Codicon;
|
|
1248
|
+
static readonly starDelete: Codicon;
|
|
1249
|
+
static readonly starEmpty: Codicon;
|
|
1250
|
+
static readonly comment: Codicon;
|
|
1251
|
+
static readonly commentAdd: Codicon;
|
|
1252
|
+
static readonly alert: Codicon;
|
|
1253
|
+
static readonly warning: Codicon;
|
|
1254
|
+
static readonly search: Codicon;
|
|
1255
|
+
static readonly searchSave: Codicon;
|
|
1256
|
+
static readonly logOut: Codicon;
|
|
1257
|
+
static readonly signOut: Codicon;
|
|
1258
|
+
static readonly logIn: Codicon;
|
|
1259
|
+
static readonly signIn: Codicon;
|
|
1260
|
+
static readonly eye: Codicon;
|
|
1261
|
+
static readonly eyeUnwatch: Codicon;
|
|
1262
|
+
static readonly eyeWatch: Codicon;
|
|
1263
|
+
static readonly circleFilled: Codicon;
|
|
1264
|
+
static readonly primitiveDot: Codicon;
|
|
1265
|
+
static readonly closeDirty: Codicon;
|
|
1266
|
+
static readonly debugBreakpoint: Codicon;
|
|
1267
|
+
static readonly debugBreakpointDisabled: Codicon;
|
|
1268
|
+
static readonly debugHint: Codicon;
|
|
1269
|
+
static readonly primitiveSquare: Codicon;
|
|
1270
|
+
static readonly edit: Codicon;
|
|
1271
|
+
static readonly pencil: Codicon;
|
|
1272
|
+
static readonly info: Codicon;
|
|
1273
|
+
static readonly issueOpened: Codicon;
|
|
1274
|
+
static readonly gistPrivate: Codicon;
|
|
1275
|
+
static readonly gitForkPrivate: Codicon;
|
|
1276
|
+
static readonly lock: Codicon;
|
|
1277
|
+
static readonly mirrorPrivate: Codicon;
|
|
1278
|
+
static readonly close: Codicon;
|
|
1279
|
+
static readonly removeClose: Codicon;
|
|
1280
|
+
static readonly x: Codicon;
|
|
1281
|
+
static readonly repoSync: Codicon;
|
|
1282
|
+
static readonly sync: Codicon;
|
|
1283
|
+
static readonly clone: Codicon;
|
|
1284
|
+
static readonly desktopDownload: Codicon;
|
|
1285
|
+
static readonly beaker: Codicon;
|
|
1286
|
+
static readonly microscope: Codicon;
|
|
1287
|
+
static readonly vm: Codicon;
|
|
1288
|
+
static readonly deviceDesktop: Codicon;
|
|
1289
|
+
static readonly file: Codicon;
|
|
1290
|
+
static readonly fileText: Codicon;
|
|
1291
|
+
static readonly more: Codicon;
|
|
1292
|
+
static readonly ellipsis: Codicon;
|
|
1293
|
+
static readonly kebabHorizontal: Codicon;
|
|
1294
|
+
static readonly mailReply: Codicon;
|
|
1295
|
+
static readonly reply: Codicon;
|
|
1296
|
+
static readonly organization: Codicon;
|
|
1297
|
+
static readonly organizationFilled: Codicon;
|
|
1298
|
+
static readonly organizationOutline: Codicon;
|
|
1299
|
+
static readonly newFile: Codicon;
|
|
1300
|
+
static readonly fileAdd: Codicon;
|
|
1301
|
+
static readonly newFolder: Codicon;
|
|
1302
|
+
static readonly fileDirectoryCreate: Codicon;
|
|
1303
|
+
static readonly trash: Codicon;
|
|
1304
|
+
static readonly trashcan: Codicon;
|
|
1305
|
+
static readonly history: Codicon;
|
|
1306
|
+
static readonly clock: Codicon;
|
|
1307
|
+
static readonly folder: Codicon;
|
|
1308
|
+
static readonly fileDirectory: Codicon;
|
|
1309
|
+
static readonly symbolFolder: Codicon;
|
|
1310
|
+
static readonly logoGithub: Codicon;
|
|
1311
|
+
static readonly markGithub: Codicon;
|
|
1312
|
+
static readonly github: Codicon;
|
|
1313
|
+
static readonly terminal: Codicon;
|
|
1314
|
+
static readonly console: Codicon;
|
|
1315
|
+
static readonly repl: Codicon;
|
|
1316
|
+
static readonly zap: Codicon;
|
|
1317
|
+
static readonly symbolEvent: Codicon;
|
|
1318
|
+
static readonly error: Codicon;
|
|
1319
|
+
static readonly stop: Codicon;
|
|
1320
|
+
static readonly variable: Codicon;
|
|
1321
|
+
static readonly symbolVariable: Codicon;
|
|
1322
|
+
static readonly array: Codicon;
|
|
1323
|
+
static readonly symbolArray: Codicon;
|
|
1324
|
+
static readonly symbolModule: Codicon;
|
|
1325
|
+
static readonly symbolPackage: Codicon;
|
|
1326
|
+
static readonly symbolNamespace: Codicon;
|
|
1327
|
+
static readonly symbolObject: Codicon;
|
|
1328
|
+
static readonly symbolMethod: Codicon;
|
|
1329
|
+
static readonly symbolFunction: Codicon;
|
|
1330
|
+
static readonly symbolConstructor: Codicon;
|
|
1331
|
+
static readonly symbolBoolean: Codicon;
|
|
1332
|
+
static readonly symbolNull: Codicon;
|
|
1333
|
+
static readonly symbolNumeric: Codicon;
|
|
1334
|
+
static readonly symbolNumber: Codicon;
|
|
1335
|
+
static readonly symbolStructure: Codicon;
|
|
1336
|
+
static readonly symbolStruct: Codicon;
|
|
1337
|
+
static readonly symbolParameter: Codicon;
|
|
1338
|
+
static readonly symbolTypeParameter: Codicon;
|
|
1339
|
+
static readonly symbolKey: Codicon;
|
|
1340
|
+
static readonly symbolText: Codicon;
|
|
1341
|
+
static readonly symbolReference: Codicon;
|
|
1342
|
+
static readonly goToFile: Codicon;
|
|
1343
|
+
static readonly symbolEnum: Codicon;
|
|
1344
|
+
static readonly symbolValue: Codicon;
|
|
1345
|
+
static readonly symbolRuler: Codicon;
|
|
1346
|
+
static readonly symbolUnit: Codicon;
|
|
1347
|
+
static readonly activateBreakpoints: Codicon;
|
|
1348
|
+
static readonly archive: Codicon;
|
|
1349
|
+
static readonly arrowBoth: Codicon;
|
|
1350
|
+
static readonly arrowDown: Codicon;
|
|
1351
|
+
static readonly arrowLeft: Codicon;
|
|
1352
|
+
static readonly arrowRight: Codicon;
|
|
1353
|
+
static readonly arrowSmallDown: Codicon;
|
|
1354
|
+
static readonly arrowSmallLeft: Codicon;
|
|
1355
|
+
static readonly arrowSmallRight: Codicon;
|
|
1356
|
+
static readonly arrowSmallUp: Codicon;
|
|
1357
|
+
static readonly arrowUp: Codicon;
|
|
1358
|
+
static readonly bell: Codicon;
|
|
1359
|
+
static readonly bold: Codicon;
|
|
1360
|
+
static readonly book: Codicon;
|
|
1361
|
+
static readonly bookmark: Codicon;
|
|
1362
|
+
static readonly debugBreakpointConditionalUnverified: Codicon;
|
|
1363
|
+
static readonly debugBreakpointConditional: Codicon;
|
|
1364
|
+
static readonly debugBreakpointConditionalDisabled: Codicon;
|
|
1365
|
+
static readonly debugBreakpointDataUnverified: Codicon;
|
|
1366
|
+
static readonly debugBreakpointData: Codicon;
|
|
1367
|
+
static readonly debugBreakpointDataDisabled: Codicon;
|
|
1368
|
+
static readonly debugBreakpointLogUnverified: Codicon;
|
|
1369
|
+
static readonly debugBreakpointLog: Codicon;
|
|
1370
|
+
static readonly debugBreakpointLogDisabled: Codicon;
|
|
1371
|
+
static readonly briefcase: Codicon;
|
|
1372
|
+
static readonly broadcast: Codicon;
|
|
1373
|
+
static readonly browser: Codicon;
|
|
1374
|
+
static readonly bug: Codicon;
|
|
1375
|
+
static readonly calendar: Codicon;
|
|
1376
|
+
static readonly caseSensitive: Codicon;
|
|
1377
|
+
static readonly check: Codicon;
|
|
1378
|
+
static readonly checklist: Codicon;
|
|
1379
|
+
static readonly chevronDown: Codicon;
|
|
1380
|
+
static readonly dropDownButton: Codicon;
|
|
1381
|
+
static readonly chevronLeft: Codicon;
|
|
1382
|
+
static readonly chevronRight: Codicon;
|
|
1383
|
+
static readonly chevronUp: Codicon;
|
|
1384
|
+
static readonly chromeClose: Codicon;
|
|
1385
|
+
static readonly chromeMaximize: Codicon;
|
|
1386
|
+
static readonly chromeMinimize: Codicon;
|
|
1387
|
+
static readonly chromeRestore: Codicon;
|
|
1388
|
+
static readonly circleOutline: Codicon;
|
|
1389
|
+
static readonly debugBreakpointUnverified: Codicon;
|
|
1390
|
+
static readonly circleSlash: Codicon;
|
|
1391
|
+
static readonly circuitBoard: Codicon;
|
|
1392
|
+
static readonly clearAll: Codicon;
|
|
1393
|
+
static readonly clippy: Codicon;
|
|
1394
|
+
static readonly closeAll: Codicon;
|
|
1395
|
+
static readonly cloudDownload: Codicon;
|
|
1396
|
+
static readonly cloudUpload: Codicon;
|
|
1397
|
+
static readonly code: Codicon;
|
|
1398
|
+
static readonly collapseAll: Codicon;
|
|
1399
|
+
static readonly colorMode: Codicon;
|
|
1400
|
+
static readonly commentDiscussion: Codicon;
|
|
1401
|
+
static readonly compareChanges: Codicon;
|
|
1402
|
+
static readonly creditCard: Codicon;
|
|
1403
|
+
static readonly dash: Codicon;
|
|
1404
|
+
static readonly dashboard: Codicon;
|
|
1405
|
+
static readonly database: Codicon;
|
|
1406
|
+
static readonly debugContinue: Codicon;
|
|
1407
|
+
static readonly debugDisconnect: Codicon;
|
|
1408
|
+
static readonly debugPause: Codicon;
|
|
1409
|
+
static readonly debugRestart: Codicon;
|
|
1410
|
+
static readonly debugStart: Codicon;
|
|
1411
|
+
static readonly debugStepInto: Codicon;
|
|
1412
|
+
static readonly debugStepOut: Codicon;
|
|
1413
|
+
static readonly debugStepOver: Codicon;
|
|
1414
|
+
static readonly debugStop: Codicon;
|
|
1415
|
+
static readonly debug: Codicon;
|
|
1416
|
+
static readonly deviceCameraVideo: Codicon;
|
|
1417
|
+
static readonly deviceCamera: Codicon;
|
|
1418
|
+
static readonly deviceMobile: Codicon;
|
|
1419
|
+
static readonly diffAdded: Codicon;
|
|
1420
|
+
static readonly diffIgnored: Codicon;
|
|
1421
|
+
static readonly diffModified: Codicon;
|
|
1422
|
+
static readonly diffRemoved: Codicon;
|
|
1423
|
+
static readonly diffRenamed: Codicon;
|
|
1424
|
+
static readonly diff: Codicon;
|
|
1425
|
+
static readonly discard: Codicon;
|
|
1426
|
+
static readonly editorLayout: Codicon;
|
|
1427
|
+
static readonly emptyWindow: Codicon;
|
|
1428
|
+
static readonly exclude: Codicon;
|
|
1429
|
+
static readonly extensions: Codicon;
|
|
1430
|
+
static readonly eyeClosed: Codicon;
|
|
1431
|
+
static readonly fileBinary: Codicon;
|
|
1432
|
+
static readonly fileCode: Codicon;
|
|
1433
|
+
static readonly fileMedia: Codicon;
|
|
1434
|
+
static readonly filePdf: Codicon;
|
|
1435
|
+
static readonly fileSubmodule: Codicon;
|
|
1436
|
+
static readonly fileSymlinkDirectory: Codicon;
|
|
1437
|
+
static readonly fileSymlinkFile: Codicon;
|
|
1438
|
+
static readonly fileZip: Codicon;
|
|
1439
|
+
static readonly files: Codicon;
|
|
1440
|
+
static readonly filter: Codicon;
|
|
1441
|
+
static readonly flame: Codicon;
|
|
1442
|
+
static readonly foldDown: Codicon;
|
|
1443
|
+
static readonly foldUp: Codicon;
|
|
1444
|
+
static readonly fold: Codicon;
|
|
1445
|
+
static readonly folderActive: Codicon;
|
|
1446
|
+
static readonly folderOpened: Codicon;
|
|
1447
|
+
static readonly gear: Codicon;
|
|
1448
|
+
static readonly gift: Codicon;
|
|
1449
|
+
static readonly gistSecret: Codicon;
|
|
1450
|
+
static readonly gist: Codicon;
|
|
1451
|
+
static readonly gitCommit: Codicon;
|
|
1452
|
+
static readonly gitCompare: Codicon;
|
|
1453
|
+
static readonly gitMerge: Codicon;
|
|
1454
|
+
static readonly githubAction: Codicon;
|
|
1455
|
+
static readonly githubAlt: Codicon;
|
|
1456
|
+
static readonly globe: Codicon;
|
|
1457
|
+
static readonly grabber: Codicon;
|
|
1458
|
+
static readonly graph: Codicon;
|
|
1459
|
+
static readonly gripper: Codicon;
|
|
1460
|
+
static readonly heart: Codicon;
|
|
1461
|
+
static readonly home: Codicon;
|
|
1462
|
+
static readonly horizontalRule: Codicon;
|
|
1463
|
+
static readonly hubot: Codicon;
|
|
1464
|
+
static readonly inbox: Codicon;
|
|
1465
|
+
static readonly issueClosed: Codicon;
|
|
1466
|
+
static readonly issueReopened: Codicon;
|
|
1467
|
+
static readonly issues: Codicon;
|
|
1468
|
+
static readonly italic: Codicon;
|
|
1469
|
+
static readonly jersey: Codicon;
|
|
1470
|
+
static readonly json: Codicon;
|
|
1471
|
+
static readonly kebabVertical: Codicon;
|
|
1472
|
+
static readonly key: Codicon;
|
|
1473
|
+
static readonly law: Codicon;
|
|
1474
|
+
static readonly lightbulbAutofix: Codicon;
|
|
1475
|
+
static readonly linkExternal: Codicon;
|
|
1476
|
+
static readonly link: Codicon;
|
|
1477
|
+
static readonly listOrdered: Codicon;
|
|
1478
|
+
static readonly listUnordered: Codicon;
|
|
1479
|
+
static readonly liveShare: Codicon;
|
|
1480
|
+
static readonly loading: Codicon;
|
|
1481
|
+
static readonly location: Codicon;
|
|
1482
|
+
static readonly mailRead: Codicon;
|
|
1483
|
+
static readonly mail: Codicon;
|
|
1484
|
+
static readonly markdown: Codicon;
|
|
1485
|
+
static readonly megaphone: Codicon;
|
|
1486
|
+
static readonly mention: Codicon;
|
|
1487
|
+
static readonly milestone: Codicon;
|
|
1488
|
+
static readonly mortarBoard: Codicon;
|
|
1489
|
+
static readonly move: Codicon;
|
|
1490
|
+
static readonly multipleWindows: Codicon;
|
|
1491
|
+
static readonly mute: Codicon;
|
|
1492
|
+
static readonly noNewline: Codicon;
|
|
1493
|
+
static readonly note: Codicon;
|
|
1494
|
+
static readonly octoface: Codicon;
|
|
1495
|
+
static readonly openPreview: Codicon;
|
|
1496
|
+
static readonly package_: Codicon;
|
|
1497
|
+
static readonly paintcan: Codicon;
|
|
1498
|
+
static readonly pin: Codicon;
|
|
1499
|
+
static readonly play: Codicon;
|
|
1500
|
+
static readonly run: Codicon;
|
|
1501
|
+
static readonly plug: Codicon;
|
|
1502
|
+
static readonly preserveCase: Codicon;
|
|
1503
|
+
static readonly preview: Codicon;
|
|
1504
|
+
static readonly project: Codicon;
|
|
1505
|
+
static readonly pulse: Codicon;
|
|
1506
|
+
static readonly question: Codicon;
|
|
1507
|
+
static readonly quote: Codicon;
|
|
1508
|
+
static readonly radioTower: Codicon;
|
|
1509
|
+
static readonly reactions: Codicon;
|
|
1510
|
+
static readonly references: Codicon;
|
|
1511
|
+
static readonly refresh: Codicon;
|
|
1512
|
+
static readonly regex: Codicon;
|
|
1513
|
+
static readonly remoteExplorer: Codicon;
|
|
1514
|
+
static readonly remote: Codicon;
|
|
1515
|
+
static readonly remove: Codicon;
|
|
1516
|
+
static readonly replaceAll: Codicon;
|
|
1517
|
+
static readonly replace: Codicon;
|
|
1518
|
+
static readonly repoClone: Codicon;
|
|
1519
|
+
static readonly repoForcePush: Codicon;
|
|
1520
|
+
static readonly repoPull: Codicon;
|
|
1521
|
+
static readonly repoPush: Codicon;
|
|
1522
|
+
static readonly report: Codicon;
|
|
1523
|
+
static readonly requestChanges: Codicon;
|
|
1524
|
+
static readonly rocket: Codicon;
|
|
1525
|
+
static readonly rootFolderOpened: Codicon;
|
|
1526
|
+
static readonly rootFolder: Codicon;
|
|
1527
|
+
static readonly rss: Codicon;
|
|
1528
|
+
static readonly ruby: Codicon;
|
|
1529
|
+
static readonly saveAll: Codicon;
|
|
1530
|
+
static readonly saveAs: Codicon;
|
|
1531
|
+
static readonly save: Codicon;
|
|
1532
|
+
static readonly screenFull: Codicon;
|
|
1533
|
+
static readonly screenNormal: Codicon;
|
|
1534
|
+
static readonly searchStop: Codicon;
|
|
1535
|
+
static readonly server: Codicon;
|
|
1536
|
+
static readonly settingsGear: Codicon;
|
|
1537
|
+
static readonly settings: Codicon;
|
|
1538
|
+
static readonly shield: Codicon;
|
|
1539
|
+
static readonly smiley: Codicon;
|
|
1540
|
+
static readonly sortPrecedence: Codicon;
|
|
1541
|
+
static readonly splitHorizontal: Codicon;
|
|
1542
|
+
static readonly splitVertical: Codicon;
|
|
1543
|
+
static readonly squirrel: Codicon;
|
|
1544
|
+
static readonly starFull: Codicon;
|
|
1545
|
+
static readonly starHalf: Codicon;
|
|
1546
|
+
static readonly symbolClass: Codicon;
|
|
1547
|
+
static readonly symbolColor: Codicon;
|
|
1548
|
+
static readonly symbolCustomColor: Codicon;
|
|
1549
|
+
static readonly symbolConstant: Codicon;
|
|
1550
|
+
static readonly symbolEnumMember: Codicon;
|
|
1551
|
+
static readonly symbolField: Codicon;
|
|
1552
|
+
static readonly symbolFile: Codicon;
|
|
1553
|
+
static readonly symbolInterface: Codicon;
|
|
1554
|
+
static readonly symbolKeyword: Codicon;
|
|
1555
|
+
static readonly symbolMisc: Codicon;
|
|
1556
|
+
static readonly symbolOperator: Codicon;
|
|
1557
|
+
static readonly symbolProperty: Codicon;
|
|
1558
|
+
static readonly wrench: Codicon;
|
|
1559
|
+
static readonly wrenchSubaction: Codicon;
|
|
1560
|
+
static readonly symbolSnippet: Codicon;
|
|
1561
|
+
static readonly tasklist: Codicon;
|
|
1562
|
+
static readonly telescope: Codicon;
|
|
1563
|
+
static readonly textSize: Codicon;
|
|
1564
|
+
static readonly threeBars: Codicon;
|
|
1565
|
+
static readonly thumbsdown: Codicon;
|
|
1566
|
+
static readonly thumbsup: Codicon;
|
|
1567
|
+
static readonly tools: Codicon;
|
|
1568
|
+
static readonly triangleDown: Codicon;
|
|
1569
|
+
static readonly triangleLeft: Codicon;
|
|
1570
|
+
static readonly triangleRight: Codicon;
|
|
1571
|
+
static readonly triangleUp: Codicon;
|
|
1572
|
+
static readonly twitter: Codicon;
|
|
1573
|
+
static readonly unfold: Codicon;
|
|
1574
|
+
static readonly unlock: Codicon;
|
|
1575
|
+
static readonly unmute: Codicon;
|
|
1576
|
+
static readonly unverified: Codicon;
|
|
1577
|
+
static readonly verified: Codicon;
|
|
1578
|
+
static readonly versions: Codicon;
|
|
1579
|
+
static readonly vmActive: Codicon;
|
|
1580
|
+
static readonly vmOutline: Codicon;
|
|
1581
|
+
static readonly vmRunning: Codicon;
|
|
1582
|
+
static readonly watch: Codicon;
|
|
1583
|
+
static readonly whitespace: Codicon;
|
|
1584
|
+
static readonly wholeWord: Codicon;
|
|
1585
|
+
static readonly window: Codicon;
|
|
1586
|
+
static readonly wordWrap: Codicon;
|
|
1587
|
+
static readonly zoomIn: Codicon;
|
|
1588
|
+
static readonly zoomOut: Codicon;
|
|
1589
|
+
static readonly listFilter: Codicon;
|
|
1590
|
+
static readonly listFlat: Codicon;
|
|
1591
|
+
static readonly listSelection: Codicon;
|
|
1592
|
+
static readonly selection: Codicon;
|
|
1593
|
+
static readonly listTree: Codicon;
|
|
1594
|
+
static readonly debugBreakpointFunctionUnverified: Codicon;
|
|
1595
|
+
static readonly debugBreakpointFunction: Codicon;
|
|
1596
|
+
static readonly debugBreakpointFunctionDisabled: Codicon;
|
|
1597
|
+
static readonly debugStackframeActive: Codicon;
|
|
1598
|
+
static readonly circleSmallFilled: Codicon;
|
|
1599
|
+
static readonly debugStackframeDot: Codicon;
|
|
1600
|
+
static readonly debugStackframe: Codicon;
|
|
1601
|
+
static readonly debugStackframeFocused: Codicon;
|
|
1602
|
+
static readonly debugBreakpointUnsupported: Codicon;
|
|
1603
|
+
static readonly symbolString: Codicon;
|
|
1604
|
+
static readonly debugReverseContinue: Codicon;
|
|
1605
|
+
static readonly debugStepBack: Codicon;
|
|
1606
|
+
static readonly debugRestartFrame: Codicon;
|
|
1607
|
+
static readonly callIncoming: Codicon;
|
|
1608
|
+
static readonly callOutgoing: Codicon;
|
|
1609
|
+
static readonly menu: Codicon;
|
|
1610
|
+
static readonly expandAll: Codicon;
|
|
1611
|
+
static readonly feedback: Codicon;
|
|
1612
|
+
static readonly groupByRefType: Codicon;
|
|
1613
|
+
static readonly ungroupByRefType: Codicon;
|
|
1614
|
+
static readonly account: Codicon;
|
|
1615
|
+
static readonly bellDot: Codicon;
|
|
1616
|
+
static readonly debugConsole: Codicon;
|
|
1617
|
+
static readonly library: Codicon;
|
|
1618
|
+
static readonly output: Codicon;
|
|
1619
|
+
static readonly runAll: Codicon;
|
|
1620
|
+
static readonly syncIgnored: Codicon;
|
|
1621
|
+
static readonly pinned: Codicon;
|
|
1622
|
+
static readonly githubInverted: Codicon;
|
|
1623
|
+
static readonly debugAlt: Codicon;
|
|
1624
|
+
static readonly serverProcess: Codicon;
|
|
1625
|
+
static readonly serverEnvironment: Codicon;
|
|
1626
|
+
static readonly pass: Codicon;
|
|
1627
|
+
static readonly stopCircle: Codicon;
|
|
1628
|
+
static readonly playCircle: Codicon;
|
|
1629
|
+
static readonly record: Codicon;
|
|
1630
|
+
static readonly debugAltSmall: Codicon;
|
|
1631
|
+
static readonly vmConnect: Codicon;
|
|
1632
|
+
static readonly cloud: Codicon;
|
|
1633
|
+
static readonly merge: Codicon;
|
|
1634
|
+
static readonly exportIcon: Codicon;
|
|
1635
|
+
static readonly graphLeft: Codicon;
|
|
1636
|
+
static readonly magnet: Codicon;
|
|
1637
|
+
static readonly notebook: Codicon;
|
|
1638
|
+
static readonly redo: Codicon;
|
|
1639
|
+
static readonly checkAll: Codicon;
|
|
1640
|
+
static readonly pinnedDirty: Codicon;
|
|
1641
|
+
static readonly passFilled: Codicon;
|
|
1642
|
+
static readonly circleLargeFilled: Codicon;
|
|
1643
|
+
static readonly circleLargeOutline: Codicon;
|
|
1644
|
+
static readonly combine: Codicon;
|
|
1645
|
+
static readonly gather: Codicon;
|
|
1646
|
+
static readonly table: Codicon;
|
|
1647
|
+
static readonly variableGroup: Codicon;
|
|
1648
|
+
static readonly typeHierarchy: Codicon;
|
|
1649
|
+
static readonly typeHierarchySub: Codicon;
|
|
1650
|
+
static readonly typeHierarchySuper: Codicon;
|
|
1651
|
+
static readonly gitPullRequestCreate: Codicon;
|
|
1652
|
+
static readonly runAbove: Codicon;
|
|
1653
|
+
static readonly runBelow: Codicon;
|
|
1654
|
+
static readonly notebookTemplate: Codicon;
|
|
1655
|
+
static readonly debugRerun: Codicon;
|
|
1656
|
+
static readonly workspaceTrusted: Codicon;
|
|
1657
|
+
static readonly workspaceUntrusted: Codicon;
|
|
1658
|
+
static readonly workspaceUnspecified: Codicon;
|
|
1659
|
+
static readonly terminalCmd: Codicon;
|
|
1660
|
+
static readonly terminalDebian: Codicon;
|
|
1661
|
+
static readonly terminalLinux: Codicon;
|
|
1662
|
+
static readonly terminalPowershell: Codicon;
|
|
1663
|
+
static readonly terminalTmux: Codicon;
|
|
1664
|
+
static readonly terminalUbuntu: Codicon;
|
|
1665
|
+
static readonly terminalBash: Codicon;
|
|
1666
|
+
static readonly arrowSwap: Codicon;
|
|
1667
|
+
static readonly copy: Codicon;
|
|
1668
|
+
static readonly personAdd: Codicon;
|
|
1669
|
+
static readonly filterFilled: Codicon;
|
|
1670
|
+
static readonly wand: Codicon;
|
|
1671
|
+
static readonly debugLineByLine: Codicon;
|
|
1672
|
+
static readonly inspect: Codicon;
|
|
1673
|
+
static readonly layers: Codicon;
|
|
1674
|
+
static readonly layersDot: Codicon;
|
|
1675
|
+
static readonly layersActive: Codicon;
|
|
1676
|
+
static readonly compass: Codicon;
|
|
1677
|
+
static readonly compassDot: Codicon;
|
|
1678
|
+
static readonly compassActive: Codicon;
|
|
1679
|
+
static readonly azure: Codicon;
|
|
1680
|
+
static readonly issueDraft: Codicon;
|
|
1681
|
+
static readonly gitPullRequestClosed: Codicon;
|
|
1682
|
+
static readonly gitPullRequestDraft: Codicon;
|
|
1683
|
+
static readonly debugAll: Codicon;
|
|
1684
|
+
static readonly debugCoverage: Codicon;
|
|
1685
|
+
static readonly runErrors: Codicon;
|
|
1686
|
+
static readonly folderLibrary: Codicon;
|
|
1687
|
+
static readonly debugContinueSmall: Codicon;
|
|
1688
|
+
static readonly beakerStop: Codicon;
|
|
1689
|
+
static readonly graphLine: Codicon;
|
|
1690
|
+
static readonly graphScatter: Codicon;
|
|
1691
|
+
static readonly pieChart: Codicon;
|
|
1692
|
+
static readonly bracket: Codicon;
|
|
1693
|
+
static readonly bracketDot: Codicon;
|
|
1694
|
+
static readonly bracketError: Codicon;
|
|
1695
|
+
static readonly lockSmall: Codicon;
|
|
1696
|
+
static readonly azureDevops: Codicon;
|
|
1697
|
+
static readonly verifiedFilled: Codicon;
|
|
1698
|
+
static readonly newLine: Codicon;
|
|
1699
|
+
static readonly layout: Codicon;
|
|
1700
|
+
static readonly layoutActivitybarLeft: Codicon;
|
|
1701
|
+
static readonly layoutActivitybarRight: Codicon;
|
|
1702
|
+
static readonly layoutPanelLeft: Codicon;
|
|
1703
|
+
static readonly layoutPanelCenter: Codicon;
|
|
1704
|
+
static readonly layoutPanelJustify: Codicon;
|
|
1705
|
+
static readonly layoutPanelRight: Codicon;
|
|
1706
|
+
static readonly layoutPanel: Codicon;
|
|
1707
|
+
static readonly layoutSidebarLeft: Codicon;
|
|
1708
|
+
static readonly layoutSidebarRight: Codicon;
|
|
1709
|
+
static readonly layoutStatusbar: Codicon;
|
|
1710
|
+
static readonly layoutMenubar: Codicon;
|
|
1711
|
+
static readonly layoutCentered: Codicon;
|
|
1712
|
+
static readonly layoutSidebarRightOff: Codicon;
|
|
1713
|
+
static readonly layoutPanelOff: Codicon;
|
|
1714
|
+
static readonly layoutSidebarLeftOff: Codicon;
|
|
1715
|
+
static readonly target: Codicon;
|
|
1716
|
+
static readonly indent: Codicon;
|
|
1717
|
+
static readonly recordSmall: Codicon;
|
|
1718
|
+
static readonly errorSmall: Codicon;
|
|
1719
|
+
static readonly arrowCircleDown: Codicon;
|
|
1720
|
+
static readonly arrowCircleLeft: Codicon;
|
|
1721
|
+
static readonly arrowCircleRight: Codicon;
|
|
1722
|
+
static readonly arrowCircleUp: Codicon;
|
|
1723
|
+
static readonly heartFilled: Codicon;
|
|
1724
|
+
static readonly map: Codicon;
|
|
1725
|
+
static readonly mapFilled: Codicon;
|
|
1726
|
+
static readonly circleSmall: Codicon;
|
|
1727
|
+
static readonly bellSlash: Codicon;
|
|
1728
|
+
static readonly bellSlashDot: Codicon;
|
|
1729
|
+
static readonly commentUnresolved: Codicon;
|
|
1730
|
+
static readonly gitPullRequestGoToChanges: Codicon;
|
|
1731
|
+
static readonly gitPullRequestNewChanges: Codicon;
|
|
1732
|
+
static readonly dialogError: Codicon;
|
|
1733
|
+
static readonly dialogWarning: Codicon;
|
|
1734
|
+
static readonly dialogInfo: Codicon;
|
|
1735
|
+
static readonly dialogClose: Codicon;
|
|
1736
|
+
static readonly treeItemExpanded: Codicon;
|
|
1737
|
+
static readonly treeFilterOnTypeOn: Codicon;
|
|
1738
|
+
static readonly treeFilterOnTypeOff: Codicon;
|
|
1739
|
+
static readonly treeFilterClear: Codicon;
|
|
1740
|
+
static readonly treeItemLoading: Codicon;
|
|
1741
|
+
static readonly menuSelection: Codicon;
|
|
1742
|
+
static readonly menuSubmenu: Codicon;
|
|
1743
|
+
static readonly menuBarMore: Codicon;
|
|
1744
|
+
static readonly scrollbarButtonLeft: Codicon;
|
|
1745
|
+
static readonly scrollbarButtonRight: Codicon;
|
|
1746
|
+
static readonly scrollbarButtonUp: Codicon;
|
|
1747
|
+
static readonly scrollbarButtonDown: Codicon;
|
|
1748
|
+
static readonly toolBarMore: Codicon;
|
|
1749
|
+
static readonly quickInputBack: Codicon;
|
|
1750
|
+
}
|
|
1751
|
+
interface CSSIcon {
|
|
1752
|
+
readonly id: string;
|
|
1753
|
+
}
|
|
1754
|
+
declare namespace CSSIcon {
|
|
1755
|
+
const iconNameSegment = "[A-Za-z0-9]+";
|
|
1756
|
+
const iconNameExpression = "[A-Za-z0-9-]+";
|
|
1757
|
+
const iconModifierExpression = "~[A-Za-z]+";
|
|
1758
|
+
const iconNameCharacter = "[A-Za-z0-9~-]";
|
|
1759
|
+
function asClassNameArray(icon: CSSIcon): string[];
|
|
1760
|
+
function asClassName(icon: CSSIcon): string;
|
|
1761
|
+
function asCSSSelector(icon: CSSIcon): string;
|
|
1762
|
+
}
|
|
1763
|
+
interface IconDefinition {
|
|
1764
|
+
fontCharacter: string;
|
|
1765
|
+
}
|
|
1766
|
+
|
|
1767
|
+
declare class RGBA {
|
|
1768
|
+
_rgbaBrand: void;
|
|
1769
|
+
/**
|
|
1770
|
+
* Red: integer in [0-255]
|
|
1771
|
+
*/
|
|
1772
|
+
readonly r: number;
|
|
1773
|
+
/**
|
|
1774
|
+
* Green: integer in [0-255]
|
|
1775
|
+
*/
|
|
1776
|
+
readonly g: number;
|
|
1777
|
+
/**
|
|
1778
|
+
* Blue: integer in [0-255]
|
|
1779
|
+
*/
|
|
1780
|
+
readonly b: number;
|
|
1781
|
+
/**
|
|
1782
|
+
* Alpha: float in [0-1]
|
|
1783
|
+
*/
|
|
1784
|
+
readonly a: number;
|
|
1785
|
+
constructor(r: number, g: number, b: number, a?: number);
|
|
1786
|
+
static equals(a: RGBA, b: RGBA): boolean;
|
|
1787
|
+
}
|
|
1788
|
+
declare class HSLA {
|
|
1789
|
+
_hslaBrand: void;
|
|
1790
|
+
/**
|
|
1791
|
+
* Hue: integer in [0, 360]
|
|
1792
|
+
*/
|
|
1793
|
+
readonly h: number;
|
|
1794
|
+
/**
|
|
1795
|
+
* Saturation: float in [0, 1]
|
|
1796
|
+
*/
|
|
1797
|
+
readonly s: number;
|
|
1798
|
+
/**
|
|
1799
|
+
* Luminosity: float in [0, 1]
|
|
1800
|
+
*/
|
|
1801
|
+
readonly l: number;
|
|
1802
|
+
/**
|
|
1803
|
+
* Alpha: float in [0, 1]
|
|
1804
|
+
*/
|
|
1805
|
+
readonly a: number;
|
|
1806
|
+
constructor(h: number, s: number, l: number, a: number);
|
|
1807
|
+
static equals(a: HSLA, b: HSLA): boolean;
|
|
1808
|
+
/**
|
|
1809
|
+
* Converts an RGB color value to HSL. Conversion formula
|
|
1810
|
+
* adapted from http://en.wikipedia.org/wiki/HSL_color_space.
|
|
1811
|
+
* Assumes r, g, and b are contained in the set [0, 255] and
|
|
1812
|
+
* returns h in the set [0, 360], s, and l in the set [0, 1].
|
|
1813
|
+
*/
|
|
1814
|
+
static fromRGBA(rgba: RGBA): HSLA;
|
|
1815
|
+
private static _hue2rgb;
|
|
1816
|
+
/**
|
|
1817
|
+
* Converts an HSL color value to RGB. Conversion formula
|
|
1818
|
+
* adapted from http://en.wikipedia.org/wiki/HSL_color_space.
|
|
1819
|
+
* Assumes h in the set [0, 360] s, and l are contained in the set [0, 1] and
|
|
1820
|
+
* returns r, g, and b in the set [0, 255].
|
|
1821
|
+
*/
|
|
1822
|
+
static toRGBA(hsla: HSLA): RGBA;
|
|
1823
|
+
}
|
|
1824
|
+
declare class HSVA {
|
|
1825
|
+
_hsvaBrand: void;
|
|
1826
|
+
/**
|
|
1827
|
+
* Hue: integer in [0, 360]
|
|
1828
|
+
*/
|
|
1829
|
+
readonly h: number;
|
|
1830
|
+
/**
|
|
1831
|
+
* Saturation: float in [0, 1]
|
|
1832
|
+
*/
|
|
1833
|
+
readonly s: number;
|
|
1834
|
+
/**
|
|
1835
|
+
* Value: float in [0, 1]
|
|
1836
|
+
*/
|
|
1837
|
+
readonly v: number;
|
|
1838
|
+
/**
|
|
1839
|
+
* Alpha: float in [0, 1]
|
|
1840
|
+
*/
|
|
1841
|
+
readonly a: number;
|
|
1842
|
+
constructor(h: number, s: number, v: number, a: number);
|
|
1843
|
+
static equals(a: HSVA, b: HSVA): boolean;
|
|
1844
|
+
static fromRGBA(rgba: RGBA): HSVA;
|
|
1845
|
+
static toRGBA(hsva: HSVA): RGBA;
|
|
1846
|
+
}
|
|
1847
|
+
declare class Color {
|
|
1848
|
+
static fromHex(hex: string): Color;
|
|
1849
|
+
readonly rgba: RGBA;
|
|
1850
|
+
private _hsla?;
|
|
1851
|
+
get hsla(): HSLA;
|
|
1852
|
+
private _hsva?;
|
|
1853
|
+
get hsva(): HSVA;
|
|
1854
|
+
constructor(arg: RGBA | HSLA | HSVA);
|
|
1855
|
+
equals(other: Color | null): boolean;
|
|
1856
|
+
/**
|
|
1857
|
+
* http://www.w3.org/TR/WCAG20/#relativeluminancedef
|
|
1858
|
+
* Returns the number in the set [0, 1]. O => Darkest Black. 1 => Lightest white.
|
|
1859
|
+
*/
|
|
1860
|
+
getRelativeLuminance(): number;
|
|
1861
|
+
private static _relativeLuminanceForComponent;
|
|
1862
|
+
/**
|
|
1863
|
+
* http://www.w3.org/TR/WCAG20/#contrast-ratiodef
|
|
1864
|
+
* Returns the contrast ration number in the set [1, 21].
|
|
1865
|
+
*/
|
|
1866
|
+
getContrastRatio(another: Color): number;
|
|
1867
|
+
/**
|
|
1868
|
+
* http://24ways.org/2010/calculating-color-contrast
|
|
1869
|
+
* Return 'true' if darker color otherwise 'false'
|
|
1870
|
+
*/
|
|
1871
|
+
isDarker(): boolean;
|
|
1872
|
+
/**
|
|
1873
|
+
* http://24ways.org/2010/calculating-color-contrast
|
|
1874
|
+
* Return 'true' if lighter color otherwise 'false'
|
|
1875
|
+
*/
|
|
1876
|
+
isLighter(): boolean;
|
|
1877
|
+
isLighterThan(another: Color): boolean;
|
|
1878
|
+
isDarkerThan(another: Color): boolean;
|
|
1879
|
+
lighten(factor: number): Color;
|
|
1880
|
+
darken(factor: number): Color;
|
|
1881
|
+
transparent(factor: number): Color;
|
|
1882
|
+
isTransparent(): boolean;
|
|
1883
|
+
isOpaque(): boolean;
|
|
1884
|
+
opposite(): Color;
|
|
1885
|
+
blend(c: Color): Color;
|
|
1886
|
+
makeOpaque(opaqueBackground: Color): Color;
|
|
1887
|
+
flatten(...backgrounds: Color[]): Color;
|
|
1888
|
+
private static _flatten;
|
|
1889
|
+
private _toString?;
|
|
1890
|
+
toString(): string;
|
|
1891
|
+
static getLighterColor(of: Color, relative: Color, factor?: number): Color;
|
|
1892
|
+
static getDarkerColor(of: Color, relative: Color, factor?: number): Color;
|
|
1893
|
+
static readonly white: Color;
|
|
1894
|
+
static readonly black: Color;
|
|
1895
|
+
static readonly red: Color;
|
|
1896
|
+
static readonly blue: Color;
|
|
1897
|
+
static readonly green: Color;
|
|
1898
|
+
static readonly cyan: Color;
|
|
1899
|
+
static readonly lightgrey: Color;
|
|
1900
|
+
static readonly transparent: Color;
|
|
1901
|
+
}
|
|
1902
|
+
declare namespace Color {
|
|
1903
|
+
namespace Format {
|
|
1904
|
+
namespace CSS {
|
|
1905
|
+
function formatRGB(color: Color): string;
|
|
1906
|
+
function formatRGBA(color: Color): string;
|
|
1907
|
+
function formatHSL(color: Color): string;
|
|
1908
|
+
function formatHSLA(color: Color): string;
|
|
1909
|
+
/**
|
|
1910
|
+
* Formats the color as #RRGGBB
|
|
1911
|
+
*/
|
|
1912
|
+
function formatHex(color: Color): string;
|
|
1913
|
+
/**
|
|
1914
|
+
* Formats the color as #RRGGBBAA
|
|
1915
|
+
* If 'compact' is set, colors without transparancy will be printed as #RRGGBB
|
|
1916
|
+
*/
|
|
1917
|
+
function formatHexA(color: Color, compact?: boolean): string;
|
|
1918
|
+
/**
|
|
1919
|
+
* The default format will use HEX if opaque and RGBA otherwise.
|
|
1920
|
+
*/
|
|
1921
|
+
function format(color: Color): string;
|
|
1922
|
+
/**
|
|
1923
|
+
* Converts an Hex color value to a Color.
|
|
1924
|
+
* returns r, g, and b are contained in the set [0, 255]
|
|
1925
|
+
* @param hex string (#RGB, #RGBA, #RRGGBB or #RRGGBBAA).
|
|
1926
|
+
*/
|
|
1927
|
+
function parseHex(hex: string): Color | null;
|
|
1928
|
+
}
|
|
1929
|
+
}
|
|
1930
|
+
}
|
|
1931
|
+
|
|
1932
|
+
interface IDataTransferFile {
|
|
1933
|
+
readonly name: string;
|
|
1934
|
+
readonly uri?: URI;
|
|
1935
|
+
data(): Promise<Uint8Array>;
|
|
1936
|
+
}
|
|
1937
|
+
interface IDataTransferItem {
|
|
1938
|
+
asString(): Thenable<string>;
|
|
1939
|
+
asFile(): IDataTransferFile | undefined;
|
|
1940
|
+
value: any;
|
|
1941
|
+
}
|
|
1942
|
+
declare class VSDataTransfer {
|
|
1943
|
+
private readonly _entries;
|
|
1944
|
+
get size(): number;
|
|
1945
|
+
has(mimeType: string): boolean;
|
|
1946
|
+
get(mimeType: string): IDataTransferItem | undefined;
|
|
1947
|
+
append(mimeType: string, value: IDataTransferItem): void;
|
|
1948
|
+
replace(mimeType: string, value: IDataTransferItem): void;
|
|
1949
|
+
delete(mimeType: string): void;
|
|
1950
|
+
entries(): Iterable<[string, IDataTransferItem]>;
|
|
1951
|
+
values(): Iterable<IDataTransferItem>;
|
|
1952
|
+
forEach(f: (value: IDataTransferItem, key: string) => void): void;
|
|
1953
|
+
private toKey;
|
|
1954
|
+
}
|
|
1955
|
+
|
|
1956
|
+
/**
|
|
1957
|
+
* Open ended enum at runtime
|
|
1958
|
+
*/
|
|
1959
|
+
declare const enum LanguageId {
|
|
1960
|
+
Null = 0,
|
|
1961
|
+
PlainText = 1
|
|
1962
|
+
}
|
|
1963
|
+
/**
|
|
1964
|
+
* Open ended enum at runtime
|
|
1965
|
+
*/
|
|
1966
|
+
declare const enum ColorId {
|
|
1967
|
+
None = 0,
|
|
1968
|
+
DefaultForeground = 1,
|
|
1969
|
+
DefaultBackground = 2
|
|
1970
|
+
}
|
|
1971
|
+
/**
|
|
1972
|
+
* A standard token type.
|
|
1973
|
+
*/
|
|
1974
|
+
declare const enum StandardTokenType {
|
|
1975
|
+
Other = 0,
|
|
1976
|
+
Comment = 1,
|
|
1977
|
+
String = 2,
|
|
1978
|
+
RegEx = 3
|
|
1979
|
+
}
|
|
1980
|
+
/**
|
|
1981
|
+
*/
|
|
1982
|
+
interface ITokenPresentation {
|
|
1983
|
+
foreground: ColorId;
|
|
1984
|
+
italic: boolean;
|
|
1985
|
+
bold: boolean;
|
|
1986
|
+
underline: boolean;
|
|
1987
|
+
strikethrough: boolean;
|
|
1988
|
+
}
|
|
1989
|
+
|
|
1990
|
+
declare enum Severity$1 {
|
|
1991
|
+
Ignore = 0,
|
|
1992
|
+
Info = 1,
|
|
1993
|
+
Warning = 2,
|
|
1994
|
+
Error = 3
|
|
1995
|
+
}
|
|
1996
|
+
declare namespace Severity$1 {
|
|
1997
|
+
/**
|
|
1998
|
+
* Parses 'error', 'warning', 'warn', 'info' in call casings
|
|
1999
|
+
* and falls back to ignore.
|
|
2000
|
+
*/
|
|
2001
|
+
function fromValue(value: string): Severity$1;
|
|
2002
|
+
function toString(severity: Severity$1): string;
|
|
2003
|
+
}
|
|
2004
|
+
|
|
2005
|
+
/**
|
|
2006
|
+
* **!Do not construct directly!**
|
|
2007
|
+
*
|
|
2008
|
+
* **!Only static methods because it gets serialized!**
|
|
2009
|
+
*
|
|
2010
|
+
* This represents the "canonical" version for an extension identifier. Extension ids
|
|
2011
|
+
* have to be case-insensitive (due to the marketplace), but we must ensure case
|
|
2012
|
+
* preservation because the extension API is already public at this time.
|
|
2013
|
+
*
|
|
2014
|
+
* For example, given an extension with the publisher `"Hello"` and the name `"World"`,
|
|
2015
|
+
* its canonical extension identifier is `"Hello.World"`. This extension could be
|
|
2016
|
+
* referenced in some other extension's dependencies using the string `"hello.world"`.
|
|
2017
|
+
*
|
|
2018
|
+
* To make matters more complicated, an extension can optionally have an UUID. When two
|
|
2019
|
+
* extensions have the same UUID, they are considered equal even if their identifier is different.
|
|
2020
|
+
*/
|
|
2021
|
+
declare class ExtensionIdentifier {
|
|
2022
|
+
readonly value: string;
|
|
2023
|
+
private readonly _lower;
|
|
2024
|
+
constructor(value: string);
|
|
2025
|
+
static equals(a: ExtensionIdentifier | string | null | undefined, b: ExtensionIdentifier | string | null | undefined): boolean;
|
|
2026
|
+
/**
|
|
2027
|
+
* Gives the value by which to index (for equality).
|
|
2028
|
+
*/
|
|
2029
|
+
static toKey(id: ExtensionIdentifier | string): string;
|
|
2030
|
+
}
|
|
2031
|
+
|
|
2032
|
+
/**
|
|
2033
|
+
*
|
|
2034
|
+
*/
|
|
2035
|
+
interface IRelatedInformation {
|
|
2036
|
+
resource: URI;
|
|
2037
|
+
message: string;
|
|
2038
|
+
startLineNumber: number;
|
|
2039
|
+
startColumn: number;
|
|
2040
|
+
endLineNumber: number;
|
|
2041
|
+
endColumn: number;
|
|
2042
|
+
}
|
|
2043
|
+
declare const enum MarkerTag {
|
|
2044
|
+
Unnecessary = 1,
|
|
2045
|
+
Deprecated = 2
|
|
2046
|
+
}
|
|
2047
|
+
declare enum MarkerSeverity {
|
|
2048
|
+
Hint = 1,
|
|
2049
|
+
Info = 2,
|
|
2050
|
+
Warning = 4,
|
|
2051
|
+
Error = 8
|
|
2052
|
+
}
|
|
2053
|
+
declare namespace MarkerSeverity {
|
|
2054
|
+
function compare(a: MarkerSeverity, b: MarkerSeverity): number;
|
|
2055
|
+
function toString(a: MarkerSeverity): string;
|
|
2056
|
+
function fromSeverity(severity: Severity$1): MarkerSeverity;
|
|
2057
|
+
function toSeverity(severity: MarkerSeverity): Severity$1;
|
|
2058
|
+
}
|
|
2059
|
+
/**
|
|
2060
|
+
* A structure defining a problem/warning/etc.
|
|
2061
|
+
*/
|
|
2062
|
+
interface IMarkerData {
|
|
2063
|
+
code?: string | {
|
|
2064
|
+
value: string;
|
|
2065
|
+
target: URI;
|
|
2066
|
+
};
|
|
2067
|
+
severity: MarkerSeverity;
|
|
2068
|
+
message: string;
|
|
2069
|
+
source?: string;
|
|
2070
|
+
startLineNumber: number;
|
|
2071
|
+
startColumn: number;
|
|
2072
|
+
endLineNumber: number;
|
|
2073
|
+
endColumn: number;
|
|
2074
|
+
relatedInformation?: IRelatedInformation[];
|
|
2075
|
+
tags?: MarkerTag[];
|
|
2076
|
+
}
|
|
2077
|
+
declare namespace IMarkerData {
|
|
2078
|
+
function makeKey(markerData: IMarkerData): string;
|
|
2079
|
+
function makeKeyOptionalMessage(markerData: IMarkerData, useMessage: boolean): string;
|
|
2080
|
+
}
|
|
2081
|
+
|
|
2082
|
+
declare type ColorIdentifier = string;
|
|
2083
|
+
declare const enum ColorTransformType {
|
|
2084
|
+
Darken = 0,
|
|
2085
|
+
Lighten = 1,
|
|
2086
|
+
Transparent = 2,
|
|
2087
|
+
OneOf = 3,
|
|
2088
|
+
LessProminent = 4,
|
|
2089
|
+
IfDefinedThenElse = 5
|
|
2090
|
+
}
|
|
2091
|
+
declare type ColorTransform = {
|
|
2092
|
+
op: ColorTransformType.Darken;
|
|
2093
|
+
value: ColorValue;
|
|
2094
|
+
factor: number;
|
|
2095
|
+
} | {
|
|
2096
|
+
op: ColorTransformType.Lighten;
|
|
2097
|
+
value: ColorValue;
|
|
2098
|
+
factor: number;
|
|
2099
|
+
} | {
|
|
2100
|
+
op: ColorTransformType.Transparent;
|
|
2101
|
+
value: ColorValue;
|
|
2102
|
+
factor: number;
|
|
2103
|
+
} | {
|
|
2104
|
+
op: ColorTransformType.OneOf;
|
|
2105
|
+
values: readonly ColorValue[];
|
|
2106
|
+
} | {
|
|
2107
|
+
op: ColorTransformType.LessProminent;
|
|
2108
|
+
value: ColorValue;
|
|
2109
|
+
background: ColorValue;
|
|
2110
|
+
factor: number;
|
|
2111
|
+
transparency: number;
|
|
2112
|
+
} | {
|
|
2113
|
+
op: ColorTransformType.IfDefinedThenElse;
|
|
2114
|
+
if: ColorIdentifier;
|
|
2115
|
+
then: ColorValue;
|
|
2116
|
+
else: ColorValue;
|
|
2117
|
+
};
|
|
2118
|
+
interface ColorDefaults {
|
|
2119
|
+
light: ColorValue | null;
|
|
2120
|
+
dark: ColorValue | null;
|
|
2121
|
+
hcDark: ColorValue | null;
|
|
2122
|
+
hcLight: ColorValue | null;
|
|
2123
|
+
}
|
|
2124
|
+
/**
|
|
2125
|
+
* A Color Value is either a color literal, a reference to an other color or a derived color
|
|
2126
|
+
*/
|
|
2127
|
+
declare type ColorValue = Color | string | ColorIdentifier | ColorTransform;
|
|
2128
|
+
declare function registerColor(id: string, defaults: ColorDefaults | null, description: string, needsTransparency?: boolean, deprecationMessage?: string): ColorIdentifier;
|
|
2129
|
+
|
|
2130
|
+
interface ThemeColor {
|
|
2131
|
+
id: string;
|
|
2132
|
+
}
|
|
2133
|
+
declare namespace ThemeColor {
|
|
2134
|
+
function isThemeColor(obj: any): obj is ThemeColor;
|
|
2135
|
+
}
|
|
2136
|
+
interface ThemeIcon {
|
|
2137
|
+
readonly id: string;
|
|
2138
|
+
readonly color?: ThemeColor;
|
|
2139
|
+
}
|
|
2140
|
+
declare namespace ThemeIcon {
|
|
2141
|
+
function isThemeIcon(obj: any): obj is ThemeIcon;
|
|
2142
|
+
function fromString(str: string): ThemeIcon | undefined;
|
|
2143
|
+
function fromId(id: string): ThemeIcon;
|
|
2144
|
+
function modify(icon: ThemeIcon, modifier: 'disabled' | 'spin' | undefined): ThemeIcon;
|
|
2145
|
+
function getModifier(icon: ThemeIcon): string | undefined;
|
|
2146
|
+
function isEqual(ti1: ThemeIcon, ti2: ThemeIcon): boolean;
|
|
2147
|
+
function asThemeIcon(codicon: Codicon, color?: string): ThemeIcon;
|
|
2148
|
+
const asClassNameArray: (icon: ThemeIcon) => string[];
|
|
2149
|
+
const asClassName: (icon: ThemeIcon) => string;
|
|
2150
|
+
const asCSSSelector: (icon: ThemeIcon) => string;
|
|
2151
|
+
}
|
|
2152
|
+
|
|
2153
|
+
/**
|
|
2154
|
+
* @internal
|
|
2155
|
+
*/
|
|
2156
|
+
interface ILanguageIdCodec {
|
|
2157
|
+
encodeLanguageId(languageId: string): LanguageId;
|
|
2158
|
+
decodeLanguageId(languageId: LanguageId): string;
|
|
2159
|
+
}
|
|
2160
|
+
/**
|
|
2161
|
+
* A provider result represents the values a provider, like the {@link HoverProvider},
|
|
2162
|
+
* may return. For once this is the actual result type `T`, like `Hover`, or a thenable that resolves
|
|
2163
|
+
* to that type `T`. In addition, `null` and `undefined` can be returned - either directly or from a
|
|
2164
|
+
* thenable.
|
|
2165
|
+
*/
|
|
2166
|
+
declare type ProviderResult<T> = T | undefined | null | Thenable<T | undefined | null>;
|
|
2167
|
+
/**
|
|
2168
|
+
* A hover represents additional information for a symbol or word. Hovers are
|
|
2169
|
+
* rendered in a tooltip-like widget.
|
|
2170
|
+
*/
|
|
2171
|
+
interface Hover {
|
|
2172
|
+
/**
|
|
2173
|
+
* The contents of this hover.
|
|
2174
|
+
*/
|
|
2175
|
+
contents: IMarkdownString[];
|
|
2176
|
+
/**
|
|
2177
|
+
* The range to which this hover applies. When missing, the
|
|
2178
|
+
* editor will use the range at the current position or the
|
|
2179
|
+
* current position itself.
|
|
2180
|
+
*/
|
|
2181
|
+
range?: IRange;
|
|
2182
|
+
}
|
|
2183
|
+
/**
|
|
2184
|
+
* The hover provider interface defines the contract between extensions and
|
|
2185
|
+
* the [hover](https://code.visualstudio.com/docs/editor/intellisense)-feature.
|
|
2186
|
+
*/
|
|
2187
|
+
interface HoverProvider {
|
|
2188
|
+
/**
|
|
2189
|
+
* Provide a hover for the given position and document. Multiple hovers at the same
|
|
2190
|
+
* position will be merged by the editor. A hover can have a range which defaults
|
|
2191
|
+
* to the word range at the position when omitted.
|
|
2192
|
+
*/
|
|
2193
|
+
provideHover(model: ITextModel, position: Position, token: CancellationToken): ProviderResult<Hover>;
|
|
2194
|
+
}
|
|
2195
|
+
/**
|
|
2196
|
+
* An evaluatable expression represents additional information for an expression in a document. Evaluatable expressions are
|
|
2197
|
+
* evaluated by a debugger or runtime and their result is rendered in a tooltip-like widget.
|
|
2198
|
+
* @internal
|
|
2199
|
+
*/
|
|
2200
|
+
interface EvaluatableExpression {
|
|
2201
|
+
/**
|
|
2202
|
+
* The range to which this expression applies.
|
|
2203
|
+
*/
|
|
2204
|
+
range: IRange;
|
|
2205
|
+
/**
|
|
2206
|
+
* This expression overrides the expression extracted from the range.
|
|
2207
|
+
*/
|
|
2208
|
+
expression?: string;
|
|
2209
|
+
}
|
|
2210
|
+
/**
|
|
2211
|
+
* The evaluatable expression provider interface defines the contract between extensions and
|
|
2212
|
+
* the debug hover.
|
|
2213
|
+
* @internal
|
|
2214
|
+
*/
|
|
2215
|
+
interface EvaluatableExpressionProvider {
|
|
2216
|
+
/**
|
|
2217
|
+
* Provide a hover for the given position and document. Multiple hovers at the same
|
|
2218
|
+
* position will be merged by the editor. A hover can have a range which defaults
|
|
2219
|
+
* to the word range at the position when omitted.
|
|
2220
|
+
*/
|
|
2221
|
+
provideEvaluatableExpression(model: ITextModel, position: Position, token: CancellationToken): ProviderResult<EvaluatableExpression>;
|
|
2222
|
+
}
|
|
2223
|
+
/**
|
|
2224
|
+
* A value-object that contains contextual information when requesting inline values from a InlineValuesProvider.
|
|
2225
|
+
* @internal
|
|
2226
|
+
*/
|
|
2227
|
+
interface InlineValueContext {
|
|
2228
|
+
frameId: number;
|
|
2229
|
+
stoppedLocation: Range;
|
|
2230
|
+
}
|
|
2231
|
+
/**
|
|
2232
|
+
* Provide inline value as text.
|
|
2233
|
+
* @internal
|
|
2234
|
+
*/
|
|
2235
|
+
interface InlineValueText {
|
|
2236
|
+
type: 'text';
|
|
2237
|
+
range: IRange;
|
|
2238
|
+
text: string;
|
|
2239
|
+
}
|
|
2240
|
+
/**
|
|
2241
|
+
* Provide inline value through a variable lookup.
|
|
2242
|
+
* @internal
|
|
2243
|
+
*/
|
|
2244
|
+
interface InlineValueVariableLookup {
|
|
2245
|
+
type: 'variable';
|
|
2246
|
+
range: IRange;
|
|
2247
|
+
variableName?: string;
|
|
2248
|
+
caseSensitiveLookup: boolean;
|
|
2249
|
+
}
|
|
2250
|
+
/**
|
|
2251
|
+
* Provide inline value through an expression evaluation.
|
|
2252
|
+
* @internal
|
|
2253
|
+
*/
|
|
2254
|
+
interface InlineValueExpression {
|
|
2255
|
+
type: 'expression';
|
|
2256
|
+
range: IRange;
|
|
2257
|
+
expression?: string;
|
|
2258
|
+
}
|
|
2259
|
+
/**
|
|
2260
|
+
* Inline value information can be provided by different means:
|
|
2261
|
+
* - directly as a text value (class InlineValueText).
|
|
2262
|
+
* - as a name to use for a variable lookup (class InlineValueVariableLookup)
|
|
2263
|
+
* - as an evaluatable expression (class InlineValueEvaluatableExpression)
|
|
2264
|
+
* The InlineValue types combines all inline value types into one type.
|
|
2265
|
+
* @internal
|
|
2266
|
+
*/
|
|
2267
|
+
declare type InlineValue = InlineValueText | InlineValueVariableLookup | InlineValueExpression;
|
|
2268
|
+
/**
|
|
2269
|
+
* The inline values provider interface defines the contract between extensions and
|
|
2270
|
+
* the debugger's inline values feature.
|
|
2271
|
+
* @internal
|
|
2272
|
+
*/
|
|
2273
|
+
interface InlineValuesProvider {
|
|
2274
|
+
/**
|
|
2275
|
+
*/
|
|
2276
|
+
onDidChangeInlineValues?: Event<void> | undefined;
|
|
2277
|
+
/**
|
|
2278
|
+
* Provide the "inline values" for the given range and document. Multiple hovers at the same
|
|
2279
|
+
* position will be merged by the editor. A hover can have a range which defaults
|
|
2280
|
+
* to the word range at the position when omitted.
|
|
2281
|
+
*/
|
|
2282
|
+
provideInlineValues(model: ITextModel, viewPort: Range, context: InlineValueContext, token: CancellationToken): ProviderResult<InlineValue[]>;
|
|
2283
|
+
}
|
|
2284
|
+
declare const enum CompletionItemKind {
|
|
2285
|
+
Method = 0,
|
|
2286
|
+
Function = 1,
|
|
2287
|
+
Constructor = 2,
|
|
2288
|
+
Field = 3,
|
|
2289
|
+
Variable = 4,
|
|
2290
|
+
Class = 5,
|
|
2291
|
+
Struct = 6,
|
|
2292
|
+
Interface = 7,
|
|
2293
|
+
Module = 8,
|
|
2294
|
+
Property = 9,
|
|
2295
|
+
Event = 10,
|
|
2296
|
+
Operator = 11,
|
|
2297
|
+
Unit = 12,
|
|
2298
|
+
Value = 13,
|
|
2299
|
+
Constant = 14,
|
|
2300
|
+
Enum = 15,
|
|
2301
|
+
EnumMember = 16,
|
|
2302
|
+
Keyword = 17,
|
|
2303
|
+
Text = 18,
|
|
2304
|
+
Color = 19,
|
|
2305
|
+
File = 20,
|
|
2306
|
+
Reference = 21,
|
|
2307
|
+
Customcolor = 22,
|
|
2308
|
+
Folder = 23,
|
|
2309
|
+
TypeParameter = 24,
|
|
2310
|
+
User = 25,
|
|
2311
|
+
Issue = 26,
|
|
2312
|
+
Snippet = 27
|
|
2313
|
+
}
|
|
2314
|
+
interface CompletionItemLabel {
|
|
2315
|
+
label: string;
|
|
2316
|
+
detail?: string;
|
|
2317
|
+
description?: string;
|
|
2318
|
+
}
|
|
2319
|
+
declare const enum CompletionItemTag {
|
|
2320
|
+
Deprecated = 1
|
|
2321
|
+
}
|
|
2322
|
+
declare const enum CompletionItemInsertTextRule {
|
|
2323
|
+
/**
|
|
2324
|
+
* Adjust whitespace/indentation of multiline insert texts to
|
|
2325
|
+
* match the current line indentation.
|
|
2326
|
+
*/
|
|
2327
|
+
KeepWhitespace = 1,
|
|
2328
|
+
/**
|
|
2329
|
+
* `insertText` is a snippet.
|
|
2330
|
+
*/
|
|
2331
|
+
InsertAsSnippet = 4
|
|
2332
|
+
}
|
|
2333
|
+
interface CompletionItemRanges {
|
|
2334
|
+
insert: IRange;
|
|
2335
|
+
replace: IRange;
|
|
2336
|
+
}
|
|
2337
|
+
/**
|
|
2338
|
+
* A completion item represents a text snippet that is
|
|
2339
|
+
* proposed to complete text that is being typed.
|
|
2340
|
+
*/
|
|
2341
|
+
interface CompletionItem {
|
|
2342
|
+
/**
|
|
2343
|
+
* The label of this completion item. By default
|
|
2344
|
+
* this is also the text that is inserted when selecting
|
|
2345
|
+
* this completion.
|
|
2346
|
+
*/
|
|
2347
|
+
label: string | CompletionItemLabel;
|
|
2348
|
+
/**
|
|
2349
|
+
* The kind of this completion item. Based on the kind
|
|
2350
|
+
* an icon is chosen by the editor.
|
|
2351
|
+
*/
|
|
2352
|
+
kind: CompletionItemKind;
|
|
2353
|
+
/**
|
|
2354
|
+
* A modifier to the `kind` which affect how the item
|
|
2355
|
+
* is rendered, e.g. Deprecated is rendered with a strikeout
|
|
2356
|
+
*/
|
|
2357
|
+
tags?: ReadonlyArray<CompletionItemTag>;
|
|
2358
|
+
/**
|
|
2359
|
+
* A human-readable string with additional information
|
|
2360
|
+
* about this item, like type or symbol information.
|
|
2361
|
+
*/
|
|
2362
|
+
detail?: string;
|
|
2363
|
+
/**
|
|
2364
|
+
* A human-readable string that represents a doc-comment.
|
|
2365
|
+
*/
|
|
2366
|
+
documentation?: string | IMarkdownString;
|
|
2367
|
+
/**
|
|
2368
|
+
* A string that should be used when comparing this item
|
|
2369
|
+
* with other items. When `falsy` the {@link CompletionItem.label label}
|
|
2370
|
+
* is used.
|
|
2371
|
+
*/
|
|
2372
|
+
sortText?: string;
|
|
2373
|
+
/**
|
|
2374
|
+
* A string that should be used when filtering a set of
|
|
2375
|
+
* completion items. When `falsy` the {@link CompletionItem.label label}
|
|
2376
|
+
* is used.
|
|
2377
|
+
*/
|
|
2378
|
+
filterText?: string;
|
|
2379
|
+
/**
|
|
2380
|
+
* Select this item when showing. *Note* that only one completion item can be selected and
|
|
2381
|
+
* that the editor decides which item that is. The rule is that the *first* item of those
|
|
2382
|
+
* that match best is selected.
|
|
2383
|
+
*/
|
|
2384
|
+
preselect?: boolean;
|
|
2385
|
+
/**
|
|
2386
|
+
* A string or snippet that should be inserted in a document when selecting
|
|
2387
|
+
* this completion.
|
|
2388
|
+
*/
|
|
2389
|
+
insertText: string;
|
|
2390
|
+
/**
|
|
2391
|
+
* Additional rules (as bitmask) that should be applied when inserting
|
|
2392
|
+
* this completion.
|
|
2393
|
+
*/
|
|
2394
|
+
insertTextRules?: CompletionItemInsertTextRule;
|
|
2395
|
+
/**
|
|
2396
|
+
* A range of text that should be replaced by this completion item.
|
|
2397
|
+
*
|
|
2398
|
+
* Defaults to a range from the start of the {@link TextDocument.getWordRangeAtPosition current word} to the
|
|
2399
|
+
* current position.
|
|
2400
|
+
*
|
|
2401
|
+
* *Note:* The range must be a {@link Range.isSingleLine single line} and it must
|
|
2402
|
+
* {@link Range.contains contain} the position at which completion has been {@link CompletionItemProvider.provideCompletionItems requested}.
|
|
2403
|
+
*/
|
|
2404
|
+
range: IRange | CompletionItemRanges;
|
|
2405
|
+
/**
|
|
2406
|
+
* An optional set of characters that when pressed while this completion is active will accept it first and
|
|
2407
|
+
* then type that character. *Note* that all commit characters should have `length=1` and that superfluous
|
|
2408
|
+
* characters will be ignored.
|
|
2409
|
+
*/
|
|
2410
|
+
commitCharacters?: string[];
|
|
2411
|
+
/**
|
|
2412
|
+
* An optional array of additional text edits that are applied when
|
|
2413
|
+
* selecting this completion. Edits must not overlap with the main edit
|
|
2414
|
+
* nor with themselves.
|
|
2415
|
+
*/
|
|
2416
|
+
additionalTextEdits?: ISingleEditOperation[];
|
|
2417
|
+
/**
|
|
2418
|
+
* A command that should be run upon acceptance of this item.
|
|
2419
|
+
*/
|
|
2420
|
+
command?: Command;
|
|
2421
|
+
/**
|
|
2422
|
+
* @internal
|
|
2423
|
+
*/
|
|
2424
|
+
extensionId?: ExtensionIdentifier;
|
|
2425
|
+
/**
|
|
2426
|
+
* @internal
|
|
2427
|
+
*/
|
|
2428
|
+
_id?: [number, number];
|
|
2429
|
+
}
|
|
2430
|
+
interface CompletionList {
|
|
2431
|
+
suggestions: CompletionItem[];
|
|
2432
|
+
incomplete?: boolean;
|
|
2433
|
+
dispose?(): void;
|
|
2434
|
+
/**
|
|
2435
|
+
* @internal
|
|
2436
|
+
*/
|
|
2437
|
+
duration?: number;
|
|
2438
|
+
}
|
|
2439
|
+
/**
|
|
2440
|
+
* How a suggest provider was triggered.
|
|
2441
|
+
*/
|
|
2442
|
+
declare const enum CompletionTriggerKind {
|
|
2443
|
+
Invoke = 0,
|
|
2444
|
+
TriggerCharacter = 1,
|
|
2445
|
+
TriggerForIncompleteCompletions = 2
|
|
2446
|
+
}
|
|
2447
|
+
/**
|
|
2448
|
+
* Contains additional information about the context in which
|
|
2449
|
+
* {@link CompletionItemProvider.provideCompletionItems completion provider} is triggered.
|
|
2450
|
+
*/
|
|
2451
|
+
interface CompletionContext {
|
|
2452
|
+
/**
|
|
2453
|
+
* How the completion was triggered.
|
|
2454
|
+
*/
|
|
2455
|
+
triggerKind: CompletionTriggerKind;
|
|
2456
|
+
/**
|
|
2457
|
+
* Character that triggered the completion item provider.
|
|
2458
|
+
*
|
|
2459
|
+
* `undefined` if provider was not triggered by a character.
|
|
2460
|
+
*/
|
|
2461
|
+
triggerCharacter?: string;
|
|
2462
|
+
}
|
|
2463
|
+
/**
|
|
2464
|
+
* The completion item provider interface defines the contract between extensions and
|
|
2465
|
+
* the [IntelliSense](https://code.visualstudio.com/docs/editor/intellisense).
|
|
2466
|
+
*
|
|
2467
|
+
* When computing *complete* completion items is expensive, providers can optionally implement
|
|
2468
|
+
* the `resolveCompletionItem`-function. In that case it is enough to return completion
|
|
2469
|
+
* items with a {@link CompletionItem.label label} from the
|
|
2470
|
+
* {@link CompletionItemProvider.provideCompletionItems provideCompletionItems}-function. Subsequently,
|
|
2471
|
+
* when a completion item is shown in the UI and gains focus this provider is asked to resolve
|
|
2472
|
+
* the item, like adding {@link CompletionItem.documentation doc-comment} or {@link CompletionItem.detail details}.
|
|
2473
|
+
*/
|
|
2474
|
+
interface CompletionItemProvider {
|
|
2475
|
+
/**
|
|
2476
|
+
* @internal
|
|
2477
|
+
*/
|
|
2478
|
+
_debugDisplayName?: string;
|
|
2479
|
+
triggerCharacters?: string[];
|
|
2480
|
+
/**
|
|
2481
|
+
* Provide completion items for the given position and document.
|
|
2482
|
+
*/
|
|
2483
|
+
provideCompletionItems(model: ITextModel, position: Position, context: CompletionContext, token: CancellationToken): ProviderResult<CompletionList>;
|
|
2484
|
+
/**
|
|
2485
|
+
* Given a completion item fill in more data, like {@link CompletionItem.documentation doc-comment}
|
|
2486
|
+
* or {@link CompletionItem.detail details}.
|
|
2487
|
+
*
|
|
2488
|
+
* The editor will only resolve a completion item once.
|
|
2489
|
+
*/
|
|
2490
|
+
resolveCompletionItem?(item: CompletionItem, token: CancellationToken): ProviderResult<CompletionItem>;
|
|
2491
|
+
}
|
|
2492
|
+
/**
|
|
2493
|
+
* How an {@link InlineCompletionsProvider inline completion provider} was triggered.
|
|
2494
|
+
*/
|
|
2495
|
+
declare enum InlineCompletionTriggerKind {
|
|
2496
|
+
/**
|
|
2497
|
+
* Completion was triggered automatically while editing.
|
|
2498
|
+
* It is sufficient to return a single completion item in this case.
|
|
2499
|
+
*/
|
|
2500
|
+
Automatic = 0,
|
|
2501
|
+
/**
|
|
2502
|
+
* Completion was triggered explicitly by a user gesture.
|
|
2503
|
+
* Return multiple completion items to enable cycling through them.
|
|
2504
|
+
*/
|
|
2505
|
+
Explicit = 1
|
|
2506
|
+
}
|
|
2507
|
+
interface InlineCompletionContext {
|
|
2508
|
+
/**
|
|
2509
|
+
* How the completion was triggered.
|
|
2510
|
+
*/
|
|
2511
|
+
readonly triggerKind: InlineCompletionTriggerKind;
|
|
2512
|
+
readonly selectedSuggestionInfo: SelectedSuggestionInfo | undefined;
|
|
2513
|
+
}
|
|
2514
|
+
interface SelectedSuggestionInfo {
|
|
2515
|
+
range: IRange;
|
|
2516
|
+
text: string;
|
|
2517
|
+
isSnippetText: boolean;
|
|
2518
|
+
completionKind: CompletionItemKind;
|
|
2519
|
+
}
|
|
2520
|
+
interface InlineCompletion {
|
|
2521
|
+
/**
|
|
2522
|
+
* The text to insert.
|
|
2523
|
+
* If the text contains a line break, the range must end at the end of a line.
|
|
2524
|
+
* If existing text should be replaced, the existing text must be a prefix of the text to insert.
|
|
2525
|
+
*
|
|
2526
|
+
* The text can also be a snippet. In that case, a preview with default parameters is shown.
|
|
2527
|
+
* When accepting the suggestion, the full snippet is inserted.
|
|
2528
|
+
*/
|
|
2529
|
+
readonly insertText: string | {
|
|
2530
|
+
snippet: string;
|
|
2531
|
+
};
|
|
2532
|
+
/**
|
|
2533
|
+
* A text that is used to decide if this inline completion should be shown.
|
|
2534
|
+
* An inline completion is shown if the text to replace is a subword of the filter text.
|
|
2535
|
+
*/
|
|
2536
|
+
readonly filterText?: string;
|
|
2537
|
+
/**
|
|
2538
|
+
* An optional array of additional text edits that are applied when
|
|
2539
|
+
* selecting this completion. Edits must not overlap with the main edit
|
|
2540
|
+
* nor with themselves.
|
|
2541
|
+
*/
|
|
2542
|
+
readonly additionalTextEdits?: ISingleEditOperation[];
|
|
2543
|
+
/**
|
|
2544
|
+
* The range to replace.
|
|
2545
|
+
* Must begin and end on the same line.
|
|
2546
|
+
*/
|
|
2547
|
+
readonly range?: IRange;
|
|
2548
|
+
readonly command?: Command;
|
|
2549
|
+
/**
|
|
2550
|
+
* If set to `true`, unopened closing brackets are removed and unclosed opening brackets are closed.
|
|
2551
|
+
* Defaults to `false`.
|
|
2552
|
+
*/
|
|
2553
|
+
readonly completeBracketPairs?: boolean;
|
|
2554
|
+
}
|
|
2555
|
+
interface InlineCompletions<TItem extends InlineCompletion = InlineCompletion> {
|
|
2556
|
+
readonly items: readonly TItem[];
|
|
2557
|
+
/**
|
|
2558
|
+
* A list of commands associated with the inline completions of this list.
|
|
2559
|
+
*/
|
|
2560
|
+
readonly commands?: Command[];
|
|
2561
|
+
}
|
|
2562
|
+
interface InlineCompletionsProvider<T extends InlineCompletions = InlineCompletions> {
|
|
2563
|
+
provideInlineCompletions(model: ITextModel, position: Position, context: InlineCompletionContext, token: CancellationToken): ProviderResult<T>;
|
|
2564
|
+
/**
|
|
2565
|
+
* Will be called when an item is shown.
|
|
2566
|
+
*/
|
|
2567
|
+
handleItemDidShow?(completions: T, item: T['items'][number]): void;
|
|
2568
|
+
/**
|
|
2569
|
+
* Will be called when a completions list is no longer in use and can be garbage-collected.
|
|
2570
|
+
*/
|
|
2571
|
+
freeInlineCompletions(completions: T): void;
|
|
2572
|
+
}
|
|
2573
|
+
interface CodeAction {
|
|
2574
|
+
title: string;
|
|
2575
|
+
command?: Command;
|
|
2576
|
+
edit?: WorkspaceEdit;
|
|
2577
|
+
diagnostics?: IMarkerData[];
|
|
2578
|
+
kind?: string;
|
|
2579
|
+
isPreferred?: boolean;
|
|
2580
|
+
disabled?: string;
|
|
2581
|
+
}
|
|
2582
|
+
declare const enum CodeActionTriggerType {
|
|
2583
|
+
Invoke = 1,
|
|
2584
|
+
Auto = 2
|
|
2585
|
+
}
|
|
2586
|
+
/**
|
|
2587
|
+
* @internal
|
|
2588
|
+
*/
|
|
2589
|
+
interface CodeActionContext {
|
|
2590
|
+
only?: string;
|
|
2591
|
+
trigger: CodeActionTriggerType;
|
|
2592
|
+
}
|
|
2593
|
+
interface CodeActionList extends IDisposable {
|
|
2594
|
+
readonly actions: ReadonlyArray<CodeAction>;
|
|
2595
|
+
}
|
|
2596
|
+
/**
|
|
2597
|
+
* The code action interface defines the contract between extensions and
|
|
2598
|
+
* the [light bulb](https://code.visualstudio.com/docs/editor/editingevolved#_code-action) feature.
|
|
2599
|
+
* @internal
|
|
2600
|
+
*/
|
|
2601
|
+
interface CodeActionProvider {
|
|
2602
|
+
displayName?: string;
|
|
2603
|
+
/**
|
|
2604
|
+
* Provide commands for the given document and range.
|
|
2605
|
+
*/
|
|
2606
|
+
provideCodeActions(model: ITextModel, range: Range | Selection, context: CodeActionContext, token: CancellationToken): ProviderResult<CodeActionList>;
|
|
2607
|
+
/**
|
|
2608
|
+
* Given a code action fill in the edit. Will only invoked when missing.
|
|
2609
|
+
*/
|
|
2610
|
+
resolveCodeAction?(codeAction: CodeAction, token: CancellationToken): ProviderResult<CodeAction>;
|
|
2611
|
+
/**
|
|
2612
|
+
* Optional list of CodeActionKinds that this provider returns.
|
|
2613
|
+
*/
|
|
2614
|
+
readonly providedCodeActionKinds?: ReadonlyArray<string>;
|
|
2615
|
+
readonly documentation?: ReadonlyArray<{
|
|
2616
|
+
readonly kind: string;
|
|
2617
|
+
readonly command: Command;
|
|
2618
|
+
}>;
|
|
2619
|
+
/**
|
|
2620
|
+
* @internal
|
|
2621
|
+
*/
|
|
2622
|
+
_getAdditionalMenuItems?(context: CodeActionContext, actions: readonly CodeAction[]): Command[];
|
|
2623
|
+
}
|
|
2624
|
+
/**
|
|
2625
|
+
* @internal
|
|
2626
|
+
*/
|
|
2627
|
+
interface DocumentPasteEdit {
|
|
2628
|
+
insertText: string | {
|
|
2629
|
+
snippet: string;
|
|
2630
|
+
};
|
|
2631
|
+
additionalEdit?: WorkspaceEdit;
|
|
2632
|
+
}
|
|
2633
|
+
/**
|
|
2634
|
+
* @internal
|
|
2635
|
+
*/
|
|
2636
|
+
interface DocumentPasteEditProvider {
|
|
2637
|
+
readonly pasteMimeTypes: readonly string[];
|
|
2638
|
+
prepareDocumentPaste?(model: ITextModel, ranges: readonly IRange[], dataTransfer: VSDataTransfer, token: CancellationToken): Promise<undefined | VSDataTransfer>;
|
|
2639
|
+
provideDocumentPasteEdits(model: ITextModel, ranges: readonly IRange[], dataTransfer: VSDataTransfer, token: CancellationToken): Promise<DocumentPasteEdit | undefined>;
|
|
2640
|
+
}
|
|
2641
|
+
/**
|
|
2642
|
+
* Represents a parameter of a callable-signature. A parameter can
|
|
2643
|
+
* have a label and a doc-comment.
|
|
2644
|
+
*/
|
|
2645
|
+
interface ParameterInformation {
|
|
2646
|
+
/**
|
|
2647
|
+
* The label of this signature. Will be shown in
|
|
2648
|
+
* the UI.
|
|
2649
|
+
*/
|
|
2650
|
+
label: string | [number, number];
|
|
2651
|
+
/**
|
|
2652
|
+
* The human-readable doc-comment of this signature. Will be shown
|
|
2653
|
+
* in the UI but can be omitted.
|
|
2654
|
+
*/
|
|
2655
|
+
documentation?: string | IMarkdownString;
|
|
2656
|
+
}
|
|
2657
|
+
/**
|
|
2658
|
+
* Represents the signature of something callable. A signature
|
|
2659
|
+
* can have a label, like a function-name, a doc-comment, and
|
|
2660
|
+
* a set of parameters.
|
|
2661
|
+
*/
|
|
2662
|
+
interface SignatureInformation {
|
|
2663
|
+
/**
|
|
2664
|
+
* The label of this signature. Will be shown in
|
|
2665
|
+
* the UI.
|
|
2666
|
+
*/
|
|
2667
|
+
label: string;
|
|
2668
|
+
/**
|
|
2669
|
+
* The human-readable doc-comment of this signature. Will be shown
|
|
2670
|
+
* in the UI but can be omitted.
|
|
2671
|
+
*/
|
|
2672
|
+
documentation?: string | IMarkdownString;
|
|
2673
|
+
/**
|
|
2674
|
+
* The parameters of this signature.
|
|
2675
|
+
*/
|
|
2676
|
+
parameters: ParameterInformation[];
|
|
2677
|
+
/**
|
|
2678
|
+
* Index of the active parameter.
|
|
2679
|
+
*
|
|
2680
|
+
* If provided, this is used in place of `SignatureHelp.activeSignature`.
|
|
2681
|
+
*/
|
|
2682
|
+
activeParameter?: number;
|
|
2683
|
+
}
|
|
2684
|
+
/**
|
|
2685
|
+
* Signature help represents the signature of something
|
|
2686
|
+
* callable. There can be multiple signatures but only one
|
|
2687
|
+
* active and only one active parameter.
|
|
2688
|
+
*/
|
|
2689
|
+
interface SignatureHelp {
|
|
2690
|
+
/**
|
|
2691
|
+
* One or more signatures.
|
|
2692
|
+
*/
|
|
2693
|
+
signatures: SignatureInformation[];
|
|
2694
|
+
/**
|
|
2695
|
+
* The active signature.
|
|
2696
|
+
*/
|
|
2697
|
+
activeSignature: number;
|
|
2698
|
+
/**
|
|
2699
|
+
* The active parameter of the active signature.
|
|
2700
|
+
*/
|
|
2701
|
+
activeParameter: number;
|
|
2702
|
+
}
|
|
2703
|
+
interface SignatureHelpResult extends IDisposable {
|
|
2704
|
+
value: SignatureHelp;
|
|
2705
|
+
}
|
|
2706
|
+
declare enum SignatureHelpTriggerKind {
|
|
2707
|
+
Invoke = 1,
|
|
2708
|
+
TriggerCharacter = 2,
|
|
2709
|
+
ContentChange = 3
|
|
2710
|
+
}
|
|
2711
|
+
interface SignatureHelpContext {
|
|
2712
|
+
readonly triggerKind: SignatureHelpTriggerKind;
|
|
2713
|
+
readonly triggerCharacter?: string;
|
|
2714
|
+
readonly isRetrigger: boolean;
|
|
2715
|
+
readonly activeSignatureHelp?: SignatureHelp;
|
|
2716
|
+
}
|
|
2717
|
+
/**
|
|
2718
|
+
* The signature help provider interface defines the contract between extensions and
|
|
2719
|
+
* the [parameter hints](https://code.visualstudio.com/docs/editor/intellisense)-feature.
|
|
2720
|
+
*/
|
|
2721
|
+
interface SignatureHelpProvider {
|
|
2722
|
+
readonly signatureHelpTriggerCharacters?: ReadonlyArray<string>;
|
|
2723
|
+
readonly signatureHelpRetriggerCharacters?: ReadonlyArray<string>;
|
|
2724
|
+
/**
|
|
2725
|
+
* Provide help for the signature at the given position and document.
|
|
2726
|
+
*/
|
|
2727
|
+
provideSignatureHelp(model: ITextModel, position: Position, token: CancellationToken, context: SignatureHelpContext): ProviderResult<SignatureHelpResult>;
|
|
2728
|
+
}
|
|
2729
|
+
/**
|
|
2730
|
+
* A document highlight kind.
|
|
2731
|
+
*/
|
|
2732
|
+
declare enum DocumentHighlightKind {
|
|
2733
|
+
/**
|
|
2734
|
+
* A textual occurrence.
|
|
2735
|
+
*/
|
|
2736
|
+
Text = 0,
|
|
2737
|
+
/**
|
|
2738
|
+
* Read-access of a symbol, like reading a variable.
|
|
2739
|
+
*/
|
|
2740
|
+
Read = 1,
|
|
2741
|
+
/**
|
|
2742
|
+
* Write-access of a symbol, like writing to a variable.
|
|
2743
|
+
*/
|
|
2744
|
+
Write = 2
|
|
2745
|
+
}
|
|
2746
|
+
/**
|
|
2747
|
+
* A document highlight is a range inside a text document which deserves
|
|
2748
|
+
* special attention. Usually a document highlight is visualized by changing
|
|
2749
|
+
* the background color of its range.
|
|
2750
|
+
*/
|
|
2751
|
+
interface DocumentHighlight {
|
|
2752
|
+
/**
|
|
2753
|
+
* The range this highlight applies to.
|
|
2754
|
+
*/
|
|
2755
|
+
range: IRange;
|
|
2756
|
+
/**
|
|
2757
|
+
* The highlight kind, default is {@link DocumentHighlightKind.Text text}.
|
|
2758
|
+
*/
|
|
2759
|
+
kind?: DocumentHighlightKind;
|
|
2760
|
+
}
|
|
2761
|
+
/**
|
|
2762
|
+
* The document highlight provider interface defines the contract between extensions and
|
|
2763
|
+
* the word-highlight-feature.
|
|
2764
|
+
*/
|
|
2765
|
+
interface DocumentHighlightProvider {
|
|
2766
|
+
/**
|
|
2767
|
+
* Provide a set of document highlights, like all occurrences of a variable or
|
|
2768
|
+
* all exit-points of a function.
|
|
2769
|
+
*/
|
|
2770
|
+
provideDocumentHighlights(model: ITextModel, position: Position, token: CancellationToken): ProviderResult<DocumentHighlight[]>;
|
|
2771
|
+
}
|
|
2772
|
+
/**
|
|
2773
|
+
* The linked editing range provider interface defines the contract between extensions and
|
|
2774
|
+
* the linked editing feature.
|
|
2775
|
+
*/
|
|
2776
|
+
interface LinkedEditingRangeProvider {
|
|
2777
|
+
/**
|
|
2778
|
+
* Provide a list of ranges that can be edited together.
|
|
2779
|
+
*/
|
|
2780
|
+
provideLinkedEditingRanges(model: ITextModel, position: Position, token: CancellationToken): ProviderResult<LinkedEditingRanges>;
|
|
2781
|
+
}
|
|
2782
|
+
/**
|
|
2783
|
+
* Represents a list of ranges that can be edited together along with a word pattern to describe valid contents.
|
|
2784
|
+
*/
|
|
2785
|
+
interface LinkedEditingRanges {
|
|
2786
|
+
/**
|
|
2787
|
+
* A list of ranges that can be edited together. The ranges must have
|
|
2788
|
+
* identical length and text content. The ranges cannot overlap
|
|
2789
|
+
*/
|
|
2790
|
+
ranges: IRange[];
|
|
2791
|
+
/**
|
|
2792
|
+
* An optional word pattern that describes valid contents for the given ranges.
|
|
2793
|
+
* If no pattern is provided, the language configuration's word pattern will be used.
|
|
2794
|
+
*/
|
|
2795
|
+
wordPattern?: RegExp;
|
|
2796
|
+
}
|
|
2797
|
+
/**
|
|
2798
|
+
* Value-object that contains additional information when
|
|
2799
|
+
* requesting references.
|
|
2800
|
+
*/
|
|
2801
|
+
interface ReferenceContext {
|
|
2802
|
+
/**
|
|
2803
|
+
* Include the declaration of the current symbol.
|
|
2804
|
+
*/
|
|
2805
|
+
includeDeclaration: boolean;
|
|
2806
|
+
}
|
|
2807
|
+
/**
|
|
2808
|
+
* The reference provider interface defines the contract between extensions and
|
|
2809
|
+
* the [find references](https://code.visualstudio.com/docs/editor/editingevolved#_peek)-feature.
|
|
2810
|
+
*/
|
|
2811
|
+
interface ReferenceProvider {
|
|
2812
|
+
/**
|
|
2813
|
+
* Provide a set of project-wide references for the given position and document.
|
|
2814
|
+
*/
|
|
2815
|
+
provideReferences(model: ITextModel, position: Position, context: ReferenceContext, token: CancellationToken): ProviderResult<Location[]>;
|
|
2816
|
+
}
|
|
2817
|
+
/**
|
|
2818
|
+
* Represents a location inside a resource, such as a line
|
|
2819
|
+
* inside a text file.
|
|
2820
|
+
*/
|
|
2821
|
+
interface Location {
|
|
2822
|
+
/**
|
|
2823
|
+
* The resource identifier of this location.
|
|
2824
|
+
*/
|
|
2825
|
+
uri: URI;
|
|
2826
|
+
/**
|
|
2827
|
+
* The document range of this locations.
|
|
2828
|
+
*/
|
|
2829
|
+
range: IRange;
|
|
2830
|
+
}
|
|
2831
|
+
interface LocationLink {
|
|
2832
|
+
/**
|
|
2833
|
+
* A range to select where this link originates from.
|
|
2834
|
+
*/
|
|
2835
|
+
originSelectionRange?: IRange;
|
|
2836
|
+
/**
|
|
2837
|
+
* The target uri this link points to.
|
|
2838
|
+
*/
|
|
2839
|
+
uri: URI;
|
|
2840
|
+
/**
|
|
2841
|
+
* The full range this link points to.
|
|
2842
|
+
*/
|
|
2843
|
+
range: IRange;
|
|
2844
|
+
/**
|
|
2845
|
+
* A range to select this link points to. Must be contained
|
|
2846
|
+
* in `LocationLink.range`.
|
|
2847
|
+
*/
|
|
2848
|
+
targetSelectionRange?: IRange;
|
|
2849
|
+
}
|
|
2850
|
+
declare type Definition = Location | Location[] | LocationLink[];
|
|
2851
|
+
/**
|
|
2852
|
+
* The definition provider interface defines the contract between extensions and
|
|
2853
|
+
* the [go to definition](https://code.visualstudio.com/docs/editor/editingevolved#_go-to-definition)
|
|
2854
|
+
* and peek definition features.
|
|
2855
|
+
*/
|
|
2856
|
+
interface DefinitionProvider {
|
|
2857
|
+
/**
|
|
2858
|
+
* Provide the definition of the symbol at the given position and document.
|
|
2859
|
+
*/
|
|
2860
|
+
provideDefinition(model: ITextModel, position: Position, token: CancellationToken): ProviderResult<Definition | LocationLink[]>;
|
|
2861
|
+
}
|
|
2862
|
+
/**
|
|
2863
|
+
* The definition provider interface defines the contract between extensions and
|
|
2864
|
+
* the [go to definition](https://code.visualstudio.com/docs/editor/editingevolved#_go-to-definition)
|
|
2865
|
+
* and peek definition features.
|
|
2866
|
+
*/
|
|
2867
|
+
interface DeclarationProvider {
|
|
2868
|
+
/**
|
|
2869
|
+
* Provide the declaration of the symbol at the given position and document.
|
|
2870
|
+
*/
|
|
2871
|
+
provideDeclaration(model: ITextModel, position: Position, token: CancellationToken): ProviderResult<Definition | LocationLink[]>;
|
|
2872
|
+
}
|
|
2873
|
+
/**
|
|
2874
|
+
* The implementation provider interface defines the contract between extensions and
|
|
2875
|
+
* the go to implementation feature.
|
|
2876
|
+
*/
|
|
2877
|
+
interface ImplementationProvider {
|
|
2878
|
+
/**
|
|
2879
|
+
* Provide the implementation of the symbol at the given position and document.
|
|
2880
|
+
*/
|
|
2881
|
+
provideImplementation(model: ITextModel, position: Position, token: CancellationToken): ProviderResult<Definition | LocationLink[]>;
|
|
2882
|
+
}
|
|
2883
|
+
/**
|
|
2884
|
+
* The type definition provider interface defines the contract between extensions and
|
|
2885
|
+
* the go to type definition feature.
|
|
2886
|
+
*/
|
|
2887
|
+
interface TypeDefinitionProvider {
|
|
2888
|
+
/**
|
|
2889
|
+
* Provide the type definition of the symbol at the given position and document.
|
|
2890
|
+
*/
|
|
2891
|
+
provideTypeDefinition(model: ITextModel, position: Position, token: CancellationToken): ProviderResult<Definition | LocationLink[]>;
|
|
2892
|
+
}
|
|
2893
|
+
/**
|
|
2894
|
+
* A symbol kind.
|
|
2895
|
+
*/
|
|
2896
|
+
declare const enum SymbolKind {
|
|
2897
|
+
File = 0,
|
|
2898
|
+
Module = 1,
|
|
2899
|
+
Namespace = 2,
|
|
2900
|
+
Package = 3,
|
|
2901
|
+
Class = 4,
|
|
2902
|
+
Method = 5,
|
|
2903
|
+
Property = 6,
|
|
2904
|
+
Field = 7,
|
|
2905
|
+
Constructor = 8,
|
|
2906
|
+
Enum = 9,
|
|
2907
|
+
Interface = 10,
|
|
2908
|
+
Function = 11,
|
|
2909
|
+
Variable = 12,
|
|
2910
|
+
Constant = 13,
|
|
2911
|
+
String = 14,
|
|
2912
|
+
Number = 15,
|
|
2913
|
+
Boolean = 16,
|
|
2914
|
+
Array = 17,
|
|
2915
|
+
Object = 18,
|
|
2916
|
+
Key = 19,
|
|
2917
|
+
Null = 20,
|
|
2918
|
+
EnumMember = 21,
|
|
2919
|
+
Struct = 22,
|
|
2920
|
+
Event = 23,
|
|
2921
|
+
Operator = 24,
|
|
2922
|
+
TypeParameter = 25
|
|
2923
|
+
}
|
|
2924
|
+
declare const enum SymbolTag {
|
|
2925
|
+
Deprecated = 1
|
|
2926
|
+
}
|
|
2927
|
+
interface DocumentSymbol {
|
|
2928
|
+
name: string;
|
|
2929
|
+
detail: string;
|
|
2930
|
+
kind: SymbolKind;
|
|
2931
|
+
tags: ReadonlyArray<SymbolTag>;
|
|
2932
|
+
containerName?: string;
|
|
2933
|
+
range: IRange;
|
|
2934
|
+
selectionRange: IRange;
|
|
2935
|
+
children?: DocumentSymbol[];
|
|
2936
|
+
}
|
|
2937
|
+
/**
|
|
2938
|
+
* The document symbol provider interface defines the contract between extensions and
|
|
2939
|
+
* the [go to symbol](https://code.visualstudio.com/docs/editor/editingevolved#_go-to-symbol)-feature.
|
|
2940
|
+
*/
|
|
2941
|
+
interface DocumentSymbolProvider {
|
|
2942
|
+
displayName?: string;
|
|
2943
|
+
/**
|
|
2944
|
+
* Provide symbol information for the given document.
|
|
2945
|
+
*/
|
|
2946
|
+
provideDocumentSymbols(model: ITextModel, token: CancellationToken): ProviderResult<DocumentSymbol[]>;
|
|
2947
|
+
}
|
|
2948
|
+
interface TextEdit {
|
|
2949
|
+
range: IRange;
|
|
2950
|
+
text: string;
|
|
2951
|
+
eol?: EndOfLineSequence;
|
|
2952
|
+
}
|
|
2953
|
+
/**
|
|
2954
|
+
* Interface used to format a model
|
|
2955
|
+
*/
|
|
2956
|
+
interface FormattingOptions {
|
|
2957
|
+
/**
|
|
2958
|
+
* Size of a tab in spaces.
|
|
2959
|
+
*/
|
|
2960
|
+
tabSize: number;
|
|
2961
|
+
/**
|
|
2962
|
+
* Prefer spaces over tabs.
|
|
2963
|
+
*/
|
|
2964
|
+
insertSpaces: boolean;
|
|
2965
|
+
}
|
|
2966
|
+
/**
|
|
2967
|
+
* The document formatting provider interface defines the contract between extensions and
|
|
2968
|
+
* the formatting-feature.
|
|
2969
|
+
*/
|
|
2970
|
+
interface DocumentFormattingEditProvider {
|
|
2971
|
+
/**
|
|
2972
|
+
* @internal
|
|
2973
|
+
*/
|
|
2974
|
+
readonly extensionId?: ExtensionIdentifier;
|
|
2975
|
+
readonly displayName?: string;
|
|
2976
|
+
/**
|
|
2977
|
+
* Provide formatting edits for a whole document.
|
|
2978
|
+
*/
|
|
2979
|
+
provideDocumentFormattingEdits(model: ITextModel, options: FormattingOptions, token: CancellationToken): ProviderResult<TextEdit[]>;
|
|
2980
|
+
}
|
|
2981
|
+
/**
|
|
2982
|
+
* The document formatting provider interface defines the contract between extensions and
|
|
2983
|
+
* the formatting-feature.
|
|
2984
|
+
*/
|
|
2985
|
+
interface DocumentRangeFormattingEditProvider {
|
|
2986
|
+
/**
|
|
2987
|
+
* @internal
|
|
2988
|
+
*/
|
|
2989
|
+
readonly extensionId?: ExtensionIdentifier;
|
|
2990
|
+
readonly displayName?: string;
|
|
2991
|
+
/**
|
|
2992
|
+
* Provide formatting edits for a range in a document.
|
|
2993
|
+
*
|
|
2994
|
+
* The given range is a hint and providers can decide to format a smaller
|
|
2995
|
+
* or larger range. Often this is done by adjusting the start and end
|
|
2996
|
+
* of the range to full syntax nodes.
|
|
2997
|
+
*/
|
|
2998
|
+
provideDocumentRangeFormattingEdits(model: ITextModel, range: Range, options: FormattingOptions, token: CancellationToken): ProviderResult<TextEdit[]>;
|
|
2999
|
+
}
|
|
3000
|
+
/**
|
|
3001
|
+
* The document formatting provider interface defines the contract between extensions and
|
|
3002
|
+
* the formatting-feature.
|
|
3003
|
+
*/
|
|
3004
|
+
interface OnTypeFormattingEditProvider {
|
|
3005
|
+
/**
|
|
3006
|
+
* @internal
|
|
3007
|
+
*/
|
|
3008
|
+
readonly extensionId?: ExtensionIdentifier;
|
|
3009
|
+
autoFormatTriggerCharacters: string[];
|
|
3010
|
+
/**
|
|
3011
|
+
* Provide formatting edits after a character has been typed.
|
|
3012
|
+
*
|
|
3013
|
+
* The given position and character should hint to the provider
|
|
3014
|
+
* what range the position to expand to, like find the matching `{`
|
|
3015
|
+
* when `}` has been entered.
|
|
3016
|
+
*/
|
|
3017
|
+
provideOnTypeFormattingEdits(model: ITextModel, position: Position, ch: string, options: FormattingOptions, token: CancellationToken): ProviderResult<TextEdit[]>;
|
|
3018
|
+
}
|
|
3019
|
+
/**
|
|
3020
|
+
* A link inside the editor.
|
|
3021
|
+
*/
|
|
3022
|
+
interface ILink {
|
|
3023
|
+
range: IRange;
|
|
3024
|
+
url?: URI | string;
|
|
3025
|
+
tooltip?: string;
|
|
3026
|
+
}
|
|
3027
|
+
interface ILinksList {
|
|
3028
|
+
links: ILink[];
|
|
3029
|
+
dispose?(): void;
|
|
3030
|
+
}
|
|
3031
|
+
/**
|
|
3032
|
+
* A provider of links.
|
|
3033
|
+
*/
|
|
3034
|
+
interface LinkProvider {
|
|
3035
|
+
provideLinks(model: ITextModel, token: CancellationToken): ProviderResult<ILinksList>;
|
|
3036
|
+
resolveLink?: (link: ILink, token: CancellationToken) => ProviderResult<ILink>;
|
|
3037
|
+
}
|
|
3038
|
+
/**
|
|
3039
|
+
* A color in RGBA format.
|
|
3040
|
+
*/
|
|
3041
|
+
interface IColor {
|
|
3042
|
+
/**
|
|
3043
|
+
* The red component in the range [0-1].
|
|
3044
|
+
*/
|
|
3045
|
+
readonly red: number;
|
|
3046
|
+
/**
|
|
3047
|
+
* The green component in the range [0-1].
|
|
3048
|
+
*/
|
|
3049
|
+
readonly green: number;
|
|
3050
|
+
/**
|
|
3051
|
+
* The blue component in the range [0-1].
|
|
3052
|
+
*/
|
|
3053
|
+
readonly blue: number;
|
|
3054
|
+
/**
|
|
3055
|
+
* The alpha component in the range [0-1].
|
|
3056
|
+
*/
|
|
3057
|
+
readonly alpha: number;
|
|
3058
|
+
}
|
|
3059
|
+
/**
|
|
3060
|
+
* String representations for a color
|
|
3061
|
+
*/
|
|
3062
|
+
interface IColorPresentation {
|
|
3063
|
+
/**
|
|
3064
|
+
* The label of this color presentation. It will be shown on the color
|
|
3065
|
+
* picker header. By default this is also the text that is inserted when selecting
|
|
3066
|
+
* this color presentation.
|
|
3067
|
+
*/
|
|
3068
|
+
label: string;
|
|
3069
|
+
/**
|
|
3070
|
+
* An {@link TextEdit edit} which is applied to a document when selecting
|
|
3071
|
+
* this presentation for the color.
|
|
3072
|
+
*/
|
|
3073
|
+
textEdit?: TextEdit;
|
|
3074
|
+
/**
|
|
3075
|
+
* An optional array of additional {@link TextEdit text edits} that are applied when
|
|
3076
|
+
* selecting this color presentation.
|
|
3077
|
+
*/
|
|
3078
|
+
additionalTextEdits?: TextEdit[];
|
|
3079
|
+
}
|
|
3080
|
+
/**
|
|
3081
|
+
* A color range is a range in a text model which represents a color.
|
|
3082
|
+
*/
|
|
3083
|
+
interface IColorInformation {
|
|
3084
|
+
/**
|
|
3085
|
+
* The range within the model.
|
|
3086
|
+
*/
|
|
3087
|
+
range: IRange;
|
|
3088
|
+
/**
|
|
3089
|
+
* The color represented in this range.
|
|
3090
|
+
*/
|
|
3091
|
+
color: IColor;
|
|
3092
|
+
}
|
|
3093
|
+
/**
|
|
3094
|
+
* A provider of colors for editor models.
|
|
3095
|
+
*/
|
|
3096
|
+
interface DocumentColorProvider {
|
|
3097
|
+
/**
|
|
3098
|
+
* Provides the color ranges for a specific model.
|
|
3099
|
+
*/
|
|
3100
|
+
provideDocumentColors(model: ITextModel, token: CancellationToken): ProviderResult<IColorInformation[]>;
|
|
3101
|
+
/**
|
|
3102
|
+
* Provide the string representations for a color.
|
|
3103
|
+
*/
|
|
3104
|
+
provideColorPresentations(model: ITextModel, colorInfo: IColorInformation, token: CancellationToken): ProviderResult<IColorPresentation[]>;
|
|
3105
|
+
}
|
|
3106
|
+
interface SelectionRange {
|
|
3107
|
+
range: IRange;
|
|
3108
|
+
}
|
|
3109
|
+
interface SelectionRangeProvider {
|
|
3110
|
+
/**
|
|
3111
|
+
* Provide ranges that should be selected from the given position.
|
|
3112
|
+
*/
|
|
3113
|
+
provideSelectionRanges(model: ITextModel, positions: Position[], token: CancellationToken): ProviderResult<SelectionRange[][]>;
|
|
3114
|
+
}
|
|
3115
|
+
interface FoldingContext {
|
|
3116
|
+
}
|
|
3117
|
+
/**
|
|
3118
|
+
* A provider of folding ranges for editor models.
|
|
3119
|
+
*/
|
|
3120
|
+
interface FoldingRangeProvider {
|
|
3121
|
+
/**
|
|
3122
|
+
* An optional event to signal that the folding ranges from this provider have changed.
|
|
3123
|
+
*/
|
|
3124
|
+
onDidChange?: Event<this>;
|
|
3125
|
+
/**
|
|
3126
|
+
* Provides the folding ranges for a specific model.
|
|
3127
|
+
*/
|
|
3128
|
+
provideFoldingRanges(model: ITextModel, context: FoldingContext, token: CancellationToken): ProviderResult<FoldingRange[]>;
|
|
3129
|
+
}
|
|
3130
|
+
interface FoldingRange {
|
|
3131
|
+
/**
|
|
3132
|
+
* The one-based start line of the range to fold. The folded area starts after the line's last character.
|
|
3133
|
+
*/
|
|
3134
|
+
start: number;
|
|
3135
|
+
/**
|
|
3136
|
+
* The one-based end line of the range to fold. The folded area ends with the line's last character.
|
|
3137
|
+
*/
|
|
3138
|
+
end: number;
|
|
3139
|
+
/**
|
|
3140
|
+
* Describes the {@link FoldingRangeKind Kind} of the folding range such as {@link FoldingRangeKind.Comment Comment} or
|
|
3141
|
+
* {@link FoldingRangeKind.Region Region}. The kind is used to categorize folding ranges and used by commands
|
|
3142
|
+
* like 'Fold all comments'. See
|
|
3143
|
+
* {@link FoldingRangeKind} for an enumeration of standardized kinds.
|
|
3144
|
+
*/
|
|
3145
|
+
kind?: FoldingRangeKind;
|
|
3146
|
+
}
|
|
3147
|
+
declare class FoldingRangeKind {
|
|
3148
|
+
value: string;
|
|
3149
|
+
/**
|
|
3150
|
+
* Kind for folding range representing a comment. The value of the kind is 'comment'.
|
|
3151
|
+
*/
|
|
3152
|
+
static readonly Comment: FoldingRangeKind;
|
|
3153
|
+
/**
|
|
3154
|
+
* Kind for folding range representing a import. The value of the kind is 'imports'.
|
|
3155
|
+
*/
|
|
3156
|
+
static readonly Imports: FoldingRangeKind;
|
|
3157
|
+
/**
|
|
3158
|
+
* Kind for folding range representing regions (for example marked by `#region`, `#endregion`).
|
|
3159
|
+
* The value of the kind is 'region'.
|
|
3160
|
+
*/
|
|
3161
|
+
static readonly Region: FoldingRangeKind;
|
|
3162
|
+
/**
|
|
3163
|
+
* Creates a new {@link FoldingRangeKind}.
|
|
3164
|
+
*
|
|
3165
|
+
* @param value of the kind.
|
|
3166
|
+
*/
|
|
3167
|
+
constructor(value: string);
|
|
3168
|
+
}
|
|
3169
|
+
interface WorkspaceEditMetadata {
|
|
3170
|
+
needsConfirmation: boolean;
|
|
3171
|
+
label: string;
|
|
3172
|
+
description?: string;
|
|
3173
|
+
/**
|
|
3174
|
+
* @internal
|
|
3175
|
+
*/
|
|
3176
|
+
iconPath?: ThemeIcon | URI | {
|
|
3177
|
+
light: URI;
|
|
3178
|
+
dark: URI;
|
|
3179
|
+
};
|
|
3180
|
+
}
|
|
3181
|
+
interface WorkspaceFileEditOptions {
|
|
3182
|
+
overwrite?: boolean;
|
|
3183
|
+
ignoreIfNotExists?: boolean;
|
|
3184
|
+
ignoreIfExists?: boolean;
|
|
3185
|
+
recursive?: boolean;
|
|
3186
|
+
copy?: boolean;
|
|
3187
|
+
folder?: boolean;
|
|
3188
|
+
skipTrashBin?: boolean;
|
|
3189
|
+
maxSize?: number;
|
|
3190
|
+
}
|
|
3191
|
+
interface IWorkspaceFileEdit {
|
|
3192
|
+
oldResource?: URI;
|
|
3193
|
+
newResource?: URI;
|
|
3194
|
+
options?: WorkspaceFileEditOptions;
|
|
3195
|
+
metadata?: WorkspaceEditMetadata;
|
|
3196
|
+
}
|
|
3197
|
+
interface IWorkspaceTextEdit {
|
|
3198
|
+
resource: URI;
|
|
3199
|
+
textEdit: TextEdit & {
|
|
3200
|
+
insertAsSnippet?: boolean;
|
|
3201
|
+
};
|
|
3202
|
+
versionId: number | undefined;
|
|
3203
|
+
metadata?: WorkspaceEditMetadata;
|
|
3204
|
+
}
|
|
3205
|
+
interface WorkspaceEdit {
|
|
3206
|
+
edits: Array<IWorkspaceTextEdit | IWorkspaceFileEdit>;
|
|
3207
|
+
}
|
|
3208
|
+
interface Rejection {
|
|
3209
|
+
rejectReason?: string;
|
|
3210
|
+
}
|
|
3211
|
+
interface RenameLocation {
|
|
3212
|
+
range: IRange;
|
|
3213
|
+
text: string;
|
|
3214
|
+
}
|
|
3215
|
+
interface RenameProvider {
|
|
3216
|
+
provideRenameEdits(model: ITextModel, position: Position, newName: string, token: CancellationToken): ProviderResult<WorkspaceEdit & Rejection>;
|
|
3217
|
+
resolveRenameLocation?(model: ITextModel, position: Position, token: CancellationToken): ProviderResult<RenameLocation & Rejection>;
|
|
3218
|
+
}
|
|
3219
|
+
interface Command {
|
|
3220
|
+
id: string;
|
|
3221
|
+
title: string;
|
|
3222
|
+
tooltip?: string;
|
|
3223
|
+
arguments?: any[];
|
|
3224
|
+
}
|
|
3225
|
+
/**
|
|
3226
|
+
* @internal
|
|
3227
|
+
*/
|
|
3228
|
+
declare namespace Command {
|
|
3229
|
+
/**
|
|
3230
|
+
* @internal
|
|
3231
|
+
*/
|
|
3232
|
+
function is(obj: any): obj is Command;
|
|
3233
|
+
}
|
|
3234
|
+
interface CodeLens {
|
|
3235
|
+
range: IRange;
|
|
3236
|
+
id?: string;
|
|
3237
|
+
command?: Command;
|
|
3238
|
+
}
|
|
3239
|
+
interface CodeLensList {
|
|
3240
|
+
lenses: CodeLens[];
|
|
3241
|
+
dispose(): void;
|
|
3242
|
+
}
|
|
3243
|
+
interface CodeLensProvider {
|
|
3244
|
+
onDidChange?: Event<this>;
|
|
3245
|
+
provideCodeLenses(model: ITextModel, token: CancellationToken): ProviderResult<CodeLensList>;
|
|
3246
|
+
resolveCodeLens?(model: ITextModel, codeLens: CodeLens, token: CancellationToken): ProviderResult<CodeLens>;
|
|
3247
|
+
}
|
|
3248
|
+
declare enum InlayHintKind {
|
|
3249
|
+
Type = 1,
|
|
3250
|
+
Parameter = 2
|
|
3251
|
+
}
|
|
3252
|
+
interface InlayHintLabelPart {
|
|
3253
|
+
label: string;
|
|
3254
|
+
tooltip?: string | IMarkdownString;
|
|
3255
|
+
command?: Command;
|
|
3256
|
+
location?: Location;
|
|
3257
|
+
}
|
|
3258
|
+
interface InlayHint {
|
|
3259
|
+
label: string | InlayHintLabelPart[];
|
|
3260
|
+
tooltip?: string | IMarkdownString;
|
|
3261
|
+
textEdits?: TextEdit[];
|
|
3262
|
+
position: IPosition;
|
|
3263
|
+
kind?: InlayHintKind;
|
|
3264
|
+
paddingLeft?: boolean;
|
|
3265
|
+
paddingRight?: boolean;
|
|
3266
|
+
}
|
|
3267
|
+
interface InlayHintList {
|
|
3268
|
+
hints: InlayHint[];
|
|
3269
|
+
dispose(): void;
|
|
3270
|
+
}
|
|
3271
|
+
interface InlayHintsProvider {
|
|
3272
|
+
displayName?: string;
|
|
3273
|
+
onDidChangeInlayHints?: Event<void>;
|
|
3274
|
+
provideInlayHints(model: ITextModel, range: Range, token: CancellationToken): ProviderResult<InlayHintList>;
|
|
3275
|
+
resolveInlayHint?(hint: InlayHint, token: CancellationToken): ProviderResult<InlayHint>;
|
|
3276
|
+
}
|
|
3277
|
+
interface SemanticTokensLegend {
|
|
3278
|
+
readonly tokenTypes: string[];
|
|
3279
|
+
readonly tokenModifiers: string[];
|
|
3280
|
+
}
|
|
3281
|
+
interface SemanticTokens {
|
|
3282
|
+
readonly resultId?: string;
|
|
3283
|
+
readonly data: Uint32Array;
|
|
3284
|
+
}
|
|
3285
|
+
interface SemanticTokensEdit {
|
|
3286
|
+
readonly start: number;
|
|
3287
|
+
readonly deleteCount: number;
|
|
3288
|
+
readonly data?: Uint32Array;
|
|
3289
|
+
}
|
|
3290
|
+
interface SemanticTokensEdits {
|
|
3291
|
+
readonly resultId?: string;
|
|
3292
|
+
readonly edits: SemanticTokensEdit[];
|
|
3293
|
+
}
|
|
3294
|
+
interface DocumentSemanticTokensProvider {
|
|
3295
|
+
onDidChange?: Event<void>;
|
|
3296
|
+
getLegend(): SemanticTokensLegend;
|
|
3297
|
+
provideDocumentSemanticTokens(model: ITextModel, lastResultId: string | null, token: CancellationToken): ProviderResult<SemanticTokens | SemanticTokensEdits>;
|
|
3298
|
+
releaseDocumentSemanticTokens(resultId: string | undefined): void;
|
|
3299
|
+
}
|
|
3300
|
+
interface DocumentRangeSemanticTokensProvider {
|
|
3301
|
+
getLegend(): SemanticTokensLegend;
|
|
3302
|
+
provideDocumentRangeSemanticTokens(model: ITextModel, range: Range, token: CancellationToken): ProviderResult<SemanticTokens>;
|
|
3303
|
+
}
|
|
3304
|
+
/**
|
|
3305
|
+
* @internal
|
|
3306
|
+
*/
|
|
3307
|
+
interface DocumentOnDropEdit {
|
|
3308
|
+
insertText: string | {
|
|
3309
|
+
snippet: string;
|
|
3310
|
+
};
|
|
3311
|
+
additionalEdit?: WorkspaceEdit;
|
|
3312
|
+
}
|
|
3313
|
+
/**
|
|
3314
|
+
* @internal
|
|
3315
|
+
*/
|
|
3316
|
+
interface DocumentOnDropEditProvider {
|
|
3317
|
+
provideDocumentOnDropEdits(model: ITextModel, position: IPosition, dataTransfer: VSDataTransfer, token: CancellationToken): ProviderResult<DocumentOnDropEdit>;
|
|
3318
|
+
}
|
|
3319
|
+
|
|
3320
|
+
interface IViewLineTokens {
|
|
3321
|
+
equals(other: IViewLineTokens): boolean;
|
|
3322
|
+
getCount(): number;
|
|
3323
|
+
getForeground(tokenIndex: number): ColorId;
|
|
3324
|
+
getEndOffset(tokenIndex: number): number;
|
|
3325
|
+
getClassName(tokenIndex: number): string;
|
|
3326
|
+
getInlineStyle(tokenIndex: number, colorMap: string[]): string;
|
|
3327
|
+
getPresentation(tokenIndex: number): ITokenPresentation;
|
|
3328
|
+
findTokenIndexAtOffset(offset: number): number;
|
|
3329
|
+
getLineContent(): string;
|
|
3330
|
+
getMetadata(tokenIndex: number): number;
|
|
3331
|
+
getLanguageId(tokenIndex: number): string;
|
|
3332
|
+
}
|
|
3333
|
+
declare class LineTokens implements IViewLineTokens {
|
|
3334
|
+
_lineTokensBrand: void;
|
|
3335
|
+
private readonly _tokens;
|
|
3336
|
+
private readonly _tokensCount;
|
|
3337
|
+
private readonly _text;
|
|
3338
|
+
private readonly _languageIdCodec;
|
|
3339
|
+
static defaultTokenMetadata: number;
|
|
3340
|
+
static createEmpty(lineContent: string, decoder: ILanguageIdCodec): LineTokens;
|
|
3341
|
+
constructor(tokens: Uint32Array, text: string, decoder: ILanguageIdCodec);
|
|
3342
|
+
equals(other: IViewLineTokens): boolean;
|
|
3343
|
+
slicedEquals(other: LineTokens, sliceFromTokenIndex: number, sliceTokenCount: number): boolean;
|
|
3344
|
+
getLineContent(): string;
|
|
3345
|
+
getCount(): number;
|
|
3346
|
+
getStartOffset(tokenIndex: number): number;
|
|
3347
|
+
getMetadata(tokenIndex: number): number;
|
|
3348
|
+
getLanguageId(tokenIndex: number): string;
|
|
3349
|
+
getStandardTokenType(tokenIndex: number): StandardTokenType;
|
|
3350
|
+
getForeground(tokenIndex: number): ColorId;
|
|
3351
|
+
getClassName(tokenIndex: number): string;
|
|
3352
|
+
getInlineStyle(tokenIndex: number, colorMap: string[]): string;
|
|
3353
|
+
getPresentation(tokenIndex: number): ITokenPresentation;
|
|
3354
|
+
getEndOffset(tokenIndex: number): number;
|
|
3355
|
+
/**
|
|
3356
|
+
* Find the token containing offset `offset`.
|
|
3357
|
+
* @param offset The search offset
|
|
3358
|
+
* @return The index of the token containing the offset.
|
|
3359
|
+
*/
|
|
3360
|
+
findTokenIndexAtOffset(offset: number): number;
|
|
3361
|
+
inflate(): IViewLineTokens;
|
|
3362
|
+
sliceAndInflate(startOffset: number, endOffset: number, deltaOffset: number): IViewLineTokens;
|
|
3363
|
+
static convertToEndOffset(tokens: Uint32Array, lineTextLength: number): void;
|
|
3364
|
+
static findIndexInTokensArray(tokens: Uint32Array, desiredIndex: number): number;
|
|
3365
|
+
/**
|
|
3366
|
+
* @pure
|
|
3367
|
+
* @param insertTokens Must be sorted by offset.
|
|
3368
|
+
*/
|
|
3369
|
+
withInserted(insertTokens: {
|
|
3370
|
+
offset: number;
|
|
3371
|
+
text: string;
|
|
3372
|
+
tokenMetadata: number;
|
|
3373
|
+
}[]): LineTokens;
|
|
3374
|
+
}
|
|
3375
|
+
|
|
3376
|
+
declare class ScopedLineTokens {
|
|
3377
|
+
_scopedLineTokensBrand: void;
|
|
3378
|
+
readonly languageId: string;
|
|
3379
|
+
private readonly _actual;
|
|
3380
|
+
private readonly _firstTokenIndex;
|
|
3381
|
+
private readonly _lastTokenIndex;
|
|
3382
|
+
readonly firstCharOffset: number;
|
|
3383
|
+
private readonly _lastCharOffset;
|
|
3384
|
+
constructor(actual: LineTokens, languageId: string, firstTokenIndex: number, lastTokenIndex: number, firstCharOffset: number, lastCharOffset: number);
|
|
3385
|
+
getLineContent(): string;
|
|
3386
|
+
getActualLineContentBefore(offset: number): string;
|
|
3387
|
+
getTokenCount(): number;
|
|
3388
|
+
findTokenIndexAtOffset(offset: number): number;
|
|
3389
|
+
getStandardTokenType(tokenIndex: number): StandardTokenType;
|
|
3390
|
+
}
|
|
3391
|
+
|
|
3392
|
+
/**
|
|
3393
|
+
* Describes how comments for a language work.
|
|
3394
|
+
*/
|
|
3395
|
+
interface CommentRule {
|
|
3396
|
+
/**
|
|
3397
|
+
* The line comment token, like `// this is a comment`
|
|
3398
|
+
*/
|
|
3399
|
+
lineComment?: string | null;
|
|
3400
|
+
/**
|
|
3401
|
+
* The block comment character pair, like `/* block comment */`
|
|
3402
|
+
*/
|
|
3403
|
+
blockComment?: CharacterPair | null;
|
|
3404
|
+
}
|
|
3405
|
+
/**
|
|
3406
|
+
* The language configuration interface defines the contract between extensions and
|
|
3407
|
+
* various editor features, like automatic bracket insertion, automatic indentation etc.
|
|
3408
|
+
*/
|
|
3409
|
+
interface LanguageConfiguration {
|
|
3410
|
+
/**
|
|
3411
|
+
* The language's comment settings.
|
|
3412
|
+
*/
|
|
3413
|
+
comments?: CommentRule;
|
|
3414
|
+
/**
|
|
3415
|
+
* The language's brackets.
|
|
3416
|
+
* This configuration implicitly affects pressing Enter around these brackets.
|
|
3417
|
+
*/
|
|
3418
|
+
brackets?: CharacterPair[];
|
|
3419
|
+
/**
|
|
3420
|
+
* The language's word definition.
|
|
3421
|
+
* If the language supports Unicode identifiers (e.g. JavaScript), it is preferable
|
|
3422
|
+
* to provide a word definition that uses exclusion of known separators.
|
|
3423
|
+
* e.g.: A regex that matches anything except known separators (and dot is allowed to occur in a floating point number):
|
|
3424
|
+
* /(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g
|
|
3425
|
+
*/
|
|
3426
|
+
wordPattern?: RegExp;
|
|
3427
|
+
/**
|
|
3428
|
+
* The language's indentation settings.
|
|
3429
|
+
*/
|
|
3430
|
+
indentationRules?: IndentationRule;
|
|
3431
|
+
/**
|
|
3432
|
+
* The language's rules to be evaluated when pressing Enter.
|
|
3433
|
+
*/
|
|
3434
|
+
onEnterRules?: OnEnterRule[];
|
|
3435
|
+
/**
|
|
3436
|
+
* The language's auto closing pairs. The 'close' character is automatically inserted with the
|
|
3437
|
+
* 'open' character is typed. If not set, the configured brackets will be used.
|
|
3438
|
+
*/
|
|
3439
|
+
autoClosingPairs?: IAutoClosingPairConditional[];
|
|
3440
|
+
/**
|
|
3441
|
+
* The language's surrounding pairs. When the 'open' character is typed on a selection, the
|
|
3442
|
+
* selected string is surrounded by the open and close characters. If not set, the autoclosing pairs
|
|
3443
|
+
* settings will be used.
|
|
3444
|
+
*/
|
|
3445
|
+
surroundingPairs?: IAutoClosingPair[];
|
|
3446
|
+
/**
|
|
3447
|
+
* Defines a list of bracket pairs that are colorized depending on their nesting level.
|
|
3448
|
+
* If not set, the configured brackets will be used.
|
|
3449
|
+
*/
|
|
3450
|
+
colorizedBracketPairs?: CharacterPair[];
|
|
3451
|
+
/**
|
|
3452
|
+
* Defines what characters must be after the cursor for bracket or quote autoclosing to occur when using the \'languageDefined\' autoclosing setting.
|
|
3453
|
+
*
|
|
3454
|
+
* This is typically the set of characters which can not start an expression, such as whitespace, closing brackets, non-unary operators, etc.
|
|
3455
|
+
*/
|
|
3456
|
+
autoCloseBefore?: string;
|
|
3457
|
+
/**
|
|
3458
|
+
* The language's folding rules.
|
|
3459
|
+
*/
|
|
3460
|
+
folding?: FoldingRules;
|
|
3461
|
+
/**
|
|
3462
|
+
* **Deprecated** Do not use.
|
|
3463
|
+
*
|
|
3464
|
+
* @deprecated Will be replaced by a better API soon.
|
|
3465
|
+
*/
|
|
3466
|
+
__electricCharacterSupport?: {
|
|
3467
|
+
docComment?: IDocComment;
|
|
3468
|
+
};
|
|
3469
|
+
}
|
|
3470
|
+
/**
|
|
3471
|
+
* Describes indentation rules for a language.
|
|
3472
|
+
*/
|
|
3473
|
+
interface IndentationRule {
|
|
3474
|
+
/**
|
|
3475
|
+
* If a line matches this pattern, then all the lines after it should be unindented once (until another rule matches).
|
|
3476
|
+
*/
|
|
3477
|
+
decreaseIndentPattern: RegExp;
|
|
3478
|
+
/**
|
|
3479
|
+
* If a line matches this pattern, then all the lines after it should be indented once (until another rule matches).
|
|
3480
|
+
*/
|
|
3481
|
+
increaseIndentPattern: RegExp;
|
|
3482
|
+
/**
|
|
3483
|
+
* If a line matches this pattern, then **only the next line** after it should be indented once.
|
|
3484
|
+
*/
|
|
3485
|
+
indentNextLinePattern?: RegExp | null;
|
|
3486
|
+
/**
|
|
3487
|
+
* If a line matches this pattern, then its indentation should not be changed and it should not be evaluated against the other rules.
|
|
3488
|
+
*/
|
|
3489
|
+
unIndentedLinePattern?: RegExp | null;
|
|
3490
|
+
}
|
|
3491
|
+
/**
|
|
3492
|
+
* Describes language specific folding markers such as '#region' and '#endregion'.
|
|
3493
|
+
* The start and end regexes will be tested against the contents of all lines and must be designed efficiently:
|
|
3494
|
+
* - the regex should start with '^'
|
|
3495
|
+
* - regexp flags (i, g) are ignored
|
|
3496
|
+
*/
|
|
3497
|
+
interface FoldingMarkers {
|
|
3498
|
+
start: RegExp;
|
|
3499
|
+
end: RegExp;
|
|
3500
|
+
}
|
|
3501
|
+
/**
|
|
3502
|
+
* Describes folding rules for a language.
|
|
3503
|
+
*/
|
|
3504
|
+
interface FoldingRules {
|
|
3505
|
+
/**
|
|
3506
|
+
* Used by the indentation based strategy to decide whether empty lines belong to the previous or the next block.
|
|
3507
|
+
* A language adheres to the off-side rule if blocks in that language are expressed by their indentation.
|
|
3508
|
+
* See [wikipedia](https://en.wikipedia.org/wiki/Off-side_rule) for more information.
|
|
3509
|
+
* If not set, `false` is used and empty lines belong to the previous block.
|
|
3510
|
+
*/
|
|
3511
|
+
offSide?: boolean;
|
|
3512
|
+
/**
|
|
3513
|
+
* Region markers used by the language.
|
|
3514
|
+
*/
|
|
3515
|
+
markers?: FoldingMarkers;
|
|
3516
|
+
}
|
|
3517
|
+
/**
|
|
3518
|
+
* Describes a rule to be evaluated when pressing Enter.
|
|
3519
|
+
*/
|
|
3520
|
+
interface OnEnterRule {
|
|
3521
|
+
/**
|
|
3522
|
+
* This rule will only execute if the text before the cursor matches this regular expression.
|
|
3523
|
+
*/
|
|
3524
|
+
beforeText: RegExp;
|
|
3525
|
+
/**
|
|
3526
|
+
* This rule will only execute if the text after the cursor matches this regular expression.
|
|
3527
|
+
*/
|
|
3528
|
+
afterText?: RegExp;
|
|
3529
|
+
/**
|
|
3530
|
+
* This rule will only execute if the text above the this line matches this regular expression.
|
|
3531
|
+
*/
|
|
3532
|
+
previousLineText?: RegExp;
|
|
3533
|
+
/**
|
|
3534
|
+
* The action to execute.
|
|
3535
|
+
*/
|
|
3536
|
+
action: EnterAction;
|
|
3537
|
+
}
|
|
3538
|
+
/**
|
|
3539
|
+
* Definition of documentation comments (e.g. Javadoc/JSdoc)
|
|
3540
|
+
*/
|
|
3541
|
+
interface IDocComment {
|
|
3542
|
+
/**
|
|
3543
|
+
* The string that starts a doc comment (e.g. '/**')
|
|
3544
|
+
*/
|
|
3545
|
+
open: string;
|
|
3546
|
+
/**
|
|
3547
|
+
* The string that appears on the last line and closes the doc comment (e.g. ' * /').
|
|
3548
|
+
*/
|
|
3549
|
+
close?: string;
|
|
3550
|
+
}
|
|
3551
|
+
/**
|
|
3552
|
+
* A tuple of two characters, like a pair of
|
|
3553
|
+
* opening and closing brackets.
|
|
3554
|
+
*/
|
|
3555
|
+
declare type CharacterPair = [string, string];
|
|
3556
|
+
interface IAutoClosingPair {
|
|
3557
|
+
open: string;
|
|
3558
|
+
close: string;
|
|
3559
|
+
}
|
|
3560
|
+
interface IAutoClosingPairConditional extends IAutoClosingPair {
|
|
3561
|
+
notIn?: string[];
|
|
3562
|
+
}
|
|
3563
|
+
/**
|
|
3564
|
+
* Describes what to do with the indentation when pressing Enter.
|
|
3565
|
+
*/
|
|
3566
|
+
declare enum IndentAction {
|
|
3567
|
+
/**
|
|
3568
|
+
* Insert new line and copy the previous line's indentation.
|
|
3569
|
+
*/
|
|
3570
|
+
None = 0,
|
|
3571
|
+
/**
|
|
3572
|
+
* Insert new line and indent once (relative to the previous line's indentation).
|
|
3573
|
+
*/
|
|
3574
|
+
Indent = 1,
|
|
3575
|
+
/**
|
|
3576
|
+
* Insert two new lines:
|
|
3577
|
+
* - the first one indented which will hold the cursor
|
|
3578
|
+
* - the second one at the same indentation level
|
|
3579
|
+
*/
|
|
3580
|
+
IndentOutdent = 2,
|
|
3581
|
+
/**
|
|
3582
|
+
* Insert new line and outdent once (relative to the previous line's indentation).
|
|
3583
|
+
*/
|
|
3584
|
+
Outdent = 3
|
|
3585
|
+
}
|
|
3586
|
+
/**
|
|
3587
|
+
* Describes what to do when pressing Enter.
|
|
3588
|
+
*/
|
|
3589
|
+
interface EnterAction {
|
|
3590
|
+
/**
|
|
3591
|
+
* Describe what to do with the indentation.
|
|
3592
|
+
*/
|
|
3593
|
+
indentAction: IndentAction;
|
|
3594
|
+
/**
|
|
3595
|
+
* Describes text to be appended after the new line and after the indentation.
|
|
3596
|
+
*/
|
|
3597
|
+
appendText?: string;
|
|
3598
|
+
/**
|
|
3599
|
+
* Describes the number of characters to remove from the new line's indentation.
|
|
3600
|
+
*/
|
|
3601
|
+
removeText?: number;
|
|
3602
|
+
}
|
|
3603
|
+
/**
|
|
3604
|
+
* @internal
|
|
3605
|
+
*/
|
|
3606
|
+
declare class StandardAutoClosingPairConditional {
|
|
3607
|
+
readonly open: string;
|
|
3608
|
+
readonly close: string;
|
|
3609
|
+
private readonly _inString;
|
|
3610
|
+
private readonly _inComment;
|
|
3611
|
+
private readonly _inRegEx;
|
|
3612
|
+
private _neutralCharacter;
|
|
3613
|
+
private _neutralCharacterSearched;
|
|
3614
|
+
constructor(source: IAutoClosingPairConditional);
|
|
3615
|
+
isOK(standardToken: StandardTokenType): boolean;
|
|
3616
|
+
shouldAutoClose(context: ScopedLineTokens, column: number): boolean;
|
|
3617
|
+
private _findNeutralCharacterInRange;
|
|
3618
|
+
/**
|
|
3619
|
+
* Find a character in the range [0-9a-zA-Z] that does not appear in the open or close
|
|
3620
|
+
*/
|
|
3621
|
+
findNeutralCharacter(): string | null;
|
|
3622
|
+
}
|
|
3623
|
+
/**
|
|
3624
|
+
* @internal
|
|
3625
|
+
*/
|
|
3626
|
+
declare class AutoClosingPairs {
|
|
3627
|
+
/** Key is first character of open */
|
|
3628
|
+
readonly autoClosingPairsOpenByStart: Map<string, StandardAutoClosingPairConditional[]>;
|
|
3629
|
+
/** Key is last character of open */
|
|
3630
|
+
readonly autoClosingPairsOpenByEnd: Map<string, StandardAutoClosingPairConditional[]>;
|
|
3631
|
+
/** Key is first character of close */
|
|
3632
|
+
readonly autoClosingPairsCloseByStart: Map<string, StandardAutoClosingPairConditional[]>;
|
|
3633
|
+
/** Key is last character of close */
|
|
3634
|
+
readonly autoClosingPairsCloseByEnd: Map<string, StandardAutoClosingPairConditional[]>;
|
|
3635
|
+
/** Key is close. Only has pairs that are a single character */
|
|
3636
|
+
readonly autoClosingPairsCloseSingleChar: Map<string, StandardAutoClosingPairConditional[]>;
|
|
3637
|
+
constructor(autoClosingPairs: StandardAutoClosingPairConditional[]);
|
|
3638
|
+
}
|
|
3639
|
+
|
|
3640
|
+
/**
|
|
3641
|
+
* Captures all bracket related configurations for a single language.
|
|
3642
|
+
* Immutable.
|
|
3643
|
+
*/
|
|
3644
|
+
declare class LanguageBracketsConfiguration {
|
|
3645
|
+
readonly languageId: string;
|
|
3646
|
+
private readonly _openingBrackets;
|
|
3647
|
+
private readonly _closingBrackets;
|
|
3648
|
+
constructor(languageId: string, config: LanguageConfiguration);
|
|
3649
|
+
/**
|
|
3650
|
+
* No two brackets have the same bracket text.
|
|
3651
|
+
*/
|
|
3652
|
+
get openingBrackets(): readonly OpeningBracketKind[];
|
|
3653
|
+
/**
|
|
3654
|
+
* No two brackets have the same bracket text.
|
|
3655
|
+
*/
|
|
3656
|
+
get closingBrackets(): readonly ClosingBracketKind[];
|
|
3657
|
+
getOpeningBracketInfo(bracketText: string): OpeningBracketKind | undefined;
|
|
3658
|
+
getClosingBracketInfo(bracketText: string): ClosingBracketKind | undefined;
|
|
3659
|
+
getBracketInfo(bracketText: string): BracketKind | undefined;
|
|
3660
|
+
}
|
|
3661
|
+
declare type BracketKind = OpeningBracketKind | ClosingBracketKind;
|
|
3662
|
+
declare class BracketKindBase {
|
|
3663
|
+
protected readonly config: LanguageBracketsConfiguration;
|
|
3664
|
+
readonly bracketText: string;
|
|
3665
|
+
constructor(config: LanguageBracketsConfiguration, bracketText: string);
|
|
3666
|
+
get languageId(): string;
|
|
3667
|
+
}
|
|
3668
|
+
declare class OpeningBracketKind extends BracketKindBase {
|
|
3669
|
+
readonly openedBrackets: ReadonlySet<ClosingBracketKind>;
|
|
3670
|
+
readonly isOpeningBracket = true;
|
|
3671
|
+
constructor(config: LanguageBracketsConfiguration, bracketText: string, openedBrackets: ReadonlySet<ClosingBracketKind>);
|
|
3672
|
+
}
|
|
3673
|
+
declare class ClosingBracketKind extends BracketKindBase {
|
|
3674
|
+
/**
|
|
3675
|
+
* Non empty array of all opening brackets this bracket closes.
|
|
3676
|
+
*/
|
|
3677
|
+
readonly closedBrackets: ReadonlySet<OpeningBracketKind>;
|
|
3678
|
+
readonly isOpeningBracket = false;
|
|
3679
|
+
constructor(config: LanguageBracketsConfiguration, bracketText: string,
|
|
3680
|
+
/**
|
|
3681
|
+
* Non empty array of all opening brackets this bracket closes.
|
|
3682
|
+
*/
|
|
3683
|
+
closedBrackets: ReadonlySet<OpeningBracketKind>);
|
|
3684
|
+
/**
|
|
3685
|
+
* Checks if this bracket closes the given other bracket.
|
|
3686
|
+
* Brackets from other language configuration can be used (they will always return false).
|
|
3687
|
+
* If other is a bracket with the same language id, they have to be from the same configuration.
|
|
3688
|
+
*/
|
|
3689
|
+
closes(other: OpeningBracketKind): boolean;
|
|
3690
|
+
getClosedBrackets(): readonly OpeningBracketKind[];
|
|
3691
|
+
}
|
|
3692
|
+
|
|
3693
|
+
declare class CharacterPairSupport {
|
|
3694
|
+
static readonly DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED = ";:.,=}])> \n\t";
|
|
3695
|
+
static readonly DEFAULT_AUTOCLOSE_BEFORE_WHITESPACE = " \n\t";
|
|
3696
|
+
private readonly _autoClosingPairs;
|
|
3697
|
+
private readonly _surroundingPairs;
|
|
3698
|
+
private readonly _autoCloseBefore;
|
|
3699
|
+
constructor(config: LanguageConfiguration);
|
|
3700
|
+
getAutoClosingPairs(): StandardAutoClosingPairConditional[];
|
|
3701
|
+
getAutoCloseBeforeSet(): string;
|
|
3702
|
+
getSurroundingPairs(): IAutoClosingPair[];
|
|
3703
|
+
}
|
|
3704
|
+
|
|
3705
|
+
/**
|
|
3706
|
+
* Represents a grouping of colliding bracket pairs.
|
|
3707
|
+
*
|
|
3708
|
+
* Most of the times this contains a single bracket pair,
|
|
3709
|
+
* but sometimes this contains multiple bracket pairs in cases
|
|
3710
|
+
* where the same string appears as a closing bracket for multiple
|
|
3711
|
+
* bracket pairs, or the same string appears an opening bracket for
|
|
3712
|
+
* multiple bracket pairs.
|
|
3713
|
+
*
|
|
3714
|
+
* e.g. of a group containing a single pair:
|
|
3715
|
+
* open: ['{'], close: ['}']
|
|
3716
|
+
*
|
|
3717
|
+
* e.g. of a group containing multiple pairs:
|
|
3718
|
+
* open: ['if', 'for'], close: ['end', 'end']
|
|
3719
|
+
*/
|
|
3720
|
+
declare class RichEditBracket {
|
|
3721
|
+
_richEditBracketBrand: void;
|
|
3722
|
+
readonly languageId: string;
|
|
3723
|
+
/**
|
|
3724
|
+
* A 0-based consecutive unique identifier for this bracket pair.
|
|
3725
|
+
* If a language has 5 bracket pairs, out of which 2 are grouped together,
|
|
3726
|
+
* it is expected that the `index` goes from 0 to 4.
|
|
3727
|
+
*/
|
|
3728
|
+
readonly index: number;
|
|
3729
|
+
/**
|
|
3730
|
+
* The open sequence for each bracket pair contained in this group.
|
|
3731
|
+
*
|
|
3732
|
+
* The open sequence at a specific index corresponds to the
|
|
3733
|
+
* closing sequence at the same index.
|
|
3734
|
+
*
|
|
3735
|
+
* [ open[i], closed[i] ] represent a bracket pair.
|
|
3736
|
+
*/
|
|
3737
|
+
readonly open: string[];
|
|
3738
|
+
/**
|
|
3739
|
+
* The close sequence for each bracket pair contained in this group.
|
|
3740
|
+
*
|
|
3741
|
+
* The close sequence at a specific index corresponds to the
|
|
3742
|
+
* opening sequence at the same index.
|
|
3743
|
+
*
|
|
3744
|
+
* [ open[i], closed[i] ] represent a bracket pair.
|
|
3745
|
+
*/
|
|
3746
|
+
readonly close: string[];
|
|
3747
|
+
/**
|
|
3748
|
+
* A regular expression that is useful to search for this bracket pair group in a string.
|
|
3749
|
+
*
|
|
3750
|
+
* This regular expression is built in a way that it is aware of the other bracket
|
|
3751
|
+
* pairs defined for the language, so it might match brackets from other groups.
|
|
3752
|
+
*
|
|
3753
|
+
* See the fine details in `getRegexForBracketPair`.
|
|
3754
|
+
*/
|
|
3755
|
+
readonly forwardRegex: RegExp;
|
|
3756
|
+
/**
|
|
3757
|
+
* A regular expression that is useful to search for this bracket pair group in a string backwards.
|
|
3758
|
+
*
|
|
3759
|
+
* This regular expression is built in a way that it is aware of the other bracket
|
|
3760
|
+
* pairs defined for the language, so it might match brackets from other groups.
|
|
3761
|
+
*
|
|
3762
|
+
* See the fine defails in `getReversedRegexForBracketPair`.
|
|
3763
|
+
*/
|
|
3764
|
+
readonly reversedRegex: RegExp;
|
|
3765
|
+
private readonly _openSet;
|
|
3766
|
+
private readonly _closeSet;
|
|
3767
|
+
constructor(languageId: string, index: number, open: string[], close: string[], forwardRegex: RegExp, reversedRegex: RegExp);
|
|
3768
|
+
/**
|
|
3769
|
+
* Check if the provided `text` is an open bracket in this group.
|
|
3770
|
+
*/
|
|
3771
|
+
isOpen(text: string): boolean;
|
|
3772
|
+
/**
|
|
3773
|
+
* Check if the provided `text` is a close bracket in this group.
|
|
3774
|
+
*/
|
|
3775
|
+
isClose(text: string): boolean;
|
|
3776
|
+
private static _toSet;
|
|
3777
|
+
}
|
|
3778
|
+
declare class RichEditBrackets {
|
|
3779
|
+
_richEditBracketsBrand: void;
|
|
3780
|
+
/**
|
|
3781
|
+
* All groups of brackets defined for this language.
|
|
3782
|
+
*/
|
|
3783
|
+
readonly brackets: RichEditBracket[];
|
|
3784
|
+
/**
|
|
3785
|
+
* A regular expression that is useful to search for all bracket pairs in a string.
|
|
3786
|
+
*
|
|
3787
|
+
* See the fine details in `getRegexForBrackets`.
|
|
3788
|
+
*/
|
|
3789
|
+
readonly forwardRegex: RegExp;
|
|
3790
|
+
/**
|
|
3791
|
+
* A regular expression that is useful to search for all bracket pairs in a string backwards.
|
|
3792
|
+
*
|
|
3793
|
+
* See the fine details in `getReversedRegexForBrackets`.
|
|
3794
|
+
*/
|
|
3795
|
+
readonly reversedRegex: RegExp;
|
|
3796
|
+
/**
|
|
3797
|
+
* The length (i.e. str.length) for the longest bracket pair.
|
|
3798
|
+
*/
|
|
3799
|
+
readonly maxBracketLength: number;
|
|
3800
|
+
/**
|
|
3801
|
+
* A map useful for decoding a regex match and finding which bracket group was matched.
|
|
3802
|
+
*/
|
|
3803
|
+
readonly textIsBracket: {
|
|
3804
|
+
[text: string]: RichEditBracket;
|
|
3805
|
+
};
|
|
3806
|
+
/**
|
|
3807
|
+
* A set useful for decoding if a regex match is the open bracket of a bracket pair.
|
|
3808
|
+
*/
|
|
3809
|
+
readonly textIsOpenBracket: {
|
|
3810
|
+
[text: string]: boolean;
|
|
3811
|
+
};
|
|
3812
|
+
constructor(languageId: string, _brackets: readonly CharacterPair[]);
|
|
3813
|
+
}
|
|
3814
|
+
|
|
3815
|
+
/**
|
|
3816
|
+
* Interface used to support electric characters
|
|
3817
|
+
* @internal
|
|
3818
|
+
*/
|
|
3819
|
+
interface IElectricAction {
|
|
3820
|
+
matchOpenBracket: string;
|
|
3821
|
+
}
|
|
3822
|
+
declare class BracketElectricCharacterSupport {
|
|
3823
|
+
private readonly _richEditBrackets;
|
|
3824
|
+
constructor(richEditBrackets: RichEditBrackets | null);
|
|
3825
|
+
getElectricCharacters(): string[];
|
|
3826
|
+
onElectricCharacter(character: string, context: ScopedLineTokens, column: number): IElectricAction | null;
|
|
3827
|
+
}
|
|
3828
|
+
|
|
3829
|
+
declare class IndentRulesSupport {
|
|
3830
|
+
private readonly _indentationRules;
|
|
3831
|
+
constructor(indentationRules: IndentationRule);
|
|
3832
|
+
shouldIncrease(text: string): boolean;
|
|
3833
|
+
shouldDecrease(text: string): boolean;
|
|
3834
|
+
shouldIndentNextLine(text: string): boolean;
|
|
3835
|
+
shouldIgnore(text: string): boolean;
|
|
3836
|
+
getIndentMetadata(text: string): number;
|
|
3837
|
+
}
|
|
3838
|
+
|
|
3839
|
+
/**
|
|
3840
|
+
* Interface used to support insertion of mode specific comments.
|
|
3841
|
+
*/
|
|
3842
|
+
interface ICommentsConfiguration {
|
|
3843
|
+
lineCommentToken?: string;
|
|
3844
|
+
blockCommentStartToken?: string;
|
|
3845
|
+
blockCommentEndToken?: string;
|
|
3846
|
+
}
|
|
3847
|
+
declare class LanguageConfigurationServiceChangeEvent {
|
|
3848
|
+
readonly languageId: string | undefined;
|
|
3849
|
+
constructor(languageId: string | undefined);
|
|
3850
|
+
affects(languageId: string): boolean;
|
|
3851
|
+
}
|
|
3852
|
+
interface ILanguageConfigurationService {
|
|
3853
|
+
readonly _serviceBrand: undefined;
|
|
3854
|
+
onDidChange: Event<LanguageConfigurationServiceChangeEvent>;
|
|
3855
|
+
/**
|
|
3856
|
+
* @param priority Use a higher number for higher priority
|
|
3857
|
+
*/
|
|
3858
|
+
register(languageId: string, configuration: LanguageConfiguration, priority?: number): IDisposable;
|
|
3859
|
+
getLanguageConfiguration(languageId: string): ResolvedLanguageConfiguration;
|
|
3860
|
+
}
|
|
3861
|
+
declare const ILanguageConfigurationService: ServiceIdentifier<ILanguageConfigurationService>;
|
|
3862
|
+
/**
|
|
3863
|
+
* Immutable.
|
|
3864
|
+
*/
|
|
3865
|
+
declare class ResolvedLanguageConfiguration {
|
|
3866
|
+
readonly languageId: string;
|
|
3867
|
+
readonly underlyingConfig: LanguageConfiguration;
|
|
3868
|
+
private _brackets;
|
|
3869
|
+
private _electricCharacter;
|
|
3870
|
+
private readonly _onEnterSupport;
|
|
3871
|
+
readonly comments: ICommentsConfiguration | null;
|
|
3872
|
+
readonly characterPair: CharacterPairSupport;
|
|
3873
|
+
readonly wordDefinition: RegExp;
|
|
3874
|
+
readonly indentRulesSupport: IndentRulesSupport | null;
|
|
3875
|
+
readonly indentationRules: IndentationRule | undefined;
|
|
3876
|
+
readonly foldingRules: FoldingRules;
|
|
3877
|
+
readonly bracketsNew: LanguageBracketsConfiguration;
|
|
3878
|
+
constructor(languageId: string, underlyingConfig: LanguageConfiguration);
|
|
3879
|
+
getWordDefinition(): RegExp;
|
|
3880
|
+
get brackets(): RichEditBrackets | null;
|
|
3881
|
+
get electricCharacter(): BracketElectricCharacterSupport | null;
|
|
3882
|
+
onEnter(autoIndent: EditorAutoIndentStrategy, previousLineText: string, beforeEnterText: string, afterEnterText: string): EnterAction | null;
|
|
3883
|
+
getAutoClosingPairs(): AutoClosingPairs;
|
|
3884
|
+
getAutoCloseBeforeSet(): string;
|
|
3885
|
+
getSurroundingPairs(): IAutoClosingPair[];
|
|
3886
|
+
private static _handleComments;
|
|
3887
|
+
}
|
|
3888
|
+
|
|
3889
|
+
/**
|
|
3890
|
+
* Vertical Lane in the overview ruler of the editor.
|
|
3891
|
+
*/
|
|
3892
|
+
declare enum OverviewRulerLane {
|
|
3893
|
+
Left = 1,
|
|
3894
|
+
Center = 2,
|
|
3895
|
+
Right = 4,
|
|
3896
|
+
Full = 7
|
|
3897
|
+
}
|
|
3898
|
+
/**
|
|
3899
|
+
* Position in the minimap to render the decoration.
|
|
3900
|
+
*/
|
|
3901
|
+
declare enum MinimapPosition {
|
|
3902
|
+
Inline = 1,
|
|
3903
|
+
Gutter = 2
|
|
3904
|
+
}
|
|
3905
|
+
interface IDecorationOptions {
|
|
3906
|
+
/**
|
|
3907
|
+
* CSS color to render.
|
|
3908
|
+
* e.g.: rgba(100, 100, 100, 0.5) or a color from the color registry
|
|
3909
|
+
*/
|
|
3910
|
+
color: string | ThemeColor | undefined;
|
|
3911
|
+
/**
|
|
3912
|
+
* CSS color to render.
|
|
3913
|
+
* e.g.: rgba(100, 100, 100, 0.5) or a color from the color registry
|
|
3914
|
+
*/
|
|
3915
|
+
darkColor?: string | ThemeColor;
|
|
3916
|
+
}
|
|
3917
|
+
/**
|
|
3918
|
+
* Options for rendering a model decoration in the overview ruler.
|
|
3919
|
+
*/
|
|
3920
|
+
interface IModelDecorationOverviewRulerOptions extends IDecorationOptions {
|
|
3921
|
+
/**
|
|
3922
|
+
* The position in the overview ruler.
|
|
3923
|
+
*/
|
|
3924
|
+
position: OverviewRulerLane;
|
|
3925
|
+
}
|
|
3926
|
+
/**
|
|
3927
|
+
* Options for rendering a model decoration in the overview ruler.
|
|
3928
|
+
*/
|
|
3929
|
+
interface IModelDecorationMinimapOptions extends IDecorationOptions {
|
|
3930
|
+
/**
|
|
3931
|
+
* The position in the overview ruler.
|
|
3932
|
+
*/
|
|
3933
|
+
position: MinimapPosition;
|
|
3934
|
+
}
|
|
3935
|
+
/**
|
|
3936
|
+
* Options for a model decoration.
|
|
3937
|
+
*/
|
|
3938
|
+
interface IModelDecorationOptions {
|
|
3939
|
+
/**
|
|
3940
|
+
* A debug description that can be used for inspecting model decorations.
|
|
3941
|
+
* @internal
|
|
3942
|
+
*/
|
|
3943
|
+
description: string;
|
|
3944
|
+
/**
|
|
3945
|
+
* Customize the growing behavior of the decoration when typing at the edges of the decoration.
|
|
3946
|
+
* Defaults to TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges
|
|
3947
|
+
*/
|
|
3948
|
+
stickiness?: TrackedRangeStickiness;
|
|
3949
|
+
/**
|
|
3950
|
+
* CSS class name describing the decoration.
|
|
3951
|
+
*/
|
|
3952
|
+
className?: string | null;
|
|
3953
|
+
blockClassName?: string | null;
|
|
3954
|
+
/**
|
|
3955
|
+
* Message to be rendered when hovering over the glyph margin decoration.
|
|
3956
|
+
*/
|
|
3957
|
+
glyphMarginHoverMessage?: IMarkdownString | IMarkdownString[] | null;
|
|
3958
|
+
/**
|
|
3959
|
+
* Array of MarkdownString to render as the decoration message.
|
|
3960
|
+
*/
|
|
3961
|
+
hoverMessage?: IMarkdownString | IMarkdownString[] | null;
|
|
3962
|
+
/**
|
|
3963
|
+
* Should the decoration expand to encompass a whole line.
|
|
3964
|
+
*/
|
|
3965
|
+
isWholeLine?: boolean;
|
|
3966
|
+
/**
|
|
3967
|
+
* Always render the decoration (even when the range it encompasses is collapsed).
|
|
3968
|
+
*/
|
|
3969
|
+
showIfCollapsed?: boolean;
|
|
3970
|
+
/**
|
|
3971
|
+
* Collapse the decoration if its entire range is being replaced via an edit.
|
|
3972
|
+
* @internal
|
|
3973
|
+
*/
|
|
3974
|
+
collapseOnReplaceEdit?: boolean;
|
|
3975
|
+
/**
|
|
3976
|
+
* Specifies the stack order of a decoration.
|
|
3977
|
+
* A decoration with greater stack order is always in front of a decoration with
|
|
3978
|
+
* a lower stack order when the decorations are on the same line.
|
|
3979
|
+
*/
|
|
3980
|
+
zIndex?: number;
|
|
3981
|
+
/**
|
|
3982
|
+
* If set, render this decoration in the overview ruler.
|
|
3983
|
+
*/
|
|
3984
|
+
overviewRuler?: IModelDecorationOverviewRulerOptions | null;
|
|
3985
|
+
/**
|
|
3986
|
+
* If set, render this decoration in the minimap.
|
|
3987
|
+
*/
|
|
3988
|
+
minimap?: IModelDecorationMinimapOptions | null;
|
|
3989
|
+
/**
|
|
3990
|
+
* If set, the decoration will be rendered in the glyph margin with this CSS class name.
|
|
3991
|
+
*/
|
|
3992
|
+
glyphMarginClassName?: string | null;
|
|
3993
|
+
/**
|
|
3994
|
+
* If set, the decoration will be rendered in the lines decorations with this CSS class name.
|
|
3995
|
+
*/
|
|
3996
|
+
linesDecorationsClassName?: string | null;
|
|
3997
|
+
/**
|
|
3998
|
+
* If set, the decoration will be rendered in the lines decorations with this CSS class name, but only for the first line in case of line wrapping.
|
|
3999
|
+
*/
|
|
4000
|
+
firstLineDecorationClassName?: string | null;
|
|
4001
|
+
/**
|
|
4002
|
+
* If set, the decoration will be rendered in the margin (covering its full width) with this CSS class name.
|
|
4003
|
+
*/
|
|
4004
|
+
marginClassName?: string | null;
|
|
4005
|
+
/**
|
|
4006
|
+
* If set, the decoration will be rendered inline with the text with this CSS class name.
|
|
4007
|
+
* Please use this only for CSS rules that must impact the text. For example, use `className`
|
|
4008
|
+
* to have a background color decoration.
|
|
4009
|
+
*/
|
|
4010
|
+
inlineClassName?: string | null;
|
|
4011
|
+
/**
|
|
4012
|
+
* If there is an `inlineClassName` which affects letter spacing.
|
|
4013
|
+
*/
|
|
4014
|
+
inlineClassNameAffectsLetterSpacing?: boolean;
|
|
4015
|
+
/**
|
|
4016
|
+
* If set, the decoration will be rendered before the text with this CSS class name.
|
|
4017
|
+
*/
|
|
4018
|
+
beforeContentClassName?: string | null;
|
|
4019
|
+
/**
|
|
4020
|
+
* If set, the decoration will be rendered after the text with this CSS class name.
|
|
4021
|
+
*/
|
|
4022
|
+
afterContentClassName?: string | null;
|
|
4023
|
+
/**
|
|
4024
|
+
* If set, text will be injected in the view after the range.
|
|
4025
|
+
*/
|
|
4026
|
+
after?: InjectedTextOptions | null;
|
|
4027
|
+
/**
|
|
4028
|
+
* If set, text will be injected in the view before the range.
|
|
4029
|
+
*/
|
|
4030
|
+
before?: InjectedTextOptions | null;
|
|
4031
|
+
/**
|
|
4032
|
+
* If set, this decoration will not be rendered for comment tokens.
|
|
4033
|
+
* @internal
|
|
4034
|
+
*/
|
|
4035
|
+
hideInCommentTokens?: boolean | null;
|
|
4036
|
+
/**
|
|
4037
|
+
* If set, this decoration will not be rendered for string tokens.
|
|
4038
|
+
* @internal
|
|
4039
|
+
*/
|
|
4040
|
+
hideInStringTokens?: boolean | null;
|
|
4041
|
+
}
|
|
4042
|
+
/**
|
|
4043
|
+
* Configures text that is injected into the view without changing the underlying document.
|
|
4044
|
+
*/
|
|
4045
|
+
interface InjectedTextOptions {
|
|
4046
|
+
/**
|
|
4047
|
+
* Sets the text to inject. Must be a single line.
|
|
4048
|
+
*/
|
|
4049
|
+
readonly content: string;
|
|
4050
|
+
/**
|
|
4051
|
+
* If set, the decoration will be rendered inline with the text with this CSS class name.
|
|
4052
|
+
*/
|
|
4053
|
+
readonly inlineClassName?: string | null;
|
|
4054
|
+
/**
|
|
4055
|
+
* If there is an `inlineClassName` which affects letter spacing.
|
|
4056
|
+
*/
|
|
4057
|
+
readonly inlineClassNameAffectsLetterSpacing?: boolean;
|
|
4058
|
+
/**
|
|
4059
|
+
* This field allows to attach data to this injected text.
|
|
4060
|
+
* The data can be read when injected texts at a given position are queried.
|
|
4061
|
+
*/
|
|
4062
|
+
readonly attachedData?: unknown;
|
|
4063
|
+
/**
|
|
4064
|
+
* Configures cursor stops around injected text.
|
|
4065
|
+
* Defaults to {@link InjectedTextCursorStops.Both}.
|
|
4066
|
+
*/
|
|
4067
|
+
readonly cursorStops?: InjectedTextCursorStops | null;
|
|
4068
|
+
}
|
|
4069
|
+
declare enum InjectedTextCursorStops {
|
|
4070
|
+
Both = 0,
|
|
4071
|
+
Right = 1,
|
|
4072
|
+
Left = 2,
|
|
4073
|
+
None = 3
|
|
4074
|
+
}
|
|
4075
|
+
/**
|
|
4076
|
+
* New model decorations.
|
|
4077
|
+
*/
|
|
4078
|
+
interface IModelDeltaDecoration {
|
|
4079
|
+
/**
|
|
4080
|
+
* Range that this decoration covers.
|
|
4081
|
+
*/
|
|
4082
|
+
range: IRange;
|
|
4083
|
+
/**
|
|
4084
|
+
* Options associated with this decoration.
|
|
4085
|
+
*/
|
|
4086
|
+
options: IModelDecorationOptions;
|
|
4087
|
+
}
|
|
4088
|
+
/**
|
|
4089
|
+
* An accessor that can add, change or remove model decorations.
|
|
4090
|
+
* @internal
|
|
4091
|
+
*/
|
|
4092
|
+
interface IModelDecorationsChangeAccessor {
|
|
4093
|
+
/**
|
|
4094
|
+
* Add a new decoration.
|
|
4095
|
+
* @param range Range that this decoration covers.
|
|
4096
|
+
* @param options Options associated with this decoration.
|
|
4097
|
+
* @return An unique identifier associated with this decoration.
|
|
4098
|
+
*/
|
|
4099
|
+
addDecoration(range: IRange, options: IModelDecorationOptions): string;
|
|
4100
|
+
/**
|
|
4101
|
+
* Change the range that an existing decoration covers.
|
|
4102
|
+
* @param id The unique identifier associated with the decoration.
|
|
4103
|
+
* @param newRange The new range that this decoration covers.
|
|
4104
|
+
*/
|
|
4105
|
+
changeDecoration(id: string, newRange: IRange): void;
|
|
4106
|
+
/**
|
|
4107
|
+
* Change the options associated with an existing decoration.
|
|
4108
|
+
* @param id The unique identifier associated with the decoration.
|
|
4109
|
+
* @param newOptions The new options associated with this decoration.
|
|
4110
|
+
*/
|
|
4111
|
+
changeDecorationOptions(id: string, newOptions: IModelDecorationOptions): void;
|
|
4112
|
+
/**
|
|
4113
|
+
* Remove an existing decoration.
|
|
4114
|
+
* @param id The unique identifier associated with the decoration.
|
|
4115
|
+
*/
|
|
4116
|
+
removeDecoration(id: string): void;
|
|
4117
|
+
/**
|
|
4118
|
+
* Perform a minimum amount of operations, in order to transform the decorations
|
|
4119
|
+
* identified by `oldDecorations` to the decorations described by `newDecorations`
|
|
4120
|
+
* and returns the new identifiers associated with the resulting decorations.
|
|
4121
|
+
*
|
|
4122
|
+
* @param oldDecorations Array containing previous decorations identifiers.
|
|
4123
|
+
* @param newDecorations Array describing what decorations should result after the call.
|
|
4124
|
+
* @return An array containing the new decorations identifiers.
|
|
4125
|
+
*/
|
|
4126
|
+
deltaDecorations(oldDecorations: string[], newDecorations: IModelDeltaDecoration[]): string[];
|
|
4127
|
+
}
|
|
4128
|
+
/**
|
|
4129
|
+
* End of line character preference.
|
|
4130
|
+
*/
|
|
4131
|
+
declare const enum EndOfLineSequence {
|
|
4132
|
+
/**
|
|
4133
|
+
* Use line feed (\n) as the end of line character.
|
|
4134
|
+
*/
|
|
4135
|
+
LF = 0,
|
|
4136
|
+
/**
|
|
4137
|
+
* Use carriage return and line feed (\r\n) as the end of line character.
|
|
4138
|
+
*/
|
|
4139
|
+
CRLF = 1
|
|
4140
|
+
}
|
|
4141
|
+
/**
|
|
4142
|
+
* Describes the behavior of decorations when typing/editing near their edges.
|
|
4143
|
+
* Note: Please do not edit the values, as they very carefully match `DecorationRangeBehavior`
|
|
4144
|
+
*/
|
|
4145
|
+
declare const enum TrackedRangeStickiness {
|
|
4146
|
+
AlwaysGrowsWhenTypingAtEdges = 0,
|
|
4147
|
+
NeverGrowsWhenTypingAtEdges = 1,
|
|
4148
|
+
GrowsOnlyWhenTypingBefore = 2,
|
|
4149
|
+
GrowsOnlyWhenTypingAfter = 3
|
|
4150
|
+
}
|
|
4151
|
+
/**
|
|
4152
|
+
* A model.
|
|
4153
|
+
*/
|
|
4154
|
+
type ITextModel = monaco.editor.ITextModel
|
|
4155
|
+
|
|
4156
|
+
/**
|
|
4157
|
+
* An editor contribution that gets created every time a new editor gets created and gets disposed when the editor gets disposed.
|
|
4158
|
+
*/
|
|
4159
|
+
interface IEditorContribution {
|
|
4160
|
+
/**
|
|
4161
|
+
* Dispose this contribution.
|
|
4162
|
+
*/
|
|
4163
|
+
dispose(): void;
|
|
4164
|
+
/**
|
|
4165
|
+
* Store view state.
|
|
4166
|
+
*/
|
|
4167
|
+
saveViewState?(): any;
|
|
4168
|
+
/**
|
|
4169
|
+
* Restore view state.
|
|
4170
|
+
*/
|
|
4171
|
+
restoreViewState?(state: any): void;
|
|
4172
|
+
}
|
|
4173
|
+
|
|
4174
|
+
/**
|
|
4175
|
+
* A rich code editor.
|
|
4176
|
+
*/
|
|
4177
|
+
type ICodeEditor = monaco.editor.ICodeEditor
|
|
4178
|
+
|
|
4179
|
+
interface IAction extends IDisposable {
|
|
4180
|
+
readonly id: string;
|
|
4181
|
+
label: string;
|
|
4182
|
+
tooltip: string;
|
|
4183
|
+
class: string | undefined;
|
|
4184
|
+
enabled: boolean;
|
|
4185
|
+
checked?: boolean;
|
|
4186
|
+
run(event?: unknown): unknown;
|
|
4187
|
+
}
|
|
4188
|
+
|
|
4189
|
+
declare type TypeConstraint = string | Function;
|
|
4190
|
+
|
|
4191
|
+
declare type ICommandsMap = Map<string, ICommand>;
|
|
4192
|
+
interface ICommandHandler {
|
|
4193
|
+
(accessor: ServicesAccessor, ...args: any[]): void;
|
|
4194
|
+
}
|
|
4195
|
+
interface ICommand {
|
|
4196
|
+
id: string;
|
|
4197
|
+
handler: ICommandHandler;
|
|
4198
|
+
description?: ICommandHandlerDescription | null;
|
|
4199
|
+
}
|
|
4200
|
+
interface ICommandHandlerDescription {
|
|
4201
|
+
readonly description: string;
|
|
4202
|
+
readonly args: ReadonlyArray<{
|
|
4203
|
+
readonly name: string;
|
|
4204
|
+
readonly isOptional?: boolean;
|
|
4205
|
+
readonly description?: string;
|
|
4206
|
+
readonly constraint?: TypeConstraint;
|
|
4207
|
+
readonly schema?: IJSONSchema;
|
|
4208
|
+
}>;
|
|
4209
|
+
readonly returns?: string;
|
|
4210
|
+
}
|
|
4211
|
+
interface ICommandRegistry {
|
|
4212
|
+
onDidRegisterCommand: Event<string>;
|
|
4213
|
+
registerCommand(id: string, command: ICommandHandler): IDisposable;
|
|
4214
|
+
registerCommand(command: ICommand): IDisposable;
|
|
4215
|
+
registerCommandAlias(oldId: string, newId: string): IDisposable;
|
|
4216
|
+
getCommand(id: string): ICommand | undefined;
|
|
4217
|
+
getCommands(): ICommandsMap;
|
|
4218
|
+
}
|
|
4219
|
+
declare const CommandsRegistry: ICommandRegistry;
|
|
4220
|
+
|
|
4221
|
+
type Severity = Severity$1;
|
|
4222
|
+
declare type NotificationMessage = string | Error;
|
|
4223
|
+
interface INotificationProperties {
|
|
4224
|
+
/**
|
|
4225
|
+
* Sticky notifications are not automatically removed after a certain timeout. By
|
|
4226
|
+
* default, notifications with primary actions and severity error are always sticky.
|
|
4227
|
+
*/
|
|
4228
|
+
readonly sticky?: boolean;
|
|
4229
|
+
/**
|
|
4230
|
+
* Silent notifications are not shown to the user unless the notification center
|
|
4231
|
+
* is opened. The status bar will still indicate all number of notifications to
|
|
4232
|
+
* catch some attention.
|
|
4233
|
+
*/
|
|
4234
|
+
readonly silent?: boolean;
|
|
4235
|
+
/**
|
|
4236
|
+
* Adds an action to never show the notification again. The choice will be persisted
|
|
4237
|
+
* such as future requests will not cause the notification to show again.
|
|
4238
|
+
*/
|
|
4239
|
+
readonly neverShowAgain?: INeverShowAgainOptions;
|
|
4240
|
+
}
|
|
4241
|
+
declare enum NeverShowAgainScope {
|
|
4242
|
+
/**
|
|
4243
|
+
* Will never show this notification on the current workspace again.
|
|
4244
|
+
*/
|
|
4245
|
+
WORKSPACE = 0,
|
|
4246
|
+
/**
|
|
4247
|
+
* Will never show this notification on any workspace of the same
|
|
4248
|
+
* profile again.
|
|
4249
|
+
*/
|
|
4250
|
+
PROFILE = 1,
|
|
4251
|
+
/**
|
|
4252
|
+
* Will never show this notification on any workspace across all
|
|
4253
|
+
* profiles again.
|
|
4254
|
+
*/
|
|
4255
|
+
APPLICATION = 2
|
|
4256
|
+
}
|
|
4257
|
+
interface INeverShowAgainOptions {
|
|
4258
|
+
/**
|
|
4259
|
+
* The id is used to persist the selection of not showing the notification again.
|
|
4260
|
+
*/
|
|
4261
|
+
readonly id: string;
|
|
4262
|
+
/**
|
|
4263
|
+
* By default the action will show up as primary action. Setting this to true will
|
|
4264
|
+
* make it a secondary action instead.
|
|
4265
|
+
*/
|
|
4266
|
+
readonly isSecondary?: boolean;
|
|
4267
|
+
/**
|
|
4268
|
+
* Whether to persist the choice in the current workspace or for all workspaces. By
|
|
4269
|
+
* default it will be persisted for all workspaces across all profiles
|
|
4270
|
+
* (= `NeverShowAgainScope.APPLICATION`).
|
|
4271
|
+
*/
|
|
4272
|
+
readonly scope?: NeverShowAgainScope;
|
|
4273
|
+
}
|
|
4274
|
+
interface INotification extends INotificationProperties {
|
|
4275
|
+
/**
|
|
4276
|
+
* The id of the notification. If provided, will be used to compare
|
|
4277
|
+
* notifications with others to decide whether a notification is
|
|
4278
|
+
* duplicate or not.
|
|
4279
|
+
*/
|
|
4280
|
+
readonly id?: string;
|
|
4281
|
+
/**
|
|
4282
|
+
* The severity of the notification. Either `Info`, `Warning` or `Error`.
|
|
4283
|
+
*/
|
|
4284
|
+
readonly severity: Severity;
|
|
4285
|
+
/**
|
|
4286
|
+
* The message of the notification. This can either be a `string` or `Error`. Messages
|
|
4287
|
+
* can optionally include links in the format: `[text](link)`
|
|
4288
|
+
*/
|
|
4289
|
+
readonly message: NotificationMessage;
|
|
4290
|
+
/**
|
|
4291
|
+
* The source of the notification appears as additional information.
|
|
4292
|
+
*/
|
|
4293
|
+
readonly source?: string | {
|
|
4294
|
+
label: string;
|
|
4295
|
+
id: string;
|
|
4296
|
+
};
|
|
4297
|
+
/**
|
|
4298
|
+
* Actions to show as part of the notification. Primary actions show up as
|
|
4299
|
+
* buttons as part of the message and will close the notification once clicked.
|
|
4300
|
+
*
|
|
4301
|
+
* Secondary actions are meant to provide additional configuration or context
|
|
4302
|
+
* for the notification and will show up less prominent. A notification does not
|
|
4303
|
+
* close automatically when invoking a secondary action.
|
|
4304
|
+
*
|
|
4305
|
+
* **Note:** If your intent is to show a message with actions to the user, consider
|
|
4306
|
+
* the `INotificationService.prompt()` method instead which are optimized for
|
|
4307
|
+
* this usecase and much easier to use!
|
|
4308
|
+
*/
|
|
4309
|
+
actions?: INotificationActions;
|
|
4310
|
+
/**
|
|
4311
|
+
* The initial set of progress properties for the notification. To update progress
|
|
4312
|
+
* later on, access the `INotificationHandle.progress` property.
|
|
4313
|
+
*/
|
|
4314
|
+
readonly progress?: INotificationProgressProperties;
|
|
4315
|
+
}
|
|
4316
|
+
interface INotificationActions {
|
|
4317
|
+
/**
|
|
4318
|
+
* Primary actions show up as buttons as part of the message and will close
|
|
4319
|
+
* the notification once clicked.
|
|
4320
|
+
*
|
|
4321
|
+
* Pass `ActionWithMenuAction` for an action that has additional menu actions.
|
|
4322
|
+
*/
|
|
4323
|
+
readonly primary?: readonly IAction[];
|
|
4324
|
+
/**
|
|
4325
|
+
* Secondary actions are meant to provide additional configuration or context
|
|
4326
|
+
* for the notification and will show up less prominent. A notification does not
|
|
4327
|
+
* close automatically when invoking a secondary action.
|
|
4328
|
+
*/
|
|
4329
|
+
readonly secondary?: readonly IAction[];
|
|
4330
|
+
}
|
|
4331
|
+
interface INotificationProgressProperties {
|
|
4332
|
+
/**
|
|
4333
|
+
* Causes the progress bar to spin infinitley.
|
|
4334
|
+
*/
|
|
4335
|
+
readonly infinite?: boolean;
|
|
4336
|
+
/**
|
|
4337
|
+
* Indicate the total amount of work.
|
|
4338
|
+
*/
|
|
4339
|
+
readonly total?: number;
|
|
4340
|
+
/**
|
|
4341
|
+
* Indicate that a specific chunk of work is done.
|
|
4342
|
+
*/
|
|
4343
|
+
readonly worked?: number;
|
|
4344
|
+
}
|
|
4345
|
+
interface INotificationProgress {
|
|
4346
|
+
/**
|
|
4347
|
+
* Causes the progress bar to spin infinitley.
|
|
4348
|
+
*/
|
|
4349
|
+
infinite(): void;
|
|
4350
|
+
/**
|
|
4351
|
+
* Indicate the total amount of work.
|
|
4352
|
+
*/
|
|
4353
|
+
total(value: number): void;
|
|
4354
|
+
/**
|
|
4355
|
+
* Indicate that a specific chunk of work is done.
|
|
4356
|
+
*/
|
|
4357
|
+
worked(value: number): void;
|
|
4358
|
+
/**
|
|
4359
|
+
* Indicate that the long running operation is done.
|
|
4360
|
+
*/
|
|
4361
|
+
done(): void;
|
|
4362
|
+
}
|
|
4363
|
+
interface INotificationHandle {
|
|
4364
|
+
/**
|
|
4365
|
+
* Will be fired once the notification is closed.
|
|
4366
|
+
*/
|
|
4367
|
+
readonly onDidClose: Event<void>;
|
|
4368
|
+
/**
|
|
4369
|
+
* Will be fired whenever the visibility of the notification changes.
|
|
4370
|
+
* A notification can either be visible as toast or inside the notification
|
|
4371
|
+
* center if it is visible.
|
|
4372
|
+
*/
|
|
4373
|
+
readonly onDidChangeVisibility: Event<boolean>;
|
|
4374
|
+
/**
|
|
4375
|
+
* Allows to indicate progress on the notification even after the
|
|
4376
|
+
* notification is already visible.
|
|
4377
|
+
*/
|
|
4378
|
+
readonly progress: INotificationProgress;
|
|
4379
|
+
/**
|
|
4380
|
+
* Allows to update the severity of the notification.
|
|
4381
|
+
*/
|
|
4382
|
+
updateSeverity(severity: Severity): void;
|
|
4383
|
+
/**
|
|
4384
|
+
* Allows to update the message of the notification even after the
|
|
4385
|
+
* notification is already visible.
|
|
4386
|
+
*/
|
|
4387
|
+
updateMessage(message: NotificationMessage): void;
|
|
4388
|
+
/**
|
|
4389
|
+
* Allows to update the actions of the notification even after the
|
|
4390
|
+
* notification is already visible.
|
|
4391
|
+
*/
|
|
4392
|
+
updateActions(actions?: INotificationActions): void;
|
|
4393
|
+
/**
|
|
4394
|
+
* Hide the notification and remove it from the notification center.
|
|
4395
|
+
*/
|
|
4396
|
+
close(): void;
|
|
4397
|
+
}
|
|
4398
|
+
interface IBasePromptChoice {
|
|
4399
|
+
/**
|
|
4400
|
+
* Label to show for the choice to the user.
|
|
4401
|
+
*/
|
|
4402
|
+
readonly label: string;
|
|
4403
|
+
/**
|
|
4404
|
+
* Whether to keep the notification open after the choice was selected
|
|
4405
|
+
* by the user. By default, will close the notification upon click.
|
|
4406
|
+
*/
|
|
4407
|
+
readonly keepOpen?: boolean;
|
|
4408
|
+
/**
|
|
4409
|
+
* Triggered when the user selects the choice.
|
|
4410
|
+
*/
|
|
4411
|
+
run: () => void;
|
|
4412
|
+
}
|
|
4413
|
+
interface IPromptChoice extends IBasePromptChoice {
|
|
4414
|
+
/**
|
|
4415
|
+
* Primary choices show up as buttons in the notification below the message.
|
|
4416
|
+
* Secondary choices show up under the gear icon in the header of the notification.
|
|
4417
|
+
*/
|
|
4418
|
+
readonly isSecondary?: boolean;
|
|
4419
|
+
}
|
|
4420
|
+
interface IPromptChoiceWithMenu extends IPromptChoice {
|
|
4421
|
+
/**
|
|
4422
|
+
* Additional choices those will be shown in the dropdown menu for this choice.
|
|
4423
|
+
*/
|
|
4424
|
+
readonly menu: IBasePromptChoice[];
|
|
4425
|
+
/**
|
|
4426
|
+
* Menu is not supported on secondary choices
|
|
4427
|
+
*/
|
|
4428
|
+
readonly isSecondary: false | undefined;
|
|
4429
|
+
}
|
|
4430
|
+
interface IPromptOptions extends INotificationProperties {
|
|
4431
|
+
/**
|
|
4432
|
+
* Will be called if the user closed the notification without picking
|
|
4433
|
+
* any of the provided choices.
|
|
4434
|
+
*/
|
|
4435
|
+
onCancel?: () => void;
|
|
4436
|
+
}
|
|
4437
|
+
interface IStatusMessageOptions {
|
|
4438
|
+
/**
|
|
4439
|
+
* An optional timeout after which the status message should show. By default
|
|
4440
|
+
* the status message will show immediately.
|
|
4441
|
+
*/
|
|
4442
|
+
readonly showAfter?: number;
|
|
4443
|
+
/**
|
|
4444
|
+
* An optional timeout after which the status message is to be hidden. By default
|
|
4445
|
+
* the status message will not hide until another status message is displayed.
|
|
4446
|
+
*/
|
|
4447
|
+
readonly hideAfter?: number;
|
|
4448
|
+
}
|
|
4449
|
+
declare const INotificationService: ServiceIdentifier<INotificationService>;
|
|
4450
|
+
/**
|
|
4451
|
+
* A service to bring up notifications and non-modal prompts.
|
|
4452
|
+
*
|
|
4453
|
+
* Note: use the `IDialogService` for a modal way to ask the user for input.
|
|
4454
|
+
*/
|
|
4455
|
+
interface INotificationService {
|
|
4456
|
+
readonly _serviceBrand: undefined;
|
|
4457
|
+
/**
|
|
4458
|
+
* The DND mode can be enabled or disabled
|
|
4459
|
+
* and will result in all info and warning
|
|
4460
|
+
* notifications to be silent.
|
|
4461
|
+
*/
|
|
4462
|
+
doNotDisturbMode: boolean;
|
|
4463
|
+
/**
|
|
4464
|
+
* Emitted when a new notification is added.
|
|
4465
|
+
*/
|
|
4466
|
+
readonly onDidAddNotification: Event<INotification>;
|
|
4467
|
+
/**
|
|
4468
|
+
* Emitted when a notification is removed.
|
|
4469
|
+
*/
|
|
4470
|
+
readonly onDidRemoveNotification: Event<INotification>;
|
|
4471
|
+
/**
|
|
4472
|
+
* Emitted when a do not disturb mode has changed.
|
|
4473
|
+
*/
|
|
4474
|
+
readonly onDidChangeDoNotDisturbMode: Event<void>;
|
|
4475
|
+
/**
|
|
4476
|
+
* Show the provided notification to the user. The returned `INotificationHandle`
|
|
4477
|
+
* can be used to control the notification afterwards.
|
|
4478
|
+
*
|
|
4479
|
+
* **Note:** If your intent is to show a message with actions to the user, consider
|
|
4480
|
+
* the `INotificationService.prompt()` method instead which are optimized for
|
|
4481
|
+
* this usecase and much easier to use!
|
|
4482
|
+
*
|
|
4483
|
+
* @returns a handle on the notification to e.g. hide it or update message, buttons, etc.
|
|
4484
|
+
*/
|
|
4485
|
+
notify(notification: INotification): INotificationHandle;
|
|
4486
|
+
/**
|
|
4487
|
+
* A convenient way of reporting infos. Use the `INotificationService.notify`
|
|
4488
|
+
* method if you need more control over the notification.
|
|
4489
|
+
*/
|
|
4490
|
+
info(message: NotificationMessage | NotificationMessage[]): void;
|
|
4491
|
+
/**
|
|
4492
|
+
* A convenient way of reporting warnings. Use the `INotificationService.notify`
|
|
4493
|
+
* method if you need more control over the notification.
|
|
4494
|
+
*/
|
|
4495
|
+
warn(message: NotificationMessage | NotificationMessage[]): void;
|
|
4496
|
+
/**
|
|
4497
|
+
* A convenient way of reporting errors. Use the `INotificationService.notify`
|
|
4498
|
+
* method if you need more control over the notification.
|
|
4499
|
+
*/
|
|
4500
|
+
error(message: NotificationMessage | NotificationMessage[]): void;
|
|
4501
|
+
/**
|
|
4502
|
+
* Shows a prompt in the notification area with the provided choices. The prompt
|
|
4503
|
+
* is non-modal. If you want to show a modal dialog instead, use `IDialogService`.
|
|
4504
|
+
*
|
|
4505
|
+
* @param severity the severity of the notification. Either `Info`, `Warning` or `Error`.
|
|
4506
|
+
* @param message the message to show as status.
|
|
4507
|
+
* @param choices options to be chosen from.
|
|
4508
|
+
* @param options provides some optional configuration options.
|
|
4509
|
+
*
|
|
4510
|
+
* @returns a handle on the notification to e.g. hide it or update message, buttons, etc.
|
|
4511
|
+
*/
|
|
4512
|
+
prompt(severity: Severity, message: string, choices: (IPromptChoice | IPromptChoiceWithMenu)[], options?: IPromptOptions): INotificationHandle;
|
|
4513
|
+
/**
|
|
4514
|
+
* Shows a status message in the status area with the provided text.
|
|
4515
|
+
*
|
|
4516
|
+
* @param message the message to show as status
|
|
4517
|
+
* @param options provides some optional configuration options
|
|
4518
|
+
*
|
|
4519
|
+
* @returns a disposable to hide the status message
|
|
4520
|
+
*/
|
|
4521
|
+
status(message: NotificationMessage, options?: IStatusMessageOptions): IDisposable;
|
|
4522
|
+
}
|
|
4523
|
+
|
|
4524
|
+
interface IRelativePattern {
|
|
4525
|
+
/**
|
|
4526
|
+
* A base file path to which this pattern will be matched against relatively.
|
|
4527
|
+
*/
|
|
4528
|
+
readonly base: string;
|
|
4529
|
+
/**
|
|
4530
|
+
* A file glob pattern like `*.{ts,js}` that will be matched on file paths
|
|
4531
|
+
* relative to the base path.
|
|
4532
|
+
*
|
|
4533
|
+
* Example: Given a base of `/home/work/folder` and a file path of `/home/work/folder/index.js`,
|
|
4534
|
+
* the file glob pattern will match on `index.js`.
|
|
4535
|
+
*/
|
|
4536
|
+
readonly pattern: string;
|
|
4537
|
+
}
|
|
4538
|
+
|
|
4539
|
+
interface LanguageFilter {
|
|
4540
|
+
readonly language?: string;
|
|
4541
|
+
readonly scheme?: string;
|
|
4542
|
+
readonly pattern?: string | IRelativePattern;
|
|
4543
|
+
readonly notebookType?: string;
|
|
4544
|
+
/**
|
|
4545
|
+
* This provider is implemented in the UI thread.
|
|
4546
|
+
*/
|
|
4547
|
+
readonly hasAccessToAllModels?: boolean;
|
|
4548
|
+
readonly exclusive?: boolean;
|
|
4549
|
+
}
|
|
4550
|
+
declare type LanguageSelector = string | LanguageFilter | ReadonlyArray<string | LanguageFilter>;
|
|
4551
|
+
|
|
4552
|
+
interface NotebookInfo {
|
|
4553
|
+
readonly uri: URI;
|
|
4554
|
+
readonly type: string;
|
|
4555
|
+
}
|
|
4556
|
+
interface NotebookInfoResolver {
|
|
4557
|
+
(uri: URI): NotebookInfo | undefined;
|
|
4558
|
+
}
|
|
4559
|
+
declare class LanguageFeatureRegistry<T> {
|
|
4560
|
+
private readonly _notebookInfoResolver?;
|
|
4561
|
+
private _clock;
|
|
4562
|
+
private readonly _entries;
|
|
4563
|
+
private readonly _onDidChange;
|
|
4564
|
+
readonly onDidChange: Event<number>;
|
|
4565
|
+
constructor(_notebookInfoResolver?: NotebookInfoResolver | undefined);
|
|
4566
|
+
register(selector: LanguageSelector, provider: T): IDisposable;
|
|
4567
|
+
has(model: ITextModel): boolean;
|
|
4568
|
+
all(model: ITextModel): T[];
|
|
4569
|
+
ordered(model: ITextModel): T[];
|
|
4570
|
+
orderedGroups(model: ITextModel): T[][];
|
|
4571
|
+
private _orderedForEach;
|
|
4572
|
+
private _lastCandidate;
|
|
4573
|
+
private _updateScores;
|
|
4574
|
+
private static _compareByScoreAndTime;
|
|
4575
|
+
}
|
|
4576
|
+
|
|
4577
|
+
declare const ILanguageFeaturesService: ServiceIdentifier<ILanguageFeaturesService>;
|
|
4578
|
+
interface ILanguageFeaturesService {
|
|
4579
|
+
readonly _serviceBrand: undefined;
|
|
4580
|
+
readonly referenceProvider: LanguageFeatureRegistry<ReferenceProvider>;
|
|
4581
|
+
readonly definitionProvider: LanguageFeatureRegistry<DefinitionProvider>;
|
|
4582
|
+
readonly typeDefinitionProvider: LanguageFeatureRegistry<TypeDefinitionProvider>;
|
|
4583
|
+
readonly declarationProvider: LanguageFeatureRegistry<DeclarationProvider>;
|
|
4584
|
+
readonly implementationProvider: LanguageFeatureRegistry<ImplementationProvider>;
|
|
4585
|
+
readonly codeActionProvider: LanguageFeatureRegistry<CodeActionProvider>;
|
|
4586
|
+
readonly documentPasteEditProvider: LanguageFeatureRegistry<DocumentPasteEditProvider>;
|
|
4587
|
+
readonly renameProvider: LanguageFeatureRegistry<RenameProvider>;
|
|
4588
|
+
readonly documentFormattingEditProvider: LanguageFeatureRegistry<DocumentFormattingEditProvider>;
|
|
4589
|
+
readonly documentRangeFormattingEditProvider: LanguageFeatureRegistry<DocumentRangeFormattingEditProvider>;
|
|
4590
|
+
readonly onTypeFormattingEditProvider: LanguageFeatureRegistry<OnTypeFormattingEditProvider>;
|
|
4591
|
+
readonly documentSymbolProvider: LanguageFeatureRegistry<DocumentSymbolProvider>;
|
|
4592
|
+
readonly inlayHintsProvider: LanguageFeatureRegistry<InlayHintsProvider>;
|
|
4593
|
+
readonly colorProvider: LanguageFeatureRegistry<DocumentColorProvider>;
|
|
4594
|
+
readonly codeLensProvider: LanguageFeatureRegistry<CodeLensProvider>;
|
|
4595
|
+
readonly signatureHelpProvider: LanguageFeatureRegistry<SignatureHelpProvider>;
|
|
4596
|
+
readonly hoverProvider: LanguageFeatureRegistry<HoverProvider>;
|
|
4597
|
+
readonly documentHighlightProvider: LanguageFeatureRegistry<DocumentHighlightProvider>;
|
|
4598
|
+
readonly documentRangeSemanticTokensProvider: LanguageFeatureRegistry<DocumentRangeSemanticTokensProvider>;
|
|
4599
|
+
readonly documentSemanticTokensProvider: LanguageFeatureRegistry<DocumentSemanticTokensProvider>;
|
|
4600
|
+
readonly selectionRangeProvider: LanguageFeatureRegistry<SelectionRangeProvider>;
|
|
4601
|
+
readonly foldingRangeProvider: LanguageFeatureRegistry<FoldingRangeProvider>;
|
|
4602
|
+
readonly linkProvider: LanguageFeatureRegistry<LinkProvider>;
|
|
4603
|
+
readonly inlineCompletionsProvider: LanguageFeatureRegistry<InlineCompletionsProvider>;
|
|
4604
|
+
readonly completionProvider: LanguageFeatureRegistry<CompletionItemProvider>;
|
|
4605
|
+
readonly linkedEditingRangeProvider: LanguageFeatureRegistry<LinkedEditingRangeProvider>;
|
|
4606
|
+
readonly inlineValuesProvider: LanguageFeatureRegistry<InlineValuesProvider>;
|
|
4607
|
+
readonly evaluatableExpressionProvider: LanguageFeatureRegistry<EvaluatableExpressionProvider>;
|
|
4608
|
+
readonly documentOnDropEditProvider: LanguageFeatureRegistry<DocumentOnDropEditProvider>;
|
|
4609
|
+
setNotebookTypeResolver(resolver: NotebookInfoResolver | undefined): void;
|
|
4610
|
+
}
|
|
4611
|
+
|
|
4612
|
+
/**
|
|
4613
|
+
* The options to create an editor.
|
|
4614
|
+
*/
|
|
4615
|
+
type IStandaloneEditorConstructionOptions = monaco.editor.IStandaloneEditorConstructionOptions
|
|
4616
|
+
/**
|
|
4617
|
+
* The options to create a diff editor.
|
|
4618
|
+
*/
|
|
4619
|
+
type IStandaloneDiffEditorConstructionOptions = monaco.editor.IStandaloneDiffEditorConstructionOptions
|
|
4620
|
+
type IStandaloneCodeEditor = monaco.editor.IStandaloneCodeEditor
|
|
4621
|
+
type IStandaloneDiffEditor = monaco.editor.IStandaloneDiffEditor
|
|
4622
|
+
|
|
4623
|
+
declare const ILanguageFeatureDebounceService: ServiceIdentifier<ILanguageFeatureDebounceService>;
|
|
4624
|
+
interface ILanguageFeatureDebounceService {
|
|
4625
|
+
readonly _serviceBrand: undefined;
|
|
4626
|
+
for(feature: LanguageFeatureRegistry<object>, debugName: string, config?: {
|
|
4627
|
+
min?: number;
|
|
4628
|
+
max?: number;
|
|
4629
|
+
salt?: string;
|
|
4630
|
+
}): IFeatureDebounceInformation;
|
|
4631
|
+
}
|
|
4632
|
+
interface IFeatureDebounceInformation {
|
|
4633
|
+
get(model: ITextModel): number;
|
|
4634
|
+
update(model: ITextModel, value: number): number;
|
|
4635
|
+
default(): number;
|
|
4636
|
+
}
|
|
4637
|
+
|
|
4638
|
+
type IEditorOverrideServices = monaco.editor.IEditorOverrideServices
|
|
4639
|
+
|
|
4640
|
+
/**
|
|
4641
|
+
* Create a new editor under `domElement`.
|
|
4642
|
+
* `domElement` should be empty (not contain other dom nodes).
|
|
4643
|
+
* The editor will read the size of `domElement`.
|
|
4644
|
+
*/
|
|
4645
|
+
declare function create(domElement: HTMLElement, options?: IStandaloneEditorConstructionOptions, override?: IEditorOverrideServices): IStandaloneCodeEditor;
|
|
4646
|
+
/**
|
|
4647
|
+
* Create a new diff editor under `domElement`.
|
|
4648
|
+
* `domElement` should be empty (not contain other dom nodes).
|
|
4649
|
+
* The editor will read the size of `domElement`.
|
|
4650
|
+
*/
|
|
4651
|
+
declare function createDiffEditor(domElement: HTMLElement, options?: IStandaloneDiffEditorConstructionOptions, override?: IEditorOverrideServices): IStandaloneDiffEditor;
|
|
4652
|
+
|
|
4653
|
+
interface ErrorListenerCallback {
|
|
4654
|
+
(error: any): void;
|
|
4655
|
+
}
|
|
4656
|
+
interface ErrorListenerUnbind {
|
|
4657
|
+
(): void;
|
|
4658
|
+
}
|
|
4659
|
+
declare class ErrorHandler {
|
|
4660
|
+
private unexpectedErrorHandler;
|
|
4661
|
+
private listeners;
|
|
4662
|
+
constructor();
|
|
4663
|
+
addListener(listener: ErrorListenerCallback): ErrorListenerUnbind;
|
|
4664
|
+
private emit;
|
|
4665
|
+
private _removeListener;
|
|
4666
|
+
setUnexpectedErrorHandler(newUnexpectedErrorHandler: (e: any) => void): void;
|
|
4667
|
+
getUnexpectedErrorHandler(): (e: any) => void;
|
|
4668
|
+
onUnexpectedError(e: any): void;
|
|
4669
|
+
onUnexpectedExternalError(e: any): void;
|
|
4670
|
+
}
|
|
4671
|
+
declare const errorHandler: ErrorHandler;
|
|
4672
|
+
|
|
4673
|
+
interface ILineRange {
|
|
4674
|
+
startLineNumber: number;
|
|
4675
|
+
endLineNumber: number;
|
|
4676
|
+
}
|
|
4677
|
+
declare const enum FoldSource {
|
|
4678
|
+
provider = 0,
|
|
4679
|
+
userDefined = 1,
|
|
4680
|
+
recovered = 2
|
|
4681
|
+
}
|
|
4682
|
+
interface FoldRange {
|
|
4683
|
+
startLineNumber: number;
|
|
4684
|
+
endLineNumber: number;
|
|
4685
|
+
type: string | undefined;
|
|
4686
|
+
isCollapsed: boolean;
|
|
4687
|
+
source: FoldSource;
|
|
4688
|
+
}
|
|
4689
|
+
declare class FoldingRegions {
|
|
4690
|
+
private readonly _startIndexes;
|
|
4691
|
+
private readonly _endIndexes;
|
|
4692
|
+
private readonly _collapseStates;
|
|
4693
|
+
private readonly _userDefinedStates;
|
|
4694
|
+
private readonly _recoveredStates;
|
|
4695
|
+
private _parentsComputed;
|
|
4696
|
+
private readonly _types;
|
|
4697
|
+
constructor(startIndexes: Uint32Array, endIndexes: Uint32Array, types?: Array<string | undefined>);
|
|
4698
|
+
private ensureParentIndices;
|
|
4699
|
+
get length(): number;
|
|
4700
|
+
getStartLineNumber(index: number): number;
|
|
4701
|
+
getEndLineNumber(index: number): number;
|
|
4702
|
+
getType(index: number): string | undefined;
|
|
4703
|
+
hasTypes(): boolean;
|
|
4704
|
+
isCollapsed(index: number): boolean;
|
|
4705
|
+
setCollapsed(index: number, newState: boolean): void;
|
|
4706
|
+
private isUserDefined;
|
|
4707
|
+
private setUserDefined;
|
|
4708
|
+
private isRecovered;
|
|
4709
|
+
private setRecovered;
|
|
4710
|
+
getSource(index: number): FoldSource;
|
|
4711
|
+
setSource(index: number, source: FoldSource): void;
|
|
4712
|
+
setCollapsedAllOfType(type: string, newState: boolean): boolean;
|
|
4713
|
+
toRegion(index: number): FoldingRegion;
|
|
4714
|
+
getParentIndex(index: number): number;
|
|
4715
|
+
contains(index: number, line: number): boolean;
|
|
4716
|
+
private findIndex;
|
|
4717
|
+
findRange(line: number): number;
|
|
4718
|
+
private readonly sourceAbbr;
|
|
4719
|
+
toString(): string;
|
|
4720
|
+
toFoldRange(index: number): FoldRange;
|
|
4721
|
+
static fromFoldRanges(ranges: FoldRange[]): FoldingRegions;
|
|
4722
|
+
/**
|
|
4723
|
+
* Two inputs, each a FoldingRegions or a FoldRange[], are merged.
|
|
4724
|
+
* Each input must be pre-sorted on startLineNumber.
|
|
4725
|
+
* The first list is assumed to always include all regions currently defined by range providers.
|
|
4726
|
+
* The second list only contains the previously collapsed and all manual ranges.
|
|
4727
|
+
* If the line position matches, the range of the new range is taken, and the range is no longer manual
|
|
4728
|
+
* When an entry in one list overlaps an entry in the other, the second list's entry "wins" and
|
|
4729
|
+
* overlapping entries in the first list are discarded.
|
|
4730
|
+
* Invalid entries are discarded. An entry is invalid if:
|
|
4731
|
+
* the start and end line numbers aren't a valid range of line numbers,
|
|
4732
|
+
* it is out of sequence or has the same start line as a preceding entry,
|
|
4733
|
+
* it overlaps a preceding entry and is not fully contained by that entry.
|
|
4734
|
+
*/
|
|
4735
|
+
static sanitizeAndMerge(rangesA: FoldingRegions | FoldRange[], rangesB: FoldingRegions | FoldRange[], maxLineNumber: number | undefined): FoldRange[];
|
|
4736
|
+
}
|
|
4737
|
+
declare class FoldingRegion {
|
|
4738
|
+
private readonly ranges;
|
|
4739
|
+
private index;
|
|
4740
|
+
constructor(ranges: FoldingRegions, index: number);
|
|
4741
|
+
get startLineNumber(): number;
|
|
4742
|
+
get endLineNumber(): number;
|
|
4743
|
+
get regionIndex(): number;
|
|
4744
|
+
get parentIndex(): number;
|
|
4745
|
+
get isCollapsed(): boolean;
|
|
4746
|
+
containedBy(range: ILineRange): boolean;
|
|
4747
|
+
containsLine(lineNumber: number): boolean;
|
|
4748
|
+
hidesLine(lineNumber: number): boolean;
|
|
4749
|
+
}
|
|
4750
|
+
|
|
4751
|
+
interface IDecorationProvider {
|
|
4752
|
+
getDecorationOption(isCollapsed: boolean, isHidden: boolean, isManual: boolean): IModelDecorationOptions;
|
|
4753
|
+
changeDecorations<T>(callback: (changeAccessor: IModelDecorationsChangeAccessor) => T): T | null;
|
|
4754
|
+
removeDecorations(decorationIds: string[]): void;
|
|
4755
|
+
}
|
|
4756
|
+
interface FoldingModelChangeEvent {
|
|
4757
|
+
model: FoldingModel;
|
|
4758
|
+
collapseStateChanged?: FoldingRegion[];
|
|
4759
|
+
}
|
|
4760
|
+
interface ILineMemento extends ILineRange {
|
|
4761
|
+
checksum?: number;
|
|
4762
|
+
isCollapsed?: boolean;
|
|
4763
|
+
source?: FoldSource;
|
|
4764
|
+
}
|
|
4765
|
+
declare type CollapseMemento = ILineMemento[];
|
|
4766
|
+
declare class FoldingModel {
|
|
4767
|
+
private readonly _textModel;
|
|
4768
|
+
private readonly _decorationProvider;
|
|
4769
|
+
private _regions;
|
|
4770
|
+
private _editorDecorationIds;
|
|
4771
|
+
private readonly _updateEventEmitter;
|
|
4772
|
+
readonly onDidChange: Event<FoldingModelChangeEvent>;
|
|
4773
|
+
get regions(): FoldingRegions;
|
|
4774
|
+
get textModel(): ITextModel;
|
|
4775
|
+
get decorationProvider(): IDecorationProvider;
|
|
4776
|
+
constructor(textModel: ITextModel, decorationProvider: IDecorationProvider);
|
|
4777
|
+
toggleCollapseState(toggledRegions: FoldingRegion[]): void;
|
|
4778
|
+
removeManualRanges(ranges: ILineRange[]): void;
|
|
4779
|
+
update(newRegions: FoldingRegions, blockedLineNumers?: number[]): void;
|
|
4780
|
+
updatePost(newRegions: FoldingRegions): void;
|
|
4781
|
+
private _currentFoldedOrManualRanges;
|
|
4782
|
+
/**
|
|
4783
|
+
* Collapse state memento, for persistence only
|
|
4784
|
+
*/
|
|
4785
|
+
getMemento(): CollapseMemento | undefined;
|
|
4786
|
+
/**
|
|
4787
|
+
* Apply persisted state, for persistence only
|
|
4788
|
+
*/
|
|
4789
|
+
applyMemento(state: CollapseMemento): void;
|
|
4790
|
+
private _getLinesChecksum;
|
|
4791
|
+
dispose(): void;
|
|
4792
|
+
getAllRegionsAtLine(lineNumber: number, filter?: (r: FoldingRegion, level: number) => boolean): FoldingRegion[];
|
|
4793
|
+
getRegionAtLine(lineNumber: number): FoldingRegion | null;
|
|
4794
|
+
getRegionsInside(region: FoldingRegion | null, filter?: RegionFilter | RegionFilterWithLevel): FoldingRegion[];
|
|
4795
|
+
}
|
|
4796
|
+
declare type RegionFilter = (r: FoldingRegion) => boolean;
|
|
4797
|
+
declare type RegionFilterWithLevel = (r: FoldingRegion, level: number) => boolean;
|
|
4798
|
+
/**
|
|
4799
|
+
* Folds all regions for which the lines start with a given regex
|
|
4800
|
+
* @param foldingModel the folding model
|
|
4801
|
+
*/
|
|
4802
|
+
declare function setCollapseStateForMatchingLines(foldingModel: FoldingModel, regExp: RegExp, doCollapse: boolean): void;
|
|
4803
|
+
|
|
4804
|
+
interface FoldingStateMemento {
|
|
4805
|
+
collapsedRegions?: CollapseMemento;
|
|
4806
|
+
lineCount?: number;
|
|
4807
|
+
provider?: string;
|
|
4808
|
+
foldedImports?: boolean;
|
|
4809
|
+
}
|
|
4810
|
+
declare class FoldingController extends Disposable implements IEditorContribution {
|
|
4811
|
+
private readonly contextKeyService;
|
|
4812
|
+
private readonly languageConfigurationService;
|
|
4813
|
+
private readonly languageFeaturesService;
|
|
4814
|
+
static readonly ID = "editor.contrib.folding";
|
|
4815
|
+
static get(editor: ICodeEditor): FoldingController | null;
|
|
4816
|
+
private readonly editor;
|
|
4817
|
+
private _isEnabled;
|
|
4818
|
+
private _useFoldingProviders;
|
|
4819
|
+
private _unfoldOnClickAfterEndOfLine;
|
|
4820
|
+
private _restoringViewState;
|
|
4821
|
+
private _foldingImportsByDefault;
|
|
4822
|
+
private _currentModelHasFoldedImports;
|
|
4823
|
+
private _maxFoldingRegions;
|
|
4824
|
+
private _notifyTooManyRegions;
|
|
4825
|
+
private _tooManyRegionsNotified;
|
|
4826
|
+
private readonly foldingDecorationProvider;
|
|
4827
|
+
private foldingModel;
|
|
4828
|
+
private hiddenRangeModel;
|
|
4829
|
+
private rangeProvider;
|
|
4830
|
+
private foldingRegionPromise;
|
|
4831
|
+
private foldingModelPromise;
|
|
4832
|
+
private updateScheduler;
|
|
4833
|
+
private readonly updateDebounceInfo;
|
|
4834
|
+
private foldingEnabled;
|
|
4835
|
+
private cursorChangedScheduler;
|
|
4836
|
+
private readonly localToDispose;
|
|
4837
|
+
private mouseDownInfo;
|
|
4838
|
+
constructor(editor: ICodeEditor, contextKeyService: IContextKeyService, languageConfigurationService: ILanguageConfigurationService, notificationService: INotificationService, languageFeatureDebounceService: ILanguageFeatureDebounceService, languageFeaturesService: ILanguageFeaturesService);
|
|
4839
|
+
/**
|
|
4840
|
+
* Store view state.
|
|
4841
|
+
*/
|
|
4842
|
+
saveViewState(): FoldingStateMemento | undefined;
|
|
4843
|
+
/**
|
|
4844
|
+
* Restore view state.
|
|
4845
|
+
*/
|
|
4846
|
+
restoreViewState(state: FoldingStateMemento): void;
|
|
4847
|
+
private onModelChanged;
|
|
4848
|
+
private onFoldingStrategyChanged;
|
|
4849
|
+
private getRangeProvider;
|
|
4850
|
+
getFoldingModel(): Promise<FoldingModel | null> | null;
|
|
4851
|
+
private onDidChangeModelContent;
|
|
4852
|
+
triggerFoldingModelChanged(): void;
|
|
4853
|
+
private onHiddenRangesChanges;
|
|
4854
|
+
private onCursorPositionChanged;
|
|
4855
|
+
private revealCursor;
|
|
4856
|
+
private onEditorMouseDown;
|
|
4857
|
+
private onEditorMouseUp;
|
|
4858
|
+
reveal(position: IPosition): void;
|
|
4859
|
+
}
|
|
4860
|
+
|
|
4861
|
+
interface IRegistry {
|
|
4862
|
+
/**
|
|
4863
|
+
* Adds the extension functions and properties defined by data to the
|
|
4864
|
+
* platform. The provided id must be unique.
|
|
4865
|
+
* @param id a unique identifier
|
|
4866
|
+
* @param data a contribution
|
|
4867
|
+
*/
|
|
4868
|
+
add(id: string, data: any): void;
|
|
4869
|
+
/**
|
|
4870
|
+
* Returns true iff there is an extension with the provided id.
|
|
4871
|
+
* @param id an extension identifier
|
|
4872
|
+
*/
|
|
4873
|
+
knows(id: string): boolean;
|
|
4874
|
+
/**
|
|
4875
|
+
* Returns the extension functions and properties defined by the specified key or null.
|
|
4876
|
+
* @param id an extension identifier
|
|
4877
|
+
*/
|
|
4878
|
+
as<T>(id: string): T;
|
|
4879
|
+
}
|
|
4880
|
+
declare const Registry: IRegistry;
|
|
4881
|
+
|
|
4882
|
+
interface ISchemaContributions {
|
|
4883
|
+
schemas: {
|
|
4884
|
+
[id: string]: IJSONSchema;
|
|
4885
|
+
};
|
|
4886
|
+
}
|
|
4887
|
+
interface IJSONContributionRegistry {
|
|
4888
|
+
readonly onDidChangeSchema: Event<string>;
|
|
4889
|
+
/**
|
|
4890
|
+
* Register a schema to the registry.
|
|
4891
|
+
*/
|
|
4892
|
+
registerSchema(uri: string, unresolvedSchemaContent: IJSONSchema): void;
|
|
4893
|
+
/**
|
|
4894
|
+
* Notifies all listeners that the content of the given schema has changed.
|
|
4895
|
+
* @param uri The id of the schema
|
|
4896
|
+
*/
|
|
4897
|
+
notifySchemaChanged(uri: string): void;
|
|
4898
|
+
/**
|
|
4899
|
+
* Get all schemas
|
|
4900
|
+
*/
|
|
4901
|
+
getSchemaContributions(): ISchemaContributions;
|
|
4902
|
+
}
|
|
4903
|
+
|
|
4904
|
+
declare const createConfiguredEditor: typeof create;
|
|
4905
|
+
declare const createConfiguredDiffEditor: typeof createDiffEditor;
|
|
4906
|
+
declare const Extensions: {
|
|
4907
|
+
Configuration: string;
|
|
4908
|
+
JSONContribution: string;
|
|
4909
|
+
};
|
|
4910
|
+
declare type FileMatch = Partial<Record<string, string[]>>;
|
|
4911
|
+
declare function getJsonSchemas(fileMatchs?: FileMatch): monaco.languages.json.DiagnosticsOptions['schemas'];
|
|
4912
|
+
declare const onDidChangeJsonSchema: Event<string>;
|
|
4913
|
+
|
|
4914
|
+
export { CommandsRegistry, DisposableStore, Extensions, FoldingController, FoldingModel, IJSONContributionRegistry, IJSONSchema, Registry, createConfiguredDiffEditor, createConfiguredEditor, errorHandler, getJsonSchemas, onDidChangeJsonSchema, registerColor, setCollapseStateForMatchingLines };
|