github.com/april1989/origin-go-tools@v0.0.32/internal/lsp/protocol/tsprotocol.go (about) 1 // Package protocol contains data types and code for LSP jsonrpcs 2 // generated automatically from vscode-languageserver-node 3 // commit: 399de64448129835b53c7efe8962de91681d6cde 4 // last fetched Wed Aug 26 2020 20:34:24 GMT-0400 (Eastern Daylight Time) 5 package protocol 6 7 // Code generated (see typescript/README.md) DO NOT EDIT. 8 9 import "encoding/json" 10 11 /** 12 * The parameters passed via a apply workspace edit request. 13 */ 14 type ApplyWorkspaceEditParams struct { 15 /** 16 * An optional label of the workspace edit. This label is 17 * presented in the user interface for example on an undo 18 * stack to undo the workspace edit. 19 */ 20 Label string `json:"label,omitempty"` 21 /** 22 * The edits to apply. 23 */ 24 Edit WorkspaceEdit `json:"edit"` 25 } 26 27 /** 28 * A response returned from the apply workspace edit request. 29 */ 30 type ApplyWorkspaceEditResponse struct { 31 /** 32 * Indicates whether the edit was applied or not. 33 */ 34 Applied bool `json:"applied"` 35 /** 36 * An optional textual description for why the edit was not applied. 37 * This may be used by the server for diagnostic logging or to provide 38 * a suitable error for a request that triggered the edit. 39 */ 40 FailureReason string `json:"failureReason,omitempty"` 41 /** 42 * Depending on the client's failure handling strategy `failedChange` might 43 * contain the index of the change that failed. This property is only available 44 * if the client signals a `failureHandlingStrategy` in its client capabilities. 45 */ 46 FailedChange float64 `json:"failedChange,omitempty"` 47 } 48 49 /** 50 * @since 3.16.0 51 */ 52 type CallHierarchyClientCapabilities struct { 53 /** 54 * Whether implementation supports dynamic registration. If this is set to `true` 55 * the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` 56 * return value for the corresponding server capability as well. 57 */ 58 DynamicRegistration bool `json:"dynamicRegistration,omitempty"` 59 } 60 61 /** 62 * Represents an incoming call, e.g. a caller of a method or constructor. 63 * 64 * @since 3.16.0 65 */ 66 type CallHierarchyIncomingCall struct { 67 /** 68 * The item that makes the call. 69 */ 70 From CallHierarchyItem `json:"from"` 71 /** 72 * The ranges at which the calls appear. This is relative to the caller 73 * denoted by [`this.from`](#CallHierarchyIncomingCall.from). 74 */ 75 FromRanges []Range `json:"fromRanges"` 76 } 77 78 /** 79 * The parameter of a `callHierarchy/incomingCalls` request. 80 * 81 * @since 3.16.0 82 */ 83 type CallHierarchyIncomingCallsParams struct { 84 Item CallHierarchyItem `json:"item"` 85 WorkDoneProgressParams 86 PartialResultParams 87 } 88 89 /** 90 * Represents programming constructs like functions or constructors in the context 91 * of call hierarchy. 92 * 93 * @since 3.16.0 94 */ 95 type CallHierarchyItem struct { 96 /** 97 * The name of this item. 98 */ 99 Name string `json:"name"` 100 /** 101 * The kind of this item. 102 */ 103 Kind SymbolKind `json:"kind"` 104 /** 105 * Tags for this item. 106 */ 107 Tags []SymbolTag `json:"tags,omitempty"` 108 /** 109 * More detail for this item, e.g. the signature of a function. 110 */ 111 Detail string `json:"detail,omitempty"` 112 /** 113 * The resource identifier of this item. 114 */ 115 URI DocumentURI `json:"uri"` 116 /** 117 * The range enclosing this symbol not including leading/trailing whitespace but everything else, e.g. comments and code. 118 */ 119 Range Range `json:"range"` 120 /** 121 * The range that should be selected and revealed when this symbol is being picked, e.g. the name of a function. 122 * Must be contained by the [`range`](#CallHierarchyItem.range). 123 */ 124 SelectionRange Range `json:"selectionRange"` 125 } 126 127 /** 128 * Call hierarchy options used during static registration. 129 * 130 * @since 3.16.0 131 */ 132 type CallHierarchyOptions struct { 133 WorkDoneProgressOptions 134 } 135 136 /** 137 * Represents an outgoing call, e.g. calling a getter from a method or a method from a constructor etc. 138 * 139 * @since 3.16.0 140 */ 141 type CallHierarchyOutgoingCall struct { 142 /** 143 * The item that is called. 144 */ 145 To CallHierarchyItem `json:"to"` 146 /** 147 * The range at which this item is called. This is the range relative to the caller, e.g the item 148 * passed to [`provideCallHierarchyOutgoingCalls`](#CallHierarchyItemProvider.provideCallHierarchyOutgoingCalls) 149 * and not [`this.to`](#CallHierarchyOutgoingCall.to). 150 */ 151 FromRanges []Range `json:"fromRanges"` 152 } 153 154 /** 155 * The parameter of a `callHierarchy/outgoingCalls` request. 156 * 157 * @since 3.16.0 158 */ 159 type CallHierarchyOutgoingCallsParams struct { 160 Item CallHierarchyItem `json:"item"` 161 WorkDoneProgressParams 162 PartialResultParams 163 } 164 165 /** 166 * The parameter of a `textDocument/prepareCallHierarchy` request. 167 * 168 * @since 3.16.0 169 */ 170 type CallHierarchyPrepareParams struct { 171 TextDocumentPositionParams 172 WorkDoneProgressParams 173 } 174 175 /** 176 * Call hierarchy options used during static or dynamic registration. 177 * 178 * @since 3.16.0 179 */ 180 type CallHierarchyRegistrationOptions struct { 181 TextDocumentRegistrationOptions 182 CallHierarchyOptions 183 StaticRegistrationOptions 184 } 185 186 type CancelParams struct { 187 /** 188 * The request id to cancel. 189 */ 190 ID interface{} /*number | string*/ `json:"id"` 191 } 192 193 type ClientCapabilities = struct { 194 Workspace struct { 195 /** 196 * Workspace specific client capabilities. 197 */ 198 WorkspaceClientCapabilities 199 /** 200 * The client has support for workspace folders 201 * 202 * @since 3.6.0 203 */ 204 WorkspaceFolders bool `json:"workspaceFolders,omitempty"` 205 /** 206 * The client supports `workspace/configuration` requests. 207 * 208 * @since 3.6.0 209 */ 210 Configuration bool `json:"configuration,omitempty"` 211 } 212 /** 213 * Text document specific client capabilities. 214 */ 215 TextDocument TextDocumentClientCapabilities `json:"textDocument,omitempty"` 216 Window struct { 217 /** 218 * Window specific client capabilities. 219 */ 220 Window interface{} `json:"window,omitempty"` 221 /** 222 * Whether client supports handling progress notifications. If set servers are allowed to 223 * report in `workDoneProgress` property in the request specific server capabilities. 224 * 225 * Since 3.15.0 226 */ 227 WorkDoneProgress bool `json:"workDoneProgress,omitempty"` 228 } 229 /** 230 * Experimental client capabilities. 231 */ 232 Experimental interface{} `json:"experimental,omitempty"` 233 } 234 235 /** 236 * A code action represents a change that can be performed in code, e.g. to fix a problem or 237 * to refactor code. 238 * 239 * A CodeAction must set either `edit` and/or a `command`. If both are supplied, the `edit` is applied first, then the `command` is executed. 240 */ 241 type CodeAction struct { 242 /** 243 * A short, human-readable, title for this code action. 244 */ 245 Title string `json:"title"` 246 /** 247 * The kind of the code action. 248 * 249 * Used to filter code actions. 250 */ 251 Kind CodeActionKind `json:"kind,omitempty"` 252 /** 253 * The diagnostics that this code action resolves. 254 */ 255 Diagnostics []Diagnostic `json:"diagnostics,omitempty"` 256 /** 257 * Marks this as a preferred action. Preferred actions are used by the `auto fix` command and can be targeted 258 * by keybindings. 259 * 260 * A quick fix should be marked preferred if it properly addresses the underlying error. 261 * A refactoring should be marked preferred if it is the most reasonable choice of actions to take. 262 * 263 * @since 3.15.0 264 */ 265 IsPreferred bool `json:"isPreferred,omitempty"` 266 /** 267 * The workspace edit this code action performs. 268 */ 269 Edit WorkspaceEdit `json:"edit,omitempty"` 270 /** 271 * A command this code action executes. If a code action 272 * provides a edit and a command, first the edit is 273 * executed and then the command. 274 */ 275 Command *Command `json:"command,omitempty"` 276 } 277 278 /** 279 * The Client Capabilities of a [CodeActionRequest](#CodeActionRequest). 280 */ 281 type CodeActionClientCapabilities struct { 282 /** 283 * Whether code action supports dynamic registration. 284 */ 285 DynamicRegistration bool `json:"dynamicRegistration,omitempty"` 286 /** 287 * The client support code action literals of type `CodeAction` as a valid 288 * response of the `textDocument/codeAction` request. If the property is not 289 * set the request can only return `Command` literals. 290 * 291 * @since 3.8.0 292 */ 293 CodeActionLiteralSupport struct { 294 /** 295 * The code action kind is support with the following value 296 * set. 297 */ 298 CodeActionKind struct { 299 /** 300 * The code action kind values the client supports. When this 301 * property exists the client also guarantees that it will 302 * handle values outside its set gracefully and falls back 303 * to a default value when unknown. 304 */ 305 ValueSet []CodeActionKind `json:"valueSet"` 306 } `json:"codeActionKind"` 307 } `json:"codeActionLiteralSupport,omitempty"` 308 /** 309 * Whether code action supports the `isPreferred` property. 310 * @since 3.15.0 311 */ 312 IsPreferredSupport bool `json:"isPreferredSupport,omitempty"` 313 } 314 315 /** 316 * Contains additional diagnostic information about the context in which 317 * a [code action](#CodeActionProvider.provideCodeActions) is run. 318 */ 319 type CodeActionContext struct { 320 /** 321 * An array of diagnostics known on the client side overlapping the range provided to the 322 * `textDocument/codeAction` request. They are provied so that the server knows which 323 * errors are currently presented to the user for the given range. There is no guarantee 324 * that these accurately reflect the error state of the resource. The primary parameter 325 * to compute code actions is the provided range. 326 */ 327 Diagnostics []Diagnostic `json:"diagnostics"` 328 /** 329 * Requested kind of actions to return. 330 * 331 * Actions not of this kind are filtered out by the client before being shown. So servers 332 * can omit computing them. 333 */ 334 Only []CodeActionKind `json:"only,omitempty"` 335 } 336 337 /** 338 * A set of predefined code action kinds 339 */ 340 type CodeActionKind string 341 342 /** 343 * Provider options for a [CodeActionRequest](#CodeActionRequest). 344 */ 345 type CodeActionOptions struct { 346 /** 347 * CodeActionKinds that this server may return. 348 * 349 * The list of kinds may be generic, such as `CodeActionKind.Refactor`, or the server 350 * may list out every specific kind they provide. 351 */ 352 CodeActionKinds []CodeActionKind `json:"codeActionKinds,omitempty"` 353 WorkDoneProgressOptions 354 } 355 356 /** 357 * The parameters of a [CodeActionRequest](#CodeActionRequest). 358 */ 359 type CodeActionParams struct { 360 /** 361 * The document in which the command was invoked. 362 */ 363 TextDocument TextDocumentIdentifier `json:"textDocument"` 364 /** 365 * The range for which the command was invoked. 366 */ 367 Range Range `json:"range"` 368 /** 369 * Context carrying additional information. 370 */ 371 Context CodeActionContext `json:"context"` 372 WorkDoneProgressParams 373 PartialResultParams 374 } 375 376 /** 377 * A code lens represents a [command](#Command) that should be shown along with 378 * source text, like the number of references, a way to run tests, etc. 379 * 380 * A code lens is _unresolved_ when no command is associated to it. For performance 381 * reasons the creation of a code lens and resolving should be done to two stages. 382 */ 383 type CodeLens struct { 384 /** 385 * The range in which this code lens is valid. Should only span a single line. 386 */ 387 Range Range `json:"range"` 388 /** 389 * The command this code lens represents. 390 */ 391 Command Command `json:"command,omitempty"` 392 /** 393 * An data entry field that is preserved on a code lens item between 394 * a [CodeLensRequest](#CodeLensRequest) and a [CodeLensResolveRequest] 395 * (#CodeLensResolveRequest) 396 */ 397 Data interface{} `json:"data,omitempty"` 398 } 399 400 /** 401 * The client capabilities of a [CodeLensRequest](#CodeLensRequest). 402 */ 403 type CodeLensClientCapabilities struct { 404 /** 405 * Whether code lens supports dynamic registration. 406 */ 407 DynamicRegistration bool `json:"dynamicRegistration,omitempty"` 408 } 409 410 /** 411 * Code Lens provider options of a [CodeLensRequest](#CodeLensRequest). 412 */ 413 type CodeLensOptions struct { 414 /** 415 * Code lens has a resolve provider as well. 416 */ 417 ResolveProvider bool `json:"resolveProvider,omitempty"` 418 WorkDoneProgressOptions 419 } 420 421 /** 422 * The parameters of a [CodeLensRequest](#CodeLensRequest). 423 */ 424 type CodeLensParams struct { 425 /** 426 * The document to request code lens for. 427 */ 428 TextDocument TextDocumentIdentifier `json:"textDocument"` 429 WorkDoneProgressParams 430 PartialResultParams 431 } 432 433 /** 434 * Represents a color in RGBA space. 435 */ 436 type Color struct { 437 /** 438 * The red component of this color in the range [0-1]. 439 */ 440 Red float64 `json:"red"` 441 /** 442 * The green component of this color in the range [0-1]. 443 */ 444 Green float64 `json:"green"` 445 /** 446 * The blue component of this color in the range [0-1]. 447 */ 448 Blue float64 `json:"blue"` 449 /** 450 * The alpha component of this color in the range [0-1]. 451 */ 452 Alpha float64 `json:"alpha"` 453 } 454 455 /** 456 * Represents a color range from a document. 457 */ 458 type ColorInformation struct { 459 /** 460 * The range in the document where this color appers. 461 */ 462 Range Range `json:"range"` 463 /** 464 * The actual color value for this color range. 465 */ 466 Color Color `json:"color"` 467 } 468 469 type ColorPresentation struct { 470 /** 471 * The label of this color presentation. It will be shown on the color 472 * picker header. By default this is also the text that is inserted when selecting 473 * this color presentation. 474 */ 475 Label string `json:"label"` 476 /** 477 * An [edit](#TextEdit) which is applied to a document when selecting 478 * this presentation for the color. When `falsy` the [label](#ColorPresentation.label) 479 * is used. 480 */ 481 TextEdit TextEdit `json:"textEdit,omitempty"` 482 /** 483 * An optional array of additional [text edits](#TextEdit) that are applied when 484 * selecting this color presentation. Edits must not overlap with the main [edit](#ColorPresentation.textEdit) nor with themselves. 485 */ 486 AdditionalTextEdits []TextEdit `json:"additionalTextEdits,omitempty"` 487 } 488 489 /** 490 * Parameters for a [ColorPresentationRequest](#ColorPresentationRequest). 491 */ 492 type ColorPresentationParams struct { 493 /** 494 * The text document. 495 */ 496 TextDocument TextDocumentIdentifier `json:"textDocument"` 497 /** 498 * The color to request presentations for. 499 */ 500 Color Color `json:"color"` 501 /** 502 * The range where the color would be inserted. Serves as a context. 503 */ 504 Range Range `json:"range"` 505 WorkDoneProgressParams 506 PartialResultParams 507 } 508 509 /** 510 * Represents a reference to a command. Provides a title which 511 * will be used to represent a command in the UI and, optionally, 512 * an array of arguments which will be passed to the command handler 513 * function when invoked. 514 */ 515 type Command struct { 516 /** 517 * Title of the command, like `save`. 518 */ 519 Title string `json:"title"` 520 /** 521 * The identifier of the actual command handler. 522 */ 523 Command string `json:"command"` 524 /** 525 * Arguments that the command handler should be 526 * invoked with. 527 */ 528 Arguments []json.RawMessage `json:"arguments,omitempty"` 529 } 530 531 /** 532 * Completion client capabilities 533 */ 534 type CompletionClientCapabilities struct { 535 /** 536 * Whether completion supports dynamic registration. 537 */ 538 DynamicRegistration bool `json:"dynamicRegistration,omitempty"` 539 /** 540 * The client supports the following `CompletionItem` specific 541 * capabilities. 542 */ 543 CompletionItem struct { 544 /** 545 * Client supports snippets as insert text. 546 * 547 * A snippet can define tab stops and placeholders with `$1`, `$2` 548 * and `${3:foo}`. `$0` defines the final tab stop, it defaults to 549 * the end of the snippet. Placeholders with equal identifiers are linked, 550 * that is typing in one will update others too. 551 */ 552 SnippetSupport bool `json:"snippetSupport,omitempty"` 553 /** 554 * Client supports commit characters on a completion item. 555 */ 556 CommitCharactersSupport bool `json:"commitCharactersSupport,omitempty"` 557 /** 558 * Client supports the follow content formats for the documentation 559 * property. The order describes the preferred format of the client. 560 */ 561 DocumentationFormat []MarkupKind `json:"documentationFormat,omitempty"` 562 /** 563 * Client supports the deprecated property on a completion item. 564 */ 565 DeprecatedSupport bool `json:"deprecatedSupport,omitempty"` 566 /** 567 * Client supports the preselect property on a completion item. 568 */ 569 PreselectSupport bool `json:"preselectSupport,omitempty"` 570 /** 571 * Client supports the tag property on a completion item. Clients supporting 572 * tags have to handle unknown tags gracefully. Clients especially need to 573 * preserve unknown tags when sending a completion item back to the server in 574 * a resolve call. 575 * 576 * @since 3.15.0 577 */ 578 TagSupport struct { 579 /** 580 * The tags supported by the client. 581 */ 582 ValueSet []CompletionItemTag `json:"valueSet"` 583 } `json:"tagSupport,omitempty"` 584 /** 585 * Client support insert replace edit to control different behavior if a 586 * completion item is inserted in the text or should replace text. 587 * 588 * @since 3.16.0 - Proposed state 589 */ 590 InsertReplaceSupport bool `json:"insertReplaceSupport,omitempty"` 591 /** 592 * Client supports to resolve `additionalTextEdits` in the `completionItem/resolve` 593 * request. So servers can postpone computing them. 594 * 595 * @since 3.16.0 - Proposed state 596 */ 597 ResolveAdditionalTextEditsSupport bool `json:"resolveAdditionalTextEditsSupport,omitempty"` 598 } `json:"completionItem,omitempty"` 599 CompletionItemKind struct { 600 /** 601 * The completion item kind values the client supports. When this 602 * property exists the client also guarantees that it will 603 * handle values outside its set gracefully and falls back 604 * to a default value when unknown. 605 * 606 * If this property is not present the client only supports 607 * the completion items kinds from `Text` to `Reference` as defined in 608 * the initial version of the protocol. 609 */ 610 ValueSet []CompletionItemKind `json:"valueSet,omitempty"` 611 } `json:"completionItemKind,omitempty"` 612 /** 613 * The client supports to send additional context information for a 614 * `textDocument/completion` requestion. 615 */ 616 ContextSupport bool `json:"contextSupport,omitempty"` 617 } 618 619 /** 620 * Contains additional information about the context in which a completion request is triggered. 621 */ 622 type CompletionContext struct { 623 /** 624 * How the completion was triggered. 625 */ 626 TriggerKind CompletionTriggerKind `json:"triggerKind"` 627 /** 628 * The trigger character (a single character) that has trigger code complete. 629 * Is undefined if `triggerKind !== CompletionTriggerKind.TriggerCharacter` 630 */ 631 TriggerCharacter string `json:"triggerCharacter,omitempty"` 632 } 633 634 /** 635 * A completion item represents a text snippet that is 636 * proposed to complete text that is being typed. 637 */ 638 type CompletionItem struct { 639 /** 640 * The label of this completion item. By default 641 * also the text that is inserted when selecting 642 * this completion. 643 */ 644 Label string `json:"label"` 645 /** 646 * The kind of this completion item. Based of the kind 647 * an icon is chosen by the editor. 648 */ 649 Kind CompletionItemKind `json:"kind,omitempty"` 650 /** 651 * Tags for this completion item. 652 * 653 * @since 3.15.0 654 */ 655 Tags []CompletionItemTag `json:"tags,omitempty"` 656 /** 657 * A human-readable string with additional information 658 * about this item, like type or symbol information. 659 */ 660 Detail string `json:"detail,omitempty"` 661 /** 662 * A human-readable string that represents a doc-comment. 663 */ 664 Documentation string/*string | MarkupContent*/ `json:"documentation,omitempty"` 665 /** 666 * Indicates if this item is deprecated. 667 * @deprecated Use `tags` instead. 668 */ 669 Deprecated bool `json:"deprecated,omitempty"` 670 /** 671 * Select this item when showing. 672 * 673 * *Note* that only one completion item can be selected and that the 674 * tool / client decides which item that is. The rule is that the *first* 675 * item of those that match best is selected. 676 */ 677 Preselect bool `json:"preselect,omitempty"` 678 /** 679 * A string that should be used when comparing this item 680 * with other items. When `falsy` the [label](#CompletionItem.label) 681 * is used. 682 */ 683 SortText string `json:"sortText,omitempty"` 684 /** 685 * A string that should be used when filtering a set of 686 * completion items. When `falsy` the [label](#CompletionItem.label) 687 * is used. 688 */ 689 FilterText string `json:"filterText,omitempty"` 690 /** 691 * A string that should be inserted into a document when selecting 692 * this completion. When `falsy` the [label](#CompletionItem.label) 693 * is used. 694 * 695 * The `insertText` is subject to interpretation by the client side. 696 * Some tools might not take the string literally. For example 697 * VS Code when code complete is requested in this example `con<cursor position>` 698 * and a completion item with an `insertText` of `console` is provided it 699 * will only insert `sole`. Therefore it is recommended to use `textEdit` instead 700 * since it avoids additional client side interpretation. 701 */ 702 InsertText string `json:"insertText,omitempty"` 703 /** 704 * The format of the insert text. The format applies to both the `insertText` property 705 * and the `newText` property of a provided `textEdit`. If ommitted defaults to 706 * `InsertTextFormat.PlainText`. 707 */ 708 InsertTextFormat InsertTextFormat `json:"insertTextFormat,omitempty"` 709 /** 710 * An [edit](#TextEdit) which is applied to a document when selecting 711 * this completion. When an edit is provided the value of 712 * [insertText](#CompletionItem.insertText) is ignored. 713 * 714 * Most editors support two different operation when accepting a completion item. One is to insert a 715 * completion text and the other is to replace an existing text with a competion text. Since this can 716 * usually not predetermend by a server it can report both ranges. Clients need to signal support for 717 * `InsertReplaceEdits` via the `textDocument.completion.insertReplaceSupport` client capability 718 * property. 719 * 720 * *Note 1:* The text edit's range as well as both ranges from a insert replace edit must be a 721 * [single line] and they must contain the position at which completion has been requested. 722 * *Note 2:* If an `InsertReplaceEdit` is returned the edit's insert range must be a prefix of 723 * the edit's replace range, that means it must be contained and starting at the same position. 724 * 725 * @since 3.16.0 additional type `InsertReplaceEdit` - Proposed state 726 */ 727 TextEdit *TextEdit/*TextEdit | InsertReplaceEdit*/ `json:"textEdit,omitempty"` 728 /** 729 * An optional array of additional [text edits](#TextEdit) that are applied when 730 * selecting this completion. Edits must not overlap (including the same insert position) 731 * with the main [edit](#CompletionItem.textEdit) nor with themselves. 732 * 733 * Additional text edits should be used to change text unrelated to the current cursor position 734 * (for example adding an import statement at the top of the file if the completion item will 735 * insert an unqualified type). 736 */ 737 AdditionalTextEdits []TextEdit `json:"additionalTextEdits,omitempty"` 738 /** 739 * An optional set of characters that when pressed while this completion is active will accept it first and 740 * then type that character. *Note* that all commit characters should have `length=1` and that superfluous 741 * characters will be ignored. 742 */ 743 CommitCharacters []string `json:"commitCharacters,omitempty"` 744 /** 745 * An optional [command](#Command) that is executed *after* inserting this completion. *Note* that 746 * additional modifications to the current document should be described with the 747 * [additionalTextEdits](#CompletionItem.additionalTextEdits)-property. 748 */ 749 Command *Command `json:"command,omitempty"` 750 /** 751 * An data entry field that is preserved on a completion item between 752 * a [CompletionRequest](#CompletionRequest) and a [CompletionResolveRequest] 753 * (#CompletionResolveRequest) 754 */ 755 Data interface{} `json:"data,omitempty"` 756 } 757 758 /** 759 * The kind of a completion entry. 760 */ 761 type CompletionItemKind float64 762 763 /** 764 * Completion item tags are extra annotations that tweak the rendering of a completion 765 * item. 766 * 767 * @since 3.15.0 768 */ 769 type CompletionItemTag float64 770 771 /** 772 * Represents a collection of [completion items](#CompletionItem) to be presented 773 * in the editor. 774 */ 775 type CompletionList struct { 776 /** 777 * This list it not complete. Further typing results in recomputing this list. 778 */ 779 IsIncomplete bool `json:"isIncomplete"` 780 /** 781 * The completion items. 782 */ 783 Items []CompletionItem `json:"items"` 784 } 785 786 /** 787 * Completion options. 788 */ 789 type CompletionOptions struct { 790 /** 791 * Most tools trigger completion request automatically without explicitly requesting 792 * it using a keyboard shortcut (e.g. Ctrl+Space). Typically they do so when the user 793 * starts to type an identifier. For example if the user types `c` in a JavaScript file 794 * code complete will automatically pop up present `console` besides others as a 795 * completion item. Characters that make up identifiers don't need to be listed here. 796 * 797 * If code complete should automatically be trigger on characters not being valid inside 798 * an identifier (for example `.` in JavaScript) list them in `triggerCharacters`. 799 */ 800 TriggerCharacters []string `json:"triggerCharacters,omitempty"` 801 /** 802 * The list of all possible characters that commit a completion. This field can be used 803 * if clients don't support individual commmit characters per completion item. See 804 * `ClientCapabilities.textDocument.completion.completionItem.commitCharactersSupport` 805 * 806 * If a server provides both `allCommitCharacters` and commit characters on an individual 807 * completion item the ones on the completion item win. 808 * 809 * @since 3.2.0 810 */ 811 AllCommitCharacters []string `json:"allCommitCharacters,omitempty"` 812 /** 813 * The server provides support to resolve additional 814 * information for a completion item. 815 */ 816 ResolveProvider bool `json:"resolveProvider,omitempty"` 817 WorkDoneProgressOptions 818 } 819 820 /** 821 * Completion parameters 822 */ 823 type CompletionParams struct { 824 /** 825 * The completion context. This is only available it the client specifies 826 * to send this using the client capability `textDocument.completion.contextSupport === true` 827 */ 828 Context CompletionContext `json:"context,omitempty"` 829 TextDocumentPositionParams 830 WorkDoneProgressParams 831 PartialResultParams 832 } 833 834 /** 835 * How a completion was triggered 836 */ 837 type CompletionTriggerKind float64 838 839 type ConfigurationClientCapabilities struct { 840 /** 841 * The workspace client capabilities 842 */ 843 Workspace WorkspaceGn `json:"workspace,omitempty"` 844 } 845 846 type ConfigurationItem struct { 847 /** 848 * The scope to get the configuration section for. 849 */ 850 ScopeURI string `json:"scopeUri,omitempty"` 851 /** 852 * The configuration section asked for. 853 */ 854 Section string `json:"section,omitempty"` 855 } 856 857 /** 858 * The parameters of a configuration request. 859 */ 860 type ConfigurationParams struct { 861 Items []ConfigurationItem `json:"items"` 862 } 863 864 /** 865 * Create file operation. 866 */ 867 type CreateFile struct { 868 /** 869 * A create 870 */ 871 Kind string `json:"kind"` 872 /** 873 * The resource to create. 874 */ 875 URI DocumentURI `json:"uri"` 876 /** 877 * Additional options 878 */ 879 Options CreateFileOptions `json:"options,omitempty"` 880 ResourceOperation 881 } 882 883 /** 884 * Options to create a file. 885 */ 886 type CreateFileOptions struct { 887 /** 888 * Overwrite existing file. Overwrite wins over `ignoreIfExists` 889 */ 890 Overwrite bool `json:"overwrite,omitempty"` 891 /** 892 * Ignore if exists. 893 */ 894 IgnoreIfExists bool `json:"ignoreIfExists,omitempty"` 895 } 896 897 /** 898 * The declaration of a symbol representation as one or many [locations](#Location). 899 */ 900 type Declaration = []Location /*Location | Location[]*/ 901 902 /** 903 * Since 3.14.0 904 */ 905 type DeclarationClientCapabilities struct { 906 /** 907 * Whether declaration supports dynamic registration. If this is set to `true` 908 * the client supports the new `DeclarationRegistrationOptions` return value 909 * for the corresponding server capability as well. 910 */ 911 DynamicRegistration bool `json:"dynamicRegistration,omitempty"` 912 /** 913 * The client supports additional metadata in the form of declaration links. 914 */ 915 LinkSupport bool `json:"linkSupport,omitempty"` 916 } 917 918 /** 919 * Information about where a symbol is declared. 920 * 921 * Provides additional metadata over normal [location](#Location) declarations, including the range of 922 * the declaring symbol. 923 * 924 * Servers should prefer returning `DeclarationLink` over `Declaration` if supported 925 * by the client. 926 */ 927 type DeclarationLink = LocationLink 928 929 type DeclarationOptions struct { 930 WorkDoneProgressOptions 931 } 932 933 type DeclarationParams struct { 934 TextDocumentPositionParams 935 WorkDoneProgressParams 936 PartialResultParams 937 } 938 939 type DeclarationRegistrationOptions struct { 940 DeclarationOptions 941 TextDocumentRegistrationOptions 942 StaticRegistrationOptions 943 } 944 945 /** 946 * The definition of a symbol represented as one or many [locations](#Location). 947 * For most programming languages there is only one location at which a symbol is 948 * defined. 949 * 950 * Servers should prefer returning `DefinitionLink` over `Definition` if supported 951 * by the client. 952 */ 953 type Definition = []Location /*Location | Location[]*/ 954 955 /** 956 * Client Capabilities for a [DefinitionRequest](#DefinitionRequest). 957 */ 958 type DefinitionClientCapabilities struct { 959 /** 960 * Whether definition supports dynamic registration. 961 */ 962 DynamicRegistration bool `json:"dynamicRegistration,omitempty"` 963 /** 964 * The client supports additional metadata in the form of definition links. 965 * 966 * @since 3.14.0 967 */ 968 LinkSupport bool `json:"linkSupport,omitempty"` 969 } 970 971 /** 972 * Information about where a symbol is defined. 973 * 974 * Provides additional metadata over normal [location](#Location) definitions, including the range of 975 * the defining symbol 976 */ 977 type DefinitionLink = LocationLink 978 979 /** 980 * Server Capabilities for a [DefinitionRequest](#DefinitionRequest). 981 */ 982 type DefinitionOptions struct { 983 WorkDoneProgressOptions 984 } 985 986 /** 987 * Parameters for a [DefinitionRequest](#DefinitionRequest). 988 */ 989 type DefinitionParams struct { 990 TextDocumentPositionParams 991 WorkDoneProgressParams 992 PartialResultParams 993 } 994 995 /** 996 * Delete file operation 997 */ 998 type DeleteFile struct { 999 /** 1000 * A delete 1001 */ 1002 Kind string `json:"kind"` 1003 /** 1004 * The file to delete. 1005 */ 1006 URI DocumentURI `json:"uri"` 1007 /** 1008 * Delete options. 1009 */ 1010 Options DeleteFileOptions `json:"options,omitempty"` 1011 ResourceOperation 1012 } 1013 1014 /** 1015 * Delete file options 1016 */ 1017 type DeleteFileOptions struct { 1018 /** 1019 * Delete the content recursively if a folder is denoted. 1020 */ 1021 Recursive bool `json:"recursive,omitempty"` 1022 /** 1023 * Ignore the operation if the file doesn't exist. 1024 */ 1025 IgnoreIfNotExists bool `json:"ignoreIfNotExists,omitempty"` 1026 } 1027 1028 /** 1029 * Represents a diagnostic, such as a compiler error or warning. Diagnostic objects 1030 * are only valid in the scope of a resource. 1031 */ 1032 type Diagnostic struct { 1033 /** 1034 * The range at which the message applies 1035 */ 1036 Range Range `json:"range"` 1037 /** 1038 * The diagnostic's severity. Can be omitted. If omitted it is up to the 1039 * client to interpret diagnostics as error, warning, info or hint. 1040 */ 1041 Severity DiagnosticSeverity `json:"severity,omitempty"` 1042 /** 1043 * The diagnostic's code, which usually appear in the user interface. 1044 * 1045 * @since 3.16.0 Support for `DiagnosticCode` - Proposed state 1046 */ 1047 Code interface{}/* float64 | string | DiagnosticCode*/ `json:"code,omitempty"` 1048 /** 1049 * A human-readable string describing the source of this 1050 * diagnostic, e.g. 'typescript' or 'super lint'. It usually 1051 * appears in the user interface. 1052 */ 1053 Source string `json:"source,omitempty"` 1054 /** 1055 * The diagnostic's message. It usually appears in the user interface 1056 */ 1057 Message string `json:"message"` 1058 /** 1059 * Additional metadata about the diagnostic. 1060 * 1061 * @since 3.15.0 1062 */ 1063 Tags []DiagnosticTag `json:"tags,omitempty"` 1064 /** 1065 * An array of related diagnostic information, e.g. when symbol-names within 1066 * a scope collide all definitions can be marked via this property. 1067 */ 1068 RelatedInformation []DiagnosticRelatedInformation `json:"relatedInformation,omitempty"` 1069 } 1070 1071 /** 1072 * Structure to capture more complex diagnostic codes. 1073 * 1074 * @since 3.16.0 - Proposed state 1075 */ 1076 type DiagnosticCode struct { 1077 /** 1078 * The actual code 1079 */ 1080 Value string/*string | number*/ `json:"value"` 1081 /** 1082 * A target URI to open with more information about the diagnostic error. 1083 */ 1084 Target URI `json:"target"` 1085 } 1086 1087 /** 1088 * Represents a related message and source code location for a diagnostic. This should be 1089 * used to point to code locations that cause or related to a diagnostics, e.g when duplicating 1090 * a symbol in a scope. 1091 */ 1092 type DiagnosticRelatedInformation struct { 1093 /** 1094 * The location of this related diagnostic information. 1095 */ 1096 Location Location `json:"location"` 1097 /** 1098 * The message of this related diagnostic information. 1099 */ 1100 Message string `json:"message"` 1101 } 1102 1103 /** 1104 * The diagnostic's severity. 1105 */ 1106 type DiagnosticSeverity float64 1107 1108 /** 1109 * The diagnostic tags. 1110 * 1111 * @since 3.15.0 1112 */ 1113 type DiagnosticTag float64 1114 1115 type DidChangeConfigurationClientCapabilities struct { 1116 /** 1117 * Did change configuration notification supports dynamic registration. 1118 */ 1119 DynamicRegistration bool `json:"dynamicRegistration,omitempty"` 1120 } 1121 1122 /** 1123 * The parameters of a change configuration notification. 1124 */ 1125 type DidChangeConfigurationParams struct { 1126 /** 1127 * The actual changed settings 1128 */ 1129 Settings interface{} `json:"settings"` 1130 } 1131 1132 /** 1133 * The change text document notification's parameters. 1134 */ 1135 type DidChangeTextDocumentParams struct { 1136 /** 1137 * The document that did change. The version number points 1138 * to the version after all provided content changes have 1139 * been applied. 1140 */ 1141 TextDocument VersionedTextDocumentIdentifier `json:"textDocument"` 1142 /** 1143 * The actual content changes. The content changes describe single state changes 1144 * to the document. So if there are two content changes c1 (at array index 0) and 1145 * c2 (at array index 1) for a document in state S then c1 moves the document from 1146 * S to S' and c2 from S' to S''. So c1 is computed on the state S and c2 is computed 1147 * on the state S'. 1148 * 1149 * To mirror the content of a document using change events use the following approach: 1150 * - start with the same initial content 1151 * - apply the 'textDocument/didChange' notifications in the order you recevie them. 1152 * - apply the `TextDocumentContentChangeEvent`s in a single notification in the order 1153 * you receive them. 1154 */ 1155 ContentChanges []TextDocumentContentChangeEvent `json:"contentChanges"` 1156 } 1157 1158 type DidChangeWatchedFilesClientCapabilities struct { 1159 /** 1160 * Did change watched files notification supports dynamic registration. Please note 1161 * that the current protocol doesn't support static configuration for file changes 1162 * from the server side. 1163 */ 1164 DynamicRegistration bool `json:"dynamicRegistration,omitempty"` 1165 } 1166 1167 /** 1168 * The watched files change notification's parameters. 1169 */ 1170 type DidChangeWatchedFilesParams struct { 1171 /** 1172 * The actual file events. 1173 */ 1174 Changes []FileEvent `json:"changes"` 1175 } 1176 1177 /** 1178 * Describe options to be used when registered for text document change events. 1179 */ 1180 type DidChangeWatchedFilesRegistrationOptions struct { 1181 /** 1182 * The watchers to register. 1183 */ 1184 Watchers []FileSystemWatcher `json:"watchers"` 1185 } 1186 1187 /** 1188 * The parameters of a `workspace/didChangeWorkspaceFolders` notification. 1189 */ 1190 type DidChangeWorkspaceFoldersParams struct { 1191 /** 1192 * The actual workspace folder change event. 1193 */ 1194 Event WorkspaceFoldersChangeEvent `json:"event"` 1195 } 1196 1197 /** 1198 * The parameters send in a close text document notification 1199 */ 1200 type DidCloseTextDocumentParams struct { 1201 /** 1202 * The document that was closed. 1203 */ 1204 TextDocument TextDocumentIdentifier `json:"textDocument"` 1205 } 1206 1207 /** 1208 * The parameters send in a open text document notification 1209 */ 1210 type DidOpenTextDocumentParams struct { 1211 /** 1212 * The document that was opened. 1213 */ 1214 TextDocument TextDocumentItem `json:"textDocument"` 1215 } 1216 1217 /** 1218 * The parameters send in a save text document notification 1219 */ 1220 type DidSaveTextDocumentParams struct { 1221 /** 1222 * The document that was closed. 1223 */ 1224 TextDocument VersionedTextDocumentIdentifier `json:"textDocument"` 1225 /** 1226 * Optional the content when saved. Depends on the includeText value 1227 * when the save notification was requested. 1228 */ 1229 Text *string `json:"text,omitempty"` 1230 } 1231 1232 type DocumentColorClientCapabilities struct { 1233 /** 1234 * Whether implementation supports dynamic registration. If this is set to `true` 1235 * the client supports the new `DocumentColorRegistrationOptions` return value 1236 * for the corresponding server capability as well. 1237 */ 1238 DynamicRegistration bool `json:"dynamicRegistration,omitempty"` 1239 } 1240 1241 type DocumentColorOptions struct { 1242 WorkDoneProgressOptions 1243 } 1244 1245 /** 1246 * Parameters for a [DocumentColorRequest](#DocumentColorRequest). 1247 */ 1248 type DocumentColorParams struct { 1249 /** 1250 * The text document. 1251 */ 1252 TextDocument TextDocumentIdentifier `json:"textDocument"` 1253 WorkDoneProgressParams 1254 PartialResultParams 1255 } 1256 1257 type DocumentColorRegistrationOptions struct { 1258 TextDocumentRegistrationOptions 1259 StaticRegistrationOptions 1260 DocumentColorOptions 1261 } 1262 1263 /** 1264 * A document filter denotes a document by different properties like 1265 * the [language](#TextDocument.languageId), the [scheme](#Uri.scheme) of 1266 * its resource, or a glob-pattern that is applied to the [path](#TextDocument.fileName). 1267 * 1268 * Glob patterns can have the following syntax: 1269 * - `*` to match one or more characters in a path segment 1270 * - `?` to match on one character in a path segment 1271 * - `**` to match any number of path segments, including none 1272 * - `{}` to group conditions (e.g. `**/*.{ts,js}` matches all TypeScript and JavaScript files) 1273 * - `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …) 1274 * - `[!...]` to negate a range of characters to match in a path segment (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but not `example.0`) 1275 * 1276 * @sample A language filter that applies to typescript files on disk: `{ language: 'typescript', scheme: 'file' }` 1277 * @sample A language filter that applies to all package.json paths: `{ language: 'json', pattern: '**package.json' }` 1278 */ 1279 type DocumentFilter = struct { 1280 /** A language id, like `typescript`. */ 1281 Language string `json:"language"` 1282 /** A Uri [scheme](#Uri.scheme), like `file` or `untitled`. */ 1283 Scheme string `json:"scheme,omitempty"` 1284 /** A glob pattern, like `*.{ts,js}`. */ 1285 Pattern string `json:"pattern,omitempty"` 1286 } 1287 1288 /** 1289 * Client capabilities of a [DocumentFormattingRequest](#DocumentFormattingRequest). 1290 */ 1291 type DocumentFormattingClientCapabilities struct { 1292 /** 1293 * Whether formatting supports dynamic registration. 1294 */ 1295 DynamicRegistration bool `json:"dynamicRegistration,omitempty"` 1296 } 1297 1298 /** 1299 * Provider options for a [DocumentFormattingRequest](#DocumentFormattingRequest). 1300 */ 1301 type DocumentFormattingOptions struct { 1302 WorkDoneProgressOptions 1303 } 1304 1305 /** 1306 * The parameters of a [DocumentFormattingRequest](#DocumentFormattingRequest). 1307 */ 1308 type DocumentFormattingParams struct { 1309 /** 1310 * The document to format. 1311 */ 1312 TextDocument TextDocumentIdentifier `json:"textDocument"` 1313 /** 1314 * The format options 1315 */ 1316 Options FormattingOptions `json:"options"` 1317 WorkDoneProgressParams 1318 } 1319 1320 /** 1321 * A document highlight is a range inside a text document which deserves 1322 * special attention. Usually a document highlight is visualized by changing 1323 * the background color of its range. 1324 */ 1325 type DocumentHighlight struct { 1326 /** 1327 * The range this highlight applies to. 1328 */ 1329 Range Range `json:"range"` 1330 /** 1331 * The highlight kind, default is [text](#DocumentHighlightKind.Text). 1332 */ 1333 Kind DocumentHighlightKind `json:"kind,omitempty"` 1334 } 1335 1336 /** 1337 * Client Capabilities for a [DocumentHighlightRequest](#DocumentHighlightRequest). 1338 */ 1339 type DocumentHighlightClientCapabilities struct { 1340 /** 1341 * Whether document highlight supports dynamic registration. 1342 */ 1343 DynamicRegistration bool `json:"dynamicRegistration,omitempty"` 1344 } 1345 1346 /** 1347 * A document highlight kind. 1348 */ 1349 type DocumentHighlightKind float64 1350 1351 /** 1352 * Provider options for a [DocumentHighlightRequest](#DocumentHighlightRequest). 1353 */ 1354 type DocumentHighlightOptions struct { 1355 WorkDoneProgressOptions 1356 } 1357 1358 /** 1359 * Parameters for a [DocumentHighlightRequest](#DocumentHighlightRequest). 1360 */ 1361 type DocumentHighlightParams struct { 1362 TextDocumentPositionParams 1363 WorkDoneProgressParams 1364 PartialResultParams 1365 } 1366 1367 /** 1368 * A document link is a range in a text document that links to an internal or external resource, like another 1369 * text document or a web site. 1370 */ 1371 type DocumentLink struct { 1372 /** 1373 * The range this link applies to. 1374 */ 1375 Range Range `json:"range"` 1376 /** 1377 * The uri this link points to. 1378 */ 1379 Target string `json:"target,omitempty"` 1380 /** 1381 * The tooltip text when you hover over this link. 1382 * 1383 * If a tooltip is provided, is will be displayed in a string that includes instructions on how to 1384 * trigger the link, such as `{0} (ctrl + click)`. The specific instructions vary depending on OS, 1385 * user settings, and localization. 1386 * 1387 * @since 3.15.0 1388 */ 1389 Tooltip string `json:"tooltip,omitempty"` 1390 /** 1391 * A data entry field that is preserved on a document link between a 1392 * DocumentLinkRequest and a DocumentLinkResolveRequest. 1393 */ 1394 Data interface{} `json:"data,omitempty"` 1395 } 1396 1397 /** 1398 * The client capabilities of a [DocumentLinkRequest](#DocumentLinkRequest). 1399 */ 1400 type DocumentLinkClientCapabilities struct { 1401 /** 1402 * Whether document link supports dynamic registration. 1403 */ 1404 DynamicRegistration bool `json:"dynamicRegistration,omitempty"` 1405 /** 1406 * Whether the client support the `tooltip` property on `DocumentLink`. 1407 * 1408 * @since 3.15.0 1409 */ 1410 TooltipSupport bool `json:"tooltipSupport,omitempty"` 1411 } 1412 1413 /** 1414 * Provider options for a [DocumentLinkRequest](#DocumentLinkRequest). 1415 */ 1416 type DocumentLinkOptions struct { 1417 /** 1418 * Document links have a resolve provider as well. 1419 */ 1420 ResolveProvider bool `json:"resolveProvider,omitempty"` 1421 WorkDoneProgressOptions 1422 } 1423 1424 /** 1425 * The parameters of a [DocumentLinkRequest](#DocumentLinkRequest). 1426 */ 1427 type DocumentLinkParams struct { 1428 /** 1429 * The document to provide document links for. 1430 */ 1431 TextDocument TextDocumentIdentifier `json:"textDocument"` 1432 WorkDoneProgressParams 1433 PartialResultParams 1434 } 1435 1436 /** 1437 * Client capabilities of a [DocumentOnTypeFormattingRequest](#DocumentOnTypeFormattingRequest). 1438 */ 1439 type DocumentOnTypeFormattingClientCapabilities struct { 1440 /** 1441 * Whether on type formatting supports dynamic registration. 1442 */ 1443 DynamicRegistration bool `json:"dynamicRegistration,omitempty"` 1444 } 1445 1446 /** 1447 * Provider options for a [DocumentOnTypeFormattingRequest](#DocumentOnTypeFormattingRequest). 1448 */ 1449 type DocumentOnTypeFormattingOptions struct { 1450 /** 1451 * A character on which formatting should be triggered, like `}`. 1452 */ 1453 FirstTriggerCharacter string `json:"firstTriggerCharacter"` 1454 /** 1455 * More trigger characters. 1456 */ 1457 MoreTriggerCharacter []string `json:"moreTriggerCharacter,omitempty"` 1458 } 1459 1460 /** 1461 * The parameters of a [DocumentOnTypeFormattingRequest](#DocumentOnTypeFormattingRequest). 1462 */ 1463 type DocumentOnTypeFormattingParams struct { 1464 /** 1465 * The document to format. 1466 */ 1467 TextDocument TextDocumentIdentifier `json:"textDocument"` 1468 /** 1469 * The position at which this request was send. 1470 */ 1471 Position Position `json:"position"` 1472 /** 1473 * The character that has been typed. 1474 */ 1475 Ch string `json:"ch"` 1476 /** 1477 * The format options. 1478 */ 1479 Options FormattingOptions `json:"options"` 1480 } 1481 1482 /** 1483 * Client capabilities of a [DocumentRangeFormattingRequest](#DocumentRangeFormattingRequest). 1484 */ 1485 type DocumentRangeFormattingClientCapabilities struct { 1486 /** 1487 * Whether range formatting supports dynamic registration. 1488 */ 1489 DynamicRegistration bool `json:"dynamicRegistration,omitempty"` 1490 } 1491 1492 /** 1493 * Provider options for a [DocumentRangeFormattingRequest](#DocumentRangeFormattingRequest). 1494 */ 1495 type DocumentRangeFormattingOptions struct { 1496 WorkDoneProgressOptions 1497 } 1498 1499 /** 1500 * The parameters of a [DocumentRangeFormattingRequest](#DocumentRangeFormattingRequest). 1501 */ 1502 type DocumentRangeFormattingParams struct { 1503 /** 1504 * The document to format. 1505 */ 1506 TextDocument TextDocumentIdentifier `json:"textDocument"` 1507 /** 1508 * The range to format 1509 */ 1510 Range Range `json:"range"` 1511 /** 1512 * The format options 1513 */ 1514 Options FormattingOptions `json:"options"` 1515 WorkDoneProgressParams 1516 } 1517 1518 /** 1519 * A document selector is the combination of one or many document filters. 1520 * 1521 * @sample `let sel:DocumentSelector = [{ language: 'typescript' }, { language: 'json', pattern: '**∕tsconfig.json' }]`; 1522 */ 1523 type DocumentSelector = []string /*string | DocumentFilter*/ 1524 1525 /** 1526 * Represents programming constructs like variables, classes, interfaces etc. 1527 * that appear in a document. Document symbols can be hierarchical and they 1528 * have two ranges: one that encloses its definition and one that points to 1529 * its most interesting range, e.g. the range of an identifier. 1530 */ 1531 type DocumentSymbol struct { 1532 /** 1533 * The name of this symbol. Will be displayed in the user interface and therefore must not be 1534 * an empty string or a string only consisting of white spaces. 1535 */ 1536 Name string `json:"name"` 1537 /** 1538 * More detail for this symbol, e.g the signature of a function. 1539 */ 1540 Detail string `json:"detail,omitempty"` 1541 /** 1542 * The kind of this symbol. 1543 */ 1544 Kind SymbolKind `json:"kind"` 1545 /** 1546 * Tags for this completion item. 1547 * 1548 * @since 3.16.0 - Proposed state 1549 */ 1550 Tags []SymbolTag `json:"tags,omitempty"` 1551 /** 1552 * Indicates if this symbol is deprecated. 1553 * 1554 * @deprecated Use tags instead 1555 */ 1556 Deprecated bool `json:"deprecated,omitempty"` 1557 /** 1558 * The range enclosing this symbol not including leading/trailing whitespace but everything else 1559 * like comments. This information is typically used to determine if the the clients cursor is 1560 * inside the symbol to reveal in the symbol in the UI. 1561 */ 1562 Range Range `json:"range"` 1563 /** 1564 * The range that should be selected and revealed when this symbol is being picked, e.g the name of a function. 1565 * Must be contained by the the `range`. 1566 */ 1567 SelectionRange Range `json:"selectionRange"` 1568 /** 1569 * Children of this symbol, e.g. properties of a class. 1570 */ 1571 Children []DocumentSymbol `json:"children,omitempty"` 1572 } 1573 1574 /** 1575 * Client Capabilities for a [DocumentSymbolRequest](#DocumentSymbolRequest). 1576 */ 1577 type DocumentSymbolClientCapabilities struct { 1578 /** 1579 * Whether document symbol supports dynamic registration. 1580 */ 1581 DynamicRegistration bool `json:"dynamicRegistration,omitempty"` 1582 /** 1583 * Specific capabilities for the `SymbolKind`. 1584 */ 1585 SymbolKind struct { 1586 /** 1587 * The symbol kind values the client supports. When this 1588 * property exists the client also guarantees that it will 1589 * handle values outside its set gracefully and falls back 1590 * to a default value when unknown. 1591 * 1592 * If this property is not present the client only supports 1593 * the symbol kinds from `File` to `Array` as defined in 1594 * the initial version of the protocol. 1595 */ 1596 ValueSet []SymbolKind `json:"valueSet,omitempty"` 1597 } `json:"symbolKind,omitempty"` 1598 /** 1599 * The client support hierarchical document symbols. 1600 */ 1601 HierarchicalDocumentSymbolSupport bool `json:"hierarchicalDocumentSymbolSupport,omitempty"` 1602 /** 1603 * The client supports tags on `SymbolInformation`. Tags are supported on 1604 * `DocumentSymbol` if `hierarchicalDocumentSymbolSupport` is set to true. 1605 * Clients supporting tags have to handle unknown tags gracefully. 1606 * 1607 * @since 3.16.0 - Proposed state 1608 */ 1609 TagSupport struct { 1610 /** 1611 * The tags supported by the client. 1612 */ 1613 ValueSet []SymbolTag `json:"valueSet"` 1614 } `json:"tagSupport,omitempty"` 1615 } 1616 1617 /** 1618 * Provider options for a [DocumentSymbolRequest](#DocumentSymbolRequest). 1619 */ 1620 type DocumentSymbolOptions struct { 1621 WorkDoneProgressOptions 1622 } 1623 1624 /** 1625 * Parameters for a [DocumentSymbolRequest](#DocumentSymbolRequest). 1626 */ 1627 type DocumentSymbolParams struct { 1628 /** 1629 * The text document. 1630 */ 1631 TextDocument TextDocumentIdentifier `json:"textDocument"` 1632 WorkDoneProgressParams 1633 PartialResultParams 1634 } 1635 1636 /** 1637 * A tagging type for string properties that are actually document URIs. 1638 */ 1639 type DocumentURI string 1640 1641 /** 1642 * The client capabilities of a [ExecuteCommandRequest](#ExecuteCommandRequest). 1643 */ 1644 type ExecuteCommandClientCapabilities struct { 1645 /** 1646 * Execute command supports dynamic registration. 1647 */ 1648 DynamicRegistration bool `json:"dynamicRegistration,omitempty"` 1649 } 1650 1651 /** 1652 * The server capabilities of a [ExecuteCommandRequest](#ExecuteCommandRequest). 1653 */ 1654 type ExecuteCommandOptions struct { 1655 /** 1656 * The commands to be executed on the server 1657 */ 1658 Commands []string `json:"commands"` 1659 WorkDoneProgressOptions 1660 } 1661 1662 /** 1663 * The parameters of a [ExecuteCommandRequest](#ExecuteCommandRequest). 1664 */ 1665 type ExecuteCommandParams struct { 1666 /** 1667 * The identifier of the actual command handler. 1668 */ 1669 Command string `json:"command"` 1670 /** 1671 * Arguments that the command should be invoked with. 1672 */ 1673 Arguments []json.RawMessage `json:"arguments,omitempty"` 1674 WorkDoneProgressParams 1675 } 1676 1677 type FailureHandlingKind string 1678 1679 /** 1680 * The file event type 1681 */ 1682 type FileChangeType float64 1683 1684 /** 1685 * An event describing a file change. 1686 */ 1687 type FileEvent struct { 1688 /** 1689 * The file's uri. 1690 */ 1691 URI DocumentURI `json:"uri"` 1692 /** 1693 * The change type. 1694 */ 1695 Type FileChangeType `json:"type"` 1696 } 1697 1698 type FileSystemWatcher struct { 1699 /** 1700 * The glob pattern to watch. Glob patterns can have the following syntax: 1701 * - `*` to match one or more characters in a path segment 1702 * - `?` to match on one character in a path segment 1703 * - `**` to match any number of path segments, including none 1704 * - `{}` to group conditions (e.g. `**/*.{ts,js}` matches all TypeScript and JavaScript files) 1705 * - `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …) 1706 * - `[!...]` to negate a range of characters to match in a path segment (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but not `example.0`) 1707 */ 1708 GlobPattern string `json:"globPattern"` 1709 /** 1710 * The kind of events of interest. If omitted it defaults 1711 * to WatchKind.Create | WatchKind.Change | WatchKind.Delete 1712 * which is 7. 1713 */ 1714 Kind float64 `json:"kind,omitempty"` 1715 } 1716 1717 /** 1718 * Represents a folding range. 1719 */ 1720 type FoldingRange struct { 1721 /** 1722 * The zero-based line number from where the folded range starts. 1723 */ 1724 StartLine float64 `json:"startLine"` 1725 /** 1726 * The zero-based character offset from where the folded range starts. If not defined, defaults to the length of the start line. 1727 */ 1728 StartCharacter float64 `json:"startCharacter,omitempty"` 1729 /** 1730 * The zero-based line number where the folded range ends. 1731 */ 1732 EndLine float64 `json:"endLine"` 1733 /** 1734 * The zero-based character offset before the folded range ends. If not defined, defaults to the length of the end line. 1735 */ 1736 EndCharacter float64 `json:"endCharacter,omitempty"` 1737 /** 1738 * Describes the kind of the folding range such as `comment' or 'region'. The kind 1739 * is used to categorize folding ranges and used by commands like 'Fold all comments'. See 1740 * [FoldingRangeKind](#FoldingRangeKind) for an enumeration of standardized kinds. 1741 */ 1742 Kind string `json:"kind,omitempty"` 1743 } 1744 1745 type FoldingRangeClientCapabilities struct { 1746 /** 1747 * Whether implementation supports dynamic registration for folding range providers. If this is set to `true` 1748 * the client supports the new `FoldingRangeRegistrationOptions` return value for the corresponding server 1749 * capability as well. 1750 */ 1751 DynamicRegistration bool `json:"dynamicRegistration,omitempty"` 1752 /** 1753 * The maximum number of folding ranges that the client prefers to receive per document. The value serves as a 1754 * hint, servers are free to follow the limit. 1755 */ 1756 RangeLimit float64 `json:"rangeLimit,omitempty"` 1757 /** 1758 * If set, the client signals that it only supports folding complete lines. If set, client will 1759 * ignore specified `startCharacter` and `endCharacter` properties in a FoldingRange. 1760 */ 1761 LineFoldingOnly bool `json:"lineFoldingOnly,omitempty"` 1762 } 1763 1764 /** 1765 * Enum of known range kinds 1766 */ 1767 type FoldingRangeKind string 1768 1769 type FoldingRangeOptions struct { 1770 WorkDoneProgressOptions 1771 } 1772 1773 /** 1774 * Parameters for a [FoldingRangeRequest](#FoldingRangeRequest). 1775 */ 1776 type FoldingRangeParams struct { 1777 /** 1778 * The text document. 1779 */ 1780 TextDocument TextDocumentIdentifier `json:"textDocument"` 1781 WorkDoneProgressParams 1782 PartialResultParams 1783 } 1784 1785 type FoldingRangeRegistrationOptions struct { 1786 TextDocumentRegistrationOptions 1787 FoldingRangeOptions 1788 StaticRegistrationOptions 1789 } 1790 1791 /** 1792 * Value-object describing what options formatting should use. 1793 */ 1794 type FormattingOptions struct { 1795 /** 1796 * Size of a tab in spaces. 1797 */ 1798 TabSize float64 `json:"tabSize"` 1799 /** 1800 * Prefer spaces over tabs. 1801 */ 1802 InsertSpaces bool `json:"insertSpaces"` 1803 /** 1804 * Trim trailing whitespaces on a line. 1805 * 1806 * @since 3.15.0 1807 */ 1808 TrimTrailingWhitespace bool `json:"trimTrailingWhitespace,omitempty"` 1809 /** 1810 * Insert a newline character at the end of the file if one does not exist. 1811 * 1812 * @since 3.15.0 1813 */ 1814 InsertFinalNewline bool `json:"insertFinalNewline,omitempty"` 1815 /** 1816 * Trim all newlines after the final newline at the end of the file. 1817 * 1818 * @since 3.15.0 1819 */ 1820 TrimFinalNewlines bool `json:"trimFinalNewlines,omitempty"` 1821 } 1822 1823 /** 1824 * The result of a hover request. 1825 */ 1826 type Hover struct { 1827 /** 1828 * The hover's content 1829 */ 1830 Contents MarkupContent/*MarkupContent | MarkedString | MarkedString[]*/ `json:"contents"` 1831 /** 1832 * An optional range 1833 */ 1834 Range Range `json:"range,omitempty"` 1835 } 1836 1837 type HoverClientCapabilities struct { 1838 /** 1839 * Whether hover supports dynamic registration. 1840 */ 1841 DynamicRegistration bool `json:"dynamicRegistration,omitempty"` 1842 /** 1843 * Client supports the follow content formats for the content 1844 * property. The order describes the preferred format of the client. 1845 */ 1846 ContentFormat []MarkupKind `json:"contentFormat,omitempty"` 1847 } 1848 1849 /** 1850 * Hover options. 1851 */ 1852 type HoverOptions struct { 1853 WorkDoneProgressOptions 1854 } 1855 1856 /** 1857 * Parameters for a [HoverRequest](#HoverRequest). 1858 */ 1859 type HoverParams struct { 1860 TextDocumentPositionParams 1861 WorkDoneProgressParams 1862 } 1863 1864 /** 1865 * Since 3.6.0 1866 */ 1867 type ImplementationClientCapabilities struct { 1868 /** 1869 * Whether implementation supports dynamic registration. If this is set to `true` 1870 * the client supports the new `ImplementationRegistrationOptions` return value 1871 * for the corresponding server capability as well. 1872 */ 1873 DynamicRegistration bool `json:"dynamicRegistration,omitempty"` 1874 /** 1875 * The client supports additional metadata in the form of definition links. 1876 * 1877 * Since 3.14.0 1878 */ 1879 LinkSupport bool `json:"linkSupport,omitempty"` 1880 } 1881 1882 type ImplementationOptions struct { 1883 WorkDoneProgressOptions 1884 } 1885 1886 type ImplementationParams struct { 1887 TextDocumentPositionParams 1888 WorkDoneProgressParams 1889 PartialResultParams 1890 } 1891 1892 type ImplementationRegistrationOptions struct { 1893 TextDocumentRegistrationOptions 1894 ImplementationOptions 1895 StaticRegistrationOptions 1896 } 1897 1898 /** 1899 * Known error codes for an `InitializeError`; 1900 */ 1901 type InitializeError float64 1902 1903 type InitializeParams = struct { 1904 InnerInitializeParams 1905 WorkspaceFoldersInitializeParams 1906 } 1907 1908 /** 1909 * The result returned from an initialize request. 1910 */ 1911 type InitializeResult struct { 1912 /** 1913 * The capabilities the language server provides. 1914 */ 1915 Capabilities ServerCapabilities `json:"capabilities"` 1916 /** 1917 * Information about the server. 1918 * 1919 * @since 3.15.0 1920 */ 1921 ServerInfo struct { 1922 /** 1923 * The name of the server as defined by the server. 1924 */ 1925 Name string `json:"name"` 1926 /** 1927 * The servers's version as defined by the server. 1928 */ 1929 Version string `json:"version,omitempty"` 1930 } `json:"serverInfo,omitempty"` 1931 } 1932 1933 type InitializedParams struct { 1934 } 1935 1936 /** 1937 * Defines the capabilities provided by the client. 1938 */ 1939 type InnerClientCapabilities struct { 1940 /** 1941 * Workspace specific client capabilities. 1942 */ 1943 Workspace WorkspaceClientCapabilities `json:"workspace,omitempty"` 1944 /** 1945 * Text document specific client capabilities. 1946 */ 1947 TextDocument TextDocumentClientCapabilities `json:"textDocument,omitempty"` 1948 /** 1949 * Window specific client capabilities. 1950 */ 1951 Window interface{} `json:"window,omitempty"` 1952 /** 1953 * Experimental client capabilities. 1954 */ 1955 Experimental interface{} `json:"experimental,omitempty"` 1956 } 1957 1958 /** 1959 * The initialize parameters 1960 */ 1961 type InnerInitializeParams struct { 1962 /** 1963 * The process Id of the parent process that started 1964 * the server. 1965 */ 1966 ProcessID float64/*number | null*/ `json:"processId"` 1967 /** 1968 * Information about the client 1969 * 1970 * @since 3.15.0 1971 */ 1972 ClientInfo struct { 1973 /** 1974 * The name of the client as defined by the client. 1975 */ 1976 Name string `json:"name"` 1977 /** 1978 * The client's version as defined by the client. 1979 */ 1980 Version string `json:"version,omitempty"` 1981 } `json:"clientInfo,omitempty"` 1982 /** 1983 * The rootPath of the workspace. Is null 1984 * if no folder is open. 1985 * 1986 * @deprecated in favour of rootUri. 1987 */ 1988 RootPath string/*string | null*/ `json:"rootPath,omitempty"` 1989 /** 1990 * The rootUri of the workspace. Is null if no 1991 * folder is open. If both `rootPath` and `rootUri` are set 1992 * `rootUri` wins. 1993 * 1994 * @deprecated in favour of workspaceFolders. 1995 */ 1996 RootURI DocumentURI/*DocumentUri | null*/ `json:"rootUri"` 1997 /** 1998 * The capabilities provided by the client (editor or tool) 1999 */ 2000 Capabilities ClientCapabilities `json:"capabilities"` 2001 /** 2002 * User provided initialization options. 2003 */ 2004 InitializationOptions interface{} `json:"initializationOptions,omitempty"` 2005 /** 2006 * The initial trace setting. If omitted trace is disabled ('off'). 2007 */ 2008 Trace string/*'off' | 'messages' | 'verbose'*/ `json:"trace,omitempty"` 2009 WorkDoneProgressParams 2010 } 2011 2012 /** 2013 * Defines the capabilities provided by a language 2014 * server. 2015 */ 2016 type InnerServerCapabilities struct { 2017 /** 2018 * Defines how text documents are synced. Is either a detailed structure defining each notification or 2019 * for backwards compatibility the TextDocumentSyncKind number. 2020 */ 2021 TextDocumentSync interface{}/*TextDocumentSyncOptions | TextDocumentSyncKind*/ `json:"textDocumentSync,omitempty"` 2022 /** 2023 * The server provides completion support. 2024 */ 2025 CompletionProvider CompletionOptions `json:"completionProvider,omitempty"` 2026 /** 2027 * The server provides hover support. 2028 */ 2029 HoverProvider bool/*boolean | HoverOptions*/ `json:"hoverProvider,omitempty"` 2030 /** 2031 * The server provides signature help support. 2032 */ 2033 SignatureHelpProvider SignatureHelpOptions `json:"signatureHelpProvider,omitempty"` 2034 /** 2035 * The server provides Goto Declaration support. 2036 */ 2037 DeclarationProvider interface{}/* bool | DeclarationOptions | DeclarationRegistrationOptions*/ `json:"declarationProvider,omitempty"` 2038 /** 2039 * The server provides goto definition support. 2040 */ 2041 DefinitionProvider bool/*boolean | DefinitionOptions*/ `json:"definitionProvider,omitempty"` 2042 /** 2043 * The server provides Goto Type Definition support. 2044 */ 2045 TypeDefinitionProvider interface{}/* bool | TypeDefinitionOptions | TypeDefinitionRegistrationOptions*/ `json:"typeDefinitionProvider,omitempty"` 2046 /** 2047 * The server provides Goto Implementation support. 2048 */ 2049 ImplementationProvider interface{}/* bool | ImplementationOptions | ImplementationRegistrationOptions*/ `json:"implementationProvider,omitempty"` 2050 /** 2051 * The server provides find references support. 2052 */ 2053 ReferencesProvider bool/*boolean | ReferenceOptions*/ `json:"referencesProvider,omitempty"` 2054 /** 2055 * The server provides document highlight support. 2056 */ 2057 DocumentHighlightProvider bool/*boolean | DocumentHighlightOptions*/ `json:"documentHighlightProvider,omitempty"` 2058 /** 2059 * The server provides document symbol support. 2060 */ 2061 DocumentSymbolProvider bool/*boolean | DocumentSymbolOptions*/ `json:"documentSymbolProvider,omitempty"` 2062 /** 2063 * The server provides code actions. CodeActionOptions may only be 2064 * specified if the client states that it supports 2065 * `codeActionLiteralSupport` in its initial `initialize` request. 2066 */ 2067 CodeActionProvider interface{}/*boolean | CodeActionOptions*/ `json:"codeActionProvider,omitempty"` 2068 /** 2069 * The server provides code lens. 2070 */ 2071 CodeLensProvider CodeLensOptions `json:"codeLensProvider,omitempty"` 2072 /** 2073 * The server provides document link support. 2074 */ 2075 DocumentLinkProvider DocumentLinkOptions `json:"documentLinkProvider,omitempty"` 2076 /** 2077 * The server provides color provider support. 2078 */ 2079 ColorProvider interface{}/* bool | DocumentColorOptions | DocumentColorRegistrationOptions*/ `json:"colorProvider,omitempty"` 2080 /** 2081 * The server provides workspace symbol support. 2082 */ 2083 WorkspaceSymbolProvider bool/*boolean | WorkspaceSymbolOptions*/ `json:"workspaceSymbolProvider,omitempty"` 2084 /** 2085 * The server provides document formatting. 2086 */ 2087 DocumentFormattingProvider bool/*boolean | DocumentFormattingOptions*/ `json:"documentFormattingProvider,omitempty"` 2088 /** 2089 * The server provides document range formatting. 2090 */ 2091 DocumentRangeFormattingProvider bool/*boolean | DocumentRangeFormattingOptions*/ `json:"documentRangeFormattingProvider,omitempty"` 2092 /** 2093 * The server provides document formatting on typing. 2094 */ 2095 DocumentOnTypeFormattingProvider DocumentOnTypeFormattingOptions `json:"documentOnTypeFormattingProvider,omitempty"` 2096 /** 2097 * The server provides rename support. RenameOptions may only be 2098 * specified if the client states that it supports 2099 * `prepareSupport` in its initial `initialize` request. 2100 */ 2101 RenameProvider interface{}/*boolean | RenameOptions*/ `json:"renameProvider,omitempty"` 2102 /** 2103 * The server provides folding provider support. 2104 */ 2105 FoldingRangeProvider interface{}/* bool | FoldingRangeOptions | FoldingRangeRegistrationOptions*/ `json:"foldingRangeProvider,omitempty"` 2106 /** 2107 * The server provides selection range support. 2108 */ 2109 SelectionRangeProvider interface{}/* bool | SelectionRangeOptions | SelectionRangeRegistrationOptions*/ `json:"selectionRangeProvider,omitempty"` 2110 /** 2111 * The server provides execute command support. 2112 */ 2113 ExecuteCommandProvider ExecuteCommandOptions `json:"executeCommandProvider,omitempty"` 2114 /** 2115 * The server provides Call Hierarchy support. 2116 */ 2117 CallHierarchyProvider interface{}/* bool | CallHierarchyOptions | CallHierarchyRegistrationOptions*/ `json:"callHierarchyProvider,omitempty"` 2118 /** 2119 * Experimental server capabilities. 2120 */ 2121 Experimental interface{} `json:"experimental,omitempty"` 2122 } 2123 2124 /** 2125 * A special text edit to provide an insert and a replace operation. 2126 * 2127 * @since 3.16.0 - Proposed state 2128 */ 2129 type InsertReplaceEdit struct { 2130 /** 2131 * The string to be inserted. 2132 */ 2133 NewText string `json:"newText"` 2134 /** 2135 * The range if the insert is requested 2136 */ 2137 Insert Range `json:"insert"` 2138 /** 2139 * The range if the replace is requested. 2140 */ 2141 Replace Range `json:"replace"` 2142 } 2143 2144 /** 2145 * Defines whether the insert text in a completion item should be interpreted as 2146 * plain text or a snippet. 2147 */ 2148 type InsertTextFormat float64 2149 2150 /** 2151 * Represents a location inside a resource, such as a line 2152 * inside a text file. 2153 */ 2154 type Location struct { 2155 URI DocumentURI `json:"uri"` 2156 Range Range `json:"range"` 2157 } 2158 2159 /** 2160 * Represents the connection of two locations. Provides additional metadata over normal [locations](#Location), 2161 * including an origin range. 2162 */ 2163 type LocationLink struct { 2164 /** 2165 * Span of the origin of this link. 2166 * 2167 * Used as the underlined span for mouse definition hover. Defaults to the word range at 2168 * the definition position. 2169 */ 2170 OriginSelectionRange Range `json:"originSelectionRange,omitempty"` 2171 /** 2172 * The target resource identifier of this link. 2173 */ 2174 TargetURI DocumentURI `json:"targetUri"` 2175 /** 2176 * The full target range of this link. If the target for example is a symbol then target range is the 2177 * range enclosing this symbol not including leading/trailing whitespace but everything else 2178 * like comments. This information is typically used to highlight the range in the editor. 2179 */ 2180 TargetRange Range `json:"targetRange"` 2181 /** 2182 * The range that should be selected and revealed when this link is being followed, e.g the name of a function. 2183 * Must be contained by the the `targetRange`. See also `DocumentSymbol#range` 2184 */ 2185 TargetSelectionRange Range `json:"targetSelectionRange"` 2186 } 2187 2188 /** 2189 * The log message parameters. 2190 */ 2191 type LogMessageParams struct { 2192 /** 2193 * The message type. See {@link MessageType} 2194 */ 2195 Type MessageType `json:"type"` 2196 /** 2197 * The actual message 2198 */ 2199 Message string `json:"message"` 2200 } 2201 2202 type LogTraceParams struct { 2203 Message string `json:"message"` 2204 Verbose string `json:"verbose,omitempty"` 2205 } 2206 2207 /** 2208 * MarkedString can be used to render human readable text. It is either a markdown string 2209 * or a code-block that provides a language and a code snippet. The language identifier 2210 * is semantically equal to the optional language identifier in fenced code blocks in GitHub 2211 * issues. See https://help.github.com/articles/creating-and-highlighting-code-blocks/#syntax-highlighting 2212 * 2213 * The pair of a language and a value is an equivalent to markdown: 2214 * ```${language} 2215 * ${value} 2216 * ``` 2217 * 2218 * Note that markdown strings will be sanitized - that means html will be escaped. 2219 * @deprecated use MarkupContent instead. 2220 */ 2221 type MarkedString = string /*string | { language: string; value: string }*/ 2222 2223 /** 2224 * A `MarkupContent` literal represents a string value which content is interpreted base on its 2225 * kind flag. Currently the protocol supports `plaintext` and `markdown` as markup kinds. 2226 * 2227 * If the kind is `markdown` then the value can contain fenced code blocks like in GitHub issues. 2228 * See https://help.github.com/articles/creating-and-highlighting-code-blocks/#syntax-highlighting 2229 * 2230 * Here is an example how such a string can be constructed using JavaScript / TypeScript: 2231 * ```ts 2232 * let markdown: MarkdownContent = { 2233 * kind: MarkupKind.Markdown, 2234 * value: [ 2235 * '# Header', 2236 * 'Some text', 2237 * '```typescript', 2238 * 'someCode();', 2239 * '```' 2240 * ].join('\n') 2241 * }; 2242 * ``` 2243 * 2244 * *Please Note* that clients might sanitize the return markdown. A client could decide to 2245 * remove HTML from the markdown to avoid script execution. 2246 */ 2247 type MarkupContent struct { 2248 /** 2249 * The type of the Markup 2250 */ 2251 Kind MarkupKind `json:"kind"` 2252 /** 2253 * The content itself 2254 */ 2255 Value string `json:"value"` 2256 } 2257 2258 /** 2259 * Describes the content type that a client supports in various 2260 * result literals like `Hover`, `ParameterInfo` or `CompletionItem`. 2261 * 2262 * Please note that `MarkupKinds` must not start with a `$`. This kinds 2263 * are reserved for internal usage. 2264 */ 2265 type MarkupKind string 2266 2267 type MessageActionItem struct { 2268 /** 2269 * A short title like 'Retry', 'Open Log' etc. 2270 */ 2271 Title string `json:"title"` 2272 } 2273 2274 /** 2275 * The message type 2276 */ 2277 type MessageType float64 2278 2279 /** 2280 * Represents a parameter of a callable-signature. A parameter can 2281 * have a label and a doc-comment. 2282 */ 2283 type ParameterInformation struct { 2284 /** 2285 * The label of this parameter information. 2286 * 2287 * Either a string or an inclusive start and exclusive end offsets within its containing 2288 * signature label. (see SignatureInformation.label). The offsets are based on a UTF-16 2289 * string representation as `Position` and `Range` does. 2290 * 2291 * *Note*: a label of type string should be a substring of its containing signature label. 2292 * Its intended use case is to highlight the parameter label part in the `SignatureInformation.label`. 2293 */ 2294 Label string/*string | [number, number]*/ `json:"label"` 2295 /** 2296 * The human-readable doc-comment of this signature. Will be shown 2297 * in the UI but can be omitted. 2298 */ 2299 Documentation string/*string | MarkupContent*/ `json:"documentation,omitempty"` 2300 } 2301 2302 type PartialResultParams struct { 2303 /** 2304 * An optional token that a server can use to report partial results (e.g. streaming) to 2305 * the client. 2306 */ 2307 PartialResultToken ProgressToken `json:"partialResultToken,omitempty"` 2308 } 2309 2310 /** 2311 * Position in a text document expressed as zero-based line and character offset. 2312 * The offsets are based on a UTF-16 string representation. So a string of the form 2313 * `a𐐀b` the character offset of the character `a` is 0, the character offset of `𐐀` 2314 * is 1 and the character offset of b is 3 since `𐐀` is represented using two code 2315 * units in UTF-16. 2316 * 2317 * Positions are line end character agnostic. So you can not specify a position that 2318 * denotes `\r|\n` or `\n|` where `|` represents the character offset. 2319 */ 2320 type Position struct { 2321 /** 2322 * Line position in a document (zero-based). 2323 * If a line number is greater than the number of lines in a document, it defaults back to the number of lines in the document. 2324 * If a line number is negative, it defaults to 0. 2325 */ 2326 Line float64 `json:"line"` 2327 /** 2328 * Character offset on a line in a document (zero-based). Assuming that the line is 2329 * represented as a string, the `character` value represents the gap between the 2330 * `character` and `character + 1`. 2331 * 2332 * If the character value is greater than the line length it defaults back to the 2333 * line length. 2334 * If a line number is negative, it defaults to 0. 2335 */ 2336 Character float64 `json:"character"` 2337 } 2338 2339 type PrepareRenameParams struct { 2340 TextDocumentPositionParams 2341 WorkDoneProgressParams 2342 } 2343 2344 type ProgressParams struct { 2345 /** 2346 * The progress token provided by the client or server. 2347 */ 2348 Token ProgressToken `json:"token"` 2349 /** 2350 * The progress data. 2351 */ 2352 Value interface{} `json:"value"` 2353 } 2354 2355 type ProgressToken = interface{} /*number | string*/ 2356 2357 /** 2358 * The publish diagnostic client capabilities. 2359 */ 2360 type PublishDiagnosticsClientCapabilities struct { 2361 /** 2362 * Whether the clients accepts diagnostics with related information. 2363 */ 2364 RelatedInformation bool `json:"relatedInformation,omitempty"` 2365 /** 2366 * Client supports the tag property to provide meta data about a diagnostic. 2367 * Clients supporting tags have to handle unknown tags gracefully. 2368 * 2369 * @since 3.15.0 2370 */ 2371 TagSupport struct { 2372 /** 2373 * The tags supported by the client. 2374 */ 2375 ValueSet []DiagnosticTag `json:"valueSet"` 2376 } `json:"tagSupport,omitempty"` 2377 /** 2378 * Whether the client interprets the version property of the 2379 * `textDocument/publishDiagnostics` notification`s parameter. 2380 * 2381 * @since 3.15.0 2382 */ 2383 VersionSupport bool `json:"versionSupport,omitempty"` 2384 /** 2385 * Clients support complex diagnostic codes (e.g. code and target URI). 2386 * 2387 * @since 3.16.0 - Proposed state 2388 */ 2389 ComplexDiagnosticCodeSupport bool `json:"complexDiagnosticCodeSupport,omitempty"` 2390 } 2391 2392 /** 2393 * The publish diagnostic notification's parameters. 2394 */ 2395 type PublishDiagnosticsParams struct { 2396 /** 2397 * The URI for which diagnostic information is reported. 2398 */ 2399 URI DocumentURI `json:"uri"` 2400 /** 2401 * Optional the version number of the document the diagnostics are published for. 2402 * 2403 * @since 3.15.0 2404 */ 2405 Version float64 `json:"version,omitempty"` 2406 /** 2407 * An array of diagnostic information items. 2408 */ 2409 Diagnostics []Diagnostic `json:"diagnostics"` 2410 } 2411 2412 /** 2413 * A range in a text document expressed as (zero-based) start and end positions. 2414 * 2415 * If you want to specify a range that contains a line including the line ending 2416 * character(s) then use an end position denoting the start of the next line. 2417 * For example: 2418 * ```ts 2419 * { 2420 * start: { line: 5, character: 23 } 2421 * end : { line 6, character : 0 } 2422 * } 2423 * ``` 2424 */ 2425 type Range struct { 2426 /** 2427 * The range's start position 2428 */ 2429 Start Position `json:"start"` 2430 /** 2431 * The range's end position. 2432 */ 2433 End Position `json:"end"` 2434 } 2435 2436 /** 2437 * Client Capabilities for a [ReferencesRequest](#ReferencesRequest). 2438 */ 2439 type ReferenceClientCapabilities struct { 2440 /** 2441 * Whether references supports dynamic registration. 2442 */ 2443 DynamicRegistration bool `json:"dynamicRegistration,omitempty"` 2444 } 2445 2446 /** 2447 * Value-object that contains additional information when 2448 * requesting references. 2449 */ 2450 type ReferenceContext struct { 2451 /** 2452 * Include the declaration of the current symbol. 2453 */ 2454 IncludeDeclaration bool `json:"includeDeclaration"` 2455 } 2456 2457 /** 2458 * Reference options. 2459 */ 2460 type ReferenceOptions struct { 2461 WorkDoneProgressOptions 2462 } 2463 2464 /** 2465 * Parameters for a [ReferencesRequest](#ReferencesRequest). 2466 */ 2467 type ReferenceParams struct { 2468 Context ReferenceContext `json:"context"` 2469 TextDocumentPositionParams 2470 WorkDoneProgressParams 2471 PartialResultParams 2472 } 2473 2474 /** 2475 * General parameters to to register for an notification or to register a provider. 2476 */ 2477 type Registration struct { 2478 /** 2479 * The id used to register the request. The id can be used to deregister 2480 * the request again. 2481 */ 2482 ID string `json:"id"` 2483 /** 2484 * The method to register for. 2485 */ 2486 Method string `json:"method"` 2487 /** 2488 * Options necessary for the registration. 2489 */ 2490 RegisterOptions interface{} `json:"registerOptions,omitempty"` 2491 } 2492 2493 type RegistrationParams struct { 2494 Registrations []Registration `json:"registrations"` 2495 } 2496 2497 type RenameClientCapabilities struct { 2498 /** 2499 * Whether rename supports dynamic registration. 2500 */ 2501 DynamicRegistration bool `json:"dynamicRegistration,omitempty"` 2502 /** 2503 * Client supports golibexec_testing for validity of rename operations 2504 * before execution. 2505 * 2506 * @since version 3.12.0 2507 */ 2508 PrepareSupport bool `json:"prepareSupport,omitempty"` 2509 } 2510 2511 /** 2512 * Rename file operation 2513 */ 2514 type RenameFile struct { 2515 /** 2516 * A rename 2517 */ 2518 Kind string `json:"kind"` 2519 /** 2520 * The old (existing) location. 2521 */ 2522 OldURI DocumentURI `json:"oldUri"` 2523 /** 2524 * The new location. 2525 */ 2526 NewURI DocumentURI `json:"newUri"` 2527 /** 2528 * Rename options. 2529 */ 2530 Options RenameFileOptions `json:"options,omitempty"` 2531 ResourceOperation 2532 } 2533 2534 /** 2535 * Rename file options 2536 */ 2537 type RenameFileOptions struct { 2538 /** 2539 * Overwrite target if existing. Overwrite wins over `ignoreIfExists` 2540 */ 2541 Overwrite bool `json:"overwrite,omitempty"` 2542 /** 2543 * Ignores if target exists. 2544 */ 2545 IgnoreIfExists bool `json:"ignoreIfExists,omitempty"` 2546 } 2547 2548 /** 2549 * Provider options for a [RenameRequest](#RenameRequest). 2550 */ 2551 type RenameOptions struct { 2552 /** 2553 * Renames should be checked and tested before being executed. 2554 * 2555 * @since version 3.12.0 2556 */ 2557 PrepareProvider bool `json:"prepareProvider,omitempty"` 2558 WorkDoneProgressOptions 2559 } 2560 2561 /** 2562 * The parameters of a [RenameRequest](#RenameRequest). 2563 */ 2564 type RenameParams struct { 2565 /** 2566 * The document to rename. 2567 */ 2568 TextDocument TextDocumentIdentifier `json:"textDocument"` 2569 /** 2570 * The position at which this request was sent. 2571 */ 2572 Position Position `json:"position"` 2573 /** 2574 * The new name of the symbol. If the given name is not valid the 2575 * request must return a [ResponseError](#ResponseError) with an 2576 * appropriate message set. 2577 */ 2578 NewName string `json:"newName"` 2579 WorkDoneProgressParams 2580 } 2581 2582 type ResourceOperation struct { 2583 Kind string `json:"kind"` 2584 } 2585 2586 type ResourceOperationKind string 2587 2588 /** 2589 * Save options. 2590 */ 2591 type SaveOptions struct { 2592 /** 2593 * The client is supposed to include the content on save. 2594 */ 2595 IncludeText bool `json:"includeText,omitempty"` 2596 } 2597 2598 /** 2599 * A selection range represents a part of a selection hierarchy. A selection range 2600 * may have a parent selection range that contains it. 2601 */ 2602 type SelectionRange struct { 2603 /** 2604 * The [range](#Range) of this selection range. 2605 */ 2606 Range Range `json:"range"` 2607 /** 2608 * The parent selection range containing this range. Therefore `parent.range` must contain `this.range`. 2609 */ 2610 Parent *SelectionRange `json:"parent,omitempty"` 2611 } 2612 2613 type SelectionRangeClientCapabilities struct { 2614 /** 2615 * Whether implementation supports dynamic registration for selection range providers. If this is set to `true` 2616 * the client supports the new `SelectionRangeRegistrationOptions` return value for the corresponding server 2617 * capability as well. 2618 */ 2619 DynamicRegistration bool `json:"dynamicRegistration,omitempty"` 2620 } 2621 2622 type SelectionRangeOptions struct { 2623 WorkDoneProgressOptions 2624 } 2625 2626 /** 2627 * A parameter literal used in selection range requests. 2628 */ 2629 type SelectionRangeParams struct { 2630 /** 2631 * The text document. 2632 */ 2633 TextDocument TextDocumentIdentifier `json:"textDocument"` 2634 /** 2635 * The positions inside the text document. 2636 */ 2637 Positions []Position `json:"positions"` 2638 WorkDoneProgressParams 2639 PartialResultParams 2640 } 2641 2642 type SelectionRangeRegistrationOptions struct { 2643 SelectionRangeOptions 2644 TextDocumentRegistrationOptions 2645 StaticRegistrationOptions 2646 } 2647 2648 /** 2649 * @since 3.16.0 - Proposed state 2650 */ 2651 type SemanticTokens struct { 2652 /** 2653 * An optional result id. If provided and clients support delta updating 2654 * the client will include the result id in the next semantic token request. 2655 * A server can then instead of computing all semantic tokens again simply 2656 * send a delta. 2657 */ 2658 ResultID string `json:"resultId,omitempty"` 2659 /** 2660 * The actual tokens. 2661 */ 2662 Data []float64 `json:"data"` 2663 } 2664 2665 /** 2666 * @since 3.16.0 - Proposed state 2667 */ 2668 type SemanticTokensDelta struct { 2669 ResultID string `json:"resultId,omitempty"` 2670 /** 2671 * The semantic token edits to transform a previous result into a new result. 2672 */ 2673 Edits []SemanticTokensEdit `json:"edits"` 2674 } 2675 2676 /** 2677 * @since 3.16.0 - Proposed state 2678 */ 2679 type SemanticTokensDeltaParams struct { 2680 /** 2681 * The text document. 2682 */ 2683 TextDocument TextDocumentIdentifier `json:"textDocument"` 2684 /** 2685 * The previous result id. 2686 */ 2687 PreviousResultID string `json:"previousResultId"` 2688 WorkDoneProgressParams 2689 PartialResultParams 2690 } 2691 2692 /** 2693 * @since 3.16.0 - Proposed state 2694 */ 2695 type SemanticTokensEdit struct { 2696 /** 2697 * The start offset of the edit. 2698 */ 2699 Start float64 `json:"start"` 2700 /** 2701 * The count of elements to remove. 2702 */ 2703 DeleteCount float64 `json:"deleteCount"` 2704 /** 2705 * The elements to insert. 2706 */ 2707 Data []float64 `json:"data,omitempty"` 2708 } 2709 2710 /** 2711 * @since 3.16.0 - Proposed state 2712 */ 2713 type SemanticTokensParams struct { 2714 /** 2715 * The text document. 2716 */ 2717 TextDocument TextDocumentIdentifier `json:"textDocument"` 2718 WorkDoneProgressParams 2719 PartialResultParams 2720 } 2721 2722 /** 2723 * @since 3.16.0 - Proposed state 2724 */ 2725 type SemanticTokensRangeParams struct { 2726 /** 2727 * The text document. 2728 */ 2729 TextDocument TextDocumentIdentifier `json:"textDocument"` 2730 /** 2731 * The range the semantic tokens are requested for. 2732 */ 2733 Range Range `json:"range"` 2734 WorkDoneProgressParams 2735 PartialResultParams 2736 } 2737 2738 type ServerCapabilities = struct { 2739 /** 2740 * Defines how text documents are synced. Is either a detailed structure defining each notification or 2741 * for backwards compatibility the TextDocumentSyncKind number. 2742 */ 2743 TextDocumentSync interface{}/*TextDocumentSyncOptions | TextDocumentSyncKind*/ `json:"textDocumentSync,omitempty"` 2744 /** 2745 * The server provides completion support. 2746 */ 2747 CompletionProvider CompletionOptions `json:"completionProvider,omitempty"` 2748 /** 2749 * The server provides hover support. 2750 */ 2751 HoverProvider bool/*boolean | HoverOptions*/ `json:"hoverProvider,omitempty"` 2752 /** 2753 * The server provides signature help support. 2754 */ 2755 SignatureHelpProvider SignatureHelpOptions `json:"signatureHelpProvider,omitempty"` 2756 /** 2757 * The server provides Goto Declaration support. 2758 */ 2759 DeclarationProvider interface{}/* bool | DeclarationOptions | DeclarationRegistrationOptions*/ `json:"declarationProvider,omitempty"` 2760 /** 2761 * The server provides goto definition support. 2762 */ 2763 DefinitionProvider bool/*boolean | DefinitionOptions*/ `json:"definitionProvider,omitempty"` 2764 /** 2765 * The server provides Goto Type Definition support. 2766 */ 2767 TypeDefinitionProvider interface{}/* bool | TypeDefinitionOptions | TypeDefinitionRegistrationOptions*/ `json:"typeDefinitionProvider,omitempty"` 2768 /** 2769 * The server provides Goto Implementation support. 2770 */ 2771 ImplementationProvider interface{}/* bool | ImplementationOptions | ImplementationRegistrationOptions*/ `json:"implementationProvider,omitempty"` 2772 /** 2773 * The server provides find references support. 2774 */ 2775 ReferencesProvider bool/*boolean | ReferenceOptions*/ `json:"referencesProvider,omitempty"` 2776 /** 2777 * The server provides document highlight support. 2778 */ 2779 DocumentHighlightProvider bool/*boolean | DocumentHighlightOptions*/ `json:"documentHighlightProvider,omitempty"` 2780 /** 2781 * The server provides document symbol support. 2782 */ 2783 DocumentSymbolProvider bool/*boolean | DocumentSymbolOptions*/ `json:"documentSymbolProvider,omitempty"` 2784 /** 2785 * The server provides code actions. CodeActionOptions may only be 2786 * specified if the client states that it supports 2787 * `codeActionLiteralSupport` in its initial `initialize` request. 2788 */ 2789 CodeActionProvider interface{}/*boolean | CodeActionOptions*/ `json:"codeActionProvider,omitempty"` 2790 /** 2791 * The server provides code lens. 2792 */ 2793 CodeLensProvider CodeLensOptions `json:"codeLensProvider,omitempty"` 2794 /** 2795 * The server provides document link support. 2796 */ 2797 DocumentLinkProvider DocumentLinkOptions `json:"documentLinkProvider,omitempty"` 2798 /** 2799 * The server provides color provider support. 2800 */ 2801 ColorProvider interface{}/* bool | DocumentColorOptions | DocumentColorRegistrationOptions*/ `json:"colorProvider,omitempty"` 2802 /** 2803 * The server provides workspace symbol support. 2804 */ 2805 WorkspaceSymbolProvider bool/*boolean | WorkspaceSymbolOptions*/ `json:"workspaceSymbolProvider,omitempty"` 2806 /** 2807 * The server provides document formatting. 2808 */ 2809 DocumentFormattingProvider bool/*boolean | DocumentFormattingOptions*/ `json:"documentFormattingProvider,omitempty"` 2810 /** 2811 * The server provides document range formatting. 2812 */ 2813 DocumentRangeFormattingProvider bool/*boolean | DocumentRangeFormattingOptions*/ `json:"documentRangeFormattingProvider,omitempty"` 2814 /** 2815 * The server provides document formatting on typing. 2816 */ 2817 DocumentOnTypeFormattingProvider DocumentOnTypeFormattingOptions `json:"documentOnTypeFormattingProvider,omitempty"` 2818 /** 2819 * The server provides rename support. RenameOptions may only be 2820 * specified if the client states that it supports 2821 * `prepareSupport` in its initial `initialize` request. 2822 */ 2823 RenameProvider interface{}/*boolean | RenameOptions*/ `json:"renameProvider,omitempty"` 2824 /** 2825 * The server provides folding provider support. 2826 */ 2827 FoldingRangeProvider interface{}/* bool | FoldingRangeOptions | FoldingRangeRegistrationOptions*/ `json:"foldingRangeProvider,omitempty"` 2828 /** 2829 * The server provides selection range support. 2830 */ 2831 SelectionRangeProvider interface{}/* bool | SelectionRangeOptions | SelectionRangeRegistrationOptions*/ `json:"selectionRangeProvider,omitempty"` 2832 /** 2833 * The server provides execute command support. 2834 */ 2835 ExecuteCommandProvider ExecuteCommandOptions `json:"executeCommandProvider,omitempty"` 2836 /** 2837 * The server provides Call Hierarchy support. 2838 */ 2839 CallHierarchyProvider interface{}/* bool | CallHierarchyOptions | CallHierarchyRegistrationOptions*/ `json:"callHierarchyProvider,omitempty"` 2840 /** 2841 * Experimental server capabilities. 2842 */ 2843 Experimental interface{} `json:"experimental,omitempty"` 2844 /** 2845 * The workspace server capabilities 2846 */ 2847 Workspace WorkspaceGn `json:"workspace,omitempty"` 2848 } 2849 2850 type SetTraceParams struct { 2851 Value TraceValues `json:"value"` 2852 } 2853 2854 /** 2855 * The parameters of a notification message. 2856 */ 2857 type ShowMessageParams struct { 2858 /** 2859 * The message type. See {@link MessageType} 2860 */ 2861 Type MessageType `json:"type"` 2862 /** 2863 * The actual message 2864 */ 2865 Message string `json:"message"` 2866 } 2867 2868 type ShowMessageRequestParams struct { 2869 /** 2870 * The message type. See {@link MessageType} 2871 */ 2872 Type MessageType `json:"type"` 2873 /** 2874 * The actual message 2875 */ 2876 Message string `json:"message"` 2877 /** 2878 * The message action items to present. 2879 */ 2880 Actions []MessageActionItem `json:"actions,omitempty"` 2881 } 2882 2883 /** 2884 * Signature help represents the signature of something 2885 * callable. There can be multiple signature but only one 2886 * active and only one active parameter. 2887 */ 2888 type SignatureHelp struct { 2889 /** 2890 * One or more signatures. 2891 */ 2892 Signatures []SignatureInformation `json:"signatures"` 2893 /** 2894 * The active signature. Set to `null` if no 2895 * signatures exist. 2896 */ 2897 ActiveSignature float64/*number | null*/ `json:"activeSignature"` 2898 /** 2899 * The active parameter of the active signature. Set to `null` 2900 * if the active signature has no parameters. 2901 */ 2902 ActiveParameter float64/*number | null*/ `json:"activeParameter"` 2903 } 2904 2905 /** 2906 * Client Capabilities for a [SignatureHelpRequest](#SignatureHelpRequest). 2907 */ 2908 type SignatureHelpClientCapabilities struct { 2909 /** 2910 * Whether signature help supports dynamic registration. 2911 */ 2912 DynamicRegistration bool `json:"dynamicRegistration,omitempty"` 2913 /** 2914 * The client supports the following `SignatureInformation` 2915 * specific properties. 2916 */ 2917 SignatureInformation struct { 2918 /** 2919 * Client supports the follow content formats for the documentation 2920 * property. The order describes the preferred format of the client. 2921 */ 2922 DocumentationFormat []MarkupKind `json:"documentationFormat,omitempty"` 2923 /** 2924 * Client capabilities specific to parameter information. 2925 */ 2926 ParameterInformation struct { 2927 /** 2928 * The client supports processing label offsets instead of a 2929 * simple label string. 2930 * 2931 * @since 3.14.0 2932 */ 2933 LabelOffsetSupport bool `json:"labelOffsetSupport,omitempty"` 2934 } `json:"parameterInformation,omitempty"` 2935 /** 2936 * The client support the `activeParameter` property on `SignatureInformation` 2937 * literal. 2938 * 2939 * @since 3.16.0 - proposed state 2940 */ 2941 ActiveParameterSupport bool `json:"activeParameterSupport,omitempty"` 2942 } `json:"signatureInformation,omitempty"` 2943 /** 2944 * The client supports to send additional context information for a 2945 * `textDocument/signatureHelp` request. A client that opts into 2946 * contextSupport will also support the `retriggerCharacters` on 2947 * `SignatureHelpOptions`. 2948 * 2949 * @since 3.15.0 2950 */ 2951 ContextSupport bool `json:"contextSupport,omitempty"` 2952 } 2953 2954 /** 2955 * Additional information about the context in which a signature help request was triggered. 2956 * 2957 * @since 3.15.0 2958 */ 2959 type SignatureHelpContext struct { 2960 /** 2961 * Action that caused signature help to be triggered. 2962 */ 2963 TriggerKind SignatureHelpTriggerKind `json:"triggerKind"` 2964 /** 2965 * Character that caused signature help to be triggered. 2966 * 2967 * This is undefined when `triggerKind !== SignatureHelpTriggerKind.TriggerCharacter` 2968 */ 2969 TriggerCharacter string `json:"triggerCharacter,omitempty"` 2970 /** 2971 * `true` if signature help was already showing when it was triggered. 2972 * 2973 * Retriggers occur when the signature help is already active and can be caused by actions such as 2974 * typing a trigger character, a cursor move, or document content changes. 2975 */ 2976 IsRetrigger bool `json:"isRetrigger"` 2977 /** 2978 * The currently active `SignatureHelp`. 2979 * 2980 * The `activeSignatureHelp` has its `SignatureHelp.activeSignature` field updated based on 2981 * the user navigating through available signatures. 2982 */ 2983 ActiveSignatureHelp SignatureHelp `json:"activeSignatureHelp,omitempty"` 2984 } 2985 2986 /** 2987 * Server Capabilities for a [SignatureHelpRequest](#SignatureHelpRequest). 2988 */ 2989 type SignatureHelpOptions struct { 2990 /** 2991 * List of characters that trigger signature help. 2992 */ 2993 TriggerCharacters []string `json:"triggerCharacters,omitempty"` 2994 /** 2995 * List of characters that re-trigger signature help. 2996 * 2997 * These trigger characters are only active when signature help is already showing. All trigger characters 2998 * are also counted as re-trigger characters. 2999 * 3000 * @since 3.15.0 3001 */ 3002 RetriggerCharacters []string `json:"retriggerCharacters,omitempty"` 3003 WorkDoneProgressOptions 3004 } 3005 3006 /** 3007 * Parameters for a [SignatureHelpRequest](#SignatureHelpRequest). 3008 */ 3009 type SignatureHelpParams struct { 3010 /** 3011 * The signature help context. This is only available if the client specifies 3012 * to send this using the client capability `textDocument.signatureHelp.contextSupport === true` 3013 * 3014 * @since 3.15.0 3015 */ 3016 Context SignatureHelpContext `json:"context,omitempty"` 3017 TextDocumentPositionParams 3018 WorkDoneProgressParams 3019 } 3020 3021 /** 3022 * How a signature help was triggered. 3023 * 3024 * @since 3.15.0 3025 */ 3026 type SignatureHelpTriggerKind float64 3027 3028 /** 3029 * Represents the signature of something callable. A signature 3030 * can have a label, like a function-name, a doc-comment, and 3031 * a set of parameters. 3032 */ 3033 type SignatureInformation struct { 3034 /** 3035 * The label of this signature. Will be shown in 3036 * the UI. 3037 */ 3038 Label string `json:"label"` 3039 /** 3040 * The human-readable doc-comment of this signature. Will be shown 3041 * in the UI but can be omitted. 3042 */ 3043 Documentation string/*string | MarkupContent*/ `json:"documentation,omitempty"` 3044 /** 3045 * The parameters of this signature. 3046 */ 3047 Parameters []ParameterInformation `json:"parameters,omitempty"` 3048 /** 3049 * The index of the active parameter. 3050 * 3051 * If provided, this is used in place of `SignatureHelp.activeParameter`. 3052 * 3053 * @since 3.16.0 - proposed state 3054 */ 3055 ActiveParameter float64 `json:"activeParameter,omitempty"` 3056 } 3057 3058 /** 3059 * Static registration options to be returned in the initialize 3060 * request. 3061 */ 3062 type StaticRegistrationOptions struct { 3063 /** 3064 * The id used to register the request. The id can be used to deregister 3065 * the request again. See also Registration#id. 3066 */ 3067 ID string `json:"id,omitempty"` 3068 } 3069 3070 /** 3071 * Represents information about programming constructs like variables, classes, 3072 * interfaces etc. 3073 */ 3074 type SymbolInformation struct { 3075 /** 3076 * The name of this symbol. 3077 */ 3078 Name string `json:"name"` 3079 /** 3080 * The kind of this symbol. 3081 */ 3082 Kind SymbolKind `json:"kind"` 3083 /** 3084 * Tags for this completion item. 3085 * 3086 * @since 3.16.0 - Proposed state 3087 */ 3088 Tags []SymbolTag `json:"tags,omitempty"` 3089 /** 3090 * Indicates if this symbol is deprecated. 3091 * 3092 * @deprecated Use tags instead 3093 */ 3094 Deprecated bool `json:"deprecated,omitempty"` 3095 /** 3096 * The location of this symbol. The location's range is used by a tool 3097 * to reveal the location in the editor. If the symbol is selected in the 3098 * tool the range's start information is used to position the cursor. So 3099 * the range usually spans more than the actual symbol's name and does 3100 * normally include thinks like visibility modifiers. 3101 * 3102 * The range doesn't have to denote a node range in the sense of a abstract 3103 * syntax tree. It can therefore not be used to re-construct a hierarchy of 3104 * the symbols. 3105 */ 3106 Location Location `json:"location"` 3107 /** 3108 * The name of the symbol containing this symbol. This information is for 3109 * user interface purposes (e.g. to render a qualifier in the user interface 3110 * if necessary). It can't be used to re-infer a hierarchy for the document 3111 * symbols. 3112 */ 3113 ContainerName string `json:"containerName,omitempty"` 3114 } 3115 3116 /** 3117 * A symbol kind. 3118 */ 3119 type SymbolKind float64 3120 3121 /** 3122 * Symbol tags are extra annotations that tweak the rendering of a symbol. 3123 * @since 3.16 3124 */ 3125 type SymbolTag float64 3126 3127 /** 3128 * Text document specific client capabilities. 3129 */ 3130 type TextDocumentClientCapabilities struct { 3131 /** 3132 * Defines which synchronization capabilities the client supports. 3133 */ 3134 Synchronization TextDocumentSyncClientCapabilities `json:"synchronization,omitempty"` 3135 /** 3136 * Capabilities specific to the `textDocument/completion` 3137 */ 3138 Completion CompletionClientCapabilities `json:"completion,omitempty"` 3139 /** 3140 * Capabilities specific to the `textDocument/hover` 3141 */ 3142 Hover HoverClientCapabilities `json:"hover,omitempty"` 3143 /** 3144 * Capabilities specific to the `textDocument/signatureHelp` 3145 */ 3146 SignatureHelp SignatureHelpClientCapabilities `json:"signatureHelp,omitempty"` 3147 /** 3148 * Capabilities specific to the `textDocument/declaration` 3149 * 3150 * @since 3.14.0 3151 */ 3152 Declaration DeclarationClientCapabilities `json:"declaration,omitempty"` 3153 /** 3154 * Capabilities specific to the `textDocument/definition` 3155 */ 3156 Definition DefinitionClientCapabilities `json:"definition,omitempty"` 3157 /** 3158 * Capabilities specific to the `textDocument/typeDefinition` 3159 * 3160 * @since 3.6.0 3161 */ 3162 TypeDefinition TypeDefinitionClientCapabilities `json:"typeDefinition,omitempty"` 3163 /** 3164 * Capabilities specific to the `textDocument/implementation` 3165 * 3166 * @since 3.6.0 3167 */ 3168 Implementation ImplementationClientCapabilities `json:"implementation,omitempty"` 3169 /** 3170 * Capabilities specific to the `textDocument/references` 3171 */ 3172 References ReferenceClientCapabilities `json:"references,omitempty"` 3173 /** 3174 * Capabilities specific to the `textDocument/documentHighlight` 3175 */ 3176 DocumentHighlight DocumentHighlightClientCapabilities `json:"documentHighlight,omitempty"` 3177 /** 3178 * Capabilities specific to the `textDocument/documentSymbol` 3179 */ 3180 DocumentSymbol DocumentSymbolClientCapabilities `json:"documentSymbol,omitempty"` 3181 /** 3182 * Capabilities specific to the `textDocument/codeAction` 3183 */ 3184 CodeAction CodeActionClientCapabilities `json:"codeAction,omitempty"` 3185 /** 3186 * Capabilities specific to the `textDocument/codeLens` 3187 */ 3188 CodeLens CodeLensClientCapabilities `json:"codeLens,omitempty"` 3189 /** 3190 * Capabilities specific to the `textDocument/documentLink` 3191 */ 3192 DocumentLink DocumentLinkClientCapabilities `json:"documentLink,omitempty"` 3193 /** 3194 * Capabilities specific to the `textDocument/documentColor` 3195 */ 3196 ColorProvider DocumentColorClientCapabilities `json:"colorProvider,omitempty"` 3197 /** 3198 * Capabilities specific to the `textDocument/formatting` 3199 */ 3200 Formatting DocumentFormattingClientCapabilities `json:"formatting,omitempty"` 3201 /** 3202 * Capabilities specific to the `textDocument/rangeFormatting` 3203 */ 3204 RangeFormatting DocumentRangeFormattingClientCapabilities `json:"rangeFormatting,omitempty"` 3205 /** 3206 * Capabilities specific to the `textDocument/onTypeFormatting` 3207 */ 3208 OnTypeFormatting DocumentOnTypeFormattingClientCapabilities `json:"onTypeFormatting,omitempty"` 3209 /** 3210 * Capabilities specific to the `textDocument/rename` 3211 */ 3212 Rename RenameClientCapabilities `json:"rename,omitempty"` 3213 /** 3214 * Capabilities specific to `textDocument/foldingRange` requests. 3215 * 3216 * @since 3.10.0 3217 */ 3218 FoldingRange FoldingRangeClientCapabilities `json:"foldingRange,omitempty"` 3219 /** 3220 * Capabilities specific to `textDocument/selectionRange` requests 3221 * 3222 * @since 3.15.0 3223 */ 3224 SelectionRange SelectionRangeClientCapabilities `json:"selectionRange,omitempty"` 3225 /** 3226 * Capabilities specific to `textDocument/publishDiagnostics`. 3227 */ 3228 PublishDiagnostics PublishDiagnosticsClientCapabilities `json:"publishDiagnostics,omitempty"` 3229 /** 3230 * Capabilities specific to the `textDocument/callHierarchy`. 3231 * 3232 * @since 3.16.0 3233 */ 3234 CallHierarchy CallHierarchyClientCapabilities `json:"callHierarchy,omitempty"` 3235 } 3236 3237 /** 3238 * An event describing a change to a text document. If range and rangeLength are omitted 3239 * the new text is considered to be the full content of the document. 3240 */ 3241 type TextDocumentContentChangeEvent = struct { 3242 /** 3243 * The range of the document that changed. 3244 */ 3245 Range *Range `json:"range,omitempty"` 3246 /** 3247 * The optional length of the range that got replaced. 3248 * 3249 * @deprecated use range instead. 3250 */ 3251 RangeLength float64 `json:"rangeLength,omitempty"` 3252 /** 3253 * The new text for the provided range. 3254 */ 3255 Text string `json:"text"` 3256 } 3257 3258 /** 3259 * Describes textual changes on a text document. A TextDocumentEdit describes all changes 3260 * on a document version Si and after they are applied move the document to version Si+1. 3261 * So the creator of a TextDocumentEdit doesn't need to sort the array of edits or do any 3262 * kind of ordering. However the edits must be non overlapping. 3263 */ 3264 type TextDocumentEdit struct { 3265 /** 3266 * The text document to change. 3267 */ 3268 TextDocument VersionedTextDocumentIdentifier `json:"textDocument"` 3269 /** 3270 * The edits to be applied. 3271 */ 3272 Edits []TextEdit `json:"edits"` 3273 } 3274 3275 /** 3276 * A literal to identify a text document in the client. 3277 */ 3278 type TextDocumentIdentifier struct { 3279 /** 3280 * The text document's uri. 3281 */ 3282 URI DocumentURI `json:"uri"` 3283 } 3284 3285 /** 3286 * An item to transfer a text document from the client to the 3287 * server. 3288 */ 3289 type TextDocumentItem struct { 3290 /** 3291 * The text document's uri. 3292 */ 3293 URI DocumentURI `json:"uri"` 3294 /** 3295 * The text document's language identifier 3296 */ 3297 LanguageID string `json:"languageId"` 3298 /** 3299 * The version number of this document (it will increase after each 3300 * change, including undo/redo). 3301 */ 3302 Version float64 `json:"version"` 3303 /** 3304 * The content of the opened text document. 3305 */ 3306 Text string `json:"text"` 3307 } 3308 3309 /** 3310 * A parameter literal used in requests to pass a text document and a position inside that 3311 * document. 3312 */ 3313 type TextDocumentPositionParams struct { 3314 /** 3315 * The text document. 3316 */ 3317 TextDocument TextDocumentIdentifier `json:"textDocument"` 3318 /** 3319 * The position inside the text document. 3320 */ 3321 Position Position `json:"position"` 3322 } 3323 3324 /** 3325 * General text document registration options. 3326 */ 3327 type TextDocumentRegistrationOptions struct { 3328 /** 3329 * A document selector to identify the scope of the registration. If set to null 3330 * the document selector provided on the client side will be used. 3331 */ 3332 DocumentSelector DocumentSelector /*DocumentSelector | null*/ `json:"documentSelector"` 3333 } 3334 3335 /** 3336 * Represents reasons why a text document is saved. 3337 */ 3338 type TextDocumentSaveReason float64 3339 3340 type TextDocumentSyncClientCapabilities struct { 3341 /** 3342 * Whether text document synchronization supports dynamic registration. 3343 */ 3344 DynamicRegistration bool `json:"dynamicRegistration,omitempty"` 3345 /** 3346 * The client supports sending will save notifications. 3347 */ 3348 WillSave bool `json:"willSave,omitempty"` 3349 /** 3350 * The client supports sending a will save request and 3351 * waits for a response providing text edits which will 3352 * be applied to the document before it is saved. 3353 */ 3354 WillSaveWaitUntil bool `json:"willSaveWaitUntil,omitempty"` 3355 /** 3356 * The client supports did save notifications. 3357 */ 3358 DidSave bool `json:"didSave,omitempty"` 3359 } 3360 3361 /** 3362 * Defines how the host (editor) should sync 3363 * document changes to the language server. 3364 */ 3365 type TextDocumentSyncKind float64 3366 3367 type TextDocumentSyncOptions struct { 3368 /** 3369 * Open and close notifications are sent to the server. If omitted open close notification should not 3370 * be sent. 3371 */ 3372 OpenClose bool `json:"openClose,omitempty"` 3373 /** 3374 * Change notifications are sent to the server. See TextDocumentSyncKind.None, TextDocumentSyncKind.Full 3375 * and TextDocumentSyncKind.Incremental. If omitted it defaults to TextDocumentSyncKind.None. 3376 */ 3377 Change TextDocumentSyncKind `json:"change,omitempty"` 3378 /** 3379 * If present will save notifications are sent to the server. If omitted the notification should not be 3380 * sent. 3381 */ 3382 WillSave bool `json:"willSave,omitempty"` 3383 /** 3384 * If present will save wait until requests are sent to the server. If omitted the request should not be 3385 * sent. 3386 */ 3387 WillSaveWaitUntil bool `json:"willSaveWaitUntil,omitempty"` 3388 /** 3389 * If present save notifications are sent to the server. If omitted the notification should not be 3390 * sent. 3391 */ 3392 Save SaveOptions/*boolean | SaveOptions*/ `json:"save,omitempty"` 3393 } 3394 3395 /** 3396 * A text edit applicable to a text document. 3397 */ 3398 type TextEdit struct { 3399 /** 3400 * The range of the text document to be manipulated. To insert 3401 * text into a document create a range where start === end. 3402 */ 3403 Range Range `json:"range"` 3404 /** 3405 * The string to be inserted. For delete operations use an 3406 * empty string. 3407 */ 3408 NewText string `json:"newText"` 3409 } 3410 3411 type TraceValues = string /*'off' | 'messages' | 'verbose'*/ 3412 3413 /** 3414 * Since 3.6.0 3415 */ 3416 type TypeDefinitionClientCapabilities struct { 3417 /** 3418 * Whether implementation supports dynamic registration. If this is set to `true` 3419 * the client supports the new `TypeDefinitionRegistrationOptions` return value 3420 * for the corresponding server capability as well. 3421 */ 3422 DynamicRegistration bool `json:"dynamicRegistration,omitempty"` 3423 /** 3424 * The client supports additional metadata in the form of definition links. 3425 * 3426 * Since 3.14.0 3427 */ 3428 LinkSupport bool `json:"linkSupport,omitempty"` 3429 } 3430 3431 type TypeDefinitionOptions struct { 3432 WorkDoneProgressOptions 3433 } 3434 3435 type TypeDefinitionParams struct { 3436 TextDocumentPositionParams 3437 WorkDoneProgressParams 3438 PartialResultParams 3439 } 3440 3441 type TypeDefinitionRegistrationOptions struct { 3442 TextDocumentRegistrationOptions 3443 TypeDefinitionOptions 3444 StaticRegistrationOptions 3445 } 3446 3447 /** 3448 * A tagging type for string properties that are actually URIs 3449 * 3450 * @since 3.16.0 - Proposed state 3451 */ 3452 type URI = string 3453 3454 /** 3455 * General parameters to unregister a request or notification. 3456 */ 3457 type Unregistration struct { 3458 /** 3459 * The id used to unregister the request or notification. Usually an id 3460 * provided during the register request. 3461 */ 3462 ID string `json:"id"` 3463 /** 3464 * The method to unregister for. 3465 */ 3466 Method string `json:"method"` 3467 } 3468 3469 type UnregistrationParams struct { 3470 Unregisterations []Unregistration `json:"unregisterations"` 3471 } 3472 3473 /** 3474 * An identifier to denote a specific version of a text document. 3475 */ 3476 type VersionedTextDocumentIdentifier struct { 3477 /** 3478 * The version number of this document. If a versioned text document identifier 3479 * is sent from the server to the client and the file is not open in the editor 3480 * (the server has not received an open notification before) the server can send 3481 * `null` to indicate that the version is unknown and the content on disk is the 3482 * truth (as speced with document content ownership). 3483 */ 3484 Version float64/*number | null*/ `json:"version"` 3485 TextDocumentIdentifier 3486 } 3487 3488 type WatchKind float64 3489 3490 /** 3491 * The parameters send in a will save text document notification. 3492 */ 3493 type WillSaveTextDocumentParams struct { 3494 /** 3495 * The document that will be saved. 3496 */ 3497 TextDocument TextDocumentIdentifier `json:"textDocument"` 3498 /** 3499 * The 'TextDocumentSaveReason'. 3500 */ 3501 Reason TextDocumentSaveReason `json:"reason"` 3502 } 3503 3504 type WorkDoneProgressBegin struct { 3505 Kind string `json:"kind"` 3506 /** 3507 * Mandatory title of the progress operation. Used to briefly inform about 3508 * the kind of operation being performed. 3509 * 3510 * Examples: "Indexing" or "Linking dependencies". 3511 */ 3512 Title string `json:"title"` 3513 /** 3514 * Controls if a cancel button should show to allow the user to cancel the 3515 * long running operation. Clients that don't support cancellation are allowed 3516 * to ignore the setting. 3517 */ 3518 Cancellable bool `json:"cancellable,omitempty"` 3519 /** 3520 * Optional, more detailed associated progress message. Contains 3521 * complementary information to the `title`. 3522 * 3523 * Examples: "3/25 files", "project/src/module2", "node_modules/some_dep". 3524 * If unset, the previous progress message (if any) is still valid. 3525 */ 3526 Message string `json:"message,omitempty"` 3527 /** 3528 * Optional progress percentage to display (value 100 is considered 100%). 3529 * If not provided infinite progress is assumed and clients are allowed 3530 * to ignore the `percentage` value in subsequent in report notifications. 3531 * 3532 * The value should be steadily rising. Clients are free to ignore values 3533 * that are not following this rule. 3534 */ 3535 Percentage float64 `json:"percentage,omitempty"` 3536 } 3537 3538 type WorkDoneProgressCancelParams struct { 3539 /** 3540 * The token to be used to report progress. 3541 */ 3542 Token ProgressToken `json:"token"` 3543 } 3544 3545 type WorkDoneProgressClientCapabilities struct { 3546 /** 3547 * Window specific client capabilities. 3548 */ 3549 Window struct { 3550 /** 3551 * Whether client supports handling progress notifications. If set servers are allowed to 3552 * report in `workDoneProgress` property in the request specific server capabilities. 3553 * 3554 * Since 3.15.0 3555 */ 3556 WorkDoneProgress bool `json:"workDoneProgress,omitempty"` 3557 } `json:"window,omitempty"` 3558 } 3559 3560 type WorkDoneProgressCreateParams struct { 3561 /** 3562 * The token to be used to report progress. 3563 */ 3564 Token ProgressToken `json:"token"` 3565 } 3566 3567 type WorkDoneProgressEnd struct { 3568 Kind string `json:"kind"` 3569 /** 3570 * Optional, a final message indicating to for example indicate the outcome 3571 * of the operation. 3572 */ 3573 Message string `json:"message,omitempty"` 3574 } 3575 3576 type WorkDoneProgressOptions struct { 3577 WorkDoneProgress bool `json:"workDoneProgress,omitempty"` 3578 } 3579 3580 type WorkDoneProgressParams struct { 3581 /** 3582 * An optional token that a server can use to report work done progress. 3583 */ 3584 WorkDoneToken ProgressToken `json:"workDoneToken,omitempty"` 3585 } 3586 3587 type WorkDoneProgressReport struct { 3588 Kind string `json:"kind"` 3589 /** 3590 * Controls enablement state of a cancel button. 3591 * 3592 * Clients that don't support cancellation or don't support controlling the button's 3593 * enablement state are allowed to ignore the property. 3594 */ 3595 Cancellable bool `json:"cancellable,omitempty"` 3596 /** 3597 * Optional, more detailed associated progress message. Contains 3598 * complementary information to the `title`. 3599 * 3600 * Examples: "3/25 files", "project/src/module2", "node_modules/some_dep". 3601 * If unset, the previous progress message (if any) is still valid. 3602 */ 3603 Message string `json:"message,omitempty"` 3604 /** 3605 * Optional progress percentage to display (value 100 is considered 100%). 3606 * If not provided infinite progress is assumed and clients are allowed 3607 * to ignore the `percentage` value in subsequent in report notifications. 3608 * 3609 * The value should be steadily rising. Clients are free to ignore values 3610 * that are not following this rule. 3611 */ 3612 Percentage float64 `json:"percentage,omitempty"` 3613 } 3614 3615 /** 3616 * Workspace specific client capabilities. 3617 */ 3618 type WorkspaceClientCapabilities struct { 3619 /** 3620 * The client supports applying batch edits 3621 * to the workspace by supporting the request 3622 * 'workspace/applyEdit' 3623 */ 3624 ApplyEdit bool `json:"applyEdit,omitempty"` 3625 /** 3626 * Capabilities specific to `WorkspaceEdit`s 3627 */ 3628 WorkspaceEdit WorkspaceEditClientCapabilities `json:"workspaceEdit,omitempty"` 3629 /** 3630 * Capabilities specific to the `workspace/didChangeConfiguration` notification. 3631 */ 3632 DidChangeConfiguration DidChangeConfigurationClientCapabilities `json:"didChangeConfiguration,omitempty"` 3633 /** 3634 * Capabilities specific to the `workspace/didChangeWatchedFiles` notification. 3635 */ 3636 DidChangeWatchedFiles DidChangeWatchedFilesClientCapabilities `json:"didChangeWatchedFiles,omitempty"` 3637 /** 3638 * Capabilities specific to the `workspace/symbol` request. 3639 */ 3640 Symbol WorkspaceSymbolClientCapabilities `json:"symbol,omitempty"` 3641 /** 3642 * Capabilities specific to the `workspace/executeCommand` request. 3643 */ 3644 ExecuteCommand ExecuteCommandClientCapabilities `json:"executeCommand,omitempty"` 3645 } 3646 3647 /** 3648 * A workspace edit represents changes to many resources managed in the workspace. The edit 3649 * should either provide `changes` or `documentChanges`. If documentChanges are present 3650 * they are preferred over `changes` if the client can handle versioned document edits. 3651 */ 3652 type WorkspaceEdit struct { 3653 /** 3654 * Holds changes to existing resources. 3655 */ 3656 Changes map[string][]TextEdit `json:"changes,omitempty"` 3657 /** 3658 * Depending on the client capability `workspace.workspaceEdit.resourceOperations` document changes 3659 * are either an array of `TextDocumentEdit`s to express changes to n different text documents 3660 * where each text document edit addresses a specific version of a text document. Or it can contain 3661 * above `TextDocumentEdit`s mixed with create, rename and delete file / folder operations. 3662 * 3663 * Whether a client supports versioned document edits is expressed via 3664 * `workspace.workspaceEdit.documentChanges` client capability. 3665 * 3666 * If a client neither supports `documentChanges` nor `workspace.workspaceEdit.resourceOperations` then 3667 * only plain `TextEdit`s using the `changes` property are supported. 3668 */ 3669 DocumentChanges []TextDocumentEdit/*TextDocumentEdit | CreateFile | RenameFile | DeleteFile*/ `json:"documentChanges,omitempty"` 3670 } 3671 3672 type WorkspaceEditClientCapabilities struct { 3673 /** 3674 * The client supports versioned document changes in `WorkspaceEdit`s 3675 */ 3676 DocumentChanges bool `json:"documentChanges,omitempty"` 3677 /** 3678 * The resource operations the client supports. Clients should at least 3679 * support 'create', 'rename' and 'delete' files and folders. 3680 * 3681 * @since 3.13.0 3682 */ 3683 ResourceOperations []ResourceOperationKind `json:"resourceOperations,omitempty"` 3684 /** 3685 * The failure handling strategy of a client if applying the workspace edit 3686 * fails. 3687 * 3688 * @since 3.13.0 3689 */ 3690 FailureHandling FailureHandlingKind `json:"failureHandling,omitempty"` 3691 } 3692 3693 type WorkspaceFolder struct { 3694 /** 3695 * The associated URI for this workspace folder. 3696 */ 3697 URI string `json:"uri"` 3698 /** 3699 * The name of the workspace folder. Used to refer to this 3700 * workspace folder in the user interface. 3701 */ 3702 Name string `json:"name"` 3703 } 3704 3705 /** 3706 * The workspace folder change event. 3707 */ 3708 type WorkspaceFoldersChangeEvent struct { 3709 /** 3710 * The array of added workspace folders 3711 */ 3712 Added []WorkspaceFolder `json:"added"` 3713 /** 3714 * The array of the removed workspace folders 3715 */ 3716 Removed []WorkspaceFolder `json:"removed"` 3717 } 3718 3719 type WorkspaceFoldersClientCapabilities struct { 3720 /** 3721 * The workspace client capabilities 3722 */ 3723 Workspace WorkspaceGn `json:"workspace,omitempty"` 3724 } 3725 3726 type WorkspaceFoldersInitializeParams struct { 3727 /** 3728 * The actual configured workspace folders. 3729 */ 3730 WorkspaceFolders []WorkspaceFolder /*WorkspaceFolder[] | null*/ `json:"workspaceFolders"` 3731 } 3732 3733 type WorkspaceFoldersServerCapabilities struct { 3734 /** 3735 * The workspace server capabilities 3736 */ 3737 Workspace WorkspaceGn `json:"workspace,omitempty"` 3738 } 3739 3740 /** 3741 * Client capabilities for a [WorkspaceSymbolRequest](#WorkspaceSymbolRequest). 3742 */ 3743 type WorkspaceSymbolClientCapabilities struct { 3744 /** 3745 * Symbol request supports dynamic registration. 3746 */ 3747 DynamicRegistration bool `json:"dynamicRegistration,omitempty"` 3748 /** 3749 * Specific capabilities for the `SymbolKind` in the `workspace/symbol` request. 3750 */ 3751 SymbolKind struct { 3752 /** 3753 * The symbol kind values the client supports. When this 3754 * property exists the client also guarantees that it will 3755 * handle values outside its set gracefully and falls back 3756 * to a default value when unknown. 3757 * 3758 * If this property is not present the client only supports 3759 * the symbol kinds from `File` to `Array` as defined in 3760 * the initial version of the protocol. 3761 */ 3762 ValueSet []SymbolKind `json:"valueSet,omitempty"` 3763 } `json:"symbolKind,omitempty"` 3764 /** 3765 * The client supports tags on `SymbolInformation`. 3766 * Clients supporting tags have to handle unknown tags gracefully. 3767 * 3768 * @since 3.16.0 - Proposed state 3769 */ 3770 TagSupport struct { 3771 /** 3772 * The tags supported by the client. 3773 */ 3774 ValueSet []SymbolTag `json:"valueSet"` 3775 } `json:"tagSupport,omitempty"` 3776 } 3777 3778 /** 3779 * Server capabilities for a [WorkspaceSymbolRequest](#WorkspaceSymbolRequest). 3780 */ 3781 type WorkspaceSymbolOptions struct { 3782 WorkDoneProgressOptions 3783 } 3784 3785 /** 3786 * The parameters of a [WorkspaceSymbolRequest](#WorkspaceSymbolRequest). 3787 */ 3788 type WorkspaceSymbolParams struct { 3789 /** 3790 * A query string to filter symbols by. Clients may send an empty 3791 * string here to request all symbols. 3792 */ 3793 Query string `json:"query"` 3794 WorkDoneProgressParams 3795 PartialResultParams 3796 } 3797 3798 const ( 3799 /** 3800 * Empty kind. 3801 */ 3802 3803 Empty CodeActionKind = "" 3804 /** 3805 * Base kind for quickfix actions: 'quickfix' 3806 */ 3807 3808 QuickFix CodeActionKind = "quickfix" 3809 /** 3810 * Base kind for refactoring actions: 'refactor' 3811 */ 3812 3813 Refactor CodeActionKind = "refactor" 3814 /** 3815 * Base kind for refactoring extraction actions: 'refactor.extract' 3816 * 3817 * Example extract actions: 3818 * 3819 * - Extract method 3820 * - Extract function 3821 * - Extract variable 3822 * - Extract interface from class 3823 * - ... 3824 */ 3825 3826 RefactorExtract CodeActionKind = "refactor.extract" 3827 /** 3828 * Base kind for refactoring inline actions: 'refactor.inline' 3829 * 3830 * Example inline actions: 3831 * 3832 * - Inline function 3833 * - Inline variable 3834 * - Inline constant 3835 * - ... 3836 */ 3837 3838 RefactorInline CodeActionKind = "refactor.inline" 3839 /** 3840 * Base kind for refactoring rewrite actions: 'refactor.rewrite' 3841 * 3842 * Example rewrite actions: 3843 * 3844 * - Convert JavaScript function to class 3845 * - Add or remove parameter 3846 * - Encapsulate field 3847 * - Make method static 3848 * - Move method to base class 3849 * - ... 3850 */ 3851 3852 RefactorRewrite CodeActionKind = "refactor.rewrite" 3853 /** 3854 * Base kind for source actions: `source` 3855 * 3856 * Source code actions apply to the entire file. 3857 */ 3858 3859 Source CodeActionKind = "source" 3860 /** 3861 * Base kind for an organize imports source action: `source.organizeImports` 3862 */ 3863 3864 SourceOrganizeImports CodeActionKind = "source.organizeImports" 3865 /** 3866 * Base kind for auto-fix source actions: `source.fixAll`. 3867 * 3868 * Fix all actions automatically fix errors that have a clear fix that do not require user input. 3869 * They should not suppress errors or perform unsafe fixes such as generating new types or classes. 3870 * 3871 * @since 3.15.0 3872 */ 3873 3874 SourceFixAll CodeActionKind = "source.fixAll" 3875 TextCompletion CompletionItemKind = 1 3876 MethodCompletion CompletionItemKind = 2 3877 FunctionCompletion CompletionItemKind = 3 3878 ConstructorCompletion CompletionItemKind = 4 3879 FieldCompletion CompletionItemKind = 5 3880 VariableCompletion CompletionItemKind = 6 3881 ClassCompletion CompletionItemKind = 7 3882 InterfaceCompletion CompletionItemKind = 8 3883 ModuleCompletion CompletionItemKind = 9 3884 PropertyCompletion CompletionItemKind = 10 3885 UnitCompletion CompletionItemKind = 11 3886 ValueCompletion CompletionItemKind = 12 3887 EnumCompletion CompletionItemKind = 13 3888 KeywordCompletion CompletionItemKind = 14 3889 SnippetCompletion CompletionItemKind = 15 3890 ColorCompletion CompletionItemKind = 16 3891 FileCompletion CompletionItemKind = 17 3892 ReferenceCompletion CompletionItemKind = 18 3893 FolderCompletion CompletionItemKind = 19 3894 EnumMemberCompletion CompletionItemKind = 20 3895 ConstantCompletion CompletionItemKind = 21 3896 StructCompletion CompletionItemKind = 22 3897 EventCompletion CompletionItemKind = 23 3898 OperatorCompletion CompletionItemKind = 24 3899 TypeParameterCompletion CompletionItemKind = 25 3900 /** 3901 * Render a completion as obsolete, usually using a strike-out. 3902 */ 3903 3904 ComplDeprecated CompletionItemTag = 1 3905 /** 3906 * Completion was triggered by typing an identifier (24x7 code 3907 * complete), manual invocation (e.g Ctrl+Space) or via API. 3908 */ 3909 3910 Invoked CompletionTriggerKind = 1 3911 /** 3912 * Completion was triggered by a trigger character specified by 3913 * the `triggerCharacters` properties of the `CompletionRegistrationOptions`. 3914 */ 3915 3916 TriggerCharacter CompletionTriggerKind = 2 3917 /** 3918 * Completion was re-triggered as current completion list is incomplete 3919 */ 3920 3921 TriggerForIncompleteCompletions CompletionTriggerKind = 3 3922 /** 3923 * Reports an error. 3924 */ 3925 3926 SeverityError DiagnosticSeverity = 1 3927 /** 3928 * Reports a warning. 3929 */ 3930 3931 SeverityWarning DiagnosticSeverity = 2 3932 /** 3933 * Reports an information. 3934 */ 3935 3936 SeverityInformation DiagnosticSeverity = 3 3937 /** 3938 * Reports a hint. 3939 */ 3940 3941 SeverityHint DiagnosticSeverity = 4 3942 /** 3943 * Unused or unnecessary code. 3944 * 3945 * Clients are allowed to render diagnostics with this tag faded out instead of having 3946 * an error squiggle. 3947 */ 3948 3949 Unnecessary DiagnosticTag = 1 3950 /** 3951 * Deprecated or obsolete code. 3952 * 3953 * Clients are allowed to rendered diagnostics with this tag strike through. 3954 */ 3955 3956 Deprecated DiagnosticTag = 2 3957 /** 3958 * A textual occurrence. 3959 */ 3960 3961 Text DocumentHighlightKind = 1 3962 /** 3963 * Read-access of a symbol, like reading a variable. 3964 */ 3965 3966 Read DocumentHighlightKind = 2 3967 /** 3968 * Write-access of a symbol, like writing to a variable. 3969 */ 3970 3971 Write DocumentHighlightKind = 3 3972 /** 3973 * Applying the workspace change is simply aborted if one of the changes provided 3974 * fails. All operations executed before the failing operation stay executed. 3975 */ 3976 3977 Abort FailureHandlingKind = "abort" 3978 /** 3979 * All operations are executed transactional. That means they either all 3980 * succeed or no changes at all are applied to the workspace. 3981 */ 3982 3983 Transactional FailureHandlingKind = "transactional" 3984 /** 3985 * If the workspace edit contains only textual file changes they are executed transactional. 3986 * If resource changes (create, rename or delete file) are part of the change the failure 3987 * handling startegy is abort. 3988 */ 3989 3990 TextOnlyTransactional FailureHandlingKind = "textOnlyTransactional" 3991 /** 3992 * The client tries to undo the operations already executed. But there is no 3993 * guarantee that this is succeeding. 3994 */ 3995 3996 Undo FailureHandlingKind = "undo" 3997 /** 3998 * The file got created. 3999 */ 4000 4001 Created FileChangeType = 1 4002 /** 4003 * The file got changed. 4004 */ 4005 4006 Changed FileChangeType = 2 4007 /** 4008 * The file got deleted. 4009 */ 4010 4011 Deleted FileChangeType = 3 4012 /** 4013 * Folding range for a comment 4014 */ 4015 Comment FoldingRangeKind = "comment" 4016 /** 4017 * Folding range for a imports or includes 4018 */ 4019 Imports FoldingRangeKind = "imports" 4020 /** 4021 * Folding range for a region (e.g. `#region`) 4022 */ 4023 Region FoldingRangeKind = "region" 4024 /** 4025 * If the protocol version provided by the client can't be handled by the server. 4026 * @deprecated This initialize error got replaced by client capabilities. There is 4027 * no version handshake in version 3.0x 4028 */ 4029 4030 UnknownProtocolVersion InitializeError = 1 4031 /** 4032 * The primary text to be inserted is treated as a plain string. 4033 */ 4034 4035 PlainTextTextFormat InsertTextFormat = 1 4036 /** 4037 * The primary text to be inserted is treated as a snippet. 4038 * 4039 * A snippet can define tab stops and placeholders with `$1`, `$2` 4040 * and `${3:foo}`. `$0` defines the final tab stop, it defaults to 4041 * the end of the snippet. Placeholders with equal identifiers are linked, 4042 * that is typing in one will update others too. 4043 * 4044 * See also: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#snippet_syntax 4045 */ 4046 4047 SnippetTextFormat InsertTextFormat = 2 4048 /** 4049 * Plain text is supported as a content format 4050 */ 4051 4052 PlainText MarkupKind = "plaintext" 4053 /** 4054 * Markdown is supported as a content format 4055 */ 4056 4057 Markdown MarkupKind = "markdown" 4058 /** 4059 * An error message. 4060 */ 4061 4062 Error MessageType = 1 4063 /** 4064 * A warning message. 4065 */ 4066 4067 Warning MessageType = 2 4068 /** 4069 * An information message. 4070 */ 4071 4072 Info MessageType = 3 4073 /** 4074 * A log message. 4075 */ 4076 4077 Log MessageType = 4 4078 /** 4079 * Supports creating new files and folders. 4080 */ 4081 4082 Create ResourceOperationKind = "create" 4083 /** 4084 * Supports renaming existing files and folders. 4085 */ 4086 4087 Rename ResourceOperationKind = "rename" 4088 /** 4089 * Supports deleting existing files and folders. 4090 */ 4091 4092 Delete ResourceOperationKind = "delete" 4093 /** 4094 * Signature help was invoked manually by the user or by a command. 4095 */ 4096 4097 SigInvoked SignatureHelpTriggerKind = 1 4098 /** 4099 * Signature help was triggered by a trigger character. 4100 */ 4101 4102 SigTriggerCharacter SignatureHelpTriggerKind = 2 4103 /** 4104 * Signature help was triggered by the cursor moving or by the document content changing. 4105 */ 4106 4107 SigContentChange SignatureHelpTriggerKind = 3 4108 File SymbolKind = 1 4109 Module SymbolKind = 2 4110 Namespace SymbolKind = 3 4111 Package SymbolKind = 4 4112 Class SymbolKind = 5 4113 Method SymbolKind = 6 4114 Property SymbolKind = 7 4115 Field SymbolKind = 8 4116 Constructor SymbolKind = 9 4117 Enum SymbolKind = 10 4118 Interface SymbolKind = 11 4119 Function SymbolKind = 12 4120 Variable SymbolKind = 13 4121 Constant SymbolKind = 14 4122 String SymbolKind = 15 4123 Number SymbolKind = 16 4124 Boolean SymbolKind = 17 4125 Array SymbolKind = 18 4126 Object SymbolKind = 19 4127 Key SymbolKind = 20 4128 Null SymbolKind = 21 4129 EnumMember SymbolKind = 22 4130 Struct SymbolKind = 23 4131 Event SymbolKind = 24 4132 Operator SymbolKind = 25 4133 TypeParameter SymbolKind = 26 4134 /** 4135 * Render a symbol as obsolete, usually using a strike-out. 4136 */ 4137 4138 DeprecatedSymbol SymbolTag = 1 4139 /** 4140 * Manually triggered, e.g. by the user pressing save, by starting debugging, 4141 * or by an API call. 4142 */ 4143 4144 Manual TextDocumentSaveReason = 1 4145 /** 4146 * Automatic after a delay. 4147 */ 4148 4149 AfterDelay TextDocumentSaveReason = 2 4150 /** 4151 * When the editor lost focus. 4152 */ 4153 4154 FocusOut TextDocumentSaveReason = 3 4155 /** 4156 * Documents should not be synced at all. 4157 */ 4158 4159 None TextDocumentSyncKind = 0 4160 /** 4161 * Documents are synced by always sending the full content 4162 * of the document. 4163 */ 4164 4165 Full TextDocumentSyncKind = 1 4166 /** 4167 * Documents are synced by sending the full content on open. 4168 * After that only incremental updates to the document are 4169 * send. 4170 */ 4171 4172 Incremental TextDocumentSyncKind = 2 4173 /** 4174 * Interested in create events. 4175 */ 4176 4177 WatchCreate WatchKind = 1 4178 /** 4179 * Interested in change events 4180 */ 4181 4182 WatchChange WatchKind = 2 4183 /** 4184 * Interested in delete events 4185 */ 4186 4187 WatchDelete WatchKind = 4 4188 ) 4189 4190 // Types created to name formal parameters and embedded structs 4191 type ParamConfiguration struct { 4192 ConfigurationParams 4193 PartialResultParams 4194 } 4195 type ParamInitialize struct { 4196 InitializeParams 4197 WorkDoneProgressParams 4198 } 4199 type WorkspaceGn struct { 4200 WorkspaceFolders WorkspaceFoldersGn `json:"workspaceFolders,omitempty"` 4201 } 4202 type WorkspaceFoldersGn struct { 4203 /** 4204 * The Server has support for workspace folders 4205 */ 4206 Supported bool `json:"supported,omitempty"` 4207 4208 /** 4209 * Whether the server wants to receive workspace folder 4210 * change notifications. 4211 * 4212 * If a strings is provided the string is treated as a ID 4213 * under which the notification is registed on the client 4214 * side. The ID can be used to unregister for these events 4215 * using the `client/unregisterCapability` request. 4216 */ 4217 ChangeNotifications string/*string | boolean*/ `json:"changeNotifications,omitempty"` 4218 }