1use super::*;
2use serde::{Deserialize, Serialize};
3use serde_repr::{Deserialize_repr, Serialize_repr};
4
5#[doc = " A special text edit with an additional change annotation."]
6#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
7pub struct AnnotatedTextEdit {
8 #[doc = " The actual annotation identifier."]
9 #[serde(rename = "annotationId")]
10 pub annotation_id: ChangeAnnotationIdentifier,
11 #[doc = " The string to be inserted. For delete operations use an empty string."]
12 #[serde(rename = "newText")]
13 pub new_text: String,
14 #[doc = " The range of the text document to be manipulated. To insert text into a document create a "]
15 #[doc = " range where start === end."]
16 pub range: Range,
17}
18#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
19pub struct ApplyWorkspaceEditParams {
20 #[doc = " The edits to apply."]
21 pub edit: WorkspaceEdit,
22 #[doc = " An optional label of the workspace edit. This label is presented in the user interface for "]
23 #[doc = " example on an undo stack to undo the workspace edit."]
24 #[serde(skip_serializing_if = "Option::is_none")]
25 pub label: Option<String>,
26}
27#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
28pub struct ApplyWorkspaceEditResponse {
29 #[doc = " Indicates whether the edit was applied or not."]
30 pub applied: bool,
31 #[doc = " Depending on the client's failure handling strategy `failedChange` might contain the index "]
32 #[doc = " of the change that failed. This property is only available if the client signals a "]
33 #[doc = " `failureHandling` strategy in its client capabilities."]
34 #[serde(skip_serializing_if = "Option::is_none")]
35 #[serde(rename = "failedChange")]
36 pub failed_change: Option<Uinteger>,
37 #[doc = " An optional textual description for why the edit was not applied. This may be used by the "]
38 #[doc = " server for diagnostic logging or to provide a suitable error for a request that triggered "]
39 #[doc = " the edit."]
40 #[serde(skip_serializing_if = "Option::is_none")]
41 #[serde(rename = "failureReason")]
42 pub failure_reason: Option<String>,
43}
44#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
45pub struct CallHierarchyClientCapabilities {
46 #[doc = " Whether implementation supports dynamic registration. If this is set to `true` the client "]
47 #[doc = " supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` return "]
48 #[doc = " value for the corresponding server capability as well."]
49 #[serde(skip_serializing_if = "Option::is_none")]
50 #[serde(rename = "dynamicRegistration")]
51 pub dynamic_registration: Option<bool>,
52}
53#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
54pub struct CallHierarchyIncomingCall {
55 #[doc = " The item that makes the call."]
56 pub from: CallHierarchyItem,
57 #[doc = " The ranges at which the calls appear. This is relative to the caller denoted by "]
58 #[doc = " [`this.from`](#CallHierarchyIncomingCall.from)."]
59 #[serde(rename = "fromRanges")]
60 pub from_ranges: Vec<Range>,
61}
62#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
63pub struct CallHierarchyIncomingCallsParams {
64 pub item: CallHierarchyItem,
65 #[doc = " An optional token that a server can use to report partial results (e.g. streaming) to the "]
66 #[doc = " client."]
67 #[serde(skip_serializing_if = "Option::is_none")]
68 #[serde(rename = "partialResultToken")]
69 pub partial_result_token: Option<ProgressToken>,
70 #[doc = " An optional token that a server can use to report work done progress."]
71 #[serde(skip_serializing_if = "Option::is_none")]
72 #[serde(rename = "workDoneToken")]
73 pub work_done_token: Option<ProgressToken>,
74}
75#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
76pub struct CallHierarchyItem {
77 #[doc = " A data entry field that is preserved between a call hierarchy prepare and incoming calls or "]
78 #[doc = " outgoing calls requests."]
79 #[serde(skip_serializing_if = "Option::is_none")]
80 pub data: Option<serde_json::Value>,
81 #[doc = " More detail for this item, e.g. the signature of a function."]
82 #[serde(skip_serializing_if = "Option::is_none")]
83 pub detail: Option<String>,
84 #[doc = " The kind of this item."]
85 pub kind: SymbolKind,
86 #[doc = " The name of this item."]
87 pub name: String,
88 #[doc = " The range enclosing this symbol not including leading/trailing whitespace but everything "]
89 #[doc = " else, e.g. comments and code."]
90 pub range: Range,
91 #[doc = " The range that should be selected and revealed when this symbol is being picked, e.g. the "]
92 #[doc = " name of a function. Must be contained by the [`range`](#CallHierarchyItem.range)."]
93 #[serde(rename = "selectionRange")]
94 pub selection_range: Range,
95 #[doc = " Tags for this item."]
96 #[serde(skip_serializing_if = "Option::is_none")]
97 pub tags: Option<Vec<SymbolTag>>,
98 #[doc = " The resource identifier of this item."]
99 pub uri: DocumentUri,
100}
101#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
102pub struct CallHierarchyOptions {
103 #[serde(skip_serializing_if = "Option::is_none")]
104 #[serde(rename = "workDoneProgress")]
105 pub work_done_progress: Option<bool>,
106}
107#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
108pub struct CallHierarchyOutgoingCall {
109 #[doc = " The range at which this item is called. This is the range relative to the caller, e.g the "]
110 #[doc = " item passed to `callHierarchy/outgoingCalls` request."]
111 #[serde(rename = "fromRanges")]
112 pub from_ranges: Vec<Range>,
113 #[doc = " The item that is called."]
114 pub to: CallHierarchyItem,
115}
116#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
117pub struct CallHierarchyOutgoingCallsParams {
118 pub item: CallHierarchyItem,
119 #[doc = " An optional token that a server can use to report partial results (e.g. streaming) to the "]
120 #[doc = " client."]
121 #[serde(skip_serializing_if = "Option::is_none")]
122 #[serde(rename = "partialResultToken")]
123 pub partial_result_token: Option<ProgressToken>,
124 #[doc = " An optional token that a server can use to report work done progress."]
125 #[serde(skip_serializing_if = "Option::is_none")]
126 #[serde(rename = "workDoneToken")]
127 pub work_done_token: Option<ProgressToken>,
128}
129#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
130pub struct CallHierarchyPrepareParams {
131 #[doc = " The position inside the text document."]
132 pub position: Position,
133 #[doc = " The text document."]
134 #[serde(rename = "textDocument")]
135 pub text_document: TextDocumentIdentifier,
136 #[doc = " An optional token that a server can use to report work done progress."]
137 #[serde(skip_serializing_if = "Option::is_none")]
138 #[serde(rename = "workDoneToken")]
139 pub work_done_token: Option<ProgressToken>,
140}
141#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
142pub struct CallHierarchyRegistrationOptions {
143 #[doc = " A document selector to identify the scope of the registration. If set to null the document "]
144 #[doc = " selector provided on the client side will be used."]
145 #[serde(rename = "documentSelector")]
146 pub document_selector: serde_json::Value,
147 #[doc = " The id used to register the request. The id can be used to deregister the request again. "]
148 #[doc = " See also Registration#id."]
149 #[serde(skip_serializing_if = "Option::is_none")]
150 pub id: Option<String>,
151 #[serde(skip_serializing_if = "Option::is_none")]
152 #[serde(rename = "workDoneProgress")]
153 pub work_done_progress: Option<bool>,
154}
155#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
156pub struct CancelParams {
157 #[doc = " The request id to cancel."]
158 pub id: Option<ReqId>,
159}
160#[doc = " Additional information that describes document changes."]
161#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
162pub struct ChangeAnnotation {
163 #[doc = " A human-readable string which is rendered less prominent in the user interface."]
164 #[serde(skip_serializing_if = "Option::is_none")]
165 pub description: Option<String>,
166 #[doc = " A human-readable string describing the actual change. The string is rendered prominent in "]
167 #[doc = " the user interface."]
168 pub label: String,
169 #[doc = " A flag which indicates that user confirmation is needed before applying the change."]
170 #[serde(skip_serializing_if = "Option::is_none")]
171 #[serde(rename = "needsConfirmation")]
172 pub needs_confirmation: Option<bool>,
173}
174#[doc = " An identifier referring to a change annotation managed by a workspace edit."]
175pub type ChangeAnnotationIdentifier = String;
176#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
177pub struct ClientCapabilitiesGeneral {
178 #[doc = " Client capabilities specific to the client's markdown parser."]
179 #[serde(skip_serializing_if = "Option::is_none")]
180 pub markdown: Option<MarkdownClientCapabilities>,
181 #[doc = " Client capabilities specific to regular expressions."]
182 #[serde(skip_serializing_if = "Option::is_none")]
183 #[serde(rename = "regularExpressions")]
184 pub regular_expressions: Option<RegularExpressionsClientCapabilities>,
185}
186#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
187pub struct ClientCapabilitiesWindow {
188 #[doc = " Client capabilities for the show document request."]
189 #[serde(skip_serializing_if = "Option::is_none")]
190 #[serde(rename = "showDocument")]
191 pub show_document: Option<ShowDocumentClientCapabilities>,
192 #[doc = " Capabilities specific to the showMessage request"]
193 #[serde(skip_serializing_if = "Option::is_none")]
194 #[serde(rename = "showMessage")]
195 pub show_message: Option<ShowMessageRequestClientCapabilities>,
196 #[doc = " Whether client supports handling progress notifications. If set servers are allowed to "]
197 #[doc = " report in `workDoneProgress` property in the request specific server capabilities."]
198 #[serde(skip_serializing_if = "Option::is_none")]
199 #[serde(rename = "workDoneProgress")]
200 pub work_done_progress: Option<bool>,
201}
202#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
203pub struct ClientCapabilitiesWorkspaceFileOperations {
204 #[doc = " The client has support for sending didCreateFiles notifications."]
205 #[serde(skip_serializing_if = "Option::is_none")]
206 #[serde(rename = "didCreate")]
207 pub did_create: Option<bool>,
208 #[doc = " The client has support for sending didDeleteFiles notifications."]
209 #[serde(skip_serializing_if = "Option::is_none")]
210 #[serde(rename = "didDelete")]
211 pub did_delete: Option<bool>,
212 #[doc = " The client has support for sending didRenameFiles notifications."]
213 #[serde(skip_serializing_if = "Option::is_none")]
214 #[serde(rename = "didRename")]
215 pub did_rename: Option<bool>,
216 #[doc = " Whether the client supports dynamic registration for file requests/notifications."]
217 #[serde(skip_serializing_if = "Option::is_none")]
218 #[serde(rename = "dynamicRegistration")]
219 pub dynamic_registration: Option<bool>,
220 #[doc = " The client has support for sending willCreateFiles requests."]
221 #[serde(skip_serializing_if = "Option::is_none")]
222 #[serde(rename = "willCreate")]
223 pub will_create: Option<bool>,
224 #[doc = " The client has support for sending willDeleteFiles requests."]
225 #[serde(skip_serializing_if = "Option::is_none")]
226 #[serde(rename = "willDelete")]
227 pub will_delete: Option<bool>,
228 #[doc = " The client has support for sending willRenameFiles requests."]
229 #[serde(skip_serializing_if = "Option::is_none")]
230 #[serde(rename = "willRename")]
231 pub will_rename: Option<bool>,
232}
233#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
234pub struct ClientCapabilitiesWorkspace {
235 #[doc = " The client supports applying batch edits to the workspace by supporting the request "]
236 #[doc = " 'workspace/applyEdit'"]
237 #[serde(skip_serializing_if = "Option::is_none")]
238 #[serde(rename = "applyEdit")]
239 pub apply_edit: Option<bool>,
240 #[doc = " Capabilities specific to the code lens requests scoped to the workspace."]
241 #[serde(skip_serializing_if = "Option::is_none")]
242 #[serde(rename = "codeLens")]
243 pub code_lens: Option<CodeLensWorkspaceClientCapabilities>,
244 #[doc = " The client supports `workspace/configuration` requests."]
245 #[serde(skip_serializing_if = "Option::is_none")]
246 pub configuration: Option<bool>,
247 #[doc = " Capabilities specific to the `workspace/didChangeConfiguration` notification."]
248 #[serde(skip_serializing_if = "Option::is_none")]
249 #[serde(rename = "didChangeConfiguration")]
250 pub did_change_configuration: Option<DidChangeConfigurationClientCapabilities>,
251 #[doc = " Capabilities specific to the `workspace/didChangeWatchedFiles` notification."]
252 #[serde(skip_serializing_if = "Option::is_none")]
253 #[serde(rename = "didChangeWatchedFiles")]
254 pub did_change_watched_files: Option<DidChangeWatchedFilesClientCapabilities>,
255 #[doc = " Capabilities specific to the `workspace/executeCommand` request."]
256 #[serde(skip_serializing_if = "Option::is_none")]
257 #[serde(rename = "executeCommand")]
258 pub execute_command: Option<ExecuteCommandClientCapabilities>,
259 #[doc = " The client has support for file requests/notifications."]
260 #[serde(skip_serializing_if = "Option::is_none")]
261 #[serde(rename = "fileOperations")]
262 pub file_operations: Option<ClientCapabilitiesWorkspaceFileOperations>,
263 #[doc = " Capabilities specific to the semantic token requests scoped to the workspace."]
264 #[serde(skip_serializing_if = "Option::is_none")]
265 #[serde(rename = "semanticTokens")]
266 pub semantic_tokens: Option<SemanticTokensWorkspaceClientCapabilities>,
267 #[doc = " Capabilities specific to the `workspace/symbol` request."]
268 #[serde(skip_serializing_if = "Option::is_none")]
269 pub symbol: Option<WorkspaceSymbolClientCapabilities>,
270 #[doc = " Capabilities specific to `WorkspaceEdit`s"]
271 #[serde(skip_serializing_if = "Option::is_none")]
272 #[serde(rename = "workspaceEdit")]
273 pub workspace_edit: Option<WorkspaceEditClientCapabilities>,
274 #[doc = " The client has support for workspace folders."]
275 #[serde(skip_serializing_if = "Option::is_none")]
276 #[serde(rename = "workspaceFolders")]
277 pub workspace_folders: Option<bool>,
278}
279#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
280pub struct ClientCapabilities {
281 #[doc = " Experimental client capabilities."]
282 #[serde(skip_serializing_if = "Option::is_none")]
283 pub experimental: Option<serde_json::Value>,
284 #[doc = " General client capabilities."]
285 #[serde(skip_serializing_if = "Option::is_none")]
286 pub general: Option<ClientCapabilitiesGeneral>,
287 #[doc = " Text document specific client capabilities."]
288 #[serde(skip_serializing_if = "Option::is_none")]
289 #[serde(rename = "textDocument")]
290 pub text_document: Option<TextDocumentClientCapabilities>,
291 #[doc = " Window specific client capabilities."]
292 #[serde(skip_serializing_if = "Option::is_none")]
293 pub window: Option<ClientCapabilitiesWindow>,
294 #[doc = " Workspace specific client capabilities."]
295 #[serde(skip_serializing_if = "Option::is_none")]
296 pub workspace: Option<ClientCapabilitiesWorkspace>,
297}
298#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
299pub struct CodeActionDisabled {
300 #[doc = " Human readable description of why the code action is currently disabled."]
301 #[doc = " "]
302 #[doc = " This is displayed in the code actions UI."]
303 pub reason: String,
304}
305#[doc = " A code action represents a change that can be performed in code, e.g. to fix a problem or to "]
306#[doc = " refactor code."]
307#[doc = " "]
308#[doc = " A CodeAction must set either `edit` and/or a `command`. If both are supplied, the `edit` is "]
309#[doc = " applied first, then the `command` is executed."]
310#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
311pub struct CodeAction {
312 #[doc = " A command this code action executes. If a code action provides an edit and a command, first "]
313 #[doc = " the edit is executed and then the command."]
314 #[serde(skip_serializing_if = "Option::is_none")]
315 pub command: Option<Command>,
316 #[doc = " A data entry field that is preserved on a code action between a `textDocument/codeAction` "]
317 #[doc = " and a `codeAction/resolve` request."]
318 #[serde(skip_serializing_if = "Option::is_none")]
319 pub data: Option<serde_json::Value>,
320 #[doc = " The diagnostics that this code action resolves."]
321 #[serde(skip_serializing_if = "Option::is_none")]
322 pub diagnostics: Option<Vec<Diagnostic>>,
323 #[doc = " Marks that the code action cannot currently be applied."]
324 #[doc = " "]
325 #[doc = " Clients should follow the following guidelines regarding disabled code actions:"]
326 #[doc = " "]
327 #[doc = " - Disabled code actions are not shown in automatic lightbulbs code action menus."]
328 #[doc = " "]
329 #[doc = " - Disabled actions are shown as faded out in the code action menu when the user request a "]
330 #[doc = " more specific type of code action, such as refactorings."]
331 #[doc = " "]
332 #[doc = " - If the user has a keybinding that auto applies a code action and only a disabled code "]
333 #[doc = " actions are returned, the client should show the user an error message with `reason` in "]
334 #[doc = " the editor."]
335 #[serde(skip_serializing_if = "Option::is_none")]
336 pub disabled: Option<CodeActionDisabled>,
337 #[doc = " The workspace edit this code action performs."]
338 #[serde(skip_serializing_if = "Option::is_none")]
339 pub edit: Option<WorkspaceEdit>,
340 #[doc = " Marks this as a preferred action. Preferred actions are used by the `auto fix` command and "]
341 #[doc = " can be targeted by keybindings."]
342 #[doc = " "]
343 #[doc = " A quick fix should be marked preferred if it properly addresses the underlying error. A "]
344 #[doc = " refactoring should be marked preferred if it is the most reasonable choice of actions to "]
345 #[doc = " take."]
346 #[serde(skip_serializing_if = "Option::is_none")]
347 #[serde(rename = "isPreferred")]
348 pub is_preferred: Option<bool>,
349 #[doc = " The kind of the code action."]
350 #[doc = " "]
351 #[doc = " Used to filter code actions."]
352 #[serde(skip_serializing_if = "Option::is_none")]
353 pub kind: Option<CodeActionKind>,
354 #[doc = " A short, human-readable, title for this code action."]
355 pub title: String,
356}
357#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
358pub struct CodeActionClientCapabilitiesCodeActionLiteralSupportCodeActionKind {
359 #[doc = " The code action kind values the client supports. When this property exists the client also "]
360 #[doc = " guarantees that it will handle values outside its set gracefully and falls back to a "]
361 #[doc = " default value when unknown."]
362 #[serde(rename = "valueSet")]
363 pub value_set: Vec<CodeActionKind>,
364}
365#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
366pub struct CodeActionClientCapabilitiesCodeActionLiteralSupport {
367 #[doc = " The code action kind is supported with the following value set."]
368 #[serde(rename = "codeActionKind")]
369 pub code_action_kind: CodeActionClientCapabilitiesCodeActionLiteralSupportCodeActionKind,
370}
371#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
372pub struct CodeActionClientCapabilitiesResolveSupport {
373 #[doc = " The properties that a client can resolve lazily."]
374 pub properties: Vec<String>,
375}
376#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
377pub struct CodeActionClientCapabilities {
378 #[doc = " The client supports code action literals as a valid response of the "]
379 #[doc = " `textDocument/codeAction` request."]
380 #[serde(skip_serializing_if = "Option::is_none")]
381 #[serde(rename = "codeActionLiteralSupport")]
382 pub code_action_literal_support: Option<CodeActionClientCapabilitiesCodeActionLiteralSupport>,
383 #[doc = " Whether code action supports the `data` property which is preserved between a "]
384 #[doc = " `textDocument/codeAction` and a `codeAction/resolve` request."]
385 #[serde(skip_serializing_if = "Option::is_none")]
386 #[serde(rename = "dataSupport")]
387 pub data_support: Option<bool>,
388 #[doc = " Whether code action supports the `disabled` property."]
389 #[serde(skip_serializing_if = "Option::is_none")]
390 #[serde(rename = "disabledSupport")]
391 pub disabled_support: Option<bool>,
392 #[doc = " Whether code action supports dynamic registration."]
393 #[serde(skip_serializing_if = "Option::is_none")]
394 #[serde(rename = "dynamicRegistration")]
395 pub dynamic_registration: Option<bool>,
396 #[doc = " Whether the client honors the change annotations in text edits and resource operations "]
397 #[doc = " returned via the `CodeAction#edit` property by for example presenting the workspace edit in "]
398 #[doc = " the user interface and asking for confirmation."]
399 #[serde(skip_serializing_if = "Option::is_none")]
400 #[serde(rename = "honorsChangeAnnotations")]
401 pub honors_change_annotations: Option<bool>,
402 #[doc = " Whether code action supports the `isPreferred` property."]
403 #[serde(skip_serializing_if = "Option::is_none")]
404 #[serde(rename = "isPreferredSupport")]
405 pub is_preferred_support: Option<bool>,
406 #[doc = " Whether the client supports resolving additional code action properties via a separate "]
407 #[doc = " `codeAction/resolve` request."]
408 #[serde(skip_serializing_if = "Option::is_none")]
409 #[serde(rename = "resolveSupport")]
410 pub resolve_support: Option<CodeActionClientCapabilitiesResolveSupport>,
411}
412#[doc = " Contains additional diagnostic information about the context in which a code action is run."]
413#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
414pub struct CodeActionContext {
415 #[doc = " An array of diagnostics known on the client side overlapping the range provided to the "]
416 #[doc = " `textDocument/codeAction` request. They are provided so that the server knows which errors "]
417 #[doc = " are currently presented to the user for the given range. There is no guarantee that these "]
418 #[doc = " accurately reflect the error state of the resource. The primary parameter to compute code "]
419 #[doc = " actions is the provided range."]
420 pub diagnostics: Vec<Diagnostic>,
421 #[doc = " Requested kind of actions to return."]
422 #[doc = " "]
423 #[doc = " Actions not of this kind are filtered out by the client before being shown. So servers can "]
424 #[doc = " omit computing them."]
425 #[serde(skip_serializing_if = "Option::is_none")]
426 pub only: Option<Vec<CodeActionKind>>,
427}
428#[doc = " The kind of a code action."]
429#[doc = " "]
430#[doc = " Kinds are a hierarchical list of identifiers separated by `.`, e.g. "]
431#[doc = " `\"refactor.extract.function\"`."]
432#[doc = " "]
433#[doc = " The set of kinds is open and client needs to announce the kinds it supports to the server "]
434#[doc = " during initialization. "]
435#[doc = " A set of predefined code action kinds."]
436pub type CodeActionKind = String;
437#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
438pub struct CodeActionOptions {
439 #[doc = " CodeActionKinds that this server may return."]
440 #[doc = " "]
441 #[doc = " The list of kinds may be generic, such as `CodeActionKind.Refactor`, or the server may list "]
442 #[doc = " out every specific kind they provide."]
443 #[serde(skip_serializing_if = "Option::is_none")]
444 #[serde(rename = "codeActionKinds")]
445 pub code_action_kinds: Option<Vec<CodeActionKind>>,
446 #[doc = " The server provides support to resolve additional information for a code action."]
447 #[serde(skip_serializing_if = "Option::is_none")]
448 #[serde(rename = "resolveProvider")]
449 pub resolve_provider: Option<bool>,
450 #[serde(skip_serializing_if = "Option::is_none")]
451 #[serde(rename = "workDoneProgress")]
452 pub work_done_progress: Option<bool>,
453}
454#[doc = " Params for the CodeActionRequest"]
455#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
456pub struct CodeActionParams {
457 #[doc = " Context carrying additional information."]
458 pub context: CodeActionContext,
459 #[doc = " An optional token that a server can use to report partial results (e.g. streaming) to the "]
460 #[doc = " client."]
461 #[serde(skip_serializing_if = "Option::is_none")]
462 #[serde(rename = "partialResultToken")]
463 pub partial_result_token: Option<ProgressToken>,
464 #[doc = " The range for which the command was invoked."]
465 pub range: Range,
466 #[doc = " The document in which the command was invoked."]
467 #[serde(rename = "textDocument")]
468 pub text_document: TextDocumentIdentifier,
469 #[doc = " An optional token that a server can use to report work done progress."]
470 #[serde(skip_serializing_if = "Option::is_none")]
471 #[serde(rename = "workDoneToken")]
472 pub work_done_token: Option<ProgressToken>,
473}
474#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
475pub struct CodeActionRegistrationOptions {
476 #[doc = " CodeActionKinds that this server may return."]
477 #[doc = " "]
478 #[doc = " The list of kinds may be generic, such as `CodeActionKind.Refactor`, or the server may list "]
479 #[doc = " out every specific kind they provide."]
480 #[serde(skip_serializing_if = "Option::is_none")]
481 #[serde(rename = "codeActionKinds")]
482 pub code_action_kinds: Option<Vec<CodeActionKind>>,
483 #[doc = " A document selector to identify the scope of the registration. If set to null the document "]
484 #[doc = " selector provided on the client side will be used."]
485 #[serde(rename = "documentSelector")]
486 pub document_selector: serde_json::Value,
487 #[doc = " The server provides support to resolve additional information for a code action."]
488 #[serde(skip_serializing_if = "Option::is_none")]
489 #[serde(rename = "resolveProvider")]
490 pub resolve_provider: Option<bool>,
491 #[serde(skip_serializing_if = "Option::is_none")]
492 #[serde(rename = "workDoneProgress")]
493 pub work_done_progress: Option<bool>,
494}
495#[doc = " Structure to capture a description for an error code."]
496#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
497pub struct CodeDescription {
498 #[doc = " An URI to open with more information about the diagnostic error."]
499 pub href: Uri,
500}
501#[doc = " A code lens represents a command that should be shown along with source text, like the number "]
502#[doc = " of references, a way to run tests, etc."]
503#[doc = " "]
504#[doc = " A code lens is _unresolved_ when no command is associated to it. For performance reasons the "]
505#[doc = " creation of a code lens and resolving should be done in two stages."]
506#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
507pub struct CodeLens {
508 #[doc = " The command this code lens represents."]
509 #[serde(skip_serializing_if = "Option::is_none")]
510 pub command: Option<Command>,
511 #[doc = " A data entry field that is preserved on a code lens item between a code lens and a code "]
512 #[doc = " lens resolve request."]
513 #[serde(skip_serializing_if = "Option::is_none")]
514 pub data: Option<serde_json::Value>,
515 #[doc = " The range in which this code lens is valid. Should only span a single line."]
516 pub range: Range,
517}
518#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
519pub struct CodeLensClientCapabilities {
520 #[doc = " Whether code lens supports dynamic registration."]
521 #[serde(skip_serializing_if = "Option::is_none")]
522 #[serde(rename = "dynamicRegistration")]
523 pub dynamic_registration: Option<bool>,
524}
525#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
526pub struct CodeLensOptions {
527 #[doc = " Code lens has a resolve provider as well."]
528 #[serde(skip_serializing_if = "Option::is_none")]
529 #[serde(rename = "resolveProvider")]
530 pub resolve_provider: Option<bool>,
531 #[serde(skip_serializing_if = "Option::is_none")]
532 #[serde(rename = "workDoneProgress")]
533 pub work_done_progress: Option<bool>,
534}
535#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
536pub struct CodeLensParams {
537 #[doc = " An optional token that a server can use to report partial results (e.g. streaming) to the "]
538 #[doc = " client."]
539 #[serde(skip_serializing_if = "Option::is_none")]
540 #[serde(rename = "partialResultToken")]
541 pub partial_result_token: Option<ProgressToken>,
542 #[doc = " The document to request code lens for."]
543 #[serde(rename = "textDocument")]
544 pub text_document: TextDocumentIdentifier,
545 #[doc = " An optional token that a server can use to report work done progress."]
546 #[serde(skip_serializing_if = "Option::is_none")]
547 #[serde(rename = "workDoneToken")]
548 pub work_done_token: Option<ProgressToken>,
549}
550#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
551pub struct CodeLensRegistrationOptions {
552 #[doc = " A document selector to identify the scope of the registration. If set to null the document "]
553 #[doc = " selector provided on the client side will be used."]
554 #[serde(rename = "documentSelector")]
555 pub document_selector: serde_json::Value,
556 #[doc = " Code lens has a resolve provider as well."]
557 #[serde(skip_serializing_if = "Option::is_none")]
558 #[serde(rename = "resolveProvider")]
559 pub resolve_provider: Option<bool>,
560 #[serde(skip_serializing_if = "Option::is_none")]
561 #[serde(rename = "workDoneProgress")]
562 pub work_done_progress: Option<bool>,
563}
564#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
565pub struct CodeLensWorkspaceClientCapabilities {
566 #[doc = " Whether the client implementation supports a refresh request sent from the server to the "]
567 #[doc = " client."]
568 #[doc = " "]
569 #[doc = " Note that this event is global and will force the client to refresh all code lenses "]
570 #[doc = " currently shown. It should be used with absolute care and is useful for situation where a "]
571 #[doc = " server for example detect a project wide change that requires such a calculation."]
572 #[serde(skip_serializing_if = "Option::is_none")]
573 #[serde(rename = "refreshSupport")]
574 pub refresh_support: Option<bool>,
575}
576#[doc = " Represents a color in RGBA space."]
577#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
578pub struct Color {
579 #[doc = " The alpha component of this color in the range [0-1]."]
580 pub alpha: Decimal,
581 #[doc = " The blue component of this color in the range [0-1]."]
582 pub blue: Decimal,
583 #[doc = " The green component of this color in the range [0-1]."]
584 pub green: Decimal,
585 #[doc = " The red component of this color in the range [0-1]."]
586 pub red: Decimal,
587}
588#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
589pub struct ColorInformation {
590 #[doc = " The actual color value for this color range."]
591 pub color: Color,
592 #[doc = " The range in the document where this color appears."]
593 pub range: Range,
594}
595#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
596pub struct ColorPresentation {
597 #[doc = " An optional array of additional [text edits](#TextEdit) that are applied when selecting "]
598 #[doc = " this color presentation. Edits must not overlap with the main "]
599 #[doc = " [edit](#ColorPresentation.textEdit) nor with themselves."]
600 #[serde(skip_serializing_if = "Option::is_none")]
601 #[serde(rename = "additionalTextEdits")]
602 pub additional_text_edits: Option<Vec<TextEdit>>,
603 #[doc = " The label of this color presentation. It will be shown on the color picker header. By "]
604 #[doc = " default this is also the text that is inserted when selecting this color presentation."]
605 pub label: String,
606 #[doc = " An [edit](#TextEdit) which is applied to a document when selecting this presentation for "]
607 #[doc = " the color. When `falsy` the [label](#ColorPresentation.label) is used."]
608 #[serde(skip_serializing_if = "Option::is_none")]
609 #[serde(rename = "textEdit")]
610 pub text_edit: Option<TextEdit>,
611}
612#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
613pub struct ColorPresentationParams {
614 #[doc = " The color information to request presentations for."]
615 pub color: Color,
616 #[doc = " An optional token that a server can use to report partial results (e.g. streaming) to the "]
617 #[doc = " client."]
618 #[serde(skip_serializing_if = "Option::is_none")]
619 #[serde(rename = "partialResultToken")]
620 pub partial_result_token: Option<ProgressToken>,
621 #[doc = " The range where the color would be inserted. Serves as a context."]
622 pub range: Range,
623 #[doc = " The text document."]
624 #[serde(rename = "textDocument")]
625 pub text_document: TextDocumentIdentifier,
626 #[doc = " An optional token that a server can use to report work done progress."]
627 #[serde(skip_serializing_if = "Option::is_none")]
628 #[serde(rename = "workDoneToken")]
629 pub work_done_token: Option<ProgressToken>,
630}
631#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
632pub struct Command {
633 #[doc = " Arguments that the command handler should be invoked with."]
634 #[serde(skip_serializing_if = "Option::is_none")]
635 pub arguments: Option<Vec<serde_json::Value>>,
636 #[doc = " The identifier of the actual command handler."]
637 pub command: String,
638 #[doc = " Title of the command, like `save`."]
639 pub title: String,
640}
641#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
642pub struct CompletionClientCapabilitiesCompletionItemInsertTextModeSupport {
643 #[serde(rename = "valueSet")]
644 pub value_set: Vec<InsertTextMode>,
645}
646#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
647pub struct CompletionClientCapabilitiesCompletionItemResolveSupport {
648 #[doc = " The properties that a client can resolve lazily."]
649 pub properties: Vec<String>,
650}
651#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
652pub struct CompletionClientCapabilitiesCompletionItemTagSupport {
653 #[doc = " The tags supported by the client."]
654 #[serde(rename = "valueSet")]
655 pub value_set: Vec<CompletionItemTag>,
656}
657#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
658pub struct CompletionClientCapabilitiesCompletionItem {
659 #[doc = " Client supports commit characters on a completion item."]
660 #[serde(skip_serializing_if = "Option::is_none")]
661 #[serde(rename = "commitCharactersSupport")]
662 pub commit_characters_support: Option<bool>,
663 #[doc = " Client supports the deprecated property on a completion item."]
664 #[serde(skip_serializing_if = "Option::is_none")]
665 #[serde(rename = "deprecatedSupport")]
666 pub deprecated_support: Option<bool>,
667 #[doc = " Client supports the following content formats for the documentation property. The order "]
668 #[doc = " describes the preferred format of the client."]
669 #[serde(skip_serializing_if = "Option::is_none")]
670 #[serde(rename = "documentationFormat")]
671 pub documentation_format: Option<Vec<MarkupKind>>,
672 #[doc = " Client supports insert replace edit to control different behavior if a completion item is "]
673 #[doc = " inserted in the text or should replace text."]
674 #[serde(skip_serializing_if = "Option::is_none")]
675 #[serde(rename = "insertReplaceSupport")]
676 pub insert_replace_support: Option<bool>,
677 #[doc = " The client supports the `insertTextMode` property on a completion item to override the "]
678 #[doc = " whitespace handling mode as defined by the client."]
679 #[serde(skip_serializing_if = "Option::is_none")]
680 #[serde(rename = "insertTextModeSupport")]
681 pub insert_text_mode_support:
682 Option<CompletionClientCapabilitiesCompletionItemInsertTextModeSupport>,
683 #[doc = " Client supports the preselect property on a completion item."]
684 #[serde(skip_serializing_if = "Option::is_none")]
685 #[serde(rename = "preselectSupport")]
686 pub preselect_support: Option<bool>,
687 #[doc = " Indicates which properties a client can resolve lazily on a completion item. Before version "]
688 #[doc = " 3.16.0 only the predefined properties `documentation` and `detail` could be resolved "]
689 #[doc = " lazily."]
690 #[serde(skip_serializing_if = "Option::is_none")]
691 #[serde(rename = "resolveSupport")]
692 pub resolve_support: Option<CompletionClientCapabilitiesCompletionItemResolveSupport>,
693 #[doc = " Client supports snippets as insert text."]
694 #[doc = " "]
695 #[doc = " A snippet can define tab stops and placeholders with `$1`, `$2` and `${3:foo}`. `$0` "]
696 #[doc = " defines the final tab stop, it defaults to the end of the snippet. Placeholders with equal "]
697 #[doc = " identifiers are linked, that is typing in one will update others too."]
698 #[serde(skip_serializing_if = "Option::is_none")]
699 #[serde(rename = "snippetSupport")]
700 pub snippet_support: Option<bool>,
701 #[doc = " Client supports the tag property on a completion item. Clients supporting tags have to "]
702 #[doc = " handle unknown tags gracefully. Clients especially need to preserve unknown tags when "]
703 #[doc = " sending a completion item back to the server in a resolve call."]
704 #[serde(skip_serializing_if = "Option::is_none")]
705 #[serde(rename = "tagSupport")]
706 pub tag_support: Option<CompletionClientCapabilitiesCompletionItemTagSupport>,
707}
708#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
709pub struct CompletionClientCapabilitiesCompletionItemKind {
710 #[doc = " The completion item kind values the client supports. When this property exists the client "]
711 #[doc = " also guarantees that it will handle values outside its set gracefully and falls back to a "]
712 #[doc = " default value when unknown."]
713 #[doc = " "]
714 #[doc = " If this property is not present the client only supports the completion items kinds from "]
715 #[doc = " `Text` to `Reference` as defined in the initial version of the protocol."]
716 #[serde(skip_serializing_if = "Option::is_none")]
717 #[serde(rename = "valueSet")]
718 pub value_set: Option<Vec<CompletionItemKind>>,
719}
720#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
721pub struct CompletionClientCapabilities {
722 #[doc = " The client supports the following `CompletionItem` specific capabilities."]
723 #[serde(skip_serializing_if = "Option::is_none")]
724 #[serde(rename = "completionItem")]
725 pub completion_item: Option<CompletionClientCapabilitiesCompletionItem>,
726 #[serde(skip_serializing_if = "Option::is_none")]
727 #[serde(rename = "completionItemKind")]
728 pub completion_item_kind: Option<CompletionClientCapabilitiesCompletionItemKind>,
729 #[doc = " The client supports to send additional context information for a `textDocument/completion` "]
730 #[doc = " request."]
731 #[serde(skip_serializing_if = "Option::is_none")]
732 #[serde(rename = "contextSupport")]
733 pub context_support: Option<bool>,
734 #[doc = " Whether completion supports dynamic registration."]
735 #[serde(skip_serializing_if = "Option::is_none")]
736 #[serde(rename = "dynamicRegistration")]
737 pub dynamic_registration: Option<bool>,
738}
739#[doc = " Contains additional information about the context in which a completion request is triggered."]
740#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
741pub struct CompletionContext {
742 #[doc = " The trigger character (a single character) that has trigger code complete. Is undefined if "]
743 #[doc = " `triggerKind !== CompletionTriggerKind.TriggerCharacter`"]
744 #[serde(skip_serializing_if = "Option::is_none")]
745 #[serde(rename = "triggerCharacter")]
746 pub trigger_character: Option<String>,
747 #[doc = " How the completion was triggered."]
748 #[serde(rename = "triggerKind")]
749 pub trigger_kind: CompletionTriggerKind,
750}
751#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
752pub struct CompletionItem {
753 #[doc = " An optional array of additional text edits that are applied when selecting this completion. "]
754 #[doc = " Edits must not overlap (including the same insert position) with the main edit nor with "]
755 #[doc = " themselves."]
756 #[doc = " "]
757 #[doc = " Additional text edits should be used to change text unrelated to the current cursor "]
758 #[doc = " position (for example adding an import statement at the top of the file if the completion "]
759 #[doc = " item will insert an unqualified type)."]
760 #[serde(skip_serializing_if = "Option::is_none")]
761 #[serde(rename = "additionalTextEdits")]
762 pub additional_text_edits: Option<Vec<TextEdit>>,
763 #[doc = " An optional command that is executed *after* inserting this completion."]
764 #[doc = " *Note* that additional modifications to the current document should be described with the "]
765 #[doc = " additionalTextEdits-property."]
766 #[serde(skip_serializing_if = "Option::is_none")]
767 pub command: Option<Command>,
768 #[doc = " An optional set of characters that when pressed while this completion is active will accept "]
769 #[doc = " it first and then type that character. *Note* that all commit characters should have "]
770 #[doc = " `length=1` and that superfluous characters will be ignored."]
771 #[serde(skip_serializing_if = "Option::is_none")]
772 #[serde(rename = "commitCharacters")]
773 pub commit_characters: Option<Vec<String>>,
774 #[doc = " A data entry field that is preserved on a completion item between a completion and a "]
775 #[doc = " completion resolve request."]
776 #[serde(skip_serializing_if = "Option::is_none")]
777 pub data: Option<serde_json::Value>,
778 #[doc = " Indicates if this item is deprecated."]
779 #[serde(skip_serializing_if = "Option::is_none")]
780 pub deprecated: Option<bool>,
781 #[doc = " A human-readable string with additional information about this item, like type or symbol "]
782 #[doc = " information."]
783 #[serde(skip_serializing_if = "Option::is_none")]
784 pub detail: Option<String>,
785 #[doc = " A human-readable string that represents a doc-comment."]
786 #[serde(skip_serializing_if = "Option::is_none")]
787 pub documentation: Option<OneOf<String, MarkupContent>>,
788 #[doc = " A string that should be used when filtering a set of completion items. When `falsy` the "]
789 #[doc = " label is used as the filter text for this item."]
790 #[serde(skip_serializing_if = "Option::is_none")]
791 #[serde(rename = "filterText")]
792 pub filter_text: Option<String>,
793 #[doc = " A string that should be inserted into a document when selecting this completion. When "]
794 #[doc = " `falsy` the label is used as the insert text for this item."]
795 #[doc = " "]
796 #[doc = " The `insertText` is subject to interpretation by the client side. Some tools might not take "]
797 #[doc = " the string literally. For example VS Code when code complete is requested in this example "]
798 #[doc = " `con<cursor position>` and a completion item with an `insertText` of `console` is provided "]
799 #[doc = " it will only insert `sole`. Therefore it is recommended to use `textEdit` instead since it "]
800 #[doc = " avoids additional client side interpretation."]
801 #[serde(skip_serializing_if = "Option::is_none")]
802 #[serde(rename = "insertText")]
803 pub insert_text: Option<String>,
804 #[doc = " The format of the insert text. The format applies to both the `insertText` property and the "]
805 #[doc = " `newText` property of a provided `textEdit`. If omitted defaults to "]
806 #[doc = " `InsertTextFormat.PlainText`."]
807 #[serde(skip_serializing_if = "Option::is_none")]
808 #[serde(rename = "insertTextFormat")]
809 pub insert_text_format: Option<InsertTextFormat>,
810 #[doc = " How whitespace and indentation is handled during completion item insertion. If not provided "]
811 #[doc = " the client's default value is used."]
812 #[serde(skip_serializing_if = "Option::is_none")]
813 #[serde(rename = "insertTextMode")]
814 pub insert_text_mode: Option<InsertTextMode>,
815 #[doc = " The kind of this completion item. Based of the kind an icon is chosen by the editor. The "]
816 #[doc = " standardized set of available values is defined in `CompletionItemKind`."]
817 #[serde(skip_serializing_if = "Option::is_none")]
818 pub kind: Option<CompletionItemKind>,
819 #[doc = " The label of this completion item. By default also the text that is inserted when selecting "]
820 #[doc = " this completion."]
821 pub label: String,
822 #[doc = " Select this item when showing."]
823 #[doc = " "]
824 #[doc = " *Note* that only one completion item can be selected and that the tool / client decides "]
825 #[doc = " which item that is. The rule is that the *first* item of those that match best is selected."]
826 #[serde(skip_serializing_if = "Option::is_none")]
827 pub preselect: Option<bool>,
828 #[doc = " A string that should be used when comparing this item with other items. When `falsy` the "]
829 #[doc = " label is used as the sort text for this item."]
830 #[serde(skip_serializing_if = "Option::is_none")]
831 #[serde(rename = "sortText")]
832 pub sort_text: Option<String>,
833 #[doc = " Tags for this completion item."]
834 #[serde(skip_serializing_if = "Option::is_none")]
835 pub tags: Option<Vec<CompletionItemTag>>,
836 #[doc = " An edit which is applied to a document when selecting this completion. When an edit is "]
837 #[doc = " provided the value of `insertText` is ignored."]
838 #[doc = " "]
839 #[doc = " *Note:* The range of the edit must be a single line range and it must contain the position "]
840 #[doc = " at which completion has been requested."]
841 #[doc = " "]
842 #[doc = " Most editors support two different operations when accepting a completion item. One is to "]
843 #[doc = " insert a completion text and the other is to replace an existing text with a completion "]
844 #[doc = " text. Since this can usually not be predetermined by a server it can report both ranges. "]
845 #[doc = " Clients need to signal support for `InsertReplaceEdit`s via the "]
846 #[doc = " `textDocument.completion.insertReplaceSupport` client capability property."]
847 #[doc = " "]
848 #[doc = " *Note 1:* The text edit's range as well as both ranges from an insert replace edit must be "]
849 #[doc = " a [single line] and they must contain the position at which completion has been requested."]
850 #[doc = " *Note 2:* If an `InsertReplaceEdit` is returned the edit's insert range must be a prefix of "]
851 #[doc = " the edit's replace range, that means it must be contained and starting at the same "]
852 #[doc = " position."]
853 #[serde(skip_serializing_if = "Option::is_none")]
854 #[serde(rename = "textEdit")]
855 pub text_edit: Option<OneOf<TextEdit, InsertReplaceEdit>>,
856}
857#[doc = " The kind of a completion entry."]
858#[derive(Clone, PartialEq, Debug, Serialize_repr, Deserialize_repr)]
859#[repr(i64)]
860pub enum CompletionItemKind {
861 Text = 1,
862 Method = 2,
863 Function = 3,
864 Constructor = 4,
865 Field = 5,
866 Variable = 6,
867 Class = 7,
868 Interface = 8,
869 Module = 9,
870 Property = 10,
871 Unit = 11,
872 Value = 12,
873 Enum = 13,
874 Keyword = 14,
875 Snippet = 15,
876 Color = 16,
877 File = 17,
878 Reference = 18,
879 Folder = 19,
880 EnumMember = 20,
881 Constant = 21,
882 Struct = 22,
883 Event = 23,
884 Operator = 24,
885 TypeParameter = 25,
886}
887#[doc = " Completion item tags are extra annotations that tweak the rendering of a completion item."]
888pub type CompletionItemTag = f64;
889#[doc = " Represents a collection of [completion items](#CompletionItem) to be presented in the editor."]
890#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
891pub struct CompletionList {
892 #[doc = " This list is not complete. Further typing should result in recomputing this list."]
893 #[doc = " "]
894 #[doc = " Recomputed lists have all their items replaced (not appended) in the incomplete completion "]
895 #[doc = " sessions."]
896 #[serde(rename = "isIncomplete")]
897 pub is_incomplete: bool,
898 #[doc = " The completion items."]
899 pub items: Vec<CompletionItem>,
900}
901#[doc = " Completion options."]
902#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
903pub struct CompletionOptions {
904 #[doc = " The list of all possible characters that commit a completion. This field can be used if "]
905 #[doc = " clients don't support individual commit characters per completion item. See client "]
906 #[doc = " capability `completion.completionItem.commitCharactersSupport`."]
907 #[doc = " "]
908 #[doc = " If a server provides both `allCommitCharacters` and commit characters on an individual "]
909 #[doc = " completion item the ones on the completion item win."]
910 #[serde(skip_serializing_if = "Option::is_none")]
911 #[serde(rename = "allCommitCharacters")]
912 pub all_commit_characters: Option<Vec<String>>,
913 #[doc = " The server provides support to resolve additional information for a completion item."]
914 #[serde(skip_serializing_if = "Option::is_none")]
915 #[serde(rename = "resolveProvider")]
916 pub resolve_provider: Option<bool>,
917 #[doc = " Most tools trigger completion request automatically without explicitly requesting it using "]
918 #[doc = " a keyboard shortcut (e.g. Ctrl+Space). Typically they do so when the user starts to type an "]
919 #[doc = " identifier. For example if the user types `c` in a JavaScript file code complete will "]
920 #[doc = " automatically pop up present `console` besides others as a completion item. Characters that "]
921 #[doc = " make up identifiers don't need to be listed here."]
922 #[doc = " "]
923 #[doc = " If code complete should automatically be trigger on characters not being valid inside an "]
924 #[doc = " identifier (for example `.` in JavaScript) list them in `triggerCharacters`."]
925 #[serde(skip_serializing_if = "Option::is_none")]
926 #[serde(rename = "triggerCharacters")]
927 pub trigger_characters: Option<Vec<String>>,
928 #[serde(skip_serializing_if = "Option::is_none")]
929 #[serde(rename = "workDoneProgress")]
930 pub work_done_progress: Option<bool>,
931}
932#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
933pub struct CompletionParams {
934 #[doc = " The completion context. This is only available if the client specifies to send this using "]
935 #[doc = " the client capability `completion.contextSupport === true`"]
936 #[serde(skip_serializing_if = "Option::is_none")]
937 pub context: Option<CompletionContext>,
938 #[doc = " An optional token that a server can use to report partial results (e.g. streaming) to the "]
939 #[doc = " client."]
940 #[serde(skip_serializing_if = "Option::is_none")]
941 #[serde(rename = "partialResultToken")]
942 pub partial_result_token: Option<ProgressToken>,
943 #[doc = " The position inside the text document."]
944 pub position: Position,
945 #[doc = " The text document."]
946 #[serde(rename = "textDocument")]
947 pub text_document: TextDocumentIdentifier,
948 #[doc = " An optional token that a server can use to report work done progress."]
949 #[serde(skip_serializing_if = "Option::is_none")]
950 #[serde(rename = "workDoneToken")]
951 pub work_done_token: Option<ProgressToken>,
952}
953#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
954pub struct CompletionRegistrationOptions {
955 #[doc = " The list of all possible characters that commit a completion. This field can be used if "]
956 #[doc = " clients don't support individual commit characters per completion item. See client "]
957 #[doc = " capability `completion.completionItem.commitCharactersSupport`."]
958 #[doc = " "]
959 #[doc = " If a server provides both `allCommitCharacters` and commit characters on an individual "]
960 #[doc = " completion item the ones on the completion item win."]
961 #[serde(skip_serializing_if = "Option::is_none")]
962 #[serde(rename = "allCommitCharacters")]
963 pub all_commit_characters: Option<Vec<String>>,
964 #[doc = " A document selector to identify the scope of the registration. If set to null the document "]
965 #[doc = " selector provided on the client side will be used."]
966 #[serde(rename = "documentSelector")]
967 pub document_selector: serde_json::Value,
968 #[doc = " The server provides support to resolve additional information for a completion item."]
969 #[serde(skip_serializing_if = "Option::is_none")]
970 #[serde(rename = "resolveProvider")]
971 pub resolve_provider: Option<bool>,
972 #[doc = " Most tools trigger completion request automatically without explicitly requesting it using "]
973 #[doc = " a keyboard shortcut (e.g. Ctrl+Space). Typically they do so when the user starts to type an "]
974 #[doc = " identifier. For example if the user types `c` in a JavaScript file code complete will "]
975 #[doc = " automatically pop up present `console` besides others as a completion item. Characters that "]
976 #[doc = " make up identifiers don't need to be listed here."]
977 #[doc = " "]
978 #[doc = " If code complete should automatically be trigger on characters not being valid inside an "]
979 #[doc = " identifier (for example `.` in JavaScript) list them in `triggerCharacters`."]
980 #[serde(skip_serializing_if = "Option::is_none")]
981 #[serde(rename = "triggerCharacters")]
982 pub trigger_characters: Option<Vec<String>>,
983 #[serde(skip_serializing_if = "Option::is_none")]
984 #[serde(rename = "workDoneProgress")]
985 pub work_done_progress: Option<bool>,
986}
987#[doc = " How a completion was triggered"]
988#[derive(Clone, PartialEq, Debug, Serialize_repr, Deserialize_repr)]
989#[repr(i64)]
990pub enum CompletionTriggerKind {
991 Invoked = 1,
992 TriggerCharacter = 2,
993 TriggerForIncompleteCompletions = 3,
994}