vscode-languageserver-protocol 3.17.5 → 3.17.6-next.10

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,6 +1,6 @@
1
- import { ProgressToken, RequestHandler, TraceValues } from 'vscode-jsonrpc';
1
+ import { ProgressToken, RequestHandler, TraceValue } from 'vscode-jsonrpc';
2
2
  import { MessageDirection, ProtocolRequestType, ProtocolRequestType0, ProtocolNotificationType, ProtocolNotificationType0 } from './messages';
3
- import { Position, Range, Location, LocationLink, Diagnostic, Command, TextEdit, WorkspaceEdit, DocumentUri, TextDocumentIdentifier, VersionedTextDocumentIdentifier, TextDocumentItem, CompletionItem, CompletionList, Hover, SignatureHelp, Definition, ReferenceContext, DocumentHighlight, SymbolInformation, CodeLens, CodeActionContext, FormattingOptions, DocumentLink, MarkupKind, SymbolKind, CompletionItemKind, CodeAction, CodeActionKind, DocumentSymbol, CompletionItemTag, DiagnosticTag, SymbolTag, uinteger, integer, InsertTextMode, LSPAny, WorkspaceSymbol, URI, WorkspaceFolder } from 'vscode-languageserver-types';
3
+ import { Position, Range, Location, LocationLink, Diagnostic, Command, TextEdit, WorkspaceEdit, WorkspaceEditMetadata, DocumentUri, TextDocumentIdentifier, VersionedTextDocumentIdentifier, TextDocumentItem, CompletionItem, CompletionList, Hover, SignatureHelp, Definition, ReferenceContext, DocumentHighlight, SymbolInformation, CodeLens, CodeActionContext, FormattingOptions, DocumentLink, MarkupKind, SymbolKind, CompletionItemKind, CodeAction, CodeActionKind, DocumentSymbol, CompletionItemTag, DiagnosticTag, SymbolTag, uinteger, integer, InsertTextMode, LSPAny, WorkspaceSymbol, URI, WorkspaceFolder } from 'vscode-languageserver-types';
4
4
  import { ImplementationRequest, ImplementationClientCapabilities, ImplementationOptions, ImplementationRegistrationOptions, ImplementationParams } from './protocol.implementation';
5
5
  import { TypeDefinitionRequest, TypeDefinitionClientCapabilities, TypeDefinitionOptions, TypeDefinitionRegistrationOptions, TypeDefinitionParams } from './protocol.typeDefinition';
6
6
  import { WorkspaceFoldersRequest, DidChangeWorkspaceFoldersNotification, DidChangeWorkspaceFoldersParams, WorkspaceFoldersChangeEvent, WorkspaceFoldersInitializeParams, WorkspaceFoldersServerCapabilities } from './protocol.workspaceFolder';
@@ -20,8 +20,72 @@ import { TypeHierarchyClientCapabilities, TypeHierarchyOptions, TypeHierarchyReg
20
20
  import { InlineValueClientCapabilities, InlineValueOptions, InlineValueRegistrationOptions, InlineValueWorkspaceClientCapabilities, InlineValueParams, InlineValueRequest, InlineValueRefreshRequest } from './protocol.inlineValue';
21
21
  import { InlayHintClientCapabilities, InlayHintOptions, InlayHintRegistrationOptions, InlayHintWorkspaceClientCapabilities, InlayHintParams, InlayHintRequest, InlayHintResolveRequest, InlayHintRefreshRequest } from './protocol.inlayHint';
22
22
  import { DiagnosticClientCapabilities, DiagnosticOptions, DiagnosticRegistrationOptions, DiagnosticServerCancellationData, DocumentDiagnosticParams, DocumentDiagnosticReportKind, FullDocumentDiagnosticReport, RelatedFullDocumentDiagnosticReport, UnchangedDocumentDiagnosticReport, RelatedUnchangedDocumentDiagnosticReport, DocumentDiagnosticReport, DocumentDiagnosticReportPartialResult, DocumentDiagnosticRequest, PreviousResultId, WorkspaceDiagnosticParams, WorkspaceFullDocumentDiagnosticReport, WorkspaceUnchangedDocumentDiagnosticReport, WorkspaceDocumentDiagnosticReport, WorkspaceDiagnosticReport, WorkspaceDiagnosticReportPartialResult, WorkspaceDiagnosticRequest, DiagnosticRefreshRequest, DiagnosticWorkspaceClientCapabilities } from './protocol.diagnostic';
23
- import { NotebookDocumentSyncClientCapabilities, NotebookCellKind, ExecutionSummary, NotebookCell, NotebookDocument, NotebookDocumentIdentifier, VersionedNotebookDocumentIdentifier, NotebookDocumentSyncOptions, NotebookDocumentSyncRegistrationOptions, NotebookDocumentSyncRegistrationType, DidOpenNotebookDocumentParams, DidOpenNotebookDocumentNotification, NotebookCellArrayChange, NotebookDocumentChangeEvent, DidChangeNotebookDocumentParams, DidChangeNotebookDocumentNotification, DidSaveNotebookDocumentParams, DidSaveNotebookDocumentNotification, DidCloseNotebookDocumentParams, DidCloseNotebookDocumentNotification } from './protocol.notebook';
23
+ import { NotebookDocumentSyncClientCapabilities, NotebookCellKind, ExecutionSummary, NotebookCell, NotebookDocument, NotebookDocumentIdentifier, VersionedNotebookDocumentIdentifier, NotebookDocumentSyncOptions, NotebookDocumentSyncRegistrationOptions, NotebookDocumentSyncRegistrationType, DidOpenNotebookDocumentParams, DidOpenNotebookDocumentNotification, NotebookCellArrayChange, NotebookDocumentChangeEvent, DidChangeNotebookDocumentParams, DidChangeNotebookDocumentNotification, DidSaveNotebookDocumentParams, DidSaveNotebookDocumentNotification, DidCloseNotebookDocumentParams, DidCloseNotebookDocumentNotification, NotebookDocumentFilterWithCells, NotebookDocumentFilterWithNotebook } from './protocol.notebook';
24
24
  import { InlineCompletionClientCapabilities, InlineCompletionOptions, InlineCompletionParams, InlineCompletionRegistrationOptions, InlineCompletionRequest } from './protocol.inlineCompletion';
25
+ import { TextDocumentContentClientCapabilities, TextDocumentContentOptions, TextDocumentContentRegistrationOptions, TextDocumentContentParams, TextDocumentContentResult, TextDocumentContentRequest, TextDocumentContentRefreshParams, TextDocumentContentRefreshRequest } from './protocol.textDocumentContent';
26
+ /**
27
+ * A document filter where `language` is required field.
28
+ *
29
+ * @since 3.18.0
30
+ */
31
+ export type TextDocumentFilterLanguage = {
32
+ /**
33
+ * A language id, like `typescript`.
34
+ */
35
+ language: string;
36
+ /**
37
+ * A Uri {@link Uri.scheme scheme}, like `file` or `untitled`.
38
+ */
39
+ scheme?: string;
40
+ /**
41
+ * A glob pattern, like **​/*.{ts,js}. See TextDocumentFilter for examples.
42
+ *
43
+ * @since 3.18.0 - support for relative patterns.
44
+ */
45
+ pattern?: GlobPattern;
46
+ };
47
+ /**
48
+ * A document filter where `scheme` is required field.
49
+ *
50
+ * @since 3.18.0
51
+ */
52
+ export type TextDocumentFilterScheme = {
53
+ /**
54
+ * A language id, like `typescript`.
55
+ */
56
+ language?: string;
57
+ /**
58
+ * A Uri {@link Uri.scheme scheme}, like `file` or `untitled`.
59
+ */
60
+ scheme: string;
61
+ /**
62
+ * A glob pattern, like **​/*.{ts,js}. See TextDocumentFilter for examples.
63
+ *
64
+ * @since 3.18.0 - support for relative patterns.
65
+ */
66
+ pattern?: GlobPattern;
67
+ };
68
+ /**
69
+ * A document filter where `pattern` is required field.
70
+ *
71
+ * @since 3.18.0
72
+ */
73
+ export type TextDocumentFilterPattern = {
74
+ /**
75
+ * A language id, like `typescript`.
76
+ */
77
+ language?: string;
78
+ /**
79
+ * A Uri {@link Uri.scheme scheme}, like `file` or `untitled`.
80
+ */
81
+ scheme?: string;
82
+ /**
83
+ * A glob pattern, like **​/*.{ts,js}. See TextDocumentFilter for examples.
84
+ *
85
+ * @since 3.18.0 - support for relative patterns.
86
+ */
87
+ pattern: GlobPattern;
88
+ };
25
89
  /**
26
90
  * A document filter denotes a document by different properties like
27
91
  * the {@link TextDocument.languageId language}, the {@link Uri.scheme scheme} of
@@ -40,28 +104,7 @@ import { InlineCompletionClientCapabilities, InlineCompletionOptions, InlineComp
40
104
  *
41
105
  * @since 3.17.0
42
106
  */
43
- export type TextDocumentFilter = {
44
- /** A language id, like `typescript`. */
45
- language: string;
46
- /** A Uri {@link Uri.scheme scheme}, like `file` or `untitled`. */
47
- scheme?: string;
48
- /** A glob pattern, like **​/*.{ts,js}. See TextDocumentFilter for examples. */
49
- pattern?: string;
50
- } | {
51
- /** A language id, like `typescript`. */
52
- language?: string;
53
- /** A Uri {@link Uri.scheme scheme}, like `file` or `untitled`. */
54
- scheme: string;
55
- /** A glob pattern, like **​/*.{ts,js}. See TextDocumentFilter for examples. */
56
- pattern?: string;
57
- } | {
58
- /** A language id, like `typescript`. */
59
- language?: string;
60
- /** A Uri {@link Uri.scheme scheme}, like `file` or `untitled`. */
61
- scheme?: string;
62
- /** A glob pattern, like **​/*.{ts,js}. See TextDocumentFilter for examples. */
63
- pattern: string;
64
- };
107
+ export type TextDocumentFilter = TextDocumentFilterLanguage | TextDocumentFilterScheme | TextDocumentFilterPattern;
65
108
  /**
66
109
  * The TextDocumentFilter namespace provides helper functions to work with
67
110
  * {@link TextDocumentFilter} literals.
@@ -72,34 +115,70 @@ export declare namespace TextDocumentFilter {
72
115
  function is(value: any): value is TextDocumentFilter;
73
116
  }
74
117
  /**
75
- * A notebook document filter denotes a notebook document by
76
- * different properties. The properties will be match
77
- * against the notebook's URI (same as with documents)
118
+ * A notebook document filter where `notebookType` is required field.
78
119
  *
79
- * @since 3.17.0
120
+ * @since 3.18.0
80
121
  */
81
- export type NotebookDocumentFilter = {
82
- /** The type of the enclosing notebook. */
122
+ export type NotebookDocumentFilterNotebookType = {
123
+ /**
124
+ * The type of the enclosing notebook.
125
+ */
83
126
  notebookType: string;
84
- /** A Uri {@link Uri.scheme scheme}, like `file` or `untitled`. */
127
+ /**
128
+ * A Uri {@link Uri.scheme scheme}, like `file` or `untitled`.
129
+ */
85
130
  scheme?: string;
86
- /** A glob pattern. */
87
- pattern?: string;
88
- } | {
89
- /** The type of the enclosing notebook. */
131
+ /**
132
+ * A glob pattern.
133
+ */
134
+ pattern?: GlobPattern;
135
+ };
136
+ /**
137
+ * A notebook document filter where `scheme` is required field.
138
+ *
139
+ * @since 3.18.0
140
+ */
141
+ export type NotebookDocumentFilterScheme = {
142
+ /**
143
+ * The type of the enclosing notebook.
144
+ */
90
145
  notebookType?: string;
91
- /** A Uri {@link Uri.scheme scheme}, like `file` or `untitled`.*/
146
+ /**
147
+ * A Uri {@link Uri.scheme scheme}, like `file` or `untitled`.
148
+ */
92
149
  scheme: string;
93
- /** A glob pattern. */
94
- pattern?: string;
95
- } | {
96
- /** The type of the enclosing notebook. */
150
+ /**
151
+ * A glob pattern.
152
+ */
153
+ pattern?: GlobPattern;
154
+ };
155
+ /**
156
+ * A notebook document filter where `pattern` is required field.
157
+ *
158
+ * @since 3.18.0
159
+ */
160
+ export type NotebookDocumentFilterPattern = {
161
+ /**
162
+ * The type of the enclosing notebook.
163
+ */
97
164
  notebookType?: string;
98
- /** A Uri {@link Uri.scheme scheme}, like `file` or `untitled`. */
165
+ /**
166
+ * A Uri {@link Uri.scheme scheme}, like `file` or `untitled`.
167
+ */
99
168
  scheme?: string;
100
- /** A glob pattern. */
101
- pattern: string;
169
+ /**
170
+ * A glob pattern.
171
+ */
172
+ pattern: GlobPattern;
102
173
  };
174
+ /**
175
+ * A notebook document filter denotes a notebook document by
176
+ * different properties. The properties will be match
177
+ * against the notebook's URI (same as with documents)
178
+ *
179
+ * @since 3.17.0
180
+ */
181
+ export type NotebookDocumentFilter = NotebookDocumentFilterNotebookType | NotebookDocumentFilterScheme | NotebookDocumentFilterPattern;
103
182
  /**
104
183
  * The NotebookDocumentFilter namespace provides helper functions to work with
105
184
  * {@link NotebookDocumentFilter} literals.
@@ -379,6 +458,13 @@ export interface WorkspaceClientCapabilities {
379
458
  * @proposed
380
459
  */
381
460
  foldingRange?: FoldingRangeWorkspaceClientCapabilities;
461
+ /**
462
+ * Capabilities specific to the `workspace/textDocumentContent` request.
463
+ *
464
+ * @since 3.18.0
465
+ * @proposed
466
+ */
467
+ textDocumentContent?: TextDocumentContentClientCapabilities;
382
468
  }
383
469
  /**
384
470
  * Text document specific client capabilities.
@@ -567,6 +653,16 @@ export interface WindowClientCapabilities {
567
653
  */
568
654
  showDocument?: ShowDocumentClientCapabilities;
569
655
  }
656
+ /**
657
+ * Regular Expression Engines
658
+ *
659
+ * @since 3.18.0
660
+ * @proposed
661
+ */
662
+ export declare namespace RegularExpressionEngineKind {
663
+ const ES2020: "ES2020";
664
+ }
665
+ export type RegularExpressionEngineKind = string;
570
666
  /**
571
667
  * Client capabilities specific to regular expressions.
572
668
  *
@@ -576,7 +672,7 @@ export interface RegularExpressionsClientCapabilities {
576
672
  /**
577
673
  * The engine's name.
578
674
  */
579
- engine: string;
675
+ engine: RegularExpressionEngineKind;
580
676
  /**
581
677
  * The engine's version.
582
678
  */
@@ -637,6 +733,21 @@ export declare namespace PositionEncodingKind {
637
733
  * @since 3.17.0
638
734
  */
639
735
  export type PositionEncodingKind = string;
736
+ /**
737
+ * @since 3.18.0
738
+ */
739
+ export type StaleRequestSupportOptions = {
740
+ /**
741
+ * The client will actively cancel the request.
742
+ */
743
+ cancel: boolean;
744
+ /**
745
+ * The list of requests for which the client
746
+ * will retry the request if it receives a
747
+ * response with error code `ContentModified`
748
+ */
749
+ retryOnContentModified: string[];
750
+ };
640
751
  /**
641
752
  * General client capabilities.
642
753
  *
@@ -651,18 +762,7 @@ export interface GeneralClientCapabilities {
651
762
  *
652
763
  * @since 3.17.0
653
764
  */
654
- staleRequestSupport?: {
655
- /**
656
- * The client will actively cancel the request.
657
- */
658
- cancel: boolean;
659
- /**
660
- * The list of requests for which the client
661
- * will retry the request if it receives a
662
- * response with error code `ContentModified`
663
- */
664
- retryOnContentModified: string[];
665
- };
765
+ staleRequestSupport?: StaleRequestSupportOptions;
666
766
  /**
667
767
  * Client capabilities specific to regular expressions.
668
768
  *
@@ -802,6 +902,32 @@ export declare namespace WorkDoneProgressOptions {
802
902
  workDoneProgress: boolean;
803
903
  };
804
904
  }
905
+ /**
906
+ * Defines workspace specific capabilities of the server.
907
+ *
908
+ * @since 3.18.0
909
+ */
910
+ export type WorkspaceOptions = {
911
+ /**
912
+ * The server supports workspace folder.
913
+ *
914
+ * @since 3.6.0
915
+ */
916
+ workspaceFolders?: WorkspaceFoldersServerCapabilities;
917
+ /**
918
+ * The server is interested in notifications/requests for operations on files.
919
+ *
920
+ * @since 3.16.0
921
+ */
922
+ fileOperations?: FileOperationOptions;
923
+ /**
924
+ * The server supports the `workspace/textDocumentContent` request.
925
+ *
926
+ * @since 3.18.0
927
+ * @proposed
928
+ */
929
+ textDocumentContent?: TextDocumentContentOptions | TextDocumentContentRegistrationOptions;
930
+ };
805
931
  /**
806
932
  * Defines the capabilities provided by a language
807
933
  * server.
@@ -981,25 +1107,44 @@ export interface ServerCapabilities<T = LSPAny> {
981
1107
  /**
982
1108
  * Workspace specific server capabilities.
983
1109
  */
984
- workspace?: {
985
- /**
986
- * The server supports workspace folder.
987
- *
988
- * @since 3.6.0
989
- */
990
- workspaceFolders?: WorkspaceFoldersServerCapabilities;
991
- /**
992
- * The server is interested in notifications/requests for operations on files.
993
- *
994
- * @since 3.16.0
995
- */
996
- fileOperations?: FileOperationOptions;
997
- };
1110
+ workspace?: WorkspaceOptions;
998
1111
  /**
999
1112
  * Experimental server capabilities.
1000
1113
  */
1001
1114
  experimental?: T;
1002
1115
  }
1116
+ /**
1117
+ * Information about the server
1118
+ *
1119
+ * @since 3.15.0
1120
+ * @since 3.18.0 ServerInfo type name added.
1121
+ */
1122
+ export type ServerInfo = {
1123
+ /**
1124
+ * The name of the server as defined by the server.
1125
+ */
1126
+ name: string;
1127
+ /**
1128
+ * The server's version as defined by the server.
1129
+ */
1130
+ version?: string;
1131
+ };
1132
+ /**
1133
+ * Information about the client
1134
+ *
1135
+ * @since 3.15.0
1136
+ * @since 3.18.0 ClientInfo type name added.
1137
+ */
1138
+ export type ClientInfo = {
1139
+ /**
1140
+ * The name of the client as defined by the client.
1141
+ */
1142
+ name: string;
1143
+ /**
1144
+ * The client's version as defined by the client.
1145
+ */
1146
+ version?: string;
1147
+ };
1003
1148
  /**
1004
1149
  * The initialize request is sent from the client to the server.
1005
1150
  * It is sent once as the request after starting up the server.
@@ -1029,16 +1174,7 @@ export interface _InitializeParams extends WorkDoneProgressParams {
1029
1174
  *
1030
1175
  * @since 3.15.0
1031
1176
  */
1032
- clientInfo?: {
1033
- /**
1034
- * The name of the client as defined by the client.
1035
- */
1036
- name: string;
1037
- /**
1038
- * The client's version as defined by the client.
1039
- */
1040
- version?: string;
1041
- };
1177
+ clientInfo?: ClientInfo;
1042
1178
  /**
1043
1179
  * The locale the client is currently showing the user interface
1044
1180
  * in. This must not necessarily be the locale of the operating
@@ -1076,7 +1212,7 @@ export interface _InitializeParams extends WorkDoneProgressParams {
1076
1212
  /**
1077
1213
  * The initial trace setting. If omitted trace is disabled ('off').
1078
1214
  */
1079
- trace?: TraceValues;
1215
+ trace?: TraceValue;
1080
1216
  }
1081
1217
  export type InitializeParams = _InitializeParams & WorkspaceFoldersInitializeParams;
1082
1218
  /**
@@ -1092,16 +1228,7 @@ export interface InitializeResult<T = any> {
1092
1228
  *
1093
1229
  * @since 3.15.0
1094
1230
  */
1095
- serverInfo?: {
1096
- /**
1097
- * The name of the server as defined by the server.
1098
- */
1099
- name: string;
1100
- /**
1101
- * The server's version as defined by the server.
1102
- */
1103
- version?: string;
1104
- };
1231
+ serverInfo?: ServerInfo;
1105
1232
  /**
1106
1233
  * Custom initialization results.
1107
1234
  */
@@ -1217,6 +1344,7 @@ export declare namespace MessageType {
1217
1344
  * A debug message.
1218
1345
  *
1219
1346
  * @since 3.18.0
1347
+ * @proposed
1220
1348
  */
1221
1349
  const Debug = 5;
1222
1350
  }
@@ -1243,6 +1371,17 @@ export declare namespace ShowMessageNotification {
1243
1371
  const messageDirection: MessageDirection;
1244
1372
  const type: ProtocolNotificationType<ShowMessageParams, void>;
1245
1373
  }
1374
+ /**
1375
+ * @since 3.18.0
1376
+ */
1377
+ export type ClientShowMessageActionItemOptions = {
1378
+ /**
1379
+ * Whether the client supports additional attributes which
1380
+ * are preserved and send back to the server in the
1381
+ * request's response.
1382
+ */
1383
+ additionalPropertiesSupport?: boolean;
1384
+ };
1246
1385
  /**
1247
1386
  * Show message request client capabilities
1248
1387
  */
@@ -1250,14 +1389,7 @@ export interface ShowMessageRequestClientCapabilities {
1250
1389
  /**
1251
1390
  * Capabilities specific to the `MessageActionItem` type.
1252
1391
  */
1253
- messageActionItem?: {
1254
- /**
1255
- * Whether the client supports additional attributes which
1256
- * are preserved and send back to the server in the
1257
- * request's response.
1258
- */
1259
- additionalPropertiesSupport?: boolean;
1260
- };
1392
+ messageActionItem?: ClientShowMessageActionItemOptions;
1261
1393
  }
1262
1394
  export interface MessageActionItem {
1263
1395
  /**
@@ -1419,10 +1551,18 @@ export declare namespace DidOpenTextDocumentNotification {
1419
1551
  const type: ProtocolNotificationType<DidOpenTextDocumentParams, TextDocumentRegistrationOptions>;
1420
1552
  }
1421
1553
  /**
1422
- * An event describing a change to a text document. If only a text is provided
1423
- * it is considered to be the full content of the document.
1554
+ * @since 3.18.0
1424
1555
  */
1425
- export type TextDocumentContentChangeEvent = {
1556
+ export type TextDocumentContentChangeWholeDocument = {
1557
+ /**
1558
+ * The new text of the whole document.
1559
+ */
1560
+ text: string;
1561
+ };
1562
+ /**
1563
+ * @since 3.18.0
1564
+ */
1565
+ export type TextDocumentContentChangePartial = {
1426
1566
  /**
1427
1567
  * The range of the document that changed.
1428
1568
  */
@@ -1437,12 +1577,12 @@ export type TextDocumentContentChangeEvent = {
1437
1577
  * The new text for the provided range.
1438
1578
  */
1439
1579
  text: string;
1440
- } | {
1441
- /**
1442
- * The new text of the whole document.
1443
- */
1444
- text: string;
1445
1580
  };
1581
+ /**
1582
+ * An event describing a change to a text document. If only a text is provided
1583
+ * it is considered to be the full content of the document.
1584
+ */
1585
+ export type TextDocumentContentChangeEvent = TextDocumentContentChangePartial | TextDocumentContentChangeWholeDocument;
1446
1586
  export declare namespace TextDocumentContentChangeEvent {
1447
1587
  /**
1448
1588
  * Checks whether the information describes a delta event.
@@ -1719,6 +1859,9 @@ export declare namespace RelativePattern {
1719
1859
  * @since 3.17.0
1720
1860
  */
1721
1861
  export type GlobPattern = Pattern | RelativePattern;
1862
+ export declare namespace GlobPattern {
1863
+ function is(value: any): value is GlobPattern;
1864
+ }
1722
1865
  export interface FileSystemWatcher {
1723
1866
  /**
1724
1867
  * The glob pattern to watch. See {@link GlobPattern glob pattern} for more detail.
@@ -1749,9 +1892,18 @@ export declare namespace WatchKind {
1749
1892
  }
1750
1893
  export type WatchKind = uinteger;
1751
1894
  /**
1752
- * The publish diagnostic client capabilities.
1895
+ * @since 3.18.0
1753
1896
  */
1754
- export interface PublishDiagnosticsClientCapabilities {
1897
+ export type ClientDiagnosticsTagOptions = {
1898
+ /**
1899
+ * The tags supported by the client.
1900
+ */
1901
+ valueSet: DiagnosticTag[];
1902
+ };
1903
+ /**
1904
+ * General diagnostics capabilities for pull and push model.
1905
+ */
1906
+ export interface DiagnosticsCapabilities {
1755
1907
  /**
1756
1908
  * Whether the clients accepts diagnostics with related information.
1757
1909
  */
@@ -1762,19 +1914,7 @@ export interface PublishDiagnosticsClientCapabilities {
1762
1914
  *
1763
1915
  * @since 3.15.0
1764
1916
  */
1765
- tagSupport?: {
1766
- /**
1767
- * The tags supported by the client.
1768
- */
1769
- valueSet: DiagnosticTag[];
1770
- };
1771
- /**
1772
- * Whether the client interprets the version property of the
1773
- * `textDocument/publishDiagnostics` notification's parameter.
1774
- *
1775
- * @since 3.15.0
1776
- */
1777
- versionSupport?: boolean;
1917
+ tagSupport?: ClientDiagnosticsTagOptions;
1778
1918
  /**
1779
1919
  * Client supports a codeDescription property
1780
1920
  *
@@ -1790,6 +1930,18 @@ export interface PublishDiagnosticsClientCapabilities {
1790
1930
  */
1791
1931
  dataSupport?: boolean;
1792
1932
  }
1933
+ /**
1934
+ * The publish diagnostic client capabilities.
1935
+ */
1936
+ export interface PublishDiagnosticsClientCapabilities extends DiagnosticsCapabilities {
1937
+ /**
1938
+ * Whether the client interprets the version property of the
1939
+ * `textDocument/publishDiagnostics` notification's parameter.
1940
+ *
1941
+ * @since 3.15.0
1942
+ */
1943
+ versionSupport?: boolean;
1944
+ }
1793
1945
  /**
1794
1946
  * The publish diagnostic notification's parameters.
1795
1947
  */
@@ -1818,6 +1970,135 @@ export declare namespace PublishDiagnosticsNotification {
1818
1970
  const messageDirection: MessageDirection;
1819
1971
  const type: ProtocolNotificationType<PublishDiagnosticsParams, void>;
1820
1972
  }
1973
+ /**
1974
+ * The client supports the following `CompletionList` specific
1975
+ * capabilities.
1976
+ *
1977
+ * @since 3.17.0
1978
+ */
1979
+ export interface CompletionListCapabilities {
1980
+ /**
1981
+ * The client supports the following itemDefaults on
1982
+ * a completion list.
1983
+ *
1984
+ * The value lists the supported property names of the
1985
+ * `CompletionList.itemDefaults` object. If omitted
1986
+ * no properties are supported.
1987
+ *
1988
+ * @since 3.17.0
1989
+ */
1990
+ itemDefaults?: string[];
1991
+ }
1992
+ /**
1993
+ * @since 3.18.0
1994
+ */
1995
+ export type CompletionItemTagOptions = {
1996
+ /**
1997
+ * The tags supported by the client.
1998
+ */
1999
+ valueSet: CompletionItemTag[];
2000
+ };
2001
+ /**
2002
+ * @since 3.18.0
2003
+ */
2004
+ export type ClientCompletionItemResolveOptions = {
2005
+ /**
2006
+ * The properties that a client can resolve lazily.
2007
+ */
2008
+ properties: string[];
2009
+ };
2010
+ /**
2011
+ * @since 3.18.0
2012
+ */
2013
+ export type ClientCompletionItemInsertTextModeOptions = {
2014
+ valueSet: InsertTextMode[];
2015
+ };
2016
+ /**
2017
+ * @since 3.18.0
2018
+ */
2019
+ export type ClientCompletionItemOptions = {
2020
+ /**
2021
+ * Client supports snippets as insert text.
2022
+ *
2023
+ * A snippet can define tab stops and placeholders with `$1`, `$2`
2024
+ * and `${3:foo}`. `$0` defines the final tab stop, it defaults to
2025
+ * the end of the snippet. Placeholders with equal identifiers are linked,
2026
+ * that is typing in one will update others too.
2027
+ */
2028
+ snippetSupport?: boolean;
2029
+ /**
2030
+ * Client supports commit characters on a completion item.
2031
+ */
2032
+ commitCharactersSupport?: boolean;
2033
+ /**
2034
+ * Client supports the following content formats for the documentation
2035
+ * property. The order describes the preferred format of the client.
2036
+ */
2037
+ documentationFormat?: MarkupKind[];
2038
+ /**
2039
+ * Client supports the deprecated property on a completion item.
2040
+ */
2041
+ deprecatedSupport?: boolean;
2042
+ /**
2043
+ * Client supports the preselect property on a completion item.
2044
+ */
2045
+ preselectSupport?: boolean;
2046
+ /**
2047
+ * Client supports the tag property on a completion item. Clients supporting
2048
+ * tags have to handle unknown tags gracefully. Clients especially need to
2049
+ * preserve unknown tags when sending a completion item back to the server in
2050
+ * a resolve call.
2051
+ *
2052
+ * @since 3.15.0
2053
+ */
2054
+ tagSupport?: CompletionItemTagOptions;
2055
+ /**
2056
+ * Client support insert replace edit to control different behavior if a
2057
+ * completion item is inserted in the text or should replace text.
2058
+ *
2059
+ * @since 3.16.0
2060
+ */
2061
+ insertReplaceSupport?: boolean;
2062
+ /**
2063
+ * Indicates which properties a client can resolve lazily on a completion
2064
+ * item. Before version 3.16.0 only the predefined properties `documentation`
2065
+ * and `details` could be resolved lazily.
2066
+ *
2067
+ * @since 3.16.0
2068
+ */
2069
+ resolveSupport?: ClientCompletionItemResolveOptions;
2070
+ /**
2071
+ * The client supports the `insertTextMode` property on
2072
+ * a completion item to override the whitespace handling mode
2073
+ * as defined by the client (see `insertTextMode`).
2074
+ *
2075
+ * @since 3.16.0
2076
+ */
2077
+ insertTextModeSupport?: ClientCompletionItemInsertTextModeOptions;
2078
+ /**
2079
+ * The client has support for completion item label
2080
+ * details (see also `CompletionItemLabelDetails`).
2081
+ *
2082
+ * @since 3.17.0
2083
+ */
2084
+ labelDetailsSupport?: boolean;
2085
+ };
2086
+ /**
2087
+ * @since 3.18.0
2088
+ */
2089
+ export type ClientCompletionItemOptionsKind = {
2090
+ /**
2091
+ * The completion item kind values the client supports. When this
2092
+ * property exists the client also guarantees that it will
2093
+ * handle values outside its set gracefully and falls back
2094
+ * to a default value when unknown.
2095
+ *
2096
+ * If this property is not present the client only supports
2097
+ * the completion items kinds from `Text` to `Reference` as defined in
2098
+ * the initial version of the protocol.
2099
+ */
2100
+ valueSet?: CompletionItemKind[];
2101
+ };
1821
2102
  /**
1822
2103
  * Completion client capabilities
1823
2104
  */
@@ -1830,98 +2111,8 @@ export interface CompletionClientCapabilities {
1830
2111
  * The client supports the following `CompletionItem` specific
1831
2112
  * capabilities.
1832
2113
  */
1833
- completionItem?: {
1834
- /**
1835
- * Client supports snippets as insert text.
1836
- *
1837
- * A snippet can define tab stops and placeholders with `$1`, `$2`
1838
- * and `${3:foo}`. `$0` defines the final tab stop, it defaults to
1839
- * the end of the snippet. Placeholders with equal identifiers are linked,
1840
- * that is typing in one will update others too.
1841
- */
1842
- snippetSupport?: boolean;
1843
- /**
1844
- * Client supports commit characters on a completion item.
1845
- */
1846
- commitCharactersSupport?: boolean;
1847
- /**
1848
- * Client supports the following content formats for the documentation
1849
- * property. The order describes the preferred format of the client.
1850
- */
1851
- documentationFormat?: MarkupKind[];
1852
- /**
1853
- * Client supports the deprecated property on a completion item.
1854
- */
1855
- deprecatedSupport?: boolean;
1856
- /**
1857
- * Client supports the preselect property on a completion item.
1858
- */
1859
- preselectSupport?: boolean;
1860
- /**
1861
- * Client supports the tag property on a completion item. Clients supporting
1862
- * tags have to handle unknown tags gracefully. Clients especially need to
1863
- * preserve unknown tags when sending a completion item back to the server in
1864
- * a resolve call.
1865
- *
1866
- * @since 3.15.0
1867
- */
1868
- tagSupport?: {
1869
- /**
1870
- * The tags supported by the client.
1871
- */
1872
- valueSet: CompletionItemTag[];
1873
- };
1874
- /**
1875
- * Client support insert replace edit to control different behavior if a
1876
- * completion item is inserted in the text or should replace text.
1877
- *
1878
- * @since 3.16.0
1879
- */
1880
- insertReplaceSupport?: boolean;
1881
- /**
1882
- * Indicates which properties a client can resolve lazily on a completion
1883
- * item. Before version 3.16.0 only the predefined properties `documentation`
1884
- * and `details` could be resolved lazily.
1885
- *
1886
- * @since 3.16.0
1887
- */
1888
- resolveSupport?: {
1889
- /**
1890
- * The properties that a client can resolve lazily.
1891
- */
1892
- properties: string[];
1893
- };
1894
- /**
1895
- * The client supports the `insertTextMode` property on
1896
- * a completion item to override the whitespace handling mode
1897
- * as defined by the client (see `insertTextMode`).
1898
- *
1899
- * @since 3.16.0
1900
- */
1901
- insertTextModeSupport?: {
1902
- valueSet: InsertTextMode[];
1903
- };
1904
- /**
1905
- * The client has support for completion item label
1906
- * details (see also `CompletionItemLabelDetails`).
1907
- *
1908
- * @since 3.17.0
1909
- */
1910
- labelDetailsSupport?: boolean;
1911
- };
1912
- completionItemKind?: {
1913
- /**
1914
- * The completion item kind values the client supports. When this
1915
- * property exists the client also guarantees that it will
1916
- * handle values outside its set gracefully and falls back
1917
- * to a default value when unknown.
1918
- *
1919
- * If this property is not present the client only supports
1920
- * the completion items kinds from `Text` to `Reference` as defined in
1921
- * the initial version of the protocol.
1922
- */
1923
- valueSet?: CompletionItemKind[];
1924
- };
2114
+ completionItem?: ClientCompletionItemOptions;
2115
+ completionItemKind?: ClientCompletionItemOptionsKind;
1925
2116
  /**
1926
2117
  * Defines how the client handles whitespace and indentation
1927
2118
  * when accepting a completion item that uses multi line
@@ -1941,19 +2132,7 @@ export interface CompletionClientCapabilities {
1941
2132
  *
1942
2133
  * @since 3.17.0
1943
2134
  */
1944
- completionList?: {
1945
- /**
1946
- * The client supports the following itemDefaults on
1947
- * a completion list.
1948
- *
1949
- * The value lists the supported property names of the
1950
- * `CompletionList.itemDefaults` object. If omitted
1951
- * no properties are supported.
1952
- *
1953
- * @since 3.17.0
1954
- */
1955
- itemDefaults?: string[];
1956
- };
2135
+ completionList?: CompletionListCapabilities;
1957
2136
  }
1958
2137
  /**
1959
2138
  * How a completion was triggered
@@ -1999,6 +2178,19 @@ export interface CompletionParams extends TextDocumentPositionParams, WorkDonePr
1999
2178
  */
2000
2179
  context?: CompletionContext;
2001
2180
  }
2181
+ /**
2182
+ * @since 3.18.0
2183
+ */
2184
+ export type ServerCompletionItemOptions = {
2185
+ /**
2186
+ * The server has support for completion item label
2187
+ * details (see also `CompletionItemLabelDetails`) when
2188
+ * receiving a completion item in a resolve call.
2189
+ *
2190
+ * @since 3.17.0
2191
+ */
2192
+ labelDetailsSupport?: boolean;
2193
+ };
2002
2194
  /**
2003
2195
  * Completion options.
2004
2196
  */
@@ -2036,16 +2228,7 @@ export interface CompletionOptions extends WorkDoneProgressOptions {
2036
2228
  *
2037
2229
  * @since 3.17.0
2038
2230
  */
2039
- completionItem?: {
2040
- /**
2041
- * The server has support for completion item label
2042
- * details (see also `CompletionItemLabelDetails`) when
2043
- * receiving a completion item in a resolve call.
2044
- *
2045
- * @since 3.17.0
2046
- */
2047
- labelDetailsSupport?: boolean;
2048
- };
2231
+ completionItem?: ServerCompletionItemOptions;
2049
2232
  }
2050
2233
  /**
2051
2234
  * Registration options for a {@link CompletionRequest}.
@@ -2114,6 +2297,48 @@ export declare namespace HoverRequest {
2114
2297
  const messageDirection: MessageDirection;
2115
2298
  const type: ProtocolRequestType<HoverParams, Hover | null, never, void, HoverRegistrationOptions>;
2116
2299
  }
2300
+ /**
2301
+ * @since 3.18.0
2302
+ */
2303
+ export type ClientSignatureParameterInformationOptions = {
2304
+ /**
2305
+ * The client supports processing label offsets instead of a
2306
+ * simple label string.
2307
+ *
2308
+ * @since 3.14.0
2309
+ */
2310
+ labelOffsetSupport?: boolean;
2311
+ };
2312
+ /**
2313
+ * @since 3.18.0
2314
+ */
2315
+ export type ClientSignatureInformationOptions = {
2316
+ /**
2317
+ * Client supports the following content formats for the documentation
2318
+ * property. The order describes the preferred format of the client.
2319
+ */
2320
+ documentationFormat?: MarkupKind[];
2321
+ /**
2322
+ * Client capabilities specific to parameter information.
2323
+ */
2324
+ parameterInformation?: ClientSignatureParameterInformationOptions;
2325
+ /**
2326
+ * The client supports the `activeParameter` property on `SignatureInformation`
2327
+ * literal.
2328
+ *
2329
+ * @since 3.16.0
2330
+ */
2331
+ activeParameterSupport?: boolean;
2332
+ /**
2333
+ * The client supports the `activeParameter` property on
2334
+ * `SignatureHelp`/`SignatureInformation` being set to `null` to
2335
+ * indicate that no parameter should be active.
2336
+ *
2337
+ * @since 3.18.0
2338
+ * @proposed
2339
+ */
2340
+ noActiveParameterSupport?: boolean;
2341
+ };
2117
2342
  /**
2118
2343
  * Client Capabilities for a {@link SignatureHelpRequest}.
2119
2344
  */
@@ -2126,32 +2351,7 @@ export interface SignatureHelpClientCapabilities {
2126
2351
  * The client supports the following `SignatureInformation`
2127
2352
  * specific properties.
2128
2353
  */
2129
- signatureInformation?: {
2130
- /**
2131
- * Client supports the following content formats for the documentation
2132
- * property. The order describes the preferred format of the client.
2133
- */
2134
- documentationFormat?: MarkupKind[];
2135
- /**
2136
- * Client capabilities specific to parameter information.
2137
- */
2138
- parameterInformation?: {
2139
- /**
2140
- * The client supports processing label offsets instead of a
2141
- * simple label string.
2142
- *
2143
- * @since 3.14.0
2144
- */
2145
- labelOffsetSupport?: boolean;
2146
- };
2147
- /**
2148
- * The client supports the `activeParameter` property on `SignatureInformation`
2149
- * literal.
2150
- *
2151
- * @since 3.16.0
2152
- */
2153
- activeParameterSupport?: boolean;
2154
- };
2354
+ signatureInformation?: ClientSignatureInformationOptions;
2155
2355
  /**
2156
2356
  * The client supports to send additional context information for a
2157
2357
  * `textDocument/signatureHelp` request. A client that opts into
@@ -2377,19 +2577,7 @@ export interface DocumentSymbolClientCapabilities {
2377
2577
  * Specific capabilities for the `SymbolKind` in the
2378
2578
  * `textDocument/documentSymbol` request.
2379
2579
  */
2380
- symbolKind?: {
2381
- /**
2382
- * The symbol kind values the client supports. When this
2383
- * property exists the client also guarantees that it will
2384
- * handle values outside its set gracefully and falls back
2385
- * to a default value when unknown.
2386
- *
2387
- * If this property is not present the client only supports
2388
- * the symbol kinds from `File` to `Array` as defined in
2389
- * the initial version of the protocol.
2390
- */
2391
- valueSet?: SymbolKind[];
2392
- };
2580
+ symbolKind?: ClientSymbolKindOptions;
2393
2581
  /**
2394
2582
  * The client supports hierarchical document symbols.
2395
2583
  */
@@ -2401,12 +2589,7 @@ export interface DocumentSymbolClientCapabilities {
2401
2589
  *
2402
2590
  * @since 3.16.0
2403
2591
  */
2404
- tagSupport?: {
2405
- /**
2406
- * The tags supported by the client.
2407
- */
2408
- valueSet: SymbolTag[];
2409
- };
2592
+ tagSupport?: ClientSymbolTagOptions;
2410
2593
  /**
2411
2594
  * The client supports an additional label presented in the UI when
2412
2595
  * registering a document symbol provider.
@@ -2452,6 +2635,37 @@ export declare namespace DocumentSymbolRequest {
2452
2635
  const messageDirection: MessageDirection;
2453
2636
  const type: ProtocolRequestType<DocumentSymbolParams, DocumentSymbol[] | SymbolInformation[] | null, DocumentSymbol[] | SymbolInformation[], void, DocumentSymbolRegistrationOptions>;
2454
2637
  }
2638
+ /**
2639
+ * @since 3.18.0
2640
+ */
2641
+ export type ClientCodeActionKindOptions = {
2642
+ /**
2643
+ * The code action kind values the client supports. When this
2644
+ * property exists the client also guarantees that it will
2645
+ * handle values outside its set gracefully and falls back
2646
+ * to a default value when unknown.
2647
+ */
2648
+ valueSet: CodeActionKind[];
2649
+ };
2650
+ /**
2651
+ * @since 3.18.0
2652
+ */
2653
+ export type ClientCodeActionLiteralOptions = {
2654
+ /**
2655
+ * The code action kind is support with the following value
2656
+ * set.
2657
+ */
2658
+ codeActionKind: ClientCodeActionKindOptions;
2659
+ };
2660
+ /**
2661
+ * @since 3.18.0
2662
+ */
2663
+ export type ClientCodeActionResolveOptions = {
2664
+ /**
2665
+ * The properties that a client can resolve lazily.
2666
+ */
2667
+ properties: string[];
2668
+ };
2455
2669
  /**
2456
2670
  * The Client Capabilities of a {@link CodeActionRequest}.
2457
2671
  */
@@ -2467,21 +2681,7 @@ export interface CodeActionClientCapabilities {
2467
2681
  *
2468
2682
  * @since 3.8.0
2469
2683
  */
2470
- codeActionLiteralSupport?: {
2471
- /**
2472
- * The code action kind is support with the following value
2473
- * set.
2474
- */
2475
- codeActionKind: {
2476
- /**
2477
- * The code action kind values the client supports. When this
2478
- * property exists the client also guarantees that it will
2479
- * handle values outside its set gracefully and falls back
2480
- * to a default value when unknown.
2481
- */
2482
- valueSet: CodeActionKind[];
2483
- };
2484
- };
2684
+ codeActionLiteralSupport?: ClientCodeActionLiteralOptions;
2485
2685
  /**
2486
2686
  * Whether code action supports the `isPreferred` property.
2487
2687
  *
@@ -2508,12 +2708,7 @@ export interface CodeActionClientCapabilities {
2508
2708
  *
2509
2709
  * @since 3.16.0
2510
2710
  */
2511
- resolveSupport?: {
2512
- /**
2513
- * The properties that a client can resolve lazily.
2514
- */
2515
- properties: string[];
2516
- };
2711
+ resolveSupport?: ClientCodeActionResolveOptions;
2517
2712
  /**
2518
2713
  * Whether the client honors the change annotations in
2519
2714
  * text edits and resource operations returned via the
@@ -2524,6 +2719,14 @@ export interface CodeActionClientCapabilities {
2524
2719
  * @since 3.16.0
2525
2720
  */
2526
2721
  honorsChangeAnnotations?: boolean;
2722
+ /**
2723
+ * Whether the client supports documentation for a class of
2724
+ * code actions.
2725
+ *
2726
+ * @since 3.18.0
2727
+ * @proposed
2728
+ */
2729
+ documentationSupport?: boolean;
2527
2730
  }
2528
2731
  /**
2529
2732
  * The parameters of a {@link CodeActionRequest}.
@@ -2542,6 +2745,28 @@ export interface CodeActionParams extends WorkDoneProgressParams, PartialResultP
2542
2745
  */
2543
2746
  context: CodeActionContext;
2544
2747
  }
2748
+ /**
2749
+ * Documentation for a class of code actions.
2750
+ *
2751
+ * @since 3.18.0
2752
+ * @proposed
2753
+ */
2754
+ export type CodeActionKindDocumentation = {
2755
+ /**
2756
+ * The kind of the code action being documented.
2757
+ *
2758
+ * If the kind is generic, such as `CodeActionKind.Refactor`, the documentation will be shown whenever any
2759
+ * refactorings are returned. If the kind if more specific, such as `CodeActionKind.RefactorExtract`, the
2760
+ * documentation will only be shown when extract refactoring code actions are returned.
2761
+ */
2762
+ kind: CodeActionKind;
2763
+ /**
2764
+ * Command that is ued to display the documentation to the user.
2765
+ *
2766
+ * The title of this documentation code action is taken from {@linkcode Command.title}
2767
+ */
2768
+ command: Command;
2769
+ };
2545
2770
  /**
2546
2771
  * Provider options for a {@link CodeActionRequest}.
2547
2772
  */
@@ -2553,6 +2778,24 @@ export interface CodeActionOptions extends WorkDoneProgressOptions {
2553
2778
  * may list out every specific kind they provide.
2554
2779
  */
2555
2780
  codeActionKinds?: CodeActionKind[];
2781
+ /**
2782
+ * Static documentation for a class of code actions.
2783
+ *
2784
+ * Documentation from the provider should be shown in the code actions menu if either:
2785
+ *
2786
+ * - Code actions of `kind` are requested by the editor. In this case, the editor will show the documentation that
2787
+ * most closely matches the requested code action kind. For example, if a provider has documentation for
2788
+ * both `Refactor` and `RefactorExtract`, when the user requests code actions for `RefactorExtract`,
2789
+ * the editor will use the documentation for `RefactorExtract` instead of the documentation for `Refactor`.
2790
+ *
2791
+ * - Any code actions of `kind` are returned by the provider.
2792
+ *
2793
+ * At most one documentation entry should be shown per provider.
2794
+ *
2795
+ * @since 3.18.0
2796
+ * @proposed
2797
+ */
2798
+ documentation?: CodeActionKindDocumentation[];
2556
2799
  /**
2557
2800
  * The server provides support to resolve additional
2558
2801
  * information for a code action.
@@ -2584,6 +2827,41 @@ export declare namespace CodeActionResolveRequest {
2584
2827
  const messageDirection: MessageDirection;
2585
2828
  const type: ProtocolRequestType<CodeAction, CodeAction, never, void, void>;
2586
2829
  }
2830
+ /**
2831
+ * @since 3.18.0
2832
+ */
2833
+ export type ClientSymbolKindOptions = {
2834
+ /**
2835
+ * The symbol kind values the client supports. When this
2836
+ * property exists the client also guarantees that it will
2837
+ * handle values outside its set gracefully and falls back
2838
+ * to a default value when unknown.
2839
+ *
2840
+ * If this property is not present the client only supports
2841
+ * the symbol kinds from `File` to `Array` as defined in
2842
+ * the initial version of the protocol.
2843
+ */
2844
+ valueSet?: SymbolKind[];
2845
+ };
2846
+ /**
2847
+ * @since 3.18.0
2848
+ */
2849
+ export type ClientSymbolTagOptions = {
2850
+ /**
2851
+ * The tags supported by the client.
2852
+ */
2853
+ valueSet: SymbolTag[];
2854
+ };
2855
+ /**
2856
+ * @since 3.18.0
2857
+ */
2858
+ export type ClientSymbolResolveOptions = {
2859
+ /**
2860
+ * The properties that a client can resolve lazily. Usually
2861
+ * `location.range`
2862
+ */
2863
+ properties: string[];
2864
+ };
2587
2865
  /**
2588
2866
  * Client capabilities for a {@link WorkspaceSymbolRequest}.
2589
2867
  */
@@ -2595,31 +2873,14 @@ export interface WorkspaceSymbolClientCapabilities {
2595
2873
  /**
2596
2874
  * Specific capabilities for the `SymbolKind` in the `workspace/symbol` request.
2597
2875
  */
2598
- symbolKind?: {
2599
- /**
2600
- * The symbol kind values the client supports. When this
2601
- * property exists the client also guarantees that it will
2602
- * handle values outside its set gracefully and falls back
2603
- * to a default value when unknown.
2604
- *
2605
- * If this property is not present the client only supports
2606
- * the symbol kinds from `File` to `Array` as defined in
2607
- * the initial version of the protocol.
2608
- */
2609
- valueSet?: SymbolKind[];
2610
- };
2876
+ symbolKind?: ClientSymbolKindOptions;
2611
2877
  /**
2612
2878
  * The client supports tags on `SymbolInformation`.
2613
2879
  * Clients supporting tags have to handle unknown tags gracefully.
2614
2880
  *
2615
2881
  * @since 3.16.0
2616
2882
  */
2617
- tagSupport?: {
2618
- /**
2619
- * The tags supported by the client.
2620
- */
2621
- valueSet: SymbolTag[];
2622
- };
2883
+ tagSupport?: ClientSymbolTagOptions;
2623
2884
  /**
2624
2885
  * The client support partial workspace symbols. The client will send the
2625
2886
  * request `workspaceSymbol/resolve` to the server to resolve additional
@@ -2627,13 +2888,7 @@ export interface WorkspaceSymbolClientCapabilities {
2627
2888
  *
2628
2889
  * @since 3.17.0
2629
2890
  */
2630
- resolveSupport?: {
2631
- /**
2632
- * The properties that a client can resolve lazily. Usually
2633
- * `location.range`
2634
- */
2635
- properties: string[];
2636
- };
2891
+ resolveSupport?: ClientSymbolResolveOptions;
2637
2892
  }
2638
2893
  /**
2639
2894
  * The parameters of a {@link WorkspaceSymbolRequest}.
@@ -2642,6 +2897,12 @@ export interface WorkspaceSymbolParams extends WorkDoneProgressParams, PartialRe
2642
2897
  /**
2643
2898
  * A query string to filter symbols by. Clients may send an empty
2644
2899
  * string here to request all symbols.
2900
+ *
2901
+ * The `query`-parameter should be interpreted in a *relaxed way* as editors
2902
+ * will apply their own highlighting and scoring on the results. A good rule
2903
+ * of thumb is to match case-insensitive and to simply check that the
2904
+ * characters of *query* appear in their order in a candidate symbol.
2905
+ * Servers shouldn't use prefix, substring, or similar strict matching.
2645
2906
  */
2646
2907
  query: string;
2647
2908
  }
@@ -2689,6 +2950,15 @@ export declare namespace WorkspaceSymbolResolveRequest {
2689
2950
  const messageDirection: MessageDirection;
2690
2951
  const type: ProtocolRequestType<WorkspaceSymbol, WorkspaceSymbol, never, void, void>;
2691
2952
  }
2953
+ /**
2954
+ * @since 3.18.0
2955
+ */
2956
+ export type ClientCodeLensResolveOptions = {
2957
+ /**
2958
+ * The properties that a client can resolve lazily.
2959
+ */
2960
+ properties: string[];
2961
+ };
2692
2962
  /**
2693
2963
  * The client capabilities of a {@link CodeLensRequest}.
2694
2964
  */
@@ -2697,6 +2967,13 @@ export interface CodeLensClientCapabilities {
2697
2967
  * Whether code lens supports dynamic registration.
2698
2968
  */
2699
2969
  dynamicRegistration?: boolean;
2970
+ /**
2971
+ * Whether the client supports resolving additional code lens
2972
+ * properties via a separate `codeLens/resolve` request.
2973
+ *
2974
+ * @since 3.18.0
2975
+ */
2976
+ resolveSupport?: ClientCodeLensResolveOptions;
2700
2977
  }
2701
2978
  /**
2702
2979
  * @since 3.16.0
@@ -3093,12 +3370,20 @@ export declare namespace RenameRequest {
3093
3370
  }
3094
3371
  export interface PrepareRenameParams extends TextDocumentPositionParams, WorkDoneProgressParams {
3095
3372
  }
3096
- export type PrepareRenameResult = Range | {
3373
+ /**
3374
+ * @since 3.18.0
3375
+ */
3376
+ export type PrepareRenamePlaceholder = {
3097
3377
  range: Range;
3098
3378
  placeholder: string;
3099
- } | {
3379
+ };
3380
+ /**
3381
+ * @since 3.18.0
3382
+ */
3383
+ export type PrepareRenameDefaultBehavior = {
3100
3384
  defaultBehavior: boolean;
3101
3385
  };
3386
+ export type PrepareRenameResult = Range | PrepareRenamePlaceholder | PrepareRenameDefaultBehavior;
3102
3387
  /**
3103
3388
  * A request to test and perform the setup necessary for a rename.
3104
3389
  *
@@ -3154,6 +3439,17 @@ export declare namespace ExecuteCommandRequest {
3154
3439
  const messageDirection: MessageDirection;
3155
3440
  const type: ProtocolRequestType<ExecuteCommandParams, any, never, void, ExecuteCommandRegistrationOptions>;
3156
3441
  }
3442
+ /**
3443
+ * @since 3.18.0
3444
+ */
3445
+ export type ChangeAnnotationsSupportOptions = {
3446
+ /**
3447
+ * Whether the client groups edits with equal labels into tree nodes,
3448
+ * for instance all edits labelled with "Changes in Strings" would
3449
+ * be a tree node.
3450
+ */
3451
+ groupsOnLabel?: boolean;
3452
+ };
3157
3453
  export interface WorkspaceEditClientCapabilities {
3158
3454
  /**
3159
3455
  * The client supports versioned document changes in `WorkspaceEdit`s
@@ -3189,14 +3485,21 @@ export interface WorkspaceEditClientCapabilities {
3189
3485
  *
3190
3486
  * @since 3.16.0
3191
3487
  */
3192
- changeAnnotationSupport?: {
3193
- /**
3194
- * Whether the client groups edits with equal labels into tree nodes,
3195
- * for instance all edits labelled with "Changes in Strings" would
3196
- * be a tree node.
3197
- */
3198
- groupsOnLabel?: boolean;
3199
- };
3488
+ changeAnnotationSupport?: ChangeAnnotationsSupportOptions;
3489
+ /**
3490
+ * Whether the client supports `WorkspaceEditMetadata` in `WorkspaceEdit`s.
3491
+ *
3492
+ * @since 3.18.0
3493
+ * @proposed
3494
+ */
3495
+ metadataSupport?: boolean;
3496
+ /**
3497
+ * Whether the client supports snippets as text edits.
3498
+ *
3499
+ * @since 3.18.0
3500
+ * @proposed
3501
+ */
3502
+ snippetEditSupport?: boolean;
3200
3503
  }
3201
3504
  /**
3202
3505
  * The parameters passed via an apply workspace edit request.
@@ -3212,6 +3515,13 @@ export interface ApplyWorkspaceEditParams {
3212
3515
  * The edits to apply.
3213
3516
  */
3214
3517
  edit: WorkspaceEdit;
3518
+ /**
3519
+ * Additional data about the edit.
3520
+ *
3521
+ * @since 3.18.0
3522
+ * @proposed
3523
+ */
3524
+ metadata?: WorkspaceEditMetadata;
3215
3525
  }
3216
3526
  /**
3217
3527
  * The result returned from the apply workspace edit request.
@@ -3247,6 +3557,7 @@ export declare namespace ApplyWorkspaceEditRequest {
3247
3557
  const method: 'workspace/applyEdit';
3248
3558
  const messageDirection: MessageDirection;
3249
3559
  const type: ProtocolRequestType<ApplyWorkspaceEditParams, ApplyWorkspaceEditResult, never, void, void>;
3560
+ type HandlerSignature = RequestHandler<ApplyWorkspaceEditParams, ApplyWorkspaceEditResult, void>;
3250
3561
  }
3251
- export { ImplementationRequest, ImplementationParams, ImplementationRegistrationOptions, ImplementationOptions, TypeDefinitionRequest, TypeDefinitionParams, TypeDefinitionRegistrationOptions, TypeDefinitionOptions, WorkspaceFoldersRequest, DidChangeWorkspaceFoldersNotification, DidChangeWorkspaceFoldersParams, WorkspaceFoldersChangeEvent, ConfigurationRequest, ConfigurationParams, ConfigurationItem, DocumentColorRequest, ColorPresentationRequest, DocumentColorOptions, DocumentColorParams, ColorPresentationParams, DocumentColorRegistrationOptions, FoldingRangeClientCapabilities, FoldingRangeOptions, FoldingRangeRequest, FoldingRangeParams, FoldingRangeRegistrationOptions, FoldingRangeRefreshRequest, DeclarationClientCapabilities, DeclarationRequest, DeclarationParams, DeclarationRegistrationOptions, DeclarationOptions, SelectionRangeClientCapabilities, SelectionRangeOptions, SelectionRangeParams, SelectionRangeRequest, SelectionRangeRegistrationOptions, WorkDoneProgressBegin, WorkDoneProgressReport, WorkDoneProgressEnd, WorkDoneProgress, WorkDoneProgressCreateParams, WorkDoneProgressCreateRequest, WorkDoneProgressCancelParams, WorkDoneProgressCancelNotification, CallHierarchyClientCapabilities, CallHierarchyOptions, CallHierarchyRegistrationOptions, CallHierarchyIncomingCallsParams, CallHierarchyIncomingCallsRequest, CallHierarchyOutgoingCallsParams, CallHierarchyOutgoingCallsRequest, CallHierarchyPrepareParams, CallHierarchyPrepareRequest, SemanticTokensPartialResult, SemanticTokensDeltaPartialResult, TokenFormat, SemanticTokensClientCapabilities, SemanticTokensOptions, SemanticTokensRegistrationOptions, SemanticTokensParams, SemanticTokensRequest, SemanticTokensDeltaParams, SemanticTokensDeltaRequest, SemanticTokensRangeParams, SemanticTokensRangeRequest, SemanticTokensRefreshRequest, SemanticTokensRegistrationType, ShowDocumentParams, ShowDocumentRequest, ShowDocumentResult, ShowDocumentClientCapabilities, LinkedEditingRangeClientCapabilities, LinkedEditingRanges, LinkedEditingRangeOptions, LinkedEditingRangeParams, LinkedEditingRangeRegistrationOptions, LinkedEditingRangeRequest, FileOperationOptions, FileOperationClientCapabilities, FileOperationRegistrationOptions, FileOperationPatternOptions, FileOperationPatternKind, DidCreateFilesNotification, CreateFilesParams, FileCreate, WillCreateFilesRequest, DidRenameFilesNotification, RenameFilesParams, FileRename, WillRenameFilesRequest, DidDeleteFilesNotification, DeleteFilesParams, FileDelete, WillDeleteFilesRequest, UniquenessLevel, MonikerKind, Moniker, MonikerClientCapabilities, MonikerOptions, MonikerRegistrationOptions, MonikerParams, MonikerRequest, TypeHierarchyClientCapabilities, TypeHierarchyOptions, TypeHierarchyRegistrationOptions, TypeHierarchyPrepareParams, TypeHierarchyPrepareRequest, TypeHierarchySubtypesParams, TypeHierarchySubtypesRequest, TypeHierarchySupertypesParams, TypeHierarchySupertypesRequest, InlineValueClientCapabilities, InlineValueOptions, InlineValueRegistrationOptions, InlineValueWorkspaceClientCapabilities, InlineValueParams, InlineValueRequest, InlineValueRefreshRequest, InlayHintClientCapabilities, InlayHintOptions, InlayHintRegistrationOptions, InlayHintWorkspaceClientCapabilities, InlayHintParams, InlayHintRequest, InlayHintResolveRequest, InlayHintRefreshRequest, DiagnosticClientCapabilities, DiagnosticOptions, DiagnosticRegistrationOptions, DiagnosticServerCancellationData, DocumentDiagnosticParams, DocumentDiagnosticReportKind, FullDocumentDiagnosticReport, RelatedFullDocumentDiagnosticReport, UnchangedDocumentDiagnosticReport, RelatedUnchangedDocumentDiagnosticReport, DocumentDiagnosticReport, DocumentDiagnosticReportPartialResult, DocumentDiagnosticRequest, PreviousResultId, WorkspaceDiagnosticParams, WorkspaceFullDocumentDiagnosticReport, WorkspaceUnchangedDocumentDiagnosticReport, WorkspaceDocumentDiagnosticReport, WorkspaceDiagnosticReport, WorkspaceDiagnosticReportPartialResult, WorkspaceDiagnosticRequest, DiagnosticRefreshRequest, NotebookDocumentSyncClientCapabilities, NotebookCellKind, ExecutionSummary, NotebookCell, NotebookDocument, NotebookDocumentIdentifier, VersionedNotebookDocumentIdentifier, NotebookDocumentSyncOptions, NotebookDocumentSyncRegistrationOptions, NotebookDocumentSyncRegistrationType, DidOpenNotebookDocumentParams, DidOpenNotebookDocumentNotification, NotebookCellArrayChange, NotebookDocumentChangeEvent, DidChangeNotebookDocumentParams, DidChangeNotebookDocumentNotification, DidSaveNotebookDocumentParams, DidSaveNotebookDocumentNotification, DidCloseNotebookDocumentParams, DidCloseNotebookDocumentNotification, InlineCompletionClientCapabilities, InlineCompletionOptions, InlineCompletionParams, InlineCompletionRegistrationOptions, InlineCompletionRequest };
3562
+ export { ImplementationRequest, ImplementationParams, ImplementationRegistrationOptions, ImplementationOptions, TypeDefinitionRequest, TypeDefinitionParams, TypeDefinitionRegistrationOptions, TypeDefinitionOptions, WorkspaceFoldersRequest, DidChangeWorkspaceFoldersNotification, DidChangeWorkspaceFoldersParams, WorkspaceFoldersChangeEvent, ConfigurationRequest, ConfigurationParams, ConfigurationItem, DocumentColorRequest, ColorPresentationRequest, DocumentColorOptions, DocumentColorParams, ColorPresentationParams, DocumentColorRegistrationOptions, FoldingRangeClientCapabilities, FoldingRangeOptions, FoldingRangeRequest, FoldingRangeParams, FoldingRangeRegistrationOptions, FoldingRangeRefreshRequest, DeclarationClientCapabilities, DeclarationRequest, DeclarationParams, DeclarationRegistrationOptions, DeclarationOptions, SelectionRangeClientCapabilities, SelectionRangeOptions, SelectionRangeParams, SelectionRangeRequest, SelectionRangeRegistrationOptions, WorkDoneProgressBegin, WorkDoneProgressReport, WorkDoneProgressEnd, WorkDoneProgress, WorkDoneProgressCreateParams, WorkDoneProgressCreateRequest, WorkDoneProgressCancelParams, WorkDoneProgressCancelNotification, CallHierarchyClientCapabilities, CallHierarchyOptions, CallHierarchyRegistrationOptions, CallHierarchyIncomingCallsParams, CallHierarchyIncomingCallsRequest, CallHierarchyOutgoingCallsParams, CallHierarchyOutgoingCallsRequest, CallHierarchyPrepareParams, CallHierarchyPrepareRequest, SemanticTokensPartialResult, SemanticTokensDeltaPartialResult, TokenFormat, SemanticTokensClientCapabilities, SemanticTokensOptions, SemanticTokensRegistrationOptions, SemanticTokensParams, SemanticTokensRequest, SemanticTokensDeltaParams, SemanticTokensDeltaRequest, SemanticTokensRangeParams, SemanticTokensRangeRequest, SemanticTokensRefreshRequest, SemanticTokensRegistrationType, ShowDocumentParams, ShowDocumentRequest, ShowDocumentResult, ShowDocumentClientCapabilities, LinkedEditingRangeClientCapabilities, LinkedEditingRanges, LinkedEditingRangeOptions, LinkedEditingRangeParams, LinkedEditingRangeRegistrationOptions, LinkedEditingRangeRequest, FileOperationOptions, FileOperationClientCapabilities, FileOperationRegistrationOptions, FileOperationPatternOptions, FileOperationPatternKind, DidCreateFilesNotification, CreateFilesParams, FileCreate, WillCreateFilesRequest, DidRenameFilesNotification, RenameFilesParams, FileRename, WillRenameFilesRequest, DidDeleteFilesNotification, DeleteFilesParams, FileDelete, WillDeleteFilesRequest, UniquenessLevel, MonikerKind, Moniker, MonikerClientCapabilities, MonikerOptions, MonikerRegistrationOptions, MonikerParams, MonikerRequest, TypeHierarchyClientCapabilities, TypeHierarchyOptions, TypeHierarchyRegistrationOptions, TypeHierarchyPrepareParams, TypeHierarchyPrepareRequest, TypeHierarchySubtypesParams, TypeHierarchySubtypesRequest, TypeHierarchySupertypesParams, TypeHierarchySupertypesRequest, InlineValueClientCapabilities, InlineValueOptions, InlineValueRegistrationOptions, InlineValueWorkspaceClientCapabilities, InlineValueParams, InlineValueRequest, InlineValueRefreshRequest, InlayHintClientCapabilities, InlayHintOptions, InlayHintRegistrationOptions, InlayHintWorkspaceClientCapabilities, InlayHintParams, InlayHintRequest, InlayHintResolveRequest, InlayHintRefreshRequest, DiagnosticClientCapabilities, DiagnosticOptions, DiagnosticRegistrationOptions, DiagnosticServerCancellationData, DocumentDiagnosticParams, DocumentDiagnosticReportKind, FullDocumentDiagnosticReport, RelatedFullDocumentDiagnosticReport, UnchangedDocumentDiagnosticReport, RelatedUnchangedDocumentDiagnosticReport, DocumentDiagnosticReport, DocumentDiagnosticReportPartialResult, DocumentDiagnosticRequest, PreviousResultId, WorkspaceDiagnosticParams, WorkspaceFullDocumentDiagnosticReport, WorkspaceUnchangedDocumentDiagnosticReport, WorkspaceDocumentDiagnosticReport, WorkspaceDiagnosticReport, WorkspaceDiagnosticReportPartialResult, WorkspaceDiagnosticRequest, DiagnosticRefreshRequest, NotebookDocumentSyncClientCapabilities, NotebookCellKind, ExecutionSummary, NotebookCell, NotebookDocument, NotebookDocumentIdentifier, VersionedNotebookDocumentIdentifier, NotebookDocumentSyncOptions, NotebookDocumentSyncRegistrationOptions, NotebookDocumentSyncRegistrationType, DidOpenNotebookDocumentParams, DidOpenNotebookDocumentNotification, NotebookCellArrayChange, NotebookDocumentChangeEvent, DidChangeNotebookDocumentParams, DidChangeNotebookDocumentNotification, DidSaveNotebookDocumentParams, DidSaveNotebookDocumentNotification, DidCloseNotebookDocumentParams, DidCloseNotebookDocumentNotification, NotebookDocumentFilterWithCells, NotebookDocumentFilterWithNotebook, InlineCompletionClientCapabilities, InlineCompletionOptions, InlineCompletionParams, InlineCompletionRegistrationOptions, InlineCompletionRequest, TextDocumentContentClientCapabilities, TextDocumentContentOptions, TextDocumentContentRegistrationOptions, TextDocumentContentParams, TextDocumentContentResult, TextDocumentContentRequest, TextDocumentContentRefreshParams, TextDocumentContentRefreshRequest };
3252
3563
  export { DocumentColorOptions as ColorProviderOptions, DocumentColorOptions as ColorOptions, FoldingRangeOptions as FoldingRangeProviderOptions, SelectionRangeOptions as SelectionRangeProviderOptions, DocumentColorRegistrationOptions as ColorRegistrationOptions };