lsp 0.1.0

Language Server Protocol
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
//! LSP Requests.

use crate::*;

pub trait Request {
  const METHOD: &'static str;
  type Params: Send + serde::Serialize + serde::de::DeserializeOwned;
  type Result: Send + serde::Serialize + serde::de::DeserializeOwned;
}

/// A request to resolve the implementation locations of a symbol at a given
/// text document position. The request's parameter is of type
/// [`TextDocumentPositionParams`](crate::TextDocumentPositionParams)
/// the response is of type [`Definition`](crate::Definition) or a Thenable that
/// resolves to such.
pub enum TextDocumentImplementation {}
impl Request for TextDocumentImplementation {
  const METHOD: &'static str = "textDocument/implementation";
  type Params = ImplementationParams;
  type Result = Option<Or2<Definition, Vec<DefinitionLink>>>;
}
/// A request to resolve the type definition locations of a symbol at a given
/// text document position. The request's parameter is of type
/// [`TextDocumentPositionParams`](crate::TextDocumentPositionParams)
/// the response is of type [`Definition`](crate::Definition) or a Thenable that
/// resolves to such.
pub enum TextDocumentTypeDefinition {}
impl Request for TextDocumentTypeDefinition {
  const METHOD: &'static str = "textDocument/typeDefinition";
  type Params = TypeDefinitionParams;
  type Result = Option<Or2<Definition, Vec<DefinitionLink>>>;
}
/// The `workspace/workspaceFolders` is sent from the server to the client to
/// fetch the open workspace folders.
pub enum WorkspaceWorkspaceFolders {}
impl Request for WorkspaceWorkspaceFolders {
  const METHOD: &'static str = "workspace/workspaceFolders";
  type Params = ();
  type Result = Option<Vec<WorkspaceFolder>>;
}
/// The 'workspace/configuration' request is sent from the server to the client
/// to fetch a certain configuration setting.
///
/// This pull model replaces the old push model where the client signaled
/// configuration change via an event. If the server still needs to react to
/// configuration changes (since the server caches the result of `workspace/
/// configuration` requests) the server should register for an empty
/// configuration change event and empty the cache if such an event is received.
pub enum WorkspaceConfiguration {}
impl Request for WorkspaceConfiguration {
  const METHOD: &'static str = "workspace/configuration";
  type Params = ConfigurationParams;
  type Result = Vec<Value>;
}
/// A request to list all color symbols found in a given text document. The
/// request's parameter is of type
/// [`DocumentColorParams`](crate::DocumentColorParams) the response is of type
/// [`Vec<ColorInformation>`](crate::ColorInformation) or a Thenable
/// that resolves to such.
pub enum TextDocumentDocumentColor {}
impl Request for TextDocumentDocumentColor {
  const METHOD: &'static str = "textDocument/documentColor";
  type Params = DocumentColorParams;
  type Result = Vec<ColorInformation>;
}
/// A request to list all presentation for a color. The request's
/// parameter is of type
/// [`ColorPresentationParams`](crate::ColorPresentationParams) the response is
/// of type [`Vec<ColorInformation>`](crate::ColorInformation) or a Thenable
/// that resolves to such.
pub enum TextDocumentColorPresentation {}
impl Request for TextDocumentColorPresentation {
  const METHOD: &'static str = "textDocument/colorPresentation";
  type Params = ColorPresentationParams;
  type Result = Vec<ColorPresentation>;
}
/// A request to provide folding ranges in a document. The request's
/// parameter is of type [`FoldingRangeParams`](crate::FoldingRangeParams), the
/// response is of type [`FoldingRangeList`](crate::FoldingRange) or a Thenable
/// that resolves to such.
pub enum TextDocumentFoldingRange {}
impl Request for TextDocumentFoldingRange {
  const METHOD: &'static str = "textDocument/foldingRange";
  type Params = FoldingRangeParams;
  type Result = Option<Vec<FoldingRange>>;
}
/// @since 3.18.0
/// @proposed
pub enum WorkspaceFoldingRangeRefresh {}
impl Request for WorkspaceFoldingRangeRefresh {
  const METHOD: &'static str = "workspace/foldingRange/refresh";
  type Params = ();
  type Result = ();
}
/// A request to resolve the type definition locations of a symbol at a given
/// text document position. The request's parameter is of type
/// [`TextDocumentPositionParams`](crate::TextDocumentPositionParams)
/// the response is of type [`Declaration`](crate::Declaration) or a typed array
/// of [`DeclarationLink`](crate::DeclarationLink) or a Thenable that resolves
/// to such.
pub enum TextDocumentDeclaration {}
impl Request for TextDocumentDeclaration {
  const METHOD: &'static str = "textDocument/declaration";
  type Params = DeclarationParams;
  type Result = Option<Or2<Declaration, Vec<DeclarationLink>>>;
}
/// A request to provide selection ranges in a document. The request's
/// parameter is of type [`SelectionRangeParams`](crate::SelectionRangeParams),
/// the response is of type [`Vec<SelectionRange>`](crate::SelectionRange) or a
/// Thenable that resolves to such.
pub enum TextDocumentSelectionRange {}
impl Request for TextDocumentSelectionRange {
  const METHOD: &'static str = "textDocument/selectionRange";
  type Params = SelectionRangeParams;
  type Result = Option<Vec<SelectionRange>>;
}
/// The `window/workDoneProgress/create` request is sent from the server to the
/// client to initiate progress reporting from the server.
pub enum WindowWorkDoneProgressCreate {}
impl Request for WindowWorkDoneProgressCreate {
  const METHOD: &'static str = "window/workDoneProgress/create";
  type Params = WorkDoneProgressCreateParams;
  type Result = ();
}
/// A request to result a `CallHierarchyItem` in a document at a given position.
/// Can be used as an input to an incoming or outgoing call hierarchy.
///
/// @since 3.16.0
pub enum TextDocumentPrepareCallHierarchy {}
impl Request for TextDocumentPrepareCallHierarchy {
  const METHOD: &'static str = "textDocument/prepareCallHierarchy";
  type Params = CallHierarchyPrepareParams;
  type Result = Option<Vec<CallHierarchyItem>>;
}
/// A request to resolve the incoming calls for a given `CallHierarchyItem`.
///
/// @since 3.16.0
pub enum CallHierarchyIncomingCalls {}
impl Request for CallHierarchyIncomingCalls {
  const METHOD: &'static str = "callHierarchy/incomingCalls";
  type Params = CallHierarchyIncomingCallsParams;
  type Result = Option<Vec<CallHierarchyIncomingCall>>;
}
/// A request to resolve the outgoing calls for a given `CallHierarchyItem`.
///
/// @since 3.16.0
pub enum CallHierarchyOutgoingCalls {}
impl Request for CallHierarchyOutgoingCalls {
  const METHOD: &'static str = "callHierarchy/outgoingCalls";
  type Params = CallHierarchyOutgoingCallsParams;
  type Result = Option<Vec<CallHierarchyOutgoingCall>>;
}
/// @since 3.16.0
pub enum TextDocumentSemanticTokensFull {}
impl Request for TextDocumentSemanticTokensFull {
  const METHOD: &'static str = "textDocument/semanticTokens/full";
  type Params = SemanticTokensParams;
  type Result = Option<SemanticTokens>;
}
/// @since 3.16.0
pub enum TextDocumentSemanticTokensFullDelta {}
impl Request for TextDocumentSemanticTokensFullDelta {
  const METHOD: &'static str = "textDocument/semanticTokens/full/delta";
  type Params = SemanticTokensDeltaParams;
  type Result = Option<Or2<SemanticTokens, SemanticTokensDelta>>;
}
/// @since 3.16.0
pub enum TextDocumentSemanticTokensRange {}
impl Request for TextDocumentSemanticTokensRange {
  const METHOD: &'static str = "textDocument/semanticTokens/range";
  type Params = SemanticTokensRangeParams;
  type Result = Option<SemanticTokens>;
}
/// @since 3.16.0
pub enum WorkspaceSemanticTokensRefresh {}
impl Request for WorkspaceSemanticTokensRefresh {
  const METHOD: &'static str = "workspace/semanticTokens/refresh";
  type Params = ();
  type Result = ();
}
/// A request to show a document. This request might open an
/// external program depending on the value of the URI to open.
/// For example a request to open `https://code.visualstudio.com/`
/// will very likely open the URI in a WEB browser.
///
/// @since 3.16.0
pub enum WindowShowDocument {}
impl Request for WindowShowDocument {
  const METHOD: &'static str = "window/showDocument";
  type Params = ShowDocumentParams;
  type Result = ShowDocumentResult;
}
/// A request to provide ranges that can be edited together.
///
/// @since 3.16.0
pub enum TextDocumentLinkedEditingRange {}
impl Request for TextDocumentLinkedEditingRange {
  const METHOD: &'static str = "textDocument/linkedEditingRange";
  type Params = LinkedEditingRangeParams;
  type Result = Option<LinkedEditingRanges>;
}
/// The will create files request is sent from the client to the server before
/// files are actually created as long as the creation is triggered from within
/// the client.
///
/// The request can return a `WorkspaceEdit` which will be applied to workspace
/// before the files are created. Hence the `WorkspaceEdit` can not manipulate
/// the content of the file to be created.
///
/// @since 3.16.0
pub enum WorkspaceWillCreateFiles {}
impl Request for WorkspaceWillCreateFiles {
  const METHOD: &'static str = "workspace/willCreateFiles";
  type Params = CreateFilesParams;
  type Result = Option<WorkspaceEdit>;
}
/// The will rename files request is sent from the client to the server before
/// files are actually renamed as long as the rename is triggered from within
/// the client.
///
/// @since 3.16.0
pub enum WorkspaceWillRenameFiles {}
impl Request for WorkspaceWillRenameFiles {
  const METHOD: &'static str = "workspace/willRenameFiles";
  type Params = RenameFilesParams;
  type Result = Option<WorkspaceEdit>;
}
/// The did delete files notification is sent from the client to the server when
/// files were deleted from within the client.
///
/// @since 3.16.0
pub enum WorkspaceWillDeleteFiles {}
impl Request for WorkspaceWillDeleteFiles {
  const METHOD: &'static str = "workspace/willDeleteFiles";
  type Params = DeleteFilesParams;
  type Result = Option<WorkspaceEdit>;
}
/// A request to get the moniker of a symbol at a given text document position.
/// The request parameter is of type
/// [`TextDocumentPositionParams`](crate::TextDocumentPositionParams).
/// The response is of type [`Vec<Moniker>`](crate::Moniker) or `null`.
pub enum TextDocumentMoniker {}
impl Request for TextDocumentMoniker {
  const METHOD: &'static str = "textDocument/moniker";
  type Params = MonikerParams;
  type Result = Option<Vec<Moniker>>;
}
/// A request to result a `TypeHierarchyItem` in a document at a given position.
/// Can be used as an input to a subtypes or supertypes type hierarchy.
///
/// @since 3.17.0
pub enum TextDocumentPrepareTypeHierarchy {}
impl Request for TextDocumentPrepareTypeHierarchy {
  const METHOD: &'static str = "textDocument/prepareTypeHierarchy";
  type Params = TypeHierarchyPrepareParams;
  type Result = Option<Vec<TypeHierarchyItem>>;
}
/// A request to resolve the supertypes for a given `TypeHierarchyItem`.
///
/// @since 3.17.0
pub enum TypeHierarchySupertypes {}
impl Request for TypeHierarchySupertypes {
  const METHOD: &'static str = "typeHierarchy/supertypes";
  type Params = TypeHierarchySupertypesParams;
  type Result = Option<Vec<TypeHierarchyItem>>;
}
/// A request to resolve the subtypes for a given `TypeHierarchyItem`.
///
/// @since 3.17.0
pub enum TypeHierarchySubtypes {}
impl Request for TypeHierarchySubtypes {
  const METHOD: &'static str = "typeHierarchy/subtypes";
  type Params = TypeHierarchySubtypesParams;
  type Result = Option<Vec<TypeHierarchyItem>>;
}
/// A request to provide inline values in a document. The request's parameter is
/// of type [`InlineValueParams`](crate::InlineValueParams), the response is of
/// type [`Vec<InlineValue>`](crate::InlineValue) or a Thenable that resolves to
/// such.
///
/// @since 3.17.0
pub enum TextDocumentInlineValue {}
impl Request for TextDocumentInlineValue {
  const METHOD: &'static str = "textDocument/inlineValue";
  type Params = InlineValueParams;
  type Result = Option<Vec<InlineValue>>;
}
/// @since 3.17.0
pub enum WorkspaceInlineValueRefresh {}
impl Request for WorkspaceInlineValueRefresh {
  const METHOD: &'static str = "workspace/inlineValue/refresh";
  type Params = ();
  type Result = ();
}
/// A request to provide inlay hints in a document. The request's parameter is
/// of type [`InlayHintsParams`](InlayHintParams), the response is of type
/// [`Vec<InlayHint>`](crate::InlayHint) or a Thenable that resolves to such.
///
/// @since 3.17.0
pub enum TextDocumentInlayHint {}
impl Request for TextDocumentInlayHint {
  const METHOD: &'static str = "textDocument/inlayHint";
  type Params = InlayHintParams;
  type Result = Option<Vec<InlayHint>>;
}
/// A request to resolve additional properties for an inlay hint.
/// The request's parameter is of type [`InlayHint`](crate::InlayHint), the
/// response is of type [`InlayHint`](crate::InlayHint) or a Thenable that
/// resolves to such.
///
/// @since 3.17.0
pub enum InlayHintResolve {}
impl Request for InlayHintResolve {
  const METHOD: &'static str = "inlayHint/resolve";
  type Params = InlayHint;
  type Result = InlayHint;
}
/// @since 3.17.0
pub enum WorkspaceInlayHintRefresh {}
impl Request for WorkspaceInlayHintRefresh {
  const METHOD: &'static str = "workspace/inlayHint/refresh";
  type Params = ();
  type Result = ();
}
/// The document diagnostic request definition.
///
/// @since 3.17.0
pub enum TextDocumentDiagnostic {}
impl Request for TextDocumentDiagnostic {
  const METHOD: &'static str = "textDocument/diagnostic";
  type Params = DocumentDiagnosticParams;
  type Result = DocumentDiagnosticReport;
}
/// The workspace diagnostic request definition.
///
/// @since 3.17.0
pub enum WorkspaceDiagnostic {}
impl Request for WorkspaceDiagnostic {
  const METHOD: &'static str = "workspace/diagnostic";
  type Params = WorkspaceDiagnosticParams;
  type Result = WorkspaceDiagnosticReport;
}
/// The diagnostic refresh request definition.
///
/// @since 3.17.0
pub enum WorkspaceDiagnosticRefresh {}
impl Request for WorkspaceDiagnosticRefresh {
  const METHOD: &'static str = "workspace/diagnostic/refresh";
  type Params = ();
  type Result = ();
}
/// A request to provide inline completions in a document. The request's
/// parameter is of
/// type [`InlineCompletionParams`](crate::InlineCompletionParams), the response
/// is of type [`Vec<InlineCompletion>`](InlineCompletionItem) or a Thenable
/// that resolves to such.
///
/// @since 3.18.0
/// @proposed
pub enum TextDocumentInlineCompletion {}
impl Request for TextDocumentInlineCompletion {
  const METHOD: &'static str = "textDocument/inlineCompletion";
  type Params = InlineCompletionParams;
  type Result = Option<Or2<InlineCompletionList, Vec<InlineCompletionItem>>>;
}
/// The `client/registerCapability` request is sent from the server to the
/// client to register a new capability handler on the client side.
pub enum ClientRegisterCapability {}
impl Request for ClientRegisterCapability {
  const METHOD: &'static str = "client/registerCapability";
  type Params = RegistrationParams;
  type Result = ();
}
/// The `client/unregisterCapability` request is sent from the server to the
/// client to unregister a previously registered capability handler on the
/// client side.
pub enum ClientUnregisterCapability {}
impl Request for ClientUnregisterCapability {
  const METHOD: &'static str = "client/unregisterCapability";
  type Params = UnregistrationParams;
  type Result = ();
}
/// The initialize request is sent from the client to the server.
/// It is sent once as the request after starting up the server.
/// The requests parameter is of type
/// [`InitializeParams`](crate::InitializeParams) the response if of type
/// [`InitializeResult`](crate::InitializeResult) of a Thenable that resolves to
/// such.
pub enum Initialize {}
impl Request for Initialize {
  const METHOD: &'static str = "initialize";
  type Params = InitializeParams;
  type Result = InitializeResult;
}
/// A shutdown request is sent from the client to the server.
/// It is sent once when the client decides to shutdown the
/// server. The only notification that is sent after a shutdown request
/// is the exit event.
pub enum Shutdown {}
impl Request for Shutdown {
  const METHOD: &'static str = "shutdown";
  type Params = ();
  type Result = ();
}
/// The show message request is sent from the server to the client to show a
/// message and a set of options actions to the user.
pub enum WindowShowMessageRequest {}
impl Request for WindowShowMessageRequest {
  const METHOD: &'static str = "window/showMessageRequest";
  type Params = ShowMessageRequestParams;
  type Result = Option<MessageActionItem>;
}
/// A document will save request is sent from the client to the server before
/// the document is actually saved. The request can return an array of TextEdits
/// which will be applied to the text document before it is saved. Please note
/// that clients might drop results if computing the text edits took too long or
/// if a server constantly fails on this request. This is done to keep the save
/// fast and reliable.
pub enum TextDocumentWillSaveWaitUntil {}
impl Request for TextDocumentWillSaveWaitUntil {
  const METHOD: &'static str = "textDocument/willSaveWaitUntil";
  type Params = WillSaveTextDocumentParams;
  type Result = Option<Vec<TextEdit>>;
}
/// Request to request completion at a given text document position. The
/// request's parameter is of type
/// [`TextDocumentPosition`](TextDocumentPositionParams) the response is of type
/// [`Vec<CompletionItem>`](crate::CompletionItem) or
/// [`CompletionList`](crate::CompletionList) or a Thenable that resolves to
/// such.
///
/// The request can delay the computation of the
/// [``detail``](crate::CompletionItem)
/// and [``documentation``](crate::CompletionItem) properties to the
/// `completionItem/resolve` request. However, properties that are needed for
/// the initial sorting and filtering, like `sortText`, `filterText`,
/// `insertText`, and `textEdit`, must not be changed during resolve.
pub enum TextDocumentCompletion {}
impl Request for TextDocumentCompletion {
  const METHOD: &'static str = "textDocument/completion";
  type Params = CompletionParams;
  type Result = Option<Or2<Vec<CompletionItem>, CompletionList>>;
}
/// Request to resolve additional information for a given completion item.The
/// request's parameter is of type [`CompletionItem`](crate::CompletionItem) the
/// response is of type [`CompletionItem`](crate::CompletionItem) or a Thenable
/// that resolves to such.
pub enum CompletionItemResolve {}
impl Request for CompletionItemResolve {
  const METHOD: &'static str = "completionItem/resolve";
  type Params = CompletionItem;
  type Result = CompletionItem;
}
/// Request to request hover information at a given text document position. The
/// request's parameter is of type
/// [`TextDocumentPosition`](TextDocumentPositionParams) the response is of type
/// [`Hover`](crate::Hover) or a Thenable that resolves to such.
pub enum TextDocumentHover {}
impl Request for TextDocumentHover {
  const METHOD: &'static str = "textDocument/hover";
  type Params = HoverParams;
  type Result = Option<Hover>;
}
pub enum TextDocumentSignatureHelp {}
impl Request for TextDocumentSignatureHelp {
  const METHOD: &'static str = "textDocument/signatureHelp";
  type Params = SignatureHelpParams;
  type Result = Option<SignatureHelp>;
}
/// A request to resolve the definition location of a symbol at a given text
/// document position. The request's parameter is of type
/// [`TextDocumentPosition`](TextDocumentPositionParams) the response is of
/// either type [`Definition`](crate::Definition) or a typed array of
/// [`DefinitionLink`](crate::DefinitionLink) or a Thenable that resolves to
/// such.
pub enum TextDocumentDefinition {}
impl Request for TextDocumentDefinition {
  const METHOD: &'static str = "textDocument/definition";
  type Params = DefinitionParams;
  type Result = Option<Or2<Definition, Vec<DefinitionLink>>>;
}
/// A request to resolve project-wide references for the symbol denoted
/// by the given text document position. The request's parameter is of
/// type [`ReferenceParams`](crate::ReferenceParams) the response is of type
/// [`Vec<Location>`](crate::Location) or a Thenable that resolves to such.
pub enum TextDocumentReferences {}
impl Request for TextDocumentReferences {
  const METHOD: &'static str = "textDocument/references";
  type Params = ReferenceParams;
  type Result = Option<Vec<Location>>;
}
/// Request to resolve a [`DocumentHighlight`](crate::DocumentHighlight) for a
/// given text document position. The request's parameter is of type
/// [`TextDocumentPosition`](TextDocumentPositionParams) the request response is
/// an array of type [`DocumentHighlight`](crate::DocumentHighlight)
/// or a Thenable that resolves to such.
pub enum TextDocumentDocumentHighlight {}
impl Request for TextDocumentDocumentHighlight {
  const METHOD: &'static str = "textDocument/documentHighlight";
  type Params = DocumentHighlightParams;
  type Result = Option<Vec<DocumentHighlight>>;
}
/// A request to list all symbols found in a given text document. The request's
/// parameter is of type
/// [`TextDocumentIdentifier`](crate::TextDocumentIdentifier) the response is of
/// type [`Vec<SymbolInformation>`](crate::SymbolInformation) or a Thenable that
/// resolves to such.
pub enum TextDocumentDocumentSymbol {}
impl Request for TextDocumentDocumentSymbol {
  const METHOD: &'static str = "textDocument/documentSymbol";
  type Params = DocumentSymbolParams;
  type Result = Option<Or2<Vec<SymbolInformation>, Vec<DocumentSymbol>>>;
}
/// A request to provide commands for the given text document and range.
pub enum TextDocumentCodeAction {}
impl Request for TextDocumentCodeAction {
  const METHOD: &'static str = "textDocument/codeAction";
  type Params = CodeActionParams;
  type Result = Option<Vec<Or2<Command, CodeAction>>>;
}
/// Request to resolve additional information for a given code action.The
/// request's parameter is of type [`CodeAction`](crate::CodeAction) the
/// response is of type [`CodeAction`](crate::CodeAction) or a Thenable that
/// resolves to such.
pub enum CodeActionResolve {}
impl Request for CodeActionResolve {
  const METHOD: &'static str = "codeAction/resolve";
  type Params = CodeAction;
  type Result = CodeAction;
}
/// A request to list project-wide symbols matching the query string given
/// by the [`WorkspaceSymbolParams`](crate::WorkspaceSymbolParams). The response
/// is of type [`Vec<SymbolInformation>`](crate::SymbolInformation) or a
/// Thenable that resolves to such.
///
/// @since 3.17.0 - support for WorkspaceSymbol in the returned data. Clients
///  need to advertise support for WorkspaceSymbols via the client capability
///  `workspace.symbol.resolveSupport`.
pub enum WorkspaceSymbolRequest {}
impl Request for WorkspaceSymbolRequest {
  const METHOD: &'static str = "workspace/symbol";
  type Params = WorkspaceSymbolParams;
  type Result = Option<Or2<Vec<SymbolInformation>, Vec<WorkspaceSymbol>>>;
}
/// A request to resolve the range inside the workspace
/// symbol's location.
///
/// @since 3.17.0
pub enum WorkspaceSymbolResolve {}
impl Request for WorkspaceSymbolResolve {
  const METHOD: &'static str = "workspaceSymbol/resolve";
  type Params = WorkspaceSymbol;
  type Result = WorkspaceSymbol;
}
/// A request to provide code lens for the given text document.
pub enum TextDocumentCodeLens {}
impl Request for TextDocumentCodeLens {
  const METHOD: &'static str = "textDocument/codeLens";
  type Params = CodeLensParams;
  type Result = Option<Vec<CodeLens>>;
}
/// A request to resolve a command for a given code lens.
pub enum CodeLensResolve {}
impl Request for CodeLensResolve {
  const METHOD: &'static str = "codeLens/resolve";
  type Params = CodeLens;
  type Result = CodeLens;
}
/// A request to refresh all code actions
///
/// @since 3.16.0
pub enum WorkspaceCodeLensRefresh {}
impl Request for WorkspaceCodeLensRefresh {
  const METHOD: &'static str = "workspace/codeLens/refresh";
  type Params = ();
  type Result = ();
}
/// A request to provide document links
pub enum TextDocumentDocumentLink {}
impl Request for TextDocumentDocumentLink {
  const METHOD: &'static str = "textDocument/documentLink";
  type Params = DocumentLinkParams;
  type Result = Option<Vec<DocumentLink>>;
}
/// Request to resolve additional information for a given document link. The
/// request's parameter is of type [`DocumentLink`](crate::DocumentLink) the
/// response is of type [`DocumentLink`](crate::DocumentLink) or a Thenable that
/// resolves to such.
pub enum DocumentLinkResolve {}
impl Request for DocumentLinkResolve {
  const METHOD: &'static str = "documentLink/resolve";
  type Params = DocumentLink;
  type Result = DocumentLink;
}
/// A request to format a whole document.
pub enum TextDocumentFormatting {}
impl Request for TextDocumentFormatting {
  const METHOD: &'static str = "textDocument/formatting";
  type Params = DocumentFormattingParams;
  type Result = Option<Vec<TextEdit>>;
}
/// A request to format a range in a document.
pub enum TextDocumentRangeFormatting {}
impl Request for TextDocumentRangeFormatting {
  const METHOD: &'static str = "textDocument/rangeFormatting";
  type Params = DocumentRangeFormattingParams;
  type Result = Option<Vec<TextEdit>>;
}
/// A request to format ranges in a document.
///
/// @since 3.18.0
/// @proposed
pub enum TextDocumentRangesFormatting {}
impl Request for TextDocumentRangesFormatting {
  const METHOD: &'static str = "textDocument/rangesFormatting";
  type Params = DocumentRangesFormattingParams;
  type Result = Option<Vec<TextEdit>>;
}
/// A request to format a document on type.
pub enum TextDocumentOnTypeFormatting {}
impl Request for TextDocumentOnTypeFormatting {
  const METHOD: &'static str = "textDocument/onTypeFormatting";
  type Params = DocumentOnTypeFormattingParams;
  type Result = Option<Vec<TextEdit>>;
}
/// A request to rename a symbol.
pub enum TextDocumentRename {}
impl Request for TextDocumentRename {
  const METHOD: &'static str = "textDocument/rename";
  type Params = RenameParams;
  type Result = Option<WorkspaceEdit>;
}
/// A request to test and perform the setup necessary for a rename.
///
/// @since 3.16 - support for default behavior
pub enum TextDocumentPrepareRename {}
impl Request for TextDocumentPrepareRename {
  const METHOD: &'static str = "textDocument/prepareRename";
  type Params = PrepareRenameParams;
  type Result = Option<PrepareRenameResult>;
}
/// A request send from the client to the server to execute a command. The
/// request might return a workspace edit which the client will apply to the
/// workspace.
pub enum WorkspaceExecuteCommand {}
impl Request for WorkspaceExecuteCommand {
  const METHOD: &'static str = "workspace/executeCommand";
  type Params = ExecuteCommandParams;
  type Result = Option<Value>;
}
/// A request sent from the server to the client to modified certain resources.
pub enum WorkspaceApplyEdit {}
impl Request for WorkspaceApplyEdit {
  const METHOD: &'static str = "workspace/applyEdit";
  type Params = ApplyWorkspaceEditParams;
  type Result = ApplyWorkspaceEditResult;
}