github.com/jhump/golang-x-tools@v0.0.0-20220218190644-4958d6d39439/internal/lsp/protocol/tsprotocol.go (about) 1 // Copyright 2019 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 // Package protocol contains data types and code for LSP jsonrpcs 6 // generated automatically from vscode-languageserver-node 7 // commit: f17727af04704c0e2ede73dfdbeb463156e94561 8 // last fetched Thu Feb 10 2022 14:34:11 GMT-0700 (Mountain Standard Time) 9 package protocol 10 11 // Code generated (see typescript/README.md) DO NOT EDIT. 12 13 import "encoding/json" 14 15 /** 16 * A special text edit with an additional change annotation. 17 * 18 * @since 3.16.0. 19 */ 20 type AnnotatedTextEdit struct { 21 /** 22 * The actual identifier of the change annotation 23 */ 24 AnnotationID ChangeAnnotationIdentifier `json:"annotationId"` 25 TextEdit 26 } 27 28 /** 29 * The parameters passed via a apply workspace edit request. 30 */ 31 type ApplyWorkspaceEditParams struct { 32 /** 33 * An optional label of the workspace edit. This label is 34 * presented in the user interface for example on an undo 35 * stack to undo the workspace edit. 36 */ 37 Label string `json:"label,omitempty"` 38 /** 39 * The edits to apply. 40 */ 41 Edit WorkspaceEdit `json:"edit"` 42 } 43 44 /** 45 * The result returned from the apply workspace edit request. 46 * 47 * @since 3.17 renamed from ApplyWorkspaceEditResponse 48 */ 49 type ApplyWorkspaceEditResult struct { 50 /** 51 * Indicates whether the edit was applied or not. 52 */ 53 Applied bool `json:"applied"` 54 /** 55 * An optional textual description for why the edit was not applied. 56 * This may be used by the server for diagnostic logging or to provide 57 * a suitable error for a request that triggered the edit. 58 */ 59 FailureReason string `json:"failureReason,omitempty"` 60 /** 61 * Depending on the client's failure handling strategy `failedChange` might 62 * contain the index of the change that failed. This property is only available 63 * if the client signals a `failureHandlingStrategy` in its client capabilities. 64 */ 65 FailedChange uint32 `json:"failedChange,omitempty"` 66 } 67 68 /** 69 * @since 3.16.0 70 */ 71 type CallHierarchyClientCapabilities struct { 72 /** 73 * Whether implementation supports dynamic registration. If this is set to `true` 74 * the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` 75 * return value for the corresponding server capability as well. 76 */ 77 DynamicRegistration bool `json:"dynamicRegistration,omitempty"` 78 } 79 80 /** 81 * Represents an incoming call, e.g. a caller of a method or constructor. 82 * 83 * @since 3.16.0 84 */ 85 type CallHierarchyIncomingCall struct { 86 /** 87 * The item that makes the call. 88 */ 89 From CallHierarchyItem `json:"from"` 90 /** 91 * The ranges at which the calls appear. This is relative to the caller 92 * denoted by [`this.from`](#CallHierarchyIncomingCall.from). 93 */ 94 FromRanges []Range `json:"fromRanges"` 95 } 96 97 /** 98 * The parameter of a `callHierarchy/incomingCalls` request. 99 * 100 * @since 3.16.0 101 */ 102 type CallHierarchyIncomingCallsParams struct { 103 Item CallHierarchyItem `json:"item"` 104 WorkDoneProgressParams 105 PartialResultParams 106 } 107 108 /** 109 * Represents programming constructs like functions or constructors in the context 110 * of call hierarchy. 111 * 112 * @since 3.16.0 113 */ 114 type CallHierarchyItem struct { 115 /** 116 * The name of this item. 117 */ 118 Name string `json:"name"` 119 /** 120 * The kind of this item. 121 */ 122 Kind SymbolKind `json:"kind"` 123 /** 124 * Tags for this item. 125 */ 126 Tags []SymbolTag `json:"tags,omitempty"` 127 /** 128 * More detail for this item, e.g. the signature of a function. 129 */ 130 Detail string `json:"detail,omitempty"` 131 /** 132 * The resource identifier of this item. 133 */ 134 URI DocumentURI `json:"uri"` 135 /** 136 * The range enclosing this symbol not including leading/trailing whitespace but everything else, e.g. comments and code. 137 */ 138 Range Range `json:"range"` 139 /** 140 * The range that should be selected and revealed when this symbol is being picked, e.g. the name of a function. 141 * Must be contained by the [`range`](#CallHierarchyItem.range). 142 */ 143 SelectionRange Range `json:"selectionRange"` 144 /** 145 * A data entry field that is preserved between a call hierarchy prepare and 146 * incoming calls or outgoing calls requests. 147 */ 148 Data LSPAny `json:"data,omitempty"` 149 } 150 151 /** 152 * Call hierarchy options used during static registration. 153 * 154 * @since 3.16.0 155 */ 156 type CallHierarchyOptions struct { 157 WorkDoneProgressOptions 158 } 159 160 /** 161 * Represents an outgoing call, e.g. calling a getter from a method or a method from a constructor etc. 162 * 163 * @since 3.16.0 164 */ 165 type CallHierarchyOutgoingCall struct { 166 /** 167 * The item that is called. 168 */ 169 To CallHierarchyItem `json:"to"` 170 /** 171 * The range at which this item is called. This is the range relative to the caller, e.g the item 172 * passed to [`provideCallHierarchyOutgoingCalls`](#CallHierarchyItemProvider.provideCallHierarchyOutgoingCalls) 173 * and not [`this.to`](#CallHierarchyOutgoingCall.to). 174 */ 175 FromRanges []Range `json:"fromRanges"` 176 } 177 178 /** 179 * The parameter of a `callHierarchy/outgoingCalls` request. 180 * 181 * @since 3.16.0 182 */ 183 type CallHierarchyOutgoingCallsParams struct { 184 Item CallHierarchyItem `json:"item"` 185 WorkDoneProgressParams 186 PartialResultParams 187 } 188 189 /** 190 * The parameter of a `textDocument/prepareCallHierarchy` request. 191 * 192 * @since 3.16.0 193 */ 194 type CallHierarchyPrepareParams struct { 195 TextDocumentPositionParams 196 WorkDoneProgressParams 197 } 198 199 /** 200 * Call hierarchy options used during static or dynamic registration. 201 * 202 * @since 3.16.0 203 */ 204 type CallHierarchyRegistrationOptions struct { 205 TextDocumentRegistrationOptions 206 CallHierarchyOptions 207 StaticRegistrationOptions 208 } 209 210 type CancelParams struct { 211 /** 212 * The request id to cancel. 213 */ 214 ID interface{} /*number | string*/ `json:"id"` 215 } 216 217 /** 218 * Additional information that describes document changes. 219 * 220 * @since 3.16.0 221 */ 222 type ChangeAnnotation struct { 223 /** 224 * A human-readable string describing the actual change. The string 225 * is rendered prominent in the user interface. 226 */ 227 Label string `json:"label"` 228 /** 229 * A flag which indicates that user confirmation is needed 230 * before applying the change. 231 */ 232 NeedsConfirmation bool `json:"needsConfirmation,omitempty"` 233 /** 234 * A human-readable string which is rendered less prominent in 235 * the user interface. 236 */ 237 Description string `json:"description,omitempty"` 238 } 239 240 /** 241 * An identifier to refer to a change annotation stored with a workspace edit. 242 */ 243 type ChangeAnnotationIdentifier = string 244 245 type ClientCapabilities struct { 246 /** 247 * The workspace client capabilities 248 */ 249 Workspace Workspace3Gn `json:"workspace,omitempty"` 250 /** 251 * Text document specific client capabilities. 252 */ 253 TextDocument TextDocumentClientCapabilities `json:"textDocument,omitempty"` 254 /** 255 * Window specific client capabilities. 256 */ 257 Window struct { 258 /** 259 * Whether client supports server initiated progress using the 260 * `window/workDoneProgress/create` request. 261 * 262 * Since 3.15.0 263 */ 264 WorkDoneProgress bool `json:"workDoneProgress,omitempty"` 265 /** 266 * Capabilities specific to the showMessage request. 267 * 268 * @since 3.16.0 269 */ 270 ShowMessage ShowMessageRequestClientCapabilities `json:"showMessage,omitempty"` 271 /** 272 * Capabilities specific to the showDocument request. 273 * 274 * @since 3.16.0 275 */ 276 ShowDocument ShowDocumentClientCapabilities `json:"showDocument,omitempty"` 277 } `json:"window,omitempty"` 278 /** 279 * General client capabilities. 280 * 281 * @since 3.16.0 282 */ 283 General GeneralClientCapabilities `json:"general,omitempty"` 284 /** 285 * Experimental client capabilities. 286 */ 287 Experimental interface{} `json:"experimental,omitempty"` 288 } 289 290 /** 291 * A code action represents a change that can be performed in code, e.g. to fix a problem or 292 * to refactor code. 293 * 294 * A CodeAction must set either `edit` and/or a `command`. If both are supplied, the `edit` is applied first, then the `command` is executed. 295 */ 296 type CodeAction struct { 297 /** 298 * A short, human-readable, title for this code action. 299 */ 300 Title string `json:"title"` 301 /** 302 * The kind of the code action. 303 * 304 * Used to filter code actions. 305 */ 306 Kind CodeActionKind `json:"kind,omitempty"` 307 /** 308 * The diagnostics that this code action resolves. 309 */ 310 Diagnostics []Diagnostic `json:"diagnostics,omitempty"` 311 /** 312 * Marks this as a preferred action. Preferred actions are used by the `auto fix` command and can be targeted 313 * by keybindings. 314 * 315 * A quick fix should be marked preferred if it properly addresses the underlying error. 316 * A refactoring should be marked preferred if it is the most reasonable choice of actions to take. 317 * 318 * @since 3.15.0 319 */ 320 IsPreferred bool `json:"isPreferred,omitempty"` 321 /** 322 * Marks that the code action cannot currently be applied. 323 * 324 * Clients should follow the following guidelines regarding disabled code actions: 325 * 326 * - Disabled code actions are not shown in automatic [lightbulb](https://code.visualstudio.com/docs/editor/editingevolved#_code-action) 327 * code action menu. 328 * 329 * - Disabled actions are shown as faded out in the code action menu when the user request a more specific type 330 * of code action, such as refactorings. 331 * 332 * - If the user has a [keybinding](https://code.visualstudio.com/docs/editor/refactoring#_keybindings-for-code-actions) 333 * that auto applies a code action and only a disabled code actions are returned, the client should show the user an 334 * error message with `reason` in the editor. 335 * 336 * @since 3.16.0 337 */ 338 Disabled *struct { 339 /** 340 * Human readable description of why the code action is currently disabled. 341 * 342 * This is displayed in the code actions UI. 343 */ 344 Reason string `json:"reason"` 345 } `json:"disabled,omitempty"` 346 /** 347 * The workspace edit this code action performs. 348 */ 349 Edit WorkspaceEdit `json:"edit,omitempty"` 350 /** 351 * A command this code action executes. If a code action 352 * provides a edit and a command, first the edit is 353 * executed and then the command. 354 */ 355 Command *Command `json:"command,omitempty"` 356 /** 357 * A data entry field that is preserved on a code action between 358 * a `textDocument/codeAction` and a `codeAction/resolve` request. 359 * 360 * @since 3.16.0 361 */ 362 Data LSPAny `json:"data,omitempty"` 363 } 364 365 /** 366 * The Client Capabilities of a [CodeActionRequest](#CodeActionRequest). 367 */ 368 type CodeActionClientCapabilities struct { 369 /** 370 * Whether code action supports dynamic registration. 371 */ 372 DynamicRegistration bool `json:"dynamicRegistration,omitempty"` 373 /** 374 * The client support code action literals of type `CodeAction` as a valid 375 * response of the `textDocument/codeAction` request. If the property is not 376 * set the request can only return `Command` literals. 377 * 378 * @since 3.8.0 379 */ 380 CodeActionLiteralSupport struct { 381 /** 382 * The code action kind is support with the following value 383 * set. 384 */ 385 CodeActionKind struct { 386 /** 387 * The code action kind values the client supports. When this 388 * property exists the client also guarantees that it will 389 * handle values outside its set gracefully and falls back 390 * to a default value when unknown. 391 */ 392 ValueSet []CodeActionKind `json:"valueSet"` 393 } `json:"codeActionKind"` 394 } `json:"codeActionLiteralSupport,omitempty"` 395 /** 396 * Whether code action supports the `isPreferred` property. 397 * 398 * @since 3.15.0 399 */ 400 IsPreferredSupport bool `json:"isPreferredSupport,omitempty"` 401 /** 402 * Whether code action supports the `disabled` property. 403 * 404 * @since 3.16.0 405 */ 406 DisabledSupport bool `json:"disabledSupport,omitempty"` 407 /** 408 * Whether code action supports the `data` property which is 409 * preserved between a `textDocument/codeAction` and a 410 * `codeAction/resolve` request. 411 * 412 * @since 3.16.0 413 */ 414 DataSupport bool `json:"dataSupport,omitempty"` 415 /** 416 * Whether the client support resolving additional code action 417 * properties via a separate `codeAction/resolve` request. 418 * 419 * @since 3.16.0 420 */ 421 ResolveSupport struct { 422 /** 423 * The properties that a client can resolve lazily. 424 */ 425 Properties []string `json:"properties"` 426 } `json:"resolveSupport,omitempty"` 427 /** 428 * Whether th client honors the change annotations in 429 * text edits and resource operations returned via the 430 * `CodeAction#edit` property by for example presenting 431 * the workspace edit in the user interface and asking 432 * for confirmation. 433 * 434 * @since 3.16.0 435 */ 436 HonorsChangeAnnotations bool `json:"honorsChangeAnnotations,omitempty"` 437 } 438 439 /** 440 * Contains additional diagnostic information about the context in which 441 * a [code action](#CodeActionProvider.provideCodeActions) is run. 442 */ 443 type CodeActionContext struct { 444 /** 445 * An array of diagnostics known on the client side overlapping the range provided to the 446 * `textDocument/codeAction` request. They are provided so that the server knows which 447 * errors are currently presented to the user for the given range. There is no guarantee 448 * that these accurately reflect the error state of the resource. The primary parameter 449 * to compute code actions is the provided range. 450 */ 451 Diagnostics []Diagnostic `json:"diagnostics"` 452 /** 453 * Requested kind of actions to return. 454 * 455 * Actions not of this kind are filtered out by the client before being shown. So servers 456 * can omit computing them. 457 */ 458 Only []CodeActionKind `json:"only,omitempty"` 459 /** 460 * The reason why code actions were requested. 461 * 462 * @since 3.17.0 463 */ 464 TriggerKind CodeActionTriggerKind `json:"triggerKind,omitempty"` 465 } 466 467 /** 468 * A set of predefined code action kinds 469 */ 470 type CodeActionKind string 471 472 /** 473 * Provider options for a [CodeActionRequest](#CodeActionRequest). 474 */ 475 type CodeActionOptions struct { 476 /** 477 * CodeActionKinds that this server may return. 478 * 479 * The list of kinds may be generic, such as `CodeActionKind.Refactor`, or the server 480 * may list out every specific kind they provide. 481 */ 482 CodeActionKinds []CodeActionKind `json:"codeActionKinds,omitempty"` 483 /** 484 * The server provides support to resolve additional 485 * information for a code action. 486 * 487 * @since 3.16.0 488 */ 489 ResolveProvider bool `json:"resolveProvider,omitempty"` 490 WorkDoneProgressOptions 491 } 492 493 /** 494 * The parameters of a [CodeActionRequest](#CodeActionRequest). 495 */ 496 type CodeActionParams struct { 497 /** 498 * The document in which the command was invoked. 499 */ 500 TextDocument TextDocumentIdentifier `json:"textDocument"` 501 /** 502 * The range for which the command was invoked. 503 */ 504 Range Range `json:"range"` 505 /** 506 * Context carrying additional information. 507 */ 508 Context CodeActionContext `json:"context"` 509 WorkDoneProgressParams 510 PartialResultParams 511 } 512 513 /** 514 * The reason why code actions were requested. 515 * 516 * @since 3.17.0 - proposed state 517 */ 518 type CodeActionTriggerKind float64 519 520 /** 521 * Structure to capture a description for an error code. 522 * 523 * @since 3.16.0 524 */ 525 type CodeDescription struct { 526 /** 527 * An URI to open with more information about the diagnostic error. 528 */ 529 Href URI `json:"href"` 530 } 531 532 /** 533 * A code lens represents a [command](#Command) that should be shown along with 534 * source text, like the number of references, a way to run tests, etc. 535 * 536 * A code lens is _unresolved_ when no command is associated to it. For performance 537 * reasons the creation of a code lens and resolving should be done to two stages. 538 */ 539 type CodeLens struct { 540 /** 541 * The range in which this code lens is valid. Should only span a single line. 542 */ 543 Range Range `json:"range"` 544 /** 545 * The command this code lens represents. 546 */ 547 Command Command `json:"command,omitempty"` 548 /** 549 * A data entry field that is preserved on a code lens item between 550 * a [CodeLensRequest](#CodeLensRequest) and a [CodeLensResolveRequest] 551 * (#CodeLensResolveRequest) 552 */ 553 Data LSPAny `json:"data,omitempty"` 554 } 555 556 /** 557 * The client capabilities of a [CodeLensRequest](#CodeLensRequest). 558 */ 559 type CodeLensClientCapabilities struct { 560 /** 561 * Whether code lens supports dynamic registration. 562 */ 563 DynamicRegistration bool `json:"dynamicRegistration,omitempty"` 564 } 565 566 /** 567 * Code Lens provider options of a [CodeLensRequest](#CodeLensRequest). 568 */ 569 type CodeLensOptions struct { 570 /** 571 * Code lens has a resolve provider as well. 572 */ 573 ResolveProvider bool `json:"resolveProvider,omitempty"` 574 WorkDoneProgressOptions 575 } 576 577 /** 578 * The parameters of a [CodeLensRequest](#CodeLensRequest). 579 */ 580 type CodeLensParams struct { 581 /** 582 * The document to request code lens for. 583 */ 584 TextDocument TextDocumentIdentifier `json:"textDocument"` 585 WorkDoneProgressParams 586 PartialResultParams 587 } 588 589 /** 590 * @since 3.16.0 591 */ 592 type CodeLensWorkspaceClientCapabilities struct { 593 /** 594 * Whether the client implementation supports a refresh request sent from the 595 * server to the client. 596 * 597 * Note that this event is global and will force the client to refresh all 598 * code lenses currently shown. It should be used with absolute care and is 599 * useful for situation where a server for example detect a project wide 600 * change that requires such a calculation. 601 */ 602 RefreshSupport bool `json:"refreshSupport,omitempty"` 603 } 604 605 /** 606 * Represents a color in RGBA space. 607 */ 608 type Color struct { 609 /** 610 * The red component of this color in the range [0-1]. 611 */ 612 Red Decimal `json:"red"` 613 /** 614 * The green component of this color in the range [0-1]. 615 */ 616 Green Decimal `json:"green"` 617 /** 618 * The blue component of this color in the range [0-1]. 619 */ 620 Blue Decimal `json:"blue"` 621 /** 622 * The alpha component of this color in the range [0-1]. 623 */ 624 Alpha Decimal `json:"alpha"` 625 } 626 627 /** 628 * Represents a color range from a document. 629 */ 630 type ColorInformation struct { 631 /** 632 * The range in the document where this color appears. 633 */ 634 Range Range `json:"range"` 635 /** 636 * The actual color value for this color range. 637 */ 638 Color Color `json:"color"` 639 } 640 641 type ColorPresentation struct { 642 /** 643 * The label of this color presentation. It will be shown on the color 644 * picker header. By default this is also the text that is inserted when selecting 645 * this color presentation. 646 */ 647 Label string `json:"label"` 648 /** 649 * An [edit](#TextEdit) which is applied to a document when selecting 650 * this presentation for the color. When `falsy` the [label](#ColorPresentation.label) 651 * is used. 652 */ 653 TextEdit TextEdit `json:"textEdit,omitempty"` 654 /** 655 * An optional array of additional [text edits](#TextEdit) that are applied when 656 * selecting this color presentation. Edits must not overlap with the main [edit](#ColorPresentation.textEdit) nor with themselves. 657 */ 658 AdditionalTextEdits []TextEdit `json:"additionalTextEdits,omitempty"` 659 } 660 661 /** 662 * Parameters for a [ColorPresentationRequest](#ColorPresentationRequest). 663 */ 664 type ColorPresentationParams struct { 665 /** 666 * The text document. 667 */ 668 TextDocument TextDocumentIdentifier `json:"textDocument"` 669 /** 670 * The color to request presentations for. 671 */ 672 Color Color `json:"color"` 673 /** 674 * The range where the color would be inserted. Serves as a context. 675 */ 676 Range Range `json:"range"` 677 WorkDoneProgressParams 678 PartialResultParams 679 } 680 681 /** 682 * Represents a reference to a command. Provides a title which 683 * will be used to represent a command in the UI and, optionally, 684 * an array of arguments which will be passed to the command handler 685 * function when invoked. 686 */ 687 type Command struct { 688 /** 689 * Title of the command, like `save`. 690 */ 691 Title string `json:"title"` 692 /** 693 * The identifier of the actual command handler. 694 */ 695 Command string `json:"command"` 696 /** 697 * Arguments that the command handler should be 698 * invoked with. 699 */ 700 Arguments []json.RawMessage `json:"arguments,omitempty"` 701 } 702 703 /** 704 * Completion client capabilities 705 */ 706 type CompletionClientCapabilities struct { 707 /** 708 * Whether completion supports dynamic registration. 709 */ 710 DynamicRegistration bool `json:"dynamicRegistration,omitempty"` 711 /** 712 * The client supports the following `CompletionItem` specific 713 * capabilities. 714 */ 715 CompletionItem struct { 716 /** 717 * Client supports snippets as insert text. 718 * 719 * A snippet can define tab stops and placeholders with `$1`, `$2` 720 * and `${3:foo}`. `$0` defines the final tab stop, it defaults to 721 * the end of the snippet. Placeholders with equal identifiers are linked, 722 * that is typing in one will update others too. 723 */ 724 SnippetSupport bool `json:"snippetSupport,omitempty"` 725 /** 726 * Client supports commit characters on a completion item. 727 */ 728 CommitCharactersSupport bool `json:"commitCharactersSupport,omitempty"` 729 /** 730 * Client supports the follow content formats for the documentation 731 * property. The order describes the preferred format of the client. 732 */ 733 DocumentationFormat []MarkupKind `json:"documentationFormat,omitempty"` 734 /** 735 * Client supports the deprecated property on a completion item. 736 */ 737 DeprecatedSupport bool `json:"deprecatedSupport,omitempty"` 738 /** 739 * Client supports the preselect property on a completion item. 740 */ 741 PreselectSupport bool `json:"preselectSupport,omitempty"` 742 /** 743 * Client supports to kee 744 */ 745 746 /** 747 * Client supports the tag property on a completion item. Clients supporting 748 * tags have to handle unknown tags gracefully. Clients especially need to 749 * preserve unknown tags when sending a completion item back to the server in 750 * a resolve call. 751 * 752 * @since 3.15.0 753 */ 754 TagSupport struct { 755 /** 756 * The tags supported by the client. 757 */ 758 ValueSet []CompletionItemTag `json:"valueSet"` 759 } `json:"tagSupport,omitempty"` 760 /** 761 * Client support insert replace edit to control different behavior if a 762 * completion item is inserted in the text or should replace text. 763 * 764 * @since 3.16.0 765 */ 766 InsertReplaceSupport bool `json:"insertReplaceSupport,omitempty"` 767 /** 768 * Indicates which properties a client can resolve lazily on a completion 769 * item. Before version 3.16.0 only the predefined properties `documentation` 770 * and `details` could be resolved lazily. 771 * 772 * @since 3.16.0 773 */ 774 ResolveSupport struct { 775 /** 776 * The properties that a client can resolve lazily. 777 */ 778 Properties []string `json:"properties"` 779 } `json:"resolveSupport,omitempty"` 780 /** 781 * The client supports the `insertTextMode` property on 782 * a completion item to override the whitespace handling mode 783 * as defined by the client (see `insertTextMode`). 784 * 785 * @since 3.16.0 786 */ 787 InsertTextModeSupport struct { 788 ValueSet []InsertTextMode `json:"valueSet"` 789 } `json:"insertTextModeSupport,omitempty"` 790 /** 791 * The client has support for completion item label 792 * details (see also `CompletionItemLabelDetails`). 793 * 794 * @since 3.17.0 - proposed state 795 */ 796 LabelDetailsSupport bool `json:"labelDetailsSupport,omitempty"` 797 } `json:"completionItem,omitempty"` 798 CompletionItemKind struct { 799 /** 800 * The completion item kind values the client supports. When this 801 * property exists the client also guarantees that it will 802 * handle values outside its set gracefully and falls back 803 * to a default value when unknown. 804 * 805 * If this property is not present the client only supports 806 * the completion items kinds from `Text` to `Reference` as defined in 807 * the initial version of the protocol. 808 */ 809 ValueSet []CompletionItemKind `json:"valueSet,omitempty"` 810 } `json:"completionItemKind,omitempty"` 811 /** 812 * Defines how the client handles whitespace and indentation 813 * when accepting a completion item that uses multi line 814 * text in either `insertText` or `textEdit`. 815 * 816 * @since 3.17.0 - proposed state 817 */ 818 InsertTextMode InsertTextMode `json:"insertTextMode,omitempty"` 819 /** 820 * The client supports to send additional context information for a 821 * `textDocument/completion` request. 822 */ 823 ContextSupport bool `json:"contextSupport,omitempty"` 824 /** 825 * The client supports the following `CompletionList` specific 826 * capabilities. 827 * 828 * @since 3.17.0 - proposed state 829 */ 830 CompletionList struct { 831 /** 832 * The client supports the the following itemDefaults on 833 * a completion list. 834 * 835 * The value lists the supported property names of the 836 * `CompletionList.itemDefaults` object. If omitted 837 * no properties are supported. 838 * 839 * @since 3.17.0 - proposed state 840 */ 841 ItemDefaults []string `json:"itemDefaults,omitempty"` 842 } `json:"completionList,omitempty"` 843 } 844 845 /** 846 * Contains additional information about the context in which a completion request is triggered. 847 */ 848 type CompletionContext struct { 849 /** 850 * How the completion was triggered. 851 */ 852 TriggerKind CompletionTriggerKind `json:"triggerKind"` 853 /** 854 * The trigger character (a single character) that has trigger code complete. 855 * Is undefined if `triggerKind !== CompletionTriggerKind.TriggerCharacter` 856 */ 857 TriggerCharacter string `json:"triggerCharacter,omitempty"` 858 } 859 860 /** 861 * A completion item represents a text snippet that is 862 * proposed to complete text that is being typed. 863 */ 864 type CompletionItem struct { 865 /** 866 * The label of this completion item. 867 * 868 * The label property is also by default the text that 869 * is inserted when selecting this completion. 870 * 871 * If label details are provided the label itself should 872 * be an unqualified name of the completion item. 873 */ 874 Label string `json:"label"` 875 /** 876 * Additional details for the label 877 * 878 * @since 3.17.0 - proposed state 879 */ 880 LabelDetails CompletionItemLabelDetails `json:"labelDetails,omitempty"` 881 /** 882 * The kind of this completion item. Based of the kind 883 * an icon is chosen by the editor. 884 */ 885 Kind CompletionItemKind `json:"kind,omitempty"` 886 /** 887 * Tags for this completion item. 888 * 889 * @since 3.15.0 890 */ 891 Tags []CompletionItemTag `json:"tags,omitempty"` 892 /** 893 * A human-readable string with additional information 894 * about this item, like type or symbol information. 895 */ 896 Detail string `json:"detail,omitempty"` 897 /** 898 * A human-readable string that represents a doc-comment. 899 */ 900 Documentation string/*string | MarkupContent*/ `json:"documentation,omitempty"` 901 /** 902 * Indicates if this item is deprecated. 903 * @deprecated Use `tags` instead. 904 */ 905 Deprecated bool `json:"deprecated,omitempty"` 906 /** 907 * Select this item when showing. 908 * 909 * *Note* that only one completion item can be selected and that the 910 * tool / client decides which item that is. The rule is that the *first* 911 * item of those that match best is selected. 912 */ 913 Preselect bool `json:"preselect,omitempty"` 914 /** 915 * A string that should be used when comparing this item 916 * with other items. When `falsy` the [label](#CompletionItem.label) 917 * is used. 918 */ 919 SortText string `json:"sortText,omitempty"` 920 /** 921 * A string that should be used when filtering a set of 922 * completion items. When `falsy` the [label](#CompletionItem.label) 923 * is used. 924 */ 925 FilterText string `json:"filterText,omitempty"` 926 /** 927 * A string that should be inserted into a document when selecting 928 * this completion. When `falsy` the [label](#CompletionItem.label) 929 * is used. 930 * 931 * The `insertText` is subject to interpretation by the client side. 932 * Some tools might not take the string literally. For example 933 * VS Code when code complete is requested in this example `con<cursor position>` 934 * and a completion item with an `insertText` of `console` is provided it 935 * will only insert `sole`. Therefore it is recommended to use `textEdit` instead 936 * since it avoids additional client side interpretation. 937 */ 938 InsertText string `json:"insertText,omitempty"` 939 /** 940 * The format of the insert text. The format applies to both the `insertText` property 941 * and the `newText` property of a provided `textEdit`. If omitted defaults to 942 * `InsertTextFormat.PlainText`. 943 * 944 * Please note that the insertTextFormat doesn't apply to `additionalTextEdits`. 945 */ 946 InsertTextFormat InsertTextFormat `json:"insertTextFormat,omitempty"` 947 /** 948 * How whitespace and indentation is handled during completion 949 * item insertion. If ignored the clients default value depends on 950 * the `textDocument.completion.insertTextMode` client capability. 951 * 952 * @since 3.16.0 953 */ 954 InsertTextMode InsertTextMode `json:"insertTextMode,omitempty"` 955 /** 956 * An [edit](#TextEdit) which is applied to a document when selecting 957 * this completion. When an edit is provided the value of 958 * [insertText](#CompletionItem.insertText) is ignored. 959 * 960 * Most editors support two different operation when accepting a completion item. One is to insert a 961 * completion text and the other is to replace an existing text with a completion text. Since this can 962 * usually not predetermined by a server it can report both ranges. Clients need to signal support for 963 * `InsertReplaceEdits` via the `textDocument.completion.insertReplaceSupport` client capability 964 * property. 965 * 966 * *Note 1:* The text edit's range as well as both ranges from a insert replace edit must be a 967 * [single line] and they must contain the position at which completion has been requested. 968 * *Note 2:* If an `InsertReplaceEdit` is returned the edit's insert range must be a prefix of 969 * the edit's replace range, that means it must be contained and starting at the same position. 970 * 971 * @since 3.16.0 additional type `InsertReplaceEdit` 972 */ 973 TextEdit *TextEdit/*TextEdit | InsertReplaceEdit*/ `json:"textEdit,omitempty"` 974 /** 975 * An optional array of additional [text edits](#TextEdit) that are applied when 976 * selecting this completion. Edits must not overlap (including the same insert position) 977 * with the main [edit](#CompletionItem.textEdit) nor with themselves. 978 * 979 * Additional text edits should be used to change text unrelated to the current cursor position 980 * (for example adding an import statement at the top of the file if the completion item will 981 * insert an unqualified type). 982 */ 983 AdditionalTextEdits []TextEdit `json:"additionalTextEdits,omitempty"` 984 /** 985 * An optional set of characters that when pressed while this completion is active will accept it first and 986 * then type that character. *Note* that all commit characters should have `length=1` and that superfluous 987 * characters will be ignored. 988 */ 989 CommitCharacters []string `json:"commitCharacters,omitempty"` 990 /** 991 * An optional [command](#Command) that is executed *after* inserting this completion. *Note* that 992 * additional modifications to the current document should be described with the 993 * [additionalTextEdits](#CompletionItem.additionalTextEdits)-property. 994 */ 995 Command *Command `json:"command,omitempty"` 996 /** 997 * A data entry field that is preserved on a completion item between a 998 * [CompletionRequest](#CompletionRequest) and a [CompletionResolveRequest](#CompletionResolveRequest). 999 */ 1000 Data LSPAny `json:"data,omitempty"` 1001 } 1002 1003 /** 1004 * The kind of a completion entry. 1005 */ 1006 type CompletionItemKind float64 1007 1008 /** 1009 * Additional details for a completion item label. 1010 * 1011 * @since 3.17.0 - proposed state 1012 */ 1013 type CompletionItemLabelDetails struct { 1014 /** 1015 * An optional string which is rendered less prominently directly after {@link CompletionItem.label label}, 1016 * without any spacing. Should be used for function signatures or type annotations. 1017 */ 1018 Detail string `json:"detail,omitempty"` 1019 /** 1020 * An optional string which is rendered less prominently after {@link CompletionItem.detail}. Should be used 1021 * for fully qualified names or file path. 1022 */ 1023 Description string `json:"description,omitempty"` 1024 } 1025 1026 /** 1027 * Completion item tags are extra annotations that tweak the rendering of a completion 1028 * item. 1029 * 1030 * @since 3.15.0 1031 */ 1032 type CompletionItemTag float64 1033 1034 /** 1035 * Represents a collection of [completion items](#CompletionItem) to be presented 1036 * in the editor. 1037 */ 1038 type CompletionList struct { 1039 /** 1040 * This list it not complete. Further typing results in recomputing this list. 1041 */ 1042 IsIncomplete bool `json:"isIncomplete"` 1043 /** 1044 * In many cases the items of an actual completion result share the same 1045 * value for properties like `commitCharacters` or the range of a text 1046 * edit. A completion list can therefore define item defaults which will 1047 * be used if a completion item itself doesn't specify the value. 1048 * 1049 * If a completion list specifies a default value and a completion item 1050 * also specifies a corresponding value the one from the item is used. 1051 * 1052 * Servers are only allowed to return default values if the client 1053 * signals support for this via the `completionList.itemDefaults` 1054 * capability. 1055 * 1056 * @since 3.17.0 - proposed state 1057 */ 1058 ItemDefaults struct { 1059 /** 1060 * A default commit character set. 1061 * 1062 * @since 3.17.0 - proposed state 1063 */ 1064 CommitCharacters []string `json:"commitCharacters,omitempty"` 1065 /** 1066 * A default edit range 1067 * 1068 * @since 3.17.0 - proposed state 1069 */ 1070 EditRange Range/*Range | { insert: Range; replace: Range; }*/ `json:"editRange,omitempty"` 1071 /** 1072 * A default insert text format 1073 * 1074 * @since 3.17.0 - proposed state 1075 */ 1076 InsertTextFormat InsertTextFormat `json:"insertTextFormat,omitempty"` 1077 /** 1078 * A default insert text mode 1079 * 1080 * @since 3.17.0 - proposed state 1081 */ 1082 InsertTextMode InsertTextMode `json:"insertTextMode,omitempty"` 1083 } `json:"itemDefaults,omitempty"` 1084 /** 1085 * The completion items. 1086 */ 1087 Items []CompletionItem `json:"items"` 1088 } 1089 1090 /** 1091 * Completion options. 1092 */ 1093 type CompletionOptions struct { 1094 /** 1095 * Most tools trigger completion request automatically without explicitly requesting 1096 * it using a keyboard shortcut (e.g. Ctrl+Space). Typically they do so when the user 1097 * starts to type an identifier. For example if the user types `c` in a JavaScript file 1098 * code complete will automatically pop up present `console` besides others as a 1099 * completion item. Characters that make up identifiers don't need to be listed here. 1100 * 1101 * If code complete should automatically be trigger on characters not being valid inside 1102 * an identifier (for example `.` in JavaScript) list them in `triggerCharacters`. 1103 */ 1104 TriggerCharacters []string `json:"triggerCharacters,omitempty"` 1105 /** 1106 * The list of all possible characters that commit a completion. This field can be used 1107 * if clients don't support individual commit characters per completion item. See 1108 * `ClientCapabilities.textDocument.completion.completionItem.commitCharactersSupport` 1109 * 1110 * If a server provides both `allCommitCharacters` and commit characters on an individual 1111 * completion item the ones on the completion item win. 1112 * 1113 * @since 3.2.0 1114 */ 1115 AllCommitCharacters []string `json:"allCommitCharacters,omitempty"` 1116 /** 1117 * The server provides support to resolve additional 1118 * information for a completion item. 1119 */ 1120 ResolveProvider bool `json:"resolveProvider,omitempty"` 1121 /** 1122 * The server supports the following `CompletionItem` specific 1123 * capabilities. 1124 * 1125 * @since 3.17.0 - proposed state 1126 */ 1127 CompletionItem struct { 1128 /** 1129 * The server has support for completion item label 1130 * details (see also `CompletionItemLabelDetails`) when 1131 * receiving a completion item in a resolve call. 1132 * 1133 * @since 3.17.0 - proposed state 1134 */ 1135 LabelDetailsSupport bool `json:"labelDetailsSupport,omitempty"` 1136 } `json:"completionItem,omitempty"` 1137 WorkDoneProgressOptions 1138 } 1139 1140 /** 1141 * Completion parameters 1142 */ 1143 type CompletionParams struct { 1144 /** 1145 * The completion context. This is only available it the client specifies 1146 * to send this using the client capability `textDocument.completion.contextSupport === true` 1147 */ 1148 Context CompletionContext `json:"context,omitempty"` 1149 TextDocumentPositionParams 1150 WorkDoneProgressParams 1151 PartialResultParams 1152 } 1153 1154 /** 1155 * How a completion was triggered 1156 */ 1157 type CompletionTriggerKind float64 1158 1159 type ConfigurationClientCapabilities struct { 1160 /** 1161 * The workspace client capabilities 1162 */ 1163 Workspace Workspace4Gn `json:"workspace,omitempty"` 1164 } 1165 1166 type ConfigurationItem struct { 1167 /** 1168 * The scope to get the configuration section for. 1169 */ 1170 ScopeURI string `json:"scopeUri,omitempty"` 1171 /** 1172 * The configuration section asked for. 1173 */ 1174 Section string `json:"section,omitempty"` 1175 } 1176 1177 /** 1178 * The parameters of a configuration request. 1179 */ 1180 type ConfigurationParams struct { 1181 Items []ConfigurationItem `json:"items"` 1182 } 1183 1184 /** 1185 * Create file operation. 1186 */ 1187 type CreateFile struct { 1188 /** 1189 * A create 1190 */ 1191 Kind string `json:"kind"` 1192 /** 1193 * The resource to create. 1194 */ 1195 URI DocumentURI `json:"uri"` 1196 /** 1197 * Additional options 1198 */ 1199 Options CreateFileOptions `json:"options,omitempty"` 1200 ResourceOperation 1201 } 1202 1203 /** 1204 * Options to create a file. 1205 */ 1206 type CreateFileOptions struct { 1207 /** 1208 * Overwrite existing file. Overwrite wins over `ignoreIfExists` 1209 */ 1210 Overwrite bool `json:"overwrite,omitempty"` 1211 /** 1212 * Ignore if exists. 1213 */ 1214 IgnoreIfExists bool `json:"ignoreIfExists,omitempty"` 1215 } 1216 1217 /** 1218 * The parameters sent in file create requests/notifications. 1219 * 1220 * @since 3.16.0 1221 */ 1222 type CreateFilesParams struct { 1223 /** 1224 * An array of all files/folders created in this operation. 1225 */ 1226 Files []FileCreate `json:"files"` 1227 } 1228 1229 /** 1230 * Defines a decimal number. Since decimal numbers are very 1231 * rare in the language server specification we denote the 1232 * exact range with every decimal using the mathematics 1233 * interval notations (e.g. [0, 1] denotes all decimals d with 1234 * 0 <= d <= 1. 1235 */ 1236 type Decimal = float64 1237 1238 /** 1239 * The declaration of a symbol representation as one or many [locations](#Location). 1240 */ 1241 type Declaration = []Location /*Location | Location[]*/ 1242 1243 /** 1244 * @since 3.14.0 1245 */ 1246 type DeclarationClientCapabilities struct { 1247 /** 1248 * Whether declaration supports dynamic registration. If this is set to `true` 1249 * the client supports the new `DeclarationRegistrationOptions` return value 1250 * for the corresponding server capability as well. 1251 */ 1252 DynamicRegistration bool `json:"dynamicRegistration,omitempty"` 1253 /** 1254 * The client supports additional metadata in the form of declaration links. 1255 */ 1256 LinkSupport bool `json:"linkSupport,omitempty"` 1257 } 1258 1259 /** 1260 * Information about where a symbol is declared. 1261 * 1262 * Provides additional metadata over normal [location](#Location) declarations, including the range of 1263 * the declaring symbol. 1264 * 1265 * Servers should prefer returning `DeclarationLink` over `Declaration` if supported 1266 * by the client. 1267 */ 1268 type DeclarationLink = LocationLink 1269 1270 type DeclarationOptions struct { 1271 WorkDoneProgressOptions 1272 } 1273 1274 type DeclarationParams struct { 1275 TextDocumentPositionParams 1276 WorkDoneProgressParams 1277 PartialResultParams 1278 } 1279 1280 type DeclarationRegistrationOptions struct { 1281 DeclarationOptions 1282 TextDocumentRegistrationOptions 1283 StaticRegistrationOptions 1284 } 1285 1286 /** 1287 * The definition of a symbol represented as one or many [locations](#Location). 1288 * For most programming languages there is only one location at which a symbol is 1289 * defined. 1290 * 1291 * Servers should prefer returning `DefinitionLink` over `Definition` if supported 1292 * by the client. 1293 */ 1294 type Definition = []Location /*Location | Location[]*/ 1295 1296 /** 1297 * Client Capabilities for a [DefinitionRequest](#DefinitionRequest). 1298 */ 1299 type DefinitionClientCapabilities struct { 1300 /** 1301 * Whether definition supports dynamic registration. 1302 */ 1303 DynamicRegistration bool `json:"dynamicRegistration,omitempty"` 1304 /** 1305 * The client supports additional metadata in the form of definition links. 1306 * 1307 * @since 3.14.0 1308 */ 1309 LinkSupport bool `json:"linkSupport,omitempty"` 1310 } 1311 1312 /** 1313 * Information about where a symbol is defined. 1314 * 1315 * Provides additional metadata over normal [location](#Location) definitions, including the range of 1316 * the defining symbol 1317 */ 1318 type DefinitionLink = LocationLink 1319 1320 /** 1321 * Server Capabilities for a [DefinitionRequest](#DefinitionRequest). 1322 */ 1323 type DefinitionOptions struct { 1324 WorkDoneProgressOptions 1325 } 1326 1327 /** 1328 * Parameters for a [DefinitionRequest](#DefinitionRequest). 1329 */ 1330 type DefinitionParams struct { 1331 TextDocumentPositionParams 1332 WorkDoneProgressParams 1333 PartialResultParams 1334 } 1335 1336 /** 1337 * Delete file operation 1338 */ 1339 type DeleteFile struct { 1340 /** 1341 * A delete 1342 */ 1343 Kind string `json:"kind"` 1344 /** 1345 * The file to delete. 1346 */ 1347 URI DocumentURI `json:"uri"` 1348 /** 1349 * Delete options. 1350 */ 1351 Options DeleteFileOptions `json:"options,omitempty"` 1352 ResourceOperation 1353 } 1354 1355 /** 1356 * Delete file options 1357 */ 1358 type DeleteFileOptions struct { 1359 /** 1360 * Delete the content recursively if a folder is denoted. 1361 */ 1362 Recursive bool `json:"recursive,omitempty"` 1363 /** 1364 * Ignore the operation if the file doesn't exist. 1365 */ 1366 IgnoreIfNotExists bool `json:"ignoreIfNotExists,omitempty"` 1367 } 1368 1369 /** 1370 * The parameters sent in file delete requests/notifications. 1371 * 1372 * @since 3.16.0 1373 */ 1374 type DeleteFilesParams struct { 1375 /** 1376 * An array of all files/folders deleted in this operation. 1377 */ 1378 Files []FileDelete `json:"files"` 1379 } 1380 1381 /** 1382 * Represents a diagnostic, such as a compiler error or warning. Diagnostic objects 1383 * are only valid in the scope of a resource. 1384 */ 1385 type Diagnostic struct { 1386 /** 1387 * The range at which the message applies 1388 */ 1389 Range Range `json:"range"` 1390 /** 1391 * The diagnostic's severity. Can be omitted. If omitted it is up to the 1392 * client to interpret diagnostics as error, warning, info or hint. 1393 */ 1394 Severity DiagnosticSeverity `json:"severity,omitempty"` 1395 /** 1396 * The diagnostic's code, which usually appear in the user interface. 1397 */ 1398 Code interface{}/*integer | string*/ `json:"code,omitempty"` 1399 /** 1400 * An optional property to describe the error code. 1401 * Requires the code field (above) to be present/not null. 1402 * 1403 * @since 3.16.0 1404 */ 1405 CodeDescription *CodeDescription `json:"codeDescription,omitempty"` 1406 /** 1407 * A human-readable string describing the source of this 1408 * diagnostic, e.g. 'typescript' or 'super lint'. It usually 1409 * appears in the user interface. 1410 */ 1411 Source string `json:"source,omitempty"` 1412 /** 1413 * The diagnostic's message. It usually appears in the user interface 1414 */ 1415 Message string `json:"message"` 1416 /** 1417 * Additional metadata about the diagnostic. 1418 * 1419 * @since 3.15.0 1420 */ 1421 Tags []DiagnosticTag `json:"tags,omitempty"` 1422 /** 1423 * An array of related diagnostic information, e.g. when symbol-names within 1424 * a scope collide all definitions can be marked via this property. 1425 */ 1426 RelatedInformation []DiagnosticRelatedInformation `json:"relatedInformation,omitempty"` 1427 /** 1428 * A data entry field that is preserved between a `textDocument/publishDiagnostics` 1429 * notification and `textDocument/codeAction` request. 1430 * 1431 * @since 3.16.0 1432 */ 1433 Data LSPAny `json:"data,omitempty"` 1434 } 1435 1436 /** 1437 * Represents a related message and source code location for a diagnostic. This should be 1438 * used to point to code locations that cause or related to a diagnostics, e.g when duplicating 1439 * a symbol in a scope. 1440 */ 1441 type DiagnosticRelatedInformation struct { 1442 /** 1443 * The location of this related diagnostic information. 1444 */ 1445 Location Location `json:"location"` 1446 /** 1447 * The message of this related diagnostic information. 1448 */ 1449 Message string `json:"message"` 1450 } 1451 1452 /** 1453 * The diagnostic's severity. 1454 */ 1455 type DiagnosticSeverity float64 1456 1457 /** 1458 * The diagnostic tags. 1459 * 1460 * @since 3.15.0 1461 */ 1462 type DiagnosticTag float64 1463 1464 type DidChangeConfigurationClientCapabilities struct { 1465 /** 1466 * Did change configuration notification supports dynamic registration. 1467 */ 1468 DynamicRegistration bool `json:"dynamicRegistration,omitempty"` 1469 } 1470 1471 /** 1472 * The parameters of a change configuration notification. 1473 */ 1474 type DidChangeConfigurationParams struct { 1475 /** 1476 * The actual changed settings 1477 */ 1478 Settings LSPAny `json:"settings"` 1479 } 1480 1481 type DidChangeNotebookDocumentParams struct { 1482 /** 1483 * The notebook document that did change. The version number points 1484 * to the version after all provided changes have been applied. 1485 */ 1486 NotebookDocument VersionedNotebookDocumentIdentifier `json:"notebookDocument"` 1487 /** 1488 * The actual changes to the notebook document. 1489 * 1490 * The changes describe single state changes to the notebook document. 1491 * So if there are two changes c1 (at array index 0) and c2 (at array 1492 * index 1) for a notebook in state S then c1 moves the notebook from 1493 * S to S' and c2 from S' to S''. So c1 is computed on the state S and 1494 * c2 is computed on the state S'. 1495 * 1496 * To mirror the content of a notebook using change events use the following approach: 1497 * - start with the same initial content 1498 * - apply the 'notebookDocument/didChange' notifications in the order you receive them. 1499 * - apply the `NotebookChangeEvent`s in a single notification in the order 1500 * you receive them. 1501 */ 1502 Changes []NotebookDocumentChangeEvent `json:"changes"` 1503 } 1504 1505 /** 1506 * The change text document notification's parameters. 1507 */ 1508 type DidChangeTextDocumentParams struct { 1509 /** 1510 * The document that did change. The version number points 1511 * to the version after all provided content changes have 1512 * been applied. 1513 */ 1514 TextDocument VersionedTextDocumentIdentifier `json:"textDocument"` 1515 /** 1516 * The actual content changes. The content changes describe single state changes 1517 * to the document. So if there are two content changes c1 (at array index 0) and 1518 * c2 (at array index 1) for a document in state S then c1 moves the document from 1519 * S to S' and c2 from S' to S''. So c1 is computed on the state S and c2 is computed 1520 * on the state S'. 1521 * 1522 * To mirror the content of a document using change events use the following approach: 1523 * - start with the same initial content 1524 * - apply the 'textDocument/didChange' notifications in the order you receive them. 1525 * - apply the `TextDocumentContentChangeEvent`s in a single notification in the order 1526 * you receive them. 1527 */ 1528 ContentChanges []TextDocumentContentChangeEvent `json:"contentChanges"` 1529 } 1530 1531 type DidChangeWatchedFilesClientCapabilities struct { 1532 /** 1533 * Did change watched files notification supports dynamic registration. Please note 1534 * that the current protocol doesn't support static configuration for file changes 1535 * from the server side. 1536 */ 1537 DynamicRegistration bool `json:"dynamicRegistration,omitempty"` 1538 } 1539 1540 /** 1541 * The watched files change notification's parameters. 1542 */ 1543 type DidChangeWatchedFilesParams struct { 1544 /** 1545 * The actual file events. 1546 */ 1547 Changes []FileEvent `json:"changes"` 1548 } 1549 1550 /** 1551 * Describe options to be used when registered for text document change events. 1552 */ 1553 type DidChangeWatchedFilesRegistrationOptions struct { 1554 /** 1555 * The watchers to register. 1556 */ 1557 Watchers []FileSystemWatcher `json:"watchers"` 1558 } 1559 1560 /** 1561 * The parameters of a `workspace/didChangeWorkspaceFolders` notification. 1562 */ 1563 type DidChangeWorkspaceFoldersParams struct { 1564 /** 1565 * The actual workspace folder change event. 1566 */ 1567 Event WorkspaceFoldersChangeEvent `json:"event"` 1568 } 1569 1570 /** 1571 * The params sent in a close notebook document notification. 1572 * 1573 * @since 3.17.0 - proposed state 1574 */ 1575 type DidCloseNotebookDocumentParams struct { 1576 /** 1577 * The notebook document that got opened. 1578 */ 1579 NotebookDocument NotebookDocumentIdentifier `json:"notebookDocument"` 1580 } 1581 1582 /** 1583 * The parameters send in a close text document notification 1584 */ 1585 type DidCloseTextDocumentParams struct { 1586 /** 1587 * The document that was closed. 1588 */ 1589 TextDocument TextDocumentIdentifier `json:"textDocument"` 1590 } 1591 1592 /** 1593 * The params sent in a open notebook document notification. 1594 * 1595 * @since 3.17.0 - proposed state 1596 */ 1597 type DidOpenNotebookDocumentParams struct { 1598 /** 1599 * The notebook document that got opened. 1600 */ 1601 NotebookDocument NotebookDocument `json:"notebookDocument"` 1602 } 1603 1604 /** 1605 * The parameters send in a open text document notification 1606 */ 1607 type DidOpenTextDocumentParams struct { 1608 /** 1609 * The document that was opened. 1610 */ 1611 TextDocument TextDocumentItem `json:"textDocument"` 1612 } 1613 1614 /** 1615 * The parameters send in a save text document notification 1616 */ 1617 type DidSaveTextDocumentParams struct { 1618 /** 1619 * The document that was closed. 1620 */ 1621 TextDocument TextDocumentIdentifier `json:"textDocument"` 1622 /** 1623 * Optional the content when saved. Depends on the includeText value 1624 * when the save notification was requested. 1625 */ 1626 Text *string `json:"text,omitempty"` 1627 } 1628 1629 type DocumentColorClientCapabilities struct { 1630 /** 1631 * Whether implementation supports dynamic registration. If this is set to `true` 1632 * the client supports the new `DocumentColorRegistrationOptions` return value 1633 * for the corresponding server capability as well. 1634 */ 1635 DynamicRegistration bool `json:"dynamicRegistration,omitempty"` 1636 } 1637 1638 type DocumentColorOptions struct { 1639 WorkDoneProgressOptions 1640 } 1641 1642 /** 1643 * Parameters for a [DocumentColorRequest](#DocumentColorRequest). 1644 */ 1645 type DocumentColorParams struct { 1646 /** 1647 * The text document. 1648 */ 1649 TextDocument TextDocumentIdentifier `json:"textDocument"` 1650 WorkDoneProgressParams 1651 PartialResultParams 1652 } 1653 1654 type DocumentColorRegistrationOptions struct { 1655 TextDocumentRegistrationOptions 1656 StaticRegistrationOptions 1657 DocumentColorOptions 1658 } 1659 1660 /** 1661 * Parameters of the document diagnostic request. 1662 * 1663 * @since 3.17.0 - proposed state 1664 */ 1665 type DocumentDiagnosticParams struct { 1666 /** 1667 * The text document. 1668 */ 1669 TextDocument TextDocumentIdentifier `json:"textDocument"` 1670 /** 1671 * The additional identifier provided during registration. 1672 */ 1673 Identifier string `json:"identifier,omitempty"` 1674 /** 1675 * The result id of a previous response if provided. 1676 */ 1677 PreviousResultID string `json:"previousResultId,omitempty"` 1678 WorkDoneProgressParams 1679 PartialResultParams 1680 } 1681 1682 /** 1683 * The result of a document diagnostic pull request. A report can 1684 * either be a full report containing all diagnostics for the 1685 * requested document or a unchanged report indicating that nothing 1686 * has changed in terms of diagnostics in comparison to the last 1687 * pull request. 1688 * 1689 * @since 3.17.0 - proposed state 1690 */ 1691 type DocumentDiagnosticReport = interface{} /*RelatedFullDocumentDiagnosticReport | RelatedUnchangedDocumentDiagnosticReport*/ 1692 1693 /** 1694 * A document filter describes a top level text document or 1695 * a notebook cell document. 1696 * 1697 * @since 3.17.0 - proposed support for NotebookCellTextDocumentFilter. 1698 */ 1699 type DocumentFilter = interface{} /*TextDocumentFilter | NotebookCellTextDocumentFilter*/ 1700 1701 /** 1702 * Client capabilities of a [DocumentFormattingRequest](#DocumentFormattingRequest). 1703 */ 1704 type DocumentFormattingClientCapabilities struct { 1705 /** 1706 * Whether formatting supports dynamic registration. 1707 */ 1708 DynamicRegistration bool `json:"dynamicRegistration,omitempty"` 1709 } 1710 1711 /** 1712 * Provider options for a [DocumentFormattingRequest](#DocumentFormattingRequest). 1713 */ 1714 type DocumentFormattingOptions struct { 1715 WorkDoneProgressOptions 1716 } 1717 1718 /** 1719 * The parameters of a [DocumentFormattingRequest](#DocumentFormattingRequest). 1720 */ 1721 type DocumentFormattingParams struct { 1722 /** 1723 * The document to format. 1724 */ 1725 TextDocument TextDocumentIdentifier `json:"textDocument"` 1726 /** 1727 * The format options 1728 */ 1729 Options FormattingOptions `json:"options"` 1730 WorkDoneProgressParams 1731 } 1732 1733 /** 1734 * A document highlight is a range inside a text document which deserves 1735 * special attention. Usually a document highlight is visualized by changing 1736 * the background color of its range. 1737 */ 1738 type DocumentHighlight struct { 1739 /** 1740 * The range this highlight applies to. 1741 */ 1742 Range Range `json:"range"` 1743 /** 1744 * The highlight kind, default is [text](#DocumentHighlightKind.Text). 1745 */ 1746 Kind DocumentHighlightKind `json:"kind,omitempty"` 1747 } 1748 1749 /** 1750 * Client Capabilities for a [DocumentHighlightRequest](#DocumentHighlightRequest). 1751 */ 1752 type DocumentHighlightClientCapabilities struct { 1753 /** 1754 * Whether document highlight supports dynamic registration. 1755 */ 1756 DynamicRegistration bool `json:"dynamicRegistration,omitempty"` 1757 } 1758 1759 /** 1760 * A document highlight kind. 1761 */ 1762 type DocumentHighlightKind float64 1763 1764 /** 1765 * Provider options for a [DocumentHighlightRequest](#DocumentHighlightRequest). 1766 */ 1767 type DocumentHighlightOptions struct { 1768 WorkDoneProgressOptions 1769 } 1770 1771 /** 1772 * Parameters for a [DocumentHighlightRequest](#DocumentHighlightRequest). 1773 */ 1774 type DocumentHighlightParams struct { 1775 TextDocumentPositionParams 1776 WorkDoneProgressParams 1777 PartialResultParams 1778 } 1779 1780 /** 1781 * A document link is a range in a text document that links to an internal or external resource, like another 1782 * text document or a web site. 1783 */ 1784 type DocumentLink struct { 1785 /** 1786 * The range this link applies to. 1787 */ 1788 Range Range `json:"range"` 1789 /** 1790 * The uri this link points to. 1791 */ 1792 Target string `json:"target,omitempty"` 1793 /** 1794 * The tooltip text when you hover over this link. 1795 * 1796 * If a tooltip is provided, is will be displayed in a string that includes instructions on how to 1797 * trigger the link, such as `{0} (ctrl + click)`. The specific instructions vary depending on OS, 1798 * user settings, and localization. 1799 * 1800 * @since 3.15.0 1801 */ 1802 Tooltip string `json:"tooltip,omitempty"` 1803 /** 1804 * A data entry field that is preserved on a document link between a 1805 * DocumentLinkRequest and a DocumentLinkResolveRequest. 1806 */ 1807 Data LSPAny `json:"data,omitempty"` 1808 } 1809 1810 /** 1811 * The client capabilities of a [DocumentLinkRequest](#DocumentLinkRequest). 1812 */ 1813 type DocumentLinkClientCapabilities struct { 1814 /** 1815 * Whether document link supports dynamic registration. 1816 */ 1817 DynamicRegistration bool `json:"dynamicRegistration,omitempty"` 1818 /** 1819 * Whether the client support the `tooltip` property on `DocumentLink`. 1820 * 1821 * @since 3.15.0 1822 */ 1823 TooltipSupport bool `json:"tooltipSupport,omitempty"` 1824 } 1825 1826 /** 1827 * Provider options for a [DocumentLinkRequest](#DocumentLinkRequest). 1828 */ 1829 type DocumentLinkOptions struct { 1830 /** 1831 * Document links have a resolve provider as well. 1832 */ 1833 ResolveProvider bool `json:"resolveProvider,omitempty"` 1834 WorkDoneProgressOptions 1835 } 1836 1837 /** 1838 * The parameters of a [DocumentLinkRequest](#DocumentLinkRequest). 1839 */ 1840 type DocumentLinkParams struct { 1841 /** 1842 * The document to provide document links for. 1843 */ 1844 TextDocument TextDocumentIdentifier `json:"textDocument"` 1845 WorkDoneProgressParams 1846 PartialResultParams 1847 } 1848 1849 /** 1850 * Client capabilities of a [DocumentOnTypeFormattingRequest](#DocumentOnTypeFormattingRequest). 1851 */ 1852 type DocumentOnTypeFormattingClientCapabilities struct { 1853 /** 1854 * Whether on type formatting supports dynamic registration. 1855 */ 1856 DynamicRegistration bool `json:"dynamicRegistration,omitempty"` 1857 } 1858 1859 /** 1860 * Provider options for a [DocumentOnTypeFormattingRequest](#DocumentOnTypeFormattingRequest). 1861 */ 1862 type DocumentOnTypeFormattingOptions struct { 1863 /** 1864 * A character on which formatting should be triggered, like `}`. 1865 */ 1866 FirstTriggerCharacter string `json:"firstTriggerCharacter"` 1867 /** 1868 * More trigger characters. 1869 */ 1870 MoreTriggerCharacter []string `json:"moreTriggerCharacter,omitempty"` 1871 } 1872 1873 /** 1874 * The parameters of a [DocumentOnTypeFormattingRequest](#DocumentOnTypeFormattingRequest). 1875 */ 1876 type DocumentOnTypeFormattingParams struct { 1877 /** 1878 * The document to format. 1879 */ 1880 TextDocument TextDocumentIdentifier `json:"textDocument"` 1881 /** 1882 * The position at which this request was send. 1883 */ 1884 Position Position `json:"position"` 1885 /** 1886 * The character that has been typed. 1887 */ 1888 Ch string `json:"ch"` 1889 /** 1890 * The format options. 1891 */ 1892 Options FormattingOptions `json:"options"` 1893 } 1894 1895 /** 1896 * Client capabilities of a [DocumentRangeFormattingRequest](#DocumentRangeFormattingRequest). 1897 */ 1898 type DocumentRangeFormattingClientCapabilities struct { 1899 /** 1900 * Whether range formatting supports dynamic registration. 1901 */ 1902 DynamicRegistration bool `json:"dynamicRegistration,omitempty"` 1903 } 1904 1905 /** 1906 * Provider options for a [DocumentRangeFormattingRequest](#DocumentRangeFormattingRequest). 1907 */ 1908 type DocumentRangeFormattingOptions struct { 1909 WorkDoneProgressOptions 1910 } 1911 1912 /** 1913 * The parameters of a [DocumentRangeFormattingRequest](#DocumentRangeFormattingRequest). 1914 */ 1915 type DocumentRangeFormattingParams struct { 1916 /** 1917 * The document to format. 1918 */ 1919 TextDocument TextDocumentIdentifier `json:"textDocument"` 1920 /** 1921 * The range to format 1922 */ 1923 Range Range `json:"range"` 1924 /** 1925 * The format options 1926 */ 1927 Options FormattingOptions `json:"options"` 1928 WorkDoneProgressParams 1929 } 1930 1931 /** 1932 * A document selector is the combination of one or many document filters. 1933 * 1934 * @sample `let sel:DocumentSelector = [{ language: 'typescript' }, { language: 'json', pattern: '**∕tsconfig.json' }]`; 1935 * 1936 * The use of a string as a document filter is deprecated @since 3.16.0. 1937 */ 1938 type DocumentSelector = []string /*string | DocumentFilter*/ 1939 1940 /** 1941 * Represents programming constructs like variables, classes, interfaces etc. 1942 * that appear in a document. Document symbols can be hierarchical and they 1943 * have two ranges: one that encloses its definition and one that points to 1944 * its most interesting range, e.g. the range of an identifier. 1945 */ 1946 type DocumentSymbol struct { 1947 /** 1948 * The name of this symbol. Will be displayed in the user interface and therefore must not be 1949 * an empty string or a string only consisting of white spaces. 1950 */ 1951 Name string `json:"name"` 1952 /** 1953 * More detail for this symbol, e.g the signature of a function. 1954 */ 1955 Detail string `json:"detail,omitempty"` 1956 /** 1957 * The kind of this symbol. 1958 */ 1959 Kind SymbolKind `json:"kind"` 1960 /** 1961 * Tags for this document symbol. 1962 * 1963 * @since 3.16.0 1964 */ 1965 Tags []SymbolTag `json:"tags,omitempty"` 1966 /** 1967 * Indicates if this symbol is deprecated. 1968 * 1969 * @deprecated Use tags instead 1970 */ 1971 Deprecated bool `json:"deprecated,omitempty"` 1972 /** 1973 * The range enclosing this symbol not including leading/trailing whitespace but everything else 1974 * like comments. This information is typically used to determine if the the clients cursor is 1975 * inside the symbol to reveal in the symbol in the UI. 1976 */ 1977 Range Range `json:"range"` 1978 /** 1979 * The range that should be selected and revealed when this symbol is being picked, e.g the name of a function. 1980 * Must be contained by the the `range`. 1981 */ 1982 SelectionRange Range `json:"selectionRange"` 1983 /** 1984 * Children of this symbol, e.g. properties of a class. 1985 */ 1986 Children []DocumentSymbol `json:"children,omitempty"` 1987 } 1988 1989 /** 1990 * Client Capabilities for a [DocumentSymbolRequest](#DocumentSymbolRequest). 1991 */ 1992 type DocumentSymbolClientCapabilities struct { 1993 /** 1994 * Whether document symbol supports dynamic registration. 1995 */ 1996 DynamicRegistration bool `json:"dynamicRegistration,omitempty"` 1997 /** 1998 * Specific capabilities for the `SymbolKind`. 1999 */ 2000 SymbolKind struct { 2001 /** 2002 * The symbol kind values the client supports. When this 2003 * property exists the client also guarantees that it will 2004 * handle values outside its set gracefully and falls back 2005 * to a default value when unknown. 2006 * 2007 * If this property is not present the client only supports 2008 * the symbol kinds from `File` to `Array` as defined in 2009 * the initial version of the protocol. 2010 */ 2011 ValueSet []SymbolKind `json:"valueSet,omitempty"` 2012 } `json:"symbolKind,omitempty"` 2013 /** 2014 * The client support hierarchical document symbols. 2015 */ 2016 HierarchicalDocumentSymbolSupport bool `json:"hierarchicalDocumentSymbolSupport,omitempty"` 2017 /** 2018 * The client supports tags on `SymbolInformation`. Tags are supported on 2019 * `DocumentSymbol` if `hierarchicalDocumentSymbolSupport` is set to true. 2020 * Clients supporting tags have to handle unknown tags gracefully. 2021 * 2022 * @since 3.16.0 2023 */ 2024 TagSupport struct { 2025 /** 2026 * The tags supported by the client. 2027 */ 2028 ValueSet []SymbolTag `json:"valueSet"` 2029 } `json:"tagSupport,omitempty"` 2030 /** 2031 * The client supports an additional label presented in the UI when 2032 * registering a document symbol provider. 2033 * 2034 * @since 3.16.0 2035 */ 2036 LabelSupport bool `json:"labelSupport,omitempty"` 2037 } 2038 2039 /** 2040 * Provider options for a [DocumentSymbolRequest](#DocumentSymbolRequest). 2041 */ 2042 type DocumentSymbolOptions struct { 2043 /** 2044 * A human-readable string that is shown when multiple outlines trees 2045 * are shown for the same document. 2046 * 2047 * @since 3.16.0 2048 */ 2049 Label string `json:"label,omitempty"` 2050 WorkDoneProgressOptions 2051 } 2052 2053 /** 2054 * Parameters for a [DocumentSymbolRequest](#DocumentSymbolRequest). 2055 */ 2056 type DocumentSymbolParams struct { 2057 /** 2058 * The text document. 2059 */ 2060 TextDocument TextDocumentIdentifier `json:"textDocument"` 2061 WorkDoneProgressParams 2062 PartialResultParams 2063 } 2064 2065 /** 2066 * A tagging type for string properties that are actually document URIs. 2067 */ 2068 type DocumentURI string 2069 2070 /** 2071 * The client capabilities of a [ExecuteCommandRequest](#ExecuteCommandRequest). 2072 */ 2073 type ExecuteCommandClientCapabilities struct { 2074 /** 2075 * Execute command supports dynamic registration. 2076 */ 2077 DynamicRegistration bool `json:"dynamicRegistration,omitempty"` 2078 } 2079 2080 /** 2081 * The server capabilities of a [ExecuteCommandRequest](#ExecuteCommandRequest). 2082 */ 2083 type ExecuteCommandOptions struct { 2084 /** 2085 * The commands to be executed on the server 2086 */ 2087 Commands []string `json:"commands"` 2088 WorkDoneProgressOptions 2089 } 2090 2091 /** 2092 * The parameters of a [ExecuteCommandRequest](#ExecuteCommandRequest). 2093 */ 2094 type ExecuteCommandParams struct { 2095 /** 2096 * The identifier of the actual command handler. 2097 */ 2098 Command string `json:"command"` 2099 /** 2100 * Arguments that the command should be invoked with. 2101 */ 2102 Arguments []json.RawMessage `json:"arguments,omitempty"` 2103 WorkDoneProgressParams 2104 } 2105 2106 type FailureHandlingKind string 2107 2108 /** 2109 * The file event type 2110 */ 2111 type FileChangeType float64 2112 2113 /** 2114 * Represents information on a file/folder create. 2115 * 2116 * @since 3.16.0 2117 */ 2118 type FileCreate struct { 2119 /** 2120 * A file:// URI for the location of the file/folder being created. 2121 */ 2122 URI string `json:"uri"` 2123 } 2124 2125 /** 2126 * Represents information on a file/folder delete. 2127 * 2128 * @since 3.16.0 2129 */ 2130 type FileDelete struct { 2131 /** 2132 * A file:// URI for the location of the file/folder being deleted. 2133 */ 2134 URI string `json:"uri"` 2135 } 2136 2137 /** 2138 * An event describing a file change. 2139 */ 2140 type FileEvent struct { 2141 /** 2142 * The file's uri. 2143 */ 2144 URI DocumentURI `json:"uri"` 2145 /** 2146 * The change type. 2147 */ 2148 Type FileChangeType `json:"type"` 2149 } 2150 2151 /** 2152 * Capabilities relating to events from file operations by the user in the client. 2153 * 2154 * These events do not come from the file system, they come from user operations 2155 * like renaming a file in the UI. 2156 * 2157 * @since 3.16.0 2158 */ 2159 type FileOperationClientCapabilities struct { 2160 /** 2161 * Whether the client supports dynamic registration for file requests/notifications. 2162 */ 2163 DynamicRegistration bool `json:"dynamicRegistration,omitempty"` 2164 /** 2165 * The client has support for sending didCreateFiles notifications. 2166 */ 2167 DidCreate bool `json:"didCreate,omitempty"` 2168 /** 2169 * The client has support for willCreateFiles requests. 2170 */ 2171 WillCreate bool `json:"willCreate,omitempty"` 2172 /** 2173 * The client has support for sending didRenameFiles notifications. 2174 */ 2175 DidRename bool `json:"didRename,omitempty"` 2176 /** 2177 * The client has support for willRenameFiles requests. 2178 */ 2179 WillRename bool `json:"willRename,omitempty"` 2180 /** 2181 * The client has support for sending didDeleteFiles notifications. 2182 */ 2183 DidDelete bool `json:"didDelete,omitempty"` 2184 /** 2185 * The client has support for willDeleteFiles requests. 2186 */ 2187 WillDelete bool `json:"willDelete,omitempty"` 2188 } 2189 2190 /** 2191 * A filter to describe in which file operation requests or notifications 2192 * the server is interested in. 2193 * 2194 * @since 3.16.0 2195 */ 2196 type FileOperationFilter struct { 2197 /** 2198 * A Uri like `file` or `untitled`. 2199 */ 2200 Scheme string `json:"scheme,omitempty"` 2201 /** 2202 * The actual file operation pattern. 2203 */ 2204 Pattern FileOperationPattern `json:"pattern"` 2205 } 2206 2207 /** 2208 * Options for notifications/requests for user operations on files. 2209 * 2210 * @since 3.16.0 2211 */ 2212 type FileOperationOptions struct { 2213 /** 2214 * The server is interested in didCreateFiles notifications. 2215 */ 2216 DidCreate FileOperationRegistrationOptions `json:"didCreate,omitempty"` 2217 /** 2218 * The server is interested in willCreateFiles requests. 2219 */ 2220 WillCreate FileOperationRegistrationOptions `json:"willCreate,omitempty"` 2221 /** 2222 * The server is interested in didRenameFiles notifications. 2223 */ 2224 DidRename FileOperationRegistrationOptions `json:"didRename,omitempty"` 2225 /** 2226 * The server is interested in willRenameFiles requests. 2227 */ 2228 WillRename FileOperationRegistrationOptions `json:"willRename,omitempty"` 2229 /** 2230 * The server is interested in didDeleteFiles file notifications. 2231 */ 2232 DidDelete FileOperationRegistrationOptions `json:"didDelete,omitempty"` 2233 /** 2234 * The server is interested in willDeleteFiles file requests. 2235 */ 2236 WillDelete FileOperationRegistrationOptions `json:"willDelete,omitempty"` 2237 } 2238 2239 /** 2240 * A pattern to describe in which file operation requests or notifications 2241 * the server is interested in. 2242 * 2243 * @since 3.16.0 2244 */ 2245 type FileOperationPattern struct { 2246 /** 2247 * The glob pattern to match. Glob patterns can have the following syntax: 2248 * - `*` to match one or more characters in a path segment 2249 * - `?` to match on one character in a path segment 2250 * - `**` to match any number of path segments, including none 2251 * - `{}` to group sub patterns into an OR expression. (e.g. `**/*.{ts,js}` matches all TypeScript and JavaScript files) 2252 * - `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …) 2253 * - `[!...]` 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`) 2254 */ 2255 Glob string `json:"glob"` 2256 /** 2257 * Whether to match files or folders with this pattern. 2258 * 2259 * Matches both if undefined. 2260 */ 2261 Matches FileOperationPatternKind `json:"matches,omitempty"` 2262 /** 2263 * Additional options used during matching. 2264 */ 2265 Options FileOperationPatternOptions `json:"options,omitempty"` 2266 } 2267 2268 /** 2269 * A pattern kind describing if a glob pattern matches a file a folder or 2270 * both. 2271 * 2272 * @since 3.16.0 2273 */ 2274 type FileOperationPatternKind string 2275 2276 /** 2277 * Matching options for the file operation pattern. 2278 * 2279 * @since 3.16.0 2280 */ 2281 type FileOperationPatternOptions struct { 2282 /** 2283 * The pattern should be matched ignoring casing. 2284 */ 2285 IgnoreCase bool `json:"ignoreCase,omitempty"` 2286 } 2287 2288 /** 2289 * The options to register for file operations. 2290 * 2291 * @since 3.16.0 2292 */ 2293 type FileOperationRegistrationOptions struct { 2294 /** 2295 * The actual filters. 2296 */ 2297 Filters []FileOperationFilter `json:"filters"` 2298 } 2299 2300 /** 2301 * Represents information on a file/folder rename. 2302 * 2303 * @since 3.16.0 2304 */ 2305 type FileRename struct { 2306 /** 2307 * A file:// URI for the original location of the file/folder being renamed. 2308 */ 2309 OldURI string `json:"oldUri"` 2310 /** 2311 * A file:// URI for the new location of the file/folder being renamed. 2312 */ 2313 NewURI string `json:"newUri"` 2314 } 2315 2316 type FileSystemWatcher struct { 2317 /** 2318 * The glob pattern to watch. Glob patterns can have the following syntax: 2319 * - `*` to match one or more characters in a path segment 2320 * - `?` to match on one character in a path segment 2321 * - `**` to match any number of path segments, including none 2322 * - `{}` to group conditions (e.g. `**/*.{ts,js}` matches all TypeScript and JavaScript files) 2323 * - `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …) 2324 * - `[!...]` 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`) 2325 */ 2326 GlobPattern string `json:"globPattern"` 2327 /** 2328 * The kind of events of interest. If omitted it defaults 2329 * to WatchKind.Create | WatchKind.Change | WatchKind.Delete 2330 * which is 7. 2331 */ 2332 Kind uint32 `json:"kind,omitempty"` 2333 } 2334 2335 /** 2336 * Represents a folding range. To be valid, start and end line must be bigger than zero and smaller 2337 * than the number of lines in the document. Clients are free to ignore invalid ranges. 2338 */ 2339 type FoldingRange struct { 2340 /** 2341 * The zero-based start line of the range to fold. The folded area starts after the line's last character. 2342 * To be valid, the end must be zero or larger and smaller than the number of lines in the document. 2343 */ 2344 StartLine uint32 `json:"startLine"` 2345 /** 2346 * The zero-based character offset from where the folded range starts. If not defined, defaults to the length of the start line. 2347 */ 2348 StartCharacter uint32 `json:"startCharacter,omitempty"` 2349 /** 2350 * The zero-based end line of the range to fold. The folded area ends with the line's last character. 2351 * To be valid, the end must be zero or larger and smaller than the number of lines in the document. 2352 */ 2353 EndLine uint32 `json:"endLine"` 2354 /** 2355 * The zero-based character offset before the folded range ends. If not defined, defaults to the length of the end line. 2356 */ 2357 EndCharacter uint32 `json:"endCharacter,omitempty"` 2358 /** 2359 * Describes the kind of the folding range such as `comment' or 'region'. The kind 2360 * is used to categorize folding ranges and used by commands like 'Fold all comments'. See 2361 * [FoldingRangeKind](#FoldingRangeKind) for an enumeration of standardized kinds. 2362 */ 2363 Kind string `json:"kind,omitempty"` 2364 } 2365 2366 type FoldingRangeClientCapabilities struct { 2367 /** 2368 * Whether implementation supports dynamic registration for folding range providers. If this is set to `true` 2369 * the client supports the new `FoldingRangeRegistrationOptions` return value for the corresponding server 2370 * capability as well. 2371 */ 2372 DynamicRegistration bool `json:"dynamicRegistration,omitempty"` 2373 /** 2374 * The maximum number of folding ranges that the client prefers to receive per document. The value serves as a 2375 * hint, servers are free to follow the limit. 2376 */ 2377 RangeLimit uint32 `json:"rangeLimit,omitempty"` 2378 /** 2379 * If set, the client signals that it only supports folding complete lines. If set, client will 2380 * ignore specified `startCharacter` and `endCharacter` properties in a FoldingRange. 2381 */ 2382 LineFoldingOnly bool `json:"lineFoldingOnly,omitempty"` 2383 } 2384 2385 /** 2386 * Enum of known range kinds 2387 */ 2388 type FoldingRangeKind string 2389 2390 type FoldingRangeOptions struct { 2391 WorkDoneProgressOptions 2392 } 2393 2394 /** 2395 * Parameters for a [FoldingRangeRequest](#FoldingRangeRequest). 2396 */ 2397 type FoldingRangeParams struct { 2398 /** 2399 * The text document. 2400 */ 2401 TextDocument TextDocumentIdentifier `json:"textDocument"` 2402 WorkDoneProgressParams 2403 PartialResultParams 2404 } 2405 2406 type FoldingRangeRegistrationOptions struct { 2407 TextDocumentRegistrationOptions 2408 FoldingRangeOptions 2409 StaticRegistrationOptions 2410 } 2411 2412 /** 2413 * Value-object describing what options formatting should use. 2414 */ 2415 type FormattingOptions struct { 2416 /** 2417 * Size of a tab in spaces. 2418 */ 2419 TabSize uint32 `json:"tabSize"` 2420 /** 2421 * Prefer spaces over tabs. 2422 */ 2423 InsertSpaces bool `json:"insertSpaces"` 2424 /** 2425 * Trim trailing whitespaces on a line. 2426 * 2427 * @since 3.15.0 2428 */ 2429 TrimTrailingWhitespace bool `json:"trimTrailingWhitespace,omitempty"` 2430 /** 2431 * Insert a newline character at the end of the file if one does not exist. 2432 * 2433 * @since 3.15.0 2434 */ 2435 InsertFinalNewline bool `json:"insertFinalNewline,omitempty"` 2436 /** 2437 * Trim all newlines after the final newline at the end of the file. 2438 * 2439 * @since 3.15.0 2440 */ 2441 TrimFinalNewlines bool `json:"trimFinalNewlines,omitempty"` 2442 } 2443 2444 /** 2445 * A diagnostic report with a full set of problems. 2446 * 2447 * @since 3.17.0 - proposed state 2448 */ 2449 type FullDocumentDiagnosticReport struct { 2450 /** 2451 * A full document diagnostic report. 2452 */ 2453 Kind string `json:"kind"` 2454 /** 2455 * An optional result id. If provided it will 2456 * be sent on the next diagnostic request for the 2457 * same document. 2458 */ 2459 ResultID string `json:"resultId,omitempty"` 2460 /** 2461 * The actual items. 2462 */ 2463 Items []Diagnostic `json:"items"` 2464 } 2465 2466 /** 2467 * General client capabilities. 2468 * 2469 * @since 3.16.0 2470 */ 2471 type GeneralClientCapabilities struct { 2472 /** 2473 * Client capability that signals how the client 2474 * handles stale requests (e.g. a request 2475 * for which the client will not process the response 2476 * anymore since the information is outdated). 2477 * 2478 * @since 3.17.0 2479 */ 2480 StaleRequestSupport struct { 2481 /** 2482 * The client will actively cancel the request. 2483 */ 2484 Cancel bool `json:"cancel"` 2485 /** 2486 * The list of requests for which the client 2487 * will retry the request if it receives a 2488 * response with error code `ContentModified` 2489 */ 2490 RetryOnContentModified []string `json:"retryOnContentModified"` 2491 } `json:"staleRequestSupport,omitempty"` 2492 /** 2493 * Client capabilities specific to regular expressions. 2494 * 2495 * @since 3.16.0 2496 */ 2497 RegularExpressions RegularExpressionsClientCapabilities `json:"regularExpressions,omitempty"` 2498 /** 2499 * Client capabilities specific to the client's markdown parser. 2500 * 2501 * @since 3.16.0 2502 */ 2503 Markdown MarkdownClientCapabilities `json:"markdown,omitempty"` 2504 } 2505 2506 /** 2507 * The result of a hover request. 2508 */ 2509 type Hover struct { 2510 /** 2511 * The hover's content 2512 */ 2513 Contents MarkupContent/*MarkupContent | MarkedString | MarkedString[]*/ `json:"contents"` 2514 /** 2515 * An optional range 2516 */ 2517 Range Range `json:"range,omitempty"` 2518 } 2519 2520 type HoverClientCapabilities struct { 2521 /** 2522 * Whether hover supports dynamic registration. 2523 */ 2524 DynamicRegistration bool `json:"dynamicRegistration,omitempty"` 2525 /** 2526 * Client supports the follow content formats for the content 2527 * property. The order describes the preferred format of the client. 2528 */ 2529 ContentFormat []MarkupKind `json:"contentFormat,omitempty"` 2530 } 2531 2532 /** 2533 * Hover options. 2534 */ 2535 type HoverOptions struct { 2536 WorkDoneProgressOptions 2537 } 2538 2539 /** 2540 * Parameters for a [HoverRequest](#HoverRequest). 2541 */ 2542 type HoverParams struct { 2543 TextDocumentPositionParams 2544 WorkDoneProgressParams 2545 } 2546 2547 /** 2548 * @since 3.6.0 2549 */ 2550 type ImplementationClientCapabilities struct { 2551 /** 2552 * Whether implementation supports dynamic registration. If this is set to `true` 2553 * the client supports the new `ImplementationRegistrationOptions` return value 2554 * for the corresponding server capability as well. 2555 */ 2556 DynamicRegistration bool `json:"dynamicRegistration,omitempty"` 2557 /** 2558 * The client supports additional metadata in the form of definition links. 2559 * 2560 * @since 3.14.0 2561 */ 2562 LinkSupport bool `json:"linkSupport,omitempty"` 2563 } 2564 2565 type ImplementationOptions struct { 2566 WorkDoneProgressOptions 2567 } 2568 2569 type ImplementationParams struct { 2570 TextDocumentPositionParams 2571 WorkDoneProgressParams 2572 PartialResultParams 2573 } 2574 2575 type ImplementationRegistrationOptions struct { 2576 TextDocumentRegistrationOptions 2577 ImplementationOptions 2578 StaticRegistrationOptions 2579 } 2580 2581 /** 2582 * Known error codes for an `InitializeError`; 2583 */ 2584 type InitializeError float64 2585 2586 type InitializeParams struct { 2587 /** 2588 * The process Id of the parent process that started 2589 * the server. 2590 */ 2591 ProcessID int32/*integer | null*/ `json:"processId"` 2592 /** 2593 * Information about the client 2594 * 2595 * @since 3.15.0 2596 */ 2597 ClientInfo struct { 2598 /** 2599 * The name of the client as defined by the client. 2600 */ 2601 Name string `json:"name"` 2602 /** 2603 * The client's version as defined by the client. 2604 */ 2605 Version string `json:"version,omitempty"` 2606 } `json:"clientInfo,omitempty"` 2607 /** 2608 * The locale the client is currently showing the user interface 2609 * in. This must not necessarily be the locale of the operating 2610 * system. 2611 * 2612 * Uses IETF language tags as the value's syntax 2613 * (See https://en.wikipedia.org/wiki/IETF_language_tag) 2614 * 2615 * @since 3.16.0 2616 */ 2617 Locale string `json:"locale,omitempty"` 2618 /** 2619 * The rootPath of the workspace. Is null 2620 * if no folder is open. 2621 * 2622 * @deprecated in favour of rootUri. 2623 */ 2624 RootPath string/*string | null*/ `json:"rootPath,omitempty"` 2625 /** 2626 * The rootUri of the workspace. Is null if no 2627 * folder is open. If both `rootPath` and `rootUri` are set 2628 * `rootUri` wins. 2629 * 2630 * @deprecated in favour of workspaceFolders. 2631 */ 2632 RootURI DocumentURI/*DocumentUri | null*/ `json:"rootUri"` 2633 /** 2634 * The capabilities provided by the client (editor or tool) 2635 */ 2636 Capabilities ClientCapabilities `json:"capabilities"` 2637 /** 2638 * User provided initialization options. 2639 */ 2640 InitializationOptions LSPAny `json:"initializationOptions,omitempty"` 2641 /** 2642 * The initial trace setting. If omitted trace is disabled ('off'). 2643 */ 2644 Trace string/* 'off' | 'messages' | 'compact' | 'verbose' */ `json:"trace,omitempty"` 2645 /** 2646 * The actual configured workspace folders. 2647 */ 2648 WorkspaceFolders []WorkspaceFolder/*WorkspaceFolder[] | null*/ `json:"workspaceFolders"` 2649 } 2650 2651 /** 2652 * The result returned from an initialize request. 2653 */ 2654 type InitializeResult struct { 2655 /** 2656 * The capabilities the language server provides. 2657 */ 2658 Capabilities ServerCapabilities `json:"capabilities"` 2659 /** 2660 * Information about the server. 2661 * 2662 * @since 3.15.0 2663 */ 2664 ServerInfo struct { 2665 /** 2666 * The name of the server as defined by the server. 2667 */ 2668 Name string `json:"name"` 2669 /** 2670 * The server's version as defined by the server. 2671 */ 2672 Version string `json:"version,omitempty"` 2673 } `json:"serverInfo,omitempty"` 2674 } 2675 2676 type InitializedParams struct { 2677 } 2678 2679 /** 2680 * Inline value information can be provided by different means: 2681 * - directly as a text value (class InlineValueText). 2682 * - as a name to use for a variable lookup (class InlineValueVariableLookup) 2683 * - as an evaluatable expression (class InlineValueEvaluatableExpression) 2684 * The InlineValue types combines all inline value types into one type. 2685 * 2686 * @since 3.17.0 - proposed state 2687 */ 2688 type InlineValue = interface{} /* InlineValueText | InlineValueVariableLookup | InlineValueEvaluatableExpression*/ 2689 2690 /** 2691 * Provide an inline value through an expression evaluation. 2692 * If only a range is specified, the expression will be extracted from the underlying document. 2693 * An optional expression can be used to override the extracted expression. 2694 * 2695 * @since 3.17.0 - proposed state 2696 */ 2697 type InlineValueEvaluatableExpression struct { 2698 /** 2699 * The document range for which the inline value applies. 2700 * The range is used to extract the evaluatable expression from the underlying document. 2701 */ 2702 Range Range `json:"range"` 2703 /** 2704 * If specified the expression overrides the extracted expression. 2705 */ 2706 Expression string `json:"expression,omitempty"` 2707 } 2708 2709 /** 2710 * Provide inline value as text. 2711 * 2712 * @since 3.17.0 - proposed state 2713 */ 2714 type InlineValueText struct { 2715 /** 2716 * The document range for which the inline value applies. 2717 */ 2718 Range Range `json:"range"` 2719 /** 2720 * The text of the inline value. 2721 */ 2722 Text string `json:"text"` 2723 } 2724 2725 /** 2726 * Provide inline value through a variable lookup. 2727 * If only a range is specified, the variable name will be extracted from the underlying document. 2728 * An optional variable name can be used to override the extracted name. 2729 * 2730 * @since 3.17.0 - proposed state 2731 */ 2732 type InlineValueVariableLookup struct { 2733 /** 2734 * The document range for which the inline value applies. 2735 * The range is used to extract the variable name from the underlying document. 2736 */ 2737 Range Range `json:"range"` 2738 /** 2739 * If specified the name of the variable to look up. 2740 */ 2741 VariableName string `json:"variableName,omitempty"` 2742 /** 2743 * How to perform the lookup. 2744 */ 2745 CaseSensitiveLookup bool `json:"caseSensitiveLookup"` 2746 } 2747 2748 /** 2749 * Client capabilities specific to inline values. 2750 * 2751 * @since 3.17.0 - proposed state 2752 */ 2753 type InlineValuesClientCapabilities struct { 2754 /** 2755 * Whether implementation supports dynamic registration for inline value providers. 2756 */ 2757 DynamicRegistration bool `json:"dynamicRegistration,omitempty"` 2758 } 2759 2760 /** 2761 * @since 3.17.0 - proposed state 2762 */ 2763 type InlineValuesContext struct { 2764 /** 2765 * The document range where execution has stopped. 2766 * Typically the end position of the range denotes the line where the inline values are shown. 2767 */ 2768 StoppedLocation Range `json:"stoppedLocation"` 2769 } 2770 2771 /** 2772 * Inline values options used during static registration. 2773 * 2774 * @since 3.17.0 - proposed state 2775 */ 2776 type InlineValuesOptions struct { 2777 WorkDoneProgressOptions 2778 } 2779 2780 /** 2781 * A parameter literal used in inline values requests. 2782 * 2783 * @since 3.17.0 - proposed state 2784 */ 2785 type InlineValuesParams struct { 2786 /** 2787 * The text document. 2788 */ 2789 TextDocument TextDocumentIdentifier `json:"textDocument"` 2790 /** 2791 * The visible document range for which inline values should be computed. 2792 */ 2793 ViewPort Range `json:"viewPort"` 2794 /** 2795 * Additional information about the context in which inline values were 2796 * requested. 2797 */ 2798 Context InlineValuesContext `json:"context"` 2799 WorkDoneProgressParams 2800 } 2801 2802 /** 2803 * Inline value options used during static or dynamic registration. 2804 * 2805 * @since 3.17.0 - proposed state 2806 */ 2807 type InlineValuesRegistrationOptions struct { 2808 InlineValuesOptions 2809 TextDocumentRegistrationOptions 2810 StaticRegistrationOptions 2811 } 2812 2813 /** 2814 * Client workspace capabilities specific to inline values. 2815 * 2816 * @since 3.17.0 - proposed state 2817 */ 2818 type InlineValuesWorkspaceClientCapabilities struct { 2819 /** 2820 * Whether the client implementation supports a refresh request sent from the 2821 * server to the client. 2822 * 2823 * Note that this event is global and will force the client to refresh all 2824 * inline values currently shown. It should be used with absolute care and is 2825 * useful for situation where a server for example detect a project wide 2826 * change that requires such a calculation. 2827 */ 2828 RefreshSupport bool `json:"refreshSupport,omitempty"` 2829 } 2830 2831 /** 2832 * A special text edit to provide an insert and a replace operation. 2833 * 2834 * @since 3.16.0 2835 */ 2836 type InsertReplaceEdit struct { 2837 /** 2838 * The string to be inserted. 2839 */ 2840 NewText string `json:"newText"` 2841 /** 2842 * The range if the insert is requested 2843 */ 2844 Insert Range `json:"insert"` 2845 /** 2846 * The range if the replace is requested. 2847 */ 2848 Replace Range `json:"replace"` 2849 } 2850 2851 /** 2852 * Defines whether the insert text in a completion item should be interpreted as 2853 * plain text or a snippet. 2854 */ 2855 type InsertTextFormat float64 2856 2857 /** 2858 * How whitespace and indentation is handled during completion 2859 * item insertion. 2860 * 2861 * @since 3.16.0 2862 */ 2863 type InsertTextMode float64 2864 2865 /** 2866 * The LSP any type 2867 * 2868 * @since 3.17.0 2869 */ 2870 type LSPAny = interface{} /* LSPObject | LSPArray | string | int32 | uint32 | Decimal | bool | float64*/ 2871 2872 /** 2873 * LSP arrays. 2874 * 2875 * @since 3.17.0 2876 */ 2877 type LSPArray = []LSPAny 2878 2879 /** 2880 * LSP object definition. 2881 * 2882 * @since 3.17.0 2883 */ 2884 type LSPObject = map[string]interface{} /*[key: string]: LSPAny*/ 2885 2886 /** 2887 * Client capabilities for the linked editing range request. 2888 * 2889 * @since 3.16.0 2890 */ 2891 type LinkedEditingRangeClientCapabilities struct { 2892 /** 2893 * Whether implementation supports dynamic registration. If this is set to `true` 2894 * the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` 2895 * return value for the corresponding server capability as well. 2896 */ 2897 DynamicRegistration bool `json:"dynamicRegistration,omitempty"` 2898 } 2899 2900 type LinkedEditingRangeOptions struct { 2901 WorkDoneProgressOptions 2902 } 2903 2904 type LinkedEditingRangeParams struct { 2905 TextDocumentPositionParams 2906 WorkDoneProgressParams 2907 } 2908 2909 type LinkedEditingRangeRegistrationOptions struct { 2910 TextDocumentRegistrationOptions 2911 LinkedEditingRangeOptions 2912 StaticRegistrationOptions 2913 } 2914 2915 /** 2916 * The result of a linked editing range request. 2917 * 2918 * @since 3.16.0 2919 */ 2920 type LinkedEditingRanges struct { 2921 /** 2922 * A list of ranges that can be edited together. The ranges must have 2923 * identical length and contain identical text content. The ranges cannot overlap. 2924 */ 2925 Ranges []Range `json:"ranges"` 2926 /** 2927 * An optional word pattern (regular expression) that describes valid contents for 2928 * the given ranges. If no pattern is provided, the client configuration's word 2929 * pattern will be used. 2930 */ 2931 WordPattern string `json:"wordPattern,omitempty"` 2932 } 2933 2934 /** 2935 * Represents a location inside a resource, such as a line 2936 * inside a text file. 2937 */ 2938 type Location struct { 2939 URI DocumentURI `json:"uri"` 2940 Range Range `json:"range"` 2941 } 2942 2943 /** 2944 * Represents the connection of two locations. Provides additional metadata over normal [locations](#Location), 2945 * including an origin range. 2946 */ 2947 type LocationLink struct { 2948 /** 2949 * Span of the origin of this link. 2950 * 2951 * Used as the underlined span for mouse definition hover. Defaults to the word range at 2952 * the definition position. 2953 */ 2954 OriginSelectionRange Range `json:"originSelectionRange,omitempty"` 2955 /** 2956 * The target resource identifier of this link. 2957 */ 2958 TargetURI DocumentURI `json:"targetUri"` 2959 /** 2960 * The full target range of this link. If the target for example is a symbol then target range is the 2961 * range enclosing this symbol not including leading/trailing whitespace but everything else 2962 * like comments. This information is typically used to highlight the range in the editor. 2963 */ 2964 TargetRange Range `json:"targetRange"` 2965 /** 2966 * The range that should be selected and revealed when this link is being followed, e.g the name of a function. 2967 * Must be contained by the the `targetRange`. See also `DocumentSymbol#range` 2968 */ 2969 TargetSelectionRange Range `json:"targetSelectionRange"` 2970 } 2971 2972 /** 2973 * The log message parameters. 2974 */ 2975 type LogMessageParams struct { 2976 /** 2977 * The message type. See {@link MessageType} 2978 */ 2979 Type MessageType `json:"type"` 2980 /** 2981 * The actual message 2982 */ 2983 Message string `json:"message"` 2984 } 2985 2986 type LogTraceParams struct { 2987 Message string `json:"message"` 2988 Verbose string `json:"verbose,omitempty"` 2989 } 2990 2991 /** 2992 * Client capabilities specific to the used markdown parser. 2993 * 2994 * @since 3.16.0 2995 */ 2996 type MarkdownClientCapabilities struct { 2997 /** 2998 * The name of the parser. 2999 */ 3000 Parser string `json:"parser"` 3001 /** 3002 * The version of the parser. 3003 */ 3004 Version string `json:"version,omitempty"` 3005 /** 3006 * A list of HTML tags that the client allows / supports in 3007 * Markdown. 3008 * 3009 * @since 3.17.0 3010 */ 3011 AllowedTags []string `json:"allowedTags,omitempty"` 3012 } 3013 3014 /** 3015 * MarkedString can be used to render human readable text. It is either a markdown string 3016 * or a code-block that provides a language and a code snippet. The language identifier 3017 * is semantically equal to the optional language identifier in fenced code blocks in GitHub 3018 * issues. See https://help.github.com/articles/creating-and-highlighting-code-blocks/#syntax-highlighting 3019 * 3020 * The pair of a language and a value is an equivalent to markdown: 3021 * ```${language} 3022 * ${value} 3023 * ``` 3024 * 3025 * Note that markdown strings will be sanitized - that means html will be escaped. 3026 * @deprecated use MarkupContent instead. 3027 */ 3028 type MarkedString = string /*string | { language: string; value: string }*/ 3029 3030 /** 3031 * A `MarkupContent` literal represents a string value which content is interpreted base on its 3032 * kind flag. Currently the protocol supports `plaintext` and `markdown` as markup kinds. 3033 * 3034 * If the kind is `markdown` then the value can contain fenced code blocks like in GitHub issues. 3035 * See https://help.github.com/articles/creating-and-highlighting-code-blocks/#syntax-highlighting 3036 * 3037 * Here is an example how such a string can be constructed using JavaScript / TypeScript: 3038 * ```ts 3039 * let markdown: MarkdownContent = { 3040 * kind: MarkupKind.Markdown, 3041 * value: [ 3042 * '# Header', 3043 * 'Some text', 3044 * '```typescript', 3045 * 'someCode();', 3046 * '```' 3047 * ].join('\n') 3048 * }; 3049 * ``` 3050 * 3051 * *Please Note* that clients might sanitize the return markdown. A client could decide to 3052 * remove HTML from the markdown to avoid script execution. 3053 */ 3054 type MarkupContent struct { 3055 /** 3056 * The type of the Markup 3057 */ 3058 Kind MarkupKind `json:"kind"` 3059 /** 3060 * The content itself 3061 */ 3062 Value string `json:"value"` 3063 } 3064 3065 /** 3066 * Describes the content type that a client supports in various 3067 * result literals like `Hover`, `ParameterInfo` or `CompletionItem`. 3068 * 3069 * Please note that `MarkupKinds` must not start with a `$`. This kinds 3070 * are reserved for internal usage. 3071 */ 3072 type MarkupKind string 3073 3074 type MessageActionItem struct { 3075 /** 3076 * A short title like 'Retry', 'Open Log' etc. 3077 */ 3078 Title string `json:"title"` 3079 } 3080 3081 /** 3082 * The message type 3083 */ 3084 type MessageType float64 3085 3086 /** 3087 * Moniker definition to match LSIF 0.5 moniker definition. 3088 * 3089 * @since 3.16.0 3090 */ 3091 type Moniker struct { 3092 /** 3093 * The scheme of the moniker. For example tsc or .Net 3094 */ 3095 Scheme string `json:"scheme"` 3096 /** 3097 * The identifier of the moniker. The value is opaque in LSIF however 3098 * schema owners are allowed to define the structure if they want. 3099 */ 3100 Identifier string `json:"identifier"` 3101 /** 3102 * The scope in which the moniker is unique 3103 */ 3104 Unique UniquenessLevel `json:"unique"` 3105 /** 3106 * The moniker kind if known. 3107 */ 3108 Kind MonikerKind `json:"kind,omitempty"` 3109 } 3110 3111 /** 3112 * Client capabilities specific to the moniker request. 3113 * 3114 * @since 3.16.0 3115 */ 3116 type MonikerClientCapabilities struct { 3117 /** 3118 * Whether moniker supports dynamic registration. If this is set to `true` 3119 * the client supports the new `MonikerRegistrationOptions` return value 3120 * for the corresponding server capability as well. 3121 */ 3122 DynamicRegistration bool `json:"dynamicRegistration,omitempty"` 3123 } 3124 3125 /** 3126 * The moniker kind. 3127 * 3128 * @since 3.16.0 3129 */ 3130 type MonikerKind string 3131 3132 type MonikerOptions struct { 3133 WorkDoneProgressOptions 3134 } 3135 3136 type MonikerParams struct { 3137 TextDocumentPositionParams 3138 WorkDoneProgressParams 3139 PartialResultParams 3140 } 3141 3142 type MonikerRegistrationOptions struct { 3143 TextDocumentRegistrationOptions 3144 MonikerOptions 3145 } 3146 3147 /** 3148 * A notebook cell. 3149 * 3150 * @since 3.17.0 - proposed state 3151 */ 3152 type NotebookCell struct { 3153 /** 3154 * The cell's kind 3155 */ 3156 Kind NotebookCellKind `json:"kind"` 3157 /** 3158 * The cell's text represented as a text document. 3159 * The document's content is synced using the 3160 * existing text document sync notifications. 3161 */ 3162 Document DocumentURI `json:"document"` 3163 } 3164 3165 /** 3166 * A change describing how to move a `NotebookCell` 3167 * array from state S' to S''. 3168 * 3169 * @since 3.17.0 - proposed state 3170 */ 3171 type NotebookCellChange struct { 3172 /** 3173 * The start oftest of the cell that changed. 3174 */ 3175 Start uint32 `json:"start"` 3176 /** 3177 * The deleted cells 3178 */ 3179 DeleteCount uint32 `json:"deleteCount"` 3180 /** 3181 * The new cells, if any 3182 */ 3183 Cells []NotebookCell `json:"cells,omitempty"` 3184 } 3185 3186 /** 3187 * A notebook cell kind. 3188 * 3189 * @since 3.17.0 - proposed state 3190 */ 3191 type NotebookCellKind float64 3192 3193 /** 3194 * A notebook cell text document filter denotes a cell text 3195 * document by different properties. 3196 * 3197 * @since 3.17.0 - proposed state. 3198 */ 3199 type NotebookCellTextDocumentFilter = struct { 3200 /** 3201 * A filter that matches against the notebook 3202 * containing the notebook cell. 3203 */ 3204 NotebookDocument NotebookDocumentFilter `json:"notebookDocument"` 3205 /** 3206 * A language id like `python`. 3207 * 3208 * Will be matched against the language id of the 3209 * notebook cell document. 3210 */ 3211 CellLanguage string `json:"cellLanguage,omitempty"` 3212 } 3213 3214 /** 3215 * A notebook document. 3216 * 3217 * @since 3.17.0 - proposed state 3218 */ 3219 type NotebookDocument struct { 3220 /** 3221 * The notebook document's uri. 3222 */ 3223 URI URI `json:"uri"` 3224 /** 3225 * The type of the notebook. 3226 */ 3227 NotebookType string `json:"notebookType"` 3228 /** 3229 * The version number of this document (it will increase after each 3230 * change, including undo/redo). 3231 */ 3232 Version int32 `json:"version"` 3233 /** 3234 * The cells of a notebook. 3235 */ 3236 Cells []NotebookCell `json:"cells"` 3237 } 3238 3239 type NotebookDocumentChangeEvent struct { 3240 Cells NotebookCellChange `json:"cells"` 3241 } 3242 3243 /** 3244 * A notebook document filter denotes a notebook document by 3245 * different properties. 3246 * 3247 * @since 3.17.0 - proposed state. 3248 */ 3249 type NotebookDocumentFilter = struct { 3250 /** The type of the enclosing notebook. */ 3251 NotebookType string `json:"notebookType"` 3252 /** A Uri [scheme](#Uri.scheme), like `file` or `untitled`. 3253 * Will be matched against the URI of the notebook. */ 3254 Scheme string `json:"scheme,omitempty"` 3255 /** A glob pattern, like `*.ipynb`. 3256 * Will be matched against the notebooks` URI path section.*/ 3257 Pattern string `json:"pattern,omitempty"` 3258 } 3259 3260 /** 3261 * A literal to identify a notebook document in the client. 3262 * 3263 * @since 3.17.0 - proposed state 3264 */ 3265 type NotebookDocumentIdentifier struct { 3266 /** 3267 * The notebook document's uri. 3268 */ 3269 URI URI `json:"uri"` 3270 } 3271 3272 /** 3273 * A text document identifier to optionally denote a specific version of a text document. 3274 */ 3275 type OptionalVersionedTextDocumentIdentifier struct { 3276 /** 3277 * The version number of this document. If a versioned text document identifier 3278 * is sent from the server to the client and the file is not open in the editor 3279 * (the server has not received an open notification before) the server can send 3280 * `null` to indicate that the version is unknown and the content on disk is the 3281 * truth (as specified with document content ownership). 3282 */ 3283 Version int32/*integer | null*/ `json:"version"` 3284 TextDocumentIdentifier 3285 } 3286 3287 /** 3288 * Represents a parameter of a callable-signature. A parameter can 3289 * have a label and a doc-comment. 3290 */ 3291 type ParameterInformation struct { 3292 /** 3293 * The label of this parameter information. 3294 * 3295 * Either a string or an inclusive start and exclusive end offsets within its containing 3296 * signature label. (see SignatureInformation.label). The offsets are based on a UTF-16 3297 * string representation as `Position` and `Range` does. 3298 * 3299 * *Note*: a label of type string should be a substring of its containing signature label. 3300 * Its intended use case is to highlight the parameter label part in the `SignatureInformation.label`. 3301 */ 3302 Label string/*string | [uinteger, uinteger]*/ `json:"label"` 3303 /** 3304 * The human-readable doc-comment of this signature. Will be shown 3305 * in the UI but can be omitted. 3306 */ 3307 Documentation string/*string | MarkupContent*/ `json:"documentation,omitempty"` 3308 } 3309 3310 type PartialResultParams struct { 3311 /** 3312 * An optional token that a server can use to report partial results (e.g. streaming) to 3313 * the client. 3314 */ 3315 PartialResultToken ProgressToken `json:"partialResultToken,omitempty"` 3316 } 3317 3318 /** 3319 * Position in a text document expressed as zero-based line and character offset. 3320 * The offsets are based on a UTF-16 string representation. So a string of the form 3321 * `a𐐀b` the character offset of the character `a` is 0, the character offset of `𐐀` 3322 * is 1 and the character offset of b is 3 since `𐐀` is represented using two code 3323 * units in UTF-16. 3324 * 3325 * Positions are line end character agnostic. So you can not specify a position that 3326 * denotes `\r|\n` or `\n|` where `|` represents the character offset. 3327 */ 3328 type Position struct { 3329 /** 3330 * Line position in a document (zero-based). 3331 */ 3332 Line uint32 `json:"line"` 3333 /** 3334 * Character offset on a line in a document (zero-based). Assuming that the line is 3335 * represented as a string, the `character` value represents the gap between the 3336 * `character` and `character + 1`. 3337 * 3338 * If the character value is greater than the line length it defaults back to the 3339 * line length. 3340 */ 3341 Character uint32 `json:"character"` 3342 } 3343 3344 type PrepareRenameParams struct { 3345 TextDocumentPositionParams 3346 WorkDoneProgressParams 3347 } 3348 3349 type PrepareSupportDefaultBehavior = interface{} 3350 3351 /** 3352 * A previous result id in a workspace pull request. 3353 * 3354 * @since 3.17.0 - proposed state 3355 */ 3356 type PreviousResultID = struct { 3357 /** 3358 * The URI for which the client knowns a 3359 * result id. 3360 */ 3361 URI DocumentURI `json:"uri"` 3362 /** 3363 * The value of the previous result id. 3364 */ 3365 Value string `json:"value"` 3366 } 3367 3368 type ProgressParams struct { 3369 /** 3370 * The progress token provided by the client or server. 3371 */ 3372 Token ProgressToken `json:"token"` 3373 /** 3374 * The progress data. 3375 */ 3376 Value interface{} `json:"value"` 3377 } 3378 3379 type ProgressToken = interface{} /*number | string*/ 3380 3381 /** 3382 * The publish diagnostic client capabilities. 3383 */ 3384 type PublishDiagnosticsClientCapabilities struct { 3385 /** 3386 * Whether the clients accepts diagnostics with related information. 3387 */ 3388 RelatedInformation bool `json:"relatedInformation,omitempty"` 3389 /** 3390 * Client supports the tag property to provide meta data about a diagnostic. 3391 * Clients supporting tags have to handle unknown tags gracefully. 3392 * 3393 * @since 3.15.0 3394 */ 3395 TagSupport struct { 3396 /** 3397 * The tags supported by the client. 3398 */ 3399 ValueSet []DiagnosticTag `json:"valueSet"` 3400 } `json:"tagSupport,omitempty"` 3401 /** 3402 * Whether the client interprets the version property of the 3403 * `textDocument/publishDiagnostics` notification`s parameter. 3404 * 3405 * @since 3.15.0 3406 */ 3407 VersionSupport bool `json:"versionSupport,omitempty"` 3408 /** 3409 * Client supports a codeDescription property 3410 * 3411 * @since 3.16.0 3412 */ 3413 CodeDescriptionSupport bool `json:"codeDescriptionSupport,omitempty"` 3414 /** 3415 * Whether code action supports the `data` property which is 3416 * preserved between a `textDocument/publishDiagnostics` and 3417 * `textDocument/codeAction` request. 3418 * 3419 * @since 3.16.0 3420 */ 3421 DataSupport bool `json:"dataSupport,omitempty"` 3422 } 3423 3424 /** 3425 * The publish diagnostic notification's parameters. 3426 */ 3427 type PublishDiagnosticsParams struct { 3428 /** 3429 * The URI for which diagnostic information is reported. 3430 */ 3431 URI DocumentURI `json:"uri"` 3432 /** 3433 * Optional the version number of the document the diagnostics are published for. 3434 * 3435 * @since 3.15.0 3436 */ 3437 Version int32 `json:"version,omitempty"` 3438 /** 3439 * An array of diagnostic information items. 3440 */ 3441 Diagnostics []Diagnostic `json:"diagnostics"` 3442 } 3443 3444 /** 3445 * A range in a text document expressed as (zero-based) start and end positions. 3446 * 3447 * If you want to specify a range that contains a line including the line ending 3448 * character(s) then use an end position denoting the start of the next line. 3449 * For example: 3450 * ```ts 3451 * { 3452 * start: { line: 5, character: 23 } 3453 * end : { line 6, character : 0 } 3454 * } 3455 * ``` 3456 */ 3457 type Range struct { 3458 /** 3459 * The range's start position 3460 */ 3461 Start Position `json:"start"` 3462 /** 3463 * The range's end position. 3464 */ 3465 End Position `json:"end"` 3466 } 3467 3468 /** 3469 * Client Capabilities for a [ReferencesRequest](#ReferencesRequest). 3470 */ 3471 type ReferenceClientCapabilities struct { 3472 /** 3473 * Whether references supports dynamic registration. 3474 */ 3475 DynamicRegistration bool `json:"dynamicRegistration,omitempty"` 3476 } 3477 3478 /** 3479 * Value-object that contains additional information when 3480 * requesting references. 3481 */ 3482 type ReferenceContext struct { 3483 /** 3484 * Include the declaration of the current symbol. 3485 */ 3486 IncludeDeclaration bool `json:"includeDeclaration"` 3487 } 3488 3489 /** 3490 * Reference options. 3491 */ 3492 type ReferenceOptions struct { 3493 WorkDoneProgressOptions 3494 } 3495 3496 /** 3497 * Parameters for a [ReferencesRequest](#ReferencesRequest). 3498 */ 3499 type ReferenceParams struct { 3500 Context ReferenceContext `json:"context"` 3501 TextDocumentPositionParams 3502 WorkDoneProgressParams 3503 PartialResultParams 3504 } 3505 3506 /** 3507 * General parameters to to register for an notification or to register a provider. 3508 */ 3509 type Registration struct { 3510 /** 3511 * The id used to register the request. The id can be used to deregister 3512 * the request again. 3513 */ 3514 ID string `json:"id"` 3515 /** 3516 * The method to register for. 3517 */ 3518 Method string `json:"method"` 3519 /** 3520 * Options necessary for the registration. 3521 */ 3522 RegisterOptions LSPAny `json:"registerOptions,omitempty"` 3523 } 3524 3525 type RegistrationParams struct { 3526 Registrations []Registration `json:"registrations"` 3527 } 3528 3529 /** 3530 * Client capabilities specific to regular expressions. 3531 * 3532 * @since 3.16.0 3533 */ 3534 type RegularExpressionsClientCapabilities struct { 3535 /** 3536 * The engine's name. 3537 */ 3538 Engine string `json:"engine"` 3539 /** 3540 * The engine's version. 3541 */ 3542 Version string `json:"version,omitempty"` 3543 } 3544 3545 /** 3546 * A full diagnostic report with a set of related documents. 3547 * 3548 * @since 3.17.0 - proposed state 3549 */ 3550 type RelatedFullDocumentDiagnosticReport struct { 3551 /** 3552 * Diagnostics of related documents. This information is useful 3553 * in programming languages where code in a file A can generate 3554 * diagnostics in a file B which A depends on. An example of 3555 * such a language is C/C++ where marco definitions in a file 3556 * a.cpp and result in errors in a header file b.hpp. 3557 * 3558 * @since 3.17.0 - proposed state 3559 */ 3560 RelatedDocuments map[string]interface{}/*[uri: string ** DocumentUri *]: FullDocumentDiagnosticReport | UnchangedDocumentDiagnosticReport;*/ `json:"relatedDocuments,omitempty"` 3561 FullDocumentDiagnosticReport 3562 } 3563 3564 /** 3565 * An unchanged diagnostic report with a set of related documents. 3566 * 3567 * @since 3.17.0 - proposed state 3568 */ 3569 type RelatedUnchangedDocumentDiagnosticReport struct { 3570 /** 3571 * Diagnostics of related documents. This information is useful 3572 * in programming languages where code in a file A can generate 3573 * diagnostics in a file B which A depends on. An example of 3574 * such a language is C/C++ where marco definitions in a file 3575 * a.cpp and result in errors in a header file b.hpp. 3576 * 3577 * @since 3.17.0 - proposed state 3578 */ 3579 RelatedDocuments map[string]interface{}/*[uri: string ** DocumentUri *]: FullDocumentDiagnosticReport | UnchangedDocumentDiagnosticReport;*/ `json:"relatedDocuments,omitempty"` 3580 UnchangedDocumentDiagnosticReport 3581 } 3582 3583 type RenameClientCapabilities struct { 3584 /** 3585 * Whether rename supports dynamic registration. 3586 */ 3587 DynamicRegistration bool `json:"dynamicRegistration,omitempty"` 3588 /** 3589 * Client supports testing for validity of rename operations 3590 * before execution. 3591 * 3592 * @since 3.12.0 3593 */ 3594 PrepareSupport bool `json:"prepareSupport,omitempty"` 3595 /** 3596 * Client supports the default behavior result. 3597 * 3598 * The value indicates the default behavior used by the 3599 * client. 3600 * 3601 * @since 3.16.0 3602 */ 3603 PrepareSupportDefaultBehavior PrepareSupportDefaultBehavior `json:"prepareSupportDefaultBehavior,omitempty"` 3604 /** 3605 * Whether th client honors the change annotations in 3606 * text edits and resource operations returned via the 3607 * rename request's workspace edit by for example presenting 3608 * the workspace edit in the user interface and asking 3609 * for confirmation. 3610 * 3611 * @since 3.16.0 3612 */ 3613 HonorsChangeAnnotations bool `json:"honorsChangeAnnotations,omitempty"` 3614 } 3615 3616 /** 3617 * Rename file operation 3618 */ 3619 type RenameFile struct { 3620 /** 3621 * A rename 3622 */ 3623 Kind string `json:"kind"` 3624 /** 3625 * The old (existing) location. 3626 */ 3627 OldURI DocumentURI `json:"oldUri"` 3628 /** 3629 * The new location. 3630 */ 3631 NewURI DocumentURI `json:"newUri"` 3632 /** 3633 * Rename options. 3634 */ 3635 Options RenameFileOptions `json:"options,omitempty"` 3636 ResourceOperation 3637 } 3638 3639 /** 3640 * Rename file options 3641 */ 3642 type RenameFileOptions struct { 3643 /** 3644 * Overwrite target if existing. Overwrite wins over `ignoreIfExists` 3645 */ 3646 Overwrite bool `json:"overwrite,omitempty"` 3647 /** 3648 * Ignores if target exists. 3649 */ 3650 IgnoreIfExists bool `json:"ignoreIfExists,omitempty"` 3651 } 3652 3653 /** 3654 * The parameters sent in file rename requests/notifications. 3655 * 3656 * @since 3.16.0 3657 */ 3658 type RenameFilesParams struct { 3659 /** 3660 * An array of all files/folders renamed in this operation. When a folder is renamed, only 3661 * the folder will be included, and not its children. 3662 */ 3663 Files []FileRename `json:"files"` 3664 } 3665 3666 /** 3667 * Provider options for a [RenameRequest](#RenameRequest). 3668 */ 3669 type RenameOptions struct { 3670 /** 3671 * Renames should be checked and tested before being executed. 3672 * 3673 * @since version 3.12.0 3674 */ 3675 PrepareProvider bool `json:"prepareProvider,omitempty"` 3676 WorkDoneProgressOptions 3677 } 3678 3679 /** 3680 * The parameters of a [RenameRequest](#RenameRequest). 3681 */ 3682 type RenameParams struct { 3683 /** 3684 * The document to rename. 3685 */ 3686 TextDocument TextDocumentIdentifier `json:"textDocument"` 3687 /** 3688 * The position at which this request was sent. 3689 */ 3690 Position Position `json:"position"` 3691 /** 3692 * The new name of the symbol. If the given name is not valid the 3693 * request must return a [ResponseError](#ResponseError) with an 3694 * appropriate message set. 3695 */ 3696 NewName string `json:"newName"` 3697 WorkDoneProgressParams 3698 } 3699 3700 /** 3701 * A generic resource operation. 3702 */ 3703 type ResourceOperation struct { 3704 /** 3705 * The resource operation kind. 3706 */ 3707 Kind string `json:"kind"` 3708 /** 3709 * An optional annotation identifier describing the operation. 3710 * 3711 * @since 3.16.0 3712 */ 3713 AnnotationID ChangeAnnotationIdentifier `json:"annotationId,omitempty"` 3714 } 3715 3716 type ResourceOperationKind string 3717 3718 /** 3719 * Save options. 3720 */ 3721 type SaveOptions struct { 3722 /** 3723 * The client is supposed to include the content on save. 3724 */ 3725 IncludeText bool `json:"includeText,omitempty"` 3726 } 3727 3728 /** 3729 * A selection range represents a part of a selection hierarchy. A selection range 3730 * may have a parent selection range that contains it. 3731 */ 3732 type SelectionRange struct { 3733 /** 3734 * The [range](#Range) of this selection range. 3735 */ 3736 Range Range `json:"range"` 3737 /** 3738 * The parent selection range containing this range. Therefore `parent.range` must contain `this.range`. 3739 */ 3740 Parent *SelectionRange `json:"parent,omitempty"` 3741 } 3742 3743 type SelectionRangeClientCapabilities struct { 3744 /** 3745 * Whether implementation supports dynamic registration for selection range providers. If this is set to `true` 3746 * the client supports the new `SelectionRangeRegistrationOptions` return value for the corresponding server 3747 * capability as well. 3748 */ 3749 DynamicRegistration bool `json:"dynamicRegistration,omitempty"` 3750 } 3751 3752 type SelectionRangeOptions struct { 3753 WorkDoneProgressOptions 3754 } 3755 3756 /** 3757 * A parameter literal used in selection range requests. 3758 */ 3759 type SelectionRangeParams struct { 3760 /** 3761 * The text document. 3762 */ 3763 TextDocument TextDocumentIdentifier `json:"textDocument"` 3764 /** 3765 * The positions inside the text document. 3766 */ 3767 Positions []Position `json:"positions"` 3768 WorkDoneProgressParams 3769 PartialResultParams 3770 } 3771 3772 type SelectionRangeRegistrationOptions struct { 3773 SelectionRangeOptions 3774 TextDocumentRegistrationOptions 3775 StaticRegistrationOptions 3776 } 3777 3778 /** 3779 * @since 3.16.0 3780 */ 3781 type SemanticTokens struct { 3782 /** 3783 * An optional result id. If provided and clients support delta updating 3784 * the client will include the result id in the next semantic token request. 3785 * A server can then instead of computing all semantic tokens again simply 3786 * send a delta. 3787 */ 3788 ResultID string `json:"resultId,omitempty"` 3789 /** 3790 * The actual tokens. 3791 */ 3792 Data []uint32 `json:"data"` 3793 } 3794 3795 /** 3796 * @since 3.16.0 3797 */ 3798 type SemanticTokensClientCapabilities struct { 3799 /** 3800 * Whether implementation supports dynamic registration. If this is set to `true` 3801 * the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` 3802 * return value for the corresponding server capability as well. 3803 */ 3804 DynamicRegistration bool `json:"dynamicRegistration,omitempty"` 3805 /** 3806 * Which requests the client supports and might send to the server 3807 * depending on the server's capability. Please note that clients might not 3808 * show semantic tokens or degrade some of the user experience if a range 3809 * or full request is advertised by the client but not provided by the 3810 * server. If for example the client capability `requests.full` and 3811 * `request.range` are both set to true but the server only provides a 3812 * range provider the client might not render a minimap correctly or might 3813 * even decide to not show any semantic tokens at all. 3814 */ 3815 Requests struct { 3816 /** 3817 * The client will send the `textDocument/semanticTokens/range` request if 3818 * the server provides a corresponding handler. 3819 */ 3820 Range bool/*boolean | { }*/ `json:"range,omitempty"` 3821 /** 3822 * The client will send the `textDocument/semanticTokens/full` request if 3823 * the server provides a corresponding handler. 3824 */ 3825 Full interface{}/*boolean | <elided struct>*/ `json:"full,omitempty"` 3826 } `json:"requests"` 3827 /** 3828 * The token types that the client supports. 3829 */ 3830 TokenTypes []string `json:"tokenTypes"` 3831 /** 3832 * The token modifiers that the client supports. 3833 */ 3834 TokenModifiers []string `json:"tokenModifiers"` 3835 /** 3836 * The token formats the clients supports. 3837 */ 3838 Formats []TokenFormat `json:"formats"` 3839 /** 3840 * Whether the client supports tokens that can overlap each other. 3841 */ 3842 OverlappingTokenSupport bool `json:"overlappingTokenSupport,omitempty"` 3843 /** 3844 * Whether the client supports tokens that can span multiple lines. 3845 */ 3846 MultilineTokenSupport bool `json:"multilineTokenSupport,omitempty"` 3847 /** 3848 * Whether the client allows the server to actively cancel a 3849 * semantic token request, e.g. supports returning 3850 * LSPErrorCodes.ServerCancelled. If a server does the client 3851 * needs to retrigger the request. 3852 * 3853 * @since 3.17.0 3854 */ 3855 ServerCancelSupport bool `json:"serverCancelSupport,omitempty"` 3856 /** 3857 * Whether the client uses semantic tokens to augment existing 3858 * syntax tokens. If set to `true` client side created syntax 3859 * tokens and semantic tokens are both used for colorization. If 3860 * set to `false` the client only uses the returned semantic tokens 3861 * for colorization. 3862 * 3863 * If the value is `undefined` then the client behavior is not 3864 * specified. 3865 * 3866 * @since 3.17.0 3867 */ 3868 AugmentsSyntaxTokens bool `json:"augmentsSyntaxTokens,omitempty"` 3869 } 3870 3871 /** 3872 * @since 3.16.0 3873 */ 3874 type SemanticTokensDelta struct { 3875 ResultID string `json:"resultId,omitempty"` 3876 /** 3877 * The semantic token edits to transform a previous result into a new result. 3878 */ 3879 Edits []SemanticTokensEdit `json:"edits"` 3880 } 3881 3882 /** 3883 * @since 3.16.0 3884 */ 3885 type SemanticTokensDeltaParams struct { 3886 /** 3887 * The text document. 3888 */ 3889 TextDocument TextDocumentIdentifier `json:"textDocument"` 3890 /** 3891 * The result id of a previous response. The result Id can either point to a full response 3892 * or a delta response depending on what was received last. 3893 */ 3894 PreviousResultID string `json:"previousResultId"` 3895 WorkDoneProgressParams 3896 PartialResultParams 3897 } 3898 3899 /** 3900 * @since 3.16.0 3901 */ 3902 type SemanticTokensEdit struct { 3903 /** 3904 * The start offset of the edit. 3905 */ 3906 Start uint32 `json:"start"` 3907 /** 3908 * The count of elements to remove. 3909 */ 3910 DeleteCount uint32 `json:"deleteCount"` 3911 /** 3912 * The elements to insert. 3913 */ 3914 Data []uint32 `json:"data,omitempty"` 3915 } 3916 3917 /** 3918 * @since 3.16.0 3919 */ 3920 type SemanticTokensLegend struct { 3921 /** 3922 * The token types a server uses. 3923 */ 3924 TokenTypes []string `json:"tokenTypes"` 3925 /** 3926 * The token modifiers a server uses. 3927 */ 3928 TokenModifiers []string `json:"tokenModifiers"` 3929 } 3930 3931 /** 3932 * @since 3.16.0 3933 */ 3934 type SemanticTokensOptions struct { 3935 /** 3936 * The legend used by the server 3937 */ 3938 Legend SemanticTokensLegend `json:"legend"` 3939 /** 3940 * Server supports providing semantic tokens for a specific range 3941 * of a document. 3942 */ 3943 Range bool/*boolean | { }*/ `json:"range,omitempty"` 3944 /** 3945 * Server supports providing semantic tokens for a full document. 3946 */ 3947 Full interface{}/*boolean | <elided struct>*/ `json:"full,omitempty"` 3948 WorkDoneProgressOptions 3949 } 3950 3951 /** 3952 * @since 3.16.0 3953 */ 3954 type SemanticTokensParams struct { 3955 /** 3956 * The text document. 3957 */ 3958 TextDocument TextDocumentIdentifier `json:"textDocument"` 3959 WorkDoneProgressParams 3960 PartialResultParams 3961 } 3962 3963 /** 3964 * @since 3.16.0 3965 */ 3966 type SemanticTokensRangeParams struct { 3967 /** 3968 * The text document. 3969 */ 3970 TextDocument TextDocumentIdentifier `json:"textDocument"` 3971 /** 3972 * The range the semantic tokens are requested for. 3973 */ 3974 Range Range `json:"range"` 3975 WorkDoneProgressParams 3976 PartialResultParams 3977 } 3978 3979 /** 3980 * @since 3.16.0 3981 */ 3982 type SemanticTokensRegistrationOptions struct { 3983 TextDocumentRegistrationOptions 3984 SemanticTokensOptions 3985 StaticRegistrationOptions 3986 } 3987 3988 /** 3989 * @since 3.16.0 3990 */ 3991 type SemanticTokensWorkspaceClientCapabilities struct { 3992 /** 3993 * Whether the client implementation supports a refresh request sent from 3994 * the server to the client. 3995 * 3996 * Note that this event is global and will force the client to refresh all 3997 * semantic tokens currently shown. It should be used with absolute care 3998 * and is useful for situation where a server for example detects a project 3999 * wide change that requires such a calculation. 4000 */ 4001 RefreshSupport bool `json:"refreshSupport,omitempty"` 4002 } 4003 4004 type ServerCapabilities struct { 4005 /** 4006 * Defines how text documents are synced. Is either a detailed structure defining each notification or 4007 * for backwards compatibility the TextDocumentSyncKind number. 4008 */ 4009 TextDocumentSync interface{}/*TextDocumentSyncOptions | TextDocumentSyncKind*/ `json:"textDocumentSync,omitempty"` 4010 /** 4011 * The server provides completion support. 4012 */ 4013 CompletionProvider CompletionOptions `json:"completionProvider,omitempty"` 4014 /** 4015 * The server provides hover support. 4016 */ 4017 HoverProvider bool/*boolean | HoverOptions*/ `json:"hoverProvider,omitempty"` 4018 /** 4019 * The server provides signature help support. 4020 */ 4021 SignatureHelpProvider SignatureHelpOptions `json:"signatureHelpProvider,omitempty"` 4022 /** 4023 * The server provides Goto Declaration support. 4024 */ 4025 DeclarationProvider interface{}/* bool | DeclarationOptions | DeclarationRegistrationOptions*/ `json:"declarationProvider,omitempty"` 4026 /** 4027 * The server provides goto definition support. 4028 */ 4029 DefinitionProvider bool/*boolean | DefinitionOptions*/ `json:"definitionProvider,omitempty"` 4030 /** 4031 * The server provides Goto Type Definition support. 4032 */ 4033 TypeDefinitionProvider interface{}/* bool | TypeDefinitionOptions | TypeDefinitionRegistrationOptions*/ `json:"typeDefinitionProvider,omitempty"` 4034 /** 4035 * The server provides Goto Implementation support. 4036 */ 4037 ImplementationProvider interface{}/* bool | ImplementationOptions | ImplementationRegistrationOptions*/ `json:"implementationProvider,omitempty"` 4038 /** 4039 * The server provides find references support. 4040 */ 4041 ReferencesProvider bool/*boolean | ReferenceOptions*/ `json:"referencesProvider,omitempty"` 4042 /** 4043 * The server provides document highlight support. 4044 */ 4045 DocumentHighlightProvider bool/*boolean | DocumentHighlightOptions*/ `json:"documentHighlightProvider,omitempty"` 4046 /** 4047 * The server provides document symbol support. 4048 */ 4049 DocumentSymbolProvider bool/*boolean | DocumentSymbolOptions*/ `json:"documentSymbolProvider,omitempty"` 4050 /** 4051 * The server provides code actions. CodeActionOptions may only be 4052 * specified if the client states that it supports 4053 * `codeActionLiteralSupport` in its initial `initialize` request. 4054 */ 4055 CodeActionProvider interface{}/*boolean | CodeActionOptions*/ `json:"codeActionProvider,omitempty"` 4056 /** 4057 * The server provides code lens. 4058 */ 4059 CodeLensProvider CodeLensOptions `json:"codeLensProvider,omitempty"` 4060 /** 4061 * The server provides document link support. 4062 */ 4063 DocumentLinkProvider DocumentLinkOptions `json:"documentLinkProvider,omitempty"` 4064 /** 4065 * The server provides color provider support. 4066 */ 4067 ColorProvider interface{}/* bool | DocumentColorOptions | DocumentColorRegistrationOptions*/ `json:"colorProvider,omitempty"` 4068 /** 4069 * The server provides workspace symbol support. 4070 */ 4071 WorkspaceSymbolProvider bool/*boolean | WorkspaceSymbolOptions*/ `json:"workspaceSymbolProvider,omitempty"` 4072 /** 4073 * The server provides document formatting. 4074 */ 4075 DocumentFormattingProvider bool/*boolean | DocumentFormattingOptions*/ `json:"documentFormattingProvider,omitempty"` 4076 /** 4077 * The server provides document range formatting. 4078 */ 4079 DocumentRangeFormattingProvider bool/*boolean | DocumentRangeFormattingOptions*/ `json:"documentRangeFormattingProvider,omitempty"` 4080 /** 4081 * The server provides document formatting on typing. 4082 */ 4083 DocumentOnTypeFormattingProvider DocumentOnTypeFormattingOptions `json:"documentOnTypeFormattingProvider,omitempty"` 4084 /** 4085 * The server provides rename support. RenameOptions may only be 4086 * specified if the client states that it supports 4087 * `prepareSupport` in its initial `initialize` request. 4088 */ 4089 RenameProvider interface{}/*boolean | RenameOptions*/ `json:"renameProvider,omitempty"` 4090 /** 4091 * The server provides folding provider support. 4092 */ 4093 FoldingRangeProvider interface{}/* bool | FoldingRangeOptions | FoldingRangeRegistrationOptions*/ `json:"foldingRangeProvider,omitempty"` 4094 /** 4095 * The server provides selection range support. 4096 */ 4097 SelectionRangeProvider interface{}/* bool | SelectionRangeOptions | SelectionRangeRegistrationOptions*/ `json:"selectionRangeProvider,omitempty"` 4098 /** 4099 * The server provides execute command support. 4100 */ 4101 ExecuteCommandProvider ExecuteCommandOptions `json:"executeCommandProvider,omitempty"` 4102 /** 4103 * The server provides call hierarchy support. 4104 * 4105 * @since 3.16.0 4106 */ 4107 CallHierarchyProvider interface{}/* bool | CallHierarchyOptions | CallHierarchyRegistrationOptions*/ `json:"callHierarchyProvider,omitempty"` 4108 /** 4109 * The server provides linked editing range support. 4110 * 4111 * @since 3.16.0 4112 */ 4113 LinkedEditingRangeProvider interface{}/* bool | LinkedEditingRangeOptions | LinkedEditingRangeRegistrationOptions*/ `json:"linkedEditingRangeProvider,omitempty"` 4114 /** 4115 * The server provides semantic tokens support. 4116 * 4117 * @since 3.16.0 4118 */ 4119 SemanticTokensProvider interface{}/*SemanticTokensOptions | SemanticTokensRegistrationOptions*/ `json:"semanticTokensProvider,omitempty"` 4120 /** 4121 * The workspace server capabilities 4122 */ 4123 Workspace Workspace6Gn `json:"workspace,omitempty"` 4124 /** 4125 * The server provides moniker support. 4126 * 4127 * @since 3.16.0 4128 */ 4129 MonikerProvider interface{}/* bool | MonikerOptions | MonikerRegistrationOptions*/ `json:"monikerProvider,omitempty"` 4130 /** 4131 * The server provides type hierarchy support. 4132 * 4133 * @since 3.17.0 - proposed state 4134 */ 4135 TypeHierarchyProvider interface{}/* bool | TypeHierarchyOptions | TypeHierarchyRegistrationOptions*/ `json:"typeHierarchyProvider,omitempty"` 4136 /** 4137 * The server provides inline values. 4138 * 4139 * @since 3.17.0 - proposed state 4140 */ 4141 InlineValuesProvider interface{}/* bool | InlineValuesOptions | InlineValuesRegistrationOptions*/ `json:"inlineValuesProvider,omitempty"` 4142 /** 4143 * Experimental server capabilities. 4144 */ 4145 Experimental interface{} `json:"experimental,omitempty"` 4146 } 4147 4148 type SetTraceParams struct { 4149 Value TraceValues `json:"value"` 4150 } 4151 4152 /** 4153 * Client capabilities for the show document request. 4154 * 4155 * @since 3.16.0 4156 */ 4157 type ShowDocumentClientCapabilities struct { 4158 /** 4159 * The client has support for the show document 4160 * request. 4161 */ 4162 Support bool `json:"support"` 4163 } 4164 4165 /** 4166 * Params to show a document. 4167 * 4168 * @since 3.16.0 4169 */ 4170 type ShowDocumentParams struct { 4171 /** 4172 * The document uri to show. 4173 */ 4174 URI URI `json:"uri"` 4175 /** 4176 * Indicates to show the resource in an external program. 4177 * To show for example `https://code.visualstudio.com/` 4178 * in the default WEB browser set `external` to `true`. 4179 */ 4180 External bool `json:"external,omitempty"` 4181 /** 4182 * An optional property to indicate whether the editor 4183 * showing the document should take focus or not. 4184 * Clients might ignore this property if an external 4185 * program in started. 4186 */ 4187 TakeFocus bool `json:"takeFocus,omitempty"` 4188 /** 4189 * An optional selection range if the document is a text 4190 * document. Clients might ignore the property if an 4191 * external program is started or the file is not a text 4192 * file. 4193 */ 4194 Selection Range `json:"selection,omitempty"` 4195 } 4196 4197 /** 4198 * The result of an show document request. 4199 * 4200 * @since 3.16.0 4201 */ 4202 type ShowDocumentResult struct { 4203 /** 4204 * A boolean indicating if the show was successful. 4205 */ 4206 Success bool `json:"success"` 4207 } 4208 4209 /** 4210 * The parameters of a notification message. 4211 */ 4212 type ShowMessageParams struct { 4213 /** 4214 * The message type. See {@link MessageType} 4215 */ 4216 Type MessageType `json:"type"` 4217 /** 4218 * The actual message 4219 */ 4220 Message string `json:"message"` 4221 } 4222 4223 /** 4224 * Show message request client capabilities 4225 */ 4226 type ShowMessageRequestClientCapabilities struct { 4227 /** 4228 * Capabilities specific to the `MessageActionItem` type. 4229 */ 4230 MessageActionItem struct { 4231 /** 4232 * Whether the client supports additional attributes which 4233 * are preserved and send back to the server in the 4234 * request's response. 4235 */ 4236 AdditionalPropertiesSupport bool `json:"additionalPropertiesSupport,omitempty"` 4237 } `json:"messageActionItem,omitempty"` 4238 } 4239 4240 type ShowMessageRequestParams struct { 4241 /** 4242 * The message type. See {@link MessageType} 4243 */ 4244 Type MessageType `json:"type"` 4245 /** 4246 * The actual message 4247 */ 4248 Message string `json:"message"` 4249 /** 4250 * The message action items to present. 4251 */ 4252 Actions []MessageActionItem `json:"actions,omitempty"` 4253 } 4254 4255 /** 4256 * Signature help represents the signature of something 4257 * callable. There can be multiple signature but only one 4258 * active and only one active parameter. 4259 */ 4260 type SignatureHelp struct { 4261 /** 4262 * One or more signatures. 4263 */ 4264 Signatures []SignatureInformation `json:"signatures"` 4265 /** 4266 * The active signature. If omitted or the value lies outside the 4267 * range of `signatures` the value defaults to zero or is ignored if 4268 * the `SignatureHelp` has no signatures. 4269 * 4270 * Whenever possible implementors should make an active decision about 4271 * the active signature and shouldn't rely on a default value. 4272 * 4273 * In future version of the protocol this property might become 4274 * mandatory to better express this. 4275 */ 4276 ActiveSignature uint32 `json:"activeSignature,omitempty"` 4277 /** 4278 * The active parameter of the active signature. If omitted or the value 4279 * lies outside the range of `signatures[activeSignature].parameters` 4280 * defaults to 0 if the active signature has parameters. If 4281 * the active signature has no parameters it is ignored. 4282 * In future version of the protocol this property might become 4283 * mandatory to better express the active parameter if the 4284 * active signature does have any. 4285 */ 4286 ActiveParameter uint32 `json:"activeParameter,omitempty"` 4287 } 4288 4289 /** 4290 * Client Capabilities for a [SignatureHelpRequest](#SignatureHelpRequest). 4291 */ 4292 type SignatureHelpClientCapabilities struct { 4293 /** 4294 * Whether signature help supports dynamic registration. 4295 */ 4296 DynamicRegistration bool `json:"dynamicRegistration,omitempty"` 4297 /** 4298 * The client supports the following `SignatureInformation` 4299 * specific properties. 4300 */ 4301 SignatureInformation struct { 4302 /** 4303 * Client supports the follow content formats for the documentation 4304 * property. The order describes the preferred format of the client. 4305 */ 4306 DocumentationFormat []MarkupKind `json:"documentationFormat,omitempty"` 4307 /** 4308 * Client capabilities specific to parameter information. 4309 */ 4310 ParameterInformation struct { 4311 /** 4312 * The client supports processing label offsets instead of a 4313 * simple label string. 4314 * 4315 * @since 3.14.0 4316 */ 4317 LabelOffsetSupport bool `json:"labelOffsetSupport,omitempty"` 4318 } `json:"parameterInformation,omitempty"` 4319 /** 4320 * The client support the `activeParameter` property on `SignatureInformation` 4321 * literal. 4322 * 4323 * @since 3.16.0 4324 */ 4325 ActiveParameterSupport bool `json:"activeParameterSupport,omitempty"` 4326 } `json:"signatureInformation,omitempty"` 4327 /** 4328 * The client supports to send additional context information for a 4329 * `textDocument/signatureHelp` request. A client that opts into 4330 * contextSupport will also support the `retriggerCharacters` on 4331 * `SignatureHelpOptions`. 4332 * 4333 * @since 3.15.0 4334 */ 4335 ContextSupport bool `json:"contextSupport,omitempty"` 4336 } 4337 4338 /** 4339 * Additional information about the context in which a signature help request was triggered. 4340 * 4341 * @since 3.15.0 4342 */ 4343 type SignatureHelpContext struct { 4344 /** 4345 * Action that caused signature help to be triggered. 4346 */ 4347 TriggerKind SignatureHelpTriggerKind `json:"triggerKind"` 4348 /** 4349 * Character that caused signature help to be triggered. 4350 * 4351 * This is undefined when `triggerKind !== SignatureHelpTriggerKind.TriggerCharacter` 4352 */ 4353 TriggerCharacter string `json:"triggerCharacter,omitempty"` 4354 /** 4355 * `true` if signature help was already showing when it was triggered. 4356 * 4357 * Retrigger occurs when the signature help is already active and can be caused by actions such as 4358 * typing a trigger character, a cursor move, or document content changes. 4359 */ 4360 IsRetrigger bool `json:"isRetrigger"` 4361 /** 4362 * The currently active `SignatureHelp`. 4363 * 4364 * The `activeSignatureHelp` has its `SignatureHelp.activeSignature` field updated based on 4365 * the user navigating through available signatures. 4366 */ 4367 ActiveSignatureHelp SignatureHelp `json:"activeSignatureHelp,omitempty"` 4368 } 4369 4370 /** 4371 * Server Capabilities for a [SignatureHelpRequest](#SignatureHelpRequest). 4372 */ 4373 type SignatureHelpOptions struct { 4374 /** 4375 * List of characters that trigger signature help. 4376 */ 4377 TriggerCharacters []string `json:"triggerCharacters,omitempty"` 4378 /** 4379 * List of characters that re-trigger signature help. 4380 * 4381 * These trigger characters are only active when signature help is already showing. All trigger characters 4382 * are also counted as re-trigger characters. 4383 * 4384 * @since 3.15.0 4385 */ 4386 RetriggerCharacters []string `json:"retriggerCharacters,omitempty"` 4387 WorkDoneProgressOptions 4388 } 4389 4390 /** 4391 * Parameters for a [SignatureHelpRequest](#SignatureHelpRequest). 4392 */ 4393 type SignatureHelpParams struct { 4394 /** 4395 * The signature help context. This is only available if the client specifies 4396 * to send this using the client capability `textDocument.signatureHelp.contextSupport === true` 4397 * 4398 * @since 3.15.0 4399 */ 4400 Context SignatureHelpContext `json:"context,omitempty"` 4401 TextDocumentPositionParams 4402 WorkDoneProgressParams 4403 } 4404 4405 /** 4406 * How a signature help was triggered. 4407 * 4408 * @since 3.15.0 4409 */ 4410 type SignatureHelpTriggerKind float64 4411 4412 /** 4413 * Represents the signature of something callable. A signature 4414 * can have a label, like a function-name, a doc-comment, and 4415 * a set of parameters. 4416 */ 4417 type SignatureInformation struct { 4418 /** 4419 * The label of this signature. Will be shown in 4420 * the UI. 4421 */ 4422 Label string `json:"label"` 4423 /** 4424 * The human-readable doc-comment of this signature. Will be shown 4425 * in the UI but can be omitted. 4426 */ 4427 Documentation string/*string | MarkupContent*/ `json:"documentation,omitempty"` 4428 /** 4429 * The parameters of this signature. 4430 */ 4431 Parameters []ParameterInformation `json:"parameters,omitempty"` 4432 /** 4433 * The index of the active parameter. 4434 * 4435 * If provided, this is used in place of `SignatureHelp.activeParameter`. 4436 * 4437 * @since 3.16.0 4438 */ 4439 ActiveParameter uint32 `json:"activeParameter,omitempty"` 4440 } 4441 4442 /** 4443 * Static registration options to be returned in the initialize 4444 * request. 4445 */ 4446 type StaticRegistrationOptions struct { 4447 /** 4448 * The id used to register the request. The id can be used to deregister 4449 * the request again. See also Registration#id. 4450 */ 4451 ID string `json:"id,omitempty"` 4452 } 4453 4454 /** 4455 * Represents information about programming constructs like variables, classes, 4456 * interfaces etc. 4457 */ 4458 type SymbolInformation struct { 4459 /** 4460 * The name of this symbol. 4461 */ 4462 Name string `json:"name"` 4463 /** 4464 * The kind of this symbol. 4465 */ 4466 Kind SymbolKind `json:"kind"` 4467 /** 4468 * Tags for this completion item. 4469 * 4470 * @since 3.16.0 4471 */ 4472 Tags []SymbolTag `json:"tags,omitempty"` 4473 /** 4474 * Indicates if this symbol is deprecated. 4475 * 4476 * @deprecated Use tags instead 4477 */ 4478 Deprecated bool `json:"deprecated,omitempty"` 4479 /** 4480 * The location of this symbol. The location's range is used by a tool 4481 * to reveal the location in the editor. If the symbol is selected in the 4482 * tool the range's start information is used to position the cursor. So 4483 * the range usually spans more than the actual symbol's name and does 4484 * normally include thinks like visibility modifiers. 4485 * 4486 * The range doesn't have to denote a node range in the sense of a abstract 4487 * syntax tree. It can therefore not be used to re-construct a hierarchy of 4488 * the symbols. 4489 */ 4490 Location Location `json:"location"` 4491 /** 4492 * The name of the symbol containing this symbol. This information is for 4493 * user interface purposes (e.g. to render a qualifier in the user interface 4494 * if necessary). It can't be used to re-infer a hierarchy for the document 4495 * symbols. 4496 */ 4497 ContainerName string `json:"containerName,omitempty"` 4498 } 4499 4500 /** 4501 * A symbol kind. 4502 */ 4503 type SymbolKind float64 4504 4505 /** 4506 * Symbol tags are extra annotations that tweak the rendering of a symbol. 4507 * @since 3.16 4508 */ 4509 type SymbolTag float64 4510 4511 /** 4512 * Text document specific client capabilities. 4513 */ 4514 type TextDocumentClientCapabilities struct { 4515 /** 4516 * Defines which synchronization capabilities the client supports. 4517 */ 4518 Synchronization TextDocumentSyncClientCapabilities `json:"synchronization,omitempty"` 4519 /** 4520 * Capabilities specific to the `textDocument/completion` 4521 */ 4522 Completion CompletionClientCapabilities `json:"completion,omitempty"` 4523 /** 4524 * Capabilities specific to the `textDocument/hover` 4525 */ 4526 Hover HoverClientCapabilities `json:"hover,omitempty"` 4527 /** 4528 * Capabilities specific to the `textDocument/signatureHelp` 4529 */ 4530 SignatureHelp SignatureHelpClientCapabilities `json:"signatureHelp,omitempty"` 4531 /** 4532 * Capabilities specific to the `textDocument/declaration` 4533 * 4534 * @since 3.14.0 4535 */ 4536 Declaration DeclarationClientCapabilities `json:"declaration,omitempty"` 4537 /** 4538 * Capabilities specific to the `textDocument/definition` 4539 */ 4540 Definition DefinitionClientCapabilities `json:"definition,omitempty"` 4541 /** 4542 * Capabilities specific to the `textDocument/typeDefinition` 4543 * 4544 * @since 3.6.0 4545 */ 4546 TypeDefinition TypeDefinitionClientCapabilities `json:"typeDefinition,omitempty"` 4547 /** 4548 * Capabilities specific to the `textDocument/implementation` 4549 * 4550 * @since 3.6.0 4551 */ 4552 Implementation ImplementationClientCapabilities `json:"implementation,omitempty"` 4553 /** 4554 * Capabilities specific to the `textDocument/references` 4555 */ 4556 References ReferenceClientCapabilities `json:"references,omitempty"` 4557 /** 4558 * Capabilities specific to the `textDocument/documentHighlight` 4559 */ 4560 DocumentHighlight DocumentHighlightClientCapabilities `json:"documentHighlight,omitempty"` 4561 /** 4562 * Capabilities specific to the `textDocument/documentSymbol` 4563 */ 4564 DocumentSymbol DocumentSymbolClientCapabilities `json:"documentSymbol,omitempty"` 4565 /** 4566 * Capabilities specific to the `textDocument/codeAction` 4567 */ 4568 CodeAction CodeActionClientCapabilities `json:"codeAction,omitempty"` 4569 /** 4570 * Capabilities specific to the `textDocument/codeLens` 4571 */ 4572 CodeLens CodeLensClientCapabilities `json:"codeLens,omitempty"` 4573 /** 4574 * Capabilities specific to the `textDocument/documentLink` 4575 */ 4576 DocumentLink DocumentLinkClientCapabilities `json:"documentLink,omitempty"` 4577 /** 4578 * Capabilities specific to the `textDocument/documentColor` 4579 */ 4580 ColorProvider DocumentColorClientCapabilities `json:"colorProvider,omitempty"` 4581 /** 4582 * Capabilities specific to the `textDocument/formatting` 4583 */ 4584 Formatting DocumentFormattingClientCapabilities `json:"formatting,omitempty"` 4585 /** 4586 * Capabilities specific to the `textDocument/rangeFormatting` 4587 */ 4588 RangeFormatting DocumentRangeFormattingClientCapabilities `json:"rangeFormatting,omitempty"` 4589 /** 4590 * Capabilities specific to the `textDocument/onTypeFormatting` 4591 */ 4592 OnTypeFormatting DocumentOnTypeFormattingClientCapabilities `json:"onTypeFormatting,omitempty"` 4593 /** 4594 * Capabilities specific to the `textDocument/rename` 4595 */ 4596 Rename RenameClientCapabilities `json:"rename,omitempty"` 4597 /** 4598 * Capabilities specific to `textDocument/foldingRange` request. 4599 * 4600 * @since 3.10.0 4601 */ 4602 FoldingRange FoldingRangeClientCapabilities `json:"foldingRange,omitempty"` 4603 /** 4604 * Capabilities specific to `textDocument/selectionRange` request. 4605 * 4606 * @since 3.15.0 4607 */ 4608 SelectionRange SelectionRangeClientCapabilities `json:"selectionRange,omitempty"` 4609 /** 4610 * Capabilities specific to `textDocument/publishDiagnostics` notification. 4611 */ 4612 PublishDiagnostics PublishDiagnosticsClientCapabilities `json:"publishDiagnostics,omitempty"` 4613 /** 4614 * Capabilities specific to the various call hierarchy request. 4615 * 4616 * @since 3.16.0 4617 */ 4618 CallHierarchy CallHierarchyClientCapabilities `json:"callHierarchy,omitempty"` 4619 /** 4620 * Capabilities specific to the various semantic token request. 4621 * 4622 * @since 3.16.0 4623 */ 4624 SemanticTokens SemanticTokensClientCapabilities `json:"semanticTokens,omitempty"` 4625 /** 4626 * Capabilities specific to the linked editing range request. 4627 * 4628 * @since 3.16.0 4629 */ 4630 LinkedEditingRange LinkedEditingRangeClientCapabilities `json:"linkedEditingRange,omitempty"` 4631 /** 4632 * Client capabilities specific to the moniker request. 4633 * 4634 * @since 3.16.0 4635 */ 4636 Moniker MonikerClientCapabilities `json:"moniker,omitempty"` 4637 /** 4638 * Capabilities specific to the various type hierarchy requests. 4639 * 4640 * @since 3.17.0 - proposed state 4641 */ 4642 TypeHierarchy TypeHierarchyClientCapabilities `json:"typeHierarchy,omitempty"` 4643 /** 4644 * Capabilities specific to the `textDocument/inlineValues` request. 4645 * 4646 * @since 3.17.0 - proposed state 4647 */ 4648 InlineValues InlineValuesClientCapabilities `json:"inlineValues,omitempty"` 4649 } 4650 4651 /** 4652 * An event describing a change to a text document. If range and rangeLength are omitted 4653 * the new text is considered to be the full content of the document. 4654 */ 4655 type TextDocumentContentChangeEvent = struct { 4656 /** 4657 * The range of the document that changed. 4658 */ 4659 Range *Range `json:"range,omitempty"` 4660 /** 4661 * The optional length of the range that got replaced. 4662 * 4663 * @deprecated use range instead. 4664 */ 4665 RangeLength uint32 `json:"rangeLength,omitempty"` 4666 /** 4667 * The new text for the provided range. 4668 */ 4669 Text string `json:"text"` 4670 } 4671 4672 /** 4673 * Describes textual changes on a text document. A TextDocumentEdit describes all changes 4674 * on a document version Si and after they are applied move the document to version Si+1. 4675 * So the creator of a TextDocumentEdit doesn't need to sort the array of edits or do any 4676 * kind of ordering. However the edits must be non overlapping. 4677 */ 4678 type TextDocumentEdit struct { 4679 /** 4680 * The text document to change. 4681 */ 4682 TextDocument OptionalVersionedTextDocumentIdentifier `json:"textDocument"` 4683 /** 4684 * The edits to be applied. 4685 * 4686 * @since 3.16.0 - support for AnnotatedTextEdit. This is guarded using a 4687 * client capability. 4688 */ 4689 Edits []TextEdit/*TextEdit | AnnotatedTextEdit*/ `json:"edits"` 4690 } 4691 4692 /** 4693 * A document filter denotes a document by different properties like 4694 * the [language](#TextDocument.languageId), the [scheme](#Uri.scheme) of 4695 * its resource, or a glob-pattern that is applied to the [path](#TextDocument.fileName). 4696 * 4697 * Glob patterns can have the following syntax: 4698 * - `*` to match one or more characters in a path segment 4699 * - `?` to match on one character in a path segment 4700 * - `**` to match any number of path segments, including none 4701 * - `{}` to group sub patterns into an OR expression. (e.g. `**/*.{ts,js}` matches all TypeScript and JavaScript files) 4702 * - `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …) 4703 * - `[!...]` 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`) 4704 * 4705 * @sample A language filter that applies to typescript files on disk: `{ language: 'typescript', scheme: 'file' }` 4706 * @sample A language filter that applies to all package.json paths: `{ language: 'json', pattern: '**package.json' }` 4707 * 4708 * @since 3.17.0 - proposed state. 4709 */ 4710 type TextDocumentFilter = struct { 4711 /** A language id, like `typescript`. */ 4712 Language string `json:"language"` 4713 /** A Uri [scheme](#Uri.scheme), like `file` or `untitled`. */ 4714 Scheme string `json:"scheme,omitempty"` 4715 /** A glob pattern, like `*.{ts,js}`. */ 4716 Pattern string `json:"pattern,omitempty"` 4717 } 4718 4719 /** 4720 * A literal to identify a text document in the client. 4721 */ 4722 type TextDocumentIdentifier struct { 4723 /** 4724 * The text document's uri. 4725 */ 4726 URI DocumentURI `json:"uri"` 4727 } 4728 4729 /** 4730 * An item to transfer a text document from the client to the 4731 * server. 4732 */ 4733 type TextDocumentItem struct { 4734 /** 4735 * The text document's uri. 4736 */ 4737 URI DocumentURI `json:"uri"` 4738 /** 4739 * The text document's language identifier 4740 */ 4741 LanguageID string `json:"languageId"` 4742 /** 4743 * The version number of this document (it will increase after each 4744 * change, including undo/redo). 4745 */ 4746 Version int32 `json:"version"` 4747 /** 4748 * The content of the opened text document. 4749 */ 4750 Text string `json:"text"` 4751 } 4752 4753 /** 4754 * A parameter literal used in requests to pass a text document and a position inside that 4755 * document. 4756 */ 4757 type TextDocumentPositionParams struct { 4758 /** 4759 * The text document. 4760 */ 4761 TextDocument TextDocumentIdentifier `json:"textDocument"` 4762 /** 4763 * The position inside the text document. 4764 */ 4765 Position Position `json:"position"` 4766 } 4767 4768 /** 4769 * General text document registration options. 4770 */ 4771 type TextDocumentRegistrationOptions struct { 4772 /** 4773 * A document selector to identify the scope of the registration. If set to null 4774 * the document selector provided on the client side will be used. 4775 */ 4776 DocumentSelector DocumentSelector /*DocumentSelector | null*/ `json:"documentSelector"` 4777 } 4778 4779 /** 4780 * Represents reasons why a text document is saved. 4781 */ 4782 type TextDocumentSaveReason float64 4783 4784 type TextDocumentSyncClientCapabilities struct { 4785 /** 4786 * Whether text document synchronization supports dynamic registration. 4787 */ 4788 DynamicRegistration bool `json:"dynamicRegistration,omitempty"` 4789 /** 4790 * The client supports sending will save notifications. 4791 */ 4792 WillSave bool `json:"willSave,omitempty"` 4793 /** 4794 * The client supports sending a will save request and 4795 * waits for a response providing text edits which will 4796 * be applied to the document before it is saved. 4797 */ 4798 WillSaveWaitUntil bool `json:"willSaveWaitUntil,omitempty"` 4799 /** 4800 * The client supports did save notifications. 4801 */ 4802 DidSave bool `json:"didSave,omitempty"` 4803 } 4804 4805 /** 4806 * Defines how the host (editor) should sync 4807 * document changes to the language server. 4808 */ 4809 type TextDocumentSyncKind float64 4810 4811 type TextDocumentSyncOptions struct { 4812 /** 4813 * Open and close notifications are sent to the server. If omitted open close notification should not 4814 * be sent. 4815 */ 4816 OpenClose bool `json:"openClose,omitempty"` 4817 /** 4818 * Change notifications are sent to the server. See TextDocumentSyncKind.None, TextDocumentSyncKind.Full 4819 * and TextDocumentSyncKind.Incremental. If omitted it defaults to TextDocumentSyncKind.None. 4820 */ 4821 Change TextDocumentSyncKind `json:"change,omitempty"` 4822 /** 4823 * If present will save notifications are sent to the server. If omitted the notification should not be 4824 * sent. 4825 */ 4826 WillSave bool `json:"willSave,omitempty"` 4827 /** 4828 * If present will save wait until requests are sent to the server. If omitted the request should not be 4829 * sent. 4830 */ 4831 WillSaveWaitUntil bool `json:"willSaveWaitUntil,omitempty"` 4832 /** 4833 * If present save notifications are sent to the server. If omitted the notification should not be 4834 * sent. 4835 */ 4836 Save SaveOptions/*boolean | SaveOptions*/ `json:"save,omitempty"` 4837 } 4838 4839 /** 4840 * A text edit applicable to a text document. 4841 */ 4842 type TextEdit struct { 4843 /** 4844 * The range of the text document to be manipulated. To insert 4845 * text into a document create a range where start === end. 4846 */ 4847 Range Range `json:"range"` 4848 /** 4849 * The string to be inserted. For delete operations use an 4850 * empty string. 4851 */ 4852 NewText string `json:"newText"` 4853 } 4854 4855 type TokenFormat = string 4856 4857 type TraceValues = string /* 'off' | 'messages' | 'compact' | 'verbose' */ 4858 4859 /** 4860 * Since 3.6.0 4861 */ 4862 type TypeDefinitionClientCapabilities struct { 4863 /** 4864 * Whether implementation supports dynamic registration. If this is set to `true` 4865 * the client supports the new `TypeDefinitionRegistrationOptions` return value 4866 * for the corresponding server capability as well. 4867 */ 4868 DynamicRegistration bool `json:"dynamicRegistration,omitempty"` 4869 /** 4870 * The client supports additional metadata in the form of definition links. 4871 * 4872 * Since 3.14.0 4873 */ 4874 LinkSupport bool `json:"linkSupport,omitempty"` 4875 } 4876 4877 type TypeDefinitionOptions struct { 4878 WorkDoneProgressOptions 4879 } 4880 4881 type TypeDefinitionParams struct { 4882 TextDocumentPositionParams 4883 WorkDoneProgressParams 4884 PartialResultParams 4885 } 4886 4887 type TypeDefinitionRegistrationOptions struct { 4888 TextDocumentRegistrationOptions 4889 TypeDefinitionOptions 4890 StaticRegistrationOptions 4891 } 4892 4893 /** 4894 * @since 3.17.0 - proposed state 4895 */ 4896 type TypeHierarchyClientCapabilities struct { 4897 /** 4898 * Whether implementation supports dynamic registration. If this is set to `true` 4899 * the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` 4900 * return value for the corresponding server capability as well. 4901 */ 4902 DynamicRegistration bool `json:"dynamicRegistration,omitempty"` 4903 } 4904 4905 /** 4906 * @since 3.17.0 - proposed state 4907 */ 4908 type TypeHierarchyItem struct { 4909 /** 4910 * The name of this item. 4911 */ 4912 Name string `json:"name"` 4913 /** 4914 * The kind of this item. 4915 */ 4916 Kind SymbolKind `json:"kind"` 4917 /** 4918 * Tags for this item. 4919 */ 4920 Tags []SymbolTag `json:"tags,omitempty"` 4921 /** 4922 * More detail for this item, e.g. the signature of a function. 4923 */ 4924 Detail string `json:"detail,omitempty"` 4925 /** 4926 * The resource identifier of this item. 4927 */ 4928 URI DocumentURI `json:"uri"` 4929 /** 4930 * The range enclosing this symbol not including leading/trailing whitespace 4931 * but everything else, e.g. comments and code. 4932 */ 4933 Range Range `json:"range"` 4934 /** 4935 * The range that should be selected and revealed when this symbol is being 4936 * picked, e.g. the name of a function. Must be contained by the 4937 * [`range`](#TypeHierarchyItem.range). 4938 */ 4939 SelectionRange Range `json:"selectionRange"` 4940 /** 4941 * A data entry field that is preserved between a type hierarchy prepare and 4942 * supertypes or subtypes requests. It could also be used to identify the 4943 * type hierarchy in the server, helping improve the performance on 4944 * resolving supertypes and subtypes. 4945 */ 4946 Data LSPAny `json:"data,omitempty"` 4947 } 4948 4949 /** 4950 * Type hierarchy options used during static registration. 4951 * 4952 * @since 3.17.0 - proposed state 4953 */ 4954 type TypeHierarchyOptions struct { 4955 WorkDoneProgressOptions 4956 } 4957 4958 /** 4959 * The parameter of a `textDocument/prepareTypeHierarchy` request. 4960 * 4961 * @since 3.17.0 - proposed state 4962 */ 4963 type TypeHierarchyPrepareParams struct { 4964 TextDocumentPositionParams 4965 WorkDoneProgressParams 4966 } 4967 4968 /** 4969 * Type hierarchy options used during static or dynamic registration. 4970 * 4971 * @since 3.17.0 - proposed state 4972 */ 4973 type TypeHierarchyRegistrationOptions struct { 4974 TextDocumentRegistrationOptions 4975 TypeHierarchyOptions 4976 StaticRegistrationOptions 4977 } 4978 4979 /** 4980 * The parameter of a `typeHierarchy/subtypes` request. 4981 * 4982 * @since 3.17.0 - proposed state 4983 */ 4984 type TypeHierarchySubtypesParams struct { 4985 Item TypeHierarchyItem `json:"item"` 4986 WorkDoneProgressParams 4987 PartialResultParams 4988 } 4989 4990 /** 4991 * The parameter of a `typeHierarchy/supertypes` request. 4992 * 4993 * @since 3.17.0 - proposed state 4994 */ 4995 type TypeHierarchySupertypesParams struct { 4996 Item TypeHierarchyItem `json:"item"` 4997 WorkDoneProgressParams 4998 PartialResultParams 4999 } 5000 5001 /** 5002 * A tagging type for string properties that are actually URIs 5003 * 5004 * @since 3.16.0 5005 */ 5006 type URI = string 5007 5008 /** 5009 * A diagnostic report indicating that the last returned 5010 * report is still accurate. 5011 * 5012 * @since 3.17.0 - proposed state 5013 */ 5014 type UnchangedDocumentDiagnosticReport struct { 5015 /** 5016 * A document diagnostic report indicating 5017 * no changes to the last result. A server can 5018 * only return `unchanged` if result ids are 5019 * provided. 5020 */ 5021 Kind string `json:"kind"` 5022 /** 5023 * A result id which will be sent on the next 5024 * diagnostic request for the same document. 5025 */ 5026 ResultID string `json:"resultId"` 5027 } 5028 5029 /** 5030 * Moniker uniqueness level to define scope of the moniker. 5031 * 5032 * @since 3.16.0 5033 */ 5034 type UniquenessLevel string 5035 5036 /** 5037 * General parameters to unregister a request or notification. 5038 */ 5039 type Unregistration struct { 5040 /** 5041 * The id used to unregister the request or notification. Usually an id 5042 * provided during the register request. 5043 */ 5044 ID string `json:"id"` 5045 /** 5046 * The method to unregister for. 5047 */ 5048 Method string `json:"method"` 5049 } 5050 5051 type UnregistrationParams struct { 5052 Unregisterations []Unregistration `json:"unregisterations"` 5053 } 5054 5055 /** 5056 * A versioned notebook document identifier. 5057 * 5058 * @since 3.17.0 - proposed state 5059 */ 5060 type VersionedNotebookDocumentIdentifier struct { 5061 /** 5062 * The version number of this notebook document. 5063 */ 5064 Version int32 `json:"version"` 5065 /** 5066 * The notebook document's uri. 5067 */ 5068 URI URI `json:"uri"` 5069 } 5070 5071 /** 5072 * A text document identifier to denote a specific version of a text document. 5073 */ 5074 type VersionedTextDocumentIdentifier struct { 5075 /** 5076 * The version number of this document. 5077 */ 5078 Version int32 `json:"version"` 5079 TextDocumentIdentifier 5080 } 5081 5082 type WatchKind float64 5083 5084 /** 5085 * The parameters send in a will save text document notification. 5086 */ 5087 type WillSaveTextDocumentParams struct { 5088 /** 5089 * The document that will be saved. 5090 */ 5091 TextDocument TextDocumentIdentifier `json:"textDocument"` 5092 /** 5093 * The 'TextDocumentSaveReason'. 5094 */ 5095 Reason TextDocumentSaveReason `json:"reason"` 5096 } 5097 5098 type WorkDoneProgressBegin struct { 5099 Kind string `json:"kind"` 5100 /** 5101 * Mandatory title of the progress operation. Used to briefly inform about 5102 * the kind of operation being performed. 5103 * 5104 * Examples: "Indexing" or "Linking dependencies". 5105 */ 5106 Title string `json:"title"` 5107 /** 5108 * Controls if a cancel button should show to allow the user to cancel the 5109 * long running operation. Clients that don't support cancellation are allowed 5110 * to ignore the setting. 5111 */ 5112 Cancellable bool `json:"cancellable,omitempty"` 5113 /** 5114 * Optional, more detailed associated progress message. Contains 5115 * complementary information to the `title`. 5116 * 5117 * Examples: "3/25 files", "project/src/module2", "node_modules/some_dep". 5118 * If unset, the previous progress message (if any) is still valid. 5119 */ 5120 Message string `json:"message,omitempty"` 5121 /** 5122 * Optional progress percentage to display (value 100 is considered 100%). 5123 * If not provided infinite progress is assumed and clients are allowed 5124 * to ignore the `percentage` value in subsequent in report notifications. 5125 * 5126 * The value should be steadily rising. Clients are free to ignore values 5127 * that are not following this rule. The value range is [0, 100]. 5128 */ 5129 Percentage uint32 `json:"percentage,omitempty"` 5130 } 5131 5132 type WorkDoneProgressCancelParams struct { 5133 /** 5134 * The token to be used to report progress. 5135 */ 5136 Token ProgressToken `json:"token"` 5137 } 5138 5139 type WorkDoneProgressClientCapabilities struct { 5140 /** 5141 * Window specific client capabilities. 5142 */ 5143 Window struct { 5144 /** 5145 * Whether client supports server initiated progress using the 5146 * `window/workDoneProgress/create` request. 5147 * 5148 * Since 3.15.0 5149 */ 5150 WorkDoneProgress bool `json:"workDoneProgress,omitempty"` 5151 /** 5152 * Capabilities specific to the showMessage request. 5153 * 5154 * @since 3.16.0 5155 */ 5156 ShowMessage ShowMessageRequestClientCapabilities `json:"showMessage,omitempty"` 5157 /** 5158 * Capabilities specific to the showDocument request. 5159 * 5160 * @since 3.16.0 5161 */ 5162 ShowDocument ShowDocumentClientCapabilities `json:"showDocument,omitempty"` 5163 } `json:"window,omitempty"` 5164 } 5165 5166 type WorkDoneProgressCreateParams struct { 5167 /** 5168 * The token to be used to report progress. 5169 */ 5170 Token ProgressToken `json:"token"` 5171 } 5172 5173 type WorkDoneProgressEnd struct { 5174 Kind string `json:"kind"` 5175 /** 5176 * Optional, a final message indicating to for example indicate the outcome 5177 * of the operation. 5178 */ 5179 Message string `json:"message,omitempty"` 5180 } 5181 5182 type WorkDoneProgressOptions struct { 5183 WorkDoneProgress bool `json:"workDoneProgress,omitempty"` 5184 } 5185 5186 type WorkDoneProgressParams struct { 5187 /** 5188 * An optional token that a server can use to report work done progress. 5189 */ 5190 WorkDoneToken ProgressToken `json:"workDoneToken,omitempty"` 5191 } 5192 5193 type WorkDoneProgressReport struct { 5194 Kind string `json:"kind"` 5195 /** 5196 * Controls enablement state of a cancel button. 5197 * 5198 * Clients that don't support cancellation or don't support controlling the button's 5199 * enablement state are allowed to ignore the property. 5200 */ 5201 Cancellable bool `json:"cancellable,omitempty"` 5202 /** 5203 * Optional, more detailed associated progress message. Contains 5204 * complementary information to the `title`. 5205 * 5206 * Examples: "3/25 files", "project/src/module2", "node_modules/some_dep". 5207 * If unset, the previous progress message (if any) is still valid. 5208 */ 5209 Message string `json:"message,omitempty"` 5210 /** 5211 * Optional progress percentage to display (value 100 is considered 100%). 5212 * If not provided infinite progress is assumed and clients are allowed 5213 * to ignore the `percentage` value in subsequent in report notifications. 5214 * 5215 * The value should be steadily rising. Clients are free to ignore values 5216 * that are not following this rule. The value range is [0, 100] 5217 */ 5218 Percentage uint32 `json:"percentage,omitempty"` 5219 } 5220 5221 /** 5222 * Workspace specific client capabilities. 5223 */ 5224 type WorkspaceClientCapabilities struct { 5225 /** 5226 * The client supports applying batch edits 5227 * to the workspace by supporting the request 5228 * 'workspace/applyEdit' 5229 */ 5230 ApplyEdit bool `json:"applyEdit,omitempty"` 5231 /** 5232 * Capabilities specific to `WorkspaceEdit`s 5233 */ 5234 WorkspaceEdit WorkspaceEditClientCapabilities `json:"workspaceEdit,omitempty"` 5235 /** 5236 * Capabilities specific to the `workspace/didChangeConfiguration` notification. 5237 */ 5238 DidChangeConfiguration DidChangeConfigurationClientCapabilities `json:"didChangeConfiguration,omitempty"` 5239 /** 5240 * Capabilities specific to the `workspace/didChangeWatchedFiles` notification. 5241 */ 5242 DidChangeWatchedFiles DidChangeWatchedFilesClientCapabilities `json:"didChangeWatchedFiles,omitempty"` 5243 /** 5244 * Capabilities specific to the `workspace/symbol` request. 5245 */ 5246 Symbol WorkspaceSymbolClientCapabilities `json:"symbol,omitempty"` 5247 /** 5248 * Capabilities specific to the `workspace/executeCommand` request. 5249 */ 5250 ExecuteCommand ExecuteCommandClientCapabilities `json:"executeCommand,omitempty"` 5251 /** 5252 * Capabilities specific to the semantic token requests scoped to the 5253 * workspace. 5254 * 5255 * @since 3.16.0. 5256 */ 5257 SemanticTokens SemanticTokensWorkspaceClientCapabilities `json:"semanticTokens,omitempty"` 5258 /** 5259 * Capabilities specific to the code lens requests scoped to the 5260 * workspace. 5261 * 5262 * @since 3.16.0. 5263 */ 5264 CodeLens CodeLensWorkspaceClientCapabilities `json:"codeLens,omitempty"` 5265 /** 5266 * The client has support for file notifications/requests for user operations on files. 5267 * 5268 * Since 3.16.0 5269 */ 5270 FileOperations FileOperationClientCapabilities `json:"fileOperations,omitempty"` 5271 /** 5272 * Capabilities specific to the inline values requests scoped to the 5273 * workspace. 5274 * 5275 * @since 3.17.0. 5276 */ 5277 InlineValues InlineValuesWorkspaceClientCapabilities `json:"inlineValues,omitempty"` 5278 } 5279 5280 /** 5281 * Parameters of the workspace diagnostic request. 5282 * 5283 * @since 3.17.0 - proposed state 5284 */ 5285 type WorkspaceDiagnosticParams struct { 5286 /** 5287 * The additional identifier provided during registration. 5288 */ 5289 Identifier string `json:"identifier,omitempty"` 5290 /** 5291 * The currently known diagnostic reports with their 5292 * previous result ids. 5293 */ 5294 PreviousResultIds []PreviousResultID `json:"previousResultIds"` 5295 WorkDoneProgressParams 5296 PartialResultParams 5297 } 5298 5299 /** 5300 * A workspace diagnostic report. 5301 * 5302 * @since 3.17.0 - proposed state 5303 */ 5304 type WorkspaceDiagnosticReport struct { 5305 Items []WorkspaceDocumentDiagnosticReport `json:"items"` 5306 } 5307 5308 /** 5309 * A workspace diagnostic document report. 5310 * 5311 * @since 3.17.0 - proposed state 5312 */ 5313 type WorkspaceDocumentDiagnosticReport = interface{} /*WorkspaceFullDocumentDiagnosticReport | WorkspaceUnchangedDocumentDiagnosticReport*/ 5314 5315 /** 5316 * A workspace edit represents changes to many resources managed in the workspace. The edit 5317 * should either provide `changes` or `documentChanges`. If documentChanges are present 5318 * they are preferred over `changes` if the client can handle versioned document edits. 5319 * 5320 * Since version 3.13.0 a workspace edit can contain resource operations as well. If resource 5321 * operations are present clients need to execute the operations in the order in which they 5322 * are provided. So a workspace edit for example can consist of the following two changes: 5323 * (1) a create file a.txt and (2) a text document edit which insert text into file a.txt. 5324 * 5325 * An invalid sequence (e.g. (1) delete file a.txt and (2) insert text into file a.txt) will 5326 * cause failure of the operation. How the client recovers from the failure is described by 5327 * the client capability: `workspace.workspaceEdit.failureHandling` 5328 */ 5329 type WorkspaceEdit struct { 5330 /** 5331 * Holds changes to existing resources. 5332 */ 5333 Changes map[DocumentURI][]TextEdit/*[uri: DocumentUri]: TextEdit[];*/ `json:"changes,omitempty"` 5334 /** 5335 * Depending on the client capability `workspace.workspaceEdit.resourceOperations` document changes 5336 * are either an array of `TextDocumentEdit`s to express changes to n different text documents 5337 * where each text document edit addresses a specific version of a text document. Or it can contain 5338 * above `TextDocumentEdit`s mixed with create, rename and delete file / folder operations. 5339 * 5340 * Whether a client supports versioned document edits is expressed via 5341 * `workspace.workspaceEdit.documentChanges` client capability. 5342 * 5343 * If a client neither supports `documentChanges` nor `workspace.workspaceEdit.resourceOperations` then 5344 * only plain `TextEdit`s using the `changes` property are supported. 5345 */ 5346 DocumentChanges []TextDocumentEdit/*TextDocumentEdit | CreateFile | RenameFile | DeleteFile*/ `json:"documentChanges,omitempty"` 5347 /** 5348 * A map of change annotations that can be referenced in `AnnotatedTextEdit`s or create, rename and 5349 * delete file / folder operations. 5350 * 5351 * Whether clients honor this property depends on the client capability `workspace.changeAnnotationSupport`. 5352 * 5353 * @since 3.16.0 5354 */ 5355 ChangeAnnotations map[string]ChangeAnnotationIdentifier/*[id: ChangeAnnotationIdentifier]: ChangeAnnotation;*/ `json:"changeAnnotations,omitempty"` 5356 } 5357 5358 type WorkspaceEditClientCapabilities struct { 5359 /** 5360 * The client supports versioned document changes in `WorkspaceEdit`s 5361 */ 5362 DocumentChanges bool `json:"documentChanges,omitempty"` 5363 /** 5364 * The resource operations the client supports. Clients should at least 5365 * support 'create', 'rename' and 'delete' files and folders. 5366 * 5367 * @since 3.13.0 5368 */ 5369 ResourceOperations []ResourceOperationKind `json:"resourceOperations,omitempty"` 5370 /** 5371 * The failure handling strategy of a client if applying the workspace edit 5372 * fails. 5373 * 5374 * @since 3.13.0 5375 */ 5376 FailureHandling FailureHandlingKind `json:"failureHandling,omitempty"` 5377 /** 5378 * Whether the client normalizes line endings to the client specific 5379 * setting. 5380 * If set to `true` the client will normalize line ending characters 5381 * in a workspace edit containing to the client specific new line 5382 * character. 5383 * 5384 * @since 3.16.0 5385 */ 5386 NormalizesLineEndings bool `json:"normalizesLineEndings,omitempty"` 5387 /** 5388 * Whether the client in general supports change annotations on text edits, 5389 * create file, rename file and delete file changes. 5390 * 5391 * @since 3.16.0 5392 */ 5393 ChangeAnnotationSupport struct { 5394 /** 5395 * Whether the client groups edits with equal labels into tree nodes, 5396 * for instance all edits labelled with "Changes in Strings" would 5397 * be a tree node. 5398 */ 5399 GroupsOnLabel bool `json:"groupsOnLabel,omitempty"` 5400 } `json:"changeAnnotationSupport,omitempty"` 5401 } 5402 5403 type WorkspaceFolder struct { 5404 /** 5405 * The associated URI for this workspace folder. 5406 */ 5407 URI string `json:"uri"` 5408 /** 5409 * The name of the workspace folder. Used to refer to this 5410 * workspace folder in the user interface. 5411 */ 5412 Name string `json:"name"` 5413 } 5414 5415 /** 5416 * The workspace folder change event. 5417 */ 5418 type WorkspaceFoldersChangeEvent struct { 5419 /** 5420 * The array of added workspace folders 5421 */ 5422 Added []WorkspaceFolder `json:"added"` 5423 /** 5424 * The array of the removed workspace folders 5425 */ 5426 Removed []WorkspaceFolder `json:"removed"` 5427 } 5428 5429 type WorkspaceFoldersClientCapabilities struct { 5430 /** 5431 * The workspace client capabilities 5432 */ 5433 Workspace Workspace7Gn `json:"workspace,omitempty"` 5434 } 5435 5436 type WorkspaceFoldersInitializeParams struct { 5437 /** 5438 * The actual configured workspace folders. 5439 */ 5440 WorkspaceFolders []WorkspaceFolder /*WorkspaceFolder[] | null*/ `json:"workspaceFolders"` 5441 } 5442 5443 type WorkspaceFoldersServerCapabilities struct { 5444 /** 5445 * The workspace server capabilities 5446 */ 5447 Workspace Workspace9Gn `json:"workspace,omitempty"` 5448 } 5449 5450 /** 5451 * A full document diagnostic report for a workspace diagnostic result. 5452 * 5453 * @since 3.17.0 - proposed state 5454 */ 5455 type WorkspaceFullDocumentDiagnosticReport struct { 5456 /** 5457 * The URI for which diagnostic information is reported. 5458 */ 5459 URI DocumentURI `json:"uri"` 5460 /** 5461 * The version number for which the diagnostics are reported. 5462 * If the document is not marked as open `null` can be provided. 5463 */ 5464 Version int32/*integer | null*/ `json:"version"` 5465 FullDocumentDiagnosticReport 5466 } 5467 5468 /** 5469 * A special workspace symbol that supports locations without a range 5470 * 5471 * @since 3.17.0 - proposed state 5472 */ 5473 type WorkspaceSymbol struct { 5474 /** 5475 * The location of the symbol. 5476 * 5477 * See SymbolInformation#location for more details. 5478 */ 5479 Location Location/*Location | { uri: DocumentUri; }*/ `json:"location"` 5480 /** 5481 * A data entry field that is preserved on a workspace symbol between a 5482 * workspace symbol request and a workspace symbol resolve request. 5483 */ 5484 Data LSPAny `json:"data,omitempty"` 5485 } 5486 5487 /** 5488 * Client capabilities for a [WorkspaceSymbolRequest](#WorkspaceSymbolRequest). 5489 */ 5490 type WorkspaceSymbolClientCapabilities struct { 5491 /** 5492 * Symbol request supports dynamic registration. 5493 */ 5494 DynamicRegistration bool `json:"dynamicRegistration,omitempty"` 5495 /** 5496 * Specific capabilities for the `SymbolKind` in the `workspace/symbol` request. 5497 */ 5498 SymbolKind struct { 5499 /** 5500 * The symbol kind values the client supports. When this 5501 * property exists the client also guarantees that it will 5502 * handle values outside its set gracefully and falls back 5503 * to a default value when unknown. 5504 * 5505 * If this property is not present the client only supports 5506 * the symbol kinds from `File` to `Array` as defined in 5507 * the initial version of the protocol. 5508 */ 5509 ValueSet []SymbolKind `json:"valueSet,omitempty"` 5510 } `json:"symbolKind,omitempty"` 5511 /** 5512 * The client supports tags on `SymbolInformation`. 5513 * Clients supporting tags have to handle unknown tags gracefully. 5514 * 5515 * @since 3.16.0 5516 */ 5517 TagSupport struct { 5518 /** 5519 * The tags supported by the client. 5520 */ 5521 ValueSet []SymbolTag `json:"valueSet"` 5522 } `json:"tagSupport,omitempty"` 5523 /** 5524 * The client support partial workspace symbols. The client will send the 5525 * request `workspaceSymbol/resolve` to the server to resolve additional 5526 * properties. 5527 * 5528 * @since 3.17.0 - proposedState 5529 */ 5530 ResolveSupport struct { 5531 /** 5532 * The properties that a client can resolve lazily. Usually 5533 * `location.range` 5534 */ 5535 Properties []string `json:"properties"` 5536 } `json:"resolveSupport,omitempty"` 5537 } 5538 5539 /** 5540 * Server capabilities for a [WorkspaceSymbolRequest](#WorkspaceSymbolRequest). 5541 */ 5542 type WorkspaceSymbolOptions struct { 5543 /** 5544 * The server provides support to resolve additional 5545 * information for a workspace symbol. 5546 * 5547 * @since 3.17.0 - proposed state 5548 */ 5549 ResolveProvider bool `json:"resolveProvider,omitempty"` 5550 WorkDoneProgressOptions 5551 } 5552 5553 /** 5554 * The parameters of a [WorkspaceSymbolRequest](#WorkspaceSymbolRequest). 5555 */ 5556 type WorkspaceSymbolParams struct { 5557 /** 5558 * A query string to filter symbols by. Clients may send an empty 5559 * string here to request all symbols. 5560 */ 5561 Query string `json:"query"` 5562 WorkDoneProgressParams 5563 PartialResultParams 5564 } 5565 5566 /** 5567 * An unchanged document diagnostic report for a workspace diagnostic result. 5568 * 5569 * @since 3.17.0 - proposed state 5570 */ 5571 type WorkspaceUnchangedDocumentDiagnosticReport struct { 5572 /** 5573 * The URI for which diagnostic information is reported. 5574 */ 5575 URI DocumentURI `json:"uri"` 5576 /** 5577 * The version number for which the diagnostics are reported. 5578 * If the document is not marked as open `null` can be provided. 5579 */ 5580 Version int32/*integer | null*/ `json:"version"` 5581 UnchangedDocumentDiagnosticReport 5582 } 5583 5584 const ( 5585 /** 5586 * Empty kind. 5587 */ 5588 5589 Empty CodeActionKind = "" 5590 /** 5591 * Base kind for quickfix actions: 'quickfix' 5592 */ 5593 5594 QuickFix CodeActionKind = "quickfix" 5595 /** 5596 * Base kind for refactoring actions: 'refactor' 5597 */ 5598 5599 Refactor CodeActionKind = "refactor" 5600 /** 5601 * Base kind for refactoring extraction actions: 'refactor.extract' 5602 * 5603 * Example extract actions: 5604 * 5605 * - Extract method 5606 * - Extract function 5607 * - Extract variable 5608 * - Extract interface from class 5609 * - ... 5610 */ 5611 5612 RefactorExtract CodeActionKind = "refactor.extract" 5613 /** 5614 * Base kind for refactoring inline actions: 'refactor.inline' 5615 * 5616 * Example inline actions: 5617 * 5618 * - Inline function 5619 * - Inline variable 5620 * - Inline constant 5621 * - ... 5622 */ 5623 5624 RefactorInline CodeActionKind = "refactor.inline" 5625 /** 5626 * Base kind for refactoring rewrite actions: 'refactor.rewrite' 5627 * 5628 * Example rewrite actions: 5629 * 5630 * - Convert JavaScript function to class 5631 * - Add or remove parameter 5632 * - Encapsulate field 5633 * - Make method static 5634 * - Move method to base class 5635 * - ... 5636 */ 5637 5638 RefactorRewrite CodeActionKind = "refactor.rewrite" 5639 /** 5640 * Base kind for source actions: `source` 5641 * 5642 * Source code actions apply to the entire file. 5643 */ 5644 5645 Source CodeActionKind = "source" 5646 /** 5647 * Base kind for an organize imports source action: `source.organizeImports` 5648 */ 5649 5650 SourceOrganizeImports CodeActionKind = "source.organizeImports" 5651 /** 5652 * Base kind for auto-fix source actions: `source.fixAll`. 5653 * 5654 * Fix all actions automatically fix errors that have a clear fix that do not require user input. 5655 * They should not suppress errors or perform unsafe fixes such as generating new types or classes. 5656 * 5657 * @since 3.15.0 5658 */ 5659 5660 SourceFixAll CodeActionKind = "source.fixAll" 5661 /** 5662 * Code actions were explicitly requested by the user or by an extension. 5663 */ 5664 5665 CodeActionInvoked CodeActionTriggerKind = 1 5666 /** 5667 * Code actions were requested automatically. 5668 * 5669 * This typically happens when current selection in a file changes, but can 5670 * also be triggered when file content changes. 5671 */ 5672 5673 CodeActionAutomatic CodeActionTriggerKind = 2 5674 TextCompletion CompletionItemKind = 1 5675 MethodCompletion CompletionItemKind = 2 5676 FunctionCompletion CompletionItemKind = 3 5677 ConstructorCompletion CompletionItemKind = 4 5678 FieldCompletion CompletionItemKind = 5 5679 VariableCompletion CompletionItemKind = 6 5680 ClassCompletion CompletionItemKind = 7 5681 InterfaceCompletion CompletionItemKind = 8 5682 ModuleCompletion CompletionItemKind = 9 5683 PropertyCompletion CompletionItemKind = 10 5684 UnitCompletion CompletionItemKind = 11 5685 ValueCompletion CompletionItemKind = 12 5686 EnumCompletion CompletionItemKind = 13 5687 KeywordCompletion CompletionItemKind = 14 5688 SnippetCompletion CompletionItemKind = 15 5689 ColorCompletion CompletionItemKind = 16 5690 FileCompletion CompletionItemKind = 17 5691 ReferenceCompletion CompletionItemKind = 18 5692 FolderCompletion CompletionItemKind = 19 5693 EnumMemberCompletion CompletionItemKind = 20 5694 ConstantCompletion CompletionItemKind = 21 5695 StructCompletion CompletionItemKind = 22 5696 EventCompletion CompletionItemKind = 23 5697 OperatorCompletion CompletionItemKind = 24 5698 TypeParameterCompletion CompletionItemKind = 25 5699 /** 5700 * Render a completion as obsolete, usually using a strike-out. 5701 */ 5702 5703 ComplDeprecated CompletionItemTag = 1 5704 /** 5705 * Completion was triggered by typing an identifier (24x7 code 5706 * complete), manual invocation (e.g Ctrl+Space) or via API. 5707 */ 5708 5709 Invoked CompletionTriggerKind = 1 5710 /** 5711 * Completion was triggered by a trigger character specified by 5712 * the `triggerCharacters` properties of the `CompletionRegistrationOptions`. 5713 */ 5714 5715 TriggerCharacter CompletionTriggerKind = 2 5716 /** 5717 * Completion was re-triggered as current completion list is incomplete 5718 */ 5719 5720 TriggerForIncompleteCompletions CompletionTriggerKind = 3 5721 /** 5722 * Reports an error. 5723 */ 5724 5725 SeverityError DiagnosticSeverity = 1 5726 /** 5727 * Reports a warning. 5728 */ 5729 5730 SeverityWarning DiagnosticSeverity = 2 5731 /** 5732 * Reports an information. 5733 */ 5734 5735 SeverityInformation DiagnosticSeverity = 3 5736 /** 5737 * Reports a hint. 5738 */ 5739 5740 SeverityHint DiagnosticSeverity = 4 5741 /** 5742 * Unused or unnecessary code. 5743 * 5744 * Clients are allowed to render diagnostics with this tag faded out instead of having 5745 * an error squiggle. 5746 */ 5747 5748 Unnecessary DiagnosticTag = 1 5749 /** 5750 * Deprecated or obsolete code. 5751 * 5752 * Clients are allowed to rendered diagnostics with this tag strike through. 5753 */ 5754 5755 Deprecated DiagnosticTag = 2 5756 /** 5757 * A textual occurrence. 5758 */ 5759 5760 Text DocumentHighlightKind = 1 5761 /** 5762 * Read-access of a symbol, like reading a variable. 5763 */ 5764 5765 Read DocumentHighlightKind = 2 5766 /** 5767 * Write-access of a symbol, like writing to a variable. 5768 */ 5769 5770 Write DocumentHighlightKind = 3 5771 /** 5772 * Applying the workspace change is simply aborted if one of the changes provided 5773 * fails. All operations executed before the failing operation stay executed. 5774 */ 5775 5776 Abort FailureHandlingKind = "abort" 5777 /** 5778 * All operations are executed transactional. That means they either all 5779 * succeed or no changes at all are applied to the workspace. 5780 */ 5781 5782 Transactional FailureHandlingKind = "transactional" 5783 /** 5784 * If the workspace edit contains only textual file changes they are executed transactional. 5785 * If resource changes (create, rename or delete file) are part of the change the failure 5786 * handling strategy is abort. 5787 */ 5788 5789 TextOnlyTransactional FailureHandlingKind = "textOnlyTransactional" 5790 /** 5791 * The client tries to undo the operations already executed. But there is no 5792 * guarantee that this is succeeding. 5793 */ 5794 5795 Undo FailureHandlingKind = "undo" 5796 /** 5797 * The file got created. 5798 */ 5799 5800 Created FileChangeType = 1 5801 /** 5802 * The file got changed. 5803 */ 5804 5805 Changed FileChangeType = 2 5806 /** 5807 * The file got deleted. 5808 */ 5809 5810 Deleted FileChangeType = 3 5811 /** 5812 * The pattern matches a file only. 5813 */ 5814 5815 FileOp FileOperationPatternKind = "file" 5816 /** 5817 * The pattern matches a folder only. 5818 */ 5819 5820 FolderOp FileOperationPatternKind = "folder" 5821 /** 5822 * Folding range for a comment 5823 */ 5824 Comment FoldingRangeKind = "comment" 5825 /** 5826 * Folding range for a imports or includes 5827 */ 5828 Imports FoldingRangeKind = "imports" 5829 /** 5830 * Folding range for a region (e.g. `#region`) 5831 */ 5832 Region FoldingRangeKind = "region" 5833 /** 5834 * If the protocol version provided by the client can't be handled by the server. 5835 * @deprecated This initialize error got replaced by client capabilities. There is 5836 * no version handshake in version 3.0x 5837 */ 5838 5839 UnknownProtocolVersion InitializeError = 1 5840 /** 5841 * The primary text to be inserted is treated as a plain string. 5842 */ 5843 5844 PlainTextTextFormat InsertTextFormat = 1 5845 /** 5846 * The primary text to be inserted is treated as a snippet. 5847 * 5848 * A snippet can define tab stops and placeholders with `$1`, `$2` 5849 * and `${3:foo}`. `$0` defines the final tab stop, it defaults to 5850 * the end of the snippet. Placeholders with equal identifiers are linked, 5851 * that is typing in one will update others too. 5852 * 5853 * See also: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#snippet_syntax 5854 */ 5855 5856 SnippetTextFormat InsertTextFormat = 2 5857 /** 5858 * The insertion or replace strings is taken as it is. If the 5859 * value is multi line the lines below the cursor will be 5860 * inserted using the indentation defined in the string value. 5861 * The client will not apply any kind of adjustments to the 5862 * string. 5863 */ 5864 5865 AsIs InsertTextMode = 1 5866 /** 5867 * The editor adjusts leading whitespace of new lines so that 5868 * they match the indentation up to the cursor of the line for 5869 * which the item is accepted. 5870 * 5871 * Consider a line like this: <2tabs><cursor><3tabs>foo. Accepting a 5872 * multi line completion item is indented using 2 tabs and all 5873 * following lines inserted will be indented using 2 tabs as well. 5874 */ 5875 5876 AdjustIndentation InsertTextMode = 2 5877 /** 5878 * Plain text is supported as a content format 5879 */ 5880 5881 PlainText MarkupKind = "plaintext" 5882 /** 5883 * Markdown is supported as a content format 5884 */ 5885 5886 Markdown MarkupKind = "markdown" 5887 /** 5888 * An error message. 5889 */ 5890 5891 Error MessageType = 1 5892 /** 5893 * A warning message. 5894 */ 5895 5896 Warning MessageType = 2 5897 /** 5898 * An information message. 5899 */ 5900 5901 Info MessageType = 3 5902 /** 5903 * A log message. 5904 */ 5905 5906 Log MessageType = 4 5907 /** 5908 * The moniker represent a symbol that is imported into a project 5909 */ 5910 Import MonikerKind = "import" 5911 /** 5912 * The moniker represents a symbol that is exported from a project 5913 */ 5914 Export MonikerKind = "export" 5915 /** 5916 * The moniker represents a symbol that is local to a project (e.g. a local 5917 * variable of a function, a class not visible outside the project, ...) 5918 */ 5919 Local MonikerKind = "local" 5920 /** 5921 * A markup-cell is formatted source that is used for display. 5922 */ 5923 5924 Markup NotebookCellKind = 1 5925 /** 5926 * A code-cell is source code. 5927 */ 5928 5929 Code NotebookCellKind = 2 5930 /** 5931 * Supports creating new files and folders. 5932 */ 5933 5934 Create ResourceOperationKind = "create" 5935 /** 5936 * Supports renaming existing files and folders. 5937 */ 5938 5939 Rename ResourceOperationKind = "rename" 5940 /** 5941 * Supports deleting existing files and folders. 5942 */ 5943 5944 Delete ResourceOperationKind = "delete" 5945 /** 5946 * Signature help was invoked manually by the user or by a command. 5947 */ 5948 5949 SigInvoked SignatureHelpTriggerKind = 1 5950 /** 5951 * Signature help was triggered by a trigger character. 5952 */ 5953 5954 SigTriggerCharacter SignatureHelpTriggerKind = 2 5955 /** 5956 * Signature help was triggered by the cursor moving or by the document content changing. 5957 */ 5958 5959 SigContentChange SignatureHelpTriggerKind = 3 5960 File SymbolKind = 1 5961 Module SymbolKind = 2 5962 Namespace SymbolKind = 3 5963 Package SymbolKind = 4 5964 Class SymbolKind = 5 5965 Method SymbolKind = 6 5966 Property SymbolKind = 7 5967 Field SymbolKind = 8 5968 Constructor SymbolKind = 9 5969 Enum SymbolKind = 10 5970 Interface SymbolKind = 11 5971 Function SymbolKind = 12 5972 Variable SymbolKind = 13 5973 Constant SymbolKind = 14 5974 String SymbolKind = 15 5975 Number SymbolKind = 16 5976 Boolean SymbolKind = 17 5977 Array SymbolKind = 18 5978 Object SymbolKind = 19 5979 Key SymbolKind = 20 5980 Null SymbolKind = 21 5981 EnumMember SymbolKind = 22 5982 Struct SymbolKind = 23 5983 Event SymbolKind = 24 5984 Operator SymbolKind = 25 5985 TypeParameter SymbolKind = 26 5986 /** 5987 * Render a symbol as obsolete, usually using a strike-out. 5988 */ 5989 5990 DeprecatedSymbol SymbolTag = 1 5991 /** 5992 * Manually triggered, e.g. by the user pressing save, by starting debugging, 5993 * or by an API call. 5994 */ 5995 5996 Manual TextDocumentSaveReason = 1 5997 /** 5998 * Automatic after a delay. 5999 */ 6000 6001 AfterDelay TextDocumentSaveReason = 2 6002 /** 6003 * When the editor lost focus. 6004 */ 6005 6006 FocusOut TextDocumentSaveReason = 3 6007 /** 6008 * Documents should not be synced at all. 6009 */ 6010 6011 None TextDocumentSyncKind = 0 6012 /** 6013 * Documents are synced by always sending the full content 6014 * of the document. 6015 */ 6016 6017 Full TextDocumentSyncKind = 1 6018 /** 6019 * Documents are synced by sending the full content on open. 6020 * After that only incremental updates to the document are 6021 * send. 6022 */ 6023 6024 Incremental TextDocumentSyncKind = 2 6025 /** 6026 * The moniker is only unique inside a document 6027 */ 6028 Document UniquenessLevel = "document" 6029 /** 6030 * The moniker is unique inside a project for which a dump got created 6031 */ 6032 Project UniquenessLevel = "project" 6033 /** 6034 * The moniker is unique inside the group to which a project belongs 6035 */ 6036 Group UniquenessLevel = "group" 6037 /** 6038 * The moniker is unique inside the moniker scheme. 6039 */ 6040 Scheme UniquenessLevel = "scheme" 6041 /** 6042 * The moniker is globally unique 6043 */ 6044 Global UniquenessLevel = "global" 6045 /** 6046 * Interested in create events. 6047 */ 6048 6049 WatchCreate WatchKind = 1 6050 /** 6051 * Interested in change events 6052 */ 6053 6054 WatchChange WatchKind = 2 6055 /** 6056 * Interested in delete events 6057 */ 6058 6059 WatchDelete WatchKind = 4 6060 ) 6061 6062 // Types created to name formal parameters and embedded structs 6063 type ParamConfiguration struct { 6064 ConfigurationParams 6065 PartialResultParams 6066 } 6067 type ParamInitialize struct { 6068 InitializeParams 6069 WorkDoneProgressParams 6070 } 6071 type PrepareRename2Gn struct { 6072 Range Range `json:"range"` 6073 Placeholder string `json:"placeholder"` 6074 } 6075 type Workspace3Gn struct { 6076 /** 6077 * The client supports applying batch edits 6078 * to the workspace by supporting the request 6079 * 'workspace/applyEdit' 6080 */ 6081 ApplyEdit bool `json:"applyEdit,omitempty"` 6082 6083 /** 6084 * Capabilities specific to `WorkspaceEdit`s 6085 */ 6086 WorkspaceEdit *WorkspaceEditClientCapabilities `json:"workspaceEdit,omitempty"` 6087 6088 /** 6089 * Capabilities specific to the `workspace/didChangeConfiguration` notification. 6090 */ 6091 DidChangeConfiguration DidChangeConfigurationClientCapabilities `json:"didChangeConfiguration,omitempty"` 6092 6093 /** 6094 * Capabilities specific to the `workspace/didChangeWatchedFiles` notification. 6095 */ 6096 DidChangeWatchedFiles DidChangeWatchedFilesClientCapabilities `json:"didChangeWatchedFiles,omitempty"` 6097 6098 /** 6099 * Capabilities specific to the `workspace/symbol` request. 6100 */ 6101 Symbol *WorkspaceSymbolClientCapabilities `json:"symbol,omitempty"` 6102 6103 /** 6104 * Capabilities specific to the `workspace/executeCommand` request. 6105 */ 6106 ExecuteCommand ExecuteCommandClientCapabilities `json:"executeCommand,omitempty"` 6107 6108 /** 6109 * Capabilities specific to the semantic token requests scoped to the 6110 * workspace. 6111 * 6112 * @since 3.16.0. 6113 */ 6114 SemanticTokens SemanticTokensWorkspaceClientCapabilities `json:"semanticTokens,omitempty"` 6115 6116 /** 6117 * Capabilities specific to the code lens requests scoped to the 6118 * workspace. 6119 * 6120 * @since 3.16.0. 6121 */ 6122 CodeLens CodeLensWorkspaceClientCapabilities `json:"codeLens,omitempty"` 6123 6124 /** 6125 * The client has support for file notifications/requests for user operations on files. 6126 * 6127 * Since 3.16.0 6128 */ 6129 FileOperations *FileOperationClientCapabilities `json:"fileOperations,omitempty"` 6130 6131 /** 6132 * Capabilities specific to the inline values requests scoped to the 6133 * workspace. 6134 * 6135 * @since 3.17.0. 6136 */ 6137 InlineValues InlineValuesWorkspaceClientCapabilities `json:"inlineValues,omitempty"` 6138 6139 /** 6140 * The client has support for workspace folders 6141 * 6142 * @since 3.6.0 6143 */ 6144 WorkspaceFolders bool `json:"workspaceFolders,omitempty"` 6145 6146 /** 6147 * The client supports `workspace/configuration` requests. 6148 * 6149 * @since 3.6.0 6150 */ 6151 Configuration bool `json:"configuration,omitempty"` 6152 } 6153 type Workspace4Gn struct { 6154 /** 6155 * The client supports applying batch edits 6156 * to the workspace by supporting the request 6157 * 'workspace/applyEdit' 6158 */ 6159 ApplyEdit bool `json:"applyEdit,omitempty"` 6160 6161 /** 6162 * Capabilities specific to `WorkspaceEdit`s 6163 */ 6164 WorkspaceEdit *WorkspaceEditClientCapabilities `json:"workspaceEdit,omitempty"` 6165 6166 /** 6167 * Capabilities specific to the `workspace/didChangeConfiguration` notification. 6168 */ 6169 DidChangeConfiguration DidChangeConfigurationClientCapabilities `json:"didChangeConfiguration,omitempty"` 6170 6171 /** 6172 * Capabilities specific to the `workspace/didChangeWatchedFiles` notification. 6173 */ 6174 DidChangeWatchedFiles DidChangeWatchedFilesClientCapabilities `json:"didChangeWatchedFiles,omitempty"` 6175 6176 /** 6177 * Capabilities specific to the `workspace/symbol` request. 6178 */ 6179 Symbol *WorkspaceSymbolClientCapabilities `json:"symbol,omitempty"` 6180 6181 /** 6182 * Capabilities specific to the `workspace/executeCommand` request. 6183 */ 6184 ExecuteCommand ExecuteCommandClientCapabilities `json:"executeCommand,omitempty"` 6185 6186 /** 6187 * Capabilities specific to the semantic token requests scoped to the 6188 * workspace. 6189 * 6190 * @since 3.16.0. 6191 */ 6192 SemanticTokens SemanticTokensWorkspaceClientCapabilities `json:"semanticTokens,omitempty"` 6193 6194 /** 6195 * Capabilities specific to the code lens requests scoped to the 6196 * workspace. 6197 * 6198 * @since 3.16.0. 6199 */ 6200 CodeLens CodeLensWorkspaceClientCapabilities `json:"codeLens,omitempty"` 6201 6202 /** 6203 * The client has support for file notifications/requests for user operations on files. 6204 * 6205 * Since 3.16.0 6206 */ 6207 FileOperations *FileOperationClientCapabilities `json:"fileOperations,omitempty"` 6208 6209 /** 6210 * Capabilities specific to the inline values requests scoped to the 6211 * workspace. 6212 * 6213 * @since 3.17.0. 6214 */ 6215 InlineValues InlineValuesWorkspaceClientCapabilities `json:"inlineValues,omitempty"` 6216 6217 /** 6218 * The client has support for workspace folders 6219 * 6220 * @since 3.6.0 6221 */ 6222 WorkspaceFolders bool `json:"workspaceFolders,omitempty"` 6223 6224 /** 6225 * The client supports `workspace/configuration` requests. 6226 * 6227 * @since 3.6.0 6228 */ 6229 Configuration bool `json:"configuration,omitempty"` 6230 } 6231 type WorkspaceFolders5Gn struct { 6232 /** 6233 * The Server has support for workspace folders 6234 */ 6235 Supported bool `json:"supported,omitempty"` 6236 6237 /** 6238 * Whether the server wants to receive workspace folder 6239 * change notifications. 6240 * 6241 * If a strings is provided the string is treated as a ID 6242 * under which the notification is registered on the client 6243 * side. The ID can be used to unregister for these events 6244 * using the `client/unregisterCapability` request. 6245 */ 6246 ChangeNotifications string/*string | boolean*/ `json:"changeNotifications,omitempty"` 6247 } 6248 type Workspace6Gn struct { 6249 /** 6250 * The server is interested in notifications/requests for operations on files. 6251 * 6252 * @since 3.16.0 6253 */ 6254 FileOperations *FileOperationOptions `json:"fileOperations,omitempty"` 6255 6256 WorkspaceFolders WorkspaceFolders5Gn `json:"workspaceFolders,omitempty"` 6257 } 6258 type Workspace7Gn struct { 6259 /** 6260 * The client supports applying batch edits 6261 * to the workspace by supporting the request 6262 * 'workspace/applyEdit' 6263 */ 6264 ApplyEdit bool `json:"applyEdit,omitempty"` 6265 6266 /** 6267 * Capabilities specific to `WorkspaceEdit`s 6268 */ 6269 WorkspaceEdit *WorkspaceEditClientCapabilities `json:"workspaceEdit,omitempty"` 6270 6271 /** 6272 * Capabilities specific to the `workspace/didChangeConfiguration` notification. 6273 */ 6274 DidChangeConfiguration DidChangeConfigurationClientCapabilities `json:"didChangeConfiguration,omitempty"` 6275 6276 /** 6277 * Capabilities specific to the `workspace/didChangeWatchedFiles` notification. 6278 */ 6279 DidChangeWatchedFiles DidChangeWatchedFilesClientCapabilities `json:"didChangeWatchedFiles,omitempty"` 6280 6281 /** 6282 * Capabilities specific to the `workspace/symbol` request. 6283 */ 6284 Symbol *WorkspaceSymbolClientCapabilities `json:"symbol,omitempty"` 6285 6286 /** 6287 * Capabilities specific to the `workspace/executeCommand` request. 6288 */ 6289 ExecuteCommand ExecuteCommandClientCapabilities `json:"executeCommand,omitempty"` 6290 6291 /** 6292 * Capabilities specific to the semantic token requests scoped to the 6293 * workspace. 6294 * 6295 * @since 3.16.0. 6296 */ 6297 SemanticTokens SemanticTokensWorkspaceClientCapabilities `json:"semanticTokens,omitempty"` 6298 6299 /** 6300 * Capabilities specific to the code lens requests scoped to the 6301 * workspace. 6302 * 6303 * @since 3.16.0. 6304 */ 6305 CodeLens CodeLensWorkspaceClientCapabilities `json:"codeLens,omitempty"` 6306 6307 /** 6308 * The client has support for file notifications/requests for user operations on files. 6309 * 6310 * Since 3.16.0 6311 */ 6312 FileOperations *FileOperationClientCapabilities `json:"fileOperations,omitempty"` 6313 6314 /** 6315 * Capabilities specific to the inline values requests scoped to the 6316 * workspace. 6317 * 6318 * @since 3.17.0. 6319 */ 6320 InlineValues InlineValuesWorkspaceClientCapabilities `json:"inlineValues,omitempty"` 6321 6322 /** 6323 * The client has support for workspace folders 6324 * 6325 * @since 3.6.0 6326 */ 6327 WorkspaceFolders bool `json:"workspaceFolders,omitempty"` 6328 6329 /** 6330 * The client supports `workspace/configuration` requests. 6331 * 6332 * @since 3.6.0 6333 */ 6334 Configuration bool `json:"configuration,omitempty"` 6335 } 6336 type WorkspaceFolders8Gn struct { 6337 /** 6338 * The Server has support for workspace folders 6339 */ 6340 Supported bool `json:"supported,omitempty"` 6341 6342 /** 6343 * Whether the server wants to receive workspace folder 6344 * change notifications. 6345 * 6346 * If a strings is provided the string is treated as a ID 6347 * under which the notification is registered on the client 6348 * side. The ID can be used to unregister for these events 6349 * using the `client/unregisterCapability` request. 6350 */ 6351 ChangeNotifications string/*string | boolean*/ `json:"changeNotifications,omitempty"` 6352 } 6353 type Workspace9Gn struct { 6354 /** 6355 * The server is interested in notifications/requests for operations on files. 6356 * 6357 * @since 3.16.0 6358 */ 6359 FileOperations *FileOperationOptions `json:"fileOperations,omitempty"` 6360 6361 WorkspaceFolders WorkspaceFolders8Gn `json:"workspaceFolders,omitempty"` 6362 }