1 | import { ProgressToken, RequestHandler, TraceValues } from 'vscode-jsonrpc';
|
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';
|
4 | import { ImplementationRequest, ImplementationClientCapabilities, ImplementationOptions, ImplementationRegistrationOptions, ImplementationParams } from './protocol.implementation';
|
5 | import { TypeDefinitionRequest, TypeDefinitionClientCapabilities, TypeDefinitionOptions, TypeDefinitionRegistrationOptions, TypeDefinitionParams } from './protocol.typeDefinition';
|
6 | import { WorkspaceFoldersRequest, DidChangeWorkspaceFoldersNotification, DidChangeWorkspaceFoldersParams, WorkspaceFoldersChangeEvent, WorkspaceFoldersInitializeParams, WorkspaceFoldersServerCapabilities } from './protocol.workspaceFolder';
|
7 | import { ConfigurationRequest, ConfigurationParams, ConfigurationItem } from './protocol.configuration';
|
8 | import { DocumentColorRequest, ColorPresentationRequest, DocumentColorOptions, DocumentColorParams, ColorPresentationParams, DocumentColorClientCapabilities, DocumentColorRegistrationOptions } from './protocol.colorProvider';
|
9 | import { FoldingRangeClientCapabilities, FoldingRangeOptions, FoldingRangeRequest, FoldingRangeParams, FoldingRangeRegistrationOptions, FoldingRangeRefreshRequest, FoldingRangeWorkspaceClientCapabilities } from './protocol.foldingRange';
|
10 | import { DeclarationClientCapabilities, DeclarationRequest, DeclarationOptions, DeclarationRegistrationOptions, DeclarationParams } from './protocol.declaration';
|
11 | import { SelectionRangeClientCapabilities, SelectionRangeOptions, SelectionRangeRequest, SelectionRangeParams, SelectionRangeRegistrationOptions } from './protocol.selectionRange';
|
12 | import { WorkDoneProgressBegin, WorkDoneProgressReport, WorkDoneProgressEnd, WorkDoneProgress, WorkDoneProgressCreateParams, WorkDoneProgressCreateRequest, WorkDoneProgressCancelParams, WorkDoneProgressCancelNotification } from './protocol.progress';
|
13 | import { CallHierarchyClientCapabilities, CallHierarchyOptions, CallHierarchyRegistrationOptions, CallHierarchyIncomingCallsParams, CallHierarchyIncomingCallsRequest, CallHierarchyOutgoingCallsParams, CallHierarchyOutgoingCallsRequest, CallHierarchyPrepareParams, CallHierarchyPrepareRequest } from './protocol.callHierarchy';
|
14 | import { SemanticTokensPartialResult, SemanticTokensDeltaPartialResult, TokenFormat, SemanticTokensClientCapabilities, SemanticTokensOptions, SemanticTokensRegistrationOptions, SemanticTokensParams, SemanticTokensRequest, SemanticTokensDeltaParams, SemanticTokensDeltaRequest, SemanticTokensRangeParams, SemanticTokensRangeRequest, SemanticTokensRefreshRequest, SemanticTokensWorkspaceClientCapabilities, SemanticTokensRegistrationType } from './protocol.semanticTokens';
|
15 | import { ShowDocumentParams, ShowDocumentResult, ShowDocumentRequest, ShowDocumentClientCapabilities } from './protocol.showDocument';
|
16 | import { LinkedEditingRangeClientCapabilities, LinkedEditingRanges, LinkedEditingRangeOptions, LinkedEditingRangeParams, LinkedEditingRangeRegistrationOptions, LinkedEditingRangeRequest } from './protocol.linkedEditingRange';
|
17 | import { FileOperationOptions, FileOperationClientCapabilities, FileOperationRegistrationOptions, FileOperationPatternOptions, FileOperationPatternKind, DidCreateFilesNotification, CreateFilesParams, FileCreate, WillCreateFilesRequest, DidRenameFilesNotification, RenameFilesParams, FileRename, WillRenameFilesRequest, DidDeleteFilesNotification, DeleteFilesParams, FileDelete, WillDeleteFilesRequest } from './protocol.fileOperations';
|
18 | import { UniquenessLevel, MonikerKind, Moniker, MonikerClientCapabilities, MonikerOptions, MonikerRegistrationOptions, MonikerParams, MonikerRequest } from './protocol.moniker';
|
19 | import { TypeHierarchyClientCapabilities, TypeHierarchyOptions, TypeHierarchyRegistrationOptions, TypeHierarchyPrepareParams, TypeHierarchyPrepareRequest, TypeHierarchySubtypesParams, TypeHierarchySubtypesRequest, TypeHierarchySupertypesParams, TypeHierarchySupertypesRequest } from './protocol.typeHierarchy';
|
20 | import { InlineValueClientCapabilities, InlineValueOptions, InlineValueRegistrationOptions, InlineValueWorkspaceClientCapabilities, InlineValueParams, InlineValueRequest, InlineValueRefreshRequest } from './protocol.inlineValue';
|
21 | import { InlayHintClientCapabilities, InlayHintOptions, InlayHintRegistrationOptions, InlayHintWorkspaceClientCapabilities, InlayHintParams, InlayHintRequest, InlayHintResolveRequest, InlayHintRefreshRequest } from './protocol.inlayHint';
|
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';
|
24 | import { InlineCompletionClientCapabilities, InlineCompletionOptions, InlineCompletionParams, InlineCompletionRegistrationOptions, InlineCompletionRequest } from './protocol.inlineCompletion';
|
25 | /**
|
26 | * A document filter denotes a document by different properties like
|
27 | * the {@link TextDocument.languageId language}, the {@link Uri.scheme scheme} of
|
28 | * its resource, or a glob-pattern that is applied to the {@link TextDocument.fileName path}.
|
29 | *
|
30 | * Glob patterns can have the following syntax:
|
31 | * - `*` to match one or more characters in a path segment
|
32 | * - `?` to match on one character in a path segment
|
33 | * - `**` to match any number of path segments, including none
|
34 | * - `{}` to group sub patterns into an OR expression. (e.g. `**/*.{ts,js}` matches all TypeScript and JavaScript files)
|
35 | * - `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …)
|
36 | * - `[!...]` to negate a range of characters to match in a path segment (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but not `example.0`)
|
37 | *
|
38 | * @sample A language filter that applies to typescript files on disk: `{ language: 'typescript', scheme: 'file' }`
|
39 | * @sample A language filter that applies to all package.json paths: `{ language: 'json', pattern: '**package.json' }`
|
40 | *
|
41 | * @since 3.17.0
|
42 | */
|
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 | };
|
65 | /**
|
66 | * The TextDocumentFilter namespace provides helper functions to work with
|
67 | * {@link TextDocumentFilter} literals.
|
68 | *
|
69 | * @since 3.17.0
|
70 | */
|
71 | export declare namespace TextDocumentFilter {
|
72 | function is(value: any): value is TextDocumentFilter;
|
73 | }
|
74 | /**
|
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)
|
78 | *
|
79 | * @since 3.17.0
|
80 | */
|
81 | export type NotebookDocumentFilter = {
|
82 | /** The type of the enclosing notebook. */
|
83 | notebookType: string;
|
84 | /** A Uri {@link Uri.scheme scheme}, like `file` or `untitled`. */
|
85 | scheme?: string;
|
86 | /** A glob pattern. */
|
87 | pattern?: string;
|
88 | } | {
|
89 | /** The type of the enclosing notebook. */
|
90 | notebookType?: string;
|
91 | /** A Uri {@link Uri.scheme scheme}, like `file` or `untitled`.*/
|
92 | scheme: string;
|
93 | /** A glob pattern. */
|
94 | pattern?: string;
|
95 | } | {
|
96 | /** The type of the enclosing notebook. */
|
97 | notebookType?: string;
|
98 | /** A Uri {@link Uri.scheme scheme}, like `file` or `untitled`. */
|
99 | scheme?: string;
|
100 | /** A glob pattern. */
|
101 | pattern: string;
|
102 | };
|
103 | /**
|
104 | * The NotebookDocumentFilter namespace provides helper functions to work with
|
105 | * {@link NotebookDocumentFilter} literals.
|
106 | *
|
107 | * @since 3.17.0
|
108 | */
|
109 | export declare namespace NotebookDocumentFilter {
|
110 | function is(value: any): value is NotebookDocumentFilter;
|
111 | }
|
112 | /**
|
113 | * A notebook cell text document filter denotes a cell text
|
114 | * document by different properties.
|
115 | *
|
116 | * @since 3.17.0
|
117 | */
|
118 | export type NotebookCellTextDocumentFilter = {
|
119 | /**
|
120 | * A filter that matches against the notebook
|
121 | * containing the notebook cell. If a string
|
122 | * value is provided it matches against the
|
123 | * notebook type. '*' matches every notebook.
|
124 | */
|
125 | notebook: string | NotebookDocumentFilter;
|
126 | /**
|
127 | * A language id like `python`.
|
128 | *
|
129 | * Will be matched against the language id of the
|
130 | * notebook cell document. '*' matches every language.
|
131 | */
|
132 | language?: string;
|
133 | };
|
134 | /**
|
135 | * The NotebookCellTextDocumentFilter namespace provides helper functions to work with
|
136 | * {@link NotebookCellTextDocumentFilter} literals.
|
137 | *
|
138 | * @since 3.17.0
|
139 | */
|
140 | export declare namespace NotebookCellTextDocumentFilter {
|
141 | function is(value: any): value is NotebookCellTextDocumentFilter;
|
142 | }
|
143 | /**
|
144 | * A document filter describes a top level text document or
|
145 | * a notebook cell document.
|
146 | *
|
147 | * @since 3.17.0 - proposed support for NotebookCellTextDocumentFilter.
|
148 | */
|
149 | export type DocumentFilter = TextDocumentFilter | NotebookCellTextDocumentFilter;
|
150 | /**
|
151 | * A document selector is the combination of one or many document filters.
|
152 | *
|
153 | * @sample `let sel:DocumentSelector = [{ language: 'typescript' }, { language: 'json', pattern: '**∕tsconfig.json' }]`;
|
154 | *
|
155 | * The use of a string as a document filter is deprecated @since 3.16.0.
|
156 | */
|
157 | export type DocumentSelector = (string | DocumentFilter)[];
|
158 | /**
|
159 | * The DocumentSelector namespace provides helper functions to work with
|
160 | * {@link DocumentSelector}s.
|
161 | */
|
162 | export declare namespace DocumentSelector {
|
163 | function is(value: any[] | undefined | null): value is DocumentSelector;
|
164 | }
|
165 | /**
|
166 | * General parameters to register for a notification or to register a provider.
|
167 | */
|
168 | export interface Registration {
|
169 | /**
|
170 | * The id used to register the request. The id can be used to deregister
|
171 | * the request again.
|
172 | */
|
173 | id: string;
|
174 | /**
|
175 | * The method / capability to register for.
|
176 | */
|
177 | method: string;
|
178 | /**
|
179 | * Options necessary for the registration.
|
180 | */
|
181 | registerOptions?: LSPAny;
|
182 | }
|
183 | export interface RegistrationParams {
|
184 | registrations: Registration[];
|
185 | }
|
186 | /**
|
187 | * The `client/registerCapability` request is sent from the server to the client to register a new capability
|
188 | * handler on the client side.
|
189 | */
|
190 | export declare namespace RegistrationRequest {
|
191 | const method: 'client/registerCapability';
|
192 | const messageDirection: MessageDirection;
|
193 | const type: ProtocolRequestType<RegistrationParams, void, never, void, void>;
|
194 | type HandlerSignature = RequestHandler<RegistrationParams, void, void>;
|
195 | }
|
196 | /**
|
197 | * General parameters to unregister a request or notification.
|
198 | */
|
199 | export interface Unregistration {
|
200 | /**
|
201 | * The id used to unregister the request or notification. Usually an id
|
202 | * provided during the register request.
|
203 | */
|
204 | id: string;
|
205 | /**
|
206 | * The method to unregister for.
|
207 | */
|
208 | method: string;
|
209 | }
|
210 | export interface UnregistrationParams {
|
211 | unregisterations: Unregistration[];
|
212 | }
|
213 | /**
|
214 | * The `client/unregisterCapability` request is sent from the server to the client to unregister a previously registered capability
|
215 | * handler on the client side.
|
216 | */
|
217 | export declare namespace UnregistrationRequest {
|
218 | const method: 'client/unregisterCapability';
|
219 | const messageDirection: MessageDirection;
|
220 | const type: ProtocolRequestType<UnregistrationParams, void, never, void, void>;
|
221 | type HandlerSignature = RequestHandler<UnregistrationParams, void, void>;
|
222 | }
|
223 | export interface WorkDoneProgressParams {
|
224 | /**
|
225 | * An optional token that a server can use to report work done progress.
|
226 | */
|
227 | workDoneToken?: ProgressToken;
|
228 | }
|
229 | export interface PartialResultParams {
|
230 | /**
|
231 | * An optional token that a server can use to report partial results (e.g. streaming) to
|
232 | * the client.
|
233 | */
|
234 | partialResultToken?: ProgressToken;
|
235 | }
|
236 | /**
|
237 | * A parameter literal used in requests to pass a text document and a position inside that
|
238 | * document.
|
239 | */
|
240 | export interface TextDocumentPositionParams {
|
241 | /**
|
242 | * The text document.
|
243 | */
|
244 | textDocument: TextDocumentIdentifier;
|
245 | /**
|
246 | * The position inside the text document.
|
247 | */
|
248 | position: Position;
|
249 | }
|
250 | /**
|
251 | * The kind of resource operations supported by the client.
|
252 | */
|
253 | export type ResourceOperationKind = 'create' | 'rename' | 'delete';
|
254 | export declare namespace ResourceOperationKind {
|
255 | /**
|
256 | * Supports creating new files and folders.
|
257 | */
|
258 | const Create: ResourceOperationKind;
|
259 | /**
|
260 | * Supports renaming existing files and folders.
|
261 | */
|
262 | const Rename: ResourceOperationKind;
|
263 | /**
|
264 | * Supports deleting existing files and folders.
|
265 | */
|
266 | const Delete: ResourceOperationKind;
|
267 | }
|
268 | export type FailureHandlingKind = 'abort' | 'transactional' | 'undo' | 'textOnlyTransactional';
|
269 | export declare namespace FailureHandlingKind {
|
270 | /**
|
271 | * Applying the workspace change is simply aborted if one of the changes provided
|
272 | * fails. All operations executed before the failing operation stay executed.
|
273 | */
|
274 | const Abort: FailureHandlingKind;
|
275 | /**
|
276 | * All operations are executed transactional. That means they either all
|
277 | * succeed or no changes at all are applied to the workspace.
|
278 | */
|
279 | const Transactional: FailureHandlingKind;
|
280 | /**
|
281 | * If the workspace edit contains only textual file changes they are executed transactional.
|
282 | * If resource changes (create, rename or delete file) are part of the change the failure
|
283 | * handling strategy is abort.
|
284 | */
|
285 | const TextOnlyTransactional: FailureHandlingKind;
|
286 | /**
|
287 | * The client tries to undo the operations already executed. But there is no
|
288 | * guarantee that this is succeeding.
|
289 | */
|
290 | const Undo: FailureHandlingKind;
|
291 | }
|
292 | /**
|
293 | * Workspace specific client capabilities.
|
294 | */
|
295 | export interface WorkspaceClientCapabilities {
|
296 | /**
|
297 | * The client supports applying batch edits
|
298 | * to the workspace by supporting the request
|
299 | * 'workspace/applyEdit'
|
300 | */
|
301 | applyEdit?: boolean;
|
302 | /**
|
303 | * Capabilities specific to `WorkspaceEdit`s.
|
304 | */
|
305 | workspaceEdit?: WorkspaceEditClientCapabilities;
|
306 | /**
|
307 | * Capabilities specific to the `workspace/didChangeConfiguration` notification.
|
308 | */
|
309 | didChangeConfiguration?: DidChangeConfigurationClientCapabilities;
|
310 | /**
|
311 | * Capabilities specific to the `workspace/didChangeWatchedFiles` notification.
|
312 | */
|
313 | didChangeWatchedFiles?: DidChangeWatchedFilesClientCapabilities;
|
314 | /**
|
315 | * Capabilities specific to the `workspace/symbol` request.
|
316 | */
|
317 | symbol?: WorkspaceSymbolClientCapabilities;
|
318 | /**
|
319 | * Capabilities specific to the `workspace/executeCommand` request.
|
320 | */
|
321 | executeCommand?: ExecuteCommandClientCapabilities;
|
322 | /**
|
323 | * The client has support for workspace folders.
|
324 | *
|
325 | * @since 3.6.0
|
326 | */
|
327 | workspaceFolders?: boolean;
|
328 | /**
|
329 | * The client supports `workspace/configuration` requests.
|
330 | *
|
331 | * @since 3.6.0
|
332 | */
|
333 | configuration?: boolean;
|
334 | /**
|
335 | * Capabilities specific to the semantic token requests scoped to the
|
336 | * workspace.
|
337 | *
|
338 | * @since 3.16.0.
|
339 | */
|
340 | semanticTokens?: SemanticTokensWorkspaceClientCapabilities;
|
341 | /**
|
342 | * Capabilities specific to the code lens requests scoped to the
|
343 | * workspace.
|
344 | *
|
345 | * @since 3.16.0.
|
346 | */
|
347 | codeLens?: CodeLensWorkspaceClientCapabilities;
|
348 | /**
|
349 | * The client has support for file notifications/requests for user operations on files.
|
350 | *
|
351 | * Since 3.16.0
|
352 | */
|
353 | fileOperations?: FileOperationClientCapabilities;
|
354 | /**
|
355 | * Capabilities specific to the inline values requests scoped to the
|
356 | * workspace.
|
357 | *
|
358 | * @since 3.17.0.
|
359 | */
|
360 | inlineValue?: InlineValueWorkspaceClientCapabilities;
|
361 | /**
|
362 | * Capabilities specific to the inlay hint requests scoped to the
|
363 | * workspace.
|
364 | *
|
365 | * @since 3.17.0.
|
366 | */
|
367 | inlayHint?: InlayHintWorkspaceClientCapabilities;
|
368 | /**
|
369 | * Capabilities specific to the diagnostic requests scoped to the
|
370 | * workspace.
|
371 | *
|
372 | * @since 3.17.0.
|
373 | */
|
374 | diagnostics?: DiagnosticWorkspaceClientCapabilities;
|
375 | /**
|
376 | * Capabilities specific to the folding range requests scoped to the workspace.
|
377 | *
|
378 | * @since 3.18.0
|
379 | * @proposed
|
380 | */
|
381 | foldingRange?: FoldingRangeWorkspaceClientCapabilities;
|
382 | }
|
383 | /**
|
384 | * Text document specific client capabilities.
|
385 | */
|
386 | export interface TextDocumentClientCapabilities {
|
387 | /**
|
388 | * Defines which synchronization capabilities the client supports.
|
389 | */
|
390 | synchronization?: TextDocumentSyncClientCapabilities;
|
391 | /**
|
392 | * Capabilities specific to the `textDocument/completion` request.
|
393 | */
|
394 | completion?: CompletionClientCapabilities;
|
395 | /**
|
396 | * Capabilities specific to the `textDocument/hover` request.
|
397 | */
|
398 | hover?: HoverClientCapabilities;
|
399 | /**
|
400 | * Capabilities specific to the `textDocument/signatureHelp` request.
|
401 | */
|
402 | signatureHelp?: SignatureHelpClientCapabilities;
|
403 | /**
|
404 | * Capabilities specific to the `textDocument/declaration` request.
|
405 | *
|
406 | * @since 3.14.0
|
407 | */
|
408 | declaration?: DeclarationClientCapabilities;
|
409 | /**
|
410 | * Capabilities specific to the `textDocument/definition` request.
|
411 | */
|
412 | definition?: DefinitionClientCapabilities;
|
413 | /**
|
414 | * Capabilities specific to the `textDocument/typeDefinition` request.
|
415 | *
|
416 | * @since 3.6.0
|
417 | */
|
418 | typeDefinition?: TypeDefinitionClientCapabilities;
|
419 | /**
|
420 | * Capabilities specific to the `textDocument/implementation` request.
|
421 | *
|
422 | * @since 3.6.0
|
423 | */
|
424 | implementation?: ImplementationClientCapabilities;
|
425 | /**
|
426 | * Capabilities specific to the `textDocument/references` request.
|
427 | */
|
428 | references?: ReferenceClientCapabilities;
|
429 | /**
|
430 | * Capabilities specific to the `textDocument/documentHighlight` request.
|
431 | */
|
432 | documentHighlight?: DocumentHighlightClientCapabilities;
|
433 | /**
|
434 | * Capabilities specific to the `textDocument/documentSymbol` request.
|
435 | */
|
436 | documentSymbol?: DocumentSymbolClientCapabilities;
|
437 | /**
|
438 | * Capabilities specific to the `textDocument/codeAction` request.
|
439 | */
|
440 | codeAction?: CodeActionClientCapabilities;
|
441 | /**
|
442 | * Capabilities specific to the `textDocument/codeLens` request.
|
443 | */
|
444 | codeLens?: CodeLensClientCapabilities;
|
445 | /**
|
446 | * Capabilities specific to the `textDocument/documentLink` request.
|
447 | */
|
448 | documentLink?: DocumentLinkClientCapabilities;
|
449 | /**
|
450 | * Capabilities specific to the `textDocument/documentColor` and the
|
451 | * `textDocument/colorPresentation` request.
|
452 | *
|
453 | * @since 3.6.0
|
454 | */
|
455 | colorProvider?: DocumentColorClientCapabilities;
|
456 | /**
|
457 | * Capabilities specific to the `textDocument/formatting` request.
|
458 | */
|
459 | formatting?: DocumentFormattingClientCapabilities;
|
460 | /**
|
461 | * Capabilities specific to the `textDocument/rangeFormatting` request.
|
462 | */
|
463 | rangeFormatting?: DocumentRangeFormattingClientCapabilities;
|
464 | /**
|
465 | * Capabilities specific to the `textDocument/onTypeFormatting` request.
|
466 | */
|
467 | onTypeFormatting?: DocumentOnTypeFormattingClientCapabilities;
|
468 | /**
|
469 | * Capabilities specific to the `textDocument/rename` request.
|
470 | */
|
471 | rename?: RenameClientCapabilities;
|
472 | /**
|
473 | * Capabilities specific to the `textDocument/foldingRange` request.
|
474 | *
|
475 | * @since 3.10.0
|
476 | */
|
477 | foldingRange?: FoldingRangeClientCapabilities;
|
478 | /**
|
479 | * Capabilities specific to the `textDocument/selectionRange` request.
|
480 | *
|
481 | * @since 3.15.0
|
482 | */
|
483 | selectionRange?: SelectionRangeClientCapabilities;
|
484 | /**
|
485 | * Capabilities specific to the `textDocument/publishDiagnostics` notification.
|
486 | */
|
487 | publishDiagnostics?: PublishDiagnosticsClientCapabilities;
|
488 | /**
|
489 | * Capabilities specific to the various call hierarchy requests.
|
490 | *
|
491 | * @since 3.16.0
|
492 | */
|
493 | callHierarchy?: CallHierarchyClientCapabilities;
|
494 | /**
|
495 | * Capabilities specific to the various semantic token request.
|
496 | *
|
497 | * @since 3.16.0
|
498 | */
|
499 | semanticTokens?: SemanticTokensClientCapabilities;
|
500 | /**
|
501 | * Capabilities specific to the `textDocument/linkedEditingRange` request.
|
502 | *
|
503 | * @since 3.16.0
|
504 | */
|
505 | linkedEditingRange?: LinkedEditingRangeClientCapabilities;
|
506 | /**
|
507 | * Client capabilities specific to the `textDocument/moniker` request.
|
508 | *
|
509 | * @since 3.16.0
|
510 | */
|
511 | moniker?: MonikerClientCapabilities;
|
512 | /**
|
513 | * Capabilities specific to the various type hierarchy requests.
|
514 | *
|
515 | * @since 3.17.0
|
516 | */
|
517 | typeHierarchy?: TypeHierarchyClientCapabilities;
|
518 | /**
|
519 | * Capabilities specific to the `textDocument/inlineValue` request.
|
520 | *
|
521 | * @since 3.17.0
|
522 | */
|
523 | inlineValue?: InlineValueClientCapabilities;
|
524 | /**
|
525 | * Capabilities specific to the `textDocument/inlayHint` request.
|
526 | *
|
527 | * @since 3.17.0
|
528 | */
|
529 | inlayHint?: InlayHintClientCapabilities;
|
530 | /**
|
531 | * Capabilities specific to the diagnostic pull model.
|
532 | *
|
533 | * @since 3.17.0
|
534 | */
|
535 | diagnostic?: DiagnosticClientCapabilities;
|
536 | /**
|
537 | * Client capabilities specific to inline completions.
|
538 | *
|
539 | * @since 3.18.0
|
540 | * @proposed
|
541 | */
|
542 | inlineCompletion?: InlineCompletionClientCapabilities;
|
543 | }
|
544 | export interface WindowClientCapabilities {
|
545 | /**
|
546 | * It indicates whether the client supports server initiated
|
547 | * progress using the `window/workDoneProgress/create` request.
|
548 | *
|
549 | * The capability also controls Whether client supports handling
|
550 | * of progress notifications. If set servers are allowed to report a
|
551 | * `workDoneProgress` property in the request specific server
|
552 | * capabilities.
|
553 | *
|
554 | * @since 3.15.0
|
555 | */
|
556 | workDoneProgress?: boolean;
|
557 | /**
|
558 | * Capabilities specific to the showMessage request.
|
559 | *
|
560 | * @since 3.16.0
|
561 | */
|
562 | showMessage?: ShowMessageRequestClientCapabilities;
|
563 | /**
|
564 | * Capabilities specific to the showDocument request.
|
565 | *
|
566 | * @since 3.16.0
|
567 | */
|
568 | showDocument?: ShowDocumentClientCapabilities;
|
569 | }
|
570 | /**
|
571 | * Client capabilities specific to regular expressions.
|
572 | *
|
573 | * @since 3.16.0
|
574 | */
|
575 | export interface RegularExpressionsClientCapabilities {
|
576 | /**
|
577 | * The engine's name.
|
578 | */
|
579 | engine: string;
|
580 | /**
|
581 | * The engine's version.
|
582 | */
|
583 | version?: string;
|
584 | }
|
585 | /**
|
586 | * Client capabilities specific to the used markdown parser.
|
587 | *
|
588 | * @since 3.16.0
|
589 | */
|
590 | export interface MarkdownClientCapabilities {
|
591 | /**
|
592 | * The name of the parser.
|
593 | */
|
594 | parser: string;
|
595 | /**
|
596 | * The version of the parser.
|
597 | */
|
598 | version?: string;
|
599 | /**
|
600 | * A list of HTML tags that the client allows / supports in
|
601 | * Markdown.
|
602 | *
|
603 | * @since 3.17.0
|
604 | */
|
605 | allowedTags?: string[];
|
606 | }
|
607 | /**
|
608 | * A set of predefined position encoding kinds.
|
609 | *
|
610 | * @since 3.17.0
|
611 | */
|
612 | export declare namespace PositionEncodingKind {
|
613 | /**
|
614 | * Character offsets count UTF-8 code units (e.g. bytes).
|
615 | */
|
616 | const UTF8: PositionEncodingKind;
|
617 | /**
|
618 | * Character offsets count UTF-16 code units.
|
619 | *
|
620 | * This is the default and must always be supported
|
621 | * by servers
|
622 | */
|
623 | const UTF16: PositionEncodingKind;
|
624 | /**
|
625 | * Character offsets count UTF-32 code units.
|
626 | *
|
627 | * Implementation note: these are the same as Unicode codepoints,
|
628 | * so this `PositionEncodingKind` may also be used for an
|
629 | * encoding-agnostic representation of character offsets.
|
630 | */
|
631 | const UTF32: PositionEncodingKind;
|
632 | }
|
633 | /**
|
634 | * A type indicating how positions are encoded,
|
635 | * specifically what column offsets mean.
|
636 | *
|
637 | * @since 3.17.0
|
638 | */
|
639 | export type PositionEncodingKind = string;
|
640 | /**
|
641 | * General client capabilities.
|
642 | *
|
643 | * @since 3.16.0
|
644 | */
|
645 | export interface GeneralClientCapabilities {
|
646 | /**
|
647 | * Client capability that signals how the client
|
648 | * handles stale requests (e.g. a request
|
649 | * for which the client will not process the response
|
650 | * anymore since the information is outdated).
|
651 | *
|
652 | * @since 3.17.0
|
653 | */
|
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 | };
|
666 | /**
|
667 | * Client capabilities specific to regular expressions.
|
668 | *
|
669 | * @since 3.16.0
|
670 | */
|
671 | regularExpressions?: RegularExpressionsClientCapabilities;
|
672 | /**
|
673 | * Client capabilities specific to the client's markdown parser.
|
674 | *
|
675 | * @since 3.16.0
|
676 | */
|
677 | markdown?: MarkdownClientCapabilities;
|
678 | /**
|
679 | * The position encodings supported by the client. Client and server
|
680 | * have to agree on the same position encoding to ensure that offsets
|
681 | * (e.g. character position in a line) are interpreted the same on both
|
682 | * sides.
|
683 | *
|
684 | * To keep the protocol backwards compatible the following applies: if
|
685 | * the value 'utf-16' is missing from the array of position encodings
|
686 | * servers can assume that the client supports UTF-16. UTF-16 is
|
687 | * therefore a mandatory encoding.
|
688 | *
|
689 | * If omitted it defaults to ['utf-16'].
|
690 | *
|
691 | * Implementation considerations: since the conversion from one encoding
|
692 | * into another requires the content of the file / line the conversion
|
693 | * is best done where the file is read which is usually on the server
|
694 | * side.
|
695 | *
|
696 | * @since 3.17.0
|
697 | */
|
698 | positionEncodings?: PositionEncodingKind[];
|
699 | }
|
700 | /**
|
701 | * Capabilities specific to the notebook document support.
|
702 | *
|
703 | * @since 3.17.0
|
704 | */
|
705 | export interface NotebookDocumentClientCapabilities {
|
706 | /**
|
707 | * Capabilities specific to notebook document synchronization
|
708 | *
|
709 | * @since 3.17.0
|
710 | */
|
711 | synchronization: NotebookDocumentSyncClientCapabilities;
|
712 | }
|
713 | /**
|
714 | * Defines the capabilities provided by the client.
|
715 | */
|
716 | export interface ClientCapabilities {
|
717 | /**
|
718 | * Workspace specific client capabilities.
|
719 | */
|
720 | workspace?: WorkspaceClientCapabilities;
|
721 | /**
|
722 | * Text document specific client capabilities.
|
723 | */
|
724 | textDocument?: TextDocumentClientCapabilities;
|
725 | /**
|
726 | * Capabilities specific to the notebook document support.
|
727 | *
|
728 | * @since 3.17.0
|
729 | */
|
730 | notebookDocument?: NotebookDocumentClientCapabilities;
|
731 | /**
|
732 | * Window specific client capabilities.
|
733 | */
|
734 | window?: WindowClientCapabilities;
|
735 | /**
|
736 | * General client capabilities.
|
737 | *
|
738 | * @since 3.16.0
|
739 | */
|
740 | general?: GeneralClientCapabilities;
|
741 | /**
|
742 | * Experimental client capabilities.
|
743 | */
|
744 | experimental?: LSPAny;
|
745 | }
|
746 | /**
|
747 | * Static registration options to be returned in the initialize
|
748 | * request.
|
749 | */
|
750 | export interface StaticRegistrationOptions {
|
751 | /**
|
752 | * The id used to register the request. The id can be used to deregister
|
753 | * the request again. See also Registration#id.
|
754 | */
|
755 | id?: string;
|
756 | }
|
757 | /**
|
758 | * The StaticRegistrationOptions namespace provides helper functions to work with
|
759 | * {@link StaticRegistrationOptions} literals.
|
760 | */
|
761 | export declare namespace StaticRegistrationOptions {
|
762 | function hasId(value: object): value is {
|
763 | id: string;
|
764 | };
|
765 | }
|
766 | /**
|
767 | * General text document registration options.
|
768 | */
|
769 | export interface TextDocumentRegistrationOptions {
|
770 | /**
|
771 | * A document selector to identify the scope of the registration. If set to null
|
772 | * the document selector provided on the client side will be used.
|
773 | */
|
774 | documentSelector: DocumentSelector | null;
|
775 | }
|
776 | /**
|
777 | * The TextDocumentRegistrationOptions namespace provides helper functions to work with
|
778 | * {@link TextDocumentRegistrationOptions} literals.
|
779 | */
|
780 | export declare namespace TextDocumentRegistrationOptions {
|
781 | function is(value: any): value is TextDocumentRegistrationOptions;
|
782 | }
|
783 | /**
|
784 | * Save options.
|
785 | */
|
786 | export interface SaveOptions {
|
787 | /**
|
788 | * The client is supposed to include the content on save.
|
789 | */
|
790 | includeText?: boolean;
|
791 | }
|
792 | export interface WorkDoneProgressOptions {
|
793 | workDoneProgress?: boolean;
|
794 | }
|
795 | /**
|
796 | * The WorkDoneProgressOptions namespace provides helper functions to work with
|
797 | * {@link WorkDoneProgressOptions} literals.
|
798 | */
|
799 | export declare namespace WorkDoneProgressOptions {
|
800 | function is(value: any): value is WorkDoneProgressOptions;
|
801 | function hasWorkDoneProgress(value: any): value is {
|
802 | workDoneProgress: boolean;
|
803 | };
|
804 | }
|
805 | /**
|
806 | * Defines the capabilities provided by a language
|
807 | * server.
|
808 | */
|
809 | export interface ServerCapabilities<T = LSPAny> {
|
810 | /**
|
811 | * The position encoding the server picked from the encodings offered
|
812 | * by the client via the client capability `general.positionEncodings`.
|
813 | *
|
814 | * If the client didn't provide any position encodings the only valid
|
815 | * value that a server can return is 'utf-16'.
|
816 | *
|
817 | * If omitted it defaults to 'utf-16'.
|
818 | *
|
819 | * @since 3.17.0
|
820 | */
|
821 | positionEncoding?: PositionEncodingKind;
|
822 | /**
|
823 | * Defines how text documents are synced. Is either a detailed structure
|
824 | * defining each notification or for backwards compatibility the
|
825 | * TextDocumentSyncKind number.
|
826 | */
|
827 | textDocumentSync?: TextDocumentSyncOptions | TextDocumentSyncKind;
|
828 | /**
|
829 | * Defines how notebook documents are synced.
|
830 | *
|
831 | * @since 3.17.0
|
832 | */
|
833 | notebookDocumentSync?: NotebookDocumentSyncOptions | NotebookDocumentSyncRegistrationOptions;
|
834 | /**
|
835 | * The server provides completion support.
|
836 | */
|
837 | completionProvider?: CompletionOptions;
|
838 | /**
|
839 | * The server provides hover support.
|
840 | */
|
841 | hoverProvider?: boolean | HoverOptions;
|
842 | /**
|
843 | * The server provides signature help support.
|
844 | */
|
845 | signatureHelpProvider?: SignatureHelpOptions;
|
846 | /**
|
847 | * The server provides Goto Declaration support.
|
848 | */
|
849 | declarationProvider?: boolean | DeclarationOptions | DeclarationRegistrationOptions;
|
850 | /**
|
851 | * The server provides goto definition support.
|
852 | */
|
853 | definitionProvider?: boolean | DefinitionOptions;
|
854 | /**
|
855 | * The server provides Goto Type Definition support.
|
856 | */
|
857 | typeDefinitionProvider?: boolean | TypeDefinitionOptions | TypeDefinitionRegistrationOptions;
|
858 | /**
|
859 | * The server provides Goto Implementation support.
|
860 | */
|
861 | implementationProvider?: boolean | ImplementationOptions | ImplementationRegistrationOptions;
|
862 | /**
|
863 | * The server provides find references support.
|
864 | */
|
865 | referencesProvider?: boolean | ReferenceOptions;
|
866 | /**
|
867 | * The server provides document highlight support.
|
868 | */
|
869 | documentHighlightProvider?: boolean | DocumentHighlightOptions;
|
870 | /**
|
871 | * The server provides document symbol support.
|
872 | */
|
873 | documentSymbolProvider?: boolean | DocumentSymbolOptions;
|
874 | /**
|
875 | * The server provides code actions. CodeActionOptions may only be
|
876 | * specified if the client states that it supports
|
877 | * `codeActionLiteralSupport` in its initial `initialize` request.
|
878 | */
|
879 | codeActionProvider?: boolean | CodeActionOptions;
|
880 | /**
|
881 | * The server provides code lens.
|
882 | */
|
883 | codeLensProvider?: CodeLensOptions;
|
884 | /**
|
885 | * The server provides document link support.
|
886 | */
|
887 | documentLinkProvider?: DocumentLinkOptions;
|
888 | /**
|
889 | * The server provides color provider support.
|
890 | */
|
891 | colorProvider?: boolean | DocumentColorOptions | DocumentColorRegistrationOptions;
|
892 | /**
|
893 | * The server provides workspace symbol support.
|
894 | */
|
895 | workspaceSymbolProvider?: boolean | WorkspaceSymbolOptions;
|
896 | /**
|
897 | * The server provides document formatting.
|
898 | */
|
899 | documentFormattingProvider?: boolean | DocumentFormattingOptions;
|
900 | /**
|
901 | * The server provides document range formatting.
|
902 | */
|
903 | documentRangeFormattingProvider?: boolean | DocumentRangeFormattingOptions;
|
904 | /**
|
905 | * The server provides document formatting on typing.
|
906 | */
|
907 | documentOnTypeFormattingProvider?: DocumentOnTypeFormattingOptions;
|
908 | /**
|
909 | * The server provides rename support. RenameOptions may only be
|
910 | * specified if the client states that it supports
|
911 | * `prepareSupport` in its initial `initialize` request.
|
912 | */
|
913 | renameProvider?: boolean | RenameOptions;
|
914 | /**
|
915 | * The server provides folding provider support.
|
916 | */
|
917 | foldingRangeProvider?: boolean | FoldingRangeOptions | FoldingRangeRegistrationOptions;
|
918 | /**
|
919 | * The server provides selection range support.
|
920 | */
|
921 | selectionRangeProvider?: boolean | SelectionRangeOptions | SelectionRangeRegistrationOptions;
|
922 | /**
|
923 | * The server provides execute command support.
|
924 | */
|
925 | executeCommandProvider?: ExecuteCommandOptions;
|
926 | /**
|
927 | * The server provides call hierarchy support.
|
928 | *
|
929 | * @since 3.16.0
|
930 | */
|
931 | callHierarchyProvider?: boolean | CallHierarchyOptions | CallHierarchyRegistrationOptions;
|
932 | /**
|
933 | * The server provides linked editing range support.
|
934 | *
|
935 | * @since 3.16.0
|
936 | */
|
937 | linkedEditingRangeProvider?: boolean | LinkedEditingRangeOptions | LinkedEditingRangeRegistrationOptions;
|
938 | /**
|
939 | * The server provides semantic tokens support.
|
940 | *
|
941 | * @since 3.16.0
|
942 | */
|
943 | semanticTokensProvider?: SemanticTokensOptions | SemanticTokensRegistrationOptions;
|
944 | /**
|
945 | * The server provides moniker support.
|
946 | *
|
947 | * @since 3.16.0
|
948 | */
|
949 | monikerProvider?: boolean | MonikerOptions | MonikerRegistrationOptions;
|
950 | /**
|
951 | * The server provides type hierarchy support.
|
952 | *
|
953 | * @since 3.17.0
|
954 | */
|
955 | typeHierarchyProvider?: boolean | TypeHierarchyOptions | TypeHierarchyRegistrationOptions;
|
956 | /**
|
957 | * The server provides inline values.
|
958 | *
|
959 | * @since 3.17.0
|
960 | */
|
961 | inlineValueProvider?: boolean | InlineValueOptions | InlineValueRegistrationOptions;
|
962 | /**
|
963 | * The server provides inlay hints.
|
964 | *
|
965 | * @since 3.17.0
|
966 | */
|
967 | inlayHintProvider?: boolean | InlayHintOptions | InlayHintRegistrationOptions;
|
968 | /**
|
969 | * The server has support for pull model diagnostics.
|
970 | *
|
971 | * @since 3.17.0
|
972 | */
|
973 | diagnosticProvider?: DiagnosticOptions | DiagnosticRegistrationOptions;
|
974 | /**
|
975 | * Inline completion options used during static registration.
|
976 | *
|
977 | * @since 3.18.0
|
978 | * @proposed
|
979 | */
|
980 | inlineCompletionProvider?: boolean | InlineCompletionOptions;
|
981 | /**
|
982 | * Workspace specific server capabilities.
|
983 | */
|
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 | };
|
998 | /**
|
999 | * Experimental server capabilities.
|
1000 | */
|
1001 | experimental?: T;
|
1002 | }
|
1003 | /**
|
1004 | * The initialize request is sent from the client to the server.
|
1005 | * It is sent once as the request after starting up the server.
|
1006 | * The requests parameter is of type {@link InitializeParams}
|
1007 | * the response if of type {@link InitializeResult} of a Thenable that
|
1008 | * resolves to such.
|
1009 | */
|
1010 | export declare namespace InitializeRequest {
|
1011 | const method: 'initialize';
|
1012 | const messageDirection: MessageDirection;
|
1013 | const type: ProtocolRequestType<InitializeParams, InitializeResult<any>, never, InitializeError, void>;
|
1014 | }
|
1015 | /**
|
1016 | * The initialize parameters
|
1017 | */
|
1018 | export interface _InitializeParams extends WorkDoneProgressParams {
|
1019 | /**
|
1020 | * The process Id of the parent process that started
|
1021 | * the server.
|
1022 | *
|
1023 | * Is `null` if the process has not been started by another process.
|
1024 | * If the parent process is not alive then the server should exit.
|
1025 | */
|
1026 | processId: integer | null;
|
1027 | /**
|
1028 | * Information about the client
|
1029 | *
|
1030 | * @since 3.15.0
|
1031 | */
|
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 | };
|
1042 | /**
|
1043 | * The locale the client is currently showing the user interface
|
1044 | * in. This must not necessarily be the locale of the operating
|
1045 | * system.
|
1046 | *
|
1047 | * Uses IETF language tags as the value's syntax
|
1048 | * (See https://en.wikipedia.org/wiki/IETF_language_tag)
|
1049 | *
|
1050 | * @since 3.16.0
|
1051 | */
|
1052 | locale?: string;
|
1053 | /**
|
1054 | * The rootPath of the workspace. Is null
|
1055 | * if no folder is open.
|
1056 | *
|
1057 | * @deprecated in favour of rootUri.
|
1058 | */
|
1059 | rootPath?: string | null;
|
1060 | /**
|
1061 | * The rootUri of the workspace. Is null if no
|
1062 | * folder is open. If both `rootPath` and `rootUri` are set
|
1063 | * `rootUri` wins.
|
1064 | *
|
1065 | * @deprecated in favour of workspaceFolders.
|
1066 | */
|
1067 | rootUri: DocumentUri | null;
|
1068 | /**
|
1069 | * The capabilities provided by the client (editor or tool)
|
1070 | */
|
1071 | capabilities: ClientCapabilities;
|
1072 | /**
|
1073 | * User provided initialization options.
|
1074 | */
|
1075 | initializationOptions?: LSPAny;
|
1076 | /**
|
1077 | * The initial trace setting. If omitted trace is disabled ('off').
|
1078 | */
|
1079 | trace?: TraceValues;
|
1080 | }
|
1081 | export type InitializeParams = _InitializeParams & WorkspaceFoldersInitializeParams;
|
1082 | /**
|
1083 | * The result returned from an initialize request.
|
1084 | */
|
1085 | export interface InitializeResult<T = any> {
|
1086 | /**
|
1087 | * The capabilities the language server provides.
|
1088 | */
|
1089 | capabilities: ServerCapabilities<T>;
|
1090 | /**
|
1091 | * Information about the server.
|
1092 | *
|
1093 | * @since 3.15.0
|
1094 | */
|
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 | };
|
1105 | /**
|
1106 | * Custom initialization results.
|
1107 | */
|
1108 | [custom: string]: LSPAny | ServerCapabilities<T> | undefined; /** undefined is needed since serverInfo is optional */
|
1109 | }
|
1110 | /**
|
1111 | * Known error codes for an `InitializeErrorCodes`;
|
1112 | */
|
1113 | export declare namespace InitializeErrorCodes {
|
1114 | /**
|
1115 | * If the protocol version provided by the client can't be handled by the server.
|
1116 | *
|
1117 | * @deprecated This initialize error got replaced by client capabilities. There is
|
1118 | * no version handshake in version 3.0x
|
1119 | */
|
1120 | const unknownProtocolVersion: 1;
|
1121 | }
|
1122 | export type InitializeErrorCodes = 1;
|
1123 | /**
|
1124 | * The data type of the ResponseError if the
|
1125 | * initialize request fails.
|
1126 | */
|
1127 | export interface InitializeError {
|
1128 | /**
|
1129 | * Indicates whether the client execute the following retry logic:
|
1130 | * (1) show the message provided by the ResponseError to the user
|
1131 | * (2) user selects retry or cancel
|
1132 | * (3) if user selected retry the initialize method is sent again.
|
1133 | */
|
1134 | retry: boolean;
|
1135 | }
|
1136 | export interface InitializedParams {
|
1137 | }
|
1138 | /**
|
1139 | * The initialized notification is sent from the client to the
|
1140 | * server after the client is fully initialized and the server
|
1141 | * is allowed to send requests from the server to the client.
|
1142 | */
|
1143 | export declare namespace InitializedNotification {
|
1144 | const method: 'initialized';
|
1145 | const messageDirection: MessageDirection;
|
1146 | const type: ProtocolNotificationType<InitializedParams, void>;
|
1147 | }
|
1148 | /**
|
1149 | * A shutdown request is sent from the client to the server.
|
1150 | * It is sent once when the client decides to shutdown the
|
1151 | * server. The only notification that is sent after a shutdown request
|
1152 | * is the exit event.
|
1153 | */
|
1154 | export declare namespace ShutdownRequest {
|
1155 | const method: 'shutdown';
|
1156 | const messageDirection: MessageDirection;
|
1157 | const type: ProtocolRequestType0<void, never, void, void>;
|
1158 | }
|
1159 | /**
|
1160 | * The exit event is sent from the client to the server to
|
1161 | * ask the server to exit its process.
|
1162 | */
|
1163 | export declare namespace ExitNotification {
|
1164 | const method: 'exit';
|
1165 | const messageDirection: MessageDirection;
|
1166 | const type: ProtocolNotificationType0<void>;
|
1167 | }
|
1168 | export interface DidChangeConfigurationClientCapabilities {
|
1169 | /**
|
1170 | * Did change configuration notification supports dynamic registration.
|
1171 | */
|
1172 | dynamicRegistration?: boolean;
|
1173 | }
|
1174 | /**
|
1175 | * The configuration change notification is sent from the client to the server
|
1176 | * when the client's configuration has changed. The notification contains
|
1177 | * the changed configuration as defined by the language client.
|
1178 | */
|
1179 | export declare namespace DidChangeConfigurationNotification {
|
1180 | const method: 'workspace/didChangeConfiguration';
|
1181 | const messageDirection: MessageDirection;
|
1182 | const type: ProtocolNotificationType<DidChangeConfigurationParams, DidChangeConfigurationRegistrationOptions>;
|
1183 | }
|
1184 | export interface DidChangeConfigurationRegistrationOptions {
|
1185 | section?: string | string[];
|
1186 | }
|
1187 | /**
|
1188 | * The parameters of a change configuration notification.
|
1189 | */
|
1190 | export interface DidChangeConfigurationParams {
|
1191 | /**
|
1192 | * The actual changed settings
|
1193 | */
|
1194 | settings: LSPAny;
|
1195 | }
|
1196 | /**
|
1197 | * The message type
|
1198 | */
|
1199 | export declare namespace MessageType {
|
1200 | /**
|
1201 | * An error message.
|
1202 | */
|
1203 | const Error = 1;
|
1204 | /**
|
1205 | * A warning message.
|
1206 | */
|
1207 | const Warning = 2;
|
1208 | /**
|
1209 | * An information message.
|
1210 | */
|
1211 | const Info = 3;
|
1212 | /**
|
1213 | * A log message.
|
1214 | */
|
1215 | const Log = 4;
|
1216 | /**
|
1217 | * A debug message.
|
1218 | *
|
1219 | * @since 3.18.0
|
1220 | */
|
1221 | const Debug = 5;
|
1222 | }
|
1223 | export type MessageType = 1 | 2 | 3 | 4 | 5;
|
1224 | /**
|
1225 | * The parameters of a notification message.
|
1226 | */
|
1227 | export interface ShowMessageParams {
|
1228 | /**
|
1229 | * The message type. See {@link MessageType}
|
1230 | */
|
1231 | type: MessageType;
|
1232 | /**
|
1233 | * The actual message.
|
1234 | */
|
1235 | message: string;
|
1236 | }
|
1237 | /**
|
1238 | * The show message notification is sent from a server to a client to ask
|
1239 | * the client to display a particular message in the user interface.
|
1240 | */
|
1241 | export declare namespace ShowMessageNotification {
|
1242 | const method: 'window/showMessage';
|
1243 | const messageDirection: MessageDirection;
|
1244 | const type: ProtocolNotificationType<ShowMessageParams, void>;
|
1245 | }
|
1246 | /**
|
1247 | * Show message request client capabilities
|
1248 | */
|
1249 | export interface ShowMessageRequestClientCapabilities {
|
1250 | /**
|
1251 | * Capabilities specific to the `MessageActionItem` type.
|
1252 | */
|
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 | };
|
1261 | }
|
1262 | export interface MessageActionItem {
|
1263 | /**
|
1264 | * A short title like 'Retry', 'Open Log' etc.
|
1265 | */
|
1266 | title: string;
|
1267 | /**
|
1268 | * Additional attributes that the client preserves and
|
1269 | * sends back to the server. This depends on the client
|
1270 | * capability window.messageActionItem.additionalPropertiesSupport
|
1271 | */
|
1272 | [key: string]: string | boolean | integer | object;
|
1273 | }
|
1274 | export interface ShowMessageRequestParams {
|
1275 | /**
|
1276 | * The message type. See {@link MessageType}
|
1277 | */
|
1278 | type: MessageType;
|
1279 | /**
|
1280 | * The actual message.
|
1281 | */
|
1282 | message: string;
|
1283 | /**
|
1284 | * The message action items to present.
|
1285 | */
|
1286 | actions?: MessageActionItem[];
|
1287 | }
|
1288 | /**
|
1289 | * The show message request is sent from the server to the client to show a message
|
1290 | * and a set of options actions to the user.
|
1291 | */
|
1292 | export declare namespace ShowMessageRequest {
|
1293 | const method: 'window/showMessageRequest';
|
1294 | const messageDirection: MessageDirection;
|
1295 | const type: ProtocolRequestType<ShowMessageRequestParams, MessageActionItem | null, never, void, void>;
|
1296 | }
|
1297 | /**
|
1298 | * The log message notification is sent from the server to the client to ask
|
1299 | * the client to log a particular message.
|
1300 | */
|
1301 | export declare namespace LogMessageNotification {
|
1302 | const method: 'window/logMessage';
|
1303 | const messageDirection: MessageDirection;
|
1304 | const type: ProtocolNotificationType<LogMessageParams, void>;
|
1305 | }
|
1306 | /**
|
1307 | * The log message parameters.
|
1308 | */
|
1309 | export interface LogMessageParams {
|
1310 | /**
|
1311 | * The message type. See {@link MessageType}
|
1312 | */
|
1313 | type: MessageType;
|
1314 | /**
|
1315 | * The actual message.
|
1316 | */
|
1317 | message: string;
|
1318 | }
|
1319 | /**
|
1320 | * The telemetry event notification is sent from the server to the client to ask
|
1321 | * the client to log telemetry data.
|
1322 | */
|
1323 | export declare namespace TelemetryEventNotification {
|
1324 | const method: 'telemetry/event';
|
1325 | const messageDirection: MessageDirection;
|
1326 | const type: ProtocolNotificationType<any, void>;
|
1327 | }
|
1328 | export interface TextDocumentSyncClientCapabilities {
|
1329 | /**
|
1330 | * Whether text document synchronization supports dynamic registration.
|
1331 | */
|
1332 | dynamicRegistration?: boolean;
|
1333 | /**
|
1334 | * The client supports sending will save notifications.
|
1335 | */
|
1336 | willSave?: boolean;
|
1337 | /**
|
1338 | * The client supports sending a will save request and
|
1339 | * waits for a response providing text edits which will
|
1340 | * be applied to the document before it is saved.
|
1341 | */
|
1342 | willSaveWaitUntil?: boolean;
|
1343 | /**
|
1344 | * The client supports did save notifications.
|
1345 | */
|
1346 | didSave?: boolean;
|
1347 | }
|
1348 | /**
|
1349 | * Defines how the host (editor) should sync
|
1350 | * document changes to the language server.
|
1351 | */
|
1352 | export declare namespace TextDocumentSyncKind {
|
1353 | /**
|
1354 | * Documents should not be synced at all.
|
1355 | */
|
1356 | const None = 0;
|
1357 | /**
|
1358 | * Documents are synced by always sending the full content
|
1359 | * of the document.
|
1360 | */
|
1361 | const Full = 1;
|
1362 | /**
|
1363 | * Documents are synced by sending the full content on open.
|
1364 | * After that only incremental updates to the document are
|
1365 | * send.
|
1366 | */
|
1367 | const Incremental = 2;
|
1368 | }
|
1369 | export type TextDocumentSyncKind = 0 | 1 | 2;
|
1370 | export interface TextDocumentSyncOptions {
|
1371 | /**
|
1372 | * Open and close notifications are sent to the server. If omitted open close notification should not
|
1373 | * be sent.
|
1374 | */
|
1375 | openClose?: boolean;
|
1376 | /**
|
1377 | * Change notifications are sent to the server. See TextDocumentSyncKind.None, TextDocumentSyncKind.Full
|
1378 | * and TextDocumentSyncKind.Incremental. If omitted it defaults to TextDocumentSyncKind.None.
|
1379 | */
|
1380 | change?: TextDocumentSyncKind;
|
1381 | /**
|
1382 | * If present will save notifications are sent to the server. If omitted the notification should not be
|
1383 | * sent.
|
1384 | */
|
1385 | willSave?: boolean;
|
1386 | /**
|
1387 | * If present will save wait until requests are sent to the server. If omitted the request should not be
|
1388 | * sent.
|
1389 | */
|
1390 | willSaveWaitUntil?: boolean;
|
1391 | /**
|
1392 | * If present save notifications are sent to the server. If omitted the notification should not be
|
1393 | * sent.
|
1394 | */
|
1395 | save?: boolean | SaveOptions;
|
1396 | }
|
1397 | /**
|
1398 | * The parameters sent in an open text document notification
|
1399 | */
|
1400 | export interface DidOpenTextDocumentParams {
|
1401 | /**
|
1402 | * The document that was opened.
|
1403 | */
|
1404 | textDocument: TextDocumentItem;
|
1405 | }
|
1406 | /**
|
1407 | * The document open notification is sent from the client to the server to signal
|
1408 | * newly opened text documents. The document's truth is now managed by the client
|
1409 | * and the server must not try to read the document's truth using the document's
|
1410 | * uri. Open in this sense means it is managed by the client. It doesn't necessarily
|
1411 | * mean that its content is presented in an editor. An open notification must not
|
1412 | * be sent more than once without a corresponding close notification send before.
|
1413 | * This means open and close notification must be balanced and the max open count
|
1414 | * is one.
|
1415 | */
|
1416 | export declare namespace DidOpenTextDocumentNotification {
|
1417 | const method: 'textDocument/didOpen';
|
1418 | const messageDirection: MessageDirection;
|
1419 | const type: ProtocolNotificationType<DidOpenTextDocumentParams, TextDocumentRegistrationOptions>;
|
1420 | }
|
1421 | /**
|
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.
|
1424 | */
|
1425 | export type TextDocumentContentChangeEvent = {
|
1426 | /**
|
1427 | * The range of the document that changed.
|
1428 | */
|
1429 | range: Range;
|
1430 | /**
|
1431 | * The optional length of the range that got replaced.
|
1432 | *
|
1433 | * @deprecated use range instead.
|
1434 | */
|
1435 | rangeLength?: uinteger;
|
1436 | /**
|
1437 | * The new text for the provided range.
|
1438 | */
|
1439 | text: string;
|
1440 | } | {
|
1441 | /**
|
1442 | * The new text of the whole document.
|
1443 | */
|
1444 | text: string;
|
1445 | };
|
1446 | export declare namespace TextDocumentContentChangeEvent {
|
1447 | /**
|
1448 | * Checks whether the information describes a delta event.
|
1449 | */
|
1450 | function isIncremental(event: TextDocumentContentChangeEvent): event is {
|
1451 | range: Range;
|
1452 | rangeLength?: uinteger;
|
1453 | text: string;
|
1454 | };
|
1455 | /**
|
1456 | * Checks whether the information describes a full replacement event.
|
1457 | */
|
1458 | function isFull(event: TextDocumentContentChangeEvent): event is {
|
1459 | text: string;
|
1460 | };
|
1461 | }
|
1462 | /**
|
1463 | * The change text document notification's parameters.
|
1464 | */
|
1465 | export interface DidChangeTextDocumentParams {
|
1466 | /**
|
1467 | * The document that did change. The version number points
|
1468 | * to the version after all provided content changes have
|
1469 | * been applied.
|
1470 | */
|
1471 | textDocument: VersionedTextDocumentIdentifier;
|
1472 | /**
|
1473 | * The actual content changes. The content changes describe single state changes
|
1474 | * to the document. So if there are two content changes c1 (at array index 0) and
|
1475 | * c2 (at array index 1) for a document in state S then c1 moves the document from
|
1476 | * S to S' and c2 from S' to S''. So c1 is computed on the state S and c2 is computed
|
1477 | * on the state S'.
|
1478 | *
|
1479 | * To mirror the content of a document using change events use the following approach:
|
1480 | * - start with the same initial content
|
1481 | * - apply the 'textDocument/didChange' notifications in the order you receive them.
|
1482 | * - apply the `TextDocumentContentChangeEvent`s in a single notification in the order
|
1483 | * you receive them.
|
1484 | */
|
1485 | contentChanges: TextDocumentContentChangeEvent[];
|
1486 | }
|
1487 | /**
|
1488 | * Describe options to be used when registered for text document change events.
|
1489 | */
|
1490 | export interface TextDocumentChangeRegistrationOptions extends TextDocumentRegistrationOptions {
|
1491 | /**
|
1492 | * How documents are synced to the server.
|
1493 | */
|
1494 | syncKind: TextDocumentSyncKind;
|
1495 | }
|
1496 | /**
|
1497 | * The document change notification is sent from the client to the server to signal
|
1498 | * changes to a text document.
|
1499 | */
|
1500 | export declare namespace DidChangeTextDocumentNotification {
|
1501 | const method: 'textDocument/didChange';
|
1502 | const messageDirection: MessageDirection;
|
1503 | const type: ProtocolNotificationType<DidChangeTextDocumentParams, TextDocumentChangeRegistrationOptions>;
|
1504 | }
|
1505 | /**
|
1506 | * The parameters sent in a close text document notification
|
1507 | */
|
1508 | export interface DidCloseTextDocumentParams {
|
1509 | /**
|
1510 | * The document that was closed.
|
1511 | */
|
1512 | textDocument: TextDocumentIdentifier;
|
1513 | }
|
1514 | /**
|
1515 | * The document close notification is sent from the client to the server when
|
1516 | * the document got closed in the client. The document's truth now exists where
|
1517 | * the document's uri points to (e.g. if the document's uri is a file uri the
|
1518 | * truth now exists on disk). As with the open notification the close notification
|
1519 | * is about managing the document's content. Receiving a close notification
|
1520 | * doesn't mean that the document was open in an editor before. A close
|
1521 | * notification requires a previous open notification to be sent.
|
1522 | */
|
1523 | export declare namespace DidCloseTextDocumentNotification {
|
1524 | const method: 'textDocument/didClose';
|
1525 | const messageDirection: MessageDirection;
|
1526 | const type: ProtocolNotificationType<DidCloseTextDocumentParams, TextDocumentRegistrationOptions>;
|
1527 | }
|
1528 | /**
|
1529 | * The parameters sent in a save text document notification
|
1530 | */
|
1531 | export interface DidSaveTextDocumentParams {
|
1532 | /**
|
1533 | * The document that was saved.
|
1534 | */
|
1535 | textDocument: TextDocumentIdentifier;
|
1536 | /**
|
1537 | * Optional the content when saved. Depends on the includeText value
|
1538 | * when the save notification was requested.
|
1539 | */
|
1540 | text?: string;
|
1541 | }
|
1542 | /**
|
1543 | * Save registration options.
|
1544 | */
|
1545 | export interface TextDocumentSaveRegistrationOptions extends TextDocumentRegistrationOptions, SaveOptions {
|
1546 | }
|
1547 | /**
|
1548 | * The document save notification is sent from the client to the server when
|
1549 | * the document got saved in the client.
|
1550 | */
|
1551 | export declare namespace DidSaveTextDocumentNotification {
|
1552 | const method: 'textDocument/didSave';
|
1553 | const messageDirection: MessageDirection;
|
1554 | const type: ProtocolNotificationType<DidSaveTextDocumentParams, TextDocumentSaveRegistrationOptions>;
|
1555 | }
|
1556 | /**
|
1557 | * Represents reasons why a text document is saved.
|
1558 | */
|
1559 | export declare namespace TextDocumentSaveReason {
|
1560 | /**
|
1561 | * Manually triggered, e.g. by the user pressing save, by starting debugging,
|
1562 | * or by an API call.
|
1563 | */
|
1564 | const Manual: 1;
|
1565 | /**
|
1566 | * Automatic after a delay.
|
1567 | */
|
1568 | const AfterDelay: 2;
|
1569 | /**
|
1570 | * When the editor lost focus.
|
1571 | */
|
1572 | const FocusOut: 3;
|
1573 | }
|
1574 | export type TextDocumentSaveReason = 1 | 2 | 3;
|
1575 | /**
|
1576 | * The parameters sent in a will save text document notification.
|
1577 | */
|
1578 | export interface WillSaveTextDocumentParams {
|
1579 | /**
|
1580 | * The document that will be saved.
|
1581 | */
|
1582 | textDocument: TextDocumentIdentifier;
|
1583 | /**
|
1584 | * The 'TextDocumentSaveReason'.
|
1585 | */
|
1586 | reason: TextDocumentSaveReason;
|
1587 | }
|
1588 | /**
|
1589 | * A document will save notification is sent from the client to the server before
|
1590 | * the document is actually saved.
|
1591 | */
|
1592 | export declare namespace WillSaveTextDocumentNotification {
|
1593 | const method: 'textDocument/willSave';
|
1594 | const messageDirection: MessageDirection;
|
1595 | const type: ProtocolNotificationType<WillSaveTextDocumentParams, TextDocumentRegistrationOptions>;
|
1596 | }
|
1597 | /**
|
1598 | * A document will save request is sent from the client to the server before
|
1599 | * the document is actually saved. The request can return an array of TextEdits
|
1600 | * which will be applied to the text document before it is saved. Please note that
|
1601 | * clients might drop results if computing the text edits took too long or if a
|
1602 | * server constantly fails on this request. This is done to keep the save fast and
|
1603 | * reliable.
|
1604 | */
|
1605 | export declare namespace WillSaveTextDocumentWaitUntilRequest {
|
1606 | const method: 'textDocument/willSaveWaitUntil';
|
1607 | const messageDirection: MessageDirection;
|
1608 | const type: ProtocolRequestType<WillSaveTextDocumentParams, TextEdit[] | null, never, void, TextDocumentRegistrationOptions>;
|
1609 | }
|
1610 | export interface DidChangeWatchedFilesClientCapabilities {
|
1611 | /**
|
1612 | * Did change watched files notification supports dynamic registration. Please note
|
1613 | * that the current protocol doesn't support static configuration for file changes
|
1614 | * from the server side.
|
1615 | */
|
1616 | dynamicRegistration?: boolean;
|
1617 | /**
|
1618 | * Whether the client has support for {@link RelativePattern relative pattern}
|
1619 | * or not.
|
1620 | *
|
1621 | * @since 3.17.0
|
1622 | */
|
1623 | relativePatternSupport?: boolean;
|
1624 | }
|
1625 | /**
|
1626 | * The watched files notification is sent from the client to the server when
|
1627 | * the client detects changes to file watched by the language client.
|
1628 | */
|
1629 | export declare namespace DidChangeWatchedFilesNotification {
|
1630 | const method: 'workspace/didChangeWatchedFiles';
|
1631 | const messageDirection: MessageDirection;
|
1632 | const type: ProtocolNotificationType<DidChangeWatchedFilesParams, DidChangeWatchedFilesRegistrationOptions>;
|
1633 | }
|
1634 | /**
|
1635 | * The watched files change notification's parameters.
|
1636 | */
|
1637 | export interface DidChangeWatchedFilesParams {
|
1638 | /**
|
1639 | * The actual file events.
|
1640 | */
|
1641 | changes: FileEvent[];
|
1642 | }
|
1643 | /**
|
1644 | * The file event type
|
1645 | */
|
1646 | export declare namespace FileChangeType {
|
1647 | /**
|
1648 | * The file got created.
|
1649 | */
|
1650 | const Created = 1;
|
1651 | /**
|
1652 | * The file got changed.
|
1653 | */
|
1654 | const Changed = 2;
|
1655 | /**
|
1656 | * The file got deleted.
|
1657 | */
|
1658 | const Deleted = 3;
|
1659 | }
|
1660 | export type FileChangeType = 1 | 2 | 3;
|
1661 | /**
|
1662 | * An event describing a file change.
|
1663 | */
|
1664 | export interface FileEvent {
|
1665 | /**
|
1666 | * The file's uri.
|
1667 | */
|
1668 | uri: DocumentUri;
|
1669 | /**
|
1670 | * The change type.
|
1671 | */
|
1672 | type: FileChangeType;
|
1673 | }
|
1674 | /**
|
1675 | * Describe options to be used when registered for text document change events.
|
1676 | */
|
1677 | export interface DidChangeWatchedFilesRegistrationOptions {
|
1678 | /**
|
1679 | * The watchers to register.
|
1680 | */
|
1681 | watchers: FileSystemWatcher[];
|
1682 | }
|
1683 | /**
|
1684 | * The glob pattern to watch relative to the base path. Glob patterns can have the following syntax:
|
1685 | * - `*` to match one or more characters in a path segment
|
1686 | * - `?` to match on one character in a path segment
|
1687 | * - `**` to match any number of path segments, including none
|
1688 | * - `{}` to group conditions (e.g. `**/*.{ts,js}` matches all TypeScript and JavaScript files)
|
1689 | * - `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …)
|
1690 | * - `[!...]` to negate a range of characters to match in a path segment (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but not `example.0`)
|
1691 | *
|
1692 | * @since 3.17.0
|
1693 | */
|
1694 | export type Pattern = string;
|
1695 | /**
|
1696 | * A relative pattern is a helper to construct glob patterns that are matched
|
1697 | * relatively to a base URI. The common value for a `baseUri` is a workspace
|
1698 | * folder root, but it can be another absolute URI as well.
|
1699 | *
|
1700 | * @since 3.17.0
|
1701 | */
|
1702 | export interface RelativePattern {
|
1703 | /**
|
1704 | * A workspace folder or a base URI to which this pattern will be matched
|
1705 | * against relatively.
|
1706 | */
|
1707 | baseUri: WorkspaceFolder | URI;
|
1708 | /**
|
1709 | * The actual glob pattern;
|
1710 | */
|
1711 | pattern: Pattern;
|
1712 | }
|
1713 | export declare namespace RelativePattern {
|
1714 | function is(value: any): value is RelativePattern;
|
1715 | }
|
1716 | /**
|
1717 | * The glob pattern. Either a string pattern or a relative pattern.
|
1718 | *
|
1719 | * @since 3.17.0
|
1720 | */
|
1721 | export type GlobPattern = Pattern | RelativePattern;
|
1722 | export interface FileSystemWatcher {
|
1723 | /**
|
1724 | * The glob pattern to watch. See {@link GlobPattern glob pattern} for more detail.
|
1725 | *
|
1726 | * @since 3.17.0 support for relative patterns.
|
1727 | */
|
1728 | globPattern: GlobPattern;
|
1729 | /**
|
1730 | * The kind of events of interest. If omitted it defaults
|
1731 | * to WatchKind.Create | WatchKind.Change | WatchKind.Delete
|
1732 | * which is 7.
|
1733 | */
|
1734 | kind?: WatchKind;
|
1735 | }
|
1736 | export declare namespace WatchKind {
|
1737 | /**
|
1738 | * Interested in create events.
|
1739 | */
|
1740 | const Create: 1;
|
1741 | /**
|
1742 | * Interested in change events
|
1743 | */
|
1744 | const Change: 2;
|
1745 | /**
|
1746 | * Interested in delete events
|
1747 | */
|
1748 | const Delete: 4;
|
1749 | }
|
1750 | export type WatchKind = uinteger;
|
1751 | /**
|
1752 | * The publish diagnostic client capabilities.
|
1753 | */
|
1754 | export interface PublishDiagnosticsClientCapabilities {
|
1755 | /**
|
1756 | * Whether the clients accepts diagnostics with related information.
|
1757 | */
|
1758 | relatedInformation?: boolean;
|
1759 | /**
|
1760 | * Client supports the tag property to provide meta data about a diagnostic.
|
1761 | * Clients supporting tags have to handle unknown tags gracefully.
|
1762 | *
|
1763 | * @since 3.15.0
|
1764 | */
|
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;
|
1778 | /**
|
1779 | * Client supports a codeDescription property
|
1780 | *
|
1781 | * @since 3.16.0
|
1782 | */
|
1783 | codeDescriptionSupport?: boolean;
|
1784 | /**
|
1785 | * Whether code action supports the `data` property which is
|
1786 | * preserved between a `textDocument/publishDiagnostics` and
|
1787 | * `textDocument/codeAction` request.
|
1788 | *
|
1789 | * @since 3.16.0
|
1790 | */
|
1791 | dataSupport?: boolean;
|
1792 | }
|
1793 | /**
|
1794 | * The publish diagnostic notification's parameters.
|
1795 | */
|
1796 | export interface PublishDiagnosticsParams {
|
1797 | /**
|
1798 | * The URI for which diagnostic information is reported.
|
1799 | */
|
1800 | uri: DocumentUri;
|
1801 | /**
|
1802 | * Optional the version number of the document the diagnostics are published for.
|
1803 | *
|
1804 | * @since 3.15.0
|
1805 | */
|
1806 | version?: integer;
|
1807 | /**
|
1808 | * An array of diagnostic information items.
|
1809 | */
|
1810 | diagnostics: Diagnostic[];
|
1811 | }
|
1812 | /**
|
1813 | * Diagnostics notification are sent from the server to the client to signal
|
1814 | * results of validation runs.
|
1815 | */
|
1816 | export declare namespace PublishDiagnosticsNotification {
|
1817 | const method: 'textDocument/publishDiagnostics';
|
1818 | const messageDirection: MessageDirection;
|
1819 | const type: ProtocolNotificationType<PublishDiagnosticsParams, void>;
|
1820 | }
|
1821 | /**
|
1822 | * Completion client capabilities
|
1823 | */
|
1824 | export interface CompletionClientCapabilities {
|
1825 | /**
|
1826 | * Whether completion supports dynamic registration.
|
1827 | */
|
1828 | dynamicRegistration?: boolean;
|
1829 | /**
|
1830 | * The client supports the following `CompletionItem` specific
|
1831 | * capabilities.
|
1832 | */
|
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 | };
|
1925 | /**
|
1926 | * Defines how the client handles whitespace and indentation
|
1927 | * when accepting a completion item that uses multi line
|
1928 | * text in either `insertText` or `textEdit`.
|
1929 | *
|
1930 | * @since 3.17.0
|
1931 | */
|
1932 | insertTextMode?: InsertTextMode;
|
1933 | /**
|
1934 | * The client supports to send additional context information for a
|
1935 | * `textDocument/completion` request.
|
1936 | */
|
1937 | contextSupport?: boolean;
|
1938 | /**
|
1939 | * The client supports the following `CompletionList` specific
|
1940 | * capabilities.
|
1941 | *
|
1942 | * @since 3.17.0
|
1943 | */
|
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 | };
|
1957 | }
|
1958 | /**
|
1959 | * How a completion was triggered
|
1960 | */
|
1961 | export declare namespace CompletionTriggerKind {
|
1962 | /**
|
1963 | * Completion was triggered by typing an identifier (24x7 code
|
1964 | * complete), manual invocation (e.g Ctrl+Space) or via API.
|
1965 | */
|
1966 | const Invoked: 1;
|
1967 | /**
|
1968 | * Completion was triggered by a trigger character specified by
|
1969 | * the `triggerCharacters` properties of the `CompletionRegistrationOptions`.
|
1970 | */
|
1971 | const TriggerCharacter: 2;
|
1972 | /**
|
1973 | * Completion was re-triggered as current completion list is incomplete
|
1974 | */
|
1975 | const TriggerForIncompleteCompletions: 3;
|
1976 | }
|
1977 | export type CompletionTriggerKind = 1 | 2 | 3;
|
1978 | /**
|
1979 | * Contains additional information about the context in which a completion request is triggered.
|
1980 | */
|
1981 | export interface CompletionContext {
|
1982 | /**
|
1983 | * How the completion was triggered.
|
1984 | */
|
1985 | triggerKind: CompletionTriggerKind;
|
1986 | /**
|
1987 | * The trigger character (a single character) that has trigger code complete.
|
1988 | * Is undefined if `triggerKind !== CompletionTriggerKind.TriggerCharacter`
|
1989 | */
|
1990 | triggerCharacter?: string;
|
1991 | }
|
1992 | /**
|
1993 | * Completion parameters
|
1994 | */
|
1995 | export interface CompletionParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams {
|
1996 | /**
|
1997 | * The completion context. This is only available it the client specifies
|
1998 | * to send this using the client capability `textDocument.completion.contextSupport === true`
|
1999 | */
|
2000 | context?: CompletionContext;
|
2001 | }
|
2002 | /**
|
2003 | * Completion options.
|
2004 | */
|
2005 | export interface CompletionOptions extends WorkDoneProgressOptions {
|
2006 | /**
|
2007 | * Most tools trigger completion request automatically without explicitly requesting
|
2008 | * it using a keyboard shortcut (e.g. Ctrl+Space). Typically they do so when the user
|
2009 | * starts to type an identifier. For example if the user types `c` in a JavaScript file
|
2010 | * code complete will automatically pop up present `console` besides others as a
|
2011 | * completion item. Characters that make up identifiers don't need to be listed here.
|
2012 | *
|
2013 | * If code complete should automatically be trigger on characters not being valid inside
|
2014 | * an identifier (for example `.` in JavaScript) list them in `triggerCharacters`.
|
2015 | */
|
2016 | triggerCharacters?: string[];
|
2017 | /**
|
2018 | * The list of all possible characters that commit a completion. This field can be used
|
2019 | * if clients don't support individual commit characters per completion item. See
|
2020 | * `ClientCapabilities.textDocument.completion.completionItem.commitCharactersSupport`
|
2021 | *
|
2022 | * If a server provides both `allCommitCharacters` and commit characters on an individual
|
2023 | * completion item the ones on the completion item win.
|
2024 | *
|
2025 | * @since 3.2.0
|
2026 | */
|
2027 | allCommitCharacters?: string[];
|
2028 | /**
|
2029 | * The server provides support to resolve additional
|
2030 | * information for a completion item.
|
2031 | */
|
2032 | resolveProvider?: boolean;
|
2033 | /**
|
2034 | * The server supports the following `CompletionItem` specific
|
2035 | * capabilities.
|
2036 | *
|
2037 | * @since 3.17.0
|
2038 | */
|
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 | };
|
2049 | }
|
2050 | /**
|
2051 | * Registration options for a {@link CompletionRequest}.
|
2052 | */
|
2053 | export interface CompletionRegistrationOptions extends TextDocumentRegistrationOptions, CompletionOptions {
|
2054 | }
|
2055 | /**
|
2056 | * Request to request completion at a given text document position. The request's
|
2057 | * parameter is of type {@link TextDocumentPosition} the response
|
2058 | * is of type {@link CompletionItem CompletionItem[]} or {@link CompletionList}
|
2059 | * or a Thenable that resolves to such.
|
2060 | *
|
2061 | * The request can delay the computation of the {@link CompletionItem.detail `detail`}
|
2062 | * and {@link CompletionItem.documentation `documentation`} properties to the `completionItem/resolve`
|
2063 | * request. However, properties that are needed for the initial sorting and filtering, like `sortText`,
|
2064 | * `filterText`, `insertText`, and `textEdit`, must not be changed during resolve.
|
2065 | */
|
2066 | export declare namespace CompletionRequest {
|
2067 | const method: 'textDocument/completion';
|
2068 | const messageDirection: MessageDirection;
|
2069 | const type: ProtocolRequestType<CompletionParams, CompletionList | CompletionItem[] | null, CompletionItem[], void, CompletionRegistrationOptions>;
|
2070 | }
|
2071 | /**
|
2072 | * Request to resolve additional information for a given completion item.The request's
|
2073 | * parameter is of type {@link CompletionItem} the response
|
2074 | * is of type {@link CompletionItem} or a Thenable that resolves to such.
|
2075 | */
|
2076 | export declare namespace CompletionResolveRequest {
|
2077 | const method: 'completionItem/resolve';
|
2078 | const messageDirection: MessageDirection;
|
2079 | const type: ProtocolRequestType<CompletionItem, CompletionItem, never, void, void>;
|
2080 | }
|
2081 | export interface HoverClientCapabilities {
|
2082 | /**
|
2083 | * Whether hover supports dynamic registration.
|
2084 | */
|
2085 | dynamicRegistration?: boolean;
|
2086 | /**
|
2087 | * Client supports the following content formats for the content
|
2088 | * property. The order describes the preferred format of the client.
|
2089 | */
|
2090 | contentFormat?: MarkupKind[];
|
2091 | }
|
2092 | /**
|
2093 | * Hover options.
|
2094 | */
|
2095 | export interface HoverOptions extends WorkDoneProgressOptions {
|
2096 | }
|
2097 | /**
|
2098 | * Parameters for a {@link HoverRequest}.
|
2099 | */
|
2100 | export interface HoverParams extends TextDocumentPositionParams, WorkDoneProgressParams {
|
2101 | }
|
2102 | /**
|
2103 | * Registration options for a {@link HoverRequest}.
|
2104 | */
|
2105 | export interface HoverRegistrationOptions extends TextDocumentRegistrationOptions, HoverOptions {
|
2106 | }
|
2107 | /**
|
2108 | * Request to request hover information at a given text document position. The request's
|
2109 | * parameter is of type {@link TextDocumentPosition} the response is of
|
2110 | * type {@link Hover} or a Thenable that resolves to such.
|
2111 | */
|
2112 | export declare namespace HoverRequest {
|
2113 | const method: 'textDocument/hover';
|
2114 | const messageDirection: MessageDirection;
|
2115 | const type: ProtocolRequestType<HoverParams, Hover | null, never, void, HoverRegistrationOptions>;
|
2116 | }
|
2117 | /**
|
2118 | * Client Capabilities for a {@link SignatureHelpRequest}.
|
2119 | */
|
2120 | export interface SignatureHelpClientCapabilities {
|
2121 | /**
|
2122 | * Whether signature help supports dynamic registration.
|
2123 | */
|
2124 | dynamicRegistration?: boolean;
|
2125 | /**
|
2126 | * The client supports the following `SignatureInformation`
|
2127 | * specific properties.
|
2128 | */
|
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 | };
|
2155 | /**
|
2156 | * The client supports to send additional context information for a
|
2157 | * `textDocument/signatureHelp` request. A client that opts into
|
2158 | * contextSupport will also support the `retriggerCharacters` on
|
2159 | * `SignatureHelpOptions`.
|
2160 | *
|
2161 | * @since 3.15.0
|
2162 | */
|
2163 | contextSupport?: boolean;
|
2164 | }
|
2165 | /**
|
2166 | * Server Capabilities for a {@link SignatureHelpRequest}.
|
2167 | */
|
2168 | export interface SignatureHelpOptions extends WorkDoneProgressOptions {
|
2169 | /**
|
2170 | * List of characters that trigger signature help automatically.
|
2171 | */
|
2172 | triggerCharacters?: string[];
|
2173 | /**
|
2174 | * List of characters that re-trigger signature help.
|
2175 | *
|
2176 | * These trigger characters are only active when signature help is already showing. All trigger characters
|
2177 | * are also counted as re-trigger characters.
|
2178 | *
|
2179 | * @since 3.15.0
|
2180 | */
|
2181 | retriggerCharacters?: string[];
|
2182 | }
|
2183 | /**
|
2184 | * How a signature help was triggered.
|
2185 | *
|
2186 | * @since 3.15.0
|
2187 | */
|
2188 | export declare namespace SignatureHelpTriggerKind {
|
2189 | /**
|
2190 | * Signature help was invoked manually by the user or by a command.
|
2191 | */
|
2192 | const Invoked: 1;
|
2193 | /**
|
2194 | * Signature help was triggered by a trigger character.
|
2195 | */
|
2196 | const TriggerCharacter: 2;
|
2197 | /**
|
2198 | * Signature help was triggered by the cursor moving or by the document content changing.
|
2199 | */
|
2200 | const ContentChange: 3;
|
2201 | }
|
2202 | export type SignatureHelpTriggerKind = 1 | 2 | 3;
|
2203 | /**
|
2204 | * Additional information about the context in which a signature help request was triggered.
|
2205 | *
|
2206 | * @since 3.15.0
|
2207 | */
|
2208 | export interface SignatureHelpContext {
|
2209 | /**
|
2210 | * Action that caused signature help to be triggered.
|
2211 | */
|
2212 | triggerKind: SignatureHelpTriggerKind;
|
2213 | /**
|
2214 | * Character that caused signature help to be triggered.
|
2215 | *
|
2216 | * This is undefined when `triggerKind !== SignatureHelpTriggerKind.TriggerCharacter`
|
2217 | */
|
2218 | triggerCharacter?: string;
|
2219 | /**
|
2220 | * `true` if signature help was already showing when it was triggered.
|
2221 | *
|
2222 | * Retriggers occurs when the signature help is already active and can be caused by actions such as
|
2223 | * typing a trigger character, a cursor move, or document content changes.
|
2224 | */
|
2225 | isRetrigger: boolean;
|
2226 | /**
|
2227 | * The currently active `SignatureHelp`.
|
2228 | *
|
2229 | * The `activeSignatureHelp` has its `SignatureHelp.activeSignature` field updated based on
|
2230 | * the user navigating through available signatures.
|
2231 | */
|
2232 | activeSignatureHelp?: SignatureHelp;
|
2233 | }
|
2234 | /**
|
2235 | * Parameters for a {@link SignatureHelpRequest}.
|
2236 | */
|
2237 | export interface SignatureHelpParams extends TextDocumentPositionParams, WorkDoneProgressParams {
|
2238 | /**
|
2239 | * The signature help context. This is only available if the client specifies
|
2240 | * to send this using the client capability `textDocument.signatureHelp.contextSupport === true`
|
2241 | *
|
2242 | * @since 3.15.0
|
2243 | */
|
2244 | context?: SignatureHelpContext;
|
2245 | }
|
2246 | /**
|
2247 | * Registration options for a {@link SignatureHelpRequest}.
|
2248 | */
|
2249 | export interface SignatureHelpRegistrationOptions extends TextDocumentRegistrationOptions, SignatureHelpOptions {
|
2250 | }
|
2251 | export declare namespace SignatureHelpRequest {
|
2252 | const method: 'textDocument/signatureHelp';
|
2253 | const messageDirection: MessageDirection;
|
2254 | const type: ProtocolRequestType<SignatureHelpParams, SignatureHelp | null, never, void, SignatureHelpRegistrationOptions>;
|
2255 | }
|
2256 | /**
|
2257 | * Client Capabilities for a {@link DefinitionRequest}.
|
2258 | */
|
2259 | export interface DefinitionClientCapabilities {
|
2260 | /**
|
2261 | * Whether definition supports dynamic registration.
|
2262 | */
|
2263 | dynamicRegistration?: boolean;
|
2264 | /**
|
2265 | * The client supports additional metadata in the form of definition links.
|
2266 | *
|
2267 | * @since 3.14.0
|
2268 | */
|
2269 | linkSupport?: boolean;
|
2270 | }
|
2271 | /**
|
2272 | * Server Capabilities for a {@link DefinitionRequest}.
|
2273 | */
|
2274 | export interface DefinitionOptions extends WorkDoneProgressOptions {
|
2275 | }
|
2276 | /**
|
2277 | * Parameters for a {@link DefinitionRequest}.
|
2278 | */
|
2279 | export interface DefinitionParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams {
|
2280 | }
|
2281 | /**
|
2282 | * Registration options for a {@link DefinitionRequest}.
|
2283 | */
|
2284 | export interface DefinitionRegistrationOptions extends TextDocumentRegistrationOptions, DefinitionOptions {
|
2285 | }
|
2286 | /**
|
2287 | * A request to resolve the definition location of a symbol at a given text
|
2288 | * document position. The request's parameter is of type {@link TextDocumentPosition}
|
2289 | * the response is of either type {@link Definition} or a typed array of
|
2290 | * {@link DefinitionLink} or a Thenable that resolves to such.
|
2291 | */
|
2292 | export declare namespace DefinitionRequest {
|
2293 | const method: 'textDocument/definition';
|
2294 | const messageDirection: MessageDirection;
|
2295 | const type: ProtocolRequestType<DefinitionParams, Definition | LocationLink[] | null, Location[] | LocationLink[], void, DefinitionRegistrationOptions>;
|
2296 | }
|
2297 | /**
|
2298 | * Client Capabilities for a {@link ReferencesRequest}.
|
2299 | */
|
2300 | export interface ReferenceClientCapabilities {
|
2301 | /**
|
2302 | * Whether references supports dynamic registration.
|
2303 | */
|
2304 | dynamicRegistration?: boolean;
|
2305 | }
|
2306 | /**
|
2307 | * Parameters for a {@link ReferencesRequest}.
|
2308 | */
|
2309 | export interface ReferenceParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams {
|
2310 | context: ReferenceContext;
|
2311 | }
|
2312 | /**
|
2313 | * Reference options.
|
2314 | */
|
2315 | export interface ReferenceOptions extends WorkDoneProgressOptions {
|
2316 | }
|
2317 | /**
|
2318 | * Registration options for a {@link ReferencesRequest}.
|
2319 | */
|
2320 | export interface ReferenceRegistrationOptions extends TextDocumentRegistrationOptions, ReferenceOptions {
|
2321 | }
|
2322 | /**
|
2323 | * A request to resolve project-wide references for the symbol denoted
|
2324 | * by the given text document position. The request's parameter is of
|
2325 | * type {@link ReferenceParams} the response is of type
|
2326 | * {@link Location Location[]} or a Thenable that resolves to such.
|
2327 | */
|
2328 | export declare namespace ReferencesRequest {
|
2329 | const method: 'textDocument/references';
|
2330 | const messageDirection: MessageDirection;
|
2331 | const type: ProtocolRequestType<ReferenceParams, Location[] | null, Location[], void, ReferenceRegistrationOptions>;
|
2332 | }
|
2333 | /**
|
2334 | * Client Capabilities for a {@link DocumentHighlightRequest}.
|
2335 | */
|
2336 | export interface DocumentHighlightClientCapabilities {
|
2337 | /**
|
2338 | * Whether document highlight supports dynamic registration.
|
2339 | */
|
2340 | dynamicRegistration?: boolean;
|
2341 | }
|
2342 | /**
|
2343 | * Parameters for a {@link DocumentHighlightRequest}.
|
2344 | */
|
2345 | export interface DocumentHighlightParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams {
|
2346 | }
|
2347 | /**
|
2348 | * Provider options for a {@link DocumentHighlightRequest}.
|
2349 | */
|
2350 | export interface DocumentHighlightOptions extends WorkDoneProgressOptions {
|
2351 | }
|
2352 | /**
|
2353 | * Registration options for a {@link DocumentHighlightRequest}.
|
2354 | */
|
2355 | export interface DocumentHighlightRegistrationOptions extends TextDocumentRegistrationOptions, DocumentHighlightOptions {
|
2356 | }
|
2357 | /**
|
2358 | * Request to resolve a {@link DocumentHighlight} for a given
|
2359 | * text document position. The request's parameter is of type {@link TextDocumentPosition}
|
2360 | * the request response is an array of type {@link DocumentHighlight}
|
2361 | * or a Thenable that resolves to such.
|
2362 | */
|
2363 | export declare namespace DocumentHighlightRequest {
|
2364 | const method: 'textDocument/documentHighlight';
|
2365 | const messageDirection: MessageDirection;
|
2366 | const type: ProtocolRequestType<DocumentHighlightParams, DocumentHighlight[] | null, DocumentHighlight[], void, DocumentHighlightRegistrationOptions>;
|
2367 | }
|
2368 | /**
|
2369 | * Client Capabilities for a {@link DocumentSymbolRequest}.
|
2370 | */
|
2371 | export interface DocumentSymbolClientCapabilities {
|
2372 | /**
|
2373 | * Whether document symbol supports dynamic registration.
|
2374 | */
|
2375 | dynamicRegistration?: boolean;
|
2376 | /**
|
2377 | * Specific capabilities for the `SymbolKind` in the
|
2378 | * `textDocument/documentSymbol` request.
|
2379 | */
|
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 | };
|
2393 | /**
|
2394 | * The client supports hierarchical document symbols.
|
2395 | */
|
2396 | hierarchicalDocumentSymbolSupport?: boolean;
|
2397 | /**
|
2398 | * The client supports tags on `SymbolInformation`. Tags are supported on
|
2399 | * `DocumentSymbol` if `hierarchicalDocumentSymbolSupport` is set to true.
|
2400 | * Clients supporting tags have to handle unknown tags gracefully.
|
2401 | *
|
2402 | * @since 3.16.0
|
2403 | */
|
2404 | tagSupport?: {
|
2405 | /**
|
2406 | * The tags supported by the client.
|
2407 | */
|
2408 | valueSet: SymbolTag[];
|
2409 | };
|
2410 | /**
|
2411 | * The client supports an additional label presented in the UI when
|
2412 | * registering a document symbol provider.
|
2413 | *
|
2414 | * @since 3.16.0
|
2415 | */
|
2416 | labelSupport?: boolean;
|
2417 | }
|
2418 | /**
|
2419 | * Parameters for a {@link DocumentSymbolRequest}.
|
2420 | */
|
2421 | export interface DocumentSymbolParams extends WorkDoneProgressParams, PartialResultParams {
|
2422 | /**
|
2423 | * The text document.
|
2424 | */
|
2425 | textDocument: TextDocumentIdentifier;
|
2426 | }
|
2427 | /**
|
2428 | * Provider options for a {@link DocumentSymbolRequest}.
|
2429 | */
|
2430 | export interface DocumentSymbolOptions extends WorkDoneProgressOptions {
|
2431 | /**
|
2432 | * A human-readable string that is shown when multiple outlines trees
|
2433 | * are shown for the same document.
|
2434 | *
|
2435 | * @since 3.16.0
|
2436 | */
|
2437 | label?: string;
|
2438 | }
|
2439 | /**
|
2440 | * Registration options for a {@link DocumentSymbolRequest}.
|
2441 | */
|
2442 | export interface DocumentSymbolRegistrationOptions extends TextDocumentRegistrationOptions, DocumentSymbolOptions {
|
2443 | }
|
2444 | /**
|
2445 | * A request to list all symbols found in a given text document. The request's
|
2446 | * parameter is of type {@link TextDocumentIdentifier} the
|
2447 | * response is of type {@link SymbolInformation SymbolInformation[]} or a Thenable
|
2448 | * that resolves to such.
|
2449 | */
|
2450 | export declare namespace DocumentSymbolRequest {
|
2451 | const method: 'textDocument/documentSymbol';
|
2452 | const messageDirection: MessageDirection;
|
2453 | const type: ProtocolRequestType<DocumentSymbolParams, DocumentSymbol[] | SymbolInformation[] | null, DocumentSymbol[] | SymbolInformation[], void, DocumentSymbolRegistrationOptions>;
|
2454 | }
|
2455 | /**
|
2456 | * The Client Capabilities of a {@link CodeActionRequest}.
|
2457 | */
|
2458 | export interface CodeActionClientCapabilities {
|
2459 | /**
|
2460 | * Whether code action supports dynamic registration.
|
2461 | */
|
2462 | dynamicRegistration?: boolean;
|
2463 | /**
|
2464 | * The client support code action literals of type `CodeAction` as a valid
|
2465 | * response of the `textDocument/codeAction` request. If the property is not
|
2466 | * set the request can only return `Command` literals.
|
2467 | *
|
2468 | * @since 3.8.0
|
2469 | */
|
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 | };
|
2485 | /**
|
2486 | * Whether code action supports the `isPreferred` property.
|
2487 | *
|
2488 | * @since 3.15.0
|
2489 | */
|
2490 | isPreferredSupport?: boolean;
|
2491 | /**
|
2492 | * Whether code action supports the `disabled` property.
|
2493 | *
|
2494 | * @since 3.16.0
|
2495 | */
|
2496 | disabledSupport?: boolean;
|
2497 | /**
|
2498 | * Whether code action supports the `data` property which is
|
2499 | * preserved between a `textDocument/codeAction` and a
|
2500 | * `codeAction/resolve` request.
|
2501 | *
|
2502 | * @since 3.16.0
|
2503 | */
|
2504 | dataSupport?: boolean;
|
2505 | /**
|
2506 | * Whether the client supports resolving additional code action
|
2507 | * properties via a separate `codeAction/resolve` request.
|
2508 | *
|
2509 | * @since 3.16.0
|
2510 | */
|
2511 | resolveSupport?: {
|
2512 | /**
|
2513 | * The properties that a client can resolve lazily.
|
2514 | */
|
2515 | properties: string[];
|
2516 | };
|
2517 | /**
|
2518 | * Whether the client honors the change annotations in
|
2519 | * text edits and resource operations returned via the
|
2520 | * `CodeAction#edit` property by for example presenting
|
2521 | * the workspace edit in the user interface and asking
|
2522 | * for confirmation.
|
2523 | *
|
2524 | * @since 3.16.0
|
2525 | */
|
2526 | honorsChangeAnnotations?: boolean;
|
2527 | }
|
2528 | /**
|
2529 | * The parameters of a {@link CodeActionRequest}.
|
2530 | */
|
2531 | export interface CodeActionParams extends WorkDoneProgressParams, PartialResultParams {
|
2532 | /**
|
2533 | * The document in which the command was invoked.
|
2534 | */
|
2535 | textDocument: TextDocumentIdentifier;
|
2536 | /**
|
2537 | * The range for which the command was invoked.
|
2538 | */
|
2539 | range: Range;
|
2540 | /**
|
2541 | * Context carrying additional information.
|
2542 | */
|
2543 | context: CodeActionContext;
|
2544 | }
|
2545 | /**
|
2546 | * Provider options for a {@link CodeActionRequest}.
|
2547 | */
|
2548 | export interface CodeActionOptions extends WorkDoneProgressOptions {
|
2549 | /**
|
2550 | * CodeActionKinds that this server may return.
|
2551 | *
|
2552 | * The list of kinds may be generic, such as `CodeActionKind.Refactor`, or the server
|
2553 | * may list out every specific kind they provide.
|
2554 | */
|
2555 | codeActionKinds?: CodeActionKind[];
|
2556 | /**
|
2557 | * The server provides support to resolve additional
|
2558 | * information for a code action.
|
2559 | *
|
2560 | * @since 3.16.0
|
2561 | */
|
2562 | resolveProvider?: boolean;
|
2563 | }
|
2564 | /**
|
2565 | * Registration options for a {@link CodeActionRequest}.
|
2566 | */
|
2567 | export interface CodeActionRegistrationOptions extends TextDocumentRegistrationOptions, CodeActionOptions {
|
2568 | }
|
2569 | /**
|
2570 | * A request to provide commands for the given text document and range.
|
2571 | */
|
2572 | export declare namespace CodeActionRequest {
|
2573 | const method: 'textDocument/codeAction';
|
2574 | const messageDirection: MessageDirection;
|
2575 | const type: ProtocolRequestType<CodeActionParams, (Command | CodeAction)[] | null, (Command | CodeAction)[], void, CodeActionRegistrationOptions>;
|
2576 | }
|
2577 | /**
|
2578 | * Request to resolve additional information for a given code action.The request's
|
2579 | * parameter is of type {@link CodeAction} the response
|
2580 | * is of type {@link CodeAction} or a Thenable that resolves to such.
|
2581 | */
|
2582 | export declare namespace CodeActionResolveRequest {
|
2583 | const method: 'codeAction/resolve';
|
2584 | const messageDirection: MessageDirection;
|
2585 | const type: ProtocolRequestType<CodeAction, CodeAction, never, void, void>;
|
2586 | }
|
2587 | /**
|
2588 | * Client capabilities for a {@link WorkspaceSymbolRequest}.
|
2589 | */
|
2590 | export interface WorkspaceSymbolClientCapabilities {
|
2591 | /**
|
2592 | * Symbol request supports dynamic registration.
|
2593 | */
|
2594 | dynamicRegistration?: boolean;
|
2595 | /**
|
2596 | * Specific capabilities for the `SymbolKind` in the `workspace/symbol` request.
|
2597 | */
|
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 | };
|
2611 | /**
|
2612 | * The client supports tags on `SymbolInformation`.
|
2613 | * Clients supporting tags have to handle unknown tags gracefully.
|
2614 | *
|
2615 | * @since 3.16.0
|
2616 | */
|
2617 | tagSupport?: {
|
2618 | /**
|
2619 | * The tags supported by the client.
|
2620 | */
|
2621 | valueSet: SymbolTag[];
|
2622 | };
|
2623 | /**
|
2624 | * The client support partial workspace symbols. The client will send the
|
2625 | * request `workspaceSymbol/resolve` to the server to resolve additional
|
2626 | * properties.
|
2627 | *
|
2628 | * @since 3.17.0
|
2629 | */
|
2630 | resolveSupport?: {
|
2631 | /**
|
2632 | * The properties that a client can resolve lazily. Usually
|
2633 | * `location.range`
|
2634 | */
|
2635 | properties: string[];
|
2636 | };
|
2637 | }
|
2638 | /**
|
2639 | * The parameters of a {@link WorkspaceSymbolRequest}.
|
2640 | */
|
2641 | export interface WorkspaceSymbolParams extends WorkDoneProgressParams, PartialResultParams {
|
2642 | /**
|
2643 | * A query string to filter symbols by. Clients may send an empty
|
2644 | * string here to request all symbols.
|
2645 | */
|
2646 | query: string;
|
2647 | }
|
2648 | /**
|
2649 | * Server capabilities for a {@link WorkspaceSymbolRequest}.
|
2650 | */
|
2651 | export interface WorkspaceSymbolOptions extends WorkDoneProgressOptions {
|
2652 | /**
|
2653 | * The server provides support to resolve additional
|
2654 | * information for a workspace symbol.
|
2655 | *
|
2656 | * @since 3.17.0
|
2657 | */
|
2658 | resolveProvider?: boolean;
|
2659 | }
|
2660 | /**
|
2661 | * Registration options for a {@link WorkspaceSymbolRequest}.
|
2662 | */
|
2663 | export interface WorkspaceSymbolRegistrationOptions extends WorkspaceSymbolOptions {
|
2664 | }
|
2665 | /**
|
2666 | * A request to list project-wide symbols matching the query string given
|
2667 | * by the {@link WorkspaceSymbolParams}. The response is
|
2668 | * of type {@link SymbolInformation SymbolInformation[]} or a Thenable that
|
2669 | * resolves to such.
|
2670 | *
|
2671 | * @since 3.17.0 - support for WorkspaceSymbol in the returned data. Clients
|
2672 | * need to advertise support for WorkspaceSymbols via the client capability
|
2673 | * `workspace.symbol.resolveSupport`.
|
2674 | *
|
2675 | */
|
2676 | export declare namespace WorkspaceSymbolRequest {
|
2677 | const method: 'workspace/symbol';
|
2678 | const messageDirection: MessageDirection;
|
2679 | const type: ProtocolRequestType<WorkspaceSymbolParams, SymbolInformation[] | WorkspaceSymbol[] | null, SymbolInformation[] | WorkspaceSymbol[], void, WorkspaceSymbolRegistrationOptions>;
|
2680 | }
|
2681 | /**
|
2682 | * A request to resolve the range inside the workspace
|
2683 | * symbol's location.
|
2684 | *
|
2685 | * @since 3.17.0
|
2686 | */
|
2687 | export declare namespace WorkspaceSymbolResolveRequest {
|
2688 | const method: 'workspaceSymbol/resolve';
|
2689 | const messageDirection: MessageDirection;
|
2690 | const type: ProtocolRequestType<WorkspaceSymbol, WorkspaceSymbol, never, void, void>;
|
2691 | }
|
2692 | /**
|
2693 | * The client capabilities of a {@link CodeLensRequest}.
|
2694 | */
|
2695 | export interface CodeLensClientCapabilities {
|
2696 | /**
|
2697 | * Whether code lens supports dynamic registration.
|
2698 | */
|
2699 | dynamicRegistration?: boolean;
|
2700 | }
|
2701 | /**
|
2702 | * @since 3.16.0
|
2703 | */
|
2704 | export interface CodeLensWorkspaceClientCapabilities {
|
2705 | /**
|
2706 | * Whether the client implementation supports a refresh request sent from the
|
2707 | * server to the client.
|
2708 | *
|
2709 | * Note that this event is global and will force the client to refresh all
|
2710 | * code lenses currently shown. It should be used with absolute care and is
|
2711 | * useful for situation where a server for example detect a project wide
|
2712 | * change that requires such a calculation.
|
2713 | */
|
2714 | refreshSupport?: boolean;
|
2715 | }
|
2716 | /**
|
2717 | * The parameters of a {@link CodeLensRequest}.
|
2718 | */
|
2719 | export interface CodeLensParams extends WorkDoneProgressParams, PartialResultParams {
|
2720 | /**
|
2721 | * The document to request code lens for.
|
2722 | */
|
2723 | textDocument: TextDocumentIdentifier;
|
2724 | }
|
2725 | /**
|
2726 | * Code Lens provider options of a {@link CodeLensRequest}.
|
2727 | */
|
2728 | export interface CodeLensOptions extends WorkDoneProgressOptions {
|
2729 | /**
|
2730 | * Code lens has a resolve provider as well.
|
2731 | */
|
2732 | resolveProvider?: boolean;
|
2733 | }
|
2734 | /**
|
2735 | * Registration options for a {@link CodeLensRequest}.
|
2736 | */
|
2737 | export interface CodeLensRegistrationOptions extends TextDocumentRegistrationOptions, CodeLensOptions {
|
2738 | }
|
2739 | /**
|
2740 | * A request to provide code lens for the given text document.
|
2741 | */
|
2742 | export declare namespace CodeLensRequest {
|
2743 | const method: 'textDocument/codeLens';
|
2744 | const messageDirection: MessageDirection;
|
2745 | const type: ProtocolRequestType<CodeLensParams, CodeLens[] | null, CodeLens[], void, CodeLensRegistrationOptions>;
|
2746 | }
|
2747 | /**
|
2748 | * A request to resolve a command for a given code lens.
|
2749 | */
|
2750 | export declare namespace CodeLensResolveRequest {
|
2751 | const method: 'codeLens/resolve';
|
2752 | const messageDirection: MessageDirection;
|
2753 | const type: ProtocolRequestType<CodeLens, CodeLens, never, void, void>;
|
2754 | }
|
2755 | /**
|
2756 | * A request to refresh all code actions
|
2757 | *
|
2758 | * @since 3.16.0
|
2759 | */
|
2760 | export declare namespace CodeLensRefreshRequest {
|
2761 | const method: `workspace/codeLens/refresh`;
|
2762 | const messageDirection: MessageDirection;
|
2763 | const type: ProtocolRequestType0<void, void, void, void>;
|
2764 | }
|
2765 | /**
|
2766 | * The client capabilities of a {@link DocumentLinkRequest}.
|
2767 | */
|
2768 | export interface DocumentLinkClientCapabilities {
|
2769 | /**
|
2770 | * Whether document link supports dynamic registration.
|
2771 | */
|
2772 | dynamicRegistration?: boolean;
|
2773 | /**
|
2774 | * Whether the client supports the `tooltip` property on `DocumentLink`.
|
2775 | *
|
2776 | * @since 3.15.0
|
2777 | */
|
2778 | tooltipSupport?: boolean;
|
2779 | }
|
2780 | /**
|
2781 | * The parameters of a {@link DocumentLinkRequest}.
|
2782 | */
|
2783 | export interface DocumentLinkParams extends WorkDoneProgressParams, PartialResultParams {
|
2784 | /**
|
2785 | * The document to provide document links for.
|
2786 | */
|
2787 | textDocument: TextDocumentIdentifier;
|
2788 | }
|
2789 | /**
|
2790 | * Provider options for a {@link DocumentLinkRequest}.
|
2791 | */
|
2792 | export interface DocumentLinkOptions extends WorkDoneProgressOptions {
|
2793 | /**
|
2794 | * Document links have a resolve provider as well.
|
2795 | */
|
2796 | resolveProvider?: boolean;
|
2797 | }
|
2798 | /**
|
2799 | * Registration options for a {@link DocumentLinkRequest}.
|
2800 | */
|
2801 | export interface DocumentLinkRegistrationOptions extends TextDocumentRegistrationOptions, DocumentLinkOptions {
|
2802 | }
|
2803 | /**
|
2804 | * A request to provide document links
|
2805 | */
|
2806 | export declare namespace DocumentLinkRequest {
|
2807 | const method: 'textDocument/documentLink';
|
2808 | const messageDirection: MessageDirection;
|
2809 | const type: ProtocolRequestType<DocumentLinkParams, DocumentLink[] | null, DocumentLink[], void, DocumentLinkRegistrationOptions>;
|
2810 | }
|
2811 | /**
|
2812 | * Request to resolve additional information for a given document link. The request's
|
2813 | * parameter is of type {@link DocumentLink} the response
|
2814 | * is of type {@link DocumentLink} or a Thenable that resolves to such.
|
2815 | */
|
2816 | export declare namespace DocumentLinkResolveRequest {
|
2817 | const method: 'documentLink/resolve';
|
2818 | const messageDirection: MessageDirection;
|
2819 | const type: ProtocolRequestType<DocumentLink, DocumentLink, never, void, void>;
|
2820 | }
|
2821 | /**
|
2822 | * Client capabilities of a {@link DocumentFormattingRequest}.
|
2823 | */
|
2824 | export interface DocumentFormattingClientCapabilities {
|
2825 | /**
|
2826 | * Whether formatting supports dynamic registration.
|
2827 | */
|
2828 | dynamicRegistration?: boolean;
|
2829 | }
|
2830 | /**
|
2831 | * The parameters of a {@link DocumentFormattingRequest}.
|
2832 | */
|
2833 | export interface DocumentFormattingParams extends WorkDoneProgressParams {
|
2834 | /**
|
2835 | * The document to format.
|
2836 | */
|
2837 | textDocument: TextDocumentIdentifier;
|
2838 | /**
|
2839 | * The format options.
|
2840 | */
|
2841 | options: FormattingOptions;
|
2842 | }
|
2843 | /**
|
2844 | * Provider options for a {@link DocumentFormattingRequest}.
|
2845 | */
|
2846 | export interface DocumentFormattingOptions extends WorkDoneProgressOptions {
|
2847 | }
|
2848 | /**
|
2849 | * Registration options for a {@link DocumentFormattingRequest}.
|
2850 | */
|
2851 | export interface DocumentFormattingRegistrationOptions extends TextDocumentRegistrationOptions, DocumentFormattingOptions {
|
2852 | }
|
2853 | /**
|
2854 | * A request to format a whole document.
|
2855 | */
|
2856 | export declare namespace DocumentFormattingRequest {
|
2857 | const method: 'textDocument/formatting';
|
2858 | const messageDirection: MessageDirection;
|
2859 | const type: ProtocolRequestType<DocumentFormattingParams, TextEdit[] | null, never, void, DocumentFormattingRegistrationOptions>;
|
2860 | }
|
2861 | /**
|
2862 | * Client capabilities of a {@link DocumentRangeFormattingRequest}.
|
2863 | */
|
2864 | export interface DocumentRangeFormattingClientCapabilities {
|
2865 | /**
|
2866 | * Whether range formatting supports dynamic registration.
|
2867 | */
|
2868 | dynamicRegistration?: boolean;
|
2869 | /**
|
2870 | * Whether the client supports formatting multiple ranges at once.
|
2871 | *
|
2872 | * @since 3.18.0
|
2873 | * @proposed
|
2874 | */
|
2875 | rangesSupport?: boolean;
|
2876 | }
|
2877 | /**
|
2878 | * The parameters of a {@link DocumentRangeFormattingRequest}.
|
2879 | */
|
2880 | export interface DocumentRangeFormattingParams extends WorkDoneProgressParams {
|
2881 | /**
|
2882 | * The document to format.
|
2883 | */
|
2884 | textDocument: TextDocumentIdentifier;
|
2885 | /**
|
2886 | * The range to format
|
2887 | */
|
2888 | range: Range;
|
2889 | /**
|
2890 | * The format options
|
2891 | */
|
2892 | options: FormattingOptions;
|
2893 | }
|
2894 | /**
|
2895 | * The parameters of a {@link DocumentRangesFormattingRequest}.
|
2896 | *
|
2897 | * @since 3.18.0
|
2898 | * @proposed
|
2899 | */
|
2900 | export interface DocumentRangesFormattingParams extends WorkDoneProgressParams {
|
2901 | /**
|
2902 | * The document to format.
|
2903 | */
|
2904 | textDocument: TextDocumentIdentifier;
|
2905 | /**
|
2906 | * The ranges to format
|
2907 | */
|
2908 | ranges: Range[];
|
2909 | /**
|
2910 | * The format options
|
2911 | */
|
2912 | options: FormattingOptions;
|
2913 | }
|
2914 | /**
|
2915 | * Provider options for a {@link DocumentRangeFormattingRequest}.
|
2916 | */
|
2917 | export interface DocumentRangeFormattingOptions extends WorkDoneProgressOptions {
|
2918 | /**
|
2919 | * Whether the server supports formatting multiple ranges at once.
|
2920 | *
|
2921 | * @since 3.18.0
|
2922 | * @proposed
|
2923 | */
|
2924 | rangesSupport?: boolean;
|
2925 | }
|
2926 | /**
|
2927 | * Registration options for a {@link DocumentRangeFormattingRequest}.
|
2928 | */
|
2929 | export interface DocumentRangeFormattingRegistrationOptions extends TextDocumentRegistrationOptions, DocumentRangeFormattingOptions {
|
2930 | }
|
2931 | /**
|
2932 | * A request to format a range in a document.
|
2933 | */
|
2934 | export declare namespace DocumentRangeFormattingRequest {
|
2935 | const method: 'textDocument/rangeFormatting';
|
2936 | const messageDirection: MessageDirection;
|
2937 | const type: ProtocolRequestType<DocumentRangeFormattingParams, TextEdit[] | null, never, void, DocumentRangeFormattingRegistrationOptions>;
|
2938 | }
|
2939 | /**
|
2940 | * A request to format ranges in a document.
|
2941 | *
|
2942 | * @since 3.18.0
|
2943 | * @proposed
|
2944 | */
|
2945 | export declare namespace DocumentRangesFormattingRequest {
|
2946 | const method: 'textDocument/rangesFormatting';
|
2947 | const messageDirection: MessageDirection;
|
2948 | const type: ProtocolRequestType<DocumentRangesFormattingParams, TextEdit[] | null, never, void, DocumentRangeFormattingRegistrationOptions>;
|
2949 | }
|
2950 | /**
|
2951 | * Client capabilities of a {@link DocumentOnTypeFormattingRequest}.
|
2952 | */
|
2953 | export interface DocumentOnTypeFormattingClientCapabilities {
|
2954 | /**
|
2955 | * Whether on type formatting supports dynamic registration.
|
2956 | */
|
2957 | dynamicRegistration?: boolean;
|
2958 | }
|
2959 | /**
|
2960 | * The parameters of a {@link DocumentOnTypeFormattingRequest}.
|
2961 | */
|
2962 | export interface DocumentOnTypeFormattingParams {
|
2963 | /**
|
2964 | * The document to format.
|
2965 | */
|
2966 | textDocument: TextDocumentIdentifier;
|
2967 | /**
|
2968 | * The position around which the on type formatting should happen.
|
2969 | * This is not necessarily the exact position where the character denoted
|
2970 | * by the property `ch` got typed.
|
2971 | */
|
2972 | position: Position;
|
2973 | /**
|
2974 | * The character that has been typed that triggered the formatting
|
2975 | * on type request. That is not necessarily the last character that
|
2976 | * got inserted into the document since the client could auto insert
|
2977 | * characters as well (e.g. like automatic brace completion).
|
2978 | */
|
2979 | ch: string;
|
2980 | /**
|
2981 | * The formatting options.
|
2982 | */
|
2983 | options: FormattingOptions;
|
2984 | }
|
2985 | /**
|
2986 | * Provider options for a {@link DocumentOnTypeFormattingRequest}.
|
2987 | */
|
2988 | export interface DocumentOnTypeFormattingOptions {
|
2989 | /**
|
2990 | * A character on which formatting should be triggered, like `{`.
|
2991 | */
|
2992 | firstTriggerCharacter: string;
|
2993 | /**
|
2994 | * More trigger characters.
|
2995 | */
|
2996 | moreTriggerCharacter?: string[];
|
2997 | }
|
2998 | /**
|
2999 | * Registration options for a {@link DocumentOnTypeFormattingRequest}.
|
3000 | */
|
3001 | export interface DocumentOnTypeFormattingRegistrationOptions extends TextDocumentRegistrationOptions, DocumentOnTypeFormattingOptions {
|
3002 | }
|
3003 | /**
|
3004 | * A request to format a document on type.
|
3005 | */
|
3006 | export declare namespace DocumentOnTypeFormattingRequest {
|
3007 | const method: 'textDocument/onTypeFormatting';
|
3008 | const messageDirection: MessageDirection;
|
3009 | const type: ProtocolRequestType<DocumentOnTypeFormattingParams, TextEdit[] | null, never, void, DocumentOnTypeFormattingRegistrationOptions>;
|
3010 | }
|
3011 | export declare namespace PrepareSupportDefaultBehavior {
|
3012 | /**
|
3013 | * The client's default behavior is to select the identifier
|
3014 | * according the to language's syntax rule.
|
3015 | */
|
3016 | const Identifier: 1;
|
3017 | }
|
3018 | export type PrepareSupportDefaultBehavior = 1;
|
3019 | export interface RenameClientCapabilities {
|
3020 | /**
|
3021 | * Whether rename supports dynamic registration.
|
3022 | */
|
3023 | dynamicRegistration?: boolean;
|
3024 | /**
|
3025 | * Client supports testing for validity of rename operations
|
3026 | * before execution.
|
3027 | *
|
3028 | * @since 3.12.0
|
3029 | */
|
3030 | prepareSupport?: boolean;
|
3031 | /**
|
3032 | * Client supports the default behavior result.
|
3033 | *
|
3034 | * The value indicates the default behavior used by the
|
3035 | * client.
|
3036 | *
|
3037 | * @since 3.16.0
|
3038 | */
|
3039 | prepareSupportDefaultBehavior?: PrepareSupportDefaultBehavior;
|
3040 | /**
|
3041 | * Whether the client honors the change annotations in
|
3042 | * text edits and resource operations returned via the
|
3043 | * rename request's workspace edit by for example presenting
|
3044 | * the workspace edit in the user interface and asking
|
3045 | * for confirmation.
|
3046 | *
|
3047 | * @since 3.16.0
|
3048 | */
|
3049 | honorsChangeAnnotations?: boolean;
|
3050 | }
|
3051 | /**
|
3052 | * The parameters of a {@link RenameRequest}.
|
3053 | */
|
3054 | export interface RenameParams extends WorkDoneProgressParams {
|
3055 | /**
|
3056 | * The document to rename.
|
3057 | */
|
3058 | textDocument: TextDocumentIdentifier;
|
3059 | /**
|
3060 | * The position at which this request was sent.
|
3061 | */
|
3062 | position: Position;
|
3063 | /**
|
3064 | * The new name of the symbol. If the given name is not valid the
|
3065 | * request must return a {@link ResponseError} with an
|
3066 | * appropriate message set.
|
3067 | */
|
3068 | newName: string;
|
3069 | }
|
3070 | /**
|
3071 | * Provider options for a {@link RenameRequest}.
|
3072 | */
|
3073 | export interface RenameOptions extends WorkDoneProgressOptions {
|
3074 | /**
|
3075 | * Renames should be checked and tested before being executed.
|
3076 | *
|
3077 | * @since version 3.12.0
|
3078 | */
|
3079 | prepareProvider?: boolean;
|
3080 | }
|
3081 | /**
|
3082 | * Registration options for a {@link RenameRequest}.
|
3083 | */
|
3084 | export interface RenameRegistrationOptions extends TextDocumentRegistrationOptions, RenameOptions {
|
3085 | }
|
3086 | /**
|
3087 | * A request to rename a symbol.
|
3088 | */
|
3089 | export declare namespace RenameRequest {
|
3090 | const method: 'textDocument/rename';
|
3091 | const messageDirection: MessageDirection;
|
3092 | const type: ProtocolRequestType<RenameParams, WorkspaceEdit | null, never, void, RenameRegistrationOptions>;
|
3093 | }
|
3094 | export interface PrepareRenameParams extends TextDocumentPositionParams, WorkDoneProgressParams {
|
3095 | }
|
3096 | export type PrepareRenameResult = Range | {
|
3097 | range: Range;
|
3098 | placeholder: string;
|
3099 | } | {
|
3100 | defaultBehavior: boolean;
|
3101 | };
|
3102 | /**
|
3103 | * A request to test and perform the setup necessary for a rename.
|
3104 | *
|
3105 | * @since 3.16 - support for default behavior
|
3106 | */
|
3107 | export declare namespace PrepareRenameRequest {
|
3108 | const method: 'textDocument/prepareRename';
|
3109 | const messageDirection: MessageDirection;
|
3110 | const type: ProtocolRequestType<PrepareRenameParams, PrepareRenameResult | null, never, void, void>;
|
3111 | }
|
3112 | /**
|
3113 | * The client capabilities of a {@link ExecuteCommandRequest}.
|
3114 | */
|
3115 | export interface ExecuteCommandClientCapabilities {
|
3116 | /**
|
3117 | * Execute command supports dynamic registration.
|
3118 | */
|
3119 | dynamicRegistration?: boolean;
|
3120 | }
|
3121 | /**
|
3122 | * The parameters of a {@link ExecuteCommandRequest}.
|
3123 | */
|
3124 | export interface ExecuteCommandParams extends WorkDoneProgressParams {
|
3125 | /**
|
3126 | * The identifier of the actual command handler.
|
3127 | */
|
3128 | command: string;
|
3129 | /**
|
3130 | * Arguments that the command should be invoked with.
|
3131 | */
|
3132 | arguments?: LSPAny[];
|
3133 | }
|
3134 | /**
|
3135 | * The server capabilities of a {@link ExecuteCommandRequest}.
|
3136 | */
|
3137 | export interface ExecuteCommandOptions extends WorkDoneProgressOptions {
|
3138 | /**
|
3139 | * The commands to be executed on the server
|
3140 | */
|
3141 | commands: string[];
|
3142 | }
|
3143 | /**
|
3144 | * Registration options for a {@link ExecuteCommandRequest}.
|
3145 | */
|
3146 | export interface ExecuteCommandRegistrationOptions extends ExecuteCommandOptions {
|
3147 | }
|
3148 | /**
|
3149 | * A request send from the client to the server to execute a command. The request might return
|
3150 | * a workspace edit which the client will apply to the workspace.
|
3151 | */
|
3152 | export declare namespace ExecuteCommandRequest {
|
3153 | const method: 'workspace/executeCommand';
|
3154 | const messageDirection: MessageDirection;
|
3155 | const type: ProtocolRequestType<ExecuteCommandParams, any, never, void, ExecuteCommandRegistrationOptions>;
|
3156 | }
|
3157 | export interface WorkspaceEditClientCapabilities {
|
3158 | /**
|
3159 | * The client supports versioned document changes in `WorkspaceEdit`s
|
3160 | */
|
3161 | documentChanges?: boolean;
|
3162 | /**
|
3163 | * The resource operations the client supports. Clients should at least
|
3164 | * support 'create', 'rename' and 'delete' files and folders.
|
3165 | *
|
3166 | * @since 3.13.0
|
3167 | */
|
3168 | resourceOperations?: ResourceOperationKind[];
|
3169 | /**
|
3170 | * The failure handling strategy of a client if applying the workspace edit
|
3171 | * fails.
|
3172 | *
|
3173 | * @since 3.13.0
|
3174 | */
|
3175 | failureHandling?: FailureHandlingKind;
|
3176 | /**
|
3177 | * Whether the client normalizes line endings to the client specific
|
3178 | * setting.
|
3179 | * If set to `true` the client will normalize line ending characters
|
3180 | * in a workspace edit to the client-specified new line
|
3181 | * character.
|
3182 | *
|
3183 | * @since 3.16.0
|
3184 | */
|
3185 | normalizesLineEndings?: boolean;
|
3186 | /**
|
3187 | * Whether the client in general supports change annotations on text edits,
|
3188 | * create file, rename file and delete file changes.
|
3189 | *
|
3190 | * @since 3.16.0
|
3191 | */
|
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 | };
|
3200 | }
|
3201 | /**
|
3202 | * The parameters passed via an apply workspace edit request.
|
3203 | */
|
3204 | export interface ApplyWorkspaceEditParams {
|
3205 | /**
|
3206 | * An optional label of the workspace edit. This label is
|
3207 | * presented in the user interface for example on an undo
|
3208 | * stack to undo the workspace edit.
|
3209 | */
|
3210 | label?: string;
|
3211 | /**
|
3212 | * The edits to apply.
|
3213 | */
|
3214 | edit: WorkspaceEdit;
|
3215 | }
|
3216 | /**
|
3217 | * The result returned from the apply workspace edit request.
|
3218 | *
|
3219 | * @since 3.17 renamed from ApplyWorkspaceEditResponse
|
3220 | */
|
3221 | export interface ApplyWorkspaceEditResult {
|
3222 | /**
|
3223 | * Indicates whether the edit was applied or not.
|
3224 | */
|
3225 | applied: boolean;
|
3226 | /**
|
3227 | * An optional textual description for why the edit was not applied.
|
3228 | * This may be used by the server for diagnostic logging or to provide
|
3229 | * a suitable error for a request that triggered the edit.
|
3230 | */
|
3231 | failureReason?: string;
|
3232 | /**
|
3233 | * Depending on the client's failure handling strategy `failedChange` might
|
3234 | * contain the index of the change that failed. This property is only available
|
3235 | * if the client signals a `failureHandlingStrategy` in its client capabilities.
|
3236 | */
|
3237 | failedChange?: uinteger;
|
3238 | }
|
3239 | /**
|
3240 | * @deprecated Use ApplyWorkspaceEditResult instead.
|
3241 | */
|
3242 | export type ApplyWorkspaceEditResponse = ApplyWorkspaceEditResult;
|
3243 | /**
|
3244 | * A request sent from the server to the client to modified certain resources.
|
3245 | */
|
3246 | export declare namespace ApplyWorkspaceEditRequest {
|
3247 | const method: 'workspace/applyEdit';
|
3248 | const messageDirection: MessageDirection;
|
3249 | const type: ProtocolRequestType<ApplyWorkspaceEditParams, ApplyWorkspaceEditResult, never, void, void>;
|
3250 | }
|
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 };
|
3252 | export { DocumentColorOptions as ColorProviderOptions, DocumentColorOptions as ColorOptions, FoldingRangeOptions as FoldingRangeProviderOptions, SelectionRangeOptions as SelectionRangeProviderOptions, DocumentColorRegistrationOptions as ColorRegistrationOptions };
|