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