1 // Package protocol contains data types and code for LSP jsonrpcs
2 // generated automatically from vscode-languageserver-node
3 // commit: 901fd40345060d159f07d234bbc967966a929a34
4 // last fetched Mon Oct 26 2020 09:10:42 GMT-0400 (Eastern Daylight Time)
7 // Code generated (see typescript/README.md) DO NOT EDIT.
12 * The parameters passed via a apply workspace edit request.
14 type ApplyWorkspaceEditParams struct {
16 * An optional label of the workspace edit. This label is
17 * presented in the user interface for example on an undo
18 * stack to undo the workspace edit.
20 Label string `json:"label,omitempty"`
24 Edit WorkspaceEdit `json:"edit"`
28 * A response returned from the apply workspace edit request.
30 type ApplyWorkspaceEditResponse struct {
32 * Indicates whether the edit was applied or not.
34 Applied bool `json:"applied"`
36 * An optional textual description for why the edit was not applied.
37 * This may be used by the server for diagnostic logging or to provide
38 * a suitable error for a request that triggered the edit.
40 FailureReason string `json:"failureReason,omitempty"`
42 * Depending on the client's failure handling strategy `failedChange` might
43 * contain the index of the change that failed. This property is only available
44 * if the client signals a `failureHandlingStrategy` in its client capabilities.
46 FailedChange float64 `json:"failedChange,omitempty"`
52 type CallHierarchyClientCapabilities struct {
54 * Whether implementation supports dynamic registration. If this is set to `true`
55 * the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`
56 * return value for the corresponding server capability as well.
58 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
62 * Represents an incoming call, e.g. a caller of a method or constructor.
66 type CallHierarchyIncomingCall struct {
68 * The item that makes the call.
70 From CallHierarchyItem `json:"from"`
72 * The ranges at which the calls appear. This is relative to the caller
73 * denoted by [`this.from`](#CallHierarchyIncomingCall.from).
75 FromRanges []Range `json:"fromRanges"`
79 * The parameter of a `callHierarchy/incomingCalls` request.
83 type CallHierarchyIncomingCallsParams struct {
84 Item CallHierarchyItem `json:"item"`
85 WorkDoneProgressParams
90 * Represents programming constructs like functions or constructors in the context
95 type CallHierarchyItem struct {
97 * The name of this item.
99 Name string `json:"name"`
101 * The kind of this item.
103 Kind SymbolKind `json:"kind"`
105 * Tags for this item.
107 Tags []SymbolTag `json:"tags,omitempty"`
109 * More detail for this item, e.g. the signature of a function.
111 Detail string `json:"detail,omitempty"`
113 * The resource identifier of this item.
115 URI DocumentURI `json:"uri"`
117 * The range enclosing this symbol not including leading/trailing whitespace but everything else, e.g. comments and code.
119 Range Range `json:"range"`
121 * The range that should be selected and revealed when this symbol is being picked, e.g. the name of a function.
122 * Must be contained by the [`range`](#CallHierarchyItem.range).
124 SelectionRange Range `json:"selectionRange"`
126 * A data entry field that is preserved between a call hierarchy prepare and
127 * incoming calls or outgoing calls requests.
129 Data interface{} `json:"data,omitempty"`
133 * Call hierarchy options used during static registration.
137 type CallHierarchyOptions struct {
138 WorkDoneProgressOptions
142 * Represents an outgoing call, e.g. calling a getter from a method or a method from a constructor etc.
146 type CallHierarchyOutgoingCall struct {
148 * The item that is called.
150 To CallHierarchyItem `json:"to"`
152 * The range at which this item is called. This is the range relative to the caller, e.g the item
153 * passed to [`provideCallHierarchyOutgoingCalls`](#CallHierarchyItemProvider.provideCallHierarchyOutgoingCalls)
154 * and not [`this.to`](#CallHierarchyOutgoingCall.to).
156 FromRanges []Range `json:"fromRanges"`
160 * The parameter of a `callHierarchy/outgoingCalls` request.
164 type CallHierarchyOutgoingCallsParams struct {
165 Item CallHierarchyItem `json:"item"`
166 WorkDoneProgressParams
171 * The parameter of a `textDocument/prepareCallHierarchy` request.
175 type CallHierarchyPrepareParams struct {
176 TextDocumentPositionParams
177 WorkDoneProgressParams
181 * Call hierarchy options used during static or dynamic registration.
185 type CallHierarchyRegistrationOptions struct {
186 TextDocumentRegistrationOptions
188 StaticRegistrationOptions
191 type CancelParams struct {
193 * The request id to cancel.
195 ID interface{} /*number | string*/ `json:"id"`
198 type ClientCapabilities = struct {
201 * Workspace specific client capabilities.
203 WorkspaceClientCapabilities
205 * The client has support for workspace folders
209 WorkspaceFolders bool `json:"workspaceFolders,omitempty"`
211 * The client supports `workspace/configuration` requests.
215 Configuration bool `json:"configuration,omitempty"`
218 * Text document specific client capabilities.
220 TextDocument TextDocumentClientCapabilities `json:"textDocument,omitempty"`
223 * Window specific client capabilities.
225 Window interface{} `json:"window,omitempty"`
227 * Whether client supports server initiated progress using the
228 * `window/workDoneProgress/create` request.
232 WorkDoneProgress bool `json:"workDoneProgress,omitempty"`
235 * Experimental client capabilities.
237 Experimental interface{} `json:"experimental,omitempty"`
241 * A code action represents a change that can be performed in code, e.g. to fix a problem or
244 * A CodeAction must set either `edit` and/or a `command`. If both are supplied, the `edit` is applied first, then the `command` is executed.
246 type CodeAction struct {
248 * A short, human-readable, title for this code action.
250 Title string `json:"title"`
252 * The kind of the code action.
254 * Used to filter code actions.
256 Kind CodeActionKind `json:"kind,omitempty"`
258 * The diagnostics that this code action resolves.
260 Diagnostics []Diagnostic `json:"diagnostics,omitempty"`
262 * Marks this as a preferred action. Preferred actions are used by the `auto fix` command and can be targeted
265 * A quick fix should be marked preferred if it properly addresses the underlying error.
266 * A refactoring should be marked preferred if it is the most reasonable choice of actions to take.
270 IsPreferred bool `json:"isPreferred,omitempty"`
272 * Marks that the code action cannot currently be applied.
274 * Clients should follow the following guidelines regarding disabled code actions:
276 * - Disabled code actions are not shown in automatic [lightbulb](https://code.visualstudio.com/docs/editor/editingevolved#_code-action)
279 * - Disabled actions are shown as faded out in the code action menu when the user request a more specific type
280 * of code action, such as refactorings.
282 * - If the user has a [keybinding](https://code.visualstudio.com/docs/editor/refactoring#_keybindings-for-code-actions)
283 * that auto applies a code action and only a disabled code actions are returned, the client should show the user an
284 * error message with `reason` in the editor.
290 * Human readable description of why the code action is currently disabled.
292 * This is displayed in the code actions UI.
294 Reason string `json:"reason"`
295 } `json:"disabled,omitempty"`
297 * The workspace edit this code action performs.
299 Edit WorkspaceEdit `json:"edit,omitempty"`
301 * A command this code action executes. If a code action
302 * provides a edit and a command, first the edit is
303 * executed and then the command.
305 Command *Command `json:"command,omitempty"`
307 * A data entry field that is preserved on a code action between
308 * a `textDocument/codeAction` and a `codeAction/resolve` request.
310 * @since 3.16.0 - proposed state
312 Data interface{} `json:"data,omitempty"`
316 * The Client Capabilities of a [CodeActionRequest](#CodeActionRequest).
318 type CodeActionClientCapabilities struct {
320 * Whether code action supports dynamic registration.
322 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
324 * The client support code action literals of type `CodeAction` as a valid
325 * response of the `textDocument/codeAction` request. If the property is not
326 * set the request can only return `Command` literals.
330 CodeActionLiteralSupport struct {
332 * The code action kind is support with the following value
335 CodeActionKind struct {
337 * The code action kind values the client supports. When this
338 * property exists the client also guarantees that it will
339 * handle values outside its set gracefully and falls back
340 * to a default value when unknown.
342 ValueSet []CodeActionKind `json:"valueSet"`
343 } `json:"codeActionKind"`
344 } `json:"codeActionLiteralSupport,omitempty"`
346 * Whether code action supports the `isPreferred` property.
350 IsPreferredSupport bool `json:"isPreferredSupport,omitempty"`
352 * Whether code action supports the `disabled` property.
354 * @since 3.16.0 - proposed state
356 DisabledSupport bool `json:"disabledSupport,omitempty"`
358 * Whether code action supports the `data` property which is
359 * preserved between a `textDocument/codeAction` and a
360 * `codeAction/resolve` request.
362 * @since 3.16.0 - proposed state
364 DataSupport bool `json:"dataSupport,omitempty"`
366 * Whether the client support resolving additional code action
367 * properties via a separate `codeAction/resolve` request.
369 * @since 3.16.0 - proposed state
371 ResolveSupport struct {
373 * The properties that a client can resolve lazily.
375 Properties []string `json:"properties"`
376 } `json:"resolveSupport,omitempty"`
380 * Contains additional diagnostic information about the context in which
381 * a [code action](#CodeActionProvider.provideCodeActions) is run.
383 type CodeActionContext struct {
385 * An array of diagnostics known on the client side overlapping the range provided to the
386 * `textDocument/codeAction` request. They are provied so that the server knows which
387 * errors are currently presented to the user for the given range. There is no guarantee
388 * that these accurately reflect the error state of the resource. The primary parameter
389 * to compute code actions is the provided range.
391 Diagnostics []Diagnostic `json:"diagnostics"`
393 * Requested kind of actions to return.
395 * Actions not of this kind are filtered out by the client before being shown. So servers
396 * can omit computing them.
398 Only []CodeActionKind `json:"only,omitempty"`
402 * A set of predefined code action kinds
404 type CodeActionKind string
407 * Provider options for a [CodeActionRequest](#CodeActionRequest).
409 type CodeActionOptions struct {
411 * CodeActionKinds that this server may return.
413 * The list of kinds may be generic, such as `CodeActionKind.Refactor`, or the server
414 * may list out every specific kind they provide.
416 CodeActionKinds []CodeActionKind `json:"codeActionKinds,omitempty"`
418 * The server provides support to resolve additional
419 * information for a code action.
423 ResolveProvider bool `json:"resolveProvider,omitempty"`
424 WorkDoneProgressOptions
428 * The parameters of a [CodeActionRequest](#CodeActionRequest).
430 type CodeActionParams struct {
432 * The document in which the command was invoked.
434 TextDocument TextDocumentIdentifier `json:"textDocument"`
436 * The range for which the command was invoked.
438 Range Range `json:"range"`
440 * Context carrying additional information.
442 Context CodeActionContext `json:"context"`
443 WorkDoneProgressParams
448 * Structure to capture a description for an error code.
450 * @since 3.16.0 - proposed state
452 type CodeDescription struct {
454 * An URI to open with more information about the diagnostic error.
456 Href URI `json:"href"`
460 * A code lens represents a [command](#Command) that should be shown along with
461 * source text, like the number of references, a way to run tests, etc.
463 * A code lens is _unresolved_ when no command is associated to it. For performance
464 * reasons the creation of a code lens and resolving should be done to two stages.
466 type CodeLens struct {
468 * The range in which this code lens is valid. Should only span a single line.
470 Range Range `json:"range"`
472 * The command this code lens represents.
474 Command Command `json:"command,omitempty"`
476 * A data entry field that is preserved on a code lens item between
477 * a [CodeLensRequest](#CodeLensRequest) and a [CodeLensResolveRequest]
478 * (#CodeLensResolveRequest)
480 Data interface{} `json:"data,omitempty"`
484 * The client capabilities of a [CodeLensRequest](#CodeLensRequest).
486 type CodeLensClientCapabilities struct {
488 * Whether code lens supports dynamic registration.
490 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
494 * Code Lens provider options of a [CodeLensRequest](#CodeLensRequest).
496 type CodeLensOptions struct {
498 * Code lens has a resolve provider as well.
500 ResolveProvider bool `json:"resolveProvider,omitempty"`
501 WorkDoneProgressOptions
505 * The parameters of a [CodeLensRequest](#CodeLensRequest).
507 type CodeLensParams struct {
509 * The document to request code lens for.
511 TextDocument TextDocumentIdentifier `json:"textDocument"`
512 WorkDoneProgressParams
517 * Represents a color in RGBA space.
521 * The red component of this color in the range [0-1].
523 Red float64 `json:"red"`
525 * The green component of this color in the range [0-1].
527 Green float64 `json:"green"`
529 * The blue component of this color in the range [0-1].
531 Blue float64 `json:"blue"`
533 * The alpha component of this color in the range [0-1].
535 Alpha float64 `json:"alpha"`
539 * Represents a color range from a document.
541 type ColorInformation struct {
543 * The range in the document where this color appers.
545 Range Range `json:"range"`
547 * The actual color value for this color range.
549 Color Color `json:"color"`
552 type ColorPresentation struct {
554 * The label of this color presentation. It will be shown on the color
555 * picker header. By default this is also the text that is inserted when selecting
556 * this color presentation.
558 Label string `json:"label"`
560 * An [edit](#TextEdit) which is applied to a document when selecting
561 * this presentation for the color. When `falsy` the [label](#ColorPresentation.label)
564 TextEdit TextEdit `json:"textEdit,omitempty"`
566 * An optional array of additional [text edits](#TextEdit) that are applied when
567 * selecting this color presentation. Edits must not overlap with the main [edit](#ColorPresentation.textEdit) nor with themselves.
569 AdditionalTextEdits []TextEdit `json:"additionalTextEdits,omitempty"`
573 * Parameters for a [ColorPresentationRequest](#ColorPresentationRequest).
575 type ColorPresentationParams struct {
579 TextDocument TextDocumentIdentifier `json:"textDocument"`
581 * The color to request presentations for.
583 Color Color `json:"color"`
585 * The range where the color would be inserted. Serves as a context.
587 Range Range `json:"range"`
588 WorkDoneProgressParams
593 * Represents a reference to a command. Provides a title which
594 * will be used to represent a command in the UI and, optionally,
595 * an array of arguments which will be passed to the command handler
596 * function when invoked.
598 type Command struct {
600 * Title of the command, like `save`.
602 Title string `json:"title"`
604 * The identifier of the actual command handler.
606 Command string `json:"command"`
608 * Arguments that the command handler should be
611 Arguments []json.RawMessage `json:"arguments,omitempty"`
615 * Completion client capabilities
617 type CompletionClientCapabilities struct {
619 * Whether completion supports dynamic registration.
621 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
623 * The client supports the following `CompletionItem` specific
626 CompletionItem struct {
628 * Client supports snippets as insert text.
630 * A snippet can define tab stops and placeholders with `$1`, `$2`
631 * and `${3:foo}`. `$0` defines the final tab stop, it defaults to
632 * the end of the snippet. Placeholders with equal identifiers are linked,
633 * that is typing in one will update others too.
635 SnippetSupport bool `json:"snippetSupport,omitempty"`
637 * Client supports commit characters on a completion item.
639 CommitCharactersSupport bool `json:"commitCharactersSupport,omitempty"`
641 * Client supports the follow content formats for the documentation
642 * property. The order describes the preferred format of the client.
644 DocumentationFormat []MarkupKind `json:"documentationFormat,omitempty"`
646 * Client supports the deprecated property on a completion item.
648 DeprecatedSupport bool `json:"deprecatedSupport,omitempty"`
650 * Client supports the preselect property on a completion item.
652 PreselectSupport bool `json:"preselectSupport,omitempty"`
654 * Client supports the tag property on a completion item. Clients supporting
655 * tags have to handle unknown tags gracefully. Clients especially need to
656 * preserve unknown tags when sending a completion item back to the server in
663 * The tags supported by the client.
665 ValueSet []CompletionItemTag `json:"valueSet"`
666 } `json:"tagSupport,omitempty"`
668 * Client support insert replace edit to control different behavior if a
669 * completion item is inserted in the text or should replace text.
671 * @since 3.16.0 - proposed state
673 InsertReplaceSupport bool `json:"insertReplaceSupport,omitempty"`
675 * Indicates which properties a client can resolve lazily on a completion
676 * item. Before version 3.16.0 only the predefined properties `documentation`
677 * and `details` could be resolved lazily.
679 * @since 3.16.0 - proposed state
681 ResolveSupport struct {
683 * The properties that a client can resolve lazily.
685 Properties []string `json:"properties"`
686 } `json:"resolveSupport,omitempty"`
687 } `json:"completionItem,omitempty"`
688 CompletionItemKind struct {
690 * The completion item kind values the client supports. When this
691 * property exists the client also guarantees that it will
692 * handle values outside its set gracefully and falls back
693 * to a default value when unknown.
695 * If this property is not present the client only supports
696 * the completion items kinds from `Text` to `Reference` as defined in
697 * the initial version of the protocol.
699 ValueSet []CompletionItemKind `json:"valueSet,omitempty"`
700 } `json:"completionItemKind,omitempty"`
702 * The client supports to send additional context information for a
703 * `textDocument/completion` requestion.
705 ContextSupport bool `json:"contextSupport,omitempty"`
709 * Contains additional information about the context in which a completion request is triggered.
711 type CompletionContext struct {
713 * How the completion was triggered.
715 TriggerKind CompletionTriggerKind `json:"triggerKind"`
717 * The trigger character (a single character) that has trigger code complete.
718 * Is undefined if `triggerKind !== CompletionTriggerKind.TriggerCharacter`
720 TriggerCharacter string `json:"triggerCharacter,omitempty"`
724 * A completion item represents a text snippet that is
725 * proposed to complete text that is being typed.
727 type CompletionItem struct {
729 * The label of this completion item. By default
730 * also the text that is inserted when selecting
733 Label string `json:"label"`
735 * The kind of this completion item. Based of the kind
736 * an icon is chosen by the editor.
738 Kind CompletionItemKind `json:"kind,omitempty"`
740 * Tags for this completion item.
744 Tags []CompletionItemTag `json:"tags,omitempty"`
746 * A human-readable string with additional information
747 * about this item, like type or symbol information.
749 Detail string `json:"detail,omitempty"`
751 * A human-readable string that represents a doc-comment.
753 Documentation string/*string | MarkupContent*/ `json:"documentation,omitempty"`
755 * Indicates if this item is deprecated.
756 * @deprecated Use `tags` instead.
758 Deprecated bool `json:"deprecated,omitempty"`
760 * Select this item when showing.
762 * *Note* that only one completion item can be selected and that the
763 * tool / client decides which item that is. The rule is that the *first*
764 * item of those that match best is selected.
766 Preselect bool `json:"preselect,omitempty"`
768 * A string that should be used when comparing this item
769 * with other items. When `falsy` the [label](#CompletionItem.label)
772 SortText string `json:"sortText,omitempty"`
774 * A string that should be used when filtering a set of
775 * completion items. When `falsy` the [label](#CompletionItem.label)
778 FilterText string `json:"filterText,omitempty"`
780 * A string that should be inserted into a document when selecting
781 * this completion. When `falsy` the [label](#CompletionItem.label)
784 * The `insertText` is subject to interpretation by the client side.
785 * Some tools might not take the string literally. For example
786 * VS Code when code complete is requested in this example `con<cursor position>`
787 * and a completion item with an `insertText` of `console` is provided it
788 * will only insert `sole`. Therefore it is recommended to use `textEdit` instead
789 * since it avoids additional client side interpretation.
791 InsertText string `json:"insertText,omitempty"`
793 * The format of the insert text. The format applies to both the `insertText` property
794 * and the `newText` property of a provided `textEdit`. If ommitted defaults to
795 * `InsertTextFormat.PlainText`.
797 InsertTextFormat InsertTextFormat `json:"insertTextFormat,omitempty"`
799 * An [edit](#TextEdit) which is applied to a document when selecting
800 * this completion. When an edit is provided the value of
801 * [insertText](#CompletionItem.insertText) is ignored.
803 * Most editors support two different operation when accepting a completion item. One is to insert a
804 * completion text and the other is to replace an existing text with a competion text. Since this can
805 * usually not predetermend by a server it can report both ranges. Clients need to signal support for
806 * `InsertReplaceEdits` via the `textDocument.completion.insertReplaceSupport` client capability
809 * *Note 1:* The text edit's range as well as both ranges from a insert replace edit must be a
810 * [single line] and they must contain the position at which completion has been requested.
811 * *Note 2:* If an `InsertReplaceEdit` is returned the edit's insert range must be a prefix of
812 * the edit's replace range, that means it must be contained and starting at the same position.
814 * @since 3.16.0 additional type `InsertReplaceEdit` - proposed state
816 TextEdit *TextEdit/*TextEdit | InsertReplaceEdit*/ `json:"textEdit,omitempty"`
818 * An optional array of additional [text edits](#TextEdit) that are applied when
819 * selecting this completion. Edits must not overlap (including the same insert position)
820 * with the main [edit](#CompletionItem.textEdit) nor with themselves.
822 * Additional text edits should be used to change text unrelated to the current cursor position
823 * (for example adding an import statement at the top of the file if the completion item will
824 * insert an unqualified type).
826 AdditionalTextEdits []TextEdit `json:"additionalTextEdits,omitempty"`
828 * An optional set of characters that when pressed while this completion is active will accept it first and
829 * then type that character. *Note* that all commit characters should have `length=1` and that superfluous
830 * characters will be ignored.
832 CommitCharacters []string `json:"commitCharacters,omitempty"`
834 * An optional [command](#Command) that is executed *after* inserting this completion. *Note* that
835 * additional modifications to the current document should be described with the
836 * [additionalTextEdits](#CompletionItem.additionalTextEdits)-property.
838 Command *Command `json:"command,omitempty"`
840 * A data entry field that is preserved on a completion item between
841 * a [CompletionRequest](#CompletionRequest) and a [CompletionResolveRequest]
842 * (#CompletionResolveRequest)
844 Data interface{} `json:"data,omitempty"`
848 * The kind of a completion entry.
850 type CompletionItemKind float64
853 * Completion item tags are extra annotations that tweak the rendering of a completion
858 type CompletionItemTag float64
861 * Represents a collection of [completion items](#CompletionItem) to be presented
864 type CompletionList struct {
866 * This list it not complete. Further typing results in recomputing this list.
868 IsIncomplete bool `json:"isIncomplete"`
870 * The completion items.
872 Items []CompletionItem `json:"items"`
876 * Completion options.
878 type CompletionOptions struct {
880 * Most tools trigger completion request automatically without explicitly requesting
881 * it using a keyboard shortcut (e.g. Ctrl+Space). Typically they do so when the user
882 * starts to type an identifier. For example if the user types `c` in a JavaScript file
883 * code complete will automatically pop up present `console` besides others as a
884 * completion item. Characters that make up identifiers don't need to be listed here.
886 * If code complete should automatically be trigger on characters not being valid inside
887 * an identifier (for example `.` in JavaScript) list them in `triggerCharacters`.
889 TriggerCharacters []string `json:"triggerCharacters,omitempty"`
891 * The list of all possible characters that commit a completion. This field can be used
892 * if clients don't support individual commmit characters per completion item. See
893 * `ClientCapabilities.textDocument.completion.completionItem.commitCharactersSupport`
895 * If a server provides both `allCommitCharacters` and commit characters on an individual
896 * completion item the ones on the completion item win.
900 AllCommitCharacters []string `json:"allCommitCharacters,omitempty"`
902 * The server provides support to resolve additional
903 * information for a completion item.
905 ResolveProvider bool `json:"resolveProvider,omitempty"`
906 WorkDoneProgressOptions
910 * Completion parameters
912 type CompletionParams struct {
914 * The completion context. This is only available it the client specifies
915 * to send this using the client capability `textDocument.completion.contextSupport === true`
917 Context CompletionContext `json:"context,omitempty"`
918 TextDocumentPositionParams
919 WorkDoneProgressParams
924 * How a completion was triggered
926 type CompletionTriggerKind float64
928 type ConfigurationClientCapabilities struct {
930 * The workspace client capabilities
932 Workspace WorkspaceGn `json:"workspace,omitempty"`
935 type ConfigurationItem struct {
937 * The scope to get the configuration section for.
939 ScopeURI string `json:"scopeUri,omitempty"`
941 * The configuration section asked for.
943 Section string `json:"section,omitempty"`
947 * The parameters of a configuration request.
949 type ConfigurationParams struct {
950 Items []ConfigurationItem `json:"items"`
954 * Create file operation.
956 type CreateFile struct {
960 Kind string `json:"kind"`
962 * The resource to create.
964 URI DocumentURI `json:"uri"`
968 Options CreateFileOptions `json:"options,omitempty"`
973 * Options to create a file.
975 type CreateFileOptions struct {
977 * Overwrite existing file. Overwrite wins over `ignoreIfExists`
979 Overwrite bool `json:"overwrite,omitempty"`
983 IgnoreIfExists bool `json:"ignoreIfExists,omitempty"`
987 * The declaration of a symbol representation as one or many [locations](#Location).
989 type Declaration = []Location /*Location | Location[]*/
994 type DeclarationClientCapabilities struct {
996 * Whether declaration supports dynamic registration. If this is set to `true`
997 * the client supports the new `DeclarationRegistrationOptions` return value
998 * for the corresponding server capability as well.
1000 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
1002 * The client supports additional metadata in the form of declaration links.
1004 LinkSupport bool `json:"linkSupport,omitempty"`
1008 * Information about where a symbol is declared.
1010 * Provides additional metadata over normal [location](#Location) declarations, including the range of
1011 * the declaring symbol.
1013 * Servers should prefer returning `DeclarationLink` over `Declaration` if supported
1016 type DeclarationLink = LocationLink
1018 type DeclarationOptions struct {
1019 WorkDoneProgressOptions
1022 type DeclarationParams struct {
1023 TextDocumentPositionParams
1024 WorkDoneProgressParams
1028 type DeclarationRegistrationOptions struct {
1030 TextDocumentRegistrationOptions
1031 StaticRegistrationOptions
1035 * The definition of a symbol represented as one or many [locations](#Location).
1036 * For most programming languages there is only one location at which a symbol is
1039 * Servers should prefer returning `DefinitionLink` over `Definition` if supported
1042 type Definition = []Location /*Location | Location[]*/
1045 * Client Capabilities for a [DefinitionRequest](#DefinitionRequest).
1047 type DefinitionClientCapabilities struct {
1049 * Whether definition supports dynamic registration.
1051 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
1053 * The client supports additional metadata in the form of definition links.
1057 LinkSupport bool `json:"linkSupport,omitempty"`
1061 * Information about where a symbol is defined.
1063 * Provides additional metadata over normal [location](#Location) definitions, including the range of
1064 * the defining symbol
1066 type DefinitionLink = LocationLink
1069 * Server Capabilities for a [DefinitionRequest](#DefinitionRequest).
1071 type DefinitionOptions struct {
1072 WorkDoneProgressOptions
1076 * Parameters for a [DefinitionRequest](#DefinitionRequest).
1078 type DefinitionParams struct {
1079 TextDocumentPositionParams
1080 WorkDoneProgressParams
1085 * Delete file operation
1087 type DeleteFile struct {
1091 Kind string `json:"kind"`
1093 * The file to delete.
1095 URI DocumentURI `json:"uri"`
1099 Options DeleteFileOptions `json:"options,omitempty"`
1104 * Delete file options
1106 type DeleteFileOptions struct {
1108 * Delete the content recursively if a folder is denoted.
1110 Recursive bool `json:"recursive,omitempty"`
1112 * Ignore the operation if the file doesn't exist.
1114 IgnoreIfNotExists bool `json:"ignoreIfNotExists,omitempty"`
1118 * Represents a diagnostic, such as a compiler error or warning. Diagnostic objects
1119 * are only valid in the scope of a resource.
1121 type Diagnostic struct {
1123 * The range at which the message applies
1125 Range Range `json:"range"`
1127 * The diagnostic's severity. Can be omitted. If omitted it is up to the
1128 * client to interpret diagnostics as error, warning, info or hint.
1130 Severity DiagnosticSeverity `json:"severity,omitempty"`
1132 * The diagnostic's code, which usually appear in the user interface.
1134 Code interface{}/*number | string*/ `json:"code,omitempty"`
1136 * An optional property to describe the error code.
1138 * @since 3.16.0 - proposed state
1140 CodeDescription *CodeDescription `json:"codeDescription,omitempty"`
1142 * A human-readable string describing the source of this
1143 * diagnostic, e.g. 'typescript' or 'super lint'. It usually
1144 * appears in the user interface.
1146 Source string `json:"source,omitempty"`
1148 * The diagnostic's message. It usually appears in the user interface
1150 Message string `json:"message"`
1152 * Additional metadata about the diagnostic.
1156 Tags []DiagnosticTag `json:"tags,omitempty"`
1158 * An array of related diagnostic information, e.g. when symbol-names within
1159 * a scope collide all definitions can be marked via this property.
1161 RelatedInformation []DiagnosticRelatedInformation `json:"relatedInformation,omitempty"`
1163 * A data entry field that is preserved between a `textDocument/publishDiagnostics`
1164 * notification and `textDocument/codeAction` request.
1166 * @since 3.16.0 - proposed state
1168 Data interface{} `json:"data,omitempty"`
1172 * Represents a related message and source code location for a diagnostic. This should be
1173 * used to point to code locations that cause or related to a diagnostics, e.g when duplicating
1174 * a symbol in a scope.
1176 type DiagnosticRelatedInformation struct {
1178 * The location of this related diagnostic information.
1180 Location Location `json:"location"`
1182 * The message of this related diagnostic information.
1184 Message string `json:"message"`
1188 * The diagnostic's severity.
1190 type DiagnosticSeverity float64
1193 * The diagnostic tags.
1197 type DiagnosticTag float64
1199 type DidChangeConfigurationClientCapabilities struct {
1201 * Did change configuration notification supports dynamic registration.
1203 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
1207 * The parameters of a change configuration notification.
1209 type DidChangeConfigurationParams struct {
1211 * The actual changed settings
1213 Settings interface{} `json:"settings"`
1217 * The change text document notification's parameters.
1219 type DidChangeTextDocumentParams struct {
1221 * The document that did change. The version number points
1222 * to the version after all provided content changes have
1225 TextDocument VersionedTextDocumentIdentifier `json:"textDocument"`
1227 * The actual content changes. The content changes describe single state changes
1228 * to the document. So if there are two content changes c1 (at array index 0) and
1229 * c2 (at array index 1) for a document in state S then c1 moves the document from
1230 * S to S' and c2 from S' to S''. So c1 is computed on the state S and c2 is computed
1233 * To mirror the content of a document using change events use the following approach:
1234 * - start with the same initial content
1235 * - apply the 'textDocument/didChange' notifications in the order you recevie them.
1236 * - apply the `TextDocumentContentChangeEvent`s in a single notification in the order
1239 ContentChanges []TextDocumentContentChangeEvent `json:"contentChanges"`
1242 type DidChangeWatchedFilesClientCapabilities struct {
1244 * Did change watched files notification supports dynamic registration. Please note
1245 * that the current protocol doesn't support static configuration for file changes
1246 * from the server side.
1248 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
1252 * The watched files change notification's parameters.
1254 type DidChangeWatchedFilesParams struct {
1256 * The actual file events.
1258 Changes []FileEvent `json:"changes"`
1262 * Describe options to be used when registered for text document change events.
1264 type DidChangeWatchedFilesRegistrationOptions struct {
1266 * The watchers to register.
1268 Watchers []FileSystemWatcher `json:"watchers"`
1272 * The parameters of a `workspace/didChangeWorkspaceFolders` notification.
1274 type DidChangeWorkspaceFoldersParams struct {
1276 * The actual workspace folder change event.
1278 Event WorkspaceFoldersChangeEvent `json:"event"`
1282 * The parameters send in a close text document notification
1284 type DidCloseTextDocumentParams struct {
1286 * The document that was closed.
1288 TextDocument TextDocumentIdentifier `json:"textDocument"`
1292 * The parameters send in a open text document notification
1294 type DidOpenTextDocumentParams struct {
1296 * The document that was opened.
1298 TextDocument TextDocumentItem `json:"textDocument"`
1302 * The parameters send in a save text document notification
1304 type DidSaveTextDocumentParams struct {
1306 * The document that was closed.
1308 TextDocument VersionedTextDocumentIdentifier `json:"textDocument"`
1310 * Optional the content when saved. Depends on the includeText value
1311 * when the save notification was requested.
1313 Text *string `json:"text,omitempty"`
1316 type DocumentColorClientCapabilities struct {
1318 * Whether implementation supports dynamic registration. If this is set to `true`
1319 * the client supports the new `DocumentColorRegistrationOptions` return value
1320 * for the corresponding server capability as well.
1322 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
1325 type DocumentColorOptions struct {
1326 WorkDoneProgressOptions
1330 * Parameters for a [DocumentColorRequest](#DocumentColorRequest).
1332 type DocumentColorParams struct {
1334 * The text document.
1336 TextDocument TextDocumentIdentifier `json:"textDocument"`
1337 WorkDoneProgressParams
1341 type DocumentColorRegistrationOptions struct {
1342 TextDocumentRegistrationOptions
1343 StaticRegistrationOptions
1344 DocumentColorOptions
1348 * A document filter denotes a document by different properties like
1349 * the [language](#TextDocument.languageId), the [scheme](#Uri.scheme) of
1350 * its resource, or a glob-pattern that is applied to the [path](#TextDocument.fileName).
1352 * Glob patterns can have the following syntax:
1353 * - `*` to match one or more characters in a path segment
1354 * - `?` to match on one character in a path segment
1355 * - `**` to match any number of path segments, including none
1356 * - `{}` to group conditions (e.g. `**/*.{ts,js}` matches all TypeScript and JavaScript files)
1357 * - `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …)
1358 * - `[!...]` to negate a range of characters to match in a path segment (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but not `example.0`)
1360 * @sample A language filter that applies to typescript files on disk: `{ language: 'typescript', scheme: 'file' }`
1361 * @sample A language filter that applies to all package.json paths: `{ language: 'json', pattern: '**package.json' }`
1363 type DocumentFilter = struct {
1364 /** A language id, like `typescript`. */
1365 Language string `json:"language"`
1366 /** A Uri [scheme](#Uri.scheme), like `file` or `untitled`. */
1367 Scheme string `json:"scheme,omitempty"`
1368 /** A glob pattern, like `*.{ts,js}`. */
1369 Pattern string `json:"pattern,omitempty"`
1373 * Client capabilities of a [DocumentFormattingRequest](#DocumentFormattingRequest).
1375 type DocumentFormattingClientCapabilities struct {
1377 * Whether formatting supports dynamic registration.
1379 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
1383 * Provider options for a [DocumentFormattingRequest](#DocumentFormattingRequest).
1385 type DocumentFormattingOptions struct {
1386 WorkDoneProgressOptions
1390 * The parameters of a [DocumentFormattingRequest](#DocumentFormattingRequest).
1392 type DocumentFormattingParams struct {
1394 * The document to format.
1396 TextDocument TextDocumentIdentifier `json:"textDocument"`
1398 * The format options
1400 Options FormattingOptions `json:"options"`
1401 WorkDoneProgressParams
1405 * A document highlight is a range inside a text document which deserves
1406 * special attention. Usually a document highlight is visualized by changing
1407 * the background color of its range.
1409 type DocumentHighlight struct {
1411 * The range this highlight applies to.
1413 Range Range `json:"range"`
1415 * The highlight kind, default is [text](#DocumentHighlightKind.Text).
1417 Kind DocumentHighlightKind `json:"kind,omitempty"`
1421 * Client Capabilities for a [DocumentHighlightRequest](#DocumentHighlightRequest).
1423 type DocumentHighlightClientCapabilities struct {
1425 * Whether document highlight supports dynamic registration.
1427 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
1431 * A document highlight kind.
1433 type DocumentHighlightKind float64
1436 * Provider options for a [DocumentHighlightRequest](#DocumentHighlightRequest).
1438 type DocumentHighlightOptions struct {
1439 WorkDoneProgressOptions
1443 * Parameters for a [DocumentHighlightRequest](#DocumentHighlightRequest).
1445 type DocumentHighlightParams struct {
1446 TextDocumentPositionParams
1447 WorkDoneProgressParams
1452 * A document link is a range in a text document that links to an internal or external resource, like another
1453 * text document or a web site.
1455 type DocumentLink struct {
1457 * The range this link applies to.
1459 Range Range `json:"range"`
1461 * The uri this link points to.
1463 Target string `json:"target,omitempty"`
1465 * The tooltip text when you hover over this link.
1467 * If a tooltip is provided, is will be displayed in a string that includes instructions on how to
1468 * trigger the link, such as `{0} (ctrl + click)`. The specific instructions vary depending on OS,
1469 * user settings, and localization.
1473 Tooltip string `json:"tooltip,omitempty"`
1475 * A data entry field that is preserved on a document link between a
1476 * DocumentLinkRequest and a DocumentLinkResolveRequest.
1478 Data interface{} `json:"data,omitempty"`
1482 * The client capabilities of a [DocumentLinkRequest](#DocumentLinkRequest).
1484 type DocumentLinkClientCapabilities struct {
1486 * Whether document link supports dynamic registration.
1488 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
1490 * Whether the client support the `tooltip` property on `DocumentLink`.
1494 TooltipSupport bool `json:"tooltipSupport,omitempty"`
1498 * Provider options for a [DocumentLinkRequest](#DocumentLinkRequest).
1500 type DocumentLinkOptions struct {
1502 * Document links have a resolve provider as well.
1504 ResolveProvider bool `json:"resolveProvider,omitempty"`
1505 WorkDoneProgressOptions
1509 * The parameters of a [DocumentLinkRequest](#DocumentLinkRequest).
1511 type DocumentLinkParams struct {
1513 * The document to provide document links for.
1515 TextDocument TextDocumentIdentifier `json:"textDocument"`
1516 WorkDoneProgressParams
1521 * Client capabilities of a [DocumentOnTypeFormattingRequest](#DocumentOnTypeFormattingRequest).
1523 type DocumentOnTypeFormattingClientCapabilities struct {
1525 * Whether on type formatting supports dynamic registration.
1527 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
1531 * Provider options for a [DocumentOnTypeFormattingRequest](#DocumentOnTypeFormattingRequest).
1533 type DocumentOnTypeFormattingOptions struct {
1535 * A character on which formatting should be triggered, like `}`.
1537 FirstTriggerCharacter string `json:"firstTriggerCharacter"`
1539 * More trigger characters.
1541 MoreTriggerCharacter []string `json:"moreTriggerCharacter,omitempty"`
1545 * The parameters of a [DocumentOnTypeFormattingRequest](#DocumentOnTypeFormattingRequest).
1547 type DocumentOnTypeFormattingParams struct {
1549 * The document to format.
1551 TextDocument TextDocumentIdentifier `json:"textDocument"`
1553 * The position at which this request was send.
1555 Position Position `json:"position"`
1557 * The character that has been typed.
1559 Ch string `json:"ch"`
1561 * The format options.
1563 Options FormattingOptions `json:"options"`
1567 * Client capabilities of a [DocumentRangeFormattingRequest](#DocumentRangeFormattingRequest).
1569 type DocumentRangeFormattingClientCapabilities struct {
1571 * Whether range formatting supports dynamic registration.
1573 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
1577 * Provider options for a [DocumentRangeFormattingRequest](#DocumentRangeFormattingRequest).
1579 type DocumentRangeFormattingOptions struct {
1580 WorkDoneProgressOptions
1584 * The parameters of a [DocumentRangeFormattingRequest](#DocumentRangeFormattingRequest).
1586 type DocumentRangeFormattingParams struct {
1588 * The document to format.
1590 TextDocument TextDocumentIdentifier `json:"textDocument"`
1592 * The range to format
1594 Range Range `json:"range"`
1596 * The format options
1598 Options FormattingOptions `json:"options"`
1599 WorkDoneProgressParams
1603 * A document selector is the combination of one or many document filters.
1605 * @sample `let sel:DocumentSelector = [{ language: 'typescript' }, { language: 'json', pattern: '**∕tsconfig.json' }]`;
1607 type DocumentSelector = []string /*string | DocumentFilter*/
1610 * Represents programming constructs like variables, classes, interfaces etc.
1611 * that appear in a document. Document symbols can be hierarchical and they
1612 * have two ranges: one that encloses its definition and one that points to
1613 * its most interesting range, e.g. the range of an identifier.
1615 type DocumentSymbol struct {
1617 * The name of this symbol. Will be displayed in the user interface and therefore must not be
1618 * an empty string or a string only consisting of white spaces.
1620 Name string `json:"name"`
1622 * More detail for this symbol, e.g the signature of a function.
1624 Detail string `json:"detail,omitempty"`
1626 * The kind of this symbol.
1628 Kind SymbolKind `json:"kind"`
1630 * Tags for this completion item.
1632 * @since 3.16.0 - proposed state
1634 Tags []SymbolTag `json:"tags,omitempty"`
1636 * Indicates if this symbol is deprecated.
1638 * @deprecated Use tags instead
1640 Deprecated bool `json:"deprecated,omitempty"`
1642 * The range enclosing this symbol not including leading/trailing whitespace but everything else
1643 * like comments. This information is typically used to determine if the the clients cursor is
1644 * inside the symbol to reveal in the symbol in the UI.
1646 Range Range `json:"range"`
1648 * The range that should be selected and revealed when this symbol is being picked, e.g the name of a function.
1649 * Must be contained by the the `range`.
1651 SelectionRange Range `json:"selectionRange"`
1653 * Children of this symbol, e.g. properties of a class.
1655 Children []DocumentSymbol `json:"children,omitempty"`
1659 * Client Capabilities for a [DocumentSymbolRequest](#DocumentSymbolRequest).
1661 type DocumentSymbolClientCapabilities struct {
1663 * Whether document symbol supports dynamic registration.
1665 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
1667 * Specific capabilities for the `SymbolKind`.
1671 * The symbol kind values the client supports. When this
1672 * property exists the client also guarantees that it will
1673 * handle values outside its set gracefully and falls back
1674 * to a default value when unknown.
1676 * If this property is not present the client only supports
1677 * the symbol kinds from `File` to `Array` as defined in
1678 * the initial version of the protocol.
1680 ValueSet []SymbolKind `json:"valueSet,omitempty"`
1681 } `json:"symbolKind,omitempty"`
1683 * The client support hierarchical document symbols.
1685 HierarchicalDocumentSymbolSupport bool `json:"hierarchicalDocumentSymbolSupport,omitempty"`
1687 * The client supports tags on `SymbolInformation`. Tags are supported on
1688 * `DocumentSymbol` if `hierarchicalDocumentSymbolSupport` is set to true.
1689 * Clients supporting tags have to handle unknown tags gracefully.
1691 * @since 3.16.0 - proposed state
1695 * The tags supported by the client.
1697 ValueSet []SymbolTag `json:"valueSet"`
1698 } `json:"tagSupport,omitempty"`
1700 * The client supports an additional label presented in the UI when
1701 * registering a document symbol provider.
1705 LabelSupport bool `json:"labelSupport,omitempty"`
1709 * Provider options for a [DocumentSymbolRequest](#DocumentSymbolRequest).
1711 type DocumentSymbolOptions struct {
1713 * A human-readable string that is shown when multiple outlines trees
1714 * are shown for the same document.
1716 * @since 3.16.0 - proposed state
1718 Label string `json:"label,omitempty"`
1719 WorkDoneProgressOptions
1723 * Parameters for a [DocumentSymbolRequest](#DocumentSymbolRequest).
1725 type DocumentSymbolParams struct {
1727 * The text document.
1729 TextDocument TextDocumentIdentifier `json:"textDocument"`
1730 WorkDoneProgressParams
1735 * A tagging type for string properties that are actually document URIs.
1737 type DocumentURI string
1740 * The client capabilities of a [ExecuteCommandRequest](#ExecuteCommandRequest).
1742 type ExecuteCommandClientCapabilities struct {
1744 * Execute command supports dynamic registration.
1746 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
1750 * The server capabilities of a [ExecuteCommandRequest](#ExecuteCommandRequest).
1752 type ExecuteCommandOptions struct {
1754 * The commands to be executed on the server
1756 Commands []string `json:"commands"`
1757 WorkDoneProgressOptions
1761 * The parameters of a [ExecuteCommandRequest](#ExecuteCommandRequest).
1763 type ExecuteCommandParams struct {
1765 * The identifier of the actual command handler.
1767 Command string `json:"command"`
1769 * Arguments that the command should be invoked with.
1771 Arguments []json.RawMessage `json:"arguments,omitempty"`
1772 WorkDoneProgressParams
1775 type FailureHandlingKind string
1778 * The file event type
1780 type FileChangeType float64
1783 * An event describing a file change.
1785 type FileEvent struct {
1789 URI DocumentURI `json:"uri"`
1793 Type FileChangeType `json:"type"`
1796 type FileSystemWatcher struct {
1798 * The glob pattern to watch. Glob patterns can have the following syntax:
1799 * - `*` to match one or more characters in a path segment
1800 * - `?` to match on one character in a path segment
1801 * - `**` to match any number of path segments, including none
1802 * - `{}` to group conditions (e.g. `**/*.{ts,js}` matches all TypeScript and JavaScript files)
1803 * - `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …)
1804 * - `[!...]` to negate a range of characters to match in a path segment (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but not `example.0`)
1806 GlobPattern string `json:"globPattern"`
1808 * The kind of events of interest. If omitted it defaults
1809 * to WatchKind.Create | WatchKind.Change | WatchKind.Delete
1812 Kind float64 `json:"kind,omitempty"`
1816 * Represents a folding range.
1818 type FoldingRange struct {
1820 * The zero-based line number from where the folded range starts.
1822 StartLine float64 `json:"startLine"`
1824 * The zero-based character offset from where the folded range starts. If not defined, defaults to the length of the start line.
1826 StartCharacter float64 `json:"startCharacter,omitempty"`
1828 * The zero-based line number where the folded range ends.
1830 EndLine float64 `json:"endLine"`
1832 * The zero-based character offset before the folded range ends. If not defined, defaults to the length of the end line.
1834 EndCharacter float64 `json:"endCharacter,omitempty"`
1836 * Describes the kind of the folding range such as `comment' or 'region'. The kind
1837 * is used to categorize folding ranges and used by commands like 'Fold all comments'. See
1838 * [FoldingRangeKind](#FoldingRangeKind) for an enumeration of standardized kinds.
1840 Kind string `json:"kind,omitempty"`
1843 type FoldingRangeClientCapabilities struct {
1845 * Whether implementation supports dynamic registration for folding range providers. If this is set to `true`
1846 * the client supports the new `FoldingRangeRegistrationOptions` return value for the corresponding server
1847 * capability as well.
1849 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
1851 * The maximum number of folding ranges that the client prefers to receive per document. The value serves as a
1852 * hint, servers are free to follow the limit.
1854 RangeLimit float64 `json:"rangeLimit,omitempty"`
1856 * If set, the client signals that it only supports folding complete lines. If set, client will
1857 * ignore specified `startCharacter` and `endCharacter` properties in a FoldingRange.
1859 LineFoldingOnly bool `json:"lineFoldingOnly,omitempty"`
1863 * Enum of known range kinds
1865 type FoldingRangeKind string
1867 type FoldingRangeOptions struct {
1868 WorkDoneProgressOptions
1872 * Parameters for a [FoldingRangeRequest](#FoldingRangeRequest).
1874 type FoldingRangeParams struct {
1876 * The text document.
1878 TextDocument TextDocumentIdentifier `json:"textDocument"`
1879 WorkDoneProgressParams
1883 type FoldingRangeRegistrationOptions struct {
1884 TextDocumentRegistrationOptions
1886 StaticRegistrationOptions
1890 * Value-object describing what options formatting should use.
1892 type FormattingOptions struct {
1894 * Size of a tab in spaces.
1896 TabSize float64 `json:"tabSize"`
1898 * Prefer spaces over tabs.
1900 InsertSpaces bool `json:"insertSpaces"`
1902 * Trim trailing whitespaces on a line.
1906 TrimTrailingWhitespace bool `json:"trimTrailingWhitespace,omitempty"`
1908 * Insert a newline character at the end of the file if one does not exist.
1912 InsertFinalNewline bool `json:"insertFinalNewline,omitempty"`
1914 * Trim all newlines after the final newline at the end of the file.
1918 TrimFinalNewlines bool `json:"trimFinalNewlines,omitempty"`
1922 * The result of a hover request.
1926 * The hover's content
1928 Contents MarkupContent/*MarkupContent | MarkedString | MarkedString[]*/ `json:"contents"`
1932 Range Range `json:"range,omitempty"`
1935 type HoverClientCapabilities struct {
1937 * Whether hover supports dynamic registration.
1939 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
1941 * Client supports the follow content formats for the content
1942 * property. The order describes the preferred format of the client.
1944 ContentFormat []MarkupKind `json:"contentFormat,omitempty"`
1950 type HoverOptions struct {
1951 WorkDoneProgressOptions
1955 * Parameters for a [HoverRequest](#HoverRequest).
1957 type HoverParams struct {
1958 TextDocumentPositionParams
1959 WorkDoneProgressParams
1965 type ImplementationClientCapabilities struct {
1967 * Whether implementation supports dynamic registration. If this is set to `true`
1968 * the client supports the new `ImplementationRegistrationOptions` return value
1969 * for the corresponding server capability as well.
1971 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
1973 * The client supports additional metadata in the form of definition links.
1977 LinkSupport bool `json:"linkSupport,omitempty"`
1980 type ImplementationOptions struct {
1981 WorkDoneProgressOptions
1984 type ImplementationParams struct {
1985 TextDocumentPositionParams
1986 WorkDoneProgressParams
1990 type ImplementationRegistrationOptions struct {
1991 TextDocumentRegistrationOptions
1992 ImplementationOptions
1993 StaticRegistrationOptions
1997 * Known error codes for an `InitializeError`;
1999 type InitializeError float64
2001 type InitializeParams = struct {
2002 InnerInitializeParams
2003 WorkspaceFoldersInitializeParams
2007 * The result returned from an initialize request.
2009 type InitializeResult struct {
2011 * The capabilities the language server provides.
2013 Capabilities ServerCapabilities `json:"capabilities"`
2015 * Information about the server.
2021 * The name of the server as defined by the server.
2023 Name string `json:"name"`
2025 * The servers's version as defined by the server.
2027 Version string `json:"version,omitempty"`
2028 } `json:"serverInfo,omitempty"`
2031 type InitializedParams struct {
2035 * Defines the capabilities provided by the client.
2037 type InnerClientCapabilities struct {
2039 * Workspace specific client capabilities.
2041 Workspace WorkspaceClientCapabilities `json:"workspace,omitempty"`
2043 * Text document specific client capabilities.
2045 TextDocument TextDocumentClientCapabilities `json:"textDocument,omitempty"`
2047 * Window specific client capabilities.
2049 Window interface{} `json:"window,omitempty"`
2051 * Experimental client capabilities.
2053 Experimental interface{} `json:"experimental,omitempty"`
2057 * The initialize parameters
2059 type InnerInitializeParams struct {
2061 * The process Id of the parent process that started
2064 ProcessID float64/*number | null*/ `json:"processId"`
2066 * Information about the client
2072 * The name of the client as defined by the client.
2074 Name string `json:"name"`
2076 * The client's version as defined by the client.
2078 Version string `json:"version,omitempty"`
2079 } `json:"clientInfo,omitempty"`
2081 * The rootPath of the workspace. Is null
2082 * if no folder is open.
2084 * @deprecated in favour of rootUri.
2086 RootPath string/*string | null*/ `json:"rootPath,omitempty"`
2088 * The rootUri of the workspace. Is null if no
2089 * folder is open. If both `rootPath` and `rootUri` are set
2092 * @deprecated in favour of workspaceFolders.
2094 RootURI DocumentURI/*DocumentUri | null*/ `json:"rootUri"`
2096 * The capabilities provided by the client (editor or tool)
2098 Capabilities ClientCapabilities `json:"capabilities"`
2100 * User provided initialization options.
2102 InitializationOptions interface{} `json:"initializationOptions,omitempty"`
2104 * The initial trace setting. If omitted trace is disabled ('off').
2106 Trace string/*'off' | 'messages' | 'verbose'*/ `json:"trace,omitempty"`
2107 WorkDoneProgressParams
2111 * Defines the capabilities provided by a language
2114 type InnerServerCapabilities struct {
2116 * Defines how text documents are synced. Is either a detailed structure defining each notification or
2117 * for backwards compatibility the TextDocumentSyncKind number.
2119 TextDocumentSync interface{}/*TextDocumentSyncOptions | TextDocumentSyncKind*/ `json:"textDocumentSync,omitempty"`
2121 * The server provides completion support.
2123 CompletionProvider CompletionOptions `json:"completionProvider,omitempty"`
2125 * The server provides hover support.
2127 HoverProvider bool/*boolean | HoverOptions*/ `json:"hoverProvider,omitempty"`
2129 * The server provides signature help support.
2131 SignatureHelpProvider SignatureHelpOptions `json:"signatureHelpProvider,omitempty"`
2133 * The server provides Goto Declaration support.
2135 DeclarationProvider interface{}/* bool | DeclarationOptions | DeclarationRegistrationOptions*/ `json:"declarationProvider,omitempty"`
2137 * The server provides goto definition support.
2139 DefinitionProvider bool/*boolean | DefinitionOptions*/ `json:"definitionProvider,omitempty"`
2141 * The server provides Goto Type Definition support.
2143 TypeDefinitionProvider interface{}/* bool | TypeDefinitionOptions | TypeDefinitionRegistrationOptions*/ `json:"typeDefinitionProvider,omitempty"`
2145 * The server provides Goto Implementation support.
2147 ImplementationProvider interface{}/* bool | ImplementationOptions | ImplementationRegistrationOptions*/ `json:"implementationProvider,omitempty"`
2149 * The server provides find references support.
2151 ReferencesProvider bool/*boolean | ReferenceOptions*/ `json:"referencesProvider,omitempty"`
2153 * The server provides document highlight support.
2155 DocumentHighlightProvider bool/*boolean | DocumentHighlightOptions*/ `json:"documentHighlightProvider,omitempty"`
2157 * The server provides document symbol support.
2159 DocumentSymbolProvider bool/*boolean | DocumentSymbolOptions*/ `json:"documentSymbolProvider,omitempty"`
2161 * The server provides code actions. CodeActionOptions may only be
2162 * specified if the client states that it supports
2163 * `codeActionLiteralSupport` in its initial `initialize` request.
2165 CodeActionProvider interface{}/*boolean | CodeActionOptions*/ `json:"codeActionProvider,omitempty"`
2167 * The server provides code lens.
2169 CodeLensProvider CodeLensOptions `json:"codeLensProvider,omitempty"`
2171 * The server provides document link support.
2173 DocumentLinkProvider DocumentLinkOptions `json:"documentLinkProvider,omitempty"`
2175 * The server provides color provider support.
2177 ColorProvider interface{}/* bool | DocumentColorOptions | DocumentColorRegistrationOptions*/ `json:"colorProvider,omitempty"`
2179 * The server provides workspace symbol support.
2181 WorkspaceSymbolProvider bool/*boolean | WorkspaceSymbolOptions*/ `json:"workspaceSymbolProvider,omitempty"`
2183 * The server provides document formatting.
2185 DocumentFormattingProvider bool/*boolean | DocumentFormattingOptions*/ `json:"documentFormattingProvider,omitempty"`
2187 * The server provides document range formatting.
2189 DocumentRangeFormattingProvider bool/*boolean | DocumentRangeFormattingOptions*/ `json:"documentRangeFormattingProvider,omitempty"`
2191 * The server provides document formatting on typing.
2193 DocumentOnTypeFormattingProvider DocumentOnTypeFormattingOptions `json:"documentOnTypeFormattingProvider,omitempty"`
2195 * The server provides rename support. RenameOptions may only be
2196 * specified if the client states that it supports
2197 * `prepareSupport` in its initial `initialize` request.
2199 RenameProvider interface{}/*boolean | RenameOptions*/ `json:"renameProvider,omitempty"`
2201 * The server provides folding provider support.
2203 FoldingRangeProvider interface{}/* bool | FoldingRangeOptions | FoldingRangeRegistrationOptions*/ `json:"foldingRangeProvider,omitempty"`
2205 * The server provides selection range support.
2207 SelectionRangeProvider interface{}/* bool | SelectionRangeOptions | SelectionRangeRegistrationOptions*/ `json:"selectionRangeProvider,omitempty"`
2209 * The server provides execute command support.
2211 ExecuteCommandProvider ExecuteCommandOptions `json:"executeCommandProvider,omitempty"`
2213 * The server provides Call Hierarchy support.
2215 * @since 3.16.0 - proposed state
2217 CallHierarchyProvider interface{}/* bool | CallHierarchyOptions | CallHierarchyRegistrationOptions*/ `json:"callHierarchyProvider,omitempty"`
2219 * The server provides semantic tokens support.
2221 * @since 3.16.0 - proposed state
2223 SemanticTokensProvider interface{}/*SemanticTokensOptions | SemanticTokensRegistrationOptions*/ `json:"semanticTokensProvider,omitempty"`
2225 * Experimental server capabilities.
2227 Experimental interface{} `json:"experimental,omitempty"`
2231 * A special text edit to provide an insert and a replace operation.
2233 * @since 3.16.0 - proposed state
2235 type InsertReplaceEdit struct {
2237 * The string to be inserted.
2239 NewText string `json:"newText"`
2241 * The range if the insert is requested
2243 Insert Range `json:"insert"`
2245 * The range if the replace is requested.
2247 Replace Range `json:"replace"`
2251 * Defines whether the insert text in a completion item should be interpreted as
2252 * plain text or a snippet.
2254 type InsertTextFormat float64
2257 * Represents a location inside a resource, such as a line
2258 * inside a text file.
2260 type Location struct {
2261 URI DocumentURI `json:"uri"`
2262 Range Range `json:"range"`
2266 * Represents the connection of two locations. Provides additional metadata over normal [locations](#Location),
2267 * including an origin range.
2269 type LocationLink struct {
2271 * Span of the origin of this link.
2273 * Used as the underlined span for mouse definition hover. Defaults to the word range at
2274 * the definition position.
2276 OriginSelectionRange Range `json:"originSelectionRange,omitempty"`
2278 * The target resource identifier of this link.
2280 TargetURI DocumentURI `json:"targetUri"`
2282 * The full target range of this link. If the target for example is a symbol then target range is the
2283 * range enclosing this symbol not including leading/trailing whitespace but everything else
2284 * like comments. This information is typically used to highlight the range in the editor.
2286 TargetRange Range `json:"targetRange"`
2288 * The range that should be selected and revealed when this link is being followed, e.g the name of a function.
2289 * Must be contained by the the `targetRange`. See also `DocumentSymbol#range`
2291 TargetSelectionRange Range `json:"targetSelectionRange"`
2295 * The log message parameters.
2297 type LogMessageParams struct {
2299 * The message type. See {@link MessageType}
2301 Type MessageType `json:"type"`
2303 * The actual message
2305 Message string `json:"message"`
2308 type LogTraceParams struct {
2309 Message string `json:"message"`
2310 Verbose string `json:"verbose,omitempty"`
2314 * MarkedString can be used to render human readable text. It is either a markdown string
2315 * or a code-block that provides a language and a code snippet. The language identifier
2316 * is semantically equal to the optional language identifier in fenced code blocks in GitHub
2317 * issues. See https://help.github.com/articles/creating-and-highlighting-code-blocks/#syntax-highlighting
2319 * The pair of a language and a value is an equivalent to markdown:
2324 * Note that markdown strings will be sanitized - that means html will be escaped.
2325 * @deprecated use MarkupContent instead.
2327 type MarkedString = string /*string | { language: string; value: string }*/
2330 * A `MarkupContent` literal represents a string value which content is interpreted base on its
2331 * kind flag. Currently the protocol supports `plaintext` and `markdown` as markup kinds.
2333 * If the kind is `markdown` then the value can contain fenced code blocks like in GitHub issues.
2334 * See https://help.github.com/articles/creating-and-highlighting-code-blocks/#syntax-highlighting
2336 * Here is an example how such a string can be constructed using JavaScript / TypeScript:
2338 * let markdown: MarkdownContent = {
2339 * kind: MarkupKind.Markdown,
2350 * *Please Note* that clients might sanitize the return markdown. A client could decide to
2351 * remove HTML from the markdown to avoid script execution.
2353 type MarkupContent struct {
2355 * The type of the Markup
2357 Kind MarkupKind `json:"kind"`
2359 * The content itself
2361 Value string `json:"value"`
2365 * Describes the content type that a client supports in various
2366 * result literals like `Hover`, `ParameterInfo` or `CompletionItem`.
2368 * Please note that `MarkupKinds` must not start with a `$`. This kinds
2369 * are reserved for internal usage.
2371 type MarkupKind string
2373 type MessageActionItem struct {
2375 * A short title like 'Retry', 'Open Log' etc.
2377 Title string `json:"title"`
2383 type MessageType float64
2386 * Moniker definition to match LSIF 0.5 moniker definition.
2390 type Moniker struct {
2392 * The scheme of the moniker. For example tsc or .Net
2394 Scheme string `json:"scheme"`
2396 * The identifier of the moniker. The value is opaque in LSIF however
2397 * schema owners are allowed to define the structure if they want.
2399 Identifier string `json:"identifier"`
2401 * The scope in which the moniker is unique
2403 Unique UniquenessLevel `json:"unique"`
2405 * The moniker kind if known.
2407 Kind MonikerKind `json:"kind,omitempty"`
2415 type MonikerKind string
2417 type MonikerParams struct {
2418 TextDocumentPositionParams
2419 WorkDoneProgressParams
2424 * Represents a parameter of a callable-signature. A parameter can
2425 * have a label and a doc-comment.
2427 type ParameterInformation struct {
2429 * The label of this parameter information.
2431 * Either a string or an inclusive start and exclusive end offsets within its containing
2432 * signature label. (see SignatureInformation.label). The offsets are based on a UTF-16
2433 * string representation as `Position` and `Range` does.
2435 * *Note*: a label of type string should be a substring of its containing signature label.
2436 * Its intended use case is to highlight the parameter label part in the `SignatureInformation.label`.
2438 Label string/*string | [number, number]*/ `json:"label"`
2440 * The human-readable doc-comment of this signature. Will be shown
2441 * in the UI but can be omitted.
2443 Documentation string/*string | MarkupContent*/ `json:"documentation,omitempty"`
2446 type PartialResultParams struct {
2448 * An optional token that a server can use to report partial results (e.g. streaming) to
2451 PartialResultToken ProgressToken `json:"partialResultToken,omitempty"`
2455 * Position in a text document expressed as zero-based line and character offset.
2456 * The offsets are based on a UTF-16 string representation. So a string of the form
2457 * `a𐐀b` the character offset of the character `a` is 0, the character offset of `𐐀`
2458 * is 1 and the character offset of b is 3 since `𐐀` is represented using two code
2461 * Positions are line end character agnostic. So you can not specify a position that
2462 * denotes `\r|\n` or `\n|` where `|` represents the character offset.
2464 type Position struct {
2466 * Line position in a document (zero-based).
2467 * If a line number is greater than the number of lines in a document, it defaults back to the number of lines in the document.
2468 * If a line number is negative, it defaults to 0.
2470 Line float64 `json:"line"`
2472 * Character offset on a line in a document (zero-based). Assuming that the line is
2473 * represented as a string, the `character` value represents the gap between the
2474 * `character` and `character + 1`.
2476 * If the character value is greater than the line length it defaults back to the
2478 * If a line number is negative, it defaults to 0.
2480 Character float64 `json:"character"`
2483 type PrepareRenameParams struct {
2484 TextDocumentPositionParams
2485 WorkDoneProgressParams
2488 type ProgressParams struct {
2490 * The progress token provided by the client or server.
2492 Token ProgressToken `json:"token"`
2494 * The progress data.
2496 Value interface{} `json:"value"`
2499 type ProgressToken = interface{} /*number | string*/
2502 * The publish diagnostic client capabilities.
2504 type PublishDiagnosticsClientCapabilities struct {
2506 * Whether the clients accepts diagnostics with related information.
2508 RelatedInformation bool `json:"relatedInformation,omitempty"`
2510 * Client supports the tag property to provide meta data about a diagnostic.
2511 * Clients supporting tags have to handle unknown tags gracefully.
2517 * The tags supported by the client.
2519 ValueSet []DiagnosticTag `json:"valueSet"`
2520 } `json:"tagSupport,omitempty"`
2522 * Whether the client interprets the version property of the
2523 * `textDocument/publishDiagnostics` notification`s parameter.
2527 VersionSupport bool `json:"versionSupport,omitempty"`
2529 * Client supports a codeDescription property
2531 * @since 3.16.0 - proposed state
2533 CodeDescriptionSupport bool `json:"codeDescriptionSupport,omitempty"`
2535 * Whether code action supports the `data` property which is
2536 * preserved between a `textDocument/publishDiagnostics` and
2537 * `textDocument/codeAction` request.
2539 * @since 3.16.0 - proposed state
2541 DataSupport bool `json:"dataSupport,omitempty"`
2545 * The publish diagnostic notification's parameters.
2547 type PublishDiagnosticsParams struct {
2549 * The URI for which diagnostic information is reported.
2551 URI DocumentURI `json:"uri"`
2553 * Optional the version number of the document the diagnostics are published for.
2557 Version float64 `json:"version,omitempty"`
2559 * An array of diagnostic information items.
2561 Diagnostics []Diagnostic `json:"diagnostics"`
2565 * A range in a text document expressed as (zero-based) start and end positions.
2567 * If you want to specify a range that contains a line including the line ending
2568 * character(s) then use an end position denoting the start of the next line.
2572 * start: { line: 5, character: 23 }
2573 * end : { line 6, character : 0 }
2579 * The range's start position
2581 Start Position `json:"start"`
2583 * The range's end position.
2585 End Position `json:"end"`
2589 * Client Capabilities for a [ReferencesRequest](#ReferencesRequest).
2591 type ReferenceClientCapabilities struct {
2593 * Whether references supports dynamic registration.
2595 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
2599 * Value-object that contains additional information when
2600 * requesting references.
2602 type ReferenceContext struct {
2604 * Include the declaration of the current symbol.
2606 IncludeDeclaration bool `json:"includeDeclaration"`
2610 * Reference options.
2612 type ReferenceOptions struct {
2613 WorkDoneProgressOptions
2617 * Parameters for a [ReferencesRequest](#ReferencesRequest).
2619 type ReferenceParams struct {
2620 Context ReferenceContext `json:"context"`
2621 TextDocumentPositionParams
2622 WorkDoneProgressParams
2627 * General parameters to to register for an notification or to register a provider.
2629 type Registration struct {
2631 * The id used to register the request. The id can be used to deregister
2632 * the request again.
2634 ID string `json:"id"`
2636 * The method to register for.
2638 Method string `json:"method"`
2640 * Options necessary for the registration.
2642 RegisterOptions interface{} `json:"registerOptions,omitempty"`
2645 type RegistrationParams struct {
2646 Registrations []Registration `json:"registrations"`
2649 type RenameClientCapabilities struct {
2651 * Whether rename supports dynamic registration.
2653 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
2655 * Client supports testing for validity of rename operations
2658 * @since version 3.12.0
2660 PrepareSupport bool `json:"prepareSupport,omitempty"`
2662 * Client supports the default behavior result.
2664 * @since version 3.16.0
2666 PrepareSupportDefaultBehavior bool `json:"prepareSupportDefaultBehavior,omitempty"`
2670 * Rename file operation
2672 type RenameFile struct {
2676 Kind string `json:"kind"`
2678 * The old (existing) location.
2680 OldURI DocumentURI `json:"oldUri"`
2684 NewURI DocumentURI `json:"newUri"`
2688 Options RenameFileOptions `json:"options,omitempty"`
2693 * Rename file options
2695 type RenameFileOptions struct {
2697 * Overwrite target if existing. Overwrite wins over `ignoreIfExists`
2699 Overwrite bool `json:"overwrite,omitempty"`
2701 * Ignores if target exists.
2703 IgnoreIfExists bool `json:"ignoreIfExists,omitempty"`
2707 * Provider options for a [RenameRequest](#RenameRequest).
2709 type RenameOptions struct {
2711 * Renames should be checked and tested before being executed.
2713 * @since version 3.12.0
2715 PrepareProvider bool `json:"prepareProvider,omitempty"`
2716 WorkDoneProgressOptions
2720 * The parameters of a [RenameRequest](#RenameRequest).
2722 type RenameParams struct {
2724 * The document to rename.
2726 TextDocument TextDocumentIdentifier `json:"textDocument"`
2728 * The position at which this request was sent.
2730 Position Position `json:"position"`
2732 * The new name of the symbol. If the given name is not valid the
2733 * request must return a [ResponseError](#ResponseError) with an
2734 * appropriate message set.
2736 NewName string `json:"newName"`
2737 WorkDoneProgressParams
2740 type ResourceOperation struct {
2741 Kind string `json:"kind"`
2744 type ResourceOperationKind string
2749 type SaveOptions struct {
2751 * The client is supposed to include the content on save.
2753 IncludeText bool `json:"includeText,omitempty"`
2757 * A selection range represents a part of a selection hierarchy. A selection range
2758 * may have a parent selection range that contains it.
2760 type SelectionRange struct {
2762 * The [range](#Range) of this selection range.
2764 Range Range `json:"range"`
2766 * The parent selection range containing this range. Therefore `parent.range` must contain `this.range`.
2768 Parent *SelectionRange `json:"parent,omitempty"`
2771 type SelectionRangeClientCapabilities struct {
2773 * Whether implementation supports dynamic registration for selection range providers. If this is set to `true`
2774 * the client supports the new `SelectionRangeRegistrationOptions` return value for the corresponding server
2775 * capability as well.
2777 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
2780 type SelectionRangeOptions struct {
2781 WorkDoneProgressOptions
2785 * A parameter literal used in selection range requests.
2787 type SelectionRangeParams struct {
2789 * The text document.
2791 TextDocument TextDocumentIdentifier `json:"textDocument"`
2793 * The positions inside the text document.
2795 Positions []Position `json:"positions"`
2796 WorkDoneProgressParams
2800 type SelectionRangeRegistrationOptions struct {
2801 SelectionRangeOptions
2802 TextDocumentRegistrationOptions
2803 StaticRegistrationOptions
2807 * @since 3.16.0 - Proposed state
2809 type SemanticTokens struct {
2811 * An optional result id. If provided and clients support delta updating
2812 * the client will include the result id in the next semantic token request.
2813 * A server can then instead of computing all semantic tokens again simply
2816 ResultID string `json:"resultId,omitempty"`
2818 * The actual tokens.
2820 Data []float64 `json:"data"`
2824 * @since 3.16.0 - Proposed state
2826 type SemanticTokensClientCapabilities struct {
2828 * Whether implementation supports dynamic registration. If this is set to `true`
2829 * the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`
2830 * return value for the corresponding server capability as well.
2832 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
2834 * Which requests the client supports and might send to the server
2838 * The client will send the `textDocument/semanticTokens/range` request if
2839 * the server provides a corresponding handler.
2841 Range bool/*boolean | { }*/ `json:"range,omitempty"`
2843 * The client will send the `textDocument/semanticTokens/full` request if
2844 * the server provides a corresponding handler.
2846 Full interface{}/*boolean | <elided struct>*/ `json:"full,omitempty"`
2849 * The token types that the client supports.
2851 TokenTypes []string `json:"tokenTypes"`
2853 * The token modifiers that the client supports.
2855 TokenModifiers []string `json:"tokenModifiers"`
2857 * The formats the clients supports.
2859 Formats []TokenFormat `json:"formats"`
2863 * @since 3.16.0 - Proposed state
2865 type SemanticTokensDelta struct {
2866 ResultID string `json:"resultId,omitempty"`
2868 * The semantic token edits to transform a previous result into a new result.
2870 Edits []SemanticTokensEdit `json:"edits"`
2874 * @since 3.16.0 - Proposed state
2876 type SemanticTokensDeltaParams struct {
2878 * The text document.
2880 TextDocument TextDocumentIdentifier `json:"textDocument"`
2882 * The result id of a previous response. The result Id can either point to a full response
2883 * or a delta response depending on what was recevied last.
2885 PreviousResultID string `json:"previousResultId"`
2886 WorkDoneProgressParams
2891 * @since 3.16.0 - Proposed state
2893 type SemanticTokensEdit struct {
2895 * The start offset of the edit.
2897 Start float64 `json:"start"`
2899 * The count of elements to remove.
2901 DeleteCount float64 `json:"deleteCount"`
2903 * The elements to insert.
2905 Data []float64 `json:"data,omitempty"`
2909 * @since 3.16.0 - Proposed state
2911 type SemanticTokensLegend struct {
2913 * The token types a server uses.
2915 TokenTypes []string `json:"tokenTypes"`
2917 * The token modifiers a server uses.
2919 TokenModifiers []string `json:"tokenModifiers"`
2923 * @since 3.16.0 - Proposed state
2925 type SemanticTokensOptions struct {
2927 * The legend used by the server
2929 Legend SemanticTokensLegend `json:"legend"`
2931 * Server supports providing semantic tokens for a sepcific range
2934 Range bool/*boolean | { }*/ `json:"range,omitempty"`
2936 * Server supports providing semantic tokens for a full document.
2938 Full interface{}/*boolean | <elided struct>*/ `json:"full,omitempty"`
2939 WorkDoneProgressOptions
2943 * @since 3.16.0 - Proposed state
2945 type SemanticTokensParams struct {
2947 * The text document.
2949 TextDocument TextDocumentIdentifier `json:"textDocument"`
2950 WorkDoneProgressParams
2955 * @since 3.16.0 - Proposed state
2957 type SemanticTokensRangeParams struct {
2959 * The text document.
2961 TextDocument TextDocumentIdentifier `json:"textDocument"`
2963 * The range the semantic tokens are requested for.
2965 Range Range `json:"range"`
2966 WorkDoneProgressParams
2971 * @since 3.16.0 - Proposed state
2973 type SemanticTokensRegistrationOptions struct {
2974 TextDocumentRegistrationOptions
2975 SemanticTokensOptions
2976 StaticRegistrationOptions
2979 type SemanticTokensWorkspaceClientCapabilities struct {
2981 * Whether the client implementation supports a refresh request send from the server
2982 * to the client. This is useful if a server detects a project wide configuration change
2983 * which requires a re-calculation of all semantic tokens provided by the server issuing
2986 RefreshSupport bool `json:"refreshSupport,omitempty"`
2989 type ServerCapabilities = struct {
2991 * Defines how text documents are synced. Is either a detailed structure defining each notification or
2992 * for backwards compatibility the TextDocumentSyncKind number.
2994 TextDocumentSync interface{}/*TextDocumentSyncOptions | TextDocumentSyncKind*/ `json:"textDocumentSync,omitempty"`
2996 * The server provides completion support.
2998 CompletionProvider CompletionOptions `json:"completionProvider,omitempty"`
3000 * The server provides hover support.
3002 HoverProvider bool/*boolean | HoverOptions*/ `json:"hoverProvider,omitempty"`
3004 * The server provides signature help support.
3006 SignatureHelpProvider SignatureHelpOptions `json:"signatureHelpProvider,omitempty"`
3008 * The server provides Goto Declaration support.
3010 DeclarationProvider interface{}/* bool | DeclarationOptions | DeclarationRegistrationOptions*/ `json:"declarationProvider,omitempty"`
3012 * The server provides goto definition support.
3014 DefinitionProvider bool/*boolean | DefinitionOptions*/ `json:"definitionProvider,omitempty"`
3016 * The server provides Goto Type Definition support.
3018 TypeDefinitionProvider interface{}/* bool | TypeDefinitionOptions | TypeDefinitionRegistrationOptions*/ `json:"typeDefinitionProvider,omitempty"`
3020 * The server provides Goto Implementation support.
3022 ImplementationProvider interface{}/* bool | ImplementationOptions | ImplementationRegistrationOptions*/ `json:"implementationProvider,omitempty"`
3024 * The server provides find references support.
3026 ReferencesProvider bool/*boolean | ReferenceOptions*/ `json:"referencesProvider,omitempty"`
3028 * The server provides document highlight support.
3030 DocumentHighlightProvider bool/*boolean | DocumentHighlightOptions*/ `json:"documentHighlightProvider,omitempty"`
3032 * The server provides document symbol support.
3034 DocumentSymbolProvider bool/*boolean | DocumentSymbolOptions*/ `json:"documentSymbolProvider,omitempty"`
3036 * The server provides code actions. CodeActionOptions may only be
3037 * specified if the client states that it supports
3038 * `codeActionLiteralSupport` in its initial `initialize` request.
3040 CodeActionProvider interface{}/*boolean | CodeActionOptions*/ `json:"codeActionProvider,omitempty"`
3042 * The server provides code lens.
3044 CodeLensProvider CodeLensOptions `json:"codeLensProvider,omitempty"`
3046 * The server provides document link support.
3048 DocumentLinkProvider DocumentLinkOptions `json:"documentLinkProvider,omitempty"`
3050 * The server provides color provider support.
3052 ColorProvider interface{}/* bool | DocumentColorOptions | DocumentColorRegistrationOptions*/ `json:"colorProvider,omitempty"`
3054 * The server provides workspace symbol support.
3056 WorkspaceSymbolProvider bool/*boolean | WorkspaceSymbolOptions*/ `json:"workspaceSymbolProvider,omitempty"`
3058 * The server provides document formatting.
3060 DocumentFormattingProvider bool/*boolean | DocumentFormattingOptions*/ `json:"documentFormattingProvider,omitempty"`
3062 * The server provides document range formatting.
3064 DocumentRangeFormattingProvider bool/*boolean | DocumentRangeFormattingOptions*/ `json:"documentRangeFormattingProvider,omitempty"`
3066 * The server provides document formatting on typing.
3068 DocumentOnTypeFormattingProvider DocumentOnTypeFormattingOptions `json:"documentOnTypeFormattingProvider,omitempty"`
3070 * The server provides rename support. RenameOptions may only be
3071 * specified if the client states that it supports
3072 * `prepareSupport` in its initial `initialize` request.
3074 RenameProvider interface{}/*boolean | RenameOptions*/ `json:"renameProvider,omitempty"`
3076 * The server provides folding provider support.
3078 FoldingRangeProvider interface{}/* bool | FoldingRangeOptions | FoldingRangeRegistrationOptions*/ `json:"foldingRangeProvider,omitempty"`
3080 * The server provides selection range support.
3082 SelectionRangeProvider interface{}/* bool | SelectionRangeOptions | SelectionRangeRegistrationOptions*/ `json:"selectionRangeProvider,omitempty"`
3084 * The server provides execute command support.
3086 ExecuteCommandProvider ExecuteCommandOptions `json:"executeCommandProvider,omitempty"`
3088 * The server provides Call Hierarchy support.
3090 * @since 3.16.0 - proposed state
3092 CallHierarchyProvider interface{}/* bool | CallHierarchyOptions | CallHierarchyRegistrationOptions*/ `json:"callHierarchyProvider,omitempty"`
3094 * The server provides semantic tokens support.
3096 * @since 3.16.0 - proposed state
3098 SemanticTokensProvider interface{}/*SemanticTokensOptions | SemanticTokensRegistrationOptions*/ `json:"semanticTokensProvider,omitempty"`
3100 * Experimental server capabilities.
3102 Experimental interface{} `json:"experimental,omitempty"`
3104 * The workspace server capabilities
3106 Workspace WorkspaceGn `json:"workspace,omitempty"`
3109 type SetTraceParams struct {
3110 Value TraceValues `json:"value"`
3114 * The parameters of a notification message.
3116 type ShowMessageParams struct {
3118 * The message type. See {@link MessageType}
3120 Type MessageType `json:"type"`
3122 * The actual message
3124 Message string `json:"message"`
3127 type ShowMessageRequestParams struct {
3129 * The message type. See {@link MessageType}
3131 Type MessageType `json:"type"`
3133 * The actual message
3135 Message string `json:"message"`
3137 * The message action items to present.
3139 Actions []MessageActionItem `json:"actions,omitempty"`
3143 * Signature help represents the signature of something
3144 * callable. There can be multiple signature but only one
3145 * active and only one active parameter.
3147 type SignatureHelp struct {
3149 * One or more signatures.
3151 Signatures []SignatureInformation `json:"signatures"`
3153 * The active signature. Set to `null` if no
3156 ActiveSignature float64/*number | null*/ `json:"activeSignature"`
3158 * The active parameter of the active signature. Set to `null`
3159 * if the active signature has no parameters.
3161 ActiveParameter float64/*number | null*/ `json:"activeParameter"`
3165 * Client Capabilities for a [SignatureHelpRequest](#SignatureHelpRequest).
3167 type SignatureHelpClientCapabilities struct {
3169 * Whether signature help supports dynamic registration.
3171 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
3173 * The client supports the following `SignatureInformation`
3174 * specific properties.
3176 SignatureInformation struct {
3178 * Client supports the follow content formats for the documentation
3179 * property. The order describes the preferred format of the client.
3181 DocumentationFormat []MarkupKind `json:"documentationFormat,omitempty"`
3183 * Client capabilities specific to parameter information.
3185 ParameterInformation struct {
3187 * The client supports processing label offsets instead of a
3188 * simple label string.
3192 LabelOffsetSupport bool `json:"labelOffsetSupport,omitempty"`
3193 } `json:"parameterInformation,omitempty"`
3195 * The client support the `activeParameter` property on `SignatureInformation`
3198 * @since 3.16.0 - proposed state
3200 ActiveParameterSupport bool `json:"activeParameterSupport,omitempty"`
3201 } `json:"signatureInformation,omitempty"`
3203 * The client supports to send additional context information for a
3204 * `textDocument/signatureHelp` request. A client that opts into
3205 * contextSupport will also support the `retriggerCharacters` on
3206 * `SignatureHelpOptions`.
3210 ContextSupport bool `json:"contextSupport,omitempty"`
3214 * Additional information about the context in which a signature help request was triggered.
3218 type SignatureHelpContext struct {
3220 * Action that caused signature help to be triggered.
3222 TriggerKind SignatureHelpTriggerKind `json:"triggerKind"`
3224 * Character that caused signature help to be triggered.
3226 * This is undefined when `triggerKind !== SignatureHelpTriggerKind.TriggerCharacter`
3228 TriggerCharacter string `json:"triggerCharacter,omitempty"`
3230 * `true` if signature help was already showing when it was triggered.
3232 * Retriggers occur when the signature help is already active and can be caused by actions such as
3233 * typing a trigger character, a cursor move, or document content changes.
3235 IsRetrigger bool `json:"isRetrigger"`
3237 * The currently active `SignatureHelp`.
3239 * The `activeSignatureHelp` has its `SignatureHelp.activeSignature` field updated based on
3240 * the user navigating through available signatures.
3242 ActiveSignatureHelp SignatureHelp `json:"activeSignatureHelp,omitempty"`
3246 * Server Capabilities for a [SignatureHelpRequest](#SignatureHelpRequest).
3248 type SignatureHelpOptions struct {
3250 * List of characters that trigger signature help.
3252 TriggerCharacters []string `json:"triggerCharacters,omitempty"`
3254 * List of characters that re-trigger signature help.
3256 * These trigger characters are only active when signature help is already showing. All trigger characters
3257 * are also counted as re-trigger characters.
3261 RetriggerCharacters []string `json:"retriggerCharacters,omitempty"`
3262 WorkDoneProgressOptions
3266 * Parameters for a [SignatureHelpRequest](#SignatureHelpRequest).
3268 type SignatureHelpParams struct {
3270 * The signature help context. This is only available if the client specifies
3271 * to send this using the client capability `textDocument.signatureHelp.contextSupport === true`
3275 Context SignatureHelpContext `json:"context,omitempty"`
3276 TextDocumentPositionParams
3277 WorkDoneProgressParams
3281 * How a signature help was triggered.
3285 type SignatureHelpTriggerKind float64
3288 * Represents the signature of something callable. A signature
3289 * can have a label, like a function-name, a doc-comment, and
3290 * a set of parameters.
3292 type SignatureInformation struct {
3294 * The label of this signature. Will be shown in
3297 Label string `json:"label"`
3299 * The human-readable doc-comment of this signature. Will be shown
3300 * in the UI but can be omitted.
3302 Documentation string/*string | MarkupContent*/ `json:"documentation,omitempty"`
3304 * The parameters of this signature.
3306 Parameters []ParameterInformation `json:"parameters,omitempty"`
3308 * The index of the active parameter.
3310 * If provided, this is used in place of `SignatureHelp.activeParameter`.
3312 * @since 3.16.0 - proposed state
3314 ActiveParameter float64 `json:"activeParameter,omitempty"`
3318 * Static registration options to be returned in the initialize
3321 type StaticRegistrationOptions struct {
3323 * The id used to register the request. The id can be used to deregister
3324 * the request again. See also Registration#id.
3326 ID string `json:"id,omitempty"`
3330 * Represents information about programming constructs like variables, classes,
3333 type SymbolInformation struct {
3335 * The name of this symbol.
3337 Name string `json:"name"`
3339 * The kind of this symbol.
3341 Kind SymbolKind `json:"kind"`
3343 * Tags for this completion item.
3345 * @since 3.16.0 - proposed state
3347 Tags []SymbolTag `json:"tags,omitempty"`
3349 * Indicates if this symbol is deprecated.
3351 * @deprecated Use tags instead
3353 Deprecated bool `json:"deprecated,omitempty"`
3355 * The location of this symbol. The location's range is used by a tool
3356 * to reveal the location in the editor. If the symbol is selected in the
3357 * tool the range's start information is used to position the cursor. So
3358 * the range usually spans more than the actual symbol's name and does
3359 * normally include thinks like visibility modifiers.
3361 * The range doesn't have to denote a node range in the sense of a abstract
3362 * syntax tree. It can therefore not be used to re-construct a hierarchy of
3365 Location Location `json:"location"`
3367 * The name of the symbol containing this symbol. This information is for
3368 * user interface purposes (e.g. to render a qualifier in the user interface
3369 * if necessary). It can't be used to re-infer a hierarchy for the document
3372 ContainerName string `json:"containerName,omitempty"`
3378 type SymbolKind float64
3381 * Symbol tags are extra annotations that tweak the rendering of a symbol.
3384 type SymbolTag float64
3387 * Text document specific client capabilities.
3389 type TextDocumentClientCapabilities struct {
3391 * Defines which synchronization capabilities the client supports.
3393 Synchronization TextDocumentSyncClientCapabilities `json:"synchronization,omitempty"`
3395 * Capabilities specific to the `textDocument/completion`
3397 Completion CompletionClientCapabilities `json:"completion,omitempty"`
3399 * Capabilities specific to the `textDocument/hover`
3401 Hover HoverClientCapabilities `json:"hover,omitempty"`
3403 * Capabilities specific to the `textDocument/signatureHelp`
3405 SignatureHelp SignatureHelpClientCapabilities `json:"signatureHelp,omitempty"`
3407 * Capabilities specific to the `textDocument/declaration`
3411 Declaration DeclarationClientCapabilities `json:"declaration,omitempty"`
3413 * Capabilities specific to the `textDocument/definition`
3415 Definition DefinitionClientCapabilities `json:"definition,omitempty"`
3417 * Capabilities specific to the `textDocument/typeDefinition`
3421 TypeDefinition TypeDefinitionClientCapabilities `json:"typeDefinition,omitempty"`
3423 * Capabilities specific to the `textDocument/implementation`
3427 Implementation ImplementationClientCapabilities `json:"implementation,omitempty"`
3429 * Capabilities specific to the `textDocument/references`
3431 References ReferenceClientCapabilities `json:"references,omitempty"`
3433 * Capabilities specific to the `textDocument/documentHighlight`
3435 DocumentHighlight DocumentHighlightClientCapabilities `json:"documentHighlight,omitempty"`
3437 * Capabilities specific to the `textDocument/documentSymbol`
3439 DocumentSymbol DocumentSymbolClientCapabilities `json:"documentSymbol,omitempty"`
3441 * Capabilities specific to the `textDocument/codeAction`
3443 CodeAction CodeActionClientCapabilities `json:"codeAction,omitempty"`
3445 * Capabilities specific to the `textDocument/codeLens`
3447 CodeLens CodeLensClientCapabilities `json:"codeLens,omitempty"`
3449 * Capabilities specific to the `textDocument/documentLink`
3451 DocumentLink DocumentLinkClientCapabilities `json:"documentLink,omitempty"`
3453 * Capabilities specific to the `textDocument/documentColor`
3455 ColorProvider DocumentColorClientCapabilities `json:"colorProvider,omitempty"`
3457 * Capabilities specific to the `textDocument/formatting`
3459 Formatting DocumentFormattingClientCapabilities `json:"formatting,omitempty"`
3461 * Capabilities specific to the `textDocument/rangeFormatting`
3463 RangeFormatting DocumentRangeFormattingClientCapabilities `json:"rangeFormatting,omitempty"`
3465 * Capabilities specific to the `textDocument/onTypeFormatting`
3467 OnTypeFormatting DocumentOnTypeFormattingClientCapabilities `json:"onTypeFormatting,omitempty"`
3469 * Capabilities specific to the `textDocument/rename`
3471 Rename RenameClientCapabilities `json:"rename,omitempty"`
3473 * Capabilities specific to `textDocument/foldingRange` requests.
3477 FoldingRange FoldingRangeClientCapabilities `json:"foldingRange,omitempty"`
3479 * Capabilities specific to `textDocument/selectionRange` requests
3483 SelectionRange SelectionRangeClientCapabilities `json:"selectionRange,omitempty"`
3485 * Capabilities specific to `textDocument/publishDiagnostics` notification.
3487 PublishDiagnostics PublishDiagnosticsClientCapabilities `json:"publishDiagnostics,omitempty"`
3489 * Capabilities specific to the various call hierarchy requests.
3493 CallHierarchy CallHierarchyClientCapabilities `json:"callHierarchy,omitempty"`
3495 * Capabilities specific to the various semantic token requsts.
3497 * @since 3.16.0 - Proposed state
3499 SemanticTokens SemanticTokensClientCapabilities `json:"semanticTokens,omitempty"`
3503 * An event describing a change to a text document. If range and rangeLength are omitted
3504 * the new text is considered to be the full content of the document.
3506 * @deprecated Use the text document from the new vscode-languageserver-textdocument package.
3508 type TextDocumentContentChangeEvent = struct {
3510 * The range of the document that changed.
3512 Range *Range `json:"range,omitempty"`
3514 * The optional length of the range that got replaced.
3516 * @deprecated use range instead.
3518 RangeLength float64 `json:"rangeLength,omitempty"`
3520 * The new text for the provided range.
3522 Text string `json:"text"`
3526 * Describes textual changes on a text document. A TextDocumentEdit describes all changes
3527 * on a document version Si and after they are applied move the document to version Si+1.
3528 * So the creator of a TextDocumentEdit doesn't need to sort the array of edits or do any
3529 * kind of ordering. However the edits must be non overlapping.
3531 type TextDocumentEdit struct {
3533 * The text document to change.
3535 TextDocument VersionedTextDocumentIdentifier `json:"textDocument"`
3537 * The edits to be applied.
3539 Edits []TextEdit `json:"edits"`
3543 * A literal to identify a text document in the client.
3545 type TextDocumentIdentifier struct {
3547 * The text document's uri.
3549 URI DocumentURI `json:"uri"`
3553 * An item to transfer a text document from the client to the
3556 type TextDocumentItem struct {
3558 * The text document's uri.
3560 URI DocumentURI `json:"uri"`
3562 * The text document's language identifier
3564 LanguageID string `json:"languageId"`
3566 * The version number of this document (it will increase after each
3567 * change, including undo/redo).
3569 Version float64 `json:"version"`
3571 * The content of the opened text document.
3573 Text string `json:"text"`
3577 * A parameter literal used in requests to pass a text document and a position inside that
3580 type TextDocumentPositionParams struct {
3582 * The text document.
3584 TextDocument TextDocumentIdentifier `json:"textDocument"`
3586 * The position inside the text document.
3588 Position Position `json:"position"`
3592 * General text document registration options.
3594 type TextDocumentRegistrationOptions struct {
3596 * A document selector to identify the scope of the registration. If set to null
3597 * the document selector provided on the client side will be used.
3599 DocumentSelector DocumentSelector /*DocumentSelector | null*/ `json:"documentSelector"`
3603 * Represents reasons why a text document is saved.
3605 type TextDocumentSaveReason float64
3607 type TextDocumentSyncClientCapabilities struct {
3609 * Whether text document synchronization supports dynamic registration.
3611 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
3613 * The client supports sending will save notifications.
3615 WillSave bool `json:"willSave,omitempty"`
3617 * The client supports sending a will save request and
3618 * waits for a response providing text edits which will
3619 * be applied to the document before it is saved.
3621 WillSaveWaitUntil bool `json:"willSaveWaitUntil,omitempty"`
3623 * The client supports did save notifications.
3625 DidSave bool `json:"didSave,omitempty"`
3629 * Defines how the host (editor) should sync
3630 * document changes to the language server.
3632 type TextDocumentSyncKind float64
3634 type TextDocumentSyncOptions struct {
3636 * Open and close notifications are sent to the server. If omitted open close notification should not
3639 OpenClose bool `json:"openClose,omitempty"`
3641 * Change notifications are sent to the server. See TextDocumentSyncKind.None, TextDocumentSyncKind.Full
3642 * and TextDocumentSyncKind.Incremental. If omitted it defaults to TextDocumentSyncKind.None.
3644 Change TextDocumentSyncKind `json:"change,omitempty"`
3646 * If present will save notifications are sent to the server. If omitted the notification should not be
3649 WillSave bool `json:"willSave,omitempty"`
3651 * If present will save wait until requests are sent to the server. If omitted the request should not be
3654 WillSaveWaitUntil bool `json:"willSaveWaitUntil,omitempty"`
3656 * If present save notifications are sent to the server. If omitted the notification should not be
3659 Save SaveOptions/*boolean | SaveOptions*/ `json:"save,omitempty"`
3663 * A text edit applicable to a text document.
3665 type TextEdit struct {
3667 * The range of the text document to be manipulated. To insert
3668 * text into a document create a range where start === end.
3670 Range Range `json:"range"`
3672 * The string to be inserted. For delete operations use an
3675 NewText string `json:"newText"`
3678 type TokenFormat = string
3680 type TraceValues = string /*'off' | 'messages' | 'verbose'*/
3685 type TypeDefinitionClientCapabilities struct {
3687 * Whether implementation supports dynamic registration. If this is set to `true`
3688 * the client supports the new `TypeDefinitionRegistrationOptions` return value
3689 * for the corresponding server capability as well.
3691 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
3693 * The client supports additional metadata in the form of definition links.
3697 LinkSupport bool `json:"linkSupport,omitempty"`
3700 type TypeDefinitionOptions struct {
3701 WorkDoneProgressOptions
3704 type TypeDefinitionParams struct {
3705 TextDocumentPositionParams
3706 WorkDoneProgressParams
3710 type TypeDefinitionRegistrationOptions struct {
3711 TextDocumentRegistrationOptions
3712 TypeDefinitionOptions
3713 StaticRegistrationOptions
3717 * A tagging type for string properties that are actually URIs
3719 * @since 3.16.0 - proposed state
3724 * Moniker uniqueness level to define scope of the moniker.
3728 type UniquenessLevel string
3731 * General parameters to unregister a request or notification.
3733 type Unregistration struct {
3735 * The id used to unregister the request or notification. Usually an id
3736 * provided during the register request.
3738 ID string `json:"id"`
3740 * The method to unregister for.
3742 Method string `json:"method"`
3745 type UnregistrationParams struct {
3746 Unregisterations []Unregistration `json:"unregisterations"`
3750 * An identifier to denote a specific version of a text document.
3752 type VersionedTextDocumentIdentifier struct {
3754 * The version number of this document. If a versioned text document identifier
3755 * is sent from the server to the client and the file is not open in the editor
3756 * (the server has not received an open notification before) the server can send
3757 * `null` to indicate that the version is unknown and the content on disk is the
3758 * truth (as speced with document content ownership).
3760 Version float64/*number | null*/ `json:"version"`
3761 TextDocumentIdentifier
3764 type WatchKind float64
3767 * The parameters send in a will save text document notification.
3769 type WillSaveTextDocumentParams struct {
3771 * The document that will be saved.
3773 TextDocument TextDocumentIdentifier `json:"textDocument"`
3775 * The 'TextDocumentSaveReason'.
3777 Reason TextDocumentSaveReason `json:"reason"`
3780 type WorkDoneProgressBegin struct {
3781 Kind string `json:"kind"`
3783 * Mandatory title of the progress operation. Used to briefly inform about
3784 * the kind of operation being performed.
3786 * Examples: "Indexing" or "Linking dependencies".
3788 Title string `json:"title"`
3790 * Controls if a cancel button should show to allow the user to cancel the
3791 * long running operation. Clients that don't support cancellation are allowed
3792 * to ignore the setting.
3794 Cancellable bool `json:"cancellable,omitempty"`
3796 * Optional, more detailed associated progress message. Contains
3797 * complementary information to the `title`.
3799 * Examples: "3/25 files", "project/src/module2", "node_modules/some_dep".
3800 * If unset, the previous progress message (if any) is still valid.
3802 Message string `json:"message,omitempty"`
3804 * Optional progress percentage to display (value 100 is considered 100%).
3805 * If not provided infinite progress is assumed and clients are allowed
3806 * to ignore the `percentage` value in subsequent in report notifications.
3808 * The value should be steadily rising. Clients are free to ignore values
3809 * that are not following this rule.
3811 Percentage float64 `json:"percentage,omitempty"`
3814 type WorkDoneProgressCancelParams struct {
3816 * The token to be used to report progress.
3818 Token ProgressToken `json:"token"`
3821 type WorkDoneProgressClientCapabilities struct {
3823 * Window specific client capabilities.
3827 * Whether client supports server initiated progress using the
3828 * `window/workDoneProgress/create` request.
3832 WorkDoneProgress bool `json:"workDoneProgress,omitempty"`
3833 } `json:"window,omitempty"`
3836 type WorkDoneProgressCreateParams struct {
3838 * The token to be used to report progress.
3840 Token ProgressToken `json:"token"`
3843 type WorkDoneProgressEnd struct {
3844 Kind string `json:"kind"`
3846 * Optional, a final message indicating to for example indicate the outcome
3849 Message string `json:"message,omitempty"`
3852 type WorkDoneProgressOptions struct {
3853 WorkDoneProgress bool `json:"workDoneProgress,omitempty"`
3856 type WorkDoneProgressParams struct {
3858 * An optional token that a server can use to report work done progress.
3860 WorkDoneToken ProgressToken `json:"workDoneToken,omitempty"`
3863 type WorkDoneProgressReport struct {
3864 Kind string `json:"kind"`
3866 * Controls enablement state of a cancel button.
3868 * Clients that don't support cancellation or don't support controlling the button's
3869 * enablement state are allowed to ignore the property.
3871 Cancellable bool `json:"cancellable,omitempty"`
3873 * Optional, more detailed associated progress message. Contains
3874 * complementary information to the `title`.
3876 * Examples: "3/25 files", "project/src/module2", "node_modules/some_dep".
3877 * If unset, the previous progress message (if any) is still valid.
3879 Message string `json:"message,omitempty"`
3881 * Optional progress percentage to display (value 100 is considered 100%).
3882 * If not provided infinite progress is assumed and clients are allowed
3883 * to ignore the `percentage` value in subsequent in report notifications.
3885 * The value should be steadily rising. Clients are free to ignore values
3886 * that are not following this rule.
3888 Percentage float64 `json:"percentage,omitempty"`
3892 * Workspace specific client capabilities.
3894 type WorkspaceClientCapabilities struct {
3896 * The client supports applying batch edits
3897 * to the workspace by supporting the request
3898 * 'workspace/applyEdit'
3900 ApplyEdit bool `json:"applyEdit,omitempty"`
3902 * Capabilities specific to `WorkspaceEdit`s
3904 WorkspaceEdit WorkspaceEditClientCapabilities `json:"workspaceEdit,omitempty"`
3906 * Capabilities specific to the `workspace/didChangeConfiguration` notification.
3908 DidChangeConfiguration DidChangeConfigurationClientCapabilities `json:"didChangeConfiguration,omitempty"`
3910 * Capabilities specific to the `workspace/didChangeWatchedFiles` notification.
3912 DidChangeWatchedFiles DidChangeWatchedFilesClientCapabilities `json:"didChangeWatchedFiles,omitempty"`
3914 * Capabilities specific to the `workspace/symbol` request.
3916 Symbol WorkspaceSymbolClientCapabilities `json:"symbol,omitempty"`
3918 * Capabilities specific to the `workspace/executeCommand` request.
3920 ExecuteCommand ExecuteCommandClientCapabilities `json:"executeCommand,omitempty"`
3922 * Capabilities specific to the semantic token requsts scoped to the
3925 * @since 3.16.0 - proposed state.
3927 SemanticTokens SemanticTokensWorkspaceClientCapabilities `json:"semanticTokens,omitempty"`
3931 * A workspace edit represents changes to many resources managed in the workspace. The edit
3932 * should either provide `changes` or `documentChanges`. If documentChanges are present
3933 * they are preferred over `changes` if the client can handle versioned document edits.
3935 type WorkspaceEdit struct {
3937 * Holds changes to existing resources.
3939 Changes map[string][]TextEdit `json:"changes,omitempty"`
3941 * Depending on the client capability `workspace.workspaceEdit.resourceOperations` document changes
3942 * are either an array of `TextDocumentEdit`s to express changes to n different text documents
3943 * where each text document edit addresses a specific version of a text document. Or it can contain
3944 * above `TextDocumentEdit`s mixed with create, rename and delete file / folder operations.
3946 * Whether a client supports versioned document edits is expressed via
3947 * `workspace.workspaceEdit.documentChanges` client capability.
3949 * If a client neither supports `documentChanges` nor `workspace.workspaceEdit.resourceOperations` then
3950 * only plain `TextEdit`s using the `changes` property are supported.
3952 DocumentChanges []TextDocumentEdit/*TextDocumentEdit | CreateFile | RenameFile | DeleteFile*/ `json:"documentChanges,omitempty"`
3955 type WorkspaceEditClientCapabilities struct {
3957 * The client supports versioned document changes in `WorkspaceEdit`s
3959 DocumentChanges bool `json:"documentChanges,omitempty"`
3961 * The resource operations the client supports. Clients should at least
3962 * support 'create', 'rename' and 'delete' files and folders.
3966 ResourceOperations []ResourceOperationKind `json:"resourceOperations,omitempty"`
3968 * The failure handling strategy of a client if applying the workspace edit
3973 FailureHandling FailureHandlingKind `json:"failureHandling,omitempty"`
3976 type WorkspaceFolder struct {
3978 * The associated URI for this workspace folder.
3980 URI string `json:"uri"`
3982 * The name of the workspace folder. Used to refer to this
3983 * workspace folder in the user interface.
3985 Name string `json:"name"`
3989 * The workspace folder change event.
3991 type WorkspaceFoldersChangeEvent struct {
3993 * The array of added workspace folders
3995 Added []WorkspaceFolder `json:"added"`
3997 * The array of the removed workspace folders
3999 Removed []WorkspaceFolder `json:"removed"`
4002 type WorkspaceFoldersClientCapabilities struct {
4004 * The workspace client capabilities
4006 Workspace WorkspaceGn `json:"workspace,omitempty"`
4009 type WorkspaceFoldersInitializeParams struct {
4011 * The actual configured workspace folders.
4013 WorkspaceFolders []WorkspaceFolder /*WorkspaceFolder[] | null*/ `json:"workspaceFolders"`
4016 type WorkspaceFoldersServerCapabilities struct {
4018 * The workspace server capabilities
4020 Workspace WorkspaceGn `json:"workspace,omitempty"`
4024 * Client capabilities for a [WorkspaceSymbolRequest](#WorkspaceSymbolRequest).
4026 type WorkspaceSymbolClientCapabilities struct {
4028 * Symbol request supports dynamic registration.
4030 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
4032 * Specific capabilities for the `SymbolKind` in the `workspace/symbol` request.
4036 * The symbol kind values the client supports. When this
4037 * property exists the client also guarantees that it will
4038 * handle values outside its set gracefully and falls back
4039 * to a default value when unknown.
4041 * If this property is not present the client only supports
4042 * the symbol kinds from `File` to `Array` as defined in
4043 * the initial version of the protocol.
4045 ValueSet []SymbolKind `json:"valueSet,omitempty"`
4046 } `json:"symbolKind,omitempty"`
4048 * The client supports tags on `SymbolInformation`.
4049 * Clients supporting tags have to handle unknown tags gracefully.
4051 * @since 3.16.0 - proposed state
4055 * The tags supported by the client.
4057 ValueSet []SymbolTag `json:"valueSet"`
4058 } `json:"tagSupport,omitempty"`
4062 * Server capabilities for a [WorkspaceSymbolRequest](#WorkspaceSymbolRequest).
4064 type WorkspaceSymbolOptions struct {
4065 WorkDoneProgressOptions
4069 * The parameters of a [WorkspaceSymbolRequest](#WorkspaceSymbolRequest).
4071 type WorkspaceSymbolParams struct {
4073 * A query string to filter symbols by. Clients may send an empty
4074 * string here to request all symbols.
4076 Query string `json:"query"`
4077 WorkDoneProgressParams
4086 Empty CodeActionKind = ""
4088 * Base kind for quickfix actions: 'quickfix'
4091 QuickFix CodeActionKind = "quickfix"
4093 * Base kind for refactoring actions: 'refactor'
4096 Refactor CodeActionKind = "refactor"
4098 * Base kind for refactoring extraction actions: 'refactor.extract'
4100 * Example extract actions:
4103 * - Extract function
4104 * - Extract variable
4105 * - Extract interface from class
4109 RefactorExtract CodeActionKind = "refactor.extract"
4111 * Base kind for refactoring inline actions: 'refactor.inline'
4113 * Example inline actions:
4121 RefactorInline CodeActionKind = "refactor.inline"
4123 * Base kind for refactoring rewrite actions: 'refactor.rewrite'
4125 * Example rewrite actions:
4127 * - Convert JavaScript function to class
4128 * - Add or remove parameter
4129 * - Encapsulate field
4130 * - Make method static
4131 * - Move method to base class
4135 RefactorRewrite CodeActionKind = "refactor.rewrite"
4137 * Base kind for source actions: `source`
4139 * Source code actions apply to the entire file.
4142 Source CodeActionKind = "source"
4144 * Base kind for an organize imports source action: `source.organizeImports`
4147 SourceOrganizeImports CodeActionKind = "source.organizeImports"
4149 * Base kind for auto-fix source actions: `source.fixAll`.
4151 * Fix all actions automatically fix errors that have a clear fix that do not require user input.
4152 * They should not suppress errors or perform unsafe fixes such as generating new types or classes.
4157 SourceFixAll CodeActionKind = "source.fixAll"
4158 TextCompletion CompletionItemKind = 1
4159 MethodCompletion CompletionItemKind = 2
4160 FunctionCompletion CompletionItemKind = 3
4161 ConstructorCompletion CompletionItemKind = 4
4162 FieldCompletion CompletionItemKind = 5
4163 VariableCompletion CompletionItemKind = 6
4164 ClassCompletion CompletionItemKind = 7
4165 InterfaceCompletion CompletionItemKind = 8
4166 ModuleCompletion CompletionItemKind = 9
4167 PropertyCompletion CompletionItemKind = 10
4168 UnitCompletion CompletionItemKind = 11
4169 ValueCompletion CompletionItemKind = 12
4170 EnumCompletion CompletionItemKind = 13
4171 KeywordCompletion CompletionItemKind = 14
4172 SnippetCompletion CompletionItemKind = 15
4173 ColorCompletion CompletionItemKind = 16
4174 FileCompletion CompletionItemKind = 17
4175 ReferenceCompletion CompletionItemKind = 18
4176 FolderCompletion CompletionItemKind = 19
4177 EnumMemberCompletion CompletionItemKind = 20
4178 ConstantCompletion CompletionItemKind = 21
4179 StructCompletion CompletionItemKind = 22
4180 EventCompletion CompletionItemKind = 23
4181 OperatorCompletion CompletionItemKind = 24
4182 TypeParameterCompletion CompletionItemKind = 25
4184 * Render a completion as obsolete, usually using a strike-out.
4187 ComplDeprecated CompletionItemTag = 1
4189 * Completion was triggered by typing an identifier (24x7 code
4190 * complete), manual invocation (e.g Ctrl+Space) or via API.
4193 Invoked CompletionTriggerKind = 1
4195 * Completion was triggered by a trigger character specified by
4196 * the `triggerCharacters` properties of the `CompletionRegistrationOptions`.
4199 TriggerCharacter CompletionTriggerKind = 2
4201 * Completion was re-triggered as current completion list is incomplete
4204 TriggerForIncompleteCompletions CompletionTriggerKind = 3
4209 SeverityError DiagnosticSeverity = 1
4211 * Reports a warning.
4214 SeverityWarning DiagnosticSeverity = 2
4216 * Reports an information.
4219 SeverityInformation DiagnosticSeverity = 3
4224 SeverityHint DiagnosticSeverity = 4
4226 * Unused or unnecessary code.
4228 * Clients are allowed to render diagnostics with this tag faded out instead of having
4229 * an error squiggle.
4232 Unnecessary DiagnosticTag = 1
4234 * Deprecated or obsolete code.
4236 * Clients are allowed to rendered diagnostics with this tag strike through.
4239 Deprecated DiagnosticTag = 2
4241 * A textual occurrence.
4244 Text DocumentHighlightKind = 1
4246 * Read-access of a symbol, like reading a variable.
4249 Read DocumentHighlightKind = 2
4251 * Write-access of a symbol, like writing to a variable.
4254 Write DocumentHighlightKind = 3
4256 * Applying the workspace change is simply aborted if one of the changes provided
4257 * fails. All operations executed before the failing operation stay executed.
4260 Abort FailureHandlingKind = "abort"
4262 * All operations are executed transactional. That means they either all
4263 * succeed or no changes at all are applied to the workspace.
4266 Transactional FailureHandlingKind = "transactional"
4268 * If the workspace edit contains only textual file changes they are executed transactional.
4269 * If resource changes (create, rename or delete file) are part of the change the failure
4270 * handling startegy is abort.
4273 TextOnlyTransactional FailureHandlingKind = "textOnlyTransactional"
4275 * The client tries to undo the operations already executed. But there is no
4276 * guarantee that this is succeeding.
4279 Undo FailureHandlingKind = "undo"
4281 * The file got created.
4284 Created FileChangeType = 1
4286 * The file got changed.
4289 Changed FileChangeType = 2
4291 * The file got deleted.
4294 Deleted FileChangeType = 3
4296 * Folding range for a comment
4298 Comment FoldingRangeKind = "comment"
4300 * Folding range for a imports or includes
4302 Imports FoldingRangeKind = "imports"
4304 * Folding range for a region (e.g. `#region`)
4306 Region FoldingRangeKind = "region"
4308 * If the protocol version provided by the client can't be handled by the server.
4309 * @deprecated This initialize error got replaced by client capabilities. There is
4310 * no version handshake in version 3.0x
4313 UnknownProtocolVersion InitializeError = 1
4315 * The primary text to be inserted is treated as a plain string.
4318 PlainTextTextFormat InsertTextFormat = 1
4320 * The primary text to be inserted is treated as a snippet.
4322 * A snippet can define tab stops and placeholders with `$1`, `$2`
4323 * and `${3:foo}`. `$0` defines the final tab stop, it defaults to
4324 * the end of the snippet. Placeholders with equal identifiers are linked,
4325 * that is typing in one will update others too.
4327 * See also: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#snippet_syntax
4330 SnippetTextFormat InsertTextFormat = 2
4332 * Plain text is supported as a content format
4335 PlainText MarkupKind = "plaintext"
4337 * Markdown is supported as a content format
4340 Markdown MarkupKind = "markdown"
4345 Error MessageType = 1
4347 * A warning message.
4350 Warning MessageType = 2
4352 * An information message.
4355 Info MessageType = 3
4362 * The moniker represent a symbol that is imported into a project
4364 Import MonikerKind = "import"
4366 * The moniker represents a symbol that is exported from a project
4368 Export MonikerKind = "export"
4370 * The moniker represents a symbol that is local to a project (e.g. a local
4371 * variable of a function, a class not visible outside the project, ...)
4373 Local MonikerKind = "local"
4375 * Supports creating new files and folders.
4378 Create ResourceOperationKind = "create"
4380 * Supports renaming existing files and folders.
4383 Rename ResourceOperationKind = "rename"
4385 * Supports deleting existing files and folders.
4388 Delete ResourceOperationKind = "delete"
4390 * Signature help was invoked manually by the user or by a command.
4393 SigInvoked SignatureHelpTriggerKind = 1
4395 * Signature help was triggered by a trigger character.
4398 SigTriggerCharacter SignatureHelpTriggerKind = 2
4400 * Signature help was triggered by the cursor moving or by the document content changing.
4403 SigContentChange SignatureHelpTriggerKind = 3
4405 Module SymbolKind = 2
4406 Namespace SymbolKind = 3
4407 Package SymbolKind = 4
4408 Class SymbolKind = 5
4409 Method SymbolKind = 6
4410 Property SymbolKind = 7
4411 Field SymbolKind = 8
4412 Constructor SymbolKind = 9
4413 Enum SymbolKind = 10
4414 Interface SymbolKind = 11
4415 Function SymbolKind = 12
4416 Variable SymbolKind = 13
4417 Constant SymbolKind = 14
4418 String SymbolKind = 15
4419 Number SymbolKind = 16
4420 Boolean SymbolKind = 17
4421 Array SymbolKind = 18
4422 Object SymbolKind = 19
4424 Null SymbolKind = 21
4425 EnumMember SymbolKind = 22
4426 Struct SymbolKind = 23
4427 Event SymbolKind = 24
4428 Operator SymbolKind = 25
4429 TypeParameter SymbolKind = 26
4431 * Render a symbol as obsolete, usually using a strike-out.
4434 DeprecatedSymbol SymbolTag = 1
4436 * Manually triggered, e.g. by the user pressing save, by starting debugging,
4437 * or by an API call.
4440 Manual TextDocumentSaveReason = 1
4442 * Automatic after a delay.
4445 AfterDelay TextDocumentSaveReason = 2
4447 * When the editor lost focus.
4450 FocusOut TextDocumentSaveReason = 3
4452 * Documents should not be synced at all.
4455 None TextDocumentSyncKind = 0
4457 * Documents are synced by always sending the full content
4461 Full TextDocumentSyncKind = 1
4463 * Documents are synced by sending the full content on open.
4464 * After that only incremental updates to the document are
4468 Incremental TextDocumentSyncKind = 2
4470 * The moniker is only unique inside a document
4472 Document UniquenessLevel = "document"
4474 * The moniker is unique inside a project for which a dump got created
4476 Project UniquenessLevel = "project"
4478 * The moniker is unique inside the group to which a project belongs
4480 Group UniquenessLevel = "group"
4482 * The moniker is unique inside the moniker scheme.
4484 Scheme UniquenessLevel = "scheme"
4486 * The moniker is globally unique
4488 Global UniquenessLevel = "global"
4490 * Interested in create events.
4493 WatchCreate WatchKind = 1
4495 * Interested in change events
4498 WatchChange WatchKind = 2
4500 * Interested in delete events
4503 WatchDelete WatchKind = 4
4506 // Types created to name formal parameters and embedded structs
4507 type ParamConfiguration struct {
4511 type ParamInitialize struct {
4513 WorkDoneProgressParams
4515 type WorkspaceGn struct {
4516 WorkspaceFolders WorkspaceFoldersGn `json:"workspaceFolders,omitempty"`
4518 type WorkspaceFoldersGn struct {
4520 * The Server has support for workspace folders
4522 Supported bool `json:"supported,omitempty"`
4525 * Whether the server wants to receive workspace folder
4526 * change notifications.
4528 * If a strings is provided the string is treated as a ID
4529 * under which the notification is registed on the client
4530 * side. The ID can be used to unregister for these events
4531 * using the `client/unregisterCapability` request.
4533 ChangeNotifications string/*string | boolean*/ `json:"changeNotifications,omitempty"`