1use super::*;
2use serde::{Deserialize, Serialize};
3use serde_repr::{Deserialize_repr, Serialize_repr};
4
5#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
6pub struct ConfigurationItem {
7 #[doc = " The scope to get the configuration section for."]
8 #[serde(skip_serializing_if = "Option::is_none")]
9 #[serde(rename = "scopeUri")]
10 pub scope_uri: Option<DocumentUri>,
11 #[doc = " The configuration section asked for."]
12 #[serde(skip_serializing_if = "Option::is_none")]
13 pub section: Option<String>,
14}
15#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
16pub struct ConfigurationParams {
17 pub items: Vec<ConfigurationItem>,
18}
19#[doc = " Create file operation"]
20#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
21pub struct CreateFile {
22 #[doc = " An optional annotation identifer describing the operation."]
23 #[serde(skip_serializing_if = "Option::is_none")]
24 #[serde(rename = "annotationId")]
25 pub annotation_id: Option<ChangeAnnotationIdentifier>,
26 #[doc = " A create"]
27 pub kind: String,
28 #[doc = " Additional options"]
29 #[serde(skip_serializing_if = "Option::is_none")]
30 pub options: Option<CreateFileOptions>,
31 #[doc = " The resource to create."]
32 pub uri: DocumentUri,
33}
34#[doc = " Options to create a file."]
35#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
36pub struct CreateFileOptions {
37 #[doc = " Ignore if exists."]
38 #[serde(skip_serializing_if = "Option::is_none")]
39 #[serde(rename = "ignoreIfExists")]
40 pub ignore_if_exists: Option<bool>,
41 #[doc = " Overwrite existing file. Overwrite wins over `ignoreIfExists`"]
42 #[serde(skip_serializing_if = "Option::is_none")]
43 pub overwrite: Option<bool>,
44}
45#[doc = " The parameters sent in notifications/requests for user-initiated creation of files."]
46#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
47pub struct CreateFilesParams {
48 #[doc = " An array of all files/folders created in this operation."]
49 pub files: Vec<FileCreate>,
50}
51#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
52pub struct DeclarationClientCapabilities {
53 #[doc = " Whether declaration supports dynamic registration. If this is set to `true` the client "]
54 #[doc = " supports the new `DeclarationRegistrationOptions` return value for the corresponding server "]
55 #[doc = " capability as well."]
56 #[serde(skip_serializing_if = "Option::is_none")]
57 #[serde(rename = "dynamicRegistration")]
58 pub dynamic_registration: Option<bool>,
59 #[doc = " The client supports additional metadata in the form of declaration links."]
60 #[serde(skip_serializing_if = "Option::is_none")]
61 #[serde(rename = "linkSupport")]
62 pub link_support: Option<bool>,
63}
64#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
65pub struct DeclarationOptions {
66 #[serde(skip_serializing_if = "Option::is_none")]
67 #[serde(rename = "workDoneProgress")]
68 pub work_done_progress: Option<bool>,
69}
70#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
71pub struct DeclarationParams {
72 #[doc = " An optional token that a server can use to report partial results (e.g. streaming) to the "]
73 #[doc = " client."]
74 #[serde(skip_serializing_if = "Option::is_none")]
75 #[serde(rename = "partialResultToken")]
76 pub partial_result_token: Option<ProgressToken>,
77 #[doc = " The position inside the text document."]
78 pub position: Position,
79 #[doc = " The text document."]
80 #[serde(rename = "textDocument")]
81 pub text_document: TextDocumentIdentifier,
82 #[doc = " An optional token that a server can use to report work done progress."]
83 #[serde(skip_serializing_if = "Option::is_none")]
84 #[serde(rename = "workDoneToken")]
85 pub work_done_token: Option<ProgressToken>,
86}
87#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
88pub struct DeclarationRegistrationOptions {
89 #[doc = " A document selector to identify the scope of the registration. If set to null the document "]
90 #[doc = " selector provided on the client side will be used."]
91 #[serde(rename = "documentSelector")]
92 pub document_selector: serde_json::Value,
93 #[doc = " The id used to register the request. The id can be used to deregister the request again. "]
94 #[doc = " See also Registration#id."]
95 #[serde(skip_serializing_if = "Option::is_none")]
96 pub id: Option<String>,
97 #[serde(skip_serializing_if = "Option::is_none")]
98 #[serde(rename = "workDoneProgress")]
99 pub work_done_progress: Option<bool>,
100}
101#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
102pub struct DefinitionClientCapabilities {
103 #[doc = " Whether definition supports dynamic registration."]
104 #[serde(skip_serializing_if = "Option::is_none")]
105 #[serde(rename = "dynamicRegistration")]
106 pub dynamic_registration: Option<bool>,
107 #[doc = " The client supports additional metadata in the form of definition links."]
108 #[serde(skip_serializing_if = "Option::is_none")]
109 #[serde(rename = "linkSupport")]
110 pub link_support: Option<bool>,
111}
112#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
113pub struct DefinitionOptions {
114 #[serde(skip_serializing_if = "Option::is_none")]
115 #[serde(rename = "workDoneProgress")]
116 pub work_done_progress: Option<bool>,
117}
118#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
119pub struct DefinitionParams {
120 #[doc = " An optional token that a server can use to report partial results (e.g. streaming) to the "]
121 #[doc = " client."]
122 #[serde(skip_serializing_if = "Option::is_none")]
123 #[serde(rename = "partialResultToken")]
124 pub partial_result_token: Option<ProgressToken>,
125 #[doc = " The position inside the text document."]
126 pub position: Position,
127 #[doc = " The text document."]
128 #[serde(rename = "textDocument")]
129 pub text_document: TextDocumentIdentifier,
130 #[doc = " An optional token that a server can use to report work done progress."]
131 #[serde(skip_serializing_if = "Option::is_none")]
132 #[serde(rename = "workDoneToken")]
133 pub work_done_token: Option<ProgressToken>,
134}
135#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
136pub struct DefinitionRegistrationOptions {
137 #[doc = " A document selector to identify the scope of the registration. If set to null the document "]
138 #[doc = " selector provided on the client side will be used."]
139 #[serde(rename = "documentSelector")]
140 pub document_selector: serde_json::Value,
141 #[serde(skip_serializing_if = "Option::is_none")]
142 #[serde(rename = "workDoneProgress")]
143 pub work_done_progress: Option<bool>,
144}
145#[doc = " Delete file operation"]
146#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
147pub struct DeleteFile {
148 #[doc = " An optional annotation identifer describing the operation."]
149 #[serde(skip_serializing_if = "Option::is_none")]
150 #[serde(rename = "annotationId")]
151 pub annotation_id: Option<ChangeAnnotationIdentifier>,
152 #[doc = " A delete"]
153 pub kind: String,
154 #[doc = " Delete options."]
155 #[serde(skip_serializing_if = "Option::is_none")]
156 pub options: Option<DeleteFileOptions>,
157 #[doc = " The file to delete."]
158 pub uri: DocumentUri,
159}
160#[doc = " Delete file options"]
161#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
162pub struct DeleteFileOptions {
163 #[doc = " Ignore the operation if the file doesn't exist."]
164 #[serde(skip_serializing_if = "Option::is_none")]
165 #[serde(rename = "ignoreIfNotExists")]
166 pub ignore_if_not_exists: Option<bool>,
167 #[doc = " Delete the content recursively if a folder is denoted."]
168 #[serde(skip_serializing_if = "Option::is_none")]
169 pub recursive: Option<bool>,
170}
171#[doc = " The parameters sent in notifications/requests for user-initiated deletes of files."]
172#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
173pub struct DeleteFilesParams {
174 #[doc = " An array of all files/folders deleted in this operation."]
175 pub files: Vec<FileDelete>,
176}
177
178#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
179pub struct Diagnostic {
180 #[doc = " The diagnostic's code, which might appear in the user interface."]
181 #[serde(skip_serializing_if = "Option::is_none")]
182 pub code: Option<DiagnosticCode>,
183 #[doc = " An optional property to describe the error code."]
184 #[serde(skip_serializing_if = "Option::is_none")]
185 #[serde(rename = "codeDescription")]
186 pub code_description: Option<CodeDescription>,
187 #[doc = " A data entry field that is preserved between a `textDocument/publishDiagnostics` "]
188 #[doc = " notification and `textDocument/codeAction` request."]
189 #[serde(skip_serializing_if = "Option::is_none")]
190 pub data: Option<serde_json::Value>,
191 #[doc = " The diagnostic's message."]
192 pub message: String,
193 #[doc = " The range at which the message applies."]
194 pub range: Range,
195 #[doc = " An array of related diagnostic information, e.g. when symbol-names within a scope collide "]
196 #[doc = " all definitions can be marked via this property."]
197 #[serde(skip_serializing_if = "Option::is_none")]
198 #[serde(rename = "relatedInformation")]
199 pub related_information: Option<Vec<DiagnosticRelatedInformation>>,
200 #[doc = " The diagnostic's severity. Can be omitted. If omitted it is up to the client to interpret "]
201 #[doc = " diagnostics as error, warning, info or hint."]
202 #[serde(skip_serializing_if = "Option::is_none")]
203 pub severity: Option<DiagnosticSeverity>,
204 #[doc = " A human-readable string describing the source of this diagnostic, e.g. 'typescript' or "]
205 #[doc = " 'super lint'."]
206 #[serde(skip_serializing_if = "Option::is_none")]
207 pub source: Option<String>,
208 #[doc = " Additional metadata about the diagnostic."]
209 #[serde(skip_serializing_if = "Option::is_none")]
210 pub tags: Option<Vec<DiagnosticTag>>,
211}
212#[doc = " Represents a related message and source code location for a diagnostic. This should be used to "]
213#[doc = " point to code locations that cause or are related to a diagnostics, e.g when duplicating a "]
214#[doc = " symbol in a scope."]
215#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
216pub struct DiagnosticRelatedInformation {
217 #[doc = " The location of this related diagnostic information."]
218 pub location: Location,
219 #[doc = " The message of this related diagnostic information."]
220 pub message: String,
221}
222#[derive(Clone, PartialEq, Debug, Serialize_repr, Deserialize_repr)]
223#[repr(i64)]
224pub enum DiagnosticSeverity {
225 Error = 1,
226 Warning = 2,
227 Information = 3,
228 Hint = 4,
229}
230#[doc = " The diagnostic tags."]
231#[derive(Clone, PartialEq, Debug, Serialize_repr, Deserialize_repr)]
232#[repr(i64)]
233pub enum DiagnosticTag {
234 Unnecessary = 1,
235 Deprecated = 2,
236}
237#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
238pub struct DidChangeConfigurationClientCapabilities {
239 #[doc = " Did change configuration notification supports dynamic registration."]
240 #[serde(skip_serializing_if = "Option::is_none")]
241 #[serde(rename = "dynamicRegistration")]
242 pub dynamic_registration: Option<bool>,
243}
244#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
245pub struct DidChangeConfigurationParams {
246 #[doc = " The actual changed settings"]
247 pub settings: serde_json::Value,
248}
249#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
250pub struct DidChangeTextDocumentParams {
251 #[doc = " The actual content changes. The content changes describe single state changes to the "]
252 #[doc = " document. So if there are two content changes c1 (at array index 0) and c2 (at array index "]
253 #[doc = " 1) for a document in state S then c1 moves the document from S to S' and c2 from S' to S''. "]
254 #[doc = " So c1 is computed on the state S and c2 is computed on the state S'."]
255 #[doc = " "]
256 #[doc = " To mirror the content of a document using change events use the following approach:"]
257 #[doc = " - start with the same initial content"]
258 #[doc = " - apply the 'textDocument/didChange' notifications in the order you receive them."]
259 #[doc = " - apply the `TextDocumentContentChangeEvent`s in a single notification in the order you "]
260 #[doc = " receive them."]
261 #[serde(rename = "contentChanges")]
262 pub content_changes: Vec<TextDocumentContentChangeEvent>,
263 #[doc = " The document that did change. The version number points to the version after all provided "]
264 #[doc = " content changes have been applied."]
265 #[serde(rename = "textDocument")]
266 pub text_document: VersionedTextDocumentIdentifier,
267}
268#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
269pub struct DidChangeWatchedFilesClientCapabilities {
270 #[doc = " Did change watched files notification supports dynamic registration. Please note that the "]
271 #[doc = " current protocol doesn't support static configuration for file changes from the server "]
272 #[doc = " side."]
273 #[serde(skip_serializing_if = "Option::is_none")]
274 #[serde(rename = "dynamicRegistration")]
275 pub dynamic_registration: Option<bool>,
276}
277#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
278pub struct DidChangeWatchedFilesParams {
279 #[doc = " The actual file events."]
280 pub changes: Vec<FileEvent>,
281}
282#[doc = " Describe options to be used when registering for file system change events."]
283#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
284pub struct DidChangeWatchedFilesRegistrationOptions {
285 #[doc = " The watchers to register."]
286 pub watchers: Vec<FileSystemWatcher>,
287}
288#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
289pub struct DidChangeWorkspaceFoldersParams {
290 #[doc = " The actual workspace folder change event."]
291 pub event: WorkspaceFoldersChangeEvent,
292}
293#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
294pub struct DidCloseTextDocumentParams {
295 #[doc = " The document that was closed."]
296 #[serde(rename = "textDocument")]
297 pub text_document: TextDocumentIdentifier,
298}
299#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
300pub struct DidOpenTextDocumentParams {
301 #[doc = " The document that was opened."]
302 #[serde(rename = "textDocument")]
303 pub text_document: TextDocumentItem,
304}
305#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
306pub struct DidSaveTextDocumentParams {
307 #[doc = " Optional the content when saved. Depends on the includeText value when the save "]
308 #[doc = " notification was requested."]
309 #[serde(skip_serializing_if = "Option::is_none")]
310 pub text: Option<String>,
311 #[doc = " The document that was saved."]
312 #[serde(rename = "textDocument")]
313 pub text_document: TextDocumentIdentifier,
314}
315#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
316pub struct DocumentColorClientCapabilities {
317 #[doc = " Whether document color supports dynamic registration."]
318 #[serde(skip_serializing_if = "Option::is_none")]
319 #[serde(rename = "dynamicRegistration")]
320 pub dynamic_registration: Option<bool>,
321}
322#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
323pub struct DocumentColorOptions {
324 #[serde(skip_serializing_if = "Option::is_none")]
325 #[serde(rename = "workDoneProgress")]
326 pub work_done_progress: Option<bool>,
327}
328#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
329pub struct DocumentColorParams {
330 #[doc = " An optional token that a server can use to report partial results (e.g. streaming) to the "]
331 #[doc = " client."]
332 #[serde(skip_serializing_if = "Option::is_none")]
333 #[serde(rename = "partialResultToken")]
334 pub partial_result_token: Option<ProgressToken>,
335 #[doc = " The text document."]
336 #[serde(rename = "textDocument")]
337 pub text_document: TextDocumentIdentifier,
338 #[doc = " An optional token that a server can use to report work done progress."]
339 #[serde(skip_serializing_if = "Option::is_none")]
340 #[serde(rename = "workDoneToken")]
341 pub work_done_token: Option<ProgressToken>,
342}
343#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
344pub struct DocumentColorRegistrationOptions {
345 #[doc = " A document selector to identify the scope of the registration. If set to null the document "]
346 #[doc = " selector provided on the client side will be used."]
347 #[serde(rename = "documentSelector")]
348 pub document_selector: serde_json::Value,
349 #[doc = " The id used to register the request. The id can be used to deregister the request again. "]
350 #[doc = " See also Registration#id."]
351 #[serde(skip_serializing_if = "Option::is_none")]
352 pub id: Option<String>,
353 #[serde(skip_serializing_if = "Option::is_none")]
354 #[serde(rename = "workDoneProgress")]
355 pub work_done_progress: Option<bool>,
356}
357#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
358pub struct DocumentFilter {
359 #[doc = " A language id, like `typescript`."]
360 #[serde(skip_serializing_if = "Option::is_none")]
361 pub language: Option<String>,
362 #[doc = " A glob pattern, like `*.{ts,js}`."]
363 #[doc = " "]
364 #[doc = " Glob patterns can have the following syntax:"]
365 #[doc = " - `*` to match one or more characters in a path segment"]
366 #[doc = " - `?` to match on one character in a path segment"]
367 #[doc = " - `**` to match any number of path segments, including none"]
368 #[doc = " - `{}` to group sub patterns into an OR expression. (e.g. `**\u{200b}/*.{ts,js}` matches all "]
369 #[doc = " TypeScript and JavaScript files)"]
370 #[doc = " - `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` "]
371 #[doc = " to match on `example.0`, `example.1`, …)"]
372 #[doc = " - `[!...]` to negate a range of characters to match in a path segment (e.g., "]
373 #[doc = " `example.[!0-9]` to match on `example.a`, `example.b`, but not `example.0`)"]
374 #[serde(skip_serializing_if = "Option::is_none")]
375 pub pattern: Option<String>,
376 #[doc = " A Uri [scheme](#Uri.scheme), like `file` or `untitled`."]
377 #[serde(skip_serializing_if = "Option::is_none")]
378 pub scheme: Option<String>,
379}
380#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
381pub struct DocumentFormattingClientCapabilities {
382 #[doc = " Whether formatting supports dynamic registration."]
383 #[serde(skip_serializing_if = "Option::is_none")]
384 #[serde(rename = "dynamicRegistration")]
385 pub dynamic_registration: Option<bool>,
386}
387#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
388pub struct DocumentFormattingOptions {
389 #[serde(skip_serializing_if = "Option::is_none")]
390 #[serde(rename = "workDoneProgress")]
391 pub work_done_progress: Option<bool>,
392}
393#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
394pub struct DocumentFormattingParams {
395 #[doc = " The format options."]
396 pub options: FormattingOptions,
397 #[doc = " The document to format."]
398 #[serde(rename = "textDocument")]
399 pub text_document: TextDocumentIdentifier,
400 #[doc = " An optional token that a server can use to report work done progress."]
401 #[serde(skip_serializing_if = "Option::is_none")]
402 #[serde(rename = "workDoneToken")]
403 pub work_done_token: Option<ProgressToken>,
404}
405#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
406pub struct DocumentFormattingRegistrationOptions {
407 #[doc = " A document selector to identify the scope of the registration. If set to null the document "]
408 #[doc = " selector provided on the client side will be used."]
409 #[serde(rename = "documentSelector")]
410 pub document_selector: serde_json::Value,
411 #[serde(skip_serializing_if = "Option::is_none")]
412 #[serde(rename = "workDoneProgress")]
413 pub work_done_progress: Option<bool>,
414}
415#[doc = " A document highlight is a range inside a text document which deserves special attention. "]
416#[doc = " Usually a document highlight is visualized by changing the background color of its range."]
417#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
418pub struct DocumentHighlight {
419 #[doc = " The highlight kind, default is DocumentHighlightKind.Text."]
420 #[serde(skip_serializing_if = "Option::is_none")]
421 pub kind: Option<DocumentHighlightKind>,
422 #[doc = " The range this highlight applies to."]
423 pub range: Range,
424}
425#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
426pub struct DocumentHighlightClientCapabilities {
427 #[doc = " Whether document highlight supports dynamic registration."]
428 #[serde(skip_serializing_if = "Option::is_none")]
429 #[serde(rename = "dynamicRegistration")]
430 pub dynamic_registration: Option<bool>,
431}
432#[doc = " A document highlight kind."]
433#[derive(Clone, PartialEq, Debug, Serialize_repr, Deserialize_repr)]
434#[repr(i64)]
435pub enum DocumentHighlightKind {
436 Text = 1,
437 Read = 2,
438 Write = 3,
439}
440#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
441pub struct DocumentHighlightOptions {
442 #[serde(skip_serializing_if = "Option::is_none")]
443 #[serde(rename = "workDoneProgress")]
444 pub work_done_progress: Option<bool>,
445}
446#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
447pub struct DocumentHighlightParams {
448 #[doc = " An optional token that a server can use to report partial results (e.g. streaming) to the "]
449 #[doc = " client."]
450 #[serde(skip_serializing_if = "Option::is_none")]
451 #[serde(rename = "partialResultToken")]
452 pub partial_result_token: Option<ProgressToken>,
453 #[doc = " The position inside the text document."]
454 pub position: Position,
455 #[doc = " The text document."]
456 #[serde(rename = "textDocument")]
457 pub text_document: TextDocumentIdentifier,
458 #[doc = " An optional token that a server can use to report work done progress."]
459 #[serde(skip_serializing_if = "Option::is_none")]
460 #[serde(rename = "workDoneToken")]
461 pub work_done_token: Option<ProgressToken>,
462}
463#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
464pub struct DocumentHighlightRegistrationOptions {
465 #[doc = " A document selector to identify the scope of the registration. If set to null the document "]
466 #[doc = " selector provided on the client side will be used."]
467 #[serde(rename = "documentSelector")]
468 pub document_selector: serde_json::Value,
469 #[serde(skip_serializing_if = "Option::is_none")]
470 #[serde(rename = "workDoneProgress")]
471 pub work_done_progress: Option<bool>,
472}
473#[doc = " A document link is a range in a text document that links to an internal or external resource, "]
474#[doc = " like another text document or a web site."]
475#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
476pub struct DocumentLink {
477 #[doc = " A data entry field that is preserved on a document link between a DocumentLinkRequest and a "]
478 #[doc = " DocumentLinkResolveRequest."]
479 #[serde(skip_serializing_if = "Option::is_none")]
480 pub data: Option<serde_json::Value>,
481 #[doc = " The range this link applies to."]
482 pub range: Range,
483 #[doc = " The uri this link points to. If missing a resolve request is sent later."]
484 #[serde(skip_serializing_if = "Option::is_none")]
485 pub target: Option<DocumentUri>,
486 #[doc = " The tooltip text when you hover over this link."]
487 #[doc = " "]
488 #[doc = " If a tooltip is provided, is will be displayed in a string that includes instructions on "]
489 #[doc = " how to trigger the link, such as `{0} (ctrl + click)`. The specific instructions vary "]
490 #[doc = " depending on OS, user settings, and localization."]
491 #[serde(skip_serializing_if = "Option::is_none")]
492 pub tooltip: Option<String>,
493}
494#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
495pub struct DocumentLinkClientCapabilities {
496 #[doc = " Whether document link supports dynamic registration."]
497 #[serde(skip_serializing_if = "Option::is_none")]
498 #[serde(rename = "dynamicRegistration")]
499 pub dynamic_registration: Option<bool>,
500 #[doc = " Whether the client supports the `tooltip` property on `DocumentLink`."]
501 #[serde(skip_serializing_if = "Option::is_none")]
502 #[serde(rename = "tooltipSupport")]
503 pub tooltip_support: Option<bool>,
504}
505#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
506pub struct DocumentLinkOptions {
507 #[doc = " Document links have a resolve provider as well."]
508 #[serde(skip_serializing_if = "Option::is_none")]
509 #[serde(rename = "resolveProvider")]
510 pub resolve_provider: Option<bool>,
511 #[serde(skip_serializing_if = "Option::is_none")]
512 #[serde(rename = "workDoneProgress")]
513 pub work_done_progress: Option<bool>,
514}
515#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
516pub struct DocumentLinkParams {
517 #[doc = " An optional token that a server can use to report partial results (e.g. streaming) to the "]
518 #[doc = " client."]
519 #[serde(skip_serializing_if = "Option::is_none")]
520 #[serde(rename = "partialResultToken")]
521 pub partial_result_token: Option<ProgressToken>,
522 #[doc = " The document to provide document links for."]
523 #[serde(rename = "textDocument")]
524 pub text_document: TextDocumentIdentifier,
525 #[doc = " An optional token that a server can use to report work done progress."]
526 #[serde(skip_serializing_if = "Option::is_none")]
527 #[serde(rename = "workDoneToken")]
528 pub work_done_token: Option<ProgressToken>,
529}
530#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
531pub struct DocumentLinkRegistrationOptions {
532 #[doc = " A document selector to identify the scope of the registration. If set to null the document "]
533 #[doc = " selector provided on the client side will be used."]
534 #[serde(rename = "documentSelector")]
535 pub document_selector: serde_json::Value,
536 #[doc = " Document links have a resolve provider as well."]
537 #[serde(skip_serializing_if = "Option::is_none")]
538 #[serde(rename = "resolveProvider")]
539 pub resolve_provider: Option<bool>,
540 #[serde(skip_serializing_if = "Option::is_none")]
541 #[serde(rename = "workDoneProgress")]
542 pub work_done_progress: Option<bool>,
543}
544#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
545pub struct DocumentOnTypeFormattingClientCapabilities {
546 #[doc = " Whether on type formatting supports dynamic registration."]
547 #[serde(skip_serializing_if = "Option::is_none")]
548 #[serde(rename = "dynamicRegistration")]
549 pub dynamic_registration: Option<bool>,
550}
551#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
552pub struct DocumentOnTypeFormattingOptions {
553 #[doc = " A character on which formatting should be triggered, like `}`."]
554 #[serde(rename = "firstTriggerCharacter")]
555 pub first_trigger_character: String,
556 #[doc = " More trigger characters."]
557 #[serde(skip_serializing_if = "Option::is_none")]
558 #[serde(rename = "moreTriggerCharacter")]
559 pub more_trigger_character: Option<Vec<String>>,
560}
561#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
562pub struct DocumentOnTypeFormattingParams {
563 #[doc = " The character that has been typed."]
564 pub ch: String,
565 #[doc = " The format options."]
566 pub options: FormattingOptions,
567 #[doc = " The position inside the text document."]
568 pub position: Position,
569 #[doc = " The text document."]
570 #[serde(rename = "textDocument")]
571 pub text_document: TextDocumentIdentifier,
572}
573#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
574pub struct DocumentOnTypeFormattingRegistrationOptions {
575 #[doc = " A document selector to identify the scope of the registration. If set to null the document "]
576 #[doc = " selector provided on the client side will be used."]
577 #[serde(rename = "documentSelector")]
578 pub document_selector: serde_json::Value,
579 #[doc = " A character on which formatting should be triggered, like `}`."]
580 #[serde(rename = "firstTriggerCharacter")]
581 pub first_trigger_character: String,
582 #[doc = " More trigger characters."]
583 #[serde(skip_serializing_if = "Option::is_none")]
584 #[serde(rename = "moreTriggerCharacter")]
585 pub more_trigger_character: Option<Vec<String>>,
586}
587#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
588pub struct DocumentRangeFormattingClientCapabilities {
589 #[doc = " Whether formatting supports dynamic registration."]
590 #[serde(skip_serializing_if = "Option::is_none")]
591 #[serde(rename = "dynamicRegistration")]
592 pub dynamic_registration: Option<bool>,
593}
594#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
595pub struct DocumentRangeFormattingOptions {
596 #[serde(skip_serializing_if = "Option::is_none")]
597 #[serde(rename = "workDoneProgress")]
598 pub work_done_progress: Option<bool>,
599}
600#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
601pub struct DocumentRangeFormattingParams {
602 #[doc = " The format options"]
603 pub options: FormattingOptions,
604 #[doc = " The range to format"]
605 pub range: Range,
606 #[doc = " The document to format."]
607 #[serde(rename = "textDocument")]
608 pub text_document: TextDocumentIdentifier,
609 #[doc = " An optional token that a server can use to report work done progress."]
610 #[serde(skip_serializing_if = "Option::is_none")]
611 #[serde(rename = "workDoneToken")]
612 pub work_done_token: Option<ProgressToken>,
613}
614#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
615pub struct DocumentRangeFormattingRegistrationOptions {
616 #[doc = " A document selector to identify the scope of the registration. If set to null the document "]
617 #[doc = " selector provided on the client side will be used."]
618 #[serde(rename = "documentSelector")]
619 pub document_selector: serde_json::Value,
620 #[serde(skip_serializing_if = "Option::is_none")]
621 #[serde(rename = "workDoneProgress")]
622 pub work_done_progress: Option<bool>,
623}
624pub type DocumentSelector = Vec<DocumentFilter>;
625#[doc = " Represents programming constructs like variables, classes, interfaces etc. that appear in a "]
626#[doc = " document. Document symbols can be hierarchical and they have two ranges: one that encloses its "]
627#[doc = " definition and one that points to its most interesting range, e.g. the range of an identifier."]
628#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
629pub struct DocumentSymbol {
630 #[doc = " Children of this symbol, e.g. properties of a class."]
631 #[serde(skip_serializing_if = "Option::is_none")]
632 pub children: Option<Vec<DocumentSymbol>>,
633 #[doc = " Indicates if this symbol is deprecated."]
634 #[serde(skip_serializing_if = "Option::is_none")]
635 pub deprecated: Option<bool>,
636 #[doc = " More detail for this symbol, e.g the signature of a function."]
637 #[serde(skip_serializing_if = "Option::is_none")]
638 pub detail: Option<String>,
639 #[doc = " The kind of this symbol."]
640 pub kind: SymbolKind,
641 #[doc = " The name of this symbol. Will be displayed in the user interface and therefore must not be "]
642 #[doc = " an empty string or a string only consisting of white spaces."]
643 pub name: String,
644 #[doc = " The range enclosing this symbol not including leading/trailing whitespace but everything "]
645 #[doc = " else like comments. This information is typically used to determine if the clients cursor "]
646 #[doc = " is inside the symbol to reveal in the symbol in the UI."]
647 pub range: Range,
648 #[doc = " The range that should be selected and revealed when this symbol is being picked, e.g. the "]
649 #[doc = " name of a function. Must be contained by the `range`."]
650 #[serde(rename = "selectionRange")]
651 pub selection_range: Range,
652 #[doc = " Tags for this document symbol."]
653 #[serde(skip_serializing_if = "Option::is_none")]
654 pub tags: Option<Vec<SymbolTag>>,
655}
656#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
657pub struct DocumentSymbolClientCapabilitiesSymbolKind {
658 #[doc = " The symbol kind values the client supports. When this property exists the client also "]
659 #[doc = " guarantees that it will handle values outside its set gracefully and falls back to a "]
660 #[doc = " default value when unknown."]
661 #[doc = " "]
662 #[doc = " If this property is not present the client only supports the symbol kinds from `File` to "]
663 #[doc = " `Array` as defined in the initial version of the protocol."]
664 #[serde(skip_serializing_if = "Option::is_none")]
665 #[serde(rename = "valueSet")]
666 pub value_set: Option<Vec<SymbolKind>>,
667}
668#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
669pub struct DocumentSymbolClientCapabilitiesTagSupport {
670 #[doc = " The tags supported by the client."]
671 #[serde(rename = "valueSet")]
672 pub value_set: Vec<SymbolTag>,
673}
674#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
675pub struct DocumentSymbolClientCapabilities {
676 #[doc = " Whether document symbol supports dynamic registration."]
677 #[serde(skip_serializing_if = "Option::is_none")]
678 #[serde(rename = "dynamicRegistration")]
679 pub dynamic_registration: Option<bool>,
680 #[doc = " The client supports hierarchical document symbols."]
681 #[serde(skip_serializing_if = "Option::is_none")]
682 #[serde(rename = "hierarchicalDocumentSymbolSupport")]
683 pub hierarchical_document_symbol_support: Option<bool>,
684 #[doc = " The client supports an additional label presented in the UI when registering a document "]
685 #[doc = " symbol provider."]
686 #[serde(skip_serializing_if = "Option::is_none")]
687 #[serde(rename = "labelSupport")]
688 pub label_support: Option<bool>,
689 #[doc = " Specific capabilities for the `SymbolKind` in the `textDocument/documentSymbol` request."]
690 #[serde(skip_serializing_if = "Option::is_none")]
691 #[serde(rename = "symbolKind")]
692 pub symbol_kind: Option<DocumentSymbolClientCapabilitiesSymbolKind>,
693 #[doc = " The client supports tags on `SymbolInformation`. Tags are supported on `DocumentSymbol` if "]
694 #[doc = " `hierarchicalDocumentSymbolSupport` is set to true. Clients supporting tags have to handle "]
695 #[doc = " unknown tags gracefully."]
696 #[serde(skip_serializing_if = "Option::is_none")]
697 #[serde(rename = "tagSupport")]
698 pub tag_support: Option<DocumentSymbolClientCapabilitiesTagSupport>,
699}
700#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
701pub struct DocumentSymbolOptions {
702 #[doc = " A human-readable string that is shown when multiple outlines trees are shown for the same "]
703 #[doc = " document."]
704 #[serde(skip_serializing_if = "Option::is_none")]
705 pub label: Option<String>,
706 #[serde(skip_serializing_if = "Option::is_none")]
707 #[serde(rename = "workDoneProgress")]
708 pub work_done_progress: Option<bool>,
709}
710#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
711pub struct DocumentSymbolParams {
712 #[doc = " An optional token that a server can use to report partial results (e.g. streaming) to the "]
713 #[doc = " client."]
714 #[serde(skip_serializing_if = "Option::is_none")]
715 #[serde(rename = "partialResultToken")]
716 pub partial_result_token: Option<ProgressToken>,
717 #[doc = " The text document."]
718 #[serde(rename = "textDocument")]
719 pub text_document: TextDocumentIdentifier,
720 #[doc = " An optional token that a server can use to report work done progress."]
721 #[serde(skip_serializing_if = "Option::is_none")]
722 #[serde(rename = "workDoneToken")]
723 pub work_done_token: Option<ProgressToken>,
724}
725#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
726pub struct DocumentSymbolRegistrationOptions {
727 #[doc = " A document selector to identify the scope of the registration. If set to null the document "]
728 #[doc = " selector provided on the client side will be used."]
729 #[serde(rename = "documentSelector")]
730 pub document_selector: serde_json::Value,
731 #[doc = " A human-readable string that is shown when multiple outlines trees are shown for the same "]
732 #[doc = " document."]
733 #[serde(skip_serializing_if = "Option::is_none")]
734 pub label: Option<String>,
735 #[serde(skip_serializing_if = "Option::is_none")]
736 #[serde(rename = "workDoneProgress")]
737 pub work_done_progress: Option<bool>,
738}
739pub type DocumentUri = url::Url;
740#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
741pub struct ExecuteCommandClientCapabilities {
742 #[doc = " Execute command supports dynamic registration."]
743 #[serde(skip_serializing_if = "Option::is_none")]
744 #[serde(rename = "dynamicRegistration")]
745 pub dynamic_registration: Option<bool>,
746}
747#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
748pub struct ExecuteCommandOptions {
749 #[doc = " The commands to be executed on the server"]
750 pub commands: Vec<String>,
751 #[serde(skip_serializing_if = "Option::is_none")]
752 #[serde(rename = "workDoneProgress")]
753 pub work_done_progress: Option<bool>,
754}
755#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
756pub struct ExecuteCommandParams {
757 #[doc = " Arguments that the command should be invoked with."]
758 #[serde(skip_serializing_if = "Option::is_none")]
759 pub arguments: Option<Vec<serde_json::Value>>,
760 #[doc = " The identifier of the actual command handler."]
761 pub command: String,
762 #[doc = " An optional token that a server can use to report work done progress."]
763 #[serde(skip_serializing_if = "Option::is_none")]
764 #[serde(rename = "workDoneToken")]
765 pub work_done_token: Option<ProgressToken>,
766}
767#[doc = " Execute command registration options."]
768#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
769pub struct ExecuteCommandRegistrationOptions {
770 #[doc = " The commands to be executed on the server"]
771 pub commands: Vec<String>,
772 #[serde(skip_serializing_if = "Option::is_none")]
773 #[serde(rename = "workDoneProgress")]
774 pub work_done_progress: Option<bool>,
775}
776
777#[derive(Clone, PartialEq, Debug, Default)]
778pub struct ExitParams {}
779
780#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
781pub enum FailureHandlingKind {
782 #[serde(rename = "abort")]
783 Abort,
784 #[serde(rename = "transactional")]
785 Transactional,
786 #[serde(rename = "undo")]
787 Undo,
788 #[serde(rename = "textOnlyTransactional")]
789 TextOnlyTransactional,
790}
791#[doc = " The file event type."]
792#[derive(Clone, PartialEq, Debug, Serialize_repr, Deserialize_repr)]
793#[repr(i64)]
794pub enum FileChangeType {
795 Created = 1,
796 Changed = 2,
797 Deleted = 3,
798}
799#[doc = " Represents information on a file/folder create."]
800#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
801pub struct FileCreate {
802 #[doc = " A file:// URI for the location of the file/folder being created."]
803 pub uri: String,
804}
805#[doc = " Represents information on a file/folder delete."]
806#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
807pub struct FileDelete {
808 #[doc = " A file:// URI for the location of the file/folder being deleted."]
809 pub uri: String,
810}
811#[doc = " An event describing a file change."]
812#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
813pub struct FileEvent {
814 #[doc = " The change type."]
815 #[serde(rename = "type")]
816 pub type_: Uinteger,
817 #[doc = " The file's URI."]
818 pub uri: DocumentUri,
819}
820#[doc = " A filter to describe in which file operation requests or notifications the server is interested "]
821#[doc = " in."]
822#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
823pub struct FileOperationFilter {
824 #[doc = " The actual file operation pattern."]
825 pub pattern: FileOperationPattern,
826 #[doc = " A Uri like `file` or `untitled`."]
827 #[serde(skip_serializing_if = "Option::is_none")]
828 pub scheme: Option<String>,
829}
830#[doc = " A pattern to describe in which file operation requests or notifications the server is "]
831#[doc = " interested in."]
832#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
833pub struct FileOperationPattern {
834 #[doc = " The glob pattern to match. Glob patterns can have the following syntax:"]
835 #[doc = " - `*` to match one or more characters in a path segment"]
836 #[doc = " - `?` to match on one character in a path segment"]
837 #[doc = " - `**` to match any number of path segments, including none"]
838 #[doc = " - `{}` to group sub patterns into an OR expression. (e.g. `**\u{200b}/*.{ts,js}` matches all "]
839 #[doc = " TypeScript and JavaScript files)"]
840 #[doc = " - `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` "]
841 #[doc = " to match on `example.0`, `example.1`, …)"]
842 #[doc = " - `[!...]` to negate a range of characters to match in a path segment (e.g., "]
843 #[doc = " `example.[!0-9]` to match on `example.a`, `example.b`, but not `example.0`)"]
844 pub glob: String,
845 #[doc = " Whether to match files or folders with this pattern."]
846 #[doc = " "]
847 #[doc = " Matches both if undefined."]
848 #[serde(skip_serializing_if = "Option::is_none")]
849 pub matches: Option<FileOperationPatternKind>,
850 #[doc = " Additional options used during matching."]
851 #[serde(skip_serializing_if = "Option::is_none")]
852 pub options: Option<FileOperationPatternOptions>,
853}
854#[doc = " A pattern kind describing if a glob pattern matches a file a folder or both."]
855#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
856pub enum FileOperationPatternKind {
857 #[serde(rename = "file")]
858 File,
859 #[serde(rename = "folder")]
860 Folder,
861}
862#[doc = " Matching options for the file operation pattern."]
863#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
864pub struct FileOperationPatternOptions {
865 #[doc = " The pattern should be matched ignoring casing."]
866 #[serde(skip_serializing_if = "Option::is_none")]
867 #[serde(rename = "ignoreCase")]
868 pub ignore_case: Option<bool>,
869}
870#[doc = " The options to register for file operations."]
871#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
872pub struct FileOperationRegistrationOptions {
873 #[doc = " The actual filters."]
874 pub filters: Vec<FileOperationFilter>,
875}
876#[doc = " Represents information on a file/folder rename."]
877#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
878pub struct FileRename {
879 #[doc = " A file:// URI for the new location of the file/folder being renamed."]
880 #[serde(rename = "newUri")]
881 pub new_uri: String,
882 #[doc = " A file:// URI for the original location of the file/folder being renamed."]
883 #[serde(rename = "oldUri")]
884 pub old_uri: String,
885}
886#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
887pub struct FileSystemWatcher {
888 #[doc = " The glob pattern to watch."]
889 #[doc = " "]
890 #[doc = " Glob patterns can have the following syntax:"]
891 #[doc = " - `*` to match one or more characters in a path segment"]
892 #[doc = " - `?` to match on one character in a path segment"]
893 #[doc = " - `**` to match any number of path segments, including none"]
894 #[doc = " - `{}` to group sub patterns into an OR expression. (e.g. `**\u{200b}/*.{ts,js}` matches all "]
895 #[doc = " TypeScript and JavaScript files)"]
896 #[doc = " - `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` "]
897 #[doc = " to match on `example.0`, `example.1`, …)"]
898 #[doc = " - `[!...]` to negate a range of characters to match in a path segment (e.g., "]
899 #[doc = " `example.[!0-9]` to match on `example.a`, `example.b`, but not `example.0`)"]
900 #[serde(rename = "globPattern")]
901 pub glob_pattern: String,
902 #[doc = " The kind of events of interest. If omitted it defaults to WatchKind.Create | "]
903 #[doc = " WatchKind.Change | WatchKind.Delete which is 7."]
904 #[serde(skip_serializing_if = "Option::is_none")]
905 pub kind: Option<Uinteger>,
906}
907#[doc = " Represents a folding range. To be valid, start and end line must be bigger than zero and "]
908#[doc = " smaller than the number of lines in the document. Clients are free to ignore invalid ranges."]
909#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
910pub struct FoldingRange {
911 #[doc = " The zero-based character offset before the folded range ends. If not defined, defaults to "]
912 #[doc = " the length of the end line."]
913 #[serde(skip_serializing_if = "Option::is_none")]
914 #[serde(rename = "endCharacter")]
915 pub end_character: Option<Uinteger>,
916 #[doc = " The zero-based end line of the range to fold. The folded area ends with the line's last "]
917 #[doc = " character. To be valid, the end must be zero or larger and smaller than the number of lines "]
918 #[doc = " in the document."]
919 #[serde(rename = "endLine")]
920 pub end_line: Uinteger,
921 #[doc = " Describes the kind of the folding range such as `comment` or `region`. The kind is used to "]
922 #[doc = " categorize folding ranges and used by commands like 'Fold all comments'. See "]
923 #[doc = " [FoldingRangeKind](#FoldingRangeKind) for an enumeration of standardized kinds."]
924 #[serde(skip_serializing_if = "Option::is_none")]
925 pub kind: Option<String>,
926 #[doc = " The zero-based character offset from where the folded range starts. If not defined, "]
927 #[doc = " defaults to the length of the start line."]
928 #[serde(skip_serializing_if = "Option::is_none")]
929 #[serde(rename = "startCharacter")]
930 pub start_character: Option<Uinteger>,
931 #[doc = " The zero-based start line of the range to fold. The folded area starts after the line's "]
932 #[doc = " last character. To be valid, the end must be zero or larger and smaller than the number of "]
933 #[doc = " lines in the document."]
934 #[serde(rename = "startLine")]
935 pub start_line: Uinteger,
936}
937#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
938pub struct FoldingRangeClientCapabilities {
939 #[doc = " Whether implementation supports dynamic registration for folding range providers. If this "]
940 #[doc = " is set to `true` the client supports the new `FoldingRangeRegistrationOptions` return value "]
941 #[doc = " for the corresponding server capability as well."]
942 #[serde(skip_serializing_if = "Option::is_none")]
943 #[serde(rename = "dynamicRegistration")]
944 pub dynamic_registration: Option<bool>,
945 #[doc = " If set, the client signals that it only supports folding complete lines. If set, client "]
946 #[doc = " will ignore specified `startCharacter` and `endCharacter` properties in a FoldingRange."]
947 #[serde(skip_serializing_if = "Option::is_none")]
948 #[serde(rename = "lineFoldingOnly")]
949 pub line_folding_only: Option<bool>,
950 #[doc = " The maximum number of folding ranges that the client prefers to receive per document. The "]
951 #[doc = " value serves as a hint, servers are free to follow the limit."]
952 #[serde(skip_serializing_if = "Option::is_none")]
953 #[serde(rename = "rangeLimit")]
954 pub range_limit: Option<Uinteger>,
955}
956#[doc = " Enum of known range kinds"]
957#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
958pub enum FoldingRangeKind {
959 #[serde(rename = "comment")]
960 Comment,
961 #[serde(rename = "imports")]
962 Imports,
963 #[serde(rename = "region")]
964 Region,
965}
966#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
967pub struct FoldingRangeOptions {
968 #[serde(skip_serializing_if = "Option::is_none")]
969 #[serde(rename = "workDoneProgress")]
970 pub work_done_progress: Option<bool>,
971}
972#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
973pub struct FoldingRangeParams {
974 #[doc = " An optional token that a server can use to report partial results (e.g. streaming) to the "]
975 #[doc = " client."]
976 #[serde(skip_serializing_if = "Option::is_none")]
977 #[serde(rename = "partialResultToken")]
978 pub partial_result_token: Option<ProgressToken>,
979 #[doc = " The text document."]
980 #[serde(rename = "textDocument")]
981 pub text_document: TextDocumentIdentifier,
982 #[doc = " An optional token that a server can use to report work done progress."]
983 #[serde(skip_serializing_if = "Option::is_none")]
984 #[serde(rename = "workDoneToken")]
985 pub work_done_token: Option<ProgressToken>,
986}
987#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
988pub struct FoldingRangeRegistrationOptions {
989 #[doc = " A document selector to identify the scope of the registration. If set to null the document "]
990 #[doc = " selector provided on the client side will be used."]
991 #[serde(rename = "documentSelector")]
992 pub document_selector: serde_json::Value,
993 #[doc = " The id used to register the request. The id can be used to deregister the request again. "]
994 #[doc = " See also Registration#id."]
995 #[serde(skip_serializing_if = "Option::is_none")]
996 pub id: Option<String>,
997 #[serde(skip_serializing_if = "Option::is_none")]
998 #[serde(rename = "workDoneProgress")]
999 pub work_done_progress: Option<bool>,
1000}
1001#[doc = " Value-object describing what options formatting should use."]
1002#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
1003pub struct FormattingOptions {
1004 #[doc = " Insert a newline character at the end of the file if one does not exist."]
1005 #[serde(skip_serializing_if = "Option::is_none")]
1006 #[serde(rename = "insertFinalNewline")]
1007 pub insert_final_newline: Option<bool>,
1008 #[doc = " Prefer spaces over tabs."]
1009 #[serde(rename = "insertSpaces")]
1010 pub insert_spaces: bool,
1011 #[doc = " Size of a tab in spaces."]
1012 #[serde(rename = "tabSize")]
1013 pub tab_size: Uinteger,
1014 #[doc = " Trim all newlines after the final newline at the end of the file."]
1015 #[serde(skip_serializing_if = "Option::is_none")]
1016 #[serde(rename = "trimFinalNewlines")]
1017 pub trim_final_newlines: Option<bool>,
1018 #[doc = " Trim trailing whitespace on a line."]
1019 #[serde(skip_serializing_if = "Option::is_none")]
1020 #[serde(rename = "trimTrailingWhitespace")]
1021 pub trim_trailing_whitespace: Option<bool>,
1022 #[doc = "Signature for further properties."]
1023 #[serde(flatten)]
1024 pub extra: std::collections::BTreeMap<String, OneOf3<bool, Integer, String>>,
1025}
1026#[doc = " The result of a hover request."]
1027#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
1028pub struct Hover {
1029 #[doc = " The hover's content"]
1030 pub contents: OneOf3<MarkedString, Vec<MarkedString>, MarkupContent>,
1031 #[doc = " An optional range is a range inside a text document that is used to visualize a hover, e.g. "]
1032 #[doc = " by changing the background color."]
1033 #[serde(skip_serializing_if = "Option::is_none")]
1034 pub range: Option<Range>,
1035}
1036#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
1037pub struct HoverClientCapabilities {
1038 #[doc = " Client supports the following content formats if the content property refers to a `literal "]
1039 #[doc = " of type MarkupContent`. The order describes the preferred format of the client."]
1040 #[serde(skip_serializing_if = "Option::is_none")]
1041 #[serde(rename = "contentFormat")]
1042 pub content_format: Option<Vec<MarkupKind>>,
1043 #[doc = " Whether hover supports dynamic registration."]
1044 #[serde(skip_serializing_if = "Option::is_none")]
1045 #[serde(rename = "dynamicRegistration")]
1046 pub dynamic_registration: Option<bool>,
1047}
1048#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
1049pub struct HoverOptions {
1050 #[serde(skip_serializing_if = "Option::is_none")]
1051 #[serde(rename = "workDoneProgress")]
1052 pub work_done_progress: Option<bool>,
1053}
1054#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
1055pub struct HoverParams {
1056 #[doc = " The position inside the text document."]
1057 pub position: Position,
1058 #[doc = " The text document."]
1059 #[serde(rename = "textDocument")]
1060 pub text_document: TextDocumentIdentifier,
1061 #[doc = " An optional token that a server can use to report work done progress."]
1062 #[serde(skip_serializing_if = "Option::is_none")]
1063 #[serde(rename = "workDoneToken")]
1064 pub work_done_token: Option<ProgressToken>,
1065}
1066#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
1067pub struct HoverRegistrationOptions {
1068 #[doc = " A document selector to identify the scope of the registration. If set to null the document "]
1069 #[doc = " selector provided on the client side will be used."]
1070 #[serde(rename = "documentSelector")]
1071 pub document_selector: serde_json::Value,
1072 #[serde(skip_serializing_if = "Option::is_none")]
1073 #[serde(rename = "workDoneProgress")]
1074 pub work_done_progress: Option<bool>,
1075}
1076#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
1077pub struct ImplementationClientCapabilities {
1078 #[doc = " Whether implementation supports dynamic registration. If this is set to `true` the client "]
1079 #[doc = " supports the new `ImplementationRegistrationOptions` return value for the corresponding "]
1080 #[doc = " server capability as well."]
1081 #[serde(skip_serializing_if = "Option::is_none")]
1082 #[serde(rename = "dynamicRegistration")]
1083 pub dynamic_registration: Option<bool>,
1084 #[doc = " The client supports additional metadata in the form of definition links."]
1085 #[serde(skip_serializing_if = "Option::is_none")]
1086 #[serde(rename = "linkSupport")]
1087 pub link_support: Option<bool>,
1088}
1089#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
1090pub struct ImplementationOptions {
1091 #[serde(skip_serializing_if = "Option::is_none")]
1092 #[serde(rename = "workDoneProgress")]
1093 pub work_done_progress: Option<bool>,
1094}
1095#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
1096pub struct ImplementationParams {
1097 #[doc = " An optional token that a server can use to report partial results (e.g. streaming) to the "]
1098 #[doc = " client."]
1099 #[serde(skip_serializing_if = "Option::is_none")]
1100 #[serde(rename = "partialResultToken")]
1101 pub partial_result_token: Option<ProgressToken>,
1102 #[doc = " The position inside the text document."]
1103 pub position: Position,
1104 #[doc = " The text document."]
1105 #[serde(rename = "textDocument")]
1106 pub text_document: TextDocumentIdentifier,
1107 #[doc = " An optional token that a server can use to report work done progress."]
1108 #[serde(skip_serializing_if = "Option::is_none")]
1109 #[serde(rename = "workDoneToken")]
1110 pub work_done_token: Option<ProgressToken>,
1111}
1112#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
1113pub struct ImplementationRegistrationOptions {
1114 #[doc = " A document selector to identify the scope of the registration. If set to null the document "]
1115 #[doc = " selector provided on the client side will be used."]
1116 #[serde(rename = "documentSelector")]
1117 pub document_selector: serde_json::Value,
1118 #[doc = " The id used to register the request. The id can be used to deregister the request again. "]
1119 #[doc = " See also Registration#id."]
1120 #[serde(skip_serializing_if = "Option::is_none")]
1121 pub id: Option<String>,
1122 #[serde(skip_serializing_if = "Option::is_none")]
1123 #[serde(rename = "workDoneProgress")]
1124 pub work_done_progress: Option<bool>,
1125}
1126#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
1127pub struct InitializeError {
1128 #[doc = " Indicates whether the client execute the following retry logic: (1) show the message "]
1129 #[doc = " provided by the ResponseError to the user (2) user selects retry or cancel (3) if user "]
1130 #[doc = " selected retry the initialize method is sent again."]
1131 pub retry: bool,
1132}
1133#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
1134pub struct InitializeParamsClientInfo {
1135 #[doc = " The name of the client as defined by the client."]
1136 pub name: String,
1137 #[doc = " The client's version as defined by the client."]
1138 #[serde(skip_serializing_if = "Option::is_none")]
1139 pub version: Option<String>,
1140}
1141#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
1142pub struct InitializeParams {
1143 #[doc = " The capabilities provided by the client (editor or tool)"]
1144 pub capabilities: ClientCapabilities,
1145 #[doc = " Information about the client"]
1146 #[serde(skip_serializing_if = "Option::is_none")]
1147 #[serde(rename = "clientInfo")]
1148 pub client_info: Option<InitializeParamsClientInfo>,
1149 #[doc = " User provided initialization options."]
1150 #[serde(skip_serializing_if = "Option::is_none")]
1151 #[serde(rename = "initializationOptions")]
1152 pub initialization_options: Option<serde_json::Value>,
1153 #[doc = " The locale the client is currently showing the user interface in. This must not necessarily "]
1154 #[doc = " be the locale of the operating system."]
1155 #[doc = " "]
1156 #[doc = " Uses IETF language tags as the value's syntax (See"]
1157 #[doc = "<https://en.wikipedia.org/wiki/IETF_language_tag>)"]
1158 #[serde(skip_serializing_if = "Option::is_none")]
1159 pub locale: Option<String>,
1160 #[doc = " The process Id of the parent process that started the server. Is null if the process has "]
1161 #[doc = " not been started by another process. If the parent process is not alive then the server "]
1162 #[doc = " should exit (see exit notification) its process."]
1163 #[serde(rename = "processId")]
1164 pub process_id: Option<Integer>,
1165 #[doc = " The rootPath of the workspace. Is null if no folder is open."]
1166 #[serde(default)]
1167 #[serde(skip_serializing_if = "Option::is_none")]
1168 #[serde(rename = "rootPath")]
1169 pub root_path: Option<String>,
1170 #[doc = " The rootUri of the workspace. Is null if no folder is open. If both `rootPath` and "]
1171 #[doc = " `rootUri` are set `rootUri` wins."]
1172 #[serde(rename = "rootUri")]
1173 pub root_uri: Option<DocumentUri>,
1174 #[doc = " The initial trace setting. If omitted trace is disabled ('off')."]
1175 #[serde(skip_serializing_if = "Option::is_none")]
1176 pub trace: Option<TraceValue>,
1177 #[doc = " An optional token that a server can use to report work done progress."]
1178 #[serde(skip_serializing_if = "Option::is_none")]
1179 #[serde(rename = "workDoneToken")]
1180 pub work_done_token: Option<ProgressToken>,
1181 #[doc = " The workspace folders configured in the client when the server starts. This property is "]
1182 #[doc = " only available if the client supports workspace folders. It can be `null` if the client "]
1183 #[doc = " supports workspace folders but none are configured."]
1184 #[serde(skip_serializing_if = "Option::is_none")]
1185 #[serde(rename = "workspaceFolders")]
1186 pub workspace_folders: Option<Vec<WorkspaceFolder>>,
1187}
1188#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
1189pub struct InitializeResultServerInfo {
1190 #[doc = " The name of the server as defined by the server."]
1191 pub name: String,
1192 #[doc = " The server's version as defined by the server."]
1193 #[serde(skip_serializing_if = "Option::is_none")]
1194 pub version: Option<String>,
1195}
1196#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
1197pub struct InitializeResult {
1198 #[doc = " The capabilities the language server provides."]
1199 pub capabilities: ServerCapabilities,
1200 #[doc = " Information about the server."]
1201 #[serde(skip_serializing_if = "Option::is_none")]
1202 #[serde(rename = "serverInfo")]
1203 pub server_info: Option<InitializeResultServerInfo>,
1204}
1205#[derive(Clone, PartialEq, Debug, Default)]
1206pub struct InitializedParams {}
1207#[doc = " A special text edit to provide an insert and a replace operation."]
1208#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
1209pub struct InsertReplaceEdit {
1210 #[doc = " The range if the insert is requested"]
1211 pub insert: Range,
1212 #[doc = " The string to be inserted."]
1213 #[serde(rename = "newText")]
1214 pub new_text: String,
1215 #[doc = " The range if the replace is requested."]
1216 pub replace: Range,
1217}
1218#[doc = " Defines whether the insert text in a completion item should be interpreted as plain text or a "]
1219#[doc = " snippet."]
1220#[derive(Clone, PartialEq, Debug, Serialize_repr, Deserialize_repr)]
1221#[repr(i64)]
1222pub enum InsertTextFormat {
1223 PlainText = 1,
1224 Snippet = 2,
1225}
1226#[doc = " How whitespace and indentation is handled during completion item insertion."]
1227#[derive(Clone, PartialEq, Debug, Serialize_repr, Deserialize_repr)]
1228#[repr(i64)]
1229pub enum InsertTextMode {
1230 AsIs = 1,
1231 AdjustIndentation = 2,
1232}
1233#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
1234pub struct LinkedEditingRangeClientCapabilities {
1235 #[doc = " Whether implementation supports dynamic registration. If this is set to `true` the client "]
1236 #[doc = " supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` return "]
1237 #[doc = " value for the corresponding server capability as well."]
1238 #[serde(skip_serializing_if = "Option::is_none")]
1239 #[serde(rename = "dynamicRegistration")]
1240 pub dynamic_registration: Option<bool>,
1241}
1242#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
1243pub struct LinkedEditingRangeOptions {
1244 #[serde(skip_serializing_if = "Option::is_none")]
1245 #[serde(rename = "workDoneProgress")]
1246 pub work_done_progress: Option<bool>,
1247}
1248#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
1249pub struct LinkedEditingRangeParams {
1250 #[doc = " The position inside the text document."]
1251 pub position: Position,
1252 #[doc = " The text document."]
1253 #[serde(rename = "textDocument")]
1254 pub text_document: TextDocumentIdentifier,
1255 #[doc = " An optional token that a server can use to report work done progress."]
1256 #[serde(skip_serializing_if = "Option::is_none")]
1257 #[serde(rename = "workDoneToken")]
1258 pub work_done_token: Option<ProgressToken>,
1259}
1260#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
1261pub struct LinkedEditingRangeRegistrationOptions {
1262 #[doc = " A document selector to identify the scope of the registration. If set to null the document "]
1263 #[doc = " selector provided on the client side will be used."]
1264 #[serde(rename = "documentSelector")]
1265 pub document_selector: serde_json::Value,
1266 #[doc = " The id used to register the request. The id can be used to deregister the request again. "]
1267 #[doc = " See also Registration#id."]
1268 #[serde(skip_serializing_if = "Option::is_none")]
1269 pub id: Option<String>,
1270 #[serde(skip_serializing_if = "Option::is_none")]
1271 #[serde(rename = "workDoneProgress")]
1272 pub work_done_progress: Option<bool>,
1273}
1274#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
1275pub struct LinkedEditingRanges {
1276 #[doc = " A list of ranges that can be renamed together. The ranges must have identical length and "]
1277 #[doc = " contain identical text content. The ranges cannot overlap."]
1278 pub ranges: Vec<Range>,
1279 #[doc = " An optional word pattern (regular expression) that describes valid contents for the given "]
1280 #[doc = " ranges. If no pattern is provided, the client configuration's word pattern will be used."]
1281 #[serde(skip_serializing_if = "Option::is_none")]
1282 #[serde(rename = "wordPattern")]
1283 pub word_pattern: Option<String>,
1284}
1285#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
1286pub struct Location {
1287 pub range: Range,
1288 pub uri: DocumentUri,
1289}
1290#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
1291pub struct LocationLink {
1292 #[doc = " Span of the origin of this link."]
1293 #[doc = " "]
1294 #[doc = " Used as the underlined span for mouse interaction. Defaults to the word range at the mouse "]
1295 #[doc = " position."]
1296 #[serde(skip_serializing_if = "Option::is_none")]
1297 #[serde(rename = "originSelectionRange")]
1298 pub origin_selection_range: Option<Range>,
1299 #[doc = " The full target range of this link. If the target for example is a symbol then target range "]
1300 #[doc = " is the range enclosing this symbol not including leading/trailing whitespace but everything "]
1301 #[doc = " else like comments. This information is typically used to highlight the range in the "]
1302 #[doc = " editor."]
1303 #[serde(rename = "targetRange")]
1304 pub target_range: Range,
1305 #[doc = " The range that should be selected and revealed when this link is being followed, e.g the "]
1306 #[doc = " name of a function. Must be contained by the the `targetRange`. See also "]
1307 #[doc = " `DocumentSymbol#range`"]
1308 #[serde(rename = "targetSelectionRange")]
1309 pub target_selection_range: Range,
1310 #[doc = " The target resource identifier of this link."]
1311 #[serde(rename = "targetUri")]
1312 pub target_uri: DocumentUri,
1313}
1314#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
1315pub struct LogMessageParams {
1316 #[doc = " The actual message"]
1317 pub message: String,
1318 #[doc = " The message type. See {@link MessageType }"]
1319 #[serde(rename = "type")]
1320 pub type_: MessageType,
1321}
1322#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
1323pub struct LogTraceParams {
1324 #[doc = " The message to be logged."]
1325 pub message: String,
1326 #[doc = " Additional information that can be computed if the `trace` configuration is set to "]
1327 #[doc = " `'verbose'`"]
1328 #[serde(skip_serializing_if = "Option::is_none")]
1329 pub verbose: Option<String>,
1330}
1331#[doc = " Client capabilities specific to the used markdown parser."]
1332#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
1333pub struct MarkdownClientCapabilities {
1334 #[doc = " The name of the parser."]
1335 pub parser: String,
1336 #[doc = " The version of the parser."]
1337 #[serde(skip_serializing_if = "Option::is_none")]
1338 pub version: Option<String>,
1339}
1340#[doc = " MarkedString can be used to render human readable text. It is either a markdown string or a "]
1341#[doc = " code-block that provides a language and a code snippet. The language identifier is semantically "]
1342#[doc = " equal to the optional language identifier in fenced code blocks in GitHub issues."]
1343#[doc = " "]
1344#[doc = " The pair of a language and a value is an equivalent to markdown: ```${language} ${value} ```"]
1345#[doc = " "]
1346#[doc = " Note that markdown strings will be sanitized - that means html will be escaped."]
1347pub type MarkedString = serde_json::Value;
1348#[doc = " A `MarkupContent` literal represents a string value which content is interpreted base on its "]
1349#[doc = " kind flag. Currently the protocol supports `plaintext` and `markdown` as markup kinds."]
1350#[doc = " "]
1351#[doc = " If the kind is `markdown` then the value can contain fenced code blocks like in GitHub issues."]
1352#[doc = " "]
1353#[doc = " Here is an example how such a string can be constructed using JavaScript / TypeScript: "]
1354#[doc = " ```typescript let markdown: MarkdownContent = { kind: MarkupKind.Markdown, value: [ '# "]
1355#[doc = " Header', 'Some text', '```typescript', 'someCode();', '```' ].join('\\n') }; ```"]
1356#[doc = " "]
1357#[doc = " *Please Note* that clients might sanitize the return markdown. A client could decide to remove "]
1358#[doc = " HTML from the markdown to avoid script execution."]
1359#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
1360pub struct MarkupContent {
1361 #[doc = " The type of the Markup"]
1362 pub kind: MarkupKind,
1363 #[doc = " The content itself"]
1364 pub value: String,
1365}
1366#[doc = " Describes the content type that a client supports in various result literals like `Hover`, "]
1367#[doc = " `ParameterInfo` or `CompletionItem`."]
1368#[doc = " "]
1369#[doc = " Please note that `MarkupKinds` must not start with a `$`. This kinds are reserved for internal "]
1370#[doc = " usage."]
1371#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
1372pub enum MarkupKind {
1373 #[serde(rename = "plaintext")]
1374 Plaintext,
1375 #[serde(rename = "markdown")]
1376 Markdown,
1377}
1378
1379impl Default for MarkupKind {
1380 fn default() -> Self {
1381 Self::Plaintext
1382 }
1383}
1384
1385#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
1386pub struct Message {
1387 pub jsonrpc: String,
1388 #[serde(flatten)]
1389 pub data: serde_json::Value,
1390}
1391#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
1392pub struct MessageActionItem {
1393 #[doc = " A short title like 'Retry', 'Open Log' etc."]
1394 pub title: String,
1395}
1396#[derive(Clone, PartialEq, Debug, Serialize_repr, Deserialize_repr)]
1397#[repr(i64)]
1398pub enum MessageType {
1399 Error = 1,
1400 Warning = 2,
1401 Info = 3,
1402 Log = 4,
1403}
1404
1405impl Default for MessageType {
1406 fn default() -> Self {
1407 Self::Info
1408 }
1409}
1410
1411#[doc = " Moniker definition to match LSIF 0.5 moniker definition."]
1412#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
1413pub struct Moniker {
1414 #[doc = " The identifier of the moniker. The value is opaque in LSIF however schema owners are "]
1415 #[doc = " allowed to define the structure if they want."]
1416 pub identifier: String,
1417 #[doc = " The moniker kind if known."]
1418 #[serde(skip_serializing_if = "Option::is_none")]
1419 pub kind: Option<MonikerKind>,
1420 #[doc = " The scheme of the moniker. For example tsc or .Net"]
1421 pub scheme: String,
1422 #[doc = " The scope in which the moniker is unique"]
1423 pub unique: UniquenessLevel,
1424}
1425#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
1426pub struct MonikerClientCapabilities {
1427 #[doc = " Whether implementation supports dynamic registration. If this is set to `true` the client "]
1428 #[doc = " supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` return "]
1429 #[doc = " value for the corresponding server capability as well."]
1430 #[serde(skip_serializing_if = "Option::is_none")]
1431 #[serde(rename = "dynamicRegistration")]
1432 pub dynamic_registration: Option<bool>,
1433}
1434#[doc = " The moniker kind."]
1435#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
1436pub enum MonikerKind {
1437 #[serde(rename = "import")]
1438 Import,
1439 #[serde(rename = "export")]
1440 Export,
1441 #[serde(rename = "local")]
1442 Local,
1443}
1444#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
1445pub struct MonikerOptions {
1446 #[serde(skip_serializing_if = "Option::is_none")]
1447 #[serde(rename = "workDoneProgress")]
1448 pub work_done_progress: Option<bool>,
1449}
1450#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
1451pub struct MonikerParams {
1452 #[doc = " An optional token that a server can use to report partial results (e.g. streaming) to the "]
1453 #[doc = " client."]
1454 #[serde(skip_serializing_if = "Option::is_none")]
1455 #[serde(rename = "partialResultToken")]
1456 pub partial_result_token: Option<ProgressToken>,
1457 #[doc = " The position inside the text document."]
1458 pub position: Position,
1459 #[doc = " The text document."]
1460 #[serde(rename = "textDocument")]
1461 pub text_document: TextDocumentIdentifier,
1462 #[doc = " An optional token that a server can use to report work done progress."]
1463 #[serde(skip_serializing_if = "Option::is_none")]
1464 #[serde(rename = "workDoneToken")]
1465 pub work_done_token: Option<ProgressToken>,
1466}
1467#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
1468pub struct MonikerRegistrationOptions {
1469 #[doc = " A document selector to identify the scope of the registration. If set to null the document "]
1470 #[doc = " selector provided on the client side will be used."]
1471 #[serde(rename = "documentSelector")]
1472 pub document_selector: serde_json::Value,
1473 #[serde(skip_serializing_if = "Option::is_none")]
1474 #[serde(rename = "workDoneProgress")]
1475 pub work_done_progress: Option<bool>,
1476}
1477#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
1478#[serde(deny_unknown_fields)]
1479pub struct NotificationMessage {
1480 pub jsonrpc: String,
1481 #[doc = " The method to be invoked."]
1482 pub method: String,
1483 #[doc = " The notification's params."]
1484 #[serde(skip_serializing_if = "Option::is_none")]
1485 pub params: Option<serde_json::Value>,
1486}
1487#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
1488pub struct OptionalVersionedTextDocumentIdentifier {
1489 #[doc = " The text document's URI."]
1490 pub uri: DocumentUri,
1491 #[doc = " The version number of this document. If an optional versioned text document identifier is "]
1492 #[doc = " sent from the server to the client and the file is not open in the editor (the server has "]
1493 #[doc = " not received an open notification before) the server can send `null` to indicate that the "]
1494 #[doc = " version is known and the content on disk is the master (as specified with document content "]
1495 #[doc = " ownership)."]
1496 #[doc = " "]
1497 #[doc = " The version number of a document will increase after each change, including undo/redo. The "]
1498 #[doc = " number doesn't need to be consecutive."]
1499 pub version: Option<Integer>,
1500}
1501#[doc = " Represents a parameter of a callable-signature. A parameter can have a label and a doc-comment."]
1502#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
1503pub struct ParameterInformation {
1504 #[doc = " The human-readable doc-comment of this parameter. Will be shown in the UI but can be "]
1505 #[doc = " omitted."]
1506 #[serde(skip_serializing_if = "Option::is_none")]
1507 pub documentation: Option<OneOf<String, MarkupContent>>,
1508 #[doc = " The label of this parameter information."]
1509 #[doc = " "]
1510 #[doc = " Either a string or an inclusive start and exclusive end offsets within its containing "]
1511 #[doc = " signature label. (see SignatureInformation.label). The offsets are based on a UTF-16 string "]
1512 #[doc = " representation as `Position` and `Range` does."]
1513 #[doc = " "]
1514 #[doc = " *Note*: a label of type string should be a substring of its containing signature label. Its "]
1515 #[doc = " intended use case is to highlight the parameter label part in the "]
1516 #[doc = " `SignatureInformation.label`."]
1517 pub label: OneOf<String, Vec<(Uinteger, Uinteger)>>,
1518}
1519#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
1520pub struct PartialResultParams {
1521 #[doc = " An optional token that a server can use to report partial results (e.g. streaming) to the "]
1522 #[doc = " client."]
1523 #[serde(skip_serializing_if = "Option::is_none")]
1524 #[serde(rename = "partialResultToken")]
1525 pub partial_result_token: Option<ProgressToken>,
1526}
1527#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
1528pub struct Position {
1529 #[doc = " Character offset on a line in a document (zero-based). Assuming that the line is "]
1530 #[doc = " represented as a string, the `character` value represents the gap between the `character` "]
1531 #[doc = " and `character + 1`."]
1532 #[doc = " "]
1533 #[doc = " If the character value is greater than the line length it defaults back to the line length."]
1534 pub character: Uinteger,
1535 #[doc = " Line position in a document (zero-based)."]
1536 pub line: Uinteger,
1537}
1538#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
1539pub struct PrepareRenameParams {
1540 #[doc = " The position inside the text document."]
1541 pub position: Position,
1542 #[doc = " The text document."]
1543 #[serde(rename = "textDocument")]
1544 pub text_document: TextDocumentIdentifier,
1545}
1546
1547#[derive(Clone, PartialEq, Debug, Serialize_repr, Deserialize_repr)]
1548#[repr(i64)]
1549pub enum PrepareSupportDefaultBehavior {
1550 Identifier = 1,
1551}
1552
1553impl Default for PrepareSupportDefaultBehavior {
1554 fn default() -> Self {
1555 Self::Identifier
1556 }
1557}
1558
1559#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
1560pub struct PrepareRenameResult1 {
1561 pub range: Range,
1562 pub placeholder: String,
1563}
1564
1565#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
1566pub struct PrepareRenameResult2 {
1567 #[serde(rename = "defaultBehavior")]
1568 pub default_behavior: bool,
1569}
1570
1571#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
1572pub struct PublishDiagnosticsClientCapabilitiesTagSupport {
1573 #[doc = " The tags supported by the client."]
1574 #[serde(rename = "valueSet")]
1575 pub value_set: Vec<DiagnosticTag>,
1576}
1577#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
1578pub struct PublishDiagnosticsClientCapabilities {
1579 #[doc = " Client supports a codeDescription property"]
1580 #[serde(skip_serializing_if = "Option::is_none")]
1581 #[serde(rename = "codeDescriptionSupport")]
1582 pub code_description_support: Option<bool>,
1583 #[doc = " Whether code action supports the `data` property which is preserved between a "]
1584 #[doc = " `textDocument/publishDiagnostics` and `textDocument/codeAction` request."]
1585 #[serde(skip_serializing_if = "Option::is_none")]
1586 #[serde(rename = "dataSupport")]
1587 pub data_support: Option<bool>,
1588 #[doc = " Whether the clients accepts diagnostics with related information."]
1589 #[serde(skip_serializing_if = "Option::is_none")]
1590 #[serde(rename = "relatedInformation")]
1591 pub related_information: Option<bool>,
1592 #[doc = " Client supports the tag property to provide meta data about a diagnostic. Clients "]
1593 #[doc = " supporting tags have to handle unknown tags gracefully."]
1594 #[serde(skip_serializing_if = "Option::is_none")]
1595 #[serde(rename = "tagSupport")]
1596 pub tag_support: Option<PublishDiagnosticsClientCapabilitiesTagSupport>,
1597 #[doc = " Whether the client interprets the version property of the `textDocument/publishDiagnostics` "]
1598 #[doc = " notification's parameter."]
1599 #[serde(skip_serializing_if = "Option::is_none")]
1600 #[serde(rename = "versionSupport")]
1601 pub version_support: Option<bool>,
1602}
1603#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
1604pub struct PublishDiagnosticsParams {
1605 #[doc = " An array of diagnostic information items."]
1606 pub diagnostics: Vec<Diagnostic>,
1607 #[doc = " The URI for which diagnostic information is reported."]
1608 pub uri: DocumentUri,
1609 #[doc = " Optional the version number of the document the diagnostics are published for."]
1610 #[serde(skip_serializing_if = "Option::is_none")]
1611 pub version: Option<Integer>,
1612}
1613#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
1614pub struct Range {
1615 #[doc = " The range's end position."]
1616 pub end: Position,
1617 #[doc = " The range's start position."]
1618 pub start: Position,
1619}
1620#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
1621pub struct ReferenceClientCapabilities {
1622 #[doc = " Whether references supports dynamic registration."]
1623 #[serde(skip_serializing_if = "Option::is_none")]
1624 #[serde(rename = "dynamicRegistration")]
1625 pub dynamic_registration: Option<bool>,
1626}
1627#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
1628pub struct ReferenceContext {
1629 #[doc = " Include the declaration of the current symbol."]
1630 #[serde(rename = "includeDeclaration")]
1631 pub include_declaration: bool,
1632}
1633#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
1634pub struct ReferenceOptions {
1635 #[serde(skip_serializing_if = "Option::is_none")]
1636 #[serde(rename = "workDoneProgress")]
1637 pub work_done_progress: Option<bool>,
1638}
1639#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
1640pub struct ReferenceParams {
1641 pub context: ReferenceContext,
1642 #[doc = " An optional token that a server can use to report partial results (e.g. streaming) to the "]
1643 #[doc = " client."]
1644 #[serde(skip_serializing_if = "Option::is_none")]
1645 #[serde(rename = "partialResultToken")]
1646 pub partial_result_token: Option<ProgressToken>,
1647 #[doc = " The position inside the text document."]
1648 pub position: Position,
1649 #[doc = " The text document."]
1650 #[serde(rename = "textDocument")]
1651 pub text_document: TextDocumentIdentifier,
1652 #[doc = " An optional token that a server can use to report work done progress."]
1653 #[serde(skip_serializing_if = "Option::is_none")]
1654 #[serde(rename = "workDoneToken")]
1655 pub work_done_token: Option<ProgressToken>,
1656}
1657#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
1658pub struct ReferenceRegistrationOptions {
1659 #[doc = " A document selector to identify the scope of the registration. If set to null the document "]
1660 #[doc = " selector provided on the client side will be used."]
1661 #[serde(rename = "documentSelector")]
1662 pub document_selector: serde_json::Value,
1663 #[serde(skip_serializing_if = "Option::is_none")]
1664 #[serde(rename = "workDoneProgress")]
1665 pub work_done_progress: Option<bool>,
1666}
1667#[doc = " General parameters to register for a capability."]
1668#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
1669pub struct Registration {
1670 #[doc = " The id used to register the request. The id can be used to deregister the request again."]
1671 pub id: String,
1672 #[doc = " The method / capability to register for."]
1673 pub method: String,
1674 #[doc = " Options necessary for the registration."]
1675 #[serde(skip_serializing_if = "Option::is_none")]
1676 #[serde(rename = "registerOptions")]
1677 pub register_options: Option<serde_json::Value>,
1678}
1679#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
1680pub struct RegistrationParams {
1681 pub registrations: Vec<Registration>,
1682}
1683#[doc = " Client capabilities specific to regular expressions."]
1684#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
1685pub struct RegularExpressionsClientCapabilities {
1686 #[doc = " The engine's name."]
1687 pub engine: String,
1688 #[doc = " The engine's version."]
1689 #[serde(skip_serializing_if = "Option::is_none")]
1690 pub version: Option<String>,
1691}
1692#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
1693pub struct RenameClientCapabilities {
1694 #[doc = " Whether rename supports dynamic registration."]
1695 #[serde(skip_serializing_if = "Option::is_none")]
1696 #[serde(rename = "dynamicRegistration")]
1697 pub dynamic_registration: Option<bool>,
1698 #[doc = " Whether the client honors the change annotations in text edits and resource operations "]
1699 #[doc = " returned via the rename request's workspace edit by for example presenting the workspace "]
1700 #[doc = " edit in the user interface and asking for confirmation."]
1701 #[serde(skip_serializing_if = "Option::is_none")]
1702 #[serde(rename = "honorsChangeAnnotations")]
1703 pub honors_change_annotations: Option<bool>,
1704 #[doc = " Client supports testing for validity of rename operations before execution."]
1705 #[serde(skip_serializing_if = "Option::is_none")]
1706 #[serde(rename = "prepareSupport")]
1707 pub prepare_support: Option<bool>,
1708 #[doc = " Client supports the default behavior result (`{ defaultBehavior: boolean }`)."]
1709 #[doc = " "]
1710 #[doc = " The value indicates the default behavior used by the client."]
1711 #[serde(skip_serializing_if = "Option::is_none")]
1712 #[serde(rename = "prepareSupportDefaultBehavior")]
1713 pub prepare_support_default_behavior: Option<PrepareSupportDefaultBehavior>,
1714}
1715#[doc = " Rename file operation"]
1716#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
1717pub struct RenameFile {
1718 #[doc = " An optional annotation identifer describing the operation."]
1719 #[serde(skip_serializing_if = "Option::is_none")]
1720 #[serde(rename = "annotationId")]
1721 pub annotation_id: Option<ChangeAnnotationIdentifier>,
1722 #[doc = " A rename"]
1723 pub kind: String,
1724 #[doc = " The new location."]
1725 #[serde(rename = "newUri")]
1726 pub new_uri: DocumentUri,
1727 #[doc = " The old (existing) location."]
1728 #[serde(rename = "oldUri")]
1729 pub old_uri: DocumentUri,
1730 #[doc = " Rename options."]
1731 #[serde(skip_serializing_if = "Option::is_none")]
1732 pub options: Option<RenameFileOptions>,
1733}
1734#[doc = " Rename file options"]
1735#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
1736pub struct RenameFileOptions {
1737 #[doc = " Ignores if target exists."]
1738 #[serde(skip_serializing_if = "Option::is_none")]
1739 #[serde(rename = "ignoreIfExists")]
1740 pub ignore_if_exists: Option<bool>,
1741 #[doc = " Overwrite target if existing. Overwrite wins over `ignoreIfExists`"]
1742 #[serde(skip_serializing_if = "Option::is_none")]
1743 pub overwrite: Option<bool>,
1744}
1745#[doc = " The parameters sent in notifications/requests for user-initiated renames of files."]
1746#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
1747pub struct RenameFilesParams {
1748 #[doc = " An array of all files/folders renamed in this operation. When a folder is renamed, only the "]
1749 #[doc = " folder will be included, and not its children."]
1750 pub files: Vec<FileRename>,
1751}
1752#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
1753pub struct RenameOptions {
1754 #[doc = " Renames should be checked and tested before being executed."]
1755 #[serde(skip_serializing_if = "Option::is_none")]
1756 #[serde(rename = "prepareProvider")]
1757 pub prepare_provider: Option<bool>,
1758 #[serde(skip_serializing_if = "Option::is_none")]
1759 #[serde(rename = "workDoneProgress")]
1760 pub work_done_progress: Option<bool>,
1761}
1762#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
1763pub struct RenameParams {
1764 #[doc = " The new name of the symbol. If the given name is not valid the request must return a "]
1765 #[doc = " [ResponseError](#ResponseError) with an appropriate message set."]
1766 #[serde(rename = "newName")]
1767 pub new_name: String,
1768 #[doc = " The position inside the text document."]
1769 pub position: Position,
1770 #[doc = " The text document."]
1771 #[serde(rename = "textDocument")]
1772 pub text_document: TextDocumentIdentifier,
1773 #[doc = " An optional token that a server can use to report work done progress."]
1774 #[serde(skip_serializing_if = "Option::is_none")]
1775 #[serde(rename = "workDoneToken")]
1776 pub work_done_token: Option<ProgressToken>,
1777}
1778#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
1779pub struct RenameRegistrationOptions {
1780 #[doc = " A document selector to identify the scope of the registration. If set to null the document "]
1781 #[doc = " selector provided on the client side will be used."]
1782 #[serde(rename = "documentSelector")]
1783 pub document_selector: serde_json::Value,
1784 #[doc = " Renames should be checked and tested before being executed."]
1785 #[serde(skip_serializing_if = "Option::is_none")]
1786 #[serde(rename = "prepareProvider")]
1787 pub prepare_provider: Option<bool>,
1788 #[serde(skip_serializing_if = "Option::is_none")]
1789 #[serde(rename = "workDoneProgress")]
1790 pub work_done_progress: Option<bool>,
1791}
1792
1793#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
1794pub struct RequestMessage {
1795 #[doc = " The request id."]
1796 pub id: ReqId,
1797 pub jsonrpc: String,
1798 #[doc = " The method to be invoked."]
1799 pub method: String,
1800 #[doc = " The method's params."]
1801 #[serde(skip_serializing_if = "Option::is_none")]
1802 pub params: Option<serde_json::Value>,
1803}
1804#[doc = " The kind of resource operations supported by the client."]
1805#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
1806pub enum ResourceOperationKind {
1807 #[serde(rename = "create")]
1808 Create,
1809 #[serde(rename = "rename")]
1810 Rename,
1811 #[serde(rename = "delete")]
1812 Delete,
1813}
1814#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
1815#[serde(deny_unknown_fields)]
1816pub struct ResponseError {
1817 #[doc = " A number indicating the error type that occurred."]
1818 pub code: Integer,
1819 #[doc = " A primitive or structured value that contains additional information about the error. Can "]
1820 #[doc = " be omitted."]
1821 #[serde(skip_serializing_if = "Option::is_none")]
1822 pub data: Option<serde_json::Value>,
1823 #[doc = " A string providing a short description of the error."]
1824 pub message: String,
1825}
1826#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
1827#[serde(deny_unknown_fields)]
1828pub struct ResponseMessage {
1829 #[doc = " The error object in case a request fails."]
1830 #[serde(skip_serializing_if = "Option::is_none")]
1831 pub error: Option<ResponseError>,
1832 #[doc = " The request id."]
1833 pub id: Option<ReqId>,
1834 pub jsonrpc: String,
1835 #[doc = " The result of a request. This member is REQUIRED on success. This member MUST NOT exist if "]
1836 #[doc = " there was an error invoking the method."]
1837 #[serde(skip_serializing_if = "Option::is_none")]
1838 pub result: Option<serde_json::Value>,
1839}
1840#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
1841pub struct SaveOptions {
1842 #[doc = " The client is supposed to include the content on save."]
1843 #[serde(skip_serializing_if = "Option::is_none")]
1844 #[serde(rename = "includeText")]
1845 pub include_text: Option<bool>,
1846}
1847#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
1848pub struct SelectionRange {
1849 #[doc = " The parent selection range containing this range. Therefore `parent.range` must contain "]
1850 #[doc = " `this.range`."]
1851 #[serde(skip_serializing_if = "Option::is_none")]
1852 pub parent: Option<Box<SelectionRange>>,
1853 #[doc = " The [range](#Range) of this selection range."]
1854 pub range: Range,
1855}
1856#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
1857pub struct SelectionRangeClientCapabilities {
1858 #[doc = " Whether implementation supports dynamic registration for selection range providers. If this "]
1859 #[doc = " is set to `true` the client supports the new `SelectionRangeRegistrationOptions` return "]
1860 #[doc = " value for the corresponding server capability as well."]
1861 #[serde(skip_serializing_if = "Option::is_none")]
1862 #[serde(rename = "dynamicRegistration")]
1863 pub dynamic_registration: Option<bool>,
1864}
1865#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
1866pub struct SelectionRangeOptions {
1867 #[serde(skip_serializing_if = "Option::is_none")]
1868 #[serde(rename = "workDoneProgress")]
1869 pub work_done_progress: Option<bool>,
1870}
1871#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
1872pub struct SelectionRangeParams {
1873 #[doc = " An optional token that a server can use to report partial results (e.g. streaming) to the "]
1874 #[doc = " client."]
1875 #[serde(skip_serializing_if = "Option::is_none")]
1876 #[serde(rename = "partialResultToken")]
1877 pub partial_result_token: Option<ProgressToken>,
1878 #[doc = " The positions inside the text document."]
1879 pub positions: Vec<Position>,
1880 #[doc = " The text document."]
1881 #[serde(rename = "textDocument")]
1882 pub text_document: TextDocumentIdentifier,
1883 #[doc = " An optional token that a server can use to report work done progress."]
1884 #[serde(skip_serializing_if = "Option::is_none")]
1885 #[serde(rename = "workDoneToken")]
1886 pub work_done_token: Option<ProgressToken>,
1887}
1888#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
1889pub struct SelectionRangeRegistrationOptions {
1890 #[doc = " A document selector to identify the scope of the registration. If set to null the document "]
1891 #[doc = " selector provided on the client side will be used."]
1892 #[serde(rename = "documentSelector")]
1893 pub document_selector: serde_json::Value,
1894 #[doc = " The id used to register the request. The id can be used to deregister the request again. "]
1895 #[doc = " See also Registration#id."]
1896 #[serde(skip_serializing_if = "Option::is_none")]
1897 pub id: Option<String>,
1898 #[serde(skip_serializing_if = "Option::is_none")]
1899 #[serde(rename = "workDoneProgress")]
1900 pub work_done_progress: Option<bool>,
1901}
1902
1903#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
1904pub struct SemanticTokenModifiers(String);
1905
1906impl From<&str> for SemanticTokenModifiers {
1907 fn from(s: &str) -> Self {
1908 Self(s.to_string())
1909 }
1910}
1911
1912impl Into<String> for SemanticTokenModifiers {
1913 fn into(self) -> String {
1914 self.0
1915 }
1916}
1917
1918impl SemanticTokenModifiers {
1919 pub fn new(s: String) -> Self {
1920 Self(s)
1921 }
1922
1923 pub fn declaration() -> Self {
1924 "declaration".into()
1925 }
1926
1927 pub fn definition() -> Self {
1928 "definition".into()
1929 }
1930
1931 pub fn readonly() -> Self {
1932 "readonly".into()
1933 }
1934
1935 pub fn static_() -> Self {
1936 "static".into()
1937 }
1938
1939 pub fn deprecated() -> Self {
1940 "deprecated".into()
1941 }
1942
1943 pub fn abstract_() -> Self {
1944 "abstract".into()
1945 }
1946
1947 pub fn async_() -> Self {
1948 "async".into()
1949 }
1950
1951 pub fn modification() -> Self {
1952 "modification".into()
1953 }
1954
1955 pub fn documentation() -> Self {
1956 "documentation".into()
1957 }
1958
1959 pub fn default_library() -> Self {
1960 "defaultLibrary".into()
1961 }
1962}
1963
1964#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
1965pub struct SemanticTokenTypes(String);
1966
1967impl From<&str> for SemanticTokenTypes {
1968 fn from(s: &str) -> Self {
1969 Self(s.to_string())
1970 }
1971}
1972
1973impl Into<String> for SemanticTokenTypes {
1974 fn into(self) -> String {
1975 self.0
1976 }
1977}
1978
1979impl SemanticTokenTypes {
1980 pub fn new(s: String) -> Self {
1981 Self(s)
1982 }
1983
1984 pub fn namespace() -> Self {
1985 "namespace".into()
1986 }
1987 pub fn type_() -> Self {
1988 "type".into()
1989 }
1990 pub fn class() -> Self {
1991 "class".into()
1992 }
1993 pub fn enum_() -> Self {
1994 "enum".into()
1995 }
1996 pub fn interface() -> Self {
1997 "interface".into()
1998 }
1999 pub fn struct_() -> Self {
2000 "struct".into()
2001 }
2002 pub fn type_parameter() -> Self {
2003 "typeParameter".into()
2004 }
2005 pub fn parameter() -> Self {
2006 "parameter".into()
2007 }
2008 pub fn variable() -> Self {
2009 "variable".into()
2010 }
2011 pub fn property() -> Self {
2012 "property".into()
2013 }
2014 pub fn enum_member() -> Self {
2015 "enumMember".into()
2016 }
2017 pub fn event() -> Self {
2018 "event".into()
2019 }
2020 pub fn function() -> Self {
2021 "function".into()
2022 }
2023 pub fn method() -> Self {
2024 "method".into()
2025 }
2026 pub fn macro_() -> Self {
2027 "macro".into()
2028 }
2029 pub fn keyword() -> Self {
2030 "keyword".into()
2031 }
2032 pub fn modifier() -> Self {
2033 "modifier".into()
2034 }
2035 pub fn comment() -> Self {
2036 "comment".into()
2037 }
2038 pub fn string() -> Self {
2039 "string".into()
2040 }
2041 pub fn number() -> Self {
2042 "number".into()
2043 }
2044 pub fn regexp() -> Self {
2045 "regexp".into()
2046 }
2047 pub fn operator() -> Self {
2048 "operator".into()
2049 }
2050}
2051
2052#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
2053pub struct SemanticTokens {
2054 #[doc = " The actual tokens."]
2055 pub data: Vec<Uinteger>,
2056 #[doc = " An optional result id. If provided and clients support delta updating the client will "]
2057 #[doc = " include the result id in the next semantic token request. A server can then instead of "]
2058 #[doc = " computing all semantic tokens again simply send a delta."]
2059 #[serde(skip_serializing_if = "Option::is_none")]
2060 #[serde(rename = "resultId")]
2061 pub result_id: Option<String>,
2062}
2063#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
2064pub struct SemanticTokensClientCapabilitiesRequests {
2065 #[doc = " The client will send the `textDocument/semanticTokens/full` request if the server provides "]
2066 #[doc = " a corresponding handler."]
2067 #[serde(skip_serializing_if = "Option::is_none")]
2068 pub full: Option<SemanticTokensOptionsFull>,
2069 #[doc = " The client will send the `textDocument/semanticTokens/range` request if the server provides "]
2070 #[doc = " a corresponding handler."]
2071 #[serde(skip_serializing_if = "Option::is_none")]
2072 pub range: Option<bool>,
2073}
2074#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
2075pub struct SemanticTokensClientCapabilities {
2076 #[doc = " Whether implementation supports dynamic registration. If this is set to `true` the client "]
2077 #[doc = " supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` return "]
2078 #[doc = " value for the corresponding server capability as well."]
2079 #[serde(skip_serializing_if = "Option::is_none")]
2080 #[serde(rename = "dynamicRegistration")]
2081 pub dynamic_registration: Option<bool>,
2082 #[doc = " The formats the clients supports."]
2083 pub formats: Vec<TokenFormat>,
2084 #[doc = " Whether the client supports tokens that can span multiple lines."]
2085 #[serde(skip_serializing_if = "Option::is_none")]
2086 #[serde(rename = "multilineTokenSupport")]
2087 pub multiline_token_support: Option<bool>,
2088 #[doc = " Whether the client supports tokens that can overlap each other."]
2089 #[serde(skip_serializing_if = "Option::is_none")]
2090 #[serde(rename = "overlappingTokenSupport")]
2091 pub overlapping_token_support: Option<bool>,
2092 #[doc = " Which requests the client supports and might send to the server depending on the server's "]
2093 #[doc = " capability. Please note that clients might not show semantic tokens or degrade some of the "]
2094 #[doc = " user experience if a range or full request is advertised by the client but not provided by "]
2095 #[doc = " the server. If for example the client capability `requests.full` and `request.range` are "]
2096 #[doc = " both set to true but the server only provides a range provider the client might not render "]
2097 #[doc = " a minimap correctly or might even decide to not show any semantic tokens at all."]
2098 pub requests: SemanticTokensClientCapabilitiesRequests,
2099 #[doc = " The token modifiers that the client supports."]
2100 #[serde(rename = "tokenModifiers")]
2101 pub token_modifiers: Vec<SemanticTokenModifiers>,
2102 #[doc = " The token types that the client supports."]
2103 #[serde(rename = "tokenTypes")]
2104 pub token_types: Vec<SemanticTokenTypes>,
2105}
2106#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
2107pub struct SemanticTokensDelta {
2108 #[doc = " The semantic token edits to transform a previous result into a new result."]
2109 pub edits: Vec<SemanticTokensEdit>,
2110 #[serde(skip_serializing_if = "Option::is_none")]
2111 #[serde(rename = "resultId")]
2112 pub result_id: Option<String>,
2113}
2114#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
2115pub struct SemanticTokensDeltaParams {
2116 #[doc = " An optional token that a server can use to report partial results (e.g. streaming) to the "]
2117 #[doc = " client."]
2118 #[serde(skip_serializing_if = "Option::is_none")]
2119 #[serde(rename = "partialResultToken")]
2120 pub partial_result_token: Option<ProgressToken>,
2121 #[doc = " The result id of a previous response. The result Id can either point to a full response or "]
2122 #[doc = " a delta response depending on what was received last."]
2123 #[serde(rename = "previousResultId")]
2124 pub previous_result_id: String,
2125 #[doc = " The text document."]
2126 #[serde(rename = "textDocument")]
2127 pub text_document: TextDocumentIdentifier,
2128 #[doc = " An optional token that a server can use to report work done progress."]
2129 #[serde(skip_serializing_if = "Option::is_none")]
2130 #[serde(rename = "workDoneToken")]
2131 pub work_done_token: Option<ProgressToken>,
2132}
2133#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
2134pub struct SemanticTokensDeltaPartialResult {
2135 pub edits: Vec<SemanticTokensEdit>,
2136}
2137#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
2138pub struct SemanticTokensEdit {
2139 #[doc = " The elements to insert."]
2140 #[serde(skip_serializing_if = "Option::is_none")]
2141 pub data: Option<Vec<Uinteger>>,
2142 #[doc = " The count of elements to remove."]
2143 #[serde(rename = "deleteCount")]
2144 pub delete_count: Uinteger,
2145 #[doc = " The start offset of the edit."]
2146 pub start: Uinteger,
2147}
2148#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
2149pub struct SemanticTokensLegend {
2150 #[doc = " The token modifiers a server uses."]
2151 #[serde(rename = "tokenModifiers")]
2152 pub token_modifiers: Vec<String>,
2153 #[doc = " The token types a server uses."]
2154 #[serde(rename = "tokenTypes")]
2155 pub token_types: Vec<String>,
2156}
2157#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
2158pub struct SemanticTokensOptions {
2159 #[doc = " Server supports providing semantic tokens for a full document."]
2160 #[serde(skip_serializing_if = "Option::is_none")]
2161 pub full: Option<OneOf<bool, SemanticTokensOptionsFull>>,
2162 #[doc = " The legend used by the server"]
2163 pub legend: SemanticTokensLegend,
2164 #[doc = " Server supports providing semantic tokens for a specific range of a document."]
2165 #[serde(skip_serializing_if = "Option::is_none")]
2166 pub range: Option<bool>,
2167 #[serde(skip_serializing_if = "Option::is_none")]
2168 #[serde(rename = "workDoneProgress")]
2169 pub work_done_progress: Option<bool>,
2170}
2171#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
2172pub struct SemanticTokensOptionsFull {
2173 #[doc = " The server supports deltas for full documents."]
2174 #[serde(skip_serializing_if = "Option::is_none")]
2175 pub delta: Option<bool>,
2176}
2177#[derive(Clone, PartialEq, Debug, Default)]
2178pub struct SemanticTokensRefreshParams {}
2179
2180#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
2181pub struct SemanticTokensParams {
2182 #[doc = " An optional token that a server can use to report partial results (e.g. streaming) to the "]
2183 #[doc = " client."]
2184 #[serde(skip_serializing_if = "Option::is_none")]
2185 #[serde(rename = "partialResultToken")]
2186 pub partial_result_token: Option<ProgressToken>,
2187 #[doc = " The text document."]
2188 #[serde(rename = "textDocument")]
2189 pub text_document: TextDocumentIdentifier,
2190 #[doc = " An optional token that a server can use to report work done progress."]
2191 #[serde(skip_serializing_if = "Option::is_none")]
2192 #[serde(rename = "workDoneToken")]
2193 pub work_done_token: Option<ProgressToken>,
2194}
2195#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
2196pub struct SemanticTokensPartialResult {
2197 pub data: Vec<Uinteger>,
2198}
2199#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
2200pub struct SemanticTokensRangeParams {
2201 #[doc = " An optional token that a server can use to report partial results (e.g. streaming) to the "]
2202 #[doc = " client."]
2203 #[serde(skip_serializing_if = "Option::is_none")]
2204 #[serde(rename = "partialResultToken")]
2205 pub partial_result_token: Option<ProgressToken>,
2206 #[doc = " The range the semantic tokens are requested for."]
2207 pub range: Range,
2208 #[doc = " The text document."]
2209 #[serde(rename = "textDocument")]
2210 pub text_document: TextDocumentIdentifier,
2211 #[doc = " An optional token that a server can use to report work done progress."]
2212 #[serde(skip_serializing_if = "Option::is_none")]
2213 #[serde(rename = "workDoneToken")]
2214 pub work_done_token: Option<ProgressToken>,
2215}
2216#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
2217pub struct SemanticTokensRegistrationOptions {
2218 #[doc = " A document selector to identify the scope of the registration. If set to null the document "]
2219 #[doc = " selector provided on the client side will be used."]
2220 #[serde(rename = "documentSelector")]
2221 pub document_selector: serde_json::Value,
2222 #[doc = " Server supports providing semantic tokens for a full document."]
2223 #[serde(skip_serializing_if = "Option::is_none")]
2224 pub full: Option<serde_json::Value>,
2225 #[doc = " The id used to register the request. The id can be used to deregister the request again. "]
2226 #[doc = " See also Registration#id."]
2227 #[serde(skip_serializing_if = "Option::is_none")]
2228 pub id: Option<String>,
2229 #[doc = " The legend used by the server"]
2230 pub legend: SemanticTokensLegend,
2231 #[doc = " Server supports providing semantic tokens for a specific range of a document."]
2232 #[serde(skip_serializing_if = "Option::is_none")]
2233 pub range: Option<serde_json::Value>,
2234 #[serde(skip_serializing_if = "Option::is_none")]
2235 #[serde(rename = "workDoneProgress")]
2236 pub work_done_progress: Option<bool>,
2237}
2238#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
2239pub struct SemanticTokensWorkspaceClientCapabilities {
2240 #[doc = " Whether the client implementation supports a refresh request sent from the server to the "]
2241 #[doc = " client."]
2242 #[doc = " "]
2243 #[doc = " Note that this event is global and will force the client to refresh all semantic tokens "]
2244 #[doc = " currently shown. It should be used with absolute care and is useful for situation where a "]
2245 #[doc = " server for example detect a project wide change that requires such a calculation."]
2246 #[serde(skip_serializing_if = "Option::is_none")]
2247 #[serde(rename = "refreshSupport")]
2248 pub refresh_support: Option<bool>,
2249}
2250#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
2251pub struct ServerCapabilitiesWorkspaceFileOperations {
2252 #[doc = " The server is interested in receiving didCreateFiles notifications."]
2253 #[serde(skip_serializing_if = "Option::is_none")]
2254 #[serde(rename = "didCreate")]
2255 pub did_create: Option<FileOperationRegistrationOptions>,
2256 #[doc = " The server is interested in receiving didDeleteFiles file notifications."]
2257 #[serde(skip_serializing_if = "Option::is_none")]
2258 #[serde(rename = "didDelete")]
2259 pub did_delete: Option<FileOperationRegistrationOptions>,
2260 #[doc = " The server is interested in receiving didRenameFiles notifications."]
2261 #[serde(skip_serializing_if = "Option::is_none")]
2262 #[serde(rename = "didRename")]
2263 pub did_rename: Option<FileOperationRegistrationOptions>,
2264 #[doc = " The server is interested in receiving willCreateFiles requests."]
2265 #[serde(skip_serializing_if = "Option::is_none")]
2266 #[serde(rename = "willCreate")]
2267 pub will_create: Option<FileOperationRegistrationOptions>,
2268 #[doc = " The server is interested in receiving willDeleteFiles file requests."]
2269 #[serde(skip_serializing_if = "Option::is_none")]
2270 #[serde(rename = "willDelete")]
2271 pub will_delete: Option<FileOperationRegistrationOptions>,
2272 #[doc = " The server is interested in receiving willRenameFiles requests."]
2273 #[serde(skip_serializing_if = "Option::is_none")]
2274 #[serde(rename = "willRename")]
2275 pub will_rename: Option<FileOperationRegistrationOptions>,
2276}
2277#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
2278pub struct ServerCapabilitiesWorkspace {
2279 #[doc = " The server is interested in file notifications/requests."]
2280 #[serde(skip_serializing_if = "Option::is_none")]
2281 #[serde(rename = "fileOperations")]
2282 pub file_operations: Option<ServerCapabilitiesWorkspaceFileOperations>,
2283 #[doc = " The server supports workspace folder."]
2284 #[serde(skip_serializing_if = "Option::is_none")]
2285 #[serde(rename = "workspaceFolders")]
2286 pub workspace_folders: Option<WorkspaceFoldersServerCapabilities>,
2287}
2288#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
2289pub struct ServerCapabilities {
2290 #[doc = " The server provides call hierarchy support."]
2291 #[serde(skip_serializing_if = "Option::is_none")]
2292 #[serde(rename = "callHierarchyProvider")]
2293 pub call_hierarchy_provider:
2294 Option<OneOf3<bool, CallHierarchyRegistrationOptions, CallHierarchyOptions>>,
2295 #[doc = " The server provides code actions. The `CodeActionOptions` return type is only valid if the "]
2296 #[doc = " client signals code action literal support via the property "]
2297 #[doc = " `textDocument.codeAction.codeActionLiteralSupport`."]
2298 #[serde(skip_serializing_if = "Option::is_none")]
2299 #[serde(rename = "codeActionProvider")]
2300 pub code_action_provider: Option<OneOf<bool, CodeActionOptions>>,
2301 #[doc = " The server provides code lens."]
2302 #[serde(skip_serializing_if = "Option::is_none")]
2303 #[serde(rename = "codeLensProvider")]
2304 pub code_lens_provider: Option<CodeLensOptions>,
2305 #[doc = " The server provides color provider support."]
2306 #[serde(skip_serializing_if = "Option::is_none")]
2307 #[serde(rename = "colorProvider")]
2308 pub color_provider:
2309 Option<OneOf3<bool, DocumentColorOptions, DocumentColorRegistrationOptions>>,
2310 #[doc = " The server provides completion support."]
2311 #[serde(skip_serializing_if = "Option::is_none")]
2312 #[serde(rename = "completionProvider")]
2313 pub completion_provider: Option<CompletionOptions>,
2314 #[doc = " The server provides go to declaration support."]
2315 #[serde(skip_serializing_if = "Option::is_none")]
2316 #[serde(rename = "declarationProvider")]
2317 pub declaration_provider:
2318 Option<OneOf3<bool, DeclarationOptions, DeclarationRegistrationOptions>>,
2319 #[doc = " The server provides goto definition support."]
2320 #[serde(skip_serializing_if = "Option::is_none")]
2321 #[serde(rename = "definitionProvider")]
2322 pub definition_provider: Option<OneOf<bool, DefinitionOptions>>,
2323 #[doc = " The server provides document formatting."]
2324 #[serde(skip_serializing_if = "Option::is_none")]
2325 #[serde(rename = "documentFormattingProvider")]
2326 pub document_formatting_provider: Option<OneOf<bool, DocumentFormattingOptions>>,
2327 #[doc = " The server provides document highlight support."]
2328 #[serde(skip_serializing_if = "Option::is_none")]
2329 #[serde(rename = "documentHighlightProvider")]
2330 pub document_highlight_provider: Option<OneOf<bool, DocumentHighlightOptions>>,
2331 #[doc = " The server provides document link support."]
2332 #[serde(skip_serializing_if = "Option::is_none")]
2333 #[serde(rename = "documentLinkProvider")]
2334 pub document_link_provider: Option<DocumentLinkOptions>,
2335 #[doc = " The server provides document formatting on typing."]
2336 #[serde(skip_serializing_if = "Option::is_none")]
2337 #[serde(rename = "documentOnTypeFormattingProvider")]
2338 pub document_on_type_formatting_provider: Option<DocumentOnTypeFormattingOptions>,
2339 #[doc = " The server provides document range formatting."]
2340 #[serde(skip_serializing_if = "Option::is_none")]
2341 #[serde(rename = "documentRangeFormattingProvider")]
2342 pub document_range_formatting_provider: Option<OneOf<bool, DocumentRangeFormattingOptions>>,
2343 #[doc = " The server provides document symbol support."]
2344 #[serde(skip_serializing_if = "Option::is_none")]
2345 #[serde(rename = "documentSymbolProvider")]
2346 pub document_symbol_provider: Option<OneOf<bool, DocumentSymbolOptions>>,
2347 #[doc = " The server provides execute command support."]
2348 #[serde(skip_serializing_if = "Option::is_none")]
2349 #[serde(rename = "executeCommandProvider")]
2350 pub execute_command_provider: Option<ExecuteCommandOptions>,
2351 #[doc = " Experimental server capabilities."]
2352 #[serde(skip_serializing_if = "Option::is_none")]
2353 pub experimental: Option<serde_json::Value>,
2354 #[doc = " The server provides folding provider support."]
2355 #[serde(skip_serializing_if = "Option::is_none")]
2356 #[serde(rename = "foldingRangeProvider")]
2357 pub folding_range_provider:
2358 Option<OneOf3<bool, FoldingRangeOptions, FoldingRangeRegistrationOptions>>,
2359 #[doc = " The server provides hover support."]
2360 #[serde(skip_serializing_if = "Option::is_none")]
2361 #[serde(rename = "hoverProvider")]
2362 pub hover_provider: Option<OneOf<bool, HoverOptions>>,
2363 #[doc = " The server provides goto implementation support."]
2364 #[serde(skip_serializing_if = "Option::is_none")]
2365 #[serde(rename = "implementationProvider")]
2366 pub implementation_provider:
2367 Option<OneOf3<bool, ImplementationOptions, ImplementationRegistrationOptions>>,
2368 #[doc = " The server provides linked editing range support."]
2369 #[serde(skip_serializing_if = "Option::is_none")]
2370 #[serde(rename = "linkedEditingRangeProvider")]
2371 pub linked_editing_range_provider:
2372 Option<OneOf3<bool, LinkedEditingRangeOptions, LinkedEditingRangeRegistrationOptions>>,
2373 #[doc = " Whether server provides moniker support."]
2374 #[serde(skip_serializing_if = "Option::is_none")]
2375 #[serde(rename = "monikerProvider")]
2376 pub moniker_provider: Option<OneOf3<bool, MonikerOptions, MonikerRegistrationOptions>>,
2377 #[doc = " The server provides find references support."]
2378 #[serde(skip_serializing_if = "Option::is_none")]
2379 #[serde(rename = "referencesProvider")]
2380 pub references_provider: Option<OneOf<bool, ReferenceOptions>>,
2381 #[doc = " The server provides rename support. RenameOptions may only be specified if the client "]
2382 #[doc = " states that it supports `prepareSupport` in its initial `initialize` request."]
2383 #[serde(skip_serializing_if = "Option::is_none")]
2384 #[serde(rename = "renameProvider")]
2385 pub rename_provider: Option<OneOf<bool, RenameOptions>>,
2386 #[doc = " The server provides selection range support."]
2387 #[serde(skip_serializing_if = "Option::is_none")]
2388 #[serde(rename = "selectionRangeProvider")]
2389 pub selection_range_provider:
2390 Option<OneOf3<bool, SelectionRangeOptions, SelectionRangeRegistrationOptions>>,
2391 #[doc = " The server provides semantic tokens support."]
2392 #[serde(skip_serializing_if = "Option::is_none")]
2393 #[serde(rename = "semanticTokensProvider")]
2394 pub semantic_tokens_provider:
2395 Option<OneOf<SemanticTokensOptions, SemanticTokensRegistrationOptions>>,
2396 #[doc = " The server provides signature help support."]
2397 #[serde(skip_serializing_if = "Option::is_none")]
2398 #[serde(rename = "signatureHelpProvider")]
2399 pub signature_help_provider: Option<SignatureHelpOptions>,
2400 #[doc = " Defines how text documents are synced. Is either a detailed structure defining each "]
2401 #[doc = " notification or for backwards compatibility the TextDocumentSyncKind number. If omitted it "]
2402 #[doc = " defaults to `TextDocumentSyncKind.None`."]
2403 #[serde(default = "TextDocumentSync::opt_default_other")]
2405 #[serde(rename = "textDocumentSync")]
2406 pub text_document_sync: Option<TextDocumentSync>,
2407 #[doc = " The server provides goto type definition support."]
2408 #[serde(skip_serializing_if = "Option::is_none")]
2409 #[serde(rename = "typeDefinitionProvider")]
2410 pub type_definition_provider:
2411 Option<OneOf3<bool, TypeDefinitionOptions, TypeDefinitionRegistrationOptions>>,
2412 #[doc = " Workspace specific server capabilities"]
2413 #[serde(skip_serializing_if = "Option::is_none")]
2414 pub workspace: Option<ServerCapabilitiesWorkspace>,
2415 #[doc = " The server provides workspace symbol support."]
2416 #[serde(skip_serializing_if = "Option::is_none")]
2417 #[serde(rename = "workspaceSymbolProvider")]
2418 pub workspace_symbol_provider: Option<OneOf<bool, WorkspaceSymbolOptions>>,
2419}
2420
2421pub type TextDocumentSync = OneOf<TextDocumentSyncOptions, TextDocumentSyncKind>;
2422
2423#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
2424pub struct SetTraceParams {
2425 #[doc = " The new value that should be assigned to the trace setting."]
2426 pub value: TraceValue,
2427}
2428#[doc = " Client capabilities for the show document request."]
2429#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
2430pub struct ShowDocumentClientCapabilities {
2431 #[doc = " The client has support for the show document request."]
2432 pub support: bool,
2433}
2434#[doc = " Params to show a document."]
2435#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
2436pub struct ShowDocumentParams {
2437 #[doc = " Indicates to show the resource in an external program. To show for example "]
2438 #[doc = " `https://code.visualstudio.com/` in the default WEB browser set `external` to `true`."]
2439 #[serde(skip_serializing_if = "Option::is_none")]
2440 pub external: Option<bool>,
2441 #[doc = " An optional selection range if the document is a text document. Clients might ignore the "]
2442 #[doc = " property if an external program is started or the file is not a text file."]
2443 #[serde(skip_serializing_if = "Option::is_none")]
2444 pub selection: Option<Range>,
2445 #[doc = " An optional property to indicate whether the editor showing the document should take focus "]
2446 #[doc = " or not. Clients might ignore this property if an external program is started."]
2447 #[serde(skip_serializing_if = "Option::is_none")]
2448 #[serde(rename = "takeFocus")]
2449 pub take_focus: Option<bool>,
2450 #[doc = " The document uri to show."]
2451 pub uri: Uri,
2452}
2453#[doc = " The result of an show document request."]
2454#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
2455pub struct ShowDocumentResult {
2456 #[doc = " A boolean indicating if the show was successful."]
2457 pub success: bool,
2458}
2459#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
2460pub struct ShowMessageParams {
2461 #[doc = " The actual message."]
2462 pub message: String,
2463 #[doc = " The message type. See {@link MessageType } ."]
2464 #[serde(rename = "type")]
2465 pub type_: MessageType,
2466}
2467#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
2468pub struct ShowMessageRequestClientCapabilitiesMessageActionItem {
2469 #[doc = " Whether the client supports additional attributes which are preserved and sent back to the "]
2470 #[doc = " server in the request's response."]
2471 #[serde(skip_serializing_if = "Option::is_none")]
2472 #[serde(rename = "additionalPropertiesSupport")]
2473 pub additional_properties_support: Option<bool>,
2474}
2475#[doc = " Show message request client capabilities"]
2476#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
2477pub struct ShowMessageRequestClientCapabilities {
2478 #[doc = " Capabilities specific to the `MessageActionItem` type."]
2479 #[serde(skip_serializing_if = "Option::is_none")]
2480 #[serde(rename = "messageActionItem")]
2481 pub message_action_item: Option<ShowMessageRequestClientCapabilitiesMessageActionItem>,
2482}
2483#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
2484pub struct ShowMessageRequestParams {
2485 #[doc = " The message action items to present."]
2486 #[serde(skip_serializing_if = "Option::is_none")]
2487 pub actions: Option<Vec<MessageActionItem>>,
2488 #[doc = " The actual message"]
2489 pub message: String,
2490 #[doc = " The message type. See {@link MessageType }"]
2491 #[serde(rename = "type")]
2492 pub type_: MessageType,
2493}
2494
2495#[derive(Clone, PartialEq, Debug, Default)]
2496pub struct ShutdownParams {}