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