@opensumi/sumi 2.12.1-next-079c1930 → 2.13.3

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.
@@ -1,42 +1,43 @@
1
+ /* eslint-disable @typescript-eslint/no-empty-interface */
1
2
  declare module 'sumi-worker' {
2
3
  export namespace languages {
3
4
  /**
4
- * Compute the match between a document [selector](#DocumentSelector) and a document. Values
5
- * greater than zero mean the selector matches the document.
6
- *
7
- * A match is computed according to these rules:
8
- * 1. When [`DocumentSelector`](#DocumentSelector) is an array, compute the match for each contained `DocumentFilter` or language identifier and take the maximum value.
9
- * 2. A string will be desugared to become the `language`-part of a [`DocumentFilter`](#DocumentFilter), so `"fooLang"` is like `{ language: "fooLang" }`.
10
- * 3. A [`DocumentFilter`](#DocumentFilter) will be matched against the document by comparing its parts with the document. The following rules apply:
11
- * 1. When the `DocumentFilter` is empty (`{}`) the result is `0`
12
- * 2. When `scheme`, `language`, or `pattern` are defined but one doesn’t match, the result is `0`
13
- * 3. Matching against `*` gives a score of `5`, matching via equality or via a glob-pattern gives a score of `10`
14
- * 4. The result is the maximum value of each match
15
- *
16
- * Samples:
17
- * ```js
18
- * // default document from disk (file-scheme)
19
- * doc.uri; //'file:///my/file.js'
20
- * doc.languageId; // 'javascript'
21
- * match('javascript', doc); // 10;
22
- * match({language: 'javascript'}, doc); // 10;
23
- * match({language: 'javascript', scheme: 'file'}, doc); // 10;
24
- * match('*', doc); // 5
25
- * match('fooLang', doc); // 0
26
- * match(['fooLang', '*'], doc); // 5
27
- *
28
- * // virtual document, e.g. from git-index
29
- * doc.uri; // 'git:/my/file.js'
30
- * doc.languageId; // 'javascript'
31
- * match('javascript', doc); // 10;
32
- * match({language: 'javascript', scheme: 'git'}, doc); // 10;
33
- * match('*', doc); // 5
34
- * ```
35
- *
36
- * @param selector A document selector.
37
- * @param document A text document.
38
- * @return A number `>0` when the selector matches and `0` when the selector does not match.
39
- */
5
+ * Compute the match between a document [selector](#DocumentSelector) and a document. Values
6
+ * greater than zero mean the selector matches the document.
7
+ *
8
+ * A match is computed according to these rules:
9
+ * 1. When [`DocumentSelector`](#DocumentSelector) is an array, compute the match for each contained `DocumentFilter` or language identifier and take the maximum value.
10
+ * 2. A string will be desugared to become the `language`-part of a [`DocumentFilter`](#DocumentFilter), so `"fooLang"` is like `{ language: "fooLang" }`.
11
+ * 3. A [`DocumentFilter`](#DocumentFilter) will be matched against the document by comparing its parts with the document. The following rules apply:
12
+ * 1. When the `DocumentFilter` is empty (`{}`) the result is `0`
13
+ * 2. When `scheme`, `language`, or `pattern` are defined but one doesn’t match, the result is `0`
14
+ * 3. Matching against `*` gives a score of `5`, matching via equality or via a glob-pattern gives a score of `10`
15
+ * 4. The result is the maximum value of each match
16
+ *
17
+ * Samples:
18
+ * ```js
19
+ * // default document from disk (file-scheme)
20
+ * doc.uri; //'file:///my/file.js'
21
+ * doc.languageId; // 'javascript'
22
+ * match('javascript', doc); // 10;
23
+ * match({language: 'javascript'}, doc); // 10;
24
+ * match({language: 'javascript', scheme: 'file'}, doc); // 10;
25
+ * match('*', doc); // 5
26
+ * match('fooLang', doc); // 0
27
+ * match(['fooLang', '*'], doc); // 5
28
+ *
29
+ * // virtual document, e.g. from git-index
30
+ * doc.uri; // 'git:/my/file.js'
31
+ * doc.languageId; // 'javascript'
32
+ * match('javascript', doc); // 10;
33
+ * match({language: 'javascript', scheme: 'git'}, doc); // 10;
34
+ * match('*', doc); // 5
35
+ * ```
36
+ *
37
+ * @param selector A document selector.
38
+ * @param document A text document.
39
+ * @return A number `>0` when the selector matches and `0` when the selector does not match.
40
+ */
40
41
  export function match(selector: DocumentSelector, document: TextDocument): number;
41
42
 
42
43
  /**
@@ -53,7 +54,11 @@ declare module 'sumi-worker' {
53
54
  * @param triggerCharacters Trigger completion when the user types one of the characters, like `.` or `:`.
54
55
  * @return A [disposable](#Disposable) that unregisters this provider when being disposed.
55
56
  */
56
- export function registerCompletionItemProvider(selector: DocumentSelector, provider: CompletionItemProvider, ...triggerCharacters: string[]): Disposable;
57
+ export function registerCompletionItemProvider(
58
+ selector: DocumentSelector,
59
+ provider: CompletionItemProvider,
60
+ ...triggerCharacters: string[]
61
+ ): Disposable;
57
62
  /**
58
63
  * Register a code lens provider.
59
64
  *
@@ -90,7 +95,10 @@ declare module 'sumi-worker' {
90
95
  * @param provider A type definition provider.
91
96
  * @return A [disposable](#Disposable) that unregisters this provider when being disposed.
92
97
  */
93
- export function registerTypeDefinitionProvider(selector: DocumentSelector, provider: TypeDefinitionProvider): Disposable;
98
+ export function registerTypeDefinitionProvider(
99
+ selector: DocumentSelector,
100
+ provider: TypeDefinitionProvider,
101
+ ): Disposable;
94
102
  /**
95
103
  * Register a hover provider.
96
104
  *
@@ -126,7 +134,10 @@ declare module 'sumi-worker' {
126
134
  * @param provider A document highlight provider.
127
135
  * @return A [disposable](#Disposable) that unregisters this provider when being disposed.
128
136
  */
129
- export function registerDocumentHighlightProvider(selector: DocumentSelector, provider: DocumentHighlightProvider): Disposable;
137
+ export function registerDocumentHighlightProvider(
138
+ selector: DocumentSelector,
139
+ provider: DocumentHighlightProvider,
140
+ ): Disposable;
130
141
  /**
131
142
  * Register a reference provider.
132
143
  *
@@ -154,7 +165,10 @@ declare module 'sumi-worker' {
154
165
  * @param provider A document range formatting edit provider.
155
166
  * @return A [disposable](#Disposable) that unregisters this provider when being disposed.
156
167
  */
157
- export function registerDocumentRangeFormattingEditProvider(selector: DocumentSelector, provider: DocumentRangeFormattingEditProvider): Disposable;
168
+ export function registerDocumentRangeFormattingEditProvider(
169
+ selector: DocumentSelector,
170
+ provider: DocumentRangeFormattingEditProvider,
171
+ ): Disposable;
158
172
  /**
159
173
  * Register a formatting provider that works on type. The provider is active when the user enables the setting `editor.formatOnType`.
160
174
  *
@@ -168,7 +182,12 @@ declare module 'sumi-worker' {
168
182
  * @param moreTriggerCharacter More trigger characters.
169
183
  * @return A [disposable](#Disposable) that unregisters this provider when being disposed.
170
184
  */
171
- export function registerOnTypeFormattingEditProvider(selector: DocumentSelector, provider: OnTypeFormattingEditProvider, firstTriggerCharacter: string, ...moreTriggerCharacter: string[]): Disposable;
185
+ export function registerOnTypeFormattingEditProvider(
186
+ selector: DocumentSelector,
187
+ provider: OnTypeFormattingEditProvider,
188
+ firstTriggerCharacter: string,
189
+ ...moreTriggerCharacter: string[]
190
+ ): Disposable;
172
191
  /**
173
192
  * Register a document link provider.
174
193
  *
@@ -180,18 +199,21 @@ declare module 'sumi-worker' {
180
199
  * @param provider A document link provider.
181
200
  * @return A [disposable](#Disposable) that unregisters this provider when being disposed.
182
201
  */
183
- export function registerDocumentLinkProvider(selector: DocumentSelector, provider: DocumentLinkProvider): Disposable;
184
- /**
185
- * Register a color provider.
186
- *
187
- * Multiple providers can be registered for a language. In that case providers are asked in
188
- * parallel and the results are merged. A failing provider (rejected promise or exception) will
189
- * not cause a failure of the whole operation.
190
- *
191
- * @param selector A selector that defines the documents this provider is applicable to.
192
- * @param provider A color provider.
193
- * @return A [disposable](#Disposable) that unregisters this provider when being disposed.
194
- */
202
+ export function registerDocumentLinkProvider(
203
+ selector: DocumentSelector,
204
+ provider: DocumentLinkProvider,
205
+ ): Disposable;
206
+ /**
207
+ * Register a color provider.
208
+ *
209
+ * Multiple providers can be registered for a language. In that case providers are asked in
210
+ * parallel and the results are merged. A failing provider (rejected promise or exception) will
211
+ * not cause a failure of the whole operation.
212
+ *
213
+ * @param selector A selector that defines the documents this provider is applicable to.
214
+ * @param provider A color provider.
215
+ * @return A [disposable](#Disposable) that unregisters this provider when being disposed.
216
+ */
195
217
  export function registerColorProvider(selector: DocumentSelector, provider: DocumentColorProvider): Disposable;
196
218
 
197
219
  /**
@@ -209,7 +231,10 @@ declare module 'sumi-worker' {
209
231
  * @param provider A folding range provider.
210
232
  * @return A [disposable](#Disposable) that unregisters this provider when being disposed.
211
233
  */
212
- export function registerFoldingRangeProvider(selector: DocumentSelector, provider: FoldingRangeProvider): Disposable;
234
+ export function registerFoldingRangeProvider(
235
+ selector: DocumentSelector,
236
+ provider: FoldingRangeProvider,
237
+ ): Disposable;
213
238
  /**
214
239
  * Set a [language configuration](#LanguageConfiguration) for a language.
215
240
  *
@@ -281,7 +306,11 @@ declare module 'sumi-worker' {
281
306
  * @param metadata Metadata about the kind of code actions the provider providers.
282
307
  * @return A [disposable](#Disposable) that unregisters this provider when being disposed.
283
308
  */
284
- export function registerCodeActionsProvider(selector: DocumentSelector, provider: CodeActionProvider, metadata?: CodeActionProviderMetadata): Disposable;
309
+ export function registerCodeActionsProvider(
310
+ selector: DocumentSelector,
311
+ provider: CodeActionProvider,
312
+ metadata?: CodeActionProviderMetadata,
313
+ ): Disposable;
285
314
 
286
315
  /**
287
316
  * Register an implementation provider.
@@ -294,7 +323,10 @@ declare module 'sumi-worker' {
294
323
  * @param provider An implementation provider.
295
324
  * @return A [disposable](#Disposable) that unregisters this provider when being disposed.
296
325
  */
297
- export function registerImplementationProvider(selector: DocumentSelector, provider: ImplementationProvider): Disposable;
326
+ export function registerImplementationProvider(
327
+ selector: DocumentSelector,
328
+ provider: ImplementationProvider,
329
+ ): Disposable;
298
330
 
299
331
  /**
300
332
  * Register a document symbol provider.
@@ -308,7 +340,11 @@ declare module 'sumi-worker' {
308
340
  * @param metaData metadata about the provider
309
341
  * @return A [disposable](#Disposable) that unregisters this provider when being disposed.
310
342
  */
311
- export function registerDocumentSymbolProvider(selector: DocumentSelector, provider: DocumentSymbolProvider, metaData?: DocumentSymbolProviderMetadata): Disposable;
343
+ export function registerDocumentSymbolProvider(
344
+ selector: DocumentSelector,
345
+ provider: DocumentSymbolProvider,
346
+ metaData?: DocumentSymbolProviderMetadata,
347
+ ): Disposable;
312
348
 
313
349
  /**
314
350
  * Register a workspace symbol provider.
@@ -346,7 +382,10 @@ declare module 'sumi-worker' {
346
382
  * @param provider A document formatting edit provider.
347
383
  * @return A [disposable](#Disposable) that unregisters this provider when being disposed.
348
384
  */
349
- export function registerDocumentFormattingEditProvider(selector: DocumentSelector, provider: DocumentFormattingEditProvider): Disposable;
385
+ export function registerDocumentFormattingEditProvider(
386
+ selector: DocumentSelector,
387
+ provider: DocumentFormattingEditProvider,
388
+ ): Disposable;
350
389
 
351
390
  /**
352
391
  * Register a signature help provider.
@@ -361,8 +400,16 @@ declare module 'sumi-worker' {
361
400
  * @param metadata Information about the provider.
362
401
  * @return A [disposable](#Disposable) that unregisters this provider when being disposed.
363
402
  */
364
- export function registerSignatureHelpProvider(selector: DocumentSelector, provider: SignatureHelpProvider, ...triggerCharacters: string[]): Disposable;
365
- export function registerSignatureHelpProvider(selector: DocumentSelector, provider: SignatureHelpProvider, metadata: SignatureHelpProviderMetadata): Disposable;
403
+ export function registerSignatureHelpProvider(
404
+ selector: DocumentSelector,
405
+ provider: SignatureHelpProvider,
406
+ ...triggerCharacters: string[]
407
+ ): Disposable;
408
+ export function registerSignatureHelpProvider(
409
+ selector: DocumentSelector,
410
+ provider: SignatureHelpProvider,
411
+ metadata: SignatureHelpProviderMetadata,
412
+ ): Disposable;
366
413
 
367
414
  /**
368
415
  * Register a selection range provider.
@@ -375,7 +422,10 @@ declare module 'sumi-worker' {
375
422
  * @param provider A selection range provider.
376
423
  * @return A [disposable](#Disposable) that unregisters this provider when being disposed.
377
424
  */
378
- export function registerSelectionRangeProvider(selector: DocumentSelector, provider: SelectionRangeProvider): Disposable;
425
+ export function registerSelectionRangeProvider(
426
+ selector: DocumentSelector,
427
+ provider: SelectionRangeProvider,
428
+ ): Disposable;
379
429
  }
380
430
 
381
431
  /**
@@ -385,7 +435,6 @@ declare module 'sumi-worker' {
385
435
  * A CodeAction must set either [`edit`](#CodeAction.edit) and/or a [`command`](#CodeAction.command). If both are supplied, the `edit` is applied first, then the command is executed.
386
436
  */
387
437
  export class CodeAction {
388
-
389
438
  /**
390
439
  * A short, human-readable, title for this code action.
391
440
  */
@@ -557,7 +606,6 @@ declare module 'sumi-worker' {
557
606
  contains(other: CodeActionKind): boolean;
558
607
  }
559
608
  export class CodeLens {
560
-
561
609
  /**
562
610
  * The range in which this code lens is valid. Should only span a single line.
563
611
  */
@@ -586,7 +634,6 @@ declare module 'sumi-worker' {
586
634
  * rendered in a tooltip-like widget.
587
635
  */
588
636
  export class Hover {
589
-
590
637
  /**
591
638
  * The contents of this hover.
592
639
  */
@@ -642,7 +689,12 @@ declare module 'sumi-worker' {
642
689
  * @return An array of commands, quick fixes, or refactorings or a thenable of such. The lack of a result can be
643
690
  * signaled by returning `undefined`, `null`, or an empty array.
644
691
  */
645
- provideCodeActions(document: TextDocument, range: Range | Selection, context: CodeActionContext, token: CancellationToken): ProviderResult<(Command | CodeAction)[]>;
692
+ provideCodeActions(
693
+ document: TextDocument,
694
+ range: Range | Selection,
695
+ context: CodeActionContext,
696
+ token: CancellationToken,
697
+ ): ProviderResult<(Command | CodeAction)[]>;
646
698
  }
647
699
 
648
700
  /**
@@ -674,7 +726,6 @@ declare module 'sumi-worker' {
674
726
  * as dedicated horizontal lines in between the source text.
675
727
  */
676
728
  export interface CodeLensProvider<T extends CodeLens = CodeLens> {
677
-
678
729
  /**
679
730
  * An optional event to signal that the code lenses from this provider have changed.
680
731
  */
@@ -708,7 +759,6 @@ declare module 'sumi-worker' {
708
759
  * the [hover](https://code.visualstudio.com/docs/editor/intellisense)-feature.
709
760
  */
710
761
  export interface HoverProvider {
711
-
712
762
  /**
713
763
  * Provide a hover for the given position and document. Multiple hovers at the same
714
764
  * position will be merged by the editor. A hover can have a range which defaults
@@ -727,7 +777,6 @@ declare module 'sumi-worker' {
727
777
  * A document highlight kind.
728
778
  */
729
779
  export enum DocumentHighlightKind {
730
-
731
780
  /**
732
781
  * A textual occurrence.
733
782
  */
@@ -750,7 +799,6 @@ declare module 'sumi-worker' {
750
799
  * the background color of its range.
751
800
  */
752
801
  export class DocumentHighlight {
753
-
754
802
  /**
755
803
  * The range this highlight applies to.
756
804
  */
@@ -774,7 +822,6 @@ declare module 'sumi-worker' {
774
822
  * the word-highlight-feature.
775
823
  */
776
824
  export interface DocumentHighlightProvider {
777
-
778
825
  /**
779
826
  * Provide a set of document highlights, like all occurrences of a variable or
780
827
  * all exit-points of a function.
@@ -785,7 +832,11 @@ declare module 'sumi-worker' {
785
832
  * @return An array of document highlights or a thenable that resolves to such. The lack of a result can be
786
833
  * signaled by returning `undefined`, `null`, or an empty array.
787
834
  */
788
- provideDocumentHighlights(document: TextDocument, position: Position, token: CancellationToken): ProviderResult<DocumentHighlight[]>;
835
+ provideDocumentHighlights(
836
+ document: TextDocument,
837
+ position: Position,
838
+ token: CancellationToken,
839
+ ): ProviderResult<DocumentHighlight[]>;
789
840
  }
790
841
  /**
791
842
  * A completion item represents a text snippet that is proposed to complete text that is being typed.
@@ -804,7 +855,6 @@ declare module 'sumi-worker' {
804
855
  * @寻壑
805
856
  */
806
857
  export class CompletionItem {
807
-
808
858
  /**
809
859
  * The label of this completion item. By default
810
860
  * this is also the text that is inserted when selecting
@@ -926,7 +976,6 @@ declare module 'sumi-worker' {
926
976
  * @寻壑
927
977
  */
928
978
  export class CompletionList {
929
-
930
979
  /**
931
980
  * This list is not complete. Further typing should result in recomputing
932
981
  * this list.
@@ -952,7 +1001,6 @@ declare module 'sumi-worker' {
952
1001
  * @木农
953
1002
  */
954
1003
  export class DocumentLink {
955
-
956
1004
  /**
957
1005
  * The range this link applies to.
958
1006
  */
@@ -986,7 +1034,6 @@ declare module 'sumi-worker' {
986
1034
  * links in the editor.
987
1035
  */
988
1036
  export interface DocumentLinkProvider {
989
-
990
1037
  /**
991
1038
  * Provide links for the given document. Note that the editor ships with a default provider that detects
992
1039
  * `http(s)` and `file` links.
@@ -1015,7 +1062,6 @@ declare module 'sumi-worker' {
1015
1062
  * picking and modifying colors in the editor.
1016
1063
  */
1017
1064
  export interface DocumentColorProvider {
1018
-
1019
1065
  /**
1020
1066
  * Provide colors for the given document.
1021
1067
  *
@@ -1035,7 +1081,11 @@ declare module 'sumi-worker' {
1035
1081
  * @return An array of color presentations or a thenable that resolves to such. The lack of a result
1036
1082
  * can be signaled by returning `undefined`, `null`, or an empty array.
1037
1083
  */
1038
- provideColorPresentations(color: Color, context: { document: TextDocument, range: Range }, token: CancellationToken): ProviderResult<ColorPresentation[]>;
1084
+ provideColorPresentations(
1085
+ color: Color,
1086
+ context: { document: TextDocument; range: Range },
1087
+ token: CancellationToken,
1088
+ ): ProviderResult<ColorPresentation[]>;
1039
1089
  }
1040
1090
 
1041
1091
  /**
@@ -1043,7 +1093,6 @@ declare module 'sumi-worker' {
1043
1093
  * Invalid ranges will be ignored.
1044
1094
  */
1045
1095
  export class FoldingRange {
1046
-
1047
1096
  /**
1048
1097
  * The zero-based start line of the range to fold. The folded area starts after the line's last character.
1049
1098
  * To be valid, the end must be zero or larger and smaller than the number of lines in the document.
@@ -1099,9 +1148,7 @@ declare module 'sumi-worker' {
1099
1148
  /**
1100
1149
  * Folding context (for future use)
1101
1150
  */
1102
- // tslint:disable-next-line:no-empty-interface
1103
- export interface FoldingContext {
1104
- }
1151
+ export interface FoldingContext {}
1105
1152
 
1106
1153
  /**
1107
1154
  * The folding range provider interface defines the contract between extensions and
@@ -1115,7 +1162,11 @@ declare module 'sumi-worker' {
1115
1162
  * @param context Additional context information (for future use)
1116
1163
  * @param token A cancellation token.
1117
1164
  */
1118
- provideFoldingRanges(document: TextDocument, context: FoldingContext, token: CancellationToken): ProviderResult<FoldingRange[]>;
1165
+ provideFoldingRanges(
1166
+ document: TextDocument,
1167
+ context: FoldingContext,
1168
+ token: CancellationToken,
1169
+ ): ProviderResult<FoldingRange[]>;
1119
1170
  }
1120
1171
  /**
1121
1172
  * Describes what to do with the indentation when pressing Enter.
@@ -1211,7 +1262,6 @@ declare module 'sumi-worker' {
1211
1262
  * inside a text file.
1212
1263
  */
1213
1264
  export class Location {
1214
-
1215
1265
  /**
1216
1266
  * The resource identifier of this location.
1217
1267
  */
@@ -1267,7 +1317,6 @@ declare module 'sumi-worker' {
1267
1317
  * the `$(<name>)`-syntax is supported.
1268
1318
  */
1269
1319
  export class MarkdownString {
1270
-
1271
1320
  /**
1272
1321
  * The markdown string.
1273
1322
  */
@@ -1321,15 +1370,14 @@ declare module 'sumi-worker' {
1321
1370
  */
1322
1371
  export type MarkedString = MarkdownString | string | { language: string; value: string };
1323
1372
  /**
1324
- * Represents a line and character position, such as
1325
- * the position of the cursor.
1326
- *
1327
- * Position objects are __immutable__. Use the [with](#Position.with) or
1328
- * [translate](#Position.translate) methods to derive new positions
1329
- * from an existing position.
1330
- */
1373
+ * Represents a line and character position, such as
1374
+ * the position of the cursor.
1375
+ *
1376
+ * Position objects are __immutable__. Use the [with](#Position.with) or
1377
+ * [translate](#Position.translate) methods to derive new positions
1378
+ * from an existing position.
1379
+ */
1331
1380
  export class Position {
1332
-
1333
1381
  /**
1334
1382
  * The zero-based line value.
1335
1383
  */
@@ -1418,7 +1466,7 @@ declare module 'sumi-worker' {
1418
1466
  * @return A position that reflects the given delta. Will return `this` position if the change
1419
1467
  * is not changing anything.
1420
1468
  */
1421
- translate(change: { lineDelta?: number; characterDelta?: number; }): Position;
1469
+ translate(change: { lineDelta?: number; characterDelta?: number }): Position;
1422
1470
 
1423
1471
  /**
1424
1472
  * Create a new position derived from this position.
@@ -1436,7 +1484,7 @@ declare module 'sumi-worker' {
1436
1484
  * @return A position that reflects the given change. Will return `this` position if the change
1437
1485
  * is not changing anything.
1438
1486
  */
1439
- with(change: { line?: number; character?: number; }): Position;
1487
+ with(change: { line?: number; character?: number }): Position;
1440
1488
  }
1441
1489
 
1442
1490
  /**
@@ -1448,7 +1496,6 @@ declare module 'sumi-worker' {
1448
1496
  * to derive new ranges from an existing range.
1449
1497
  */
1450
1498
  export class Range {
1451
-
1452
1499
  /**
1453
1500
  * The start position. It is before or equal to [end](#Range.end).
1454
1501
  */
@@ -1542,7 +1589,7 @@ declare module 'sumi-worker' {
1542
1589
  * @return A range that reflects the given change. Will return `this` range if the change
1543
1590
  * is not changing anything.
1544
1591
  */
1545
- with(change: { start?: Position, end?: Position }): Range;
1592
+ with(change: { start?: Position; end?: Position }): Range;
1546
1593
  }
1547
1594
  /**
1548
1595
  * A relative pattern is a helper to construct glob patterns that are matched
@@ -1550,7 +1597,6 @@ declare module 'sumi-worker' {
1550
1597
  * or a [workspace folder](#WorkspaceFolder).
1551
1598
  */
1552
1599
  export class RelativePattern {
1553
-
1554
1600
  /**
1555
1601
  * A base file path to which this pattern will be matched against relatively.
1556
1602
  */
@@ -1573,7 +1619,7 @@ declare module 'sumi-worker' {
1573
1619
  * @param pattern A file glob pattern like `*.{ts,js}` that will be matched on file paths
1574
1620
  * relative to the base path.
1575
1621
  */
1576
- constructor(base: WorkspaceFolder | string, pattern: string)
1622
+ constructor(base: WorkspaceFolder | string, pattern: string);
1577
1623
  }
1578
1624
 
1579
1625
  /**
@@ -1604,7 +1650,6 @@ declare module 'sumi-worker' {
1604
1650
  * @sample A language filter that applies to all package.json paths: `{ language: 'json', scheme: 'untitled', pattern: '**​/package.json' }`
1605
1651
  */
1606
1652
  export interface DocumentFilter {
1607
-
1608
1653
  /**
1609
1654
  * A language id, like `typescript`.
1610
1655
  */
@@ -1688,7 +1733,6 @@ declare module 'sumi-worker' {
1688
1733
  * and peek definition features.
1689
1734
  */
1690
1735
  export interface DefinitionProvider {
1691
-
1692
1736
  /**
1693
1737
  * Provide the definition of the symbol at the given position and document.
1694
1738
  *
@@ -1698,7 +1742,11 @@ declare module 'sumi-worker' {
1698
1742
  * @return A definition or a thenable that resolves to such. The lack of a result can be
1699
1743
  * signaled by returning `undefined` or `null`.
1700
1744
  */
1701
- provideDefinition(document: TextDocument, position: Position, token: CancellationToken): ProviderResult<Definition | DefinitionLink[]>;
1745
+ provideDefinition(
1746
+ document: TextDocument,
1747
+ position: Position,
1748
+ token: CancellationToken,
1749
+ ): ProviderResult<Definition | DefinitionLink[]>;
1702
1750
  }
1703
1751
 
1704
1752
  /**
@@ -1706,7 +1754,6 @@ declare module 'sumi-worker' {
1706
1754
  * the go to implementation feature.
1707
1755
  */
1708
1756
  export interface ImplementationProvider {
1709
-
1710
1757
  /**
1711
1758
  * Provide the implementations of the symbol at the given position and document.
1712
1759
  *
@@ -1716,7 +1763,11 @@ declare module 'sumi-worker' {
1716
1763
  * @return A definition or a thenable that resolves to such. The lack of a result can be
1717
1764
  * signaled by returning `undefined` or `null`.
1718
1765
  */
1719
- provideImplementation(document: TextDocument, position: Position, token: CancellationToken): ProviderResult<Definition | DefinitionLink[]>;
1766
+ provideImplementation(
1767
+ document: TextDocument,
1768
+ position: Position,
1769
+ token: CancellationToken,
1770
+ ): ProviderResult<Definition | DefinitionLink[]>;
1720
1771
  }
1721
1772
 
1722
1773
  /**
@@ -1724,7 +1775,6 @@ declare module 'sumi-worker' {
1724
1775
  * the go to type definition feature.
1725
1776
  */
1726
1777
  export interface TypeDefinitionProvider {
1727
-
1728
1778
  /**
1729
1779
  * Provide the type definition of the symbol at the given position and document.
1730
1780
  *
@@ -1734,20 +1784,23 @@ declare module 'sumi-worker' {
1734
1784
  * @return A definition or a thenable that resolves to such. The lack of a result can be
1735
1785
  * signaled by returning `undefined` or `null`.
1736
1786
  */
1737
- provideTypeDefinition(document: TextDocument, position: Position, token: CancellationToken): ProviderResult<Definition | DefinitionLink[]>;
1787
+ provideTypeDefinition(
1788
+ document: TextDocument,
1789
+ position: Position,
1790
+ token: CancellationToken,
1791
+ ): ProviderResult<Definition | DefinitionLink[]>;
1738
1792
  }
1739
1793
  /**
1740
- * A snippet string is a template which allows to insert text
1741
- * and to control the editor cursor when insertion happens.
1742
- *
1743
- * A snippet can define tab stops and placeholders with `$1`, `$2`
1744
- * and `${3:foo}`. `$0` defines the final tab stop, it defaults to
1745
- * the end of the snippet. Variables are defined with `$name` and
1746
- * `${name:default value}`. The full snippet syntax is documented
1747
- * [here](http://code.visualstudio.com/docs/editor/userdefinedsnippets#_creating-your-own-snippets).
1748
- */
1794
+ * A snippet string is a template which allows to insert text
1795
+ * and to control the editor cursor when insertion happens.
1796
+ *
1797
+ * A snippet can define tab stops and placeholders with `$1`, `$2`
1798
+ * and `${3:foo}`. `$0` defines the final tab stop, it defaults to
1799
+ * the end of the snippet. Variables are defined with `$name` and
1800
+ * `${name:default value}`. The full snippet syntax is documented
1801
+ * [here](http://code.visualstudio.com/docs/editor/userdefinedsnippets#_creating-your-own-snippets).
1802
+ */
1749
1803
  export class SnippetString {
1750
-
1751
1804
  /**
1752
1805
  * The snippet string.
1753
1806
  */
@@ -1813,7 +1866,6 @@ declare module 'sumi-worker' {
1813
1866
  * the [rename](https://code.visualstudio.com/docs/editor/editingevolved#_rename-symbol)-feature.
1814
1867
  */
1815
1868
  export interface RenameProvider {
1816
-
1817
1869
  /**
1818
1870
  * Provide an edit that describes changes that have to be made to one
1819
1871
  * or many resources to rename a symbol to a different name.
@@ -1825,7 +1877,12 @@ declare module 'sumi-worker' {
1825
1877
  * @return A workspace edit or a thenable that resolves to such. The lack of a result can be
1826
1878
  * signaled by returning `undefined` or `null`.
1827
1879
  */
1828
- provideRenameEdits(document: TextDocument, position: Position, newName: string, token: CancellationToken): ProviderResult<WorkspaceEdit>;
1880
+ provideRenameEdits(
1881
+ document: TextDocument,
1882
+ position: Position,
1883
+ newName: string,
1884
+ token: CancellationToken,
1885
+ ): ProviderResult<WorkspaceEdit>;
1829
1886
 
1830
1887
  /**
1831
1888
  * Optional function for resolving and validating a position *before* running rename. The result can
@@ -1837,14 +1894,17 @@ declare module 'sumi-worker' {
1837
1894
  * @param token A cancellation token.
1838
1895
  * @return The range or range and placeholder text of the identifier that is to be renamed. The lack of a result can signaled by returning `undefined` or `null`.
1839
1896
  */
1840
- prepareRename?(document: TextDocument, position: Position, token: CancellationToken): ProviderResult<Range | { range: Range, placeholder: string }>;
1897
+ prepareRename?(
1898
+ document: TextDocument,
1899
+ position: Position,
1900
+ token: CancellationToken,
1901
+ ): ProviderResult<Range | { range: Range; placeholder: string }>;
1841
1902
  }
1842
1903
 
1843
1904
  /**
1844
1905
  * Value-object describing what options formatting should use.
1845
1906
  */
1846
1907
  export interface FormattingOptions {
1847
-
1848
1908
  /**
1849
1909
  * Size of a tab in spaces.
1850
1910
  */
@@ -1866,7 +1926,6 @@ declare module 'sumi-worker' {
1866
1926
  * the formatting-feature.
1867
1927
  */
1868
1928
  export interface DocumentFormattingEditProvider {
1869
-
1870
1929
  /**
1871
1930
  * Provide formatting edits for a whole document.
1872
1931
  *
@@ -1876,7 +1935,11 @@ declare module 'sumi-worker' {
1876
1935
  * @return A set of text edits or a thenable that resolves to such. The lack of a result can be
1877
1936
  * signaled by returning `undefined`, `null`, or an empty array.
1878
1937
  */
1879
- provideDocumentFormattingEdits(document: TextDocument, options: FormattingOptions, token: CancellationToken): ProviderResult<TextEdit[]>;
1938
+ provideDocumentFormattingEdits(
1939
+ document: TextDocument,
1940
+ options: FormattingOptions,
1941
+ token: CancellationToken,
1942
+ ): ProviderResult<TextEdit[]>;
1880
1943
  }
1881
1944
 
1882
1945
  /**
@@ -1884,7 +1947,6 @@ declare module 'sumi-worker' {
1884
1947
  * the formatting-feature.
1885
1948
  */
1886
1949
  export interface DocumentRangeFormattingEditProvider {
1887
-
1888
1950
  /**
1889
1951
  * Provide formatting edits for a range in a document.
1890
1952
  *
@@ -1899,7 +1961,12 @@ declare module 'sumi-worker' {
1899
1961
  * @return A set of text edits or a thenable that resolves to such. The lack of a result can be
1900
1962
  * signaled by returning `undefined`, `null`, or an empty array.
1901
1963
  */
1902
- provideDocumentRangeFormattingEdits(document: TextDocument, range: Range, options: FormattingOptions, token: CancellationToken): ProviderResult<TextEdit[]>;
1964
+ provideDocumentRangeFormattingEdits(
1965
+ document: TextDocument,
1966
+ range: Range,
1967
+ options: FormattingOptions,
1968
+ token: CancellationToken,
1969
+ ): ProviderResult<TextEdit[]>;
1903
1970
  }
1904
1971
 
1905
1972
  /**
@@ -1907,7 +1974,6 @@ declare module 'sumi-worker' {
1907
1974
  * the formatting-feature.
1908
1975
  */
1909
1976
  export interface OnTypeFormattingEditProvider {
1910
-
1911
1977
  /**
1912
1978
  * Provide formatting edits after a character has been typed.
1913
1979
  *
@@ -1923,10 +1989,15 @@ declare module 'sumi-worker' {
1923
1989
  * @return A set of text edits or a thenable that resolves to such. The lack of a result can be
1924
1990
  * signaled by returning `undefined`, `null`, or an empty array.
1925
1991
  */
1926
- provideOnTypeFormattingEdits(document: TextDocument, position: Position, ch: string, options: FormattingOptions, token: CancellationToken): ProviderResult<TextEdit[]>;
1992
+ provideOnTypeFormattingEdits(
1993
+ document: TextDocument,
1994
+ position: Position,
1995
+ ch: string,
1996
+ options: FormattingOptions,
1997
+ token: CancellationToken,
1998
+ ): ProviderResult<TextEdit[]>;
1927
1999
  }
1928
2000
  export interface CompletionItemProvider {
1929
-
1930
2001
  /**
1931
2002
  * Provide completion items for the given position and document.
1932
2003
  *
@@ -1938,7 +2009,12 @@ declare module 'sumi-worker' {
1938
2009
  * @return An array of completions, a [completion list](#CompletionList), or a thenable that resolves to either.
1939
2010
  * The lack of a result can be signaled by returning `undefined`, `null`, or an empty array.
1940
2011
  */
1941
- provideCompletionItems(document: TextDocument, position: Position, token: CancellationToken, context: CompletionContext): ProviderResult<CompletionItem[] | CompletionList>;
2012
+ provideCompletionItems(
2013
+ document: TextDocument,
2014
+ position: Position,
2015
+ token: CancellationToken,
2016
+ context: CompletionContext,
2017
+ ): ProviderResult<CompletionItem[] | CompletionList>;
1942
2018
 
1943
2019
  /**
1944
2020
  * Given a completion item fill in more data, like [doc-comment](#CompletionItem.documentation)
@@ -1965,7 +2041,6 @@ declare module 'sumi-worker' {
1965
2041
  * @寻壑
1966
2042
  */
1967
2043
  export class DocumentSymbol {
1968
-
1969
2044
  /**
1970
2045
  * The name of this symbol.
1971
2046
  */
@@ -2014,7 +2089,6 @@ declare module 'sumi-worker' {
2014
2089
  * the [go to symbol](https://code.visualstudio.com/docs/editor/editingevolved#_go-to-symbol)-feature.
2015
2090
  */
2016
2091
  export interface DocumentSymbolProvider {
2017
-
2018
2092
  /**
2019
2093
  * Provide symbol information for the given document.
2020
2094
  *
@@ -2023,7 +2097,10 @@ declare module 'sumi-worker' {
2023
2097
  * @return An array of document highlights or a thenable that resolves to such. The lack of a result can be
2024
2098
  * signaled by returning `undefined`, `null`, or an empty array.
2025
2099
  */
2026
- provideDocumentSymbols(document: TextDocument, token: CancellationToken): ProviderResult<SymbolInformation[] | DocumentSymbol[]>;
2100
+ provideDocumentSymbols(
2101
+ document: TextDocument,
2102
+ token: CancellationToken,
2103
+ ): ProviderResult<SymbolInformation[] | DocumentSymbol[]>;
2027
2104
  }
2028
2105
 
2029
2106
  /**
@@ -2071,7 +2148,6 @@ declare module 'sumi-worker' {
2071
2148
  * The event that is fired when diagnostics change.
2072
2149
  */
2073
2150
  export interface DiagnosticChangeEvent {
2074
-
2075
2151
  /**
2076
2152
  * An array of resources for which diagnostics have changed.
2077
2153
  */
@@ -2087,7 +2163,6 @@ declare module 'sumi-worker' {
2087
2163
  * [createDiagnosticCollection](#languages.createDiagnosticCollection).
2088
2164
  */
2089
2165
  export interface DiagnosticCollection {
2090
-
2091
2166
  /**
2092
2167
  * The name of this diagnostic collection, for instance `typescript`. Every diagnostic
2093
2168
  * from this collection will be associated with this name. Also, the task framework uses this
@@ -2136,7 +2211,10 @@ declare module 'sumi-worker' {
2136
2211
  * @param callback Function to execute for each entry.
2137
2212
  * @param thisArg The `this` context used when invoking the handler function.
2138
2213
  */
2139
- forEach(callback: (uri: Uri, diagnostics: ReadonlyArray<Diagnostic>, collection: DiagnosticCollection) => any, thisArg?: any): void;
2214
+ forEach(
2215
+ callback: (uri: Uri, diagnostics: ReadonlyArray<Diagnostic>, collection: DiagnosticCollection) => any,
2216
+ thisArg?: any,
2217
+ ): void;
2140
2218
 
2141
2219
  /**
2142
2220
  * Get the diagnostics for a given resource. *Note* that you cannot
@@ -2174,7 +2252,6 @@ declare module 'sumi-worker' {
2174
2252
  * the go to declaration feature.
2175
2253
  */
2176
2254
  export interface DeclarationProvider {
2177
-
2178
2255
  /**
2179
2256
  * Provide the declaration of the symbol at the given position and document.
2180
2257
  *
@@ -2184,7 +2261,11 @@ declare module 'sumi-worker' {
2184
2261
  * @return A declaration or a thenable that resolves to such. The lack of a result can be
2185
2262
  * signaled by returning `undefined` or `null`.
2186
2263
  */
2187
- provideDeclaration(document: TextDocument, position: Position, token: CancellationToken): ProviderResult<Declaration>;
2264
+ provideDeclaration(
2265
+ document: TextDocument,
2266
+ position: Position,
2267
+ token: CancellationToken,
2268
+ ): ProviderResult<Declaration>;
2188
2269
  }
2189
2270
 
2190
2271
  /**
@@ -2192,7 +2273,6 @@ declare module 'sumi-worker' {
2192
2273
  * requesting references.
2193
2274
  */
2194
2275
  export interface ReferenceContext {
2195
-
2196
2276
  /**
2197
2277
  * Include the declaration of the current symbol.
2198
2278
  */
@@ -2204,7 +2284,6 @@ declare module 'sumi-worker' {
2204
2284
  * the [find references](https://code.visualstudio.com/docs/editor/editingevolved#_peek)-feature.
2205
2285
  */
2206
2286
  export interface ReferenceProvider {
2207
-
2208
2287
  /**
2209
2288
  * Provide a set of project-wide references for the given position and document.
2210
2289
  *
@@ -2215,6 +2294,11 @@ declare module 'sumi-worker' {
2215
2294
  * @return An array of locations or a thenable that resolves to such. The lack of a result can be
2216
2295
  * signaled by returning `undefined`, `null`, or an empty array.
2217
2296
  */
2218
- provideReferences(document: TextDocument, position: Position, context: ReferenceContext, token: CancellationToken): ProviderResult<Location[]>;
2297
+ provideReferences(
2298
+ document: TextDocument,
2299
+ position: Position,
2300
+ context: ReferenceContext,
2301
+ token: CancellationToken,
2302
+ ): ProviderResult<Location[]>;
2219
2303
  }
2220
2304
  }