1 // Package protocol contains data types and code for LSP jsonrpcs
2 // generated automatically from vscode-languageserver-node
3 // commit: 60a5a7825e6f54f57917091f394fd8db7d1724bc
4 // last fetched Thu Sep 10 2020 09:21:57 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"`
128 * Call hierarchy options used during static registration.
132 type CallHierarchyOptions struct {
133 WorkDoneProgressOptions
137 * Represents an outgoing call, e.g. calling a getter from a method or a method from a constructor etc.
141 type CallHierarchyOutgoingCall struct {
143 * The item that is called.
145 To CallHierarchyItem `json:"to"`
147 * The range at which this item is called. This is the range relative to the caller, e.g the item
148 * passed to [`provideCallHierarchyOutgoingCalls`](#CallHierarchyItemProvider.provideCallHierarchyOutgoingCalls)
149 * and not [`this.to`](#CallHierarchyOutgoingCall.to).
151 FromRanges []Range `json:"fromRanges"`
155 * The parameter of a `callHierarchy/outgoingCalls` request.
159 type CallHierarchyOutgoingCallsParams struct {
160 Item CallHierarchyItem `json:"item"`
161 WorkDoneProgressParams
166 * The parameter of a `textDocument/prepareCallHierarchy` request.
170 type CallHierarchyPrepareParams struct {
171 TextDocumentPositionParams
172 WorkDoneProgressParams
176 * Call hierarchy options used during static or dynamic registration.
180 type CallHierarchyRegistrationOptions struct {
181 TextDocumentRegistrationOptions
183 StaticRegistrationOptions
186 type CancelParams struct {
188 * The request id to cancel.
190 ID interface{} /*number | string*/ `json:"id"`
193 type ClientCapabilities = struct {
196 * Workspace specific client capabilities.
198 WorkspaceClientCapabilities
200 * The client has support for workspace folders
204 WorkspaceFolders bool `json:"workspaceFolders,omitempty"`
206 * The client supports `workspace/configuration` requests.
210 Configuration bool `json:"configuration,omitempty"`
213 * Text document specific client capabilities.
215 TextDocument TextDocumentClientCapabilities `json:"textDocument,omitempty"`
218 * Window specific client capabilities.
220 Window interface{} `json:"window,omitempty"`
222 * Whether client supports handling progress notifications. If set servers are allowed to
223 * report in `workDoneProgress` property in the request specific server capabilities.
227 WorkDoneProgress bool `json:"workDoneProgress,omitempty"`
230 * Experimental client capabilities.
232 Experimental interface{} `json:"experimental,omitempty"`
236 * A code action represents a change that can be performed in code, e.g. to fix a problem or
239 * A CodeAction must set either `edit` and/or a `command`. If both are supplied, the `edit` is applied first, then the `command` is executed.
241 type CodeAction struct {
243 * A short, human-readable, title for this code action.
245 Title string `json:"title"`
247 * The kind of the code action.
249 * Used to filter code actions.
251 Kind CodeActionKind `json:"kind,omitempty"`
253 * The diagnostics that this code action resolves.
255 Diagnostics []Diagnostic `json:"diagnostics,omitempty"`
257 * Marks this as a preferred action. Preferred actions are used by the `auto fix` command and can be targeted
260 * A quick fix should be marked preferred if it properly addresses the underlying error.
261 * A refactoring should be marked preferred if it is the most reasonable choice of actions to take.
265 IsPreferred bool `json:"isPreferred,omitempty"`
267 * The workspace edit this code action performs.
269 Edit WorkspaceEdit `json:"edit,omitempty"`
271 * A command this code action executes. If a code action
272 * provides a edit and a command, first the edit is
273 * executed and then the command.
275 Command *Command `json:"command,omitempty"`
279 * The Client Capabilities of a [CodeActionRequest](#CodeActionRequest).
281 type CodeActionClientCapabilities struct {
283 * Whether code action supports dynamic registration.
285 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
287 * The client support code action literals of type `CodeAction` as a valid
288 * response of the `textDocument/codeAction` request. If the property is not
289 * set the request can only return `Command` literals.
293 CodeActionLiteralSupport struct {
295 * The code action kind is support with the following value
298 CodeActionKind struct {
300 * The code action kind values the client supports. When this
301 * property exists the client also guarantees that it will
302 * handle values outside its set gracefully and falls back
303 * to a default value when unknown.
305 ValueSet []CodeActionKind `json:"valueSet"`
306 } `json:"codeActionKind"`
307 } `json:"codeActionLiteralSupport,omitempty"`
309 * Whether code action supports the `isPreferred` property.
312 IsPreferredSupport bool `json:"isPreferredSupport,omitempty"`
316 * Contains additional diagnostic information about the context in which
317 * a [code action](#CodeActionProvider.provideCodeActions) is run.
319 type CodeActionContext struct {
321 * An array of diagnostics known on the client side overlapping the range provided to the
322 * `textDocument/codeAction` request. They are provied so that the server knows which
323 * errors are currently presented to the user for the given range. There is no guarantee
324 * that these accurately reflect the error state of the resource. The primary parameter
325 * to compute code actions is the provided range.
327 Diagnostics []Diagnostic `json:"diagnostics"`
329 * Requested kind of actions to return.
331 * Actions not of this kind are filtered out by the client before being shown. So servers
332 * can omit computing them.
334 Only []CodeActionKind `json:"only,omitempty"`
338 * A set of predefined code action kinds
340 type CodeActionKind string
343 * Provider options for a [CodeActionRequest](#CodeActionRequest).
345 type CodeActionOptions struct {
347 * CodeActionKinds that this server may return.
349 * The list of kinds may be generic, such as `CodeActionKind.Refactor`, or the server
350 * may list out every specific kind they provide.
352 CodeActionKinds []CodeActionKind `json:"codeActionKinds,omitempty"`
353 WorkDoneProgressOptions
357 * The parameters of a [CodeActionRequest](#CodeActionRequest).
359 type CodeActionParams struct {
361 * The document in which the command was invoked.
363 TextDocument TextDocumentIdentifier `json:"textDocument"`
365 * The range for which the command was invoked.
367 Range Range `json:"range"`
369 * Context carrying additional information.
371 Context CodeActionContext `json:"context"`
372 WorkDoneProgressParams
377 * A code lens represents a [command](#Command) that should be shown along with
378 * source text, like the number of references, a way to run tests, etc.
380 * A code lens is _unresolved_ when no command is associated to it. For performance
381 * reasons the creation of a code lens and resolving should be done to two stages.
383 type CodeLens struct {
385 * The range in which this code lens is valid. Should only span a single line.
387 Range Range `json:"range"`
389 * The command this code lens represents.
391 Command Command `json:"command,omitempty"`
393 * A data entry field that is preserved on a code lens item between
394 * a [CodeLensRequest](#CodeLensRequest) and a [CodeLensResolveRequest]
395 * (#CodeLensResolveRequest)
397 Data interface{} `json:"data,omitempty"`
401 * The client capabilities of a [CodeLensRequest](#CodeLensRequest).
403 type CodeLensClientCapabilities struct {
405 * Whether code lens supports dynamic registration.
407 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
411 * Code Lens provider options of a [CodeLensRequest](#CodeLensRequest).
413 type CodeLensOptions struct {
415 * Code lens has a resolve provider as well.
417 ResolveProvider bool `json:"resolveProvider,omitempty"`
418 WorkDoneProgressOptions
422 * The parameters of a [CodeLensRequest](#CodeLensRequest).
424 type CodeLensParams struct {
426 * The document to request code lens for.
428 TextDocument TextDocumentIdentifier `json:"textDocument"`
429 WorkDoneProgressParams
434 * Represents a color in RGBA space.
438 * The red component of this color in the range [0-1].
440 Red float64 `json:"red"`
442 * The green component of this color in the range [0-1].
444 Green float64 `json:"green"`
446 * The blue component of this color in the range [0-1].
448 Blue float64 `json:"blue"`
450 * The alpha component of this color in the range [0-1].
452 Alpha float64 `json:"alpha"`
456 * Represents a color range from a document.
458 type ColorInformation struct {
460 * The range in the document where this color appers.
462 Range Range `json:"range"`
464 * The actual color value for this color range.
466 Color Color `json:"color"`
469 type ColorPresentation struct {
471 * The label of this color presentation. It will be shown on the color
472 * picker header. By default this is also the text that is inserted when selecting
473 * this color presentation.
475 Label string `json:"label"`
477 * An [edit](#TextEdit) which is applied to a document when selecting
478 * this presentation for the color. When `falsy` the [label](#ColorPresentation.label)
481 TextEdit TextEdit `json:"textEdit,omitempty"`
483 * An optional array of additional [text edits](#TextEdit) that are applied when
484 * selecting this color presentation. Edits must not overlap with the main [edit](#ColorPresentation.textEdit) nor with themselves.
486 AdditionalTextEdits []TextEdit `json:"additionalTextEdits,omitempty"`
490 * Parameters for a [ColorPresentationRequest](#ColorPresentationRequest).
492 type ColorPresentationParams struct {
496 TextDocument TextDocumentIdentifier `json:"textDocument"`
498 * The color to request presentations for.
500 Color Color `json:"color"`
502 * The range where the color would be inserted. Serves as a context.
504 Range Range `json:"range"`
505 WorkDoneProgressParams
510 * Represents a reference to a command. Provides a title which
511 * will be used to represent a command in the UI and, optionally,
512 * an array of arguments which will be passed to the command handler
513 * function when invoked.
515 type Command struct {
517 * Title of the command, like `save`.
519 Title string `json:"title"`
521 * The identifier of the actual command handler.
523 Command string `json:"command"`
525 * Arguments that the command handler should be
528 Arguments []json.RawMessage `json:"arguments,omitempty"`
532 * Completion client capabilities
534 type CompletionClientCapabilities struct {
536 * Whether completion supports dynamic registration.
538 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
540 * The client supports the following `CompletionItem` specific
543 CompletionItem struct {
545 * Client supports snippets as insert text.
547 * A snippet can define tab stops and placeholders with `$1`, `$2`
548 * and `${3:foo}`. `$0` defines the final tab stop, it defaults to
549 * the end of the snippet. Placeholders with equal identifiers are linked,
550 * that is typing in one will update others too.
552 SnippetSupport bool `json:"snippetSupport,omitempty"`
554 * Client supports commit characters on a completion item.
556 CommitCharactersSupport bool `json:"commitCharactersSupport,omitempty"`
558 * Client supports the follow content formats for the documentation
559 * property. The order describes the preferred format of the client.
561 DocumentationFormat []MarkupKind `json:"documentationFormat,omitempty"`
563 * Client supports the deprecated property on a completion item.
565 DeprecatedSupport bool `json:"deprecatedSupport,omitempty"`
567 * Client supports the preselect property on a completion item.
569 PreselectSupport bool `json:"preselectSupport,omitempty"`
571 * Client supports the tag property on a completion item. Clients supporting
572 * tags have to handle unknown tags gracefully. Clients especially need to
573 * preserve unknown tags when sending a completion item back to the server in
580 * The tags supported by the client.
582 ValueSet []CompletionItemTag `json:"valueSet"`
583 } `json:"tagSupport,omitempty"`
585 * Client support insert replace edit to control different behavior if a
586 * completion item is inserted in the text or should replace text.
588 * @since 3.16.0 - Proposed state
590 InsertReplaceSupport bool `json:"insertReplaceSupport,omitempty"`
592 * Client supports to resolve `additionalTextEdits` in the `completionItem/resolve`
593 * request. So servers can postpone computing them.
595 * @since 3.16.0 - Proposed state
597 ResolveAdditionalTextEditsSupport bool `json:"resolveAdditionalTextEditsSupport,omitempty"`
598 } `json:"completionItem,omitempty"`
599 CompletionItemKind struct {
601 * The completion item kind values the client supports. When this
602 * property exists the client also guarantees that it will
603 * handle values outside its set gracefully and falls back
604 * to a default value when unknown.
606 * If this property is not present the client only supports
607 * the completion items kinds from `Text` to `Reference` as defined in
608 * the initial version of the protocol.
610 ValueSet []CompletionItemKind `json:"valueSet,omitempty"`
611 } `json:"completionItemKind,omitempty"`
613 * The client supports to send additional context information for a
614 * `textDocument/completion` requestion.
616 ContextSupport bool `json:"contextSupport,omitempty"`
620 * Contains additional information about the context in which a completion request is triggered.
622 type CompletionContext struct {
624 * How the completion was triggered.
626 TriggerKind CompletionTriggerKind `json:"triggerKind"`
628 * The trigger character (a single character) that has trigger code complete.
629 * Is undefined if `triggerKind !== CompletionTriggerKind.TriggerCharacter`
631 TriggerCharacter string `json:"triggerCharacter,omitempty"`
635 * A completion item represents a text snippet that is
636 * proposed to complete text that is being typed.
638 type CompletionItem struct {
640 * The label of this completion item. By default
641 * also the text that is inserted when selecting
644 Label string `json:"label"`
646 * The kind of this completion item. Based of the kind
647 * an icon is chosen by the editor.
649 Kind CompletionItemKind `json:"kind,omitempty"`
651 * Tags for this completion item.
655 Tags []CompletionItemTag `json:"tags,omitempty"`
657 * A human-readable string with additional information
658 * about this item, like type or symbol information.
660 Detail string `json:"detail,omitempty"`
662 * A human-readable string that represents a doc-comment.
664 Documentation string/*string | MarkupContent*/ `json:"documentation,omitempty"`
666 * Indicates if this item is deprecated.
667 * @deprecated Use `tags` instead.
669 Deprecated bool `json:"deprecated,omitempty"`
671 * Select this item when showing.
673 * *Note* that only one completion item can be selected and that the
674 * tool / client decides which item that is. The rule is that the *first*
675 * item of those that match best is selected.
677 Preselect bool `json:"preselect,omitempty"`
679 * A string that should be used when comparing this item
680 * with other items. When `falsy` the [label](#CompletionItem.label)
683 SortText string `json:"sortText,omitempty"`
685 * A string that should be used when filtering a set of
686 * completion items. When `falsy` the [label](#CompletionItem.label)
689 FilterText string `json:"filterText,omitempty"`
691 * A string that should be inserted into a document when selecting
692 * this completion. When `falsy` the [label](#CompletionItem.label)
695 * The `insertText` is subject to interpretation by the client side.
696 * Some tools might not take the string literally. For example
697 * VS Code when code complete is requested in this example `con<cursor position>`
698 * and a completion item with an `insertText` of `console` is provided it
699 * will only insert `sole`. Therefore it is recommended to use `textEdit` instead
700 * since it avoids additional client side interpretation.
702 InsertText string `json:"insertText,omitempty"`
704 * The format of the insert text. The format applies to both the `insertText` property
705 * and the `newText` property of a provided `textEdit`. If ommitted defaults to
706 * `InsertTextFormat.PlainText`.
708 InsertTextFormat InsertTextFormat `json:"insertTextFormat,omitempty"`
710 * An [edit](#TextEdit) which is applied to a document when selecting
711 * this completion. When an edit is provided the value of
712 * [insertText](#CompletionItem.insertText) is ignored.
714 * Most editors support two different operation when accepting a completion item. One is to insert a
715 * completion text and the other is to replace an existing text with a competion text. Since this can
716 * usually not predetermend by a server it can report both ranges. Clients need to signal support for
717 * `InsertReplaceEdits` via the `textDocument.completion.insertReplaceSupport` client capability
720 * *Note 1:* The text edit's range as well as both ranges from a insert replace edit must be a
721 * [single line] and they must contain the position at which completion has been requested.
722 * *Note 2:* If an `InsertReplaceEdit` is returned the edit's insert range must be a prefix of
723 * the edit's replace range, that means it must be contained and starting at the same position.
725 * @since 3.16.0 additional type `InsertReplaceEdit` - Proposed state
727 TextEdit *TextEdit/*TextEdit | InsertReplaceEdit*/ `json:"textEdit,omitempty"`
729 * An optional array of additional [text edits](#TextEdit) that are applied when
730 * selecting this completion. Edits must not overlap (including the same insert position)
731 * with the main [edit](#CompletionItem.textEdit) nor with themselves.
733 * Additional text edits should be used to change text unrelated to the current cursor position
734 * (for example adding an import statement at the top of the file if the completion item will
735 * insert an unqualified type).
737 AdditionalTextEdits []TextEdit `json:"additionalTextEdits,omitempty"`
739 * An optional set of characters that when pressed while this completion is active will accept it first and
740 * then type that character. *Note* that all commit characters should have `length=1` and that superfluous
741 * characters will be ignored.
743 CommitCharacters []string `json:"commitCharacters,omitempty"`
745 * An optional [command](#Command) that is executed *after* inserting this completion. *Note* that
746 * additional modifications to the current document should be described with the
747 * [additionalTextEdits](#CompletionItem.additionalTextEdits)-property.
749 Command *Command `json:"command,omitempty"`
751 * A data entry field that is preserved on a completion item between
752 * a [CompletionRequest](#CompletionRequest) and a [CompletionResolveRequest]
753 * (#CompletionResolveRequest)
755 Data interface{} `json:"data,omitempty"`
759 * The kind of a completion entry.
761 type CompletionItemKind float64
764 * Completion item tags are extra annotations that tweak the rendering of a completion
769 type CompletionItemTag float64
772 * Represents a collection of [completion items](#CompletionItem) to be presented
775 type CompletionList struct {
777 * This list it not complete. Further typing results in recomputing this list.
779 IsIncomplete bool `json:"isIncomplete"`
781 * The completion items.
783 Items []CompletionItem `json:"items"`
787 * Completion options.
789 type CompletionOptions struct {
791 * Most tools trigger completion request automatically without explicitly requesting
792 * it using a keyboard shortcut (e.g. Ctrl+Space). Typically they do so when the user
793 * starts to type an identifier. For example if the user types `c` in a JavaScript file
794 * code complete will automatically pop up present `console` besides others as a
795 * completion item. Characters that make up identifiers don't need to be listed here.
797 * If code complete should automatically be trigger on characters not being valid inside
798 * an identifier (for example `.` in JavaScript) list them in `triggerCharacters`.
800 TriggerCharacters []string `json:"triggerCharacters,omitempty"`
802 * The list of all possible characters that commit a completion. This field can be used
803 * if clients don't support individual commmit characters per completion item. See
804 * `ClientCapabilities.textDocument.completion.completionItem.commitCharactersSupport`
806 * If a server provides both `allCommitCharacters` and commit characters on an individual
807 * completion item the ones on the completion item win.
811 AllCommitCharacters []string `json:"allCommitCharacters,omitempty"`
813 * The server provides support to resolve additional
814 * information for a completion item.
816 ResolveProvider bool `json:"resolveProvider,omitempty"`
817 WorkDoneProgressOptions
821 * Completion parameters
823 type CompletionParams struct {
825 * The completion context. This is only available it the client specifies
826 * to send this using the client capability `textDocument.completion.contextSupport === true`
828 Context CompletionContext `json:"context,omitempty"`
829 TextDocumentPositionParams
830 WorkDoneProgressParams
835 * How a completion was triggered
837 type CompletionTriggerKind float64
839 type ConfigurationClientCapabilities struct {
841 * The workspace client capabilities
843 Workspace WorkspaceGn `json:"workspace,omitempty"`
846 type ConfigurationItem struct {
848 * The scope to get the configuration section for.
850 ScopeURI string `json:"scopeUri,omitempty"`
852 * The configuration section asked for.
854 Section string `json:"section,omitempty"`
858 * The parameters of a configuration request.
860 type ConfigurationParams struct {
861 Items []ConfigurationItem `json:"items"`
865 * Create file operation.
867 type CreateFile struct {
871 Kind string `json:"kind"`
873 * The resource to create.
875 URI DocumentURI `json:"uri"`
879 Options CreateFileOptions `json:"options,omitempty"`
884 * Options to create a file.
886 type CreateFileOptions struct {
888 * Overwrite existing file. Overwrite wins over `ignoreIfExists`
890 Overwrite bool `json:"overwrite,omitempty"`
894 IgnoreIfExists bool `json:"ignoreIfExists,omitempty"`
898 * The declaration of a symbol representation as one or many [locations](#Location).
900 type Declaration = []Location /*Location | Location[]*/
905 type DeclarationClientCapabilities struct {
907 * Whether declaration supports dynamic registration. If this is set to `true`
908 * the client supports the new `DeclarationRegistrationOptions` return value
909 * for the corresponding server capability as well.
911 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
913 * The client supports additional metadata in the form of declaration links.
915 LinkSupport bool `json:"linkSupport,omitempty"`
919 * Information about where a symbol is declared.
921 * Provides additional metadata over normal [location](#Location) declarations, including the range of
922 * the declaring symbol.
924 * Servers should prefer returning `DeclarationLink` over `Declaration` if supported
927 type DeclarationLink = LocationLink
929 type DeclarationOptions struct {
930 WorkDoneProgressOptions
933 type DeclarationParams struct {
934 TextDocumentPositionParams
935 WorkDoneProgressParams
939 type DeclarationRegistrationOptions struct {
941 TextDocumentRegistrationOptions
942 StaticRegistrationOptions
946 * The definition of a symbol represented as one or many [locations](#Location).
947 * For most programming languages there is only one location at which a symbol is
950 * Servers should prefer returning `DefinitionLink` over `Definition` if supported
953 type Definition = []Location /*Location | Location[]*/
956 * Client Capabilities for a [DefinitionRequest](#DefinitionRequest).
958 type DefinitionClientCapabilities struct {
960 * Whether definition supports dynamic registration.
962 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
964 * The client supports additional metadata in the form of definition links.
968 LinkSupport bool `json:"linkSupport,omitempty"`
972 * Information about where a symbol is defined.
974 * Provides additional metadata over normal [location](#Location) definitions, including the range of
975 * the defining symbol
977 type DefinitionLink = LocationLink
980 * Server Capabilities for a [DefinitionRequest](#DefinitionRequest).
982 type DefinitionOptions struct {
983 WorkDoneProgressOptions
987 * Parameters for a [DefinitionRequest](#DefinitionRequest).
989 type DefinitionParams struct {
990 TextDocumentPositionParams
991 WorkDoneProgressParams
996 * Delete file operation
998 type DeleteFile struct {
1002 Kind string `json:"kind"`
1004 * The file to delete.
1006 URI DocumentURI `json:"uri"`
1010 Options DeleteFileOptions `json:"options,omitempty"`
1015 * Delete file options
1017 type DeleteFileOptions struct {
1019 * Delete the content recursively if a folder is denoted.
1021 Recursive bool `json:"recursive,omitempty"`
1023 * Ignore the operation if the file doesn't exist.
1025 IgnoreIfNotExists bool `json:"ignoreIfNotExists,omitempty"`
1029 * Represents a diagnostic, such as a compiler error or warning. Diagnostic objects
1030 * are only valid in the scope of a resource.
1032 type Diagnostic struct {
1034 * The range at which the message applies
1036 Range Range `json:"range"`
1038 * The diagnostic's severity. Can be omitted. If omitted it is up to the
1039 * client to interpret diagnostics as error, warning, info or hint.
1041 Severity DiagnosticSeverity `json:"severity,omitempty"`
1043 * The diagnostic's code, which usually appear in the user interface.
1045 * @since 3.16.0 Support for `DiagnosticCode` - Proposed state
1047 Code interface{}/* float64 | string | DiagnosticCode*/ `json:"code,omitempty"`
1049 * A human-readable string describing the source of this
1050 * diagnostic, e.g. 'typescript' or 'super lint'. It usually
1051 * appears in the user interface.
1053 Source string `json:"source,omitempty"`
1055 * The diagnostic's message. It usually appears in the user interface
1057 Message string `json:"message"`
1059 * Additional metadata about the diagnostic.
1063 Tags []DiagnosticTag `json:"tags,omitempty"`
1065 * An array of related diagnostic information, e.g. when symbol-names within
1066 * a scope collide all definitions can be marked via this property.
1068 RelatedInformation []DiagnosticRelatedInformation `json:"relatedInformation,omitempty"`
1072 * Structure to capture more complex diagnostic codes.
1074 * @since 3.16.0 - Proposed state
1076 type DiagnosticCode struct {
1080 Value string/*string | number*/ `json:"value"`
1082 * A target URI to open with more information about the diagnostic error.
1084 Target URI `json:"target"`
1088 * Represents a related message and source code location for a diagnostic. This should be
1089 * used to point to code locations that cause or related to a diagnostics, e.g when duplicating
1090 * a symbol in a scope.
1092 type DiagnosticRelatedInformation struct {
1094 * The location of this related diagnostic information.
1096 Location Location `json:"location"`
1098 * The message of this related diagnostic information.
1100 Message string `json:"message"`
1104 * The diagnostic's severity.
1106 type DiagnosticSeverity float64
1109 * The diagnostic tags.
1113 type DiagnosticTag float64
1115 type DidChangeConfigurationClientCapabilities struct {
1117 * Did change configuration notification supports dynamic registration.
1119 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
1123 * The parameters of a change configuration notification.
1125 type DidChangeConfigurationParams struct {
1127 * The actual changed settings
1129 Settings interface{} `json:"settings"`
1133 * The change text document notification's parameters.
1135 type DidChangeTextDocumentParams struct {
1137 * The document that did change. The version number points
1138 * to the version after all provided content changes have
1141 TextDocument VersionedTextDocumentIdentifier `json:"textDocument"`
1143 * The actual content changes. The content changes describe single state changes
1144 * to the document. So if there are two content changes c1 (at array index 0) and
1145 * c2 (at array index 1) for a document in state S then c1 moves the document from
1146 * S to S' and c2 from S' to S''. So c1 is computed on the state S and c2 is computed
1149 * To mirror the content of a document using change events use the following approach:
1150 * - start with the same initial content
1151 * - apply the 'textDocument/didChange' notifications in the order you recevie them.
1152 * - apply the `TextDocumentContentChangeEvent`s in a single notification in the order
1155 ContentChanges []TextDocumentContentChangeEvent `json:"contentChanges"`
1158 type DidChangeWatchedFilesClientCapabilities struct {
1160 * Did change watched files notification supports dynamic registration. Please note
1161 * that the current protocol doesn't support static configuration for file changes
1162 * from the server side.
1164 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
1168 * The watched files change notification's parameters.
1170 type DidChangeWatchedFilesParams struct {
1172 * The actual file events.
1174 Changes []FileEvent `json:"changes"`
1178 * Describe options to be used when registered for text document change events.
1180 type DidChangeWatchedFilesRegistrationOptions struct {
1182 * The watchers to register.
1184 Watchers []FileSystemWatcher `json:"watchers"`
1188 * The parameters of a `workspace/didChangeWorkspaceFolders` notification.
1190 type DidChangeWorkspaceFoldersParams struct {
1192 * The actual workspace folder change event.
1194 Event WorkspaceFoldersChangeEvent `json:"event"`
1198 * The parameters send in a close text document notification
1200 type DidCloseTextDocumentParams struct {
1202 * The document that was closed.
1204 TextDocument TextDocumentIdentifier `json:"textDocument"`
1208 * The parameters send in a open text document notification
1210 type DidOpenTextDocumentParams struct {
1212 * The document that was opened.
1214 TextDocument TextDocumentItem `json:"textDocument"`
1218 * The parameters send in a save text document notification
1220 type DidSaveTextDocumentParams struct {
1222 * The document that was closed.
1224 TextDocument VersionedTextDocumentIdentifier `json:"textDocument"`
1226 * Optional the content when saved. Depends on the includeText value
1227 * when the save notification was requested.
1229 Text *string `json:"text,omitempty"`
1232 type DocumentColorClientCapabilities struct {
1234 * Whether implementation supports dynamic registration. If this is set to `true`
1235 * the client supports the new `DocumentColorRegistrationOptions` return value
1236 * for the corresponding server capability as well.
1238 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
1241 type DocumentColorOptions struct {
1242 WorkDoneProgressOptions
1246 * Parameters for a [DocumentColorRequest](#DocumentColorRequest).
1248 type DocumentColorParams struct {
1250 * The text document.
1252 TextDocument TextDocumentIdentifier `json:"textDocument"`
1253 WorkDoneProgressParams
1257 type DocumentColorRegistrationOptions struct {
1258 TextDocumentRegistrationOptions
1259 StaticRegistrationOptions
1260 DocumentColorOptions
1264 * A document filter denotes a document by different properties like
1265 * the [language](#TextDocument.languageId), the [scheme](#Uri.scheme) of
1266 * its resource, or a glob-pattern that is applied to the [path](#TextDocument.fileName).
1268 * Glob patterns can have the following syntax:
1269 * - `*` to match one or more characters in a path segment
1270 * - `?` to match on one character in a path segment
1271 * - `**` to match any number of path segments, including none
1272 * - `{}` to group conditions (e.g. `**/*.{ts,js}` matches all TypeScript and JavaScript files)
1273 * - `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …)
1274 * - `[!...]` to negate a range of characters to match in a path segment (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but not `example.0`)
1276 * @sample A language filter that applies to typescript files on disk: `{ language: 'typescript', scheme: 'file' }`
1277 * @sample A language filter that applies to all package.json paths: `{ language: 'json', pattern: '**package.json' }`
1279 type DocumentFilter = struct {
1280 /** A language id, like `typescript`. */
1281 Language string `json:"language"`
1282 /** A Uri [scheme](#Uri.scheme), like `file` or `untitled`. */
1283 Scheme string `json:"scheme,omitempty"`
1284 /** A glob pattern, like `*.{ts,js}`. */
1285 Pattern string `json:"pattern,omitempty"`
1289 * Client capabilities of a [DocumentFormattingRequest](#DocumentFormattingRequest).
1291 type DocumentFormattingClientCapabilities struct {
1293 * Whether formatting supports dynamic registration.
1295 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
1299 * Provider options for a [DocumentFormattingRequest](#DocumentFormattingRequest).
1301 type DocumentFormattingOptions struct {
1302 WorkDoneProgressOptions
1306 * The parameters of a [DocumentFormattingRequest](#DocumentFormattingRequest).
1308 type DocumentFormattingParams struct {
1310 * The document to format.
1312 TextDocument TextDocumentIdentifier `json:"textDocument"`
1314 * The format options
1316 Options FormattingOptions `json:"options"`
1317 WorkDoneProgressParams
1321 * A document highlight is a range inside a text document which deserves
1322 * special attention. Usually a document highlight is visualized by changing
1323 * the background color of its range.
1325 type DocumentHighlight struct {
1327 * The range this highlight applies to.
1329 Range Range `json:"range"`
1331 * The highlight kind, default is [text](#DocumentHighlightKind.Text).
1333 Kind DocumentHighlightKind `json:"kind,omitempty"`
1337 * Client Capabilities for a [DocumentHighlightRequest](#DocumentHighlightRequest).
1339 type DocumentHighlightClientCapabilities struct {
1341 * Whether document highlight supports dynamic registration.
1343 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
1347 * A document highlight kind.
1349 type DocumentHighlightKind float64
1352 * Provider options for a [DocumentHighlightRequest](#DocumentHighlightRequest).
1354 type DocumentHighlightOptions struct {
1355 WorkDoneProgressOptions
1359 * Parameters for a [DocumentHighlightRequest](#DocumentHighlightRequest).
1361 type DocumentHighlightParams struct {
1362 TextDocumentPositionParams
1363 WorkDoneProgressParams
1368 * A document link is a range in a text document that links to an internal or external resource, like another
1369 * text document or a web site.
1371 type DocumentLink struct {
1373 * The range this link applies to.
1375 Range Range `json:"range"`
1377 * The uri this link points to.
1379 Target string `json:"target,omitempty"`
1381 * The tooltip text when you hover over this link.
1383 * If a tooltip is provided, is will be displayed in a string that includes instructions on how to
1384 * trigger the link, such as `{0} (ctrl + click)`. The specific instructions vary depending on OS,
1385 * user settings, and localization.
1389 Tooltip string `json:"tooltip,omitempty"`
1391 * A data entry field that is preserved on a document link between a
1392 * DocumentLinkRequest and a DocumentLinkResolveRequest.
1394 Data interface{} `json:"data,omitempty"`
1398 * The client capabilities of a [DocumentLinkRequest](#DocumentLinkRequest).
1400 type DocumentLinkClientCapabilities struct {
1402 * Whether document link supports dynamic registration.
1404 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
1406 * Whether the client support the `tooltip` property on `DocumentLink`.
1410 TooltipSupport bool `json:"tooltipSupport,omitempty"`
1414 * Provider options for a [DocumentLinkRequest](#DocumentLinkRequest).
1416 type DocumentLinkOptions struct {
1418 * Document links have a resolve provider as well.
1420 ResolveProvider bool `json:"resolveProvider,omitempty"`
1421 WorkDoneProgressOptions
1425 * The parameters of a [DocumentLinkRequest](#DocumentLinkRequest).
1427 type DocumentLinkParams struct {
1429 * The document to provide document links for.
1431 TextDocument TextDocumentIdentifier `json:"textDocument"`
1432 WorkDoneProgressParams
1437 * Client capabilities of a [DocumentOnTypeFormattingRequest](#DocumentOnTypeFormattingRequest).
1439 type DocumentOnTypeFormattingClientCapabilities struct {
1441 * Whether on type formatting supports dynamic registration.
1443 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
1447 * Provider options for a [DocumentOnTypeFormattingRequest](#DocumentOnTypeFormattingRequest).
1449 type DocumentOnTypeFormattingOptions struct {
1451 * A character on which formatting should be triggered, like `}`.
1453 FirstTriggerCharacter string `json:"firstTriggerCharacter"`
1455 * More trigger characters.
1457 MoreTriggerCharacter []string `json:"moreTriggerCharacter,omitempty"`
1461 * The parameters of a [DocumentOnTypeFormattingRequest](#DocumentOnTypeFormattingRequest).
1463 type DocumentOnTypeFormattingParams struct {
1465 * The document to format.
1467 TextDocument TextDocumentIdentifier `json:"textDocument"`
1469 * The position at which this request was send.
1471 Position Position `json:"position"`
1473 * The character that has been typed.
1475 Ch string `json:"ch"`
1477 * The format options.
1479 Options FormattingOptions `json:"options"`
1483 * Client capabilities of a [DocumentRangeFormattingRequest](#DocumentRangeFormattingRequest).
1485 type DocumentRangeFormattingClientCapabilities struct {
1487 * Whether range formatting supports dynamic registration.
1489 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
1493 * Provider options for a [DocumentRangeFormattingRequest](#DocumentRangeFormattingRequest).
1495 type DocumentRangeFormattingOptions struct {
1496 WorkDoneProgressOptions
1500 * The parameters of a [DocumentRangeFormattingRequest](#DocumentRangeFormattingRequest).
1502 type DocumentRangeFormattingParams struct {
1504 * The document to format.
1506 TextDocument TextDocumentIdentifier `json:"textDocument"`
1508 * The range to format
1510 Range Range `json:"range"`
1512 * The format options
1514 Options FormattingOptions `json:"options"`
1515 WorkDoneProgressParams
1519 * A document selector is the combination of one or many document filters.
1521 * @sample `let sel:DocumentSelector = [{ language: 'typescript' }, { language: 'json', pattern: '**∕tsconfig.json' }]`;
1523 type DocumentSelector = []string /*string | DocumentFilter*/
1526 * Represents programming constructs like variables, classes, interfaces etc.
1527 * that appear in a document. Document symbols can be hierarchical and they
1528 * have two ranges: one that encloses its definition and one that points to
1529 * its most interesting range, e.g. the range of an identifier.
1531 type DocumentSymbol struct {
1533 * The name of this symbol. Will be displayed in the user interface and therefore must not be
1534 * an empty string or a string only consisting of white spaces.
1536 Name string `json:"name"`
1538 * More detail for this symbol, e.g the signature of a function.
1540 Detail string `json:"detail,omitempty"`
1542 * The kind of this symbol.
1544 Kind SymbolKind `json:"kind"`
1546 * Tags for this completion item.
1548 * @since 3.16.0 - Proposed state
1550 Tags []SymbolTag `json:"tags,omitempty"`
1552 * Indicates if this symbol is deprecated.
1554 * @deprecated Use tags instead
1556 Deprecated bool `json:"deprecated,omitempty"`
1558 * The range enclosing this symbol not including leading/trailing whitespace but everything else
1559 * like comments. This information is typically used to determine if the clients cursor is
1560 * inside the symbol to reveal in the symbol in the UI.
1562 Range Range `json:"range"`
1564 * The range that should be selected and revealed when this symbol is being picked, e.g the name of a function.
1565 * Must be contained by the `range`.
1567 SelectionRange Range `json:"selectionRange"`
1569 * Children of this symbol, e.g. properties of a class.
1571 Children []DocumentSymbol `json:"children,omitempty"`
1575 * Client Capabilities for a [DocumentSymbolRequest](#DocumentSymbolRequest).
1577 type DocumentSymbolClientCapabilities struct {
1579 * Whether document symbol supports dynamic registration.
1581 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
1583 * Specific capabilities for the `SymbolKind`.
1587 * The symbol kind values the client supports. When this
1588 * property exists the client also guarantees that it will
1589 * handle values outside its set gracefully and falls back
1590 * to a default value when unknown.
1592 * If this property is not present the client only supports
1593 * the symbol kinds from `File` to `Array` as defined in
1594 * the initial version of the protocol.
1596 ValueSet []SymbolKind `json:"valueSet,omitempty"`
1597 } `json:"symbolKind,omitempty"`
1599 * The client support hierarchical document symbols.
1601 HierarchicalDocumentSymbolSupport bool `json:"hierarchicalDocumentSymbolSupport,omitempty"`
1603 * The client supports tags on `SymbolInformation`. Tags are supported on
1604 * `DocumentSymbol` if `hierarchicalDocumentSymbolSupport` is set to true.
1605 * Clients supporting tags have to handle unknown tags gracefully.
1607 * @since 3.16.0 - Proposed state
1611 * The tags supported by the client.
1613 ValueSet []SymbolTag `json:"valueSet"`
1614 } `json:"tagSupport,omitempty"`
1618 * Provider options for a [DocumentSymbolRequest](#DocumentSymbolRequest).
1620 type DocumentSymbolOptions struct {
1621 WorkDoneProgressOptions
1625 * Parameters for a [DocumentSymbolRequest](#DocumentSymbolRequest).
1627 type DocumentSymbolParams struct {
1629 * The text document.
1631 TextDocument TextDocumentIdentifier `json:"textDocument"`
1632 WorkDoneProgressParams
1637 * A tagging type for string properties that are actually document URIs.
1639 type DocumentURI string
1642 * The client capabilities of a [ExecuteCommandRequest](#ExecuteCommandRequest).
1644 type ExecuteCommandClientCapabilities struct {
1646 * Execute command supports dynamic registration.
1648 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
1652 * The server capabilities of a [ExecuteCommandRequest](#ExecuteCommandRequest).
1654 type ExecuteCommandOptions struct {
1656 * The commands to be executed on the server
1658 Commands []string `json:"commands"`
1659 WorkDoneProgressOptions
1663 * The parameters of a [ExecuteCommandRequest](#ExecuteCommandRequest).
1665 type ExecuteCommandParams struct {
1667 * The identifier of the actual command handler.
1669 Command string `json:"command"`
1671 * Arguments that the command should be invoked with.
1673 Arguments []json.RawMessage `json:"arguments,omitempty"`
1674 WorkDoneProgressParams
1677 type FailureHandlingKind string
1680 * The file event type
1682 type FileChangeType float64
1685 * An event describing a file change.
1687 type FileEvent struct {
1691 URI DocumentURI `json:"uri"`
1695 Type FileChangeType `json:"type"`
1698 type FileSystemWatcher struct {
1700 * The glob pattern to watch. Glob patterns can have the following syntax:
1701 * - `*` to match one or more characters in a path segment
1702 * - `?` to match on one character in a path segment
1703 * - `**` to match any number of path segments, including none
1704 * - `{}` to group conditions (e.g. `**/*.{ts,js}` matches all TypeScript and JavaScript files)
1705 * - `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …)
1706 * - `[!...]` to negate a range of characters to match in a path segment (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but not `example.0`)
1708 GlobPattern string `json:"globPattern"`
1710 * The kind of events of interest. If omitted it defaults
1711 * to WatchKind.Create | WatchKind.Change | WatchKind.Delete
1714 Kind float64 `json:"kind,omitempty"`
1718 * Represents a folding range.
1720 type FoldingRange struct {
1722 * The zero-based line number from where the folded range starts.
1724 StartLine float64 `json:"startLine"`
1726 * The zero-based character offset from where the folded range starts. If not defined, defaults to the length of the start line.
1728 StartCharacter float64 `json:"startCharacter,omitempty"`
1730 * The zero-based line number where the folded range ends.
1732 EndLine float64 `json:"endLine"`
1734 * The zero-based character offset before the folded range ends. If not defined, defaults to the length of the end line.
1736 EndCharacter float64 `json:"endCharacter,omitempty"`
1738 * Describes the kind of the folding range such as `comment' or 'region'. The kind
1739 * is used to categorize folding ranges and used by commands like 'Fold all comments'. See
1740 * [FoldingRangeKind](#FoldingRangeKind) for an enumeration of standardized kinds.
1742 Kind string `json:"kind,omitempty"`
1745 type FoldingRangeClientCapabilities struct {
1747 * Whether implementation supports dynamic registration for folding range providers. If this is set to `true`
1748 * the client supports the new `FoldingRangeRegistrationOptions` return value for the corresponding server
1749 * capability as well.
1751 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
1753 * The maximum number of folding ranges that the client prefers to receive per document. The value serves as a
1754 * hint, servers are free to follow the limit.
1756 RangeLimit float64 `json:"rangeLimit,omitempty"`
1758 * If set, the client signals that it only supports folding complete lines. If set, client will
1759 * ignore specified `startCharacter` and `endCharacter` properties in a FoldingRange.
1761 LineFoldingOnly bool `json:"lineFoldingOnly,omitempty"`
1765 * Enum of known range kinds
1767 type FoldingRangeKind string
1769 type FoldingRangeOptions struct {
1770 WorkDoneProgressOptions
1774 * Parameters for a [FoldingRangeRequest](#FoldingRangeRequest).
1776 type FoldingRangeParams struct {
1778 * The text document.
1780 TextDocument TextDocumentIdentifier `json:"textDocument"`
1781 WorkDoneProgressParams
1785 type FoldingRangeRegistrationOptions struct {
1786 TextDocumentRegistrationOptions
1788 StaticRegistrationOptions
1792 * Value-object describing what options formatting should use.
1794 type FormattingOptions struct {
1796 * Size of a tab in spaces.
1798 TabSize float64 `json:"tabSize"`
1800 * Prefer spaces over tabs.
1802 InsertSpaces bool `json:"insertSpaces"`
1804 * Trim trailing whitespaces on a line.
1808 TrimTrailingWhitespace bool `json:"trimTrailingWhitespace,omitempty"`
1810 * Insert a newline character at the end of the file if one does not exist.
1814 InsertFinalNewline bool `json:"insertFinalNewline,omitempty"`
1816 * Trim all newlines after the final newline at the end of the file.
1820 TrimFinalNewlines bool `json:"trimFinalNewlines,omitempty"`
1824 * The result of a hover request.
1828 * The hover's content
1830 Contents MarkupContent/*MarkupContent | MarkedString | MarkedString[]*/ `json:"contents"`
1834 Range Range `json:"range,omitempty"`
1837 type HoverClientCapabilities struct {
1839 * Whether hover supports dynamic registration.
1841 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
1843 * Client supports the follow content formats for the content
1844 * property. The order describes the preferred format of the client.
1846 ContentFormat []MarkupKind `json:"contentFormat,omitempty"`
1852 type HoverOptions struct {
1853 WorkDoneProgressOptions
1857 * Parameters for a [HoverRequest](#HoverRequest).
1859 type HoverParams struct {
1860 TextDocumentPositionParams
1861 WorkDoneProgressParams
1867 type ImplementationClientCapabilities struct {
1869 * Whether implementation supports dynamic registration. If this is set to `true`
1870 * the client supports the new `ImplementationRegistrationOptions` return value
1871 * for the corresponding server capability as well.
1873 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
1875 * The client supports additional metadata in the form of definition links.
1879 LinkSupport bool `json:"linkSupport,omitempty"`
1882 type ImplementationOptions struct {
1883 WorkDoneProgressOptions
1886 type ImplementationParams struct {
1887 TextDocumentPositionParams
1888 WorkDoneProgressParams
1892 type ImplementationRegistrationOptions struct {
1893 TextDocumentRegistrationOptions
1894 ImplementationOptions
1895 StaticRegistrationOptions
1899 * Known error codes for an `InitializeError`;
1901 type InitializeError float64
1903 type InitializeParams = struct {
1904 InnerInitializeParams
1905 WorkspaceFoldersInitializeParams
1909 * The result returned from an initialize request.
1911 type InitializeResult struct {
1913 * The capabilities the language server provides.
1915 Capabilities ServerCapabilities `json:"capabilities"`
1917 * Information about the server.
1923 * The name of the server as defined by the server.
1925 Name string `json:"name"`
1927 * The servers's version as defined by the server.
1929 Version string `json:"version,omitempty"`
1930 } `json:"serverInfo,omitempty"`
1933 type InitializedParams struct {
1937 * Defines the capabilities provided by the client.
1939 type InnerClientCapabilities struct {
1941 * Workspace specific client capabilities.
1943 Workspace WorkspaceClientCapabilities `json:"workspace,omitempty"`
1945 * Text document specific client capabilities.
1947 TextDocument TextDocumentClientCapabilities `json:"textDocument,omitempty"`
1949 * Window specific client capabilities.
1951 Window interface{} `json:"window,omitempty"`
1953 * Experimental client capabilities.
1955 Experimental interface{} `json:"experimental,omitempty"`
1959 * The initialize parameters
1961 type InnerInitializeParams struct {
1963 * The process Id of the parent process that started
1966 ProcessID float64/*number | null*/ `json:"processId"`
1968 * Information about the client
1974 * The name of the client as defined by the client.
1976 Name string `json:"name"`
1978 * The client's version as defined by the client.
1980 Version string `json:"version,omitempty"`
1981 } `json:"clientInfo,omitempty"`
1983 * The rootPath of the workspace. Is null
1984 * if no folder is open.
1986 * @deprecated in favour of rootUri.
1988 RootPath string/*string | null*/ `json:"rootPath,omitempty"`
1990 * The rootUri of the workspace. Is null if no
1991 * folder is open. If both `rootPath` and `rootUri` are set
1994 * @deprecated in favour of workspaceFolders.
1996 RootURI DocumentURI/*DocumentUri | null*/ `json:"rootUri"`
1998 * The capabilities provided by the client (editor or tool)
2000 Capabilities ClientCapabilities `json:"capabilities"`
2002 * User provided initialization options.
2004 InitializationOptions interface{} `json:"initializationOptions,omitempty"`
2006 * The initial trace setting. If omitted trace is disabled ('off').
2008 Trace string/*'off' | 'messages' | 'verbose'*/ `json:"trace,omitempty"`
2009 WorkDoneProgressParams
2013 * Defines the capabilities provided by a language
2016 type InnerServerCapabilities struct {
2018 * Defines how text documents are synced. Is either a detailed structure defining each notification or
2019 * for backwards compatibility the TextDocumentSyncKind number.
2021 TextDocumentSync interface{}/*TextDocumentSyncOptions | TextDocumentSyncKind*/ `json:"textDocumentSync,omitempty"`
2023 * The server provides completion support.
2025 CompletionProvider CompletionOptions `json:"completionProvider,omitempty"`
2027 * The server provides hover support.
2029 HoverProvider bool/*boolean | HoverOptions*/ `json:"hoverProvider,omitempty"`
2031 * The server provides signature help support.
2033 SignatureHelpProvider SignatureHelpOptions `json:"signatureHelpProvider,omitempty"`
2035 * The server provides Goto Declaration support.
2037 DeclarationProvider interface{}/* bool | DeclarationOptions | DeclarationRegistrationOptions*/ `json:"declarationProvider,omitempty"`
2039 * The server provides goto definition support.
2041 DefinitionProvider bool/*boolean | DefinitionOptions*/ `json:"definitionProvider,omitempty"`
2043 * The server provides Goto Type Definition support.
2045 TypeDefinitionProvider interface{}/* bool | TypeDefinitionOptions | TypeDefinitionRegistrationOptions*/ `json:"typeDefinitionProvider,omitempty"`
2047 * The server provides Goto Implementation support.
2049 ImplementationProvider interface{}/* bool | ImplementationOptions | ImplementationRegistrationOptions*/ `json:"implementationProvider,omitempty"`
2051 * The server provides find references support.
2053 ReferencesProvider bool/*boolean | ReferenceOptions*/ `json:"referencesProvider,omitempty"`
2055 * The server provides document highlight support.
2057 DocumentHighlightProvider bool/*boolean | DocumentHighlightOptions*/ `json:"documentHighlightProvider,omitempty"`
2059 * The server provides document symbol support.
2061 DocumentSymbolProvider bool/*boolean | DocumentSymbolOptions*/ `json:"documentSymbolProvider,omitempty"`
2063 * The server provides code actions. CodeActionOptions may only be
2064 * specified if the client states that it supports
2065 * `codeActionLiteralSupport` in its initial `initialize` request.
2067 CodeActionProvider interface{}/*boolean | CodeActionOptions*/ `json:"codeActionProvider,omitempty"`
2069 * The server provides code lens.
2071 CodeLensProvider CodeLensOptions `json:"codeLensProvider,omitempty"`
2073 * The server provides document link support.
2075 DocumentLinkProvider DocumentLinkOptions `json:"documentLinkProvider,omitempty"`
2077 * The server provides color provider support.
2079 ColorProvider interface{}/* bool | DocumentColorOptions | DocumentColorRegistrationOptions*/ `json:"colorProvider,omitempty"`
2081 * The server provides workspace symbol support.
2083 WorkspaceSymbolProvider bool/*boolean | WorkspaceSymbolOptions*/ `json:"workspaceSymbolProvider,omitempty"`
2085 * The server provides document formatting.
2087 DocumentFormattingProvider bool/*boolean | DocumentFormattingOptions*/ `json:"documentFormattingProvider,omitempty"`
2089 * The server provides document range formatting.
2091 DocumentRangeFormattingProvider bool/*boolean | DocumentRangeFormattingOptions*/ `json:"documentRangeFormattingProvider,omitempty"`
2093 * The server provides document formatting on typing.
2095 DocumentOnTypeFormattingProvider DocumentOnTypeFormattingOptions `json:"documentOnTypeFormattingProvider,omitempty"`
2097 * The server provides rename support. RenameOptions may only be
2098 * specified if the client states that it supports
2099 * `prepareSupport` in its initial `initialize` request.
2101 RenameProvider interface{}/*boolean | RenameOptions*/ `json:"renameProvider,omitempty"`
2103 * The server provides folding provider support.
2105 FoldingRangeProvider interface{}/* bool | FoldingRangeOptions | FoldingRangeRegistrationOptions*/ `json:"foldingRangeProvider,omitempty"`
2107 * The server provides selection range support.
2109 SelectionRangeProvider interface{}/* bool | SelectionRangeOptions | SelectionRangeRegistrationOptions*/ `json:"selectionRangeProvider,omitempty"`
2111 * The server provides execute command support.
2113 ExecuteCommandProvider ExecuteCommandOptions `json:"executeCommandProvider,omitempty"`
2115 * The server provides Call Hierarchy support.
2117 * @since 3.16.0 - Proposed state
2119 CallHierarchyProvider interface{}/* bool | CallHierarchyOptions | CallHierarchyRegistrationOptions*/ `json:"callHierarchyProvider,omitempty"`
2121 * The server provides semantic tokens support.
2123 * @since 3.16.0 - Proposed state
2125 SemanticTokensProvider interface{}/*SemanticTokensOptions | SemanticTokensRegistrationOptions*/ `json:"semanticTokensProvider,omitempty"`
2127 * Experimental server capabilities.
2129 Experimental interface{} `json:"experimental,omitempty"`
2133 * A special text edit to provide an insert and a replace operation.
2135 * @since 3.16.0 - Proposed state
2137 type InsertReplaceEdit struct {
2139 * The string to be inserted.
2141 NewText string `json:"newText"`
2143 * The range if the insert is requested
2145 Insert Range `json:"insert"`
2147 * The range if the replace is requested.
2149 Replace Range `json:"replace"`
2153 * Defines whether the insert text in a completion item should be interpreted as
2154 * plain text or a snippet.
2156 type InsertTextFormat float64
2159 * Represents a location inside a resource, such as a line
2160 * inside a text file.
2162 type Location struct {
2163 URI DocumentURI `json:"uri"`
2164 Range Range `json:"range"`
2168 * Represents the connection of two locations. Provides additional metadata over normal [locations](#Location),
2169 * including an origin range.
2171 type LocationLink struct {
2173 * Span of the origin of this link.
2175 * Used as the underlined span for mouse definition hover. Defaults to the word range at
2176 * the definition position.
2178 OriginSelectionRange Range `json:"originSelectionRange,omitempty"`
2180 * The target resource identifier of this link.
2182 TargetURI DocumentURI `json:"targetUri"`
2184 * The full target range of this link. If the target for example is a symbol then target range is the
2185 * range enclosing this symbol not including leading/trailing whitespace but everything else
2186 * like comments. This information is typically used to highlight the range in the editor.
2188 TargetRange Range `json:"targetRange"`
2190 * The range that should be selected and revealed when this link is being followed, e.g the name of a function.
2191 * Must be contained by the `targetRange`. See also `DocumentSymbol#range`
2193 TargetSelectionRange Range `json:"targetSelectionRange"`
2197 * The log message parameters.
2199 type LogMessageParams struct {
2201 * The message type. See {@link MessageType}
2203 Type MessageType `json:"type"`
2205 * The actual message
2207 Message string `json:"message"`
2210 type LogTraceParams struct {
2211 Message string `json:"message"`
2212 Verbose string `json:"verbose,omitempty"`
2216 * MarkedString can be used to render human readable text. It is either a markdown string
2217 * or a code-block that provides a language and a code snippet. The language identifier
2218 * is semantically equal to the optional language identifier in fenced code blocks in GitHub
2219 * issues. See https://help.github.com/articles/creating-and-highlighting-code-blocks/#syntax-highlighting
2221 * The pair of a language and a value is an equivalent to markdown:
2226 * Note that markdown strings will be sanitized - that means html will be escaped.
2227 * @deprecated use MarkupContent instead.
2229 type MarkedString = string /*string | { language: string; value: string }*/
2232 * A `MarkupContent` literal represents a string value which content is interpreted base on its
2233 * kind flag. Currently the protocol supports `plaintext` and `markdown` as markup kinds.
2235 * If the kind is `markdown` then the value can contain fenced code blocks like in GitHub issues.
2236 * See https://help.github.com/articles/creating-and-highlighting-code-blocks/#syntax-highlighting
2238 * Here is an example how such a string can be constructed using JavaScript / TypeScript:
2240 * let markdown: MarkdownContent = {
2241 * kind: MarkupKind.Markdown,
2252 * *Please Note* that clients might sanitize the return markdown. A client could decide to
2253 * remove HTML from the markdown to avoid script execution.
2255 type MarkupContent struct {
2257 * The type of the Markup
2259 Kind MarkupKind `json:"kind"`
2261 * The content itself
2263 Value string `json:"value"`
2267 * Describes the content type that a client supports in various
2268 * result literals like `Hover`, `ParameterInfo` or `CompletionItem`.
2270 * Please note that `MarkupKinds` must not start with a `$`. This kinds
2271 * are reserved for internal usage.
2273 type MarkupKind string
2275 type MessageActionItem struct {
2277 * A short title like 'Retry', 'Open Log' etc.
2279 Title string `json:"title"`
2285 type MessageType float64
2288 * Represents a parameter of a callable-signature. A parameter can
2289 * have a label and a doc-comment.
2291 type ParameterInformation struct {
2293 * The label of this parameter information.
2295 * Either a string or an inclusive start and exclusive end offsets within its containing
2296 * signature label. (see SignatureInformation.label). The offsets are based on a UTF-16
2297 * string representation as `Position` and `Range` does.
2299 * *Note*: a label of type string should be a substring of its containing signature label.
2300 * Its intended use case is to highlight the parameter label part in the `SignatureInformation.label`.
2302 Label string/*string | [number, number]*/ `json:"label"`
2304 * The human-readable doc-comment of this signature. Will be shown
2305 * in the UI but can be omitted.
2307 Documentation string/*string | MarkupContent*/ `json:"documentation,omitempty"`
2310 type PartialResultParams struct {
2312 * An optional token that a server can use to report partial results (e.g. streaming) to
2315 PartialResultToken ProgressToken `json:"partialResultToken,omitempty"`
2319 * Position in a text document expressed as zero-based line and character offset.
2320 * The offsets are based on a UTF-16 string representation. So a string of the form
2321 * `a𐐀b` the character offset of the character `a` is 0, the character offset of `𐐀`
2322 * is 1 and the character offset of b is 3 since `𐐀` is represented using two code
2325 * Positions are line end character agnostic. So you can not specify a position that
2326 * denotes `\r|\n` or `\n|` where `|` represents the character offset.
2328 type Position struct {
2330 * Line position in a document (zero-based).
2331 * 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.
2332 * If a line number is negative, it defaults to 0.
2334 Line float64 `json:"line"`
2336 * Character offset on a line in a document (zero-based). Assuming that the line is
2337 * represented as a string, the `character` value represents the gap between the
2338 * `character` and `character + 1`.
2340 * If the character value is greater than the line length it defaults back to the
2342 * If a line number is negative, it defaults to 0.
2344 Character float64 `json:"character"`
2347 type PrepareRenameParams struct {
2348 TextDocumentPositionParams
2349 WorkDoneProgressParams
2352 type ProgressParams struct {
2354 * The progress token provided by the client or server.
2356 Token ProgressToken `json:"token"`
2358 * The progress data.
2360 Value interface{} `json:"value"`
2363 type ProgressToken = interface{} /*number | string*/
2366 * The publish diagnostic client capabilities.
2368 type PublishDiagnosticsClientCapabilities struct {
2370 * Whether the clients accepts diagnostics with related information.
2372 RelatedInformation bool `json:"relatedInformation,omitempty"`
2374 * Client supports the tag property to provide meta data about a diagnostic.
2375 * Clients supporting tags have to handle unknown tags gracefully.
2381 * The tags supported by the client.
2383 ValueSet []DiagnosticTag `json:"valueSet"`
2384 } `json:"tagSupport,omitempty"`
2386 * Whether the client interprets the version property of the
2387 * `textDocument/publishDiagnostics` notification`s parameter.
2391 VersionSupport bool `json:"versionSupport,omitempty"`
2393 * Clients support complex diagnostic codes (e.g. code and target URI).
2395 * @since 3.16.0 - Proposed state
2397 ComplexDiagnosticCodeSupport bool `json:"complexDiagnosticCodeSupport,omitempty"`
2401 * The publish diagnostic notification's parameters.
2403 type PublishDiagnosticsParams struct {
2405 * The URI for which diagnostic information is reported.
2407 URI DocumentURI `json:"uri"`
2409 * Optional the version number of the document the diagnostics are published for.
2413 Version float64 `json:"version,omitempty"`
2415 * An array of diagnostic information items.
2417 Diagnostics []Diagnostic `json:"diagnostics"`
2421 * A range in a text document expressed as (zero-based) start and end positions.
2423 * If you want to specify a range that contains a line including the line ending
2424 * character(s) then use an end position denoting the start of the next line.
2428 * start: { line: 5, character: 23 }
2429 * end : { line 6, character : 0 }
2435 * The range's start position
2437 Start Position `json:"start"`
2439 * The range's end position.
2441 End Position `json:"end"`
2445 * Client Capabilities for a [ReferencesRequest](#ReferencesRequest).
2447 type ReferenceClientCapabilities struct {
2449 * Whether references supports dynamic registration.
2451 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
2455 * Value-object that contains additional information when
2456 * requesting references.
2458 type ReferenceContext struct {
2460 * Include the declaration of the current symbol.
2462 IncludeDeclaration bool `json:"includeDeclaration"`
2466 * Reference options.
2468 type ReferenceOptions struct {
2469 WorkDoneProgressOptions
2473 * Parameters for a [ReferencesRequest](#ReferencesRequest).
2475 type ReferenceParams struct {
2476 Context ReferenceContext `json:"context"`
2477 TextDocumentPositionParams
2478 WorkDoneProgressParams
2483 * General parameters to to register for an notification or to register a provider.
2485 type Registration struct {
2487 * The id used to register the request. The id can be used to deregister
2488 * the request again.
2490 ID string `json:"id"`
2492 * The method to register for.
2494 Method string `json:"method"`
2496 * Options necessary for the registration.
2498 RegisterOptions interface{} `json:"registerOptions,omitempty"`
2501 type RegistrationParams struct {
2502 Registrations []Registration `json:"registrations"`
2505 type RenameClientCapabilities struct {
2507 * Whether rename supports dynamic registration.
2509 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
2511 * Client supports testing for validity of rename operations
2514 * @since version 3.12.0
2516 PrepareSupport bool `json:"prepareSupport,omitempty"`
2518 * Client supports the default behavior result.
2520 * @since version 3.16.0
2522 PrepareSupportDefaultBehavior bool `json:"prepareSupportDefaultBehavior,omitempty"`
2526 * Rename file operation
2528 type RenameFile struct {
2532 Kind string `json:"kind"`
2534 * The old (existing) location.
2536 OldURI DocumentURI `json:"oldUri"`
2540 NewURI DocumentURI `json:"newUri"`
2544 Options RenameFileOptions `json:"options,omitempty"`
2549 * Rename file options
2551 type RenameFileOptions struct {
2553 * Overwrite target if existing. Overwrite wins over `ignoreIfExists`
2555 Overwrite bool `json:"overwrite,omitempty"`
2557 * Ignores if target exists.
2559 IgnoreIfExists bool `json:"ignoreIfExists,omitempty"`
2563 * Provider options for a [RenameRequest](#RenameRequest).
2565 type RenameOptions struct {
2567 * Renames should be checked and tested before being executed.
2569 * @since version 3.12.0
2571 PrepareProvider bool `json:"prepareProvider,omitempty"`
2572 WorkDoneProgressOptions
2576 * The parameters of a [RenameRequest](#RenameRequest).
2578 type RenameParams struct {
2580 * The document to rename.
2582 TextDocument TextDocumentIdentifier `json:"textDocument"`
2584 * The position at which this request was sent.
2586 Position Position `json:"position"`
2588 * The new name of the symbol. If the given name is not valid the
2589 * request must return a [ResponseError](#ResponseError) with an
2590 * appropriate message set.
2592 NewName string `json:"newName"`
2593 WorkDoneProgressParams
2596 type ResourceOperation struct {
2597 Kind string `json:"kind"`
2600 type ResourceOperationKind string
2605 type SaveOptions struct {
2607 * The client is supposed to include the content on save.
2609 IncludeText bool `json:"includeText,omitempty"`
2613 * A selection range represents a part of a selection hierarchy. A selection range
2614 * may have a parent selection range that contains it.
2616 type SelectionRange struct {
2618 * The [range](#Range) of this selection range.
2620 Range Range `json:"range"`
2622 * The parent selection range containing this range. Therefore `parent.range` must contain `this.range`.
2624 Parent *SelectionRange `json:"parent,omitempty"`
2627 type SelectionRangeClientCapabilities struct {
2629 * Whether implementation supports dynamic registration for selection range providers. If this is set to `true`
2630 * the client supports the new `SelectionRangeRegistrationOptions` return value for the corresponding server
2631 * capability as well.
2633 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
2636 type SelectionRangeOptions struct {
2637 WorkDoneProgressOptions
2641 * A parameter literal used in selection range requests.
2643 type SelectionRangeParams struct {
2645 * The text document.
2647 TextDocument TextDocumentIdentifier `json:"textDocument"`
2649 * The positions inside the text document.
2651 Positions []Position `json:"positions"`
2652 WorkDoneProgressParams
2656 type SelectionRangeRegistrationOptions struct {
2657 SelectionRangeOptions
2658 TextDocumentRegistrationOptions
2659 StaticRegistrationOptions
2663 * @since 3.16.0 - Proposed state
2665 type SemanticTokens struct {
2667 * An optional result id. If provided and clients support delta updating
2668 * the client will include the result id in the next semantic token request.
2669 * A server can then instead of computing all semantic tokens again simply
2672 ResultID string `json:"resultId,omitempty"`
2674 * The actual tokens.
2676 Data []float64 `json:"data"`
2680 * @since 3.16.0 - Proposed state
2682 type SemanticTokensDelta struct {
2683 ResultID string `json:"resultId,omitempty"`
2685 * The semantic token edits to transform a previous result into a new result.
2687 Edits []SemanticTokensEdit `json:"edits"`
2691 * @since 3.16.0 - Proposed state
2693 type SemanticTokensDeltaParams struct {
2695 * The text document.
2697 TextDocument TextDocumentIdentifier `json:"textDocument"`
2699 * The result id of a previous response. The result Id can either point to a full response
2700 * or a delta response depending on what was recevied last.
2702 PreviousResultID string `json:"previousResultId"`
2703 WorkDoneProgressParams
2708 * @since 3.16.0 - Proposed state
2710 type SemanticTokensEdit struct {
2712 * The start offset of the edit.
2714 Start float64 `json:"start"`
2716 * The count of elements to remove.
2718 DeleteCount float64 `json:"deleteCount"`
2720 * The elements to insert.
2722 Data []float64 `json:"data,omitempty"`
2726 * @since 3.16.0 - Proposed state
2728 type SemanticTokensLegend struct {
2730 * The token types a server uses.
2732 TokenTypes []string `json:"tokenTypes"`
2734 * The token modifiers a server uses.
2736 TokenModifiers []string `json:"tokenModifiers"`
2740 * @since 3.16.0 - Proposed state
2742 type SemanticTokensOptions struct {
2744 * The legend used by the server
2746 Legend SemanticTokensLegend `json:"legend"`
2748 * Server supports providing semantic tokens for a sepcific range
2751 Range bool/*boolean | { }*/ `json:"range,omitempty"`
2753 * Server supports providing semantic tokens for a full document.
2755 Full bool/*boolean | <elided struct>*/ `json:"full,omitempty"`
2756 WorkDoneProgressOptions
2760 * @since 3.16.0 - Proposed state
2762 type SemanticTokensParams struct {
2764 * The text document.
2766 TextDocument TextDocumentIdentifier `json:"textDocument"`
2767 WorkDoneProgressParams
2772 * @since 3.16.0 - Proposed state
2774 type SemanticTokensRangeParams struct {
2776 * The text document.
2778 TextDocument TextDocumentIdentifier `json:"textDocument"`
2780 * The range the semantic tokens are requested for.
2782 Range Range `json:"range"`
2783 WorkDoneProgressParams
2788 * @since 3.16.0 - Proposed state
2790 type SemanticTokensRegistrationOptions struct {
2791 TextDocumentRegistrationOptions
2792 SemanticTokensOptions
2793 StaticRegistrationOptions
2796 type ServerCapabilities = struct {
2798 * Defines how text documents are synced. Is either a detailed structure defining each notification or
2799 * for backwards compatibility the TextDocumentSyncKind number.
2801 TextDocumentSync interface{}/*TextDocumentSyncOptions | TextDocumentSyncKind*/ `json:"textDocumentSync,omitempty"`
2803 * The server provides completion support.
2805 CompletionProvider CompletionOptions `json:"completionProvider,omitempty"`
2807 * The server provides hover support.
2809 HoverProvider bool/*boolean | HoverOptions*/ `json:"hoverProvider,omitempty"`
2811 * The server provides signature help support.
2813 SignatureHelpProvider SignatureHelpOptions `json:"signatureHelpProvider,omitempty"`
2815 * The server provides Goto Declaration support.
2817 DeclarationProvider interface{}/* bool | DeclarationOptions | DeclarationRegistrationOptions*/ `json:"declarationProvider,omitempty"`
2819 * The server provides goto definition support.
2821 DefinitionProvider bool/*boolean | DefinitionOptions*/ `json:"definitionProvider,omitempty"`
2823 * The server provides Goto Type Definition support.
2825 TypeDefinitionProvider interface{}/* bool | TypeDefinitionOptions | TypeDefinitionRegistrationOptions*/ `json:"typeDefinitionProvider,omitempty"`
2827 * The server provides Goto Implementation support.
2829 ImplementationProvider interface{}/* bool | ImplementationOptions | ImplementationRegistrationOptions*/ `json:"implementationProvider,omitempty"`
2831 * The server provides find references support.
2833 ReferencesProvider bool/*boolean | ReferenceOptions*/ `json:"referencesProvider,omitempty"`
2835 * The server provides document highlight support.
2837 DocumentHighlightProvider bool/*boolean | DocumentHighlightOptions*/ `json:"documentHighlightProvider,omitempty"`
2839 * The server provides document symbol support.
2841 DocumentSymbolProvider bool/*boolean | DocumentSymbolOptions*/ `json:"documentSymbolProvider,omitempty"`
2843 * The server provides code actions. CodeActionOptions may only be
2844 * specified if the client states that it supports
2845 * `codeActionLiteralSupport` in its initial `initialize` request.
2847 CodeActionProvider interface{}/*boolean | CodeActionOptions*/ `json:"codeActionProvider,omitempty"`
2849 * The server provides code lens.
2851 CodeLensProvider CodeLensOptions `json:"codeLensProvider,omitempty"`
2853 * The server provides document link support.
2855 DocumentLinkProvider DocumentLinkOptions `json:"documentLinkProvider,omitempty"`
2857 * The server provides color provider support.
2859 ColorProvider interface{}/* bool | DocumentColorOptions | DocumentColorRegistrationOptions*/ `json:"colorProvider,omitempty"`
2861 * The server provides workspace symbol support.
2863 WorkspaceSymbolProvider bool/*boolean | WorkspaceSymbolOptions*/ `json:"workspaceSymbolProvider,omitempty"`
2865 * The server provides document formatting.
2867 DocumentFormattingProvider bool/*boolean | DocumentFormattingOptions*/ `json:"documentFormattingProvider,omitempty"`
2869 * The server provides document range formatting.
2871 DocumentRangeFormattingProvider bool/*boolean | DocumentRangeFormattingOptions*/ `json:"documentRangeFormattingProvider,omitempty"`
2873 * The server provides document formatting on typing.
2875 DocumentOnTypeFormattingProvider DocumentOnTypeFormattingOptions `json:"documentOnTypeFormattingProvider,omitempty"`
2877 * The server provides rename support. RenameOptions may only be
2878 * specified if the client states that it supports
2879 * `prepareSupport` in its initial `initialize` request.
2881 RenameProvider interface{}/*boolean | RenameOptions*/ `json:"renameProvider,omitempty"`
2883 * The server provides folding provider support.
2885 FoldingRangeProvider interface{}/* bool | FoldingRangeOptions | FoldingRangeRegistrationOptions*/ `json:"foldingRangeProvider,omitempty"`
2887 * The server provides selection range support.
2889 SelectionRangeProvider interface{}/* bool | SelectionRangeOptions | SelectionRangeRegistrationOptions*/ `json:"selectionRangeProvider,omitempty"`
2891 * The server provides execute command support.
2893 ExecuteCommandProvider ExecuteCommandOptions `json:"executeCommandProvider,omitempty"`
2895 * The server provides Call Hierarchy support.
2897 * @since 3.16.0 - Proposed state
2899 CallHierarchyProvider interface{}/* bool | CallHierarchyOptions | CallHierarchyRegistrationOptions*/ `json:"callHierarchyProvider,omitempty"`
2901 * The server provides semantic tokens support.
2903 * @since 3.16.0 - Proposed state
2905 SemanticTokensProvider interface{}/*SemanticTokensOptions | SemanticTokensRegistrationOptions*/ `json:"semanticTokensProvider,omitempty"`
2907 * Experimental server capabilities.
2909 Experimental interface{} `json:"experimental,omitempty"`
2911 * The workspace server capabilities
2913 Workspace WorkspaceGn `json:"workspace,omitempty"`
2916 type SetTraceParams struct {
2917 Value TraceValues `json:"value"`
2921 * The parameters of a notification message.
2923 type ShowMessageParams struct {
2925 * The message type. See {@link MessageType}
2927 Type MessageType `json:"type"`
2929 * The actual message
2931 Message string `json:"message"`
2934 type ShowMessageRequestParams struct {
2936 * The message type. See {@link MessageType}
2938 Type MessageType `json:"type"`
2940 * The actual message
2942 Message string `json:"message"`
2944 * The message action items to present.
2946 Actions []MessageActionItem `json:"actions,omitempty"`
2950 * Signature help represents the signature of something
2951 * callable. There can be multiple signature but only one
2952 * active and only one active parameter.
2954 type SignatureHelp struct {
2956 * One or more signatures.
2958 Signatures []SignatureInformation `json:"signatures"`
2960 * The active signature. Set to `null` if no
2963 ActiveSignature float64/*number | null*/ `json:"activeSignature"`
2965 * The active parameter of the active signature. Set to `null`
2966 * if the active signature has no parameters.
2968 ActiveParameter float64/*number | null*/ `json:"activeParameter"`
2972 * Client Capabilities for a [SignatureHelpRequest](#SignatureHelpRequest).
2974 type SignatureHelpClientCapabilities struct {
2976 * Whether signature help supports dynamic registration.
2978 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
2980 * The client supports the following `SignatureInformation`
2981 * specific properties.
2983 SignatureInformation struct {
2985 * Client supports the follow content formats for the documentation
2986 * property. The order describes the preferred format of the client.
2988 DocumentationFormat []MarkupKind `json:"documentationFormat,omitempty"`
2990 * Client capabilities specific to parameter information.
2992 ParameterInformation struct {
2994 * The client supports processing label offsets instead of a
2995 * simple label string.
2999 LabelOffsetSupport bool `json:"labelOffsetSupport,omitempty"`
3000 } `json:"parameterInformation,omitempty"`
3002 * The client support the `activeParameter` property on `SignatureInformation`
3005 * @since 3.16.0 - proposed state
3007 ActiveParameterSupport bool `json:"activeParameterSupport,omitempty"`
3008 } `json:"signatureInformation,omitempty"`
3010 * The client supports to send additional context information for a
3011 * `textDocument/signatureHelp` request. A client that opts into
3012 * contextSupport will also support the `retriggerCharacters` on
3013 * `SignatureHelpOptions`.
3017 ContextSupport bool `json:"contextSupport,omitempty"`
3021 * Additional information about the context in which a signature help request was triggered.
3025 type SignatureHelpContext struct {
3027 * Action that caused signature help to be triggered.
3029 TriggerKind SignatureHelpTriggerKind `json:"triggerKind"`
3031 * Character that caused signature help to be triggered.
3033 * This is undefined when `triggerKind !== SignatureHelpTriggerKind.TriggerCharacter`
3035 TriggerCharacter string `json:"triggerCharacter,omitempty"`
3037 * `true` if signature help was already showing when it was triggered.
3039 * Retriggers occur when the signature help is already active and can be caused by actions such as
3040 * typing a trigger character, a cursor move, or document content changes.
3042 IsRetrigger bool `json:"isRetrigger"`
3044 * The currently active `SignatureHelp`.
3046 * The `activeSignatureHelp` has its `SignatureHelp.activeSignature` field updated based on
3047 * the user navigating through available signatures.
3049 ActiveSignatureHelp SignatureHelp `json:"activeSignatureHelp,omitempty"`
3053 * Server Capabilities for a [SignatureHelpRequest](#SignatureHelpRequest).
3055 type SignatureHelpOptions struct {
3057 * List of characters that trigger signature help.
3059 TriggerCharacters []string `json:"triggerCharacters,omitempty"`
3061 * List of characters that re-trigger signature help.
3063 * These trigger characters are only active when signature help is already showing. All trigger characters
3064 * are also counted as re-trigger characters.
3068 RetriggerCharacters []string `json:"retriggerCharacters,omitempty"`
3069 WorkDoneProgressOptions
3073 * Parameters for a [SignatureHelpRequest](#SignatureHelpRequest).
3075 type SignatureHelpParams struct {
3077 * The signature help context. This is only available if the client specifies
3078 * to send this using the client capability `textDocument.signatureHelp.contextSupport === true`
3082 Context SignatureHelpContext `json:"context,omitempty"`
3083 TextDocumentPositionParams
3084 WorkDoneProgressParams
3088 * How a signature help was triggered.
3092 type SignatureHelpTriggerKind float64
3095 * Represents the signature of something callable. A signature
3096 * can have a label, like a function-name, a doc-comment, and
3097 * a set of parameters.
3099 type SignatureInformation struct {
3101 * The label of this signature. Will be shown in
3104 Label string `json:"label"`
3106 * The human-readable doc-comment of this signature. Will be shown
3107 * in the UI but can be omitted.
3109 Documentation string/*string | MarkupContent*/ `json:"documentation,omitempty"`
3111 * The parameters of this signature.
3113 Parameters []ParameterInformation `json:"parameters,omitempty"`
3115 * The index of the active parameter.
3117 * If provided, this is used in place of `SignatureHelp.activeParameter`.
3119 * @since 3.16.0 - proposed state
3121 ActiveParameter float64 `json:"activeParameter,omitempty"`
3125 * Static registration options to be returned in the initialize
3128 type StaticRegistrationOptions struct {
3130 * The id used to register the request. The id can be used to deregister
3131 * the request again. See also Registration#id.
3133 ID string `json:"id,omitempty"`
3137 * Represents information about programming constructs like variables, classes,
3140 type SymbolInformation struct {
3142 * The name of this symbol.
3144 Name string `json:"name"`
3146 * The kind of this symbol.
3148 Kind SymbolKind `json:"kind"`
3150 * Tags for this completion item.
3152 * @since 3.16.0 - Proposed state
3154 Tags []SymbolTag `json:"tags,omitempty"`
3156 * Indicates if this symbol is deprecated.
3158 * @deprecated Use tags instead
3160 Deprecated bool `json:"deprecated,omitempty"`
3162 * The location of this symbol. The location's range is used by a tool
3163 * to reveal the location in the editor. If the symbol is selected in the
3164 * tool the range's start information is used to position the cursor. So
3165 * the range usually spans more than the actual symbol's name and does
3166 * normally include thinks like visibility modifiers.
3168 * The range doesn't have to denote a node range in the sense of a abstract
3169 * syntax tree. It can therefore not be used to re-construct a hierarchy of
3172 Location Location `json:"location"`
3174 * The name of the symbol containing this symbol. This information is for
3175 * user interface purposes (e.g. to render a qualifier in the user interface
3176 * if necessary). It can't be used to re-infer a hierarchy for the document
3179 ContainerName string `json:"containerName,omitempty"`
3185 type SymbolKind float64
3188 * Symbol tags are extra annotations that tweak the rendering of a symbol.
3191 type SymbolTag float64
3194 * Text document specific client capabilities.
3196 type TextDocumentClientCapabilities struct {
3198 * Defines which synchronization capabilities the client supports.
3200 Synchronization TextDocumentSyncClientCapabilities `json:"synchronization,omitempty"`
3202 * Capabilities specific to the `textDocument/completion`
3204 Completion CompletionClientCapabilities `json:"completion,omitempty"`
3206 * Capabilities specific to the `textDocument/hover`
3208 Hover HoverClientCapabilities `json:"hover,omitempty"`
3210 * Capabilities specific to the `textDocument/signatureHelp`
3212 SignatureHelp SignatureHelpClientCapabilities `json:"signatureHelp,omitempty"`
3214 * Capabilities specific to the `textDocument/declaration`
3218 Declaration DeclarationClientCapabilities `json:"declaration,omitempty"`
3220 * Capabilities specific to the `textDocument/definition`
3222 Definition DefinitionClientCapabilities `json:"definition,omitempty"`
3224 * Capabilities specific to the `textDocument/typeDefinition`
3228 TypeDefinition TypeDefinitionClientCapabilities `json:"typeDefinition,omitempty"`
3230 * Capabilities specific to the `textDocument/implementation`
3234 Implementation ImplementationClientCapabilities `json:"implementation,omitempty"`
3236 * Capabilities specific to the `textDocument/references`
3238 References ReferenceClientCapabilities `json:"references,omitempty"`
3240 * Capabilities specific to the `textDocument/documentHighlight`
3242 DocumentHighlight DocumentHighlightClientCapabilities `json:"documentHighlight,omitempty"`
3244 * Capabilities specific to the `textDocument/documentSymbol`
3246 DocumentSymbol DocumentSymbolClientCapabilities `json:"documentSymbol,omitempty"`
3248 * Capabilities specific to the `textDocument/codeAction`
3250 CodeAction CodeActionClientCapabilities `json:"codeAction,omitempty"`
3252 * Capabilities specific to the `textDocument/codeLens`
3254 CodeLens CodeLensClientCapabilities `json:"codeLens,omitempty"`
3256 * Capabilities specific to the `textDocument/documentLink`
3258 DocumentLink DocumentLinkClientCapabilities `json:"documentLink,omitempty"`
3260 * Capabilities specific to the `textDocument/documentColor`
3262 ColorProvider DocumentColorClientCapabilities `json:"colorProvider,omitempty"`
3264 * Capabilities specific to the `textDocument/formatting`
3266 Formatting DocumentFormattingClientCapabilities `json:"formatting,omitempty"`
3268 * Capabilities specific to the `textDocument/rangeFormatting`
3270 RangeFormatting DocumentRangeFormattingClientCapabilities `json:"rangeFormatting,omitempty"`
3272 * Capabilities specific to the `textDocument/onTypeFormatting`
3274 OnTypeFormatting DocumentOnTypeFormattingClientCapabilities `json:"onTypeFormatting,omitempty"`
3276 * Capabilities specific to the `textDocument/rename`
3278 Rename RenameClientCapabilities `json:"rename,omitempty"`
3280 * Capabilities specific to `textDocument/foldingRange` requests.
3284 FoldingRange FoldingRangeClientCapabilities `json:"foldingRange,omitempty"`
3286 * Capabilities specific to `textDocument/selectionRange` requests
3290 SelectionRange SelectionRangeClientCapabilities `json:"selectionRange,omitempty"`
3292 * Capabilities specific to `textDocument/publishDiagnostics`.
3294 PublishDiagnostics PublishDiagnosticsClientCapabilities `json:"publishDiagnostics,omitempty"`
3296 * Capabilities specific to the `textDocument/callHierarchy`.
3300 CallHierarchy CallHierarchyClientCapabilities `json:"callHierarchy,omitempty"`
3302 // missing in source, generated
3303 SemanticTokens *SemanticTokensClientCapabilities `json:"semanticTokens,omitempty"`
3307 * An event describing a change to a text document. If range and rangeLength are omitted
3308 * the new text is considered to be the full content of the document.
3310 type TextDocumentContentChangeEvent = struct {
3312 * The range of the document that changed.
3314 Range *Range `json:"range,omitempty"`
3316 * The optional length of the range that got replaced.
3318 * @deprecated use range instead.
3320 RangeLength float64 `json:"rangeLength,omitempty"`
3322 * The new text for the provided range.
3324 Text string `json:"text"`
3328 * Describes textual changes on a text document. A TextDocumentEdit describes all changes
3329 * on a document version Si and after they are applied move the document to version Si+1.
3330 * So the creator of a TextDocumentEdit doesn't need to sort the array of edits or do any
3331 * kind of ordering. However the edits must be non overlapping.
3333 type TextDocumentEdit struct {
3335 * The text document to change.
3337 TextDocument VersionedTextDocumentIdentifier `json:"textDocument"`
3339 * The edits to be applied.
3341 Edits []TextEdit `json:"edits"`
3345 * A literal to identify a text document in the client.
3347 type TextDocumentIdentifier struct {
3349 * The text document's uri.
3351 URI DocumentURI `json:"uri"`
3355 * An item to transfer a text document from the client to the
3358 type TextDocumentItem struct {
3360 * The text document's uri.
3362 URI DocumentURI `json:"uri"`
3364 * The text document's language identifier
3366 LanguageID string `json:"languageId"`
3368 * The version number of this document (it will increase after each
3369 * change, including undo/redo).
3371 Version float64 `json:"version"`
3373 * The content of the opened text document.
3375 Text string `json:"text"`
3379 * A parameter literal used in requests to pass a text document and a position inside that
3382 type TextDocumentPositionParams struct {
3384 * The text document.
3386 TextDocument TextDocumentIdentifier `json:"textDocument"`
3388 * The position inside the text document.
3390 Position Position `json:"position"`
3394 * General text document registration options.
3396 type TextDocumentRegistrationOptions struct {
3398 * A document selector to identify the scope of the registration. If set to null
3399 * the document selector provided on the client side will be used.
3401 DocumentSelector DocumentSelector /*DocumentSelector | null*/ `json:"documentSelector"`
3405 * Represents reasons why a text document is saved.
3407 type TextDocumentSaveReason float64
3409 type TextDocumentSyncClientCapabilities struct {
3411 * Whether text document synchronization supports dynamic registration.
3413 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
3415 * The client supports sending will save notifications.
3417 WillSave bool `json:"willSave,omitempty"`
3419 * The client supports sending a will save request and
3420 * waits for a response providing text edits which will
3421 * be applied to the document before it is saved.
3423 WillSaveWaitUntil bool `json:"willSaveWaitUntil,omitempty"`
3425 * The client supports did save notifications.
3427 DidSave bool `json:"didSave,omitempty"`
3431 * Defines how the host (editor) should sync
3432 * document changes to the language server.
3434 type TextDocumentSyncKind float64
3436 type TextDocumentSyncOptions struct {
3438 * Open and close notifications are sent to the server. If omitted open close notification should not
3441 OpenClose bool `json:"openClose,omitempty"`
3443 * Change notifications are sent to the server. See TextDocumentSyncKind.None, TextDocumentSyncKind.Full
3444 * and TextDocumentSyncKind.Incremental. If omitted it defaults to TextDocumentSyncKind.None.
3446 Change TextDocumentSyncKind `json:"change,omitempty"`
3448 * If present will save notifications are sent to the server. If omitted the notification should not be
3451 WillSave bool `json:"willSave,omitempty"`
3453 * If present will save wait until requests are sent to the server. If omitted the request should not be
3456 WillSaveWaitUntil bool `json:"willSaveWaitUntil,omitempty"`
3458 * If present save notifications are sent to the server. If omitted the notification should not be
3461 Save SaveOptions/*boolean | SaveOptions*/ `json:"save,omitempty"`
3465 * A text edit applicable to a text document.
3467 type TextEdit struct {
3469 * The range of the text document to be manipulated. To insert
3470 * text into a document create a range where start === end.
3472 Range Range `json:"range"`
3474 * The string to be inserted. For delete operations use an
3477 NewText string `json:"newText"`
3480 type TraceValues = string /*'off' | 'messages' | 'verbose'*/
3485 type TypeDefinitionClientCapabilities struct {
3487 * Whether implementation supports dynamic registration. If this is set to `true`
3488 * the client supports the new `TypeDefinitionRegistrationOptions` return value
3489 * for the corresponding server capability as well.
3491 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
3493 * The client supports additional metadata in the form of definition links.
3497 LinkSupport bool `json:"linkSupport,omitempty"`
3500 type TypeDefinitionOptions struct {
3501 WorkDoneProgressOptions
3504 type TypeDefinitionParams struct {
3505 TextDocumentPositionParams
3506 WorkDoneProgressParams
3510 type TypeDefinitionRegistrationOptions struct {
3511 TextDocumentRegistrationOptions
3512 TypeDefinitionOptions
3513 StaticRegistrationOptions
3517 * A tagging type for string properties that are actually URIs
3519 * @since 3.16.0 - Proposed state
3524 * General parameters to unregister a request or notification.
3526 type Unregistration struct {
3528 * The id used to unregister the request or notification. Usually an id
3529 * provided during the register request.
3531 ID string `json:"id"`
3533 * The method to unregister for.
3535 Method string `json:"method"`
3538 type UnregistrationParams struct {
3539 Unregisterations []Unregistration `json:"unregisterations"`
3543 * An identifier to denote a specific version of a text document.
3545 type VersionedTextDocumentIdentifier struct {
3547 * The version number of this document. If a versioned text document identifier
3548 * is sent from the server to the client and the file is not open in the editor
3549 * (the server has not received an open notification before) the server can send
3550 * `null` to indicate that the version is unknown and the content on disk is the
3551 * truth (as speced with document content ownership).
3553 Version float64/*number | null*/ `json:"version"`
3554 TextDocumentIdentifier
3557 type WatchKind float64
3560 * The parameters send in a will save text document notification.
3562 type WillSaveTextDocumentParams struct {
3564 * The document that will be saved.
3566 TextDocument TextDocumentIdentifier `json:"textDocument"`
3568 * The 'TextDocumentSaveReason'.
3570 Reason TextDocumentSaveReason `json:"reason"`
3573 type WorkDoneProgressBegin struct {
3574 Kind string `json:"kind"`
3576 * Mandatory title of the progress operation. Used to briefly inform about
3577 * the kind of operation being performed.
3579 * Examples: "Indexing" or "Linking dependencies".
3581 Title string `json:"title"`
3583 * Controls if a cancel button should show to allow the user to cancel the
3584 * long running operation. Clients that don't support cancellation are allowed
3585 * to ignore the setting.
3587 Cancellable bool `json:"cancellable,omitempty"`
3589 * Optional, more detailed associated progress message. Contains
3590 * complementary information to the `title`.
3592 * Examples: "3/25 files", "project/src/module2", "node_modules/some_dep".
3593 * If unset, the previous progress message (if any) is still valid.
3595 Message string `json:"message,omitempty"`
3597 * Optional progress percentage to display (value 100 is considered 100%).
3598 * If not provided infinite progress is assumed and clients are allowed
3599 * to ignore the `percentage` value in subsequent in report notifications.
3601 * The value should be steadily rising. Clients are free to ignore values
3602 * that are not following this rule.
3604 Percentage float64 `json:"percentage,omitempty"`
3607 type WorkDoneProgressCancelParams struct {
3609 * The token to be used to report progress.
3611 Token ProgressToken `json:"token"`
3614 type WorkDoneProgressClientCapabilities struct {
3616 * Window specific client capabilities.
3620 * Whether client supports handling progress notifications. If set servers are allowed to
3621 * report in `workDoneProgress` property in the request specific server capabilities.
3625 WorkDoneProgress bool `json:"workDoneProgress,omitempty"`
3626 } `json:"window,omitempty"`
3629 type WorkDoneProgressCreateParams struct {
3631 * The token to be used to report progress.
3633 Token ProgressToken `json:"token"`
3636 type WorkDoneProgressEnd struct {
3637 Kind string `json:"kind"`
3639 * Optional, a final message indicating to for example indicate the outcome
3642 Message string `json:"message,omitempty"`
3645 type WorkDoneProgressOptions struct {
3646 WorkDoneProgress bool `json:"workDoneProgress,omitempty"`
3649 type WorkDoneProgressParams struct {
3651 * An optional token that a server can use to report work done progress.
3653 WorkDoneToken ProgressToken `json:"workDoneToken,omitempty"`
3656 type WorkDoneProgressReport struct {
3657 Kind string `json:"kind"`
3659 * Controls enablement state of a cancel button.
3661 * Clients that don't support cancellation or don't support controlling the button's
3662 * enablement state are allowed to ignore the property.
3664 Cancellable bool `json:"cancellable,omitempty"`
3666 * Optional, more detailed associated progress message. Contains
3667 * complementary information to the `title`.
3669 * Examples: "3/25 files", "project/src/module2", "node_modules/some_dep".
3670 * If unset, the previous progress message (if any) is still valid.
3672 Message string `json:"message,omitempty"`
3674 * Optional progress percentage to display (value 100 is considered 100%).
3675 * If not provided infinite progress is assumed and clients are allowed
3676 * to ignore the `percentage` value in subsequent in report notifications.
3678 * The value should be steadily rising. Clients are free to ignore values
3679 * that are not following this rule.
3681 Percentage float64 `json:"percentage,omitempty"`
3685 * Workspace specific client capabilities.
3687 type WorkspaceClientCapabilities struct {
3689 * The client supports applying batch edits
3690 * to the workspace by supporting the request
3691 * 'workspace/applyEdit'
3693 ApplyEdit bool `json:"applyEdit,omitempty"`
3695 * Capabilities specific to `WorkspaceEdit`s
3697 WorkspaceEdit WorkspaceEditClientCapabilities `json:"workspaceEdit,omitempty"`
3699 * Capabilities specific to the `workspace/didChangeConfiguration` notification.
3701 DidChangeConfiguration DidChangeConfigurationClientCapabilities `json:"didChangeConfiguration,omitempty"`
3703 * Capabilities specific to the `workspace/didChangeWatchedFiles` notification.
3705 DidChangeWatchedFiles DidChangeWatchedFilesClientCapabilities `json:"didChangeWatchedFiles,omitempty"`
3707 * Capabilities specific to the `workspace/symbol` request.
3709 Symbol WorkspaceSymbolClientCapabilities `json:"symbol,omitempty"`
3711 * Capabilities specific to the `workspace/executeCommand` request.
3713 ExecuteCommand ExecuteCommandClientCapabilities `json:"executeCommand,omitempty"`
3717 * A workspace edit represents changes to many resources managed in the workspace. The edit
3718 * should either provide `changes` or `documentChanges`. If documentChanges are present
3719 * they are preferred over `changes` if the client can handle versioned document edits.
3721 type WorkspaceEdit struct {
3723 * Holds changes to existing resources.
3725 Changes map[string][]TextEdit `json:"changes,omitempty"`
3727 * Depending on the client capability `workspace.workspaceEdit.resourceOperations` document changes
3728 * are either an array of `TextDocumentEdit`s to express changes to n different text documents
3729 * where each text document edit addresses a specific version of a text document. Or it can contain
3730 * above `TextDocumentEdit`s mixed with create, rename and delete file / folder operations.
3732 * Whether a client supports versioned document edits is expressed via
3733 * `workspace.workspaceEdit.documentChanges` client capability.
3735 * If a client neither supports `documentChanges` nor `workspace.workspaceEdit.resourceOperations` then
3736 * only plain `TextEdit`s using the `changes` property are supported.
3738 DocumentChanges []TextDocumentEdit/*TextDocumentEdit | CreateFile | RenameFile | DeleteFile*/ `json:"documentChanges,omitempty"`
3741 type WorkspaceEditClientCapabilities struct {
3743 * The client supports versioned document changes in `WorkspaceEdit`s
3745 DocumentChanges bool `json:"documentChanges,omitempty"`
3747 * The resource operations the client supports. Clients should at least
3748 * support 'create', 'rename' and 'delete' files and folders.
3752 ResourceOperations []ResourceOperationKind `json:"resourceOperations,omitempty"`
3754 * The failure handling strategy of a client if applying the workspace edit
3759 FailureHandling FailureHandlingKind `json:"failureHandling,omitempty"`
3762 type WorkspaceFolder struct {
3764 * The associated URI for this workspace folder.
3766 URI string `json:"uri"`
3768 * The name of the workspace folder. Used to refer to this
3769 * workspace folder in the user interface.
3771 Name string `json:"name"`
3775 * The workspace folder change event.
3777 type WorkspaceFoldersChangeEvent struct {
3779 * The array of added workspace folders
3781 Added []WorkspaceFolder `json:"added"`
3783 * The array of the removed workspace folders
3785 Removed []WorkspaceFolder `json:"removed"`
3788 type WorkspaceFoldersClientCapabilities struct {
3790 * The workspace client capabilities
3792 Workspace WorkspaceGn `json:"workspace,omitempty"`
3795 type WorkspaceFoldersInitializeParams struct {
3797 * The actual configured workspace folders.
3799 WorkspaceFolders []WorkspaceFolder /*WorkspaceFolder[] | null*/ `json:"workspaceFolders"`
3802 type WorkspaceFoldersServerCapabilities struct {
3804 * The workspace server capabilities
3806 Workspace WorkspaceGn `json:"workspace,omitempty"`
3810 * Client capabilities for a [WorkspaceSymbolRequest](#WorkspaceSymbolRequest).
3812 type WorkspaceSymbolClientCapabilities struct {
3814 * Symbol request supports dynamic registration.
3816 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
3818 * Specific capabilities for the `SymbolKind` in the `workspace/symbol` request.
3822 * The symbol kind values the client supports. When this
3823 * property exists the client also guarantees that it will
3824 * handle values outside its set gracefully and falls back
3825 * to a default value when unknown.
3827 * If this property is not present the client only supports
3828 * the symbol kinds from `File` to `Array` as defined in
3829 * the initial version of the protocol.
3831 ValueSet []SymbolKind `json:"valueSet,omitempty"`
3832 } `json:"symbolKind,omitempty"`
3834 * The client supports tags on `SymbolInformation`.
3835 * Clients supporting tags have to handle unknown tags gracefully.
3837 * @since 3.16.0 - Proposed state
3841 * The tags supported by the client.
3843 ValueSet []SymbolTag `json:"valueSet"`
3844 } `json:"tagSupport,omitempty"`
3848 * Server capabilities for a [WorkspaceSymbolRequest](#WorkspaceSymbolRequest).
3850 type WorkspaceSymbolOptions struct {
3851 WorkDoneProgressOptions
3855 * The parameters of a [WorkspaceSymbolRequest](#WorkspaceSymbolRequest).
3857 type WorkspaceSymbolParams struct {
3859 * A query string to filter symbols by. Clients may send an empty
3860 * string here to request all symbols.
3862 Query string `json:"query"`
3863 WorkDoneProgressParams
3868 type SemanticTokensClientCapabilities struct {
3869 TokenModifiers []string
3877 DynamicRegistration bool
3886 Empty CodeActionKind = ""
3888 * Base kind for quickfix actions: 'quickfix'
3891 QuickFix CodeActionKind = "quickfix"
3893 * Base kind for refactoring actions: 'refactor'
3896 Refactor CodeActionKind = "refactor"
3898 * Base kind for refactoring extraction actions: 'refactor.extract'
3900 * Example extract actions:
3903 * - Extract function
3904 * - Extract variable
3905 * - Extract interface from class
3909 RefactorExtract CodeActionKind = "refactor.extract"
3911 * Base kind for refactoring inline actions: 'refactor.inline'
3913 * Example inline actions:
3921 RefactorInline CodeActionKind = "refactor.inline"
3923 * Base kind for refactoring rewrite actions: 'refactor.rewrite'
3925 * Example rewrite actions:
3927 * - Convert JavaScript function to class
3928 * - Add or remove parameter
3929 * - Encapsulate field
3930 * - Make method static
3931 * - Move method to base class
3935 RefactorRewrite CodeActionKind = "refactor.rewrite"
3937 * Base kind for source actions: `source`
3939 * Source code actions apply to the entire file.
3942 Source CodeActionKind = "source"
3944 * Base kind for an organize imports source action: `source.organizeImports`
3947 SourceOrganizeImports CodeActionKind = "source.organizeImports"
3949 * Base kind for auto-fix source actions: `source.fixAll`.
3951 * Fix all actions automatically fix errors that have a clear fix that do not require user input.
3952 * They should not suppress errors or perform unsafe fixes such as generating new types or classes.
3957 SourceFixAll CodeActionKind = "source.fixAll"
3958 TextCompletion CompletionItemKind = 1
3959 MethodCompletion CompletionItemKind = 2
3960 FunctionCompletion CompletionItemKind = 3
3961 ConstructorCompletion CompletionItemKind = 4
3962 FieldCompletion CompletionItemKind = 5
3963 VariableCompletion CompletionItemKind = 6
3964 ClassCompletion CompletionItemKind = 7
3965 InterfaceCompletion CompletionItemKind = 8
3966 ModuleCompletion CompletionItemKind = 9
3967 PropertyCompletion CompletionItemKind = 10
3968 UnitCompletion CompletionItemKind = 11
3969 ValueCompletion CompletionItemKind = 12
3970 EnumCompletion CompletionItemKind = 13
3971 KeywordCompletion CompletionItemKind = 14
3972 SnippetCompletion CompletionItemKind = 15
3973 ColorCompletion CompletionItemKind = 16
3974 FileCompletion CompletionItemKind = 17
3975 ReferenceCompletion CompletionItemKind = 18
3976 FolderCompletion CompletionItemKind = 19
3977 EnumMemberCompletion CompletionItemKind = 20
3978 ConstantCompletion CompletionItemKind = 21
3979 StructCompletion CompletionItemKind = 22
3980 EventCompletion CompletionItemKind = 23
3981 OperatorCompletion CompletionItemKind = 24
3982 TypeParameterCompletion CompletionItemKind = 25
3984 * Render a completion as obsolete, usually using a strike-out.
3987 ComplDeprecated CompletionItemTag = 1
3989 * Completion was triggered by typing an identifier (24x7 code
3990 * complete), manual invocation (e.g Ctrl+Space) or via API.
3993 Invoked CompletionTriggerKind = 1
3995 * Completion was triggered by a trigger character specified by
3996 * the `triggerCharacters` properties of the `CompletionRegistrationOptions`.
3999 TriggerCharacter CompletionTriggerKind = 2
4001 * Completion was re-triggered as current completion list is incomplete
4004 TriggerForIncompleteCompletions CompletionTriggerKind = 3
4009 SeverityError DiagnosticSeverity = 1
4011 * Reports a warning.
4014 SeverityWarning DiagnosticSeverity = 2
4016 * Reports an information.
4019 SeverityInformation DiagnosticSeverity = 3
4024 SeverityHint DiagnosticSeverity = 4
4026 * Unused or unnecessary code.
4028 * Clients are allowed to render diagnostics with this tag faded out instead of having
4029 * an error squiggle.
4032 Unnecessary DiagnosticTag = 1
4034 * Deprecated or obsolete code.
4036 * Clients are allowed to rendered diagnostics with this tag strike through.
4039 Deprecated DiagnosticTag = 2
4041 * A textual occurrence.
4044 Text DocumentHighlightKind = 1
4046 * Read-access of a symbol, like reading a variable.
4049 Read DocumentHighlightKind = 2
4051 * Write-access of a symbol, like writing to a variable.
4054 Write DocumentHighlightKind = 3
4056 * Applying the workspace change is simply aborted if one of the changes provided
4057 * fails. All operations executed before the failing operation stay executed.
4060 Abort FailureHandlingKind = "abort"
4062 * All operations are executed transactional. That means they either all
4063 * succeed or no changes at all are applied to the workspace.
4066 Transactional FailureHandlingKind = "transactional"
4068 * If the workspace edit contains only textual file changes they are executed transactional.
4069 * If resource changes (create, rename or delete file) are part of the change the failure
4070 * handling startegy is abort.
4073 TextOnlyTransactional FailureHandlingKind = "textOnlyTransactional"
4075 * The client tries to undo the operations already executed. But there is no
4076 * guarantee that this is succeeding.
4079 Undo FailureHandlingKind = "undo"
4081 * The file got created.
4084 Created FileChangeType = 1
4086 * The file got changed.
4089 Changed FileChangeType = 2
4091 * The file got deleted.
4094 Deleted FileChangeType = 3
4096 * Folding range for a comment
4098 Comment FoldingRangeKind = "comment"
4100 * Folding range for a imports or includes
4102 Imports FoldingRangeKind = "imports"
4104 * Folding range for a region (e.g. `#region`)
4106 Region FoldingRangeKind = "region"
4108 * If the protocol version provided by the client can't be handled by the server.
4109 * @deprecated This initialize error got replaced by client capabilities. There is
4110 * no version handshake in version 3.0x
4113 UnknownProtocolVersion InitializeError = 1
4115 * The primary text to be inserted is treated as a plain string.
4118 PlainTextTextFormat InsertTextFormat = 1
4120 * The primary text to be inserted is treated as a snippet.
4122 * A snippet can define tab stops and placeholders with `$1`, `$2`
4123 * and `${3:foo}`. `$0` defines the final tab stop, it defaults to
4124 * the end of the snippet. Placeholders with equal identifiers are linked,
4125 * that is typing in one will update others too.
4127 * See also: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#snippet_syntax
4130 SnippetTextFormat InsertTextFormat = 2
4132 * Plain text is supported as a content format
4135 PlainText MarkupKind = "plaintext"
4137 * Markdown is supported as a content format
4140 Markdown MarkupKind = "markdown"
4145 Error MessageType = 1
4147 * A warning message.
4150 Warning MessageType = 2
4152 * An information message.
4155 Info MessageType = 3
4162 * Supports creating new files and folders.
4165 Create ResourceOperationKind = "create"
4167 * Supports renaming existing files and folders.
4170 Rename ResourceOperationKind = "rename"
4172 * Supports deleting existing files and folders.
4175 Delete ResourceOperationKind = "delete"
4177 * Signature help was invoked manually by the user or by a command.
4180 SigInvoked SignatureHelpTriggerKind = 1
4182 * Signature help was triggered by a trigger character.
4185 SigTriggerCharacter SignatureHelpTriggerKind = 2
4187 * Signature help was triggered by the cursor moving or by the document content changing.
4190 SigContentChange SignatureHelpTriggerKind = 3
4192 Module SymbolKind = 2
4193 Namespace SymbolKind = 3
4194 Package SymbolKind = 4
4195 Class SymbolKind = 5
4196 Method SymbolKind = 6
4197 Property SymbolKind = 7
4198 Field SymbolKind = 8
4199 Constructor SymbolKind = 9
4200 Enum SymbolKind = 10
4201 Interface SymbolKind = 11
4202 Function SymbolKind = 12
4203 Variable SymbolKind = 13
4204 Constant SymbolKind = 14
4205 String SymbolKind = 15
4206 Number SymbolKind = 16
4207 Boolean SymbolKind = 17
4208 Array SymbolKind = 18
4209 Object SymbolKind = 19
4211 Null SymbolKind = 21
4212 EnumMember SymbolKind = 22
4213 Struct SymbolKind = 23
4214 Event SymbolKind = 24
4215 Operator SymbolKind = 25
4216 TypeParameter SymbolKind = 26
4218 * Render a symbol as obsolete, usually using a strike-out.
4221 DeprecatedSymbol SymbolTag = 1
4223 * Manually triggered, e.g. by the user pressing save, by starting debugging,
4224 * or by an API call.
4227 Manual TextDocumentSaveReason = 1
4229 * Automatic after a delay.
4232 AfterDelay TextDocumentSaveReason = 2
4234 * When the editor lost focus.
4237 FocusOut TextDocumentSaveReason = 3
4239 * Documents should not be synced at all.
4242 None TextDocumentSyncKind = 0
4244 * Documents are synced by always sending the full content
4248 Full TextDocumentSyncKind = 1
4250 * Documents are synced by sending the full content on open.
4251 * After that only incremental updates to the document are
4255 Incremental TextDocumentSyncKind = 2
4257 * Interested in create events.
4260 WatchCreate WatchKind = 1
4262 * Interested in change events
4265 WatchChange WatchKind = 2
4267 * Interested in delete events
4270 WatchDelete WatchKind = 4
4273 // Types created to name formal parameters and embedded structs
4274 type ParamConfiguration struct {
4278 type ParamInitialize struct {
4280 WorkDoneProgressParams
4282 type WorkspaceGn struct {
4283 WorkspaceFolders WorkspaceFoldersGn `json:"workspaceFolders,omitempty"`
4285 type WorkspaceFoldersGn struct {
4287 * The Server has support for workspace folders
4289 Supported bool `json:"supported,omitempty"`
4292 * Whether the server wants to receive workspace folder
4293 * change notifications.
4295 * If a strings is provided the string is treated as a ID
4296 * under which the notification is registed on the client
4297 * side. The ID can be used to unregister for these events
4298 * using the `client/unregisterCapability` request.
4300 ChangeNotifications string/*string | boolean*/ `json:"changeNotifications,omitempty"`