1 // Copyright 2019 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
5 // Package protocol contains data types and code for LSP jsonrpcs
6 // generated automatically from vscode-languageserver-node
7 // commit: dae62de921d25964e8732411ca09e532dde992f5
8 // last fetched Thu Feb 04 2021 11:11:02 GMT-0500 (Eastern Standard Time)
11 // Code generated (see typescript/README.md) DO NOT EDIT.
13 import "encoding/json"
16 * A special text edit with an additional change annotation.
20 type AnnotatedTextEdit struct {
22 * The actual identifier of the change annotation
24 AnnotationID ChangeAnnotationIdentifier `json:"annotationId"`
29 * The parameters passed via a apply workspace edit request.
31 type ApplyWorkspaceEditParams struct {
33 * An optional label of the workspace edit. This label is
34 * presented in the user interface for example on an undo
35 * stack to undo the workspace edit.
37 Label string `json:"label,omitempty"`
41 Edit WorkspaceEdit `json:"edit"`
45 * A response returned from the apply workspace edit request.
47 type ApplyWorkspaceEditResponse struct {
49 * Indicates whether the edit was applied or not.
51 Applied bool `json:"applied"`
53 * An optional textual description for why the edit was not applied.
54 * This may be used by the server for diagnostic logging or to provide
55 * a suitable error for a request that triggered the edit.
57 FailureReason string `json:"failureReason,omitempty"`
59 * Depending on the client's failure handling strategy `failedChange` might
60 * contain the index of the change that failed. This property is only available
61 * if the client signals a `failureHandlingStrategy` in its client capabilities.
63 FailedChange uint32 `json:"failedChange,omitempty"`
69 type CallHierarchyClientCapabilities struct {
71 * Whether implementation supports dynamic registration. If this is set to `true`
72 * the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`
73 * return value for the corresponding server capability as well.
75 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
79 * Represents an incoming call, e.g. a caller of a method or constructor.
83 type CallHierarchyIncomingCall struct {
85 * The item that makes the call.
87 From CallHierarchyItem `json:"from"`
89 * The ranges at which the calls appear. This is relative to the caller
90 * denoted by [`this.from`](#CallHierarchyIncomingCall.from).
92 FromRanges []Range `json:"fromRanges"`
96 * The parameter of a `callHierarchy/incomingCalls` request.
100 type CallHierarchyIncomingCallsParams struct {
101 Item CallHierarchyItem `json:"item"`
102 WorkDoneProgressParams
107 * Represents programming constructs like functions or constructors in the context
112 type CallHierarchyItem struct {
114 * The name of this item.
116 Name string `json:"name"`
118 * The kind of this item.
120 Kind SymbolKind `json:"kind"`
122 * Tags for this item.
124 Tags []SymbolTag `json:"tags,omitempty"`
126 * More detail for this item, e.g. the signature of a function.
128 Detail string `json:"detail,omitempty"`
130 * The resource identifier of this item.
132 URI DocumentURI `json:"uri"`
134 * The range enclosing this symbol not including leading/trailing whitespace but everything else, e.g. comments and code.
136 Range Range `json:"range"`
138 * The range that should be selected and revealed when this symbol is being picked, e.g. the name of a function.
139 * Must be contained by the [`range`](#CallHierarchyItem.range).
141 SelectionRange Range `json:"selectionRange"`
143 * A data entry field that is preserved between a call hierarchy prepare and
144 * incoming calls or outgoing calls requests.
146 Data interface{} `json:"data,omitempty"`
150 * Call hierarchy options used during static registration.
154 type CallHierarchyOptions struct {
155 WorkDoneProgressOptions
159 * Represents an outgoing call, e.g. calling a getter from a method or a method from a constructor etc.
163 type CallHierarchyOutgoingCall struct {
165 * The item that is called.
167 To CallHierarchyItem `json:"to"`
169 * The range at which this item is called. This is the range relative to the caller, e.g the item
170 * passed to [`provideCallHierarchyOutgoingCalls`](#CallHierarchyItemProvider.provideCallHierarchyOutgoingCalls)
171 * and not [`this.to`](#CallHierarchyOutgoingCall.to).
173 FromRanges []Range `json:"fromRanges"`
177 * The parameter of a `callHierarchy/outgoingCalls` request.
181 type CallHierarchyOutgoingCallsParams struct {
182 Item CallHierarchyItem `json:"item"`
183 WorkDoneProgressParams
188 * The parameter of a `textDocument/prepareCallHierarchy` request.
192 type CallHierarchyPrepareParams struct {
193 TextDocumentPositionParams
194 WorkDoneProgressParams
198 * Call hierarchy options used during static or dynamic registration.
202 type CallHierarchyRegistrationOptions struct {
203 TextDocumentRegistrationOptions
205 StaticRegistrationOptions
208 type CancelParams struct {
210 * The request id to cancel.
212 ID interface{} /*number | string*/ `json:"id"`
216 * Additional information that describes document changes.
220 type ChangeAnnotation struct {
222 * A human-readable string describing the actual change. The string
223 * is rendered prominent in the user interface.
225 Label string `json:"label"`
227 * A flag which indicates that user confirmation is needed
228 * before applying the change.
230 NeedsConfirmation bool `json:"needsConfirmation,omitempty"`
232 * A human-readable string which is rendered less prominent in
233 * the user interface.
235 Description string `json:"description,omitempty"`
239 * An identifier to refer to a change annotation stored with a workspace edit.
241 type ChangeAnnotationIdentifier = string
243 type ClientCapabilities struct {
245 * The workspace client capabilities
247 Workspace Workspace2Gn `json:"workspace,omitempty"`
249 * Text document specific client capabilities.
251 TextDocument TextDocumentClientCapabilities `json:"textDocument,omitempty"`
253 * Window specific client capabilities.
257 * Whether client supports server initiated progress using the
258 * `window/workDoneProgress/create` request.
262 WorkDoneProgress bool `json:"workDoneProgress,omitempty"`
264 * Capabilities specific to the showMessage request.
268 ShowMessage ShowMessageRequestClientCapabilities `json:"showMessage,omitempty"`
270 * Capabilities specific to the showDocument request.
274 ShowDocument ShowDocumentClientCapabilities `json:"showDocument,omitempty"`
275 } `json:"window,omitempty"`
277 * General client capabilities.
281 General GeneralClientCapabilities `json:"general,omitempty"`
283 * Experimental client capabilities.
285 Experimental interface{} `json:"experimental,omitempty"`
289 * A code action represents a change that can be performed in code, e.g. to fix a problem or
292 * A CodeAction must set either `edit` and/or a `command`. If both are supplied, the `edit` is applied first, then the `command` is executed.
294 type CodeAction struct {
296 * A short, human-readable, title for this code action.
298 Title string `json:"title"`
300 * The kind of the code action.
302 * Used to filter code actions.
304 Kind CodeActionKind `json:"kind,omitempty"`
306 * The diagnostics that this code action resolves.
308 Diagnostics []Diagnostic `json:"diagnostics,omitempty"`
310 * Marks this as a preferred action. Preferred actions are used by the `auto fix` command and can be targeted
313 * A quick fix should be marked preferred if it properly addresses the underlying error.
314 * A refactoring should be marked preferred if it is the most reasonable choice of actions to take.
318 IsPreferred bool `json:"isPreferred,omitempty"`
320 * Marks that the code action cannot currently be applied.
322 * Clients should follow the following guidelines regarding disabled code actions:
324 * - Disabled code actions are not shown in automatic [lightbulb](https://code.visualstudio.com/docs/editor/editingevolved#_code-action)
327 * - Disabled actions are shown as faded out in the code action menu when the user request a more specific type
328 * of code action, such as refactorings.
330 * - If the user has a [keybinding](https://code.visualstudio.com/docs/editor/refactoring#_keybindings-for-code-actions)
331 * that auto applies a code action and only a disabled code actions are returned, the client should show the user an
332 * error message with `reason` in the editor.
338 * Human readable description of why the code action is currently disabled.
340 * This is displayed in the code actions UI.
342 Reason string `json:"reason"`
343 } `json:"disabled,omitempty"`
345 * The workspace edit this code action performs.
347 Edit WorkspaceEdit `json:"edit,omitempty"`
349 * A command this code action executes. If a code action
350 * provides a edit and a command, first the edit is
351 * executed and then the command.
353 Command *Command `json:"command,omitempty"`
355 * A data entry field that is preserved on a code action between
356 * a `textDocument/codeAction` and a `codeAction/resolve` request.
360 Data interface{} `json:"data,omitempty"`
364 * The Client Capabilities of a [CodeActionRequest](#CodeActionRequest).
366 type CodeActionClientCapabilities struct {
368 * Whether code action supports dynamic registration.
370 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
372 * The client support code action literals of type `CodeAction` as a valid
373 * response of the `textDocument/codeAction` request. If the property is not
374 * set the request can only return `Command` literals.
378 CodeActionLiteralSupport struct {
380 * The code action kind is support with the following value
383 CodeActionKind struct {
385 * The code action kind values the client supports. When this
386 * property exists the client also guarantees that it will
387 * handle values outside its set gracefully and falls back
388 * to a default value when unknown.
390 ValueSet []CodeActionKind `json:"valueSet"`
391 } `json:"codeActionKind"`
392 } `json:"codeActionLiteralSupport,omitempty"`
394 * Whether code action supports the `isPreferred` property.
398 IsPreferredSupport bool `json:"isPreferredSupport,omitempty"`
400 * Whether code action supports the `disabled` property.
404 DisabledSupport bool `json:"disabledSupport,omitempty"`
406 * Whether code action supports the `data` property which is
407 * preserved between a `textDocument/codeAction` and a
408 * `codeAction/resolve` request.
412 DataSupport bool `json:"dataSupport,omitempty"`
414 * Whether the client support resolving additional code action
415 * properties via a separate `codeAction/resolve` request.
419 ResolveSupport struct {
421 * The properties that a client can resolve lazily.
423 Properties []string `json:"properties"`
424 } `json:"resolveSupport,omitempty"`
426 * Whether th client honors the change annotations in
427 * text edits and resource operations returned via the
428 * `CodeAction#edit` property by for example presenting
429 * the workspace edit in the user interface and asking
434 HonorsChangeAnnotations bool `json:"honorsChangeAnnotations,omitempty"`
438 * Contains additional diagnostic information about the context in which
439 * a [code action](#CodeActionProvider.provideCodeActions) is run.
441 type CodeActionContext struct {
443 * An array of diagnostics known on the client side overlapping the range provided to the
444 * `textDocument/codeAction` request. They are provided so that the server knows which
445 * errors are currently presented to the user for the given range. There is no guarantee
446 * that these accurately reflect the error state of the resource. The primary parameter
447 * to compute code actions is the provided range.
449 Diagnostics []Diagnostic `json:"diagnostics"`
451 * Requested kind of actions to return.
453 * Actions not of this kind are filtered out by the client before being shown. So servers
454 * can omit computing them.
456 Only []CodeActionKind `json:"only,omitempty"`
460 * A set of predefined code action kinds
462 type CodeActionKind string
465 * Provider options for a [CodeActionRequest](#CodeActionRequest).
467 type CodeActionOptions struct {
469 * CodeActionKinds that this server may return.
471 * The list of kinds may be generic, such as `CodeActionKind.Refactor`, or the server
472 * may list out every specific kind they provide.
474 CodeActionKinds []CodeActionKind `json:"codeActionKinds,omitempty"`
476 * The server provides support to resolve additional
477 * information for a code action.
481 ResolveProvider bool `json:"resolveProvider,omitempty"`
482 WorkDoneProgressOptions
486 * The parameters of a [CodeActionRequest](#CodeActionRequest).
488 type CodeActionParams struct {
490 * The document in which the command was invoked.
492 TextDocument TextDocumentIdentifier `json:"textDocument"`
494 * The range for which the command was invoked.
496 Range Range `json:"range"`
498 * Context carrying additional information.
500 Context CodeActionContext `json:"context"`
501 WorkDoneProgressParams
506 * Structure to capture a description for an error code.
510 type CodeDescription struct {
512 * An URI to open with more information about the diagnostic error.
514 Href URI `json:"href"`
518 * A code lens represents a [command](#Command) that should be shown along with
519 * source text, like the number of references, a way to run tests, etc.
521 * A code lens is _unresolved_ when no command is associated to it. For performance
522 * reasons the creation of a code lens and resolving should be done to two stages.
524 type CodeLens struct {
526 * The range in which this code lens is valid. Should only span a single line.
528 Range Range `json:"range"`
530 * The command this code lens represents.
532 Command Command `json:"command,omitempty"`
534 * A data entry field that is preserved on a code lens item between
535 * a [CodeLensRequest](#CodeLensRequest) and a [CodeLensResolveRequest]
536 * (#CodeLensResolveRequest)
538 Data interface{} `json:"data,omitempty"`
542 * The client capabilities of a [CodeLensRequest](#CodeLensRequest).
544 type CodeLensClientCapabilities struct {
546 * Whether code lens supports dynamic registration.
548 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
552 * Code Lens provider options of a [CodeLensRequest](#CodeLensRequest).
554 type CodeLensOptions struct {
556 * Code lens has a resolve provider as well.
558 ResolveProvider bool `json:"resolveProvider,omitempty"`
559 WorkDoneProgressOptions
563 * The parameters of a [CodeLensRequest](#CodeLensRequest).
565 type CodeLensParams struct {
567 * The document to request code lens for.
569 TextDocument TextDocumentIdentifier `json:"textDocument"`
570 WorkDoneProgressParams
577 type CodeLensWorkspaceClientCapabilities struct {
579 * Whether the client implementation supports a refresh request sent from the
580 * server to the client.
582 * Note that this event is global and will force the client to refresh all
583 * code lenses currently shown. It should be used with absolute care and is
584 * useful for situation where a server for example detect a project wide
585 * change that requires such a calculation.
587 RefreshSupport bool `json:"refreshSupport,omitempty"`
591 * Represents a color in RGBA space.
595 * The red component of this color in the range [0-1].
597 Red Decimal `json:"red"`
599 * The green component of this color in the range [0-1].
601 Green Decimal `json:"green"`
603 * The blue component of this color in the range [0-1].
605 Blue Decimal `json:"blue"`
607 * The alpha component of this color in the range [0-1].
609 Alpha Decimal `json:"alpha"`
613 * Represents a color range from a document.
615 type ColorInformation struct {
617 * The range in the document where this color appears.
619 Range Range `json:"range"`
621 * The actual color value for this color range.
623 Color Color `json:"color"`
626 type ColorPresentation struct {
628 * The label of this color presentation. It will be shown on the color
629 * picker header. By default this is also the text that is inserted when selecting
630 * this color presentation.
632 Label string `json:"label"`
634 * An [edit](#TextEdit) which is applied to a document when selecting
635 * this presentation for the color. When `falsy` the [label](#ColorPresentation.label)
638 TextEdit TextEdit `json:"textEdit,omitempty"`
640 * An optional array of additional [text edits](#TextEdit) that are applied when
641 * selecting this color presentation. Edits must not overlap with the main [edit](#ColorPresentation.textEdit) nor with themselves.
643 AdditionalTextEdits []TextEdit `json:"additionalTextEdits,omitempty"`
647 * Parameters for a [ColorPresentationRequest](#ColorPresentationRequest).
649 type ColorPresentationParams struct {
653 TextDocument TextDocumentIdentifier `json:"textDocument"`
655 * The color to request presentations for.
657 Color Color `json:"color"`
659 * The range where the color would be inserted. Serves as a context.
661 Range Range `json:"range"`
662 WorkDoneProgressParams
667 * Represents a reference to a command. Provides a title which
668 * will be used to represent a command in the UI and, optionally,
669 * an array of arguments which will be passed to the command handler
670 * function when invoked.
672 type Command struct {
674 * Title of the command, like `save`.
676 Title string `json:"title"`
678 * The identifier of the actual command handler.
680 Command string `json:"command"`
682 * Arguments that the command handler should be
685 Arguments []json.RawMessage `json:"arguments,omitempty"`
689 * Completion client capabilities
691 type CompletionClientCapabilities struct {
693 * Whether completion supports dynamic registration.
695 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
697 * The client supports the following `CompletionItem` specific
700 CompletionItem struct {
702 * Client supports snippets as insert text.
704 * A snippet can define tab stops and placeholders with `$1`, `$2`
705 * and `${3:foo}`. `$0` defines the final tab stop, it defaults to
706 * the end of the snippet. Placeholders with equal identifiers are linked,
707 * that is typing in one will update others too.
709 SnippetSupport bool `json:"snippetSupport,omitempty"`
711 * Client supports commit characters on a completion item.
713 CommitCharactersSupport bool `json:"commitCharactersSupport,omitempty"`
715 * Client supports the follow content formats for the documentation
716 * property. The order describes the preferred format of the client.
718 DocumentationFormat []MarkupKind `json:"documentationFormat,omitempty"`
720 * Client supports the deprecated property on a completion item.
722 DeprecatedSupport bool `json:"deprecatedSupport,omitempty"`
724 * Client supports the preselect property on a completion item.
726 PreselectSupport bool `json:"preselectSupport,omitempty"`
728 * Client supports to kee
732 * Client supports the tag property on a completion item. Clients supporting
733 * tags have to handle unknown tags gracefully. Clients especially need to
734 * preserve unknown tags when sending a completion item back to the server in
741 * The tags supported by the client.
743 ValueSet []CompletionItemTag `json:"valueSet"`
744 } `json:"tagSupport,omitempty"`
746 * Client support insert replace edit to control different behavior if a
747 * completion item is inserted in the text or should replace text.
751 InsertReplaceSupport bool `json:"insertReplaceSupport,omitempty"`
753 * Indicates which properties a client can resolve lazily on a completion
754 * item. Before version 3.16.0 only the predefined properties `documentation`
755 * and `details` could be resolved lazily.
759 ResolveSupport struct {
761 * The properties that a client can resolve lazily.
763 Properties []string `json:"properties"`
764 } `json:"resolveSupport,omitempty"`
766 * The client supports the `insertTextMode` property on
767 * a completion item to override the whitespace handling mode
768 * as defined by the client (see `insertTextMode`).
772 InsertTextModeSupport struct {
773 ValueSet []InsertTextMode `json:"valueSet"`
774 } `json:"insertTextModeSupport,omitempty"`
775 } `json:"completionItem,omitempty"`
776 CompletionItemKind struct {
778 * The completion item kind values the client supports. When this
779 * property exists the client also guarantees that it will
780 * handle values outside its set gracefully and falls back
781 * to a default value when unknown.
783 * If this property is not present the client only supports
784 * the completion items kinds from `Text` to `Reference` as defined in
785 * the initial version of the protocol.
787 ValueSet []CompletionItemKind `json:"valueSet,omitempty"`
788 } `json:"completionItemKind,omitempty"`
790 * Defines how the client handles whitespace and indentation
791 * when accepting a completion item that uses multi line
792 * text in either `insertText` or `textEdit`.
796 InsertTextMode InsertTextMode `json:"insertTextMode,omitempty"`
798 * The client supports to send additional context information for a
799 * `textDocument/completion` request.
801 ContextSupport bool `json:"contextSupport,omitempty"`
805 * Contains additional information about the context in which a completion request is triggered.
807 type CompletionContext struct {
809 * How the completion was triggered.
811 TriggerKind CompletionTriggerKind `json:"triggerKind"`
813 * The trigger character (a single character) that has trigger code complete.
814 * Is undefined if `triggerKind !== CompletionTriggerKind.TriggerCharacter`
816 TriggerCharacter string `json:"triggerCharacter,omitempty"`
820 * A completion item represents a text snippet that is
821 * proposed to complete text that is being typed.
823 type CompletionItem struct {
825 * The label of this completion item. By default
826 * also the text that is inserted when selecting
829 Label string `json:"label"`
831 * The kind of this completion item. Based of the kind
832 * an icon is chosen by the editor.
834 Kind CompletionItemKind `json:"kind,omitempty"`
836 * Tags for this completion item.
840 Tags []CompletionItemTag `json:"tags,omitempty"`
842 * A human-readable string with additional information
843 * about this item, like type or symbol information.
845 Detail string `json:"detail,omitempty"`
847 * A human-readable string that represents a doc-comment.
849 Documentation string/*string | MarkupContent*/ `json:"documentation,omitempty"`
851 * Indicates if this item is deprecated.
852 * @deprecated Use `tags` instead.
854 Deprecated bool `json:"deprecated,omitempty"`
856 * Select this item when showing.
858 * *Note* that only one completion item can be selected and that the
859 * tool / client decides which item that is. The rule is that the *first*
860 * item of those that match best is selected.
862 Preselect bool `json:"preselect,omitempty"`
864 * A string that should be used when comparing this item
865 * with other items. When `falsy` the [label](#CompletionItem.label)
868 SortText string `json:"sortText,omitempty"`
870 * A string that should be used when filtering a set of
871 * completion items. When `falsy` the [label](#CompletionItem.label)
874 FilterText string `json:"filterText,omitempty"`
876 * A string that should be inserted into a document when selecting
877 * this completion. When `falsy` the [label](#CompletionItem.label)
880 * The `insertText` is subject to interpretation by the client side.
881 * Some tools might not take the string literally. For example
882 * VS Code when code complete is requested in this example `con<cursor position>`
883 * and a completion item with an `insertText` of `console` is provided it
884 * will only insert `sole`. Therefore it is recommended to use `textEdit` instead
885 * since it avoids additional client side interpretation.
887 InsertText string `json:"insertText,omitempty"`
889 * The format of the insert text. The format applies to both the `insertText` property
890 * and the `newText` property of a provided `textEdit`. If omitted defaults to
891 * `InsertTextFormat.PlainText`.
893 InsertTextFormat InsertTextFormat `json:"insertTextFormat,omitempty"`
895 * How whitespace and indentation is handled during completion
896 * item insertion. If ignored the clients default value depends on
897 * the `textDocument.completion.insertTextMode` client capability.
901 InsertTextMode InsertTextMode `json:"insertTextMode,omitempty"`
903 * An [edit](#TextEdit) which is applied to a document when selecting
904 * this completion. When an edit is provided the value of
905 * [insertText](#CompletionItem.insertText) is ignored.
907 * Most editors support two different operation when accepting a completion item. One is to insert a
908 * completion text and the other is to replace an existing text with a completion text. Since this can
909 * usually not predetermined by a server it can report both ranges. Clients need to signal support for
910 * `InsertReplaceEdits` via the `textDocument.completion.insertReplaceSupport` client capability
913 * *Note 1:* The text edit's range as well as both ranges from a insert replace edit must be a
914 * [single line] and they must contain the position at which completion has been requested.
915 * *Note 2:* If an `InsertReplaceEdit` is returned the edit's insert range must be a prefix of
916 * the edit's replace range, that means it must be contained and starting at the same position.
918 * @since 3.16.0 additional type `InsertReplaceEdit`
920 TextEdit *TextEdit/*TextEdit | InsertReplaceEdit*/ `json:"textEdit,omitempty"`
922 * An optional array of additional [text edits](#TextEdit) that are applied when
923 * selecting this completion. Edits must not overlap (including the same insert position)
924 * with the main [edit](#CompletionItem.textEdit) nor with themselves.
926 * Additional text edits should be used to change text unrelated to the current cursor position
927 * (for example adding an import statement at the top of the file if the completion item will
928 * insert an unqualified type).
930 AdditionalTextEdits []TextEdit `json:"additionalTextEdits,omitempty"`
932 * An optional set of characters that when pressed while this completion is active will accept it first and
933 * then type that character. *Note* that all commit characters should have `length=1` and that superfluous
934 * characters will be ignored.
936 CommitCharacters []string `json:"commitCharacters,omitempty"`
938 * An optional [command](#Command) that is executed *after* inserting this completion. *Note* that
939 * additional modifications to the current document should be described with the
940 * [additionalTextEdits](#CompletionItem.additionalTextEdits)-property.
942 Command *Command `json:"command,omitempty"`
944 * A data entry field that is preserved on a completion item between
945 * a [CompletionRequest](#CompletionRequest) and a [CompletionResolveRequest]
946 * (#CompletionResolveRequest)
948 Data interface{} `json:"data,omitempty"`
952 * The kind of a completion entry.
954 type CompletionItemKind float64
957 * Completion item tags are extra annotations that tweak the rendering of a completion
962 type CompletionItemTag float64
965 * Represents a collection of [completion items](#CompletionItem) to be presented
968 type CompletionList struct {
970 * This list it not complete. Further typing results in recomputing this list.
972 IsIncomplete bool `json:"isIncomplete"`
974 * The completion items.
976 Items []CompletionItem `json:"items"`
980 * Completion options.
982 type CompletionOptions struct {
984 * Most tools trigger completion request automatically without explicitly requesting
985 * it using a keyboard shortcut (e.g. Ctrl+Space). Typically they do so when the user
986 * starts to type an identifier. For example if the user types `c` in a JavaScript file
987 * code complete will automatically pop up present `console` besides others as a
988 * completion item. Characters that make up identifiers don't need to be listed here.
990 * If code complete should automatically be trigger on characters not being valid inside
991 * an identifier (for example `.` in JavaScript) list them in `triggerCharacters`.
993 TriggerCharacters []string `json:"triggerCharacters,omitempty"`
995 * The list of all possible characters that commit a completion. This field can be used
996 * if clients don't support individual commit characters per completion item. See
997 * `ClientCapabilities.textDocument.completion.completionItem.commitCharactersSupport`
999 * If a server provides both `allCommitCharacters` and commit characters on an individual
1000 * completion item the ones on the completion item win.
1004 AllCommitCharacters []string `json:"allCommitCharacters,omitempty"`
1006 * The server provides support to resolve additional
1007 * information for a completion item.
1009 ResolveProvider bool `json:"resolveProvider,omitempty"`
1010 WorkDoneProgressOptions
1014 * Completion parameters
1016 type CompletionParams struct {
1018 * The completion context. This is only available it the client specifies
1019 * to send this using the client capability `textDocument.completion.contextSupport === true`
1021 Context CompletionContext `json:"context,omitempty"`
1022 TextDocumentPositionParams
1023 WorkDoneProgressParams
1028 * How a completion was triggered
1030 type CompletionTriggerKind float64
1032 type ConfigurationClientCapabilities struct {
1034 * The workspace client capabilities
1036 Workspace Workspace3Gn `json:"workspace,omitempty"`
1039 type ConfigurationItem struct {
1041 * The scope to get the configuration section for.
1043 ScopeURI string `json:"scopeUri,omitempty"`
1045 * The configuration section asked for.
1047 Section string `json:"section,omitempty"`
1051 * The parameters of a configuration request.
1053 type ConfigurationParams struct {
1054 Items []ConfigurationItem `json:"items"`
1058 * Create file operation.
1060 type CreateFile struct {
1064 Kind string `json:"kind"`
1066 * The resource to create.
1068 URI DocumentURI `json:"uri"`
1070 * Additional options
1072 Options CreateFileOptions `json:"options,omitempty"`
1077 * Options to create a file.
1079 type CreateFileOptions struct {
1081 * Overwrite existing file. Overwrite wins over `ignoreIfExists`
1083 Overwrite bool `json:"overwrite,omitempty"`
1087 IgnoreIfExists bool `json:"ignoreIfExists,omitempty"`
1091 * The parameters sent in file create requests/notifications.
1095 type CreateFilesParams struct {
1097 * An array of all files/folders created in this operation.
1099 Files []FileCreate `json:"files"`
1103 * Defines a decimal number. Since decimal numbers are very
1104 * rare in the language server specification we denote the
1105 * exact range with every decimal using the mathematics
1106 * interval notations (e.g. [0, 1] denotes all decimals d with
1109 type Decimal = float64
1112 * The declaration of a symbol representation as one or many [locations](#Location).
1114 type Declaration = []Location /*Location | Location[]*/
1119 type DeclarationClientCapabilities struct {
1121 * Whether declaration supports dynamic registration. If this is set to `true`
1122 * the client supports the new `DeclarationRegistrationOptions` return value
1123 * for the corresponding server capability as well.
1125 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
1127 * The client supports additional metadata in the form of declaration links.
1129 LinkSupport bool `json:"linkSupport,omitempty"`
1133 * Information about where a symbol is declared.
1135 * Provides additional metadata over normal [location](#Location) declarations, including the range of
1136 * the declaring symbol.
1138 * Servers should prefer returning `DeclarationLink` over `Declaration` if supported
1141 type DeclarationLink = LocationLink
1143 type DeclarationOptions struct {
1144 WorkDoneProgressOptions
1147 type DeclarationParams struct {
1148 TextDocumentPositionParams
1149 WorkDoneProgressParams
1153 type DeclarationRegistrationOptions struct {
1155 TextDocumentRegistrationOptions
1156 StaticRegistrationOptions
1160 * The definition of a symbol represented as one or many [locations](#Location).
1161 * For most programming languages there is only one location at which a symbol is
1164 * Servers should prefer returning `DefinitionLink` over `Definition` if supported
1167 type Definition = []Location /*Location | Location[]*/
1170 * Client Capabilities for a [DefinitionRequest](#DefinitionRequest).
1172 type DefinitionClientCapabilities struct {
1174 * Whether definition supports dynamic registration.
1176 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
1178 * The client supports additional metadata in the form of definition links.
1182 LinkSupport bool `json:"linkSupport,omitempty"`
1186 * Information about where a symbol is defined.
1188 * Provides additional metadata over normal [location](#Location) definitions, including the range of
1189 * the defining symbol
1191 type DefinitionLink = LocationLink
1194 * Server Capabilities for a [DefinitionRequest](#DefinitionRequest).
1196 type DefinitionOptions struct {
1197 WorkDoneProgressOptions
1201 * Parameters for a [DefinitionRequest](#DefinitionRequest).
1203 type DefinitionParams struct {
1204 TextDocumentPositionParams
1205 WorkDoneProgressParams
1210 * Delete file operation
1212 type DeleteFile struct {
1216 Kind string `json:"kind"`
1218 * The file to delete.
1220 URI DocumentURI `json:"uri"`
1224 Options DeleteFileOptions `json:"options,omitempty"`
1229 * Delete file options
1231 type DeleteFileOptions struct {
1233 * Delete the content recursively if a folder is denoted.
1235 Recursive bool `json:"recursive,omitempty"`
1237 * Ignore the operation if the file doesn't exist.
1239 IgnoreIfNotExists bool `json:"ignoreIfNotExists,omitempty"`
1243 * The parameters sent in file delete requests/notifications.
1247 type DeleteFilesParams struct {
1249 * An array of all files/folders deleted in this operation.
1251 Files []FileDelete `json:"files"`
1255 * Represents a diagnostic, such as a compiler error or warning. Diagnostic objects
1256 * are only valid in the scope of a resource.
1258 type Diagnostic struct {
1260 * The range at which the message applies
1262 Range Range `json:"range"`
1264 * The diagnostic's severity. Can be omitted. If omitted it is up to the
1265 * client to interpret diagnostics as error, warning, info or hint.
1267 Severity DiagnosticSeverity `json:"severity,omitempty"`
1269 * The diagnostic's code, which usually appear in the user interface.
1271 Code interface{}/*integer | string*/ `json:"code,omitempty"`
1273 * An optional property to describe the error code.
1277 CodeDescription *CodeDescription `json:"codeDescription,omitempty"`
1279 * A human-readable string describing the source of this
1280 * diagnostic, e.g. 'typescript' or 'super lint'. It usually
1281 * appears in the user interface.
1283 Source string `json:"source,omitempty"`
1285 * The diagnostic's message. It usually appears in the user interface
1287 Message string `json:"message"`
1289 * Additional metadata about the diagnostic.
1293 Tags []DiagnosticTag `json:"tags,omitempty"`
1295 * An array of related diagnostic information, e.g. when symbol-names within
1296 * a scope collide all definitions can be marked via this property.
1298 RelatedInformation []DiagnosticRelatedInformation `json:"relatedInformation,omitempty"`
1300 * A data entry field that is preserved between a `textDocument/publishDiagnostics`
1301 * notification and `textDocument/codeAction` request.
1305 Data interface{} `json:"data,omitempty"`
1309 * Represents a related message and source code location for a diagnostic. This should be
1310 * used to point to code locations that cause or related to a diagnostics, e.g when duplicating
1311 * a symbol in a scope.
1313 type DiagnosticRelatedInformation struct {
1315 * The location of this related diagnostic information.
1317 Location Location `json:"location"`
1319 * The message of this related diagnostic information.
1321 Message string `json:"message"`
1325 * The diagnostic's severity.
1327 type DiagnosticSeverity float64
1330 * The diagnostic tags.
1334 type DiagnosticTag float64
1336 type DidChangeConfigurationClientCapabilities struct {
1338 * Did change configuration notification supports dynamic registration.
1340 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
1344 * The parameters of a change configuration notification.
1346 type DidChangeConfigurationParams struct {
1348 * The actual changed settings
1350 Settings interface{} `json:"settings"`
1354 * The change text document notification's parameters.
1356 type DidChangeTextDocumentParams struct {
1358 * The document that did change. The version number points
1359 * to the version after all provided content changes have
1362 TextDocument VersionedTextDocumentIdentifier `json:"textDocument"`
1364 * The actual content changes. The content changes describe single state changes
1365 * to the document. So if there are two content changes c1 (at array index 0) and
1366 * c2 (at array index 1) for a document in state S then c1 moves the document from
1367 * S to S' and c2 from S' to S''. So c1 is computed on the state S and c2 is computed
1370 * To mirror the content of a document using change events use the following approach:
1371 * - start with the same initial content
1372 * - apply the 'textDocument/didChange' notifications in the order you receive them.
1373 * - apply the `TextDocumentContentChangeEvent`s in a single notification in the order
1376 ContentChanges []TextDocumentContentChangeEvent `json:"contentChanges"`
1379 type DidChangeWatchedFilesClientCapabilities struct {
1381 * Did change watched files notification supports dynamic registration. Please note
1382 * that the current protocol doesn't support static configuration for file changes
1383 * from the server side.
1385 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
1389 * The watched files change notification's parameters.
1391 type DidChangeWatchedFilesParams struct {
1393 * The actual file events.
1395 Changes []FileEvent `json:"changes"`
1399 * Describe options to be used when registered for text document change events.
1401 type DidChangeWatchedFilesRegistrationOptions struct {
1403 * The watchers to register.
1405 Watchers []FileSystemWatcher `json:"watchers"`
1409 * The parameters of a `workspace/didChangeWorkspaceFolders` notification.
1411 type DidChangeWorkspaceFoldersParams struct {
1413 * The actual workspace folder change event.
1415 Event WorkspaceFoldersChangeEvent `json:"event"`
1419 * The parameters send in a close text document notification
1421 type DidCloseTextDocumentParams struct {
1423 * The document that was closed.
1425 TextDocument TextDocumentIdentifier `json:"textDocument"`
1429 * The parameters send in a open text document notification
1431 type DidOpenTextDocumentParams struct {
1433 * The document that was opened.
1435 TextDocument TextDocumentItem `json:"textDocument"`
1439 * The parameters send in a save text document notification
1441 type DidSaveTextDocumentParams struct {
1443 * The document that was closed.
1445 TextDocument TextDocumentIdentifier `json:"textDocument"`
1447 * Optional the content when saved. Depends on the includeText value
1448 * when the save notification was requested.
1450 Text *string `json:"text,omitempty"`
1453 type DocumentColorClientCapabilities struct {
1455 * Whether implementation supports dynamic registration. If this is set to `true`
1456 * the client supports the new `DocumentColorRegistrationOptions` return value
1457 * for the corresponding server capability as well.
1459 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
1462 type DocumentColorOptions struct {
1463 WorkDoneProgressOptions
1467 * Parameters for a [DocumentColorRequest](#DocumentColorRequest).
1469 type DocumentColorParams struct {
1471 * The text document.
1473 TextDocument TextDocumentIdentifier `json:"textDocument"`
1474 WorkDoneProgressParams
1478 type DocumentColorRegistrationOptions struct {
1479 TextDocumentRegistrationOptions
1480 StaticRegistrationOptions
1481 DocumentColorOptions
1485 * A document filter denotes a document by different properties like
1486 * the [language](#TextDocument.languageId), the [scheme](#Uri.scheme) of
1487 * its resource, or a glob-pattern that is applied to the [path](#TextDocument.fileName).
1489 * Glob patterns can have the following syntax:
1490 * - `*` to match one or more characters in a path segment
1491 * - `?` to match on one character in a path segment
1492 * - `**` to match any number of path segments, including none
1493 * - `{}` to group conditions (e.g. `**/*.{ts,js}` matches all TypeScript and JavaScript files)
1494 * - `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …)
1495 * - `[!...]` 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`)
1497 * @sample A language filter that applies to typescript files on disk: `{ language: 'typescript', scheme: 'file' }`
1498 * @sample A language filter that applies to all package.json paths: `{ language: 'json', pattern: '**package.json' }`
1500 type DocumentFilter = struct {
1501 /** A language id, like `typescript`. */
1502 Language string `json:"language"`
1503 /** A Uri [scheme](#Uri.scheme), like `file` or `untitled`. */
1504 Scheme string `json:"scheme,omitempty"`
1505 /** A glob pattern, like `*.{ts,js}`. */
1506 Pattern string `json:"pattern,omitempty"`
1510 * Client capabilities of a [DocumentFormattingRequest](#DocumentFormattingRequest).
1512 type DocumentFormattingClientCapabilities struct {
1514 * Whether formatting supports dynamic registration.
1516 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
1520 * Provider options for a [DocumentFormattingRequest](#DocumentFormattingRequest).
1522 type DocumentFormattingOptions struct {
1523 WorkDoneProgressOptions
1527 * The parameters of a [DocumentFormattingRequest](#DocumentFormattingRequest).
1529 type DocumentFormattingParams struct {
1531 * The document to format.
1533 TextDocument TextDocumentIdentifier `json:"textDocument"`
1535 * The format options
1537 Options FormattingOptions `json:"options"`
1538 WorkDoneProgressParams
1542 * A document highlight is a range inside a text document which deserves
1543 * special attention. Usually a document highlight is visualized by changing
1544 * the background color of its range.
1546 type DocumentHighlight struct {
1548 * The range this highlight applies to.
1550 Range Range `json:"range"`
1552 * The highlight kind, default is [text](#DocumentHighlightKind.Text).
1554 Kind DocumentHighlightKind `json:"kind,omitempty"`
1558 * Client Capabilities for a [DocumentHighlightRequest](#DocumentHighlightRequest).
1560 type DocumentHighlightClientCapabilities struct {
1562 * Whether document highlight supports dynamic registration.
1564 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
1568 * A document highlight kind.
1570 type DocumentHighlightKind float64
1573 * Provider options for a [DocumentHighlightRequest](#DocumentHighlightRequest).
1575 type DocumentHighlightOptions struct {
1576 WorkDoneProgressOptions
1580 * Parameters for a [DocumentHighlightRequest](#DocumentHighlightRequest).
1582 type DocumentHighlightParams struct {
1583 TextDocumentPositionParams
1584 WorkDoneProgressParams
1589 * A document link is a range in a text document that links to an internal or external resource, like another
1590 * text document or a web site.
1592 type DocumentLink struct {
1594 * The range this link applies to.
1596 Range Range `json:"range"`
1598 * The uri this link points to.
1600 Target string `json:"target,omitempty"`
1602 * The tooltip text when you hover over this link.
1604 * If a tooltip is provided, is will be displayed in a string that includes instructions on how to
1605 * trigger the link, such as `{0} (ctrl + click)`. The specific instructions vary depending on OS,
1606 * user settings, and localization.
1610 Tooltip string `json:"tooltip,omitempty"`
1612 * A data entry field that is preserved on a document link between a
1613 * DocumentLinkRequest and a DocumentLinkResolveRequest.
1615 Data interface{} `json:"data,omitempty"`
1619 * The client capabilities of a [DocumentLinkRequest](#DocumentLinkRequest).
1621 type DocumentLinkClientCapabilities struct {
1623 * Whether document link supports dynamic registration.
1625 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
1627 * Whether the client support the `tooltip` property on `DocumentLink`.
1631 TooltipSupport bool `json:"tooltipSupport,omitempty"`
1635 * Provider options for a [DocumentLinkRequest](#DocumentLinkRequest).
1637 type DocumentLinkOptions struct {
1639 * Document links have a resolve provider as well.
1641 ResolveProvider bool `json:"resolveProvider,omitempty"`
1642 WorkDoneProgressOptions
1646 * The parameters of a [DocumentLinkRequest](#DocumentLinkRequest).
1648 type DocumentLinkParams struct {
1650 * The document to provide document links for.
1652 TextDocument TextDocumentIdentifier `json:"textDocument"`
1653 WorkDoneProgressParams
1658 * Client capabilities of a [DocumentOnTypeFormattingRequest](#DocumentOnTypeFormattingRequest).
1660 type DocumentOnTypeFormattingClientCapabilities struct {
1662 * Whether on type formatting supports dynamic registration.
1664 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
1668 * Provider options for a [DocumentOnTypeFormattingRequest](#DocumentOnTypeFormattingRequest).
1670 type DocumentOnTypeFormattingOptions struct {
1672 * A character on which formatting should be triggered, like `}`.
1674 FirstTriggerCharacter string `json:"firstTriggerCharacter"`
1676 * More trigger characters.
1678 MoreTriggerCharacter []string `json:"moreTriggerCharacter,omitempty"`
1682 * The parameters of a [DocumentOnTypeFormattingRequest](#DocumentOnTypeFormattingRequest).
1684 type DocumentOnTypeFormattingParams struct {
1686 * The document to format.
1688 TextDocument TextDocumentIdentifier `json:"textDocument"`
1690 * The position at which this request was send.
1692 Position Position `json:"position"`
1694 * The character that has been typed.
1696 Ch string `json:"ch"`
1698 * The format options.
1700 Options FormattingOptions `json:"options"`
1704 * Client capabilities of a [DocumentRangeFormattingRequest](#DocumentRangeFormattingRequest).
1706 type DocumentRangeFormattingClientCapabilities struct {
1708 * Whether range formatting supports dynamic registration.
1710 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
1714 * Provider options for a [DocumentRangeFormattingRequest](#DocumentRangeFormattingRequest).
1716 type DocumentRangeFormattingOptions struct {
1717 WorkDoneProgressOptions
1721 * The parameters of a [DocumentRangeFormattingRequest](#DocumentRangeFormattingRequest).
1723 type DocumentRangeFormattingParams struct {
1725 * The document to format.
1727 TextDocument TextDocumentIdentifier `json:"textDocument"`
1729 * The range to format
1731 Range Range `json:"range"`
1733 * The format options
1735 Options FormattingOptions `json:"options"`
1736 WorkDoneProgressParams
1740 * A document selector is the combination of one or many document filters.
1742 * @sample `let sel:DocumentSelector = [{ language: 'typescript' }, { language: 'json', pattern: '**∕tsconfig.json' }]`;
1744 * The use of a string as a document filter is deprecated @since 3.16.0.
1746 type DocumentSelector = []string /*string | DocumentFilter*/
1749 * Represents programming constructs like variables, classes, interfaces etc.
1750 * that appear in a document. Document symbols can be hierarchical and they
1751 * have two ranges: one that encloses its definition and one that points to
1752 * its most interesting range, e.g. the range of an identifier.
1754 type DocumentSymbol struct {
1756 * The name of this symbol. Will be displayed in the user interface and therefore must not be
1757 * an empty string or a string only consisting of white spaces.
1759 Name string `json:"name"`
1761 * More detail for this symbol, e.g the signature of a function.
1763 Detail string `json:"detail,omitempty"`
1765 * The kind of this symbol.
1767 Kind SymbolKind `json:"kind"`
1769 * Tags for this completion item.
1773 Tags []SymbolTag `json:"tags,omitempty"`
1775 * Indicates if this symbol is deprecated.
1777 * @deprecated Use tags instead
1779 Deprecated bool `json:"deprecated,omitempty"`
1781 * The range enclosing this symbol not including leading/trailing whitespace but everything else
1782 * like comments. This information is typically used to determine if the the clients cursor is
1783 * inside the symbol to reveal in the symbol in the UI.
1785 Range Range `json:"range"`
1787 * The range that should be selected and revealed when this symbol is being picked, e.g the name of a function.
1788 * Must be contained by the the `range`.
1790 SelectionRange Range `json:"selectionRange"`
1792 * Children of this symbol, e.g. properties of a class.
1794 Children []DocumentSymbol `json:"children,omitempty"`
1798 * Client Capabilities for a [DocumentSymbolRequest](#DocumentSymbolRequest).
1800 type DocumentSymbolClientCapabilities struct {
1802 * Whether document symbol supports dynamic registration.
1804 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
1806 * Specific capabilities for the `SymbolKind`.
1810 * The symbol kind values the client supports. When this
1811 * property exists the client also guarantees that it will
1812 * handle values outside its set gracefully and falls back
1813 * to a default value when unknown.
1815 * If this property is not present the client only supports
1816 * the symbol kinds from `File` to `Array` as defined in
1817 * the initial version of the protocol.
1819 ValueSet []SymbolKind `json:"valueSet,omitempty"`
1820 } `json:"symbolKind,omitempty"`
1822 * The client support hierarchical document symbols.
1824 HierarchicalDocumentSymbolSupport bool `json:"hierarchicalDocumentSymbolSupport,omitempty"`
1826 * The client supports tags on `SymbolInformation`. Tags are supported on
1827 * `DocumentSymbol` if `hierarchicalDocumentSymbolSupport` is set to true.
1828 * Clients supporting tags have to handle unknown tags gracefully.
1834 * The tags supported by the client.
1836 ValueSet []SymbolTag `json:"valueSet"`
1837 } `json:"tagSupport,omitempty"`
1839 * The client supports an additional label presented in the UI when
1840 * registering a document symbol provider.
1844 LabelSupport bool `json:"labelSupport,omitempty"`
1848 * Provider options for a [DocumentSymbolRequest](#DocumentSymbolRequest).
1850 type DocumentSymbolOptions struct {
1852 * A human-readable string that is shown when multiple outlines trees
1853 * are shown for the same document.
1857 Label string `json:"label,omitempty"`
1858 WorkDoneProgressOptions
1862 * Parameters for a [DocumentSymbolRequest](#DocumentSymbolRequest).
1864 type DocumentSymbolParams struct {
1866 * The text document.
1868 TextDocument TextDocumentIdentifier `json:"textDocument"`
1869 WorkDoneProgressParams
1874 * A tagging type for string properties that are actually document URIs.
1876 type DocumentURI string
1879 * The client capabilities of a [ExecuteCommandRequest](#ExecuteCommandRequest).
1881 type ExecuteCommandClientCapabilities struct {
1883 * Execute command supports dynamic registration.
1885 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
1889 * The server capabilities of a [ExecuteCommandRequest](#ExecuteCommandRequest).
1891 type ExecuteCommandOptions struct {
1893 * The commands to be executed on the server
1895 Commands []string `json:"commands"`
1896 WorkDoneProgressOptions
1900 * The parameters of a [ExecuteCommandRequest](#ExecuteCommandRequest).
1902 type ExecuteCommandParams struct {
1904 * The identifier of the actual command handler.
1906 Command string `json:"command"`
1908 * Arguments that the command should be invoked with.
1910 Arguments []json.RawMessage `json:"arguments,omitempty"`
1911 WorkDoneProgressParams
1914 type FailureHandlingKind string
1917 * The file event type
1919 type FileChangeType float64
1922 * Represents information on a file/folder create.
1926 type FileCreate struct {
1928 * A file:// URI for the location of the file/folder being created.
1930 URI string `json:"uri"`
1934 * Represents information on a file/folder delete.
1938 type FileDelete struct {
1940 * A file:// URI for the location of the file/folder being deleted.
1942 URI string `json:"uri"`
1946 * An event describing a file change.
1948 type FileEvent struct {
1952 URI DocumentURI `json:"uri"`
1956 Type FileChangeType `json:"type"`
1960 * Capabilities relating to events from file operations by the user in the client.
1962 * These events do not come from the file system, they come from user operations
1963 * like renaming a file in the UI.
1967 type FileOperationClientCapabilities struct {
1969 * Whether the client supports dynamic registration for file requests/notifications.
1971 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
1973 * The client has support for sending didCreateFiles notifications.
1975 DidCreate bool `json:"didCreate,omitempty"`
1977 * The client has support for willCreateFiles requests.
1979 WillCreate bool `json:"willCreate,omitempty"`
1981 * The client has support for sending didRenameFiles notifications.
1983 DidRename bool `json:"didRename,omitempty"`
1985 * The client has support for willRenameFiles requests.
1987 WillRename bool `json:"willRename,omitempty"`
1989 * The client has support for sending didDeleteFiles notifications.
1991 DidDelete bool `json:"didDelete,omitempty"`
1993 * The client has support for willDeleteFiles requests.
1995 WillDelete bool `json:"willDelete,omitempty"`
1999 * A filter to describe in which file operation requests or notifications
2000 * the server is interested in.
2004 type FileOperationFilter struct {
2006 * A Uri like `file` or `untitled`.
2008 Scheme string `json:"scheme,omitempty"`
2010 * The actual file operation pattern.
2012 Pattern FileOperationPattern `json:"pattern"`
2016 * Options for notifications/requests for user operations on files.
2020 type FileOperationOptions struct {
2022 * The server is interested in didCreateFiles notifications.
2024 DidCreate FileOperationRegistrationOptions `json:"didCreate,omitempty"`
2026 * The server is interested in willCreateFiles requests.
2028 WillCreate FileOperationRegistrationOptions `json:"willCreate,omitempty"`
2030 * The server is interested in didRenameFiles notifications.
2032 DidRename FileOperationRegistrationOptions `json:"didRename,omitempty"`
2034 * The server is interested in willRenameFiles requests.
2036 WillRename FileOperationRegistrationOptions `json:"willRename,omitempty"`
2038 * The server is interested in didDeleteFiles file notifications.
2040 DidDelete FileOperationRegistrationOptions `json:"didDelete,omitempty"`
2042 * The server is interested in willDeleteFiles file requests.
2044 WillDelete FileOperationRegistrationOptions `json:"willDelete,omitempty"`
2048 * A pattern to describe in which file operation requests or notifications
2049 * the server is interested in.
2053 type FileOperationPattern struct {
2055 * The glob pattern to match. Glob patterns can have the following syntax:
2056 * - `*` to match one or more characters in a path segment
2057 * - `?` to match on one character in a path segment
2058 * - `**` to match any number of path segments, including none
2059 * - `{}` to group conditions (e.g. `**/*.{ts,js}` matches all TypeScript and JavaScript files)
2060 * - `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …)
2061 * - `[!...]` 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`)
2063 Glob string `json:"glob"`
2065 * Whether to match files or folders with this pattern.
2067 * Matches both if undefined.
2069 Matches FileOperationPatternKind `json:"matches,omitempty"`
2071 * Additional options used during matching.
2073 Options FileOperationPatternOptions `json:"options,omitempty"`
2077 * A pattern kind describing if a glob pattern matches a file a folder or
2082 type FileOperationPatternKind string
2085 * Matching options for the file operation pattern.
2089 type FileOperationPatternOptions struct {
2091 * The pattern should be matched ignoring casing.
2093 IgnoreCase bool `json:"ignoreCase,omitempty"`
2097 * The options to register for file operations.
2101 type FileOperationRegistrationOptions struct {
2103 * The actual filters.
2105 Filters []FileOperationFilter `json:"filters"`
2109 * Represents information on a file/folder rename.
2113 type FileRename struct {
2115 * A file:// URI for the original location of the file/folder being renamed.
2117 OldURI string `json:"oldUri"`
2119 * A file:// URI for the new location of the file/folder being renamed.
2121 NewURI string `json:"newUri"`
2124 type FileSystemWatcher struct {
2126 * The glob pattern to watch. Glob patterns can have the following syntax:
2127 * - `*` to match one or more characters in a path segment
2128 * - `?` to match on one character in a path segment
2129 * - `**` to match any number of path segments, including none
2130 * - `{}` to group conditions (e.g. `**/*.{ts,js}` matches all TypeScript and JavaScript files)
2131 * - `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …)
2132 * - `[!...]` 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`)
2134 GlobPattern string `json:"globPattern"`
2136 * The kind of events of interest. If omitted it defaults
2137 * to WatchKind.Create | WatchKind.Change | WatchKind.Delete
2140 Kind uint32 `json:"kind,omitempty"`
2144 * Represents a folding range. To be valid, start and end line must be bigger than zero and smaller
2145 * than the number of lines in the document. Clients are free to ignore invalid ranges.
2147 type FoldingRange struct {
2149 * The zero-based start line of the range to fold. The folded area starts after the line's last character.
2150 * To be valid, the end must be zero or larger and smaller than the number of lines in the document.
2152 StartLine uint32 `json:"startLine"`
2154 * The zero-based character offset from where the folded range starts. If not defined, defaults to the length of the start line.
2156 StartCharacter uint32 `json:"startCharacter,omitempty"`
2158 * The zero-based end line of the range to fold. The folded area ends with the line's last character.
2159 * To be valid, the end must be zero or larger and smaller than the number of lines in the document.
2161 EndLine uint32 `json:"endLine"`
2163 * The zero-based character offset before the folded range ends. If not defined, defaults to the length of the end line.
2165 EndCharacter uint32 `json:"endCharacter,omitempty"`
2167 * Describes the kind of the folding range such as `comment' or 'region'. The kind
2168 * is used to categorize folding ranges and used by commands like 'Fold all comments'. See
2169 * [FoldingRangeKind](#FoldingRangeKind) for an enumeration of standardized kinds.
2171 Kind string `json:"kind,omitempty"`
2174 type FoldingRangeClientCapabilities struct {
2176 * Whether implementation supports dynamic registration for folding range providers. If this is set to `true`
2177 * the client supports the new `FoldingRangeRegistrationOptions` return value for the corresponding server
2178 * capability as well.
2180 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
2182 * The maximum number of folding ranges that the client prefers to receive per document. The value serves as a
2183 * hint, servers are free to follow the limit.
2185 RangeLimit uint32 `json:"rangeLimit,omitempty"`
2187 * If set, the client signals that it only supports folding complete lines. If set, client will
2188 * ignore specified `startCharacter` and `endCharacter` properties in a FoldingRange.
2190 LineFoldingOnly bool `json:"lineFoldingOnly,omitempty"`
2194 * Enum of known range kinds
2196 type FoldingRangeKind string
2198 type FoldingRangeOptions struct {
2199 WorkDoneProgressOptions
2203 * Parameters for a [FoldingRangeRequest](#FoldingRangeRequest).
2205 type FoldingRangeParams struct {
2207 * The text document.
2209 TextDocument TextDocumentIdentifier `json:"textDocument"`
2210 WorkDoneProgressParams
2214 type FoldingRangeRegistrationOptions struct {
2215 TextDocumentRegistrationOptions
2217 StaticRegistrationOptions
2221 * Value-object describing what options formatting should use.
2223 type FormattingOptions struct {
2225 * Size of a tab in spaces.
2227 TabSize uint32 `json:"tabSize"`
2229 * Prefer spaces over tabs.
2231 InsertSpaces bool `json:"insertSpaces"`
2233 * Trim trailing whitespaces on a line.
2237 TrimTrailingWhitespace bool `json:"trimTrailingWhitespace,omitempty"`
2239 * Insert a newline character at the end of the file if one does not exist.
2243 InsertFinalNewline bool `json:"insertFinalNewline,omitempty"`
2245 * Trim all newlines after the final newline at the end of the file.
2249 TrimFinalNewlines bool `json:"trimFinalNewlines,omitempty"`
2253 * General client capabilities.
2257 type GeneralClientCapabilities struct {
2259 * Client capability that signals how the client
2260 * handles stale requests (e.g. a request
2261 * for which the client will not process the response
2262 * anymore since the information is outdated).
2266 StaleRequestSupport struct {
2268 * The client will actively cancel the request.
2270 Cancel bool `json:"cancel"`
2272 * The list of requests for which the client
2273 * will retry the request if it receives a
2274 * response with error code `ContentModified``
2276 RetryOnContentModified []string `json:"retryOnContentModified"`
2277 } `json:"staleRequestSupport,omitempty"`
2279 * Client capabilities specific to regular expressions.
2283 RegularExpressions RegularExpressionsClientCapabilities `json:"regularExpressions,omitempty"`
2285 * Client capabilities specific to the client's markdown parser.
2289 Markdown MarkdownClientCapabilities `json:"markdown,omitempty"`
2293 * The result of a hover request.
2297 * The hover's content
2299 Contents MarkupContent/*MarkupContent | MarkedString | MarkedString[]*/ `json:"contents"`
2303 Range Range `json:"range,omitempty"`
2306 type HoverClientCapabilities struct {
2308 * Whether hover supports dynamic registration.
2310 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
2312 * Client supports the follow content formats for the content
2313 * property. The order describes the preferred format of the client.
2315 ContentFormat []MarkupKind `json:"contentFormat,omitempty"`
2321 type HoverOptions struct {
2322 WorkDoneProgressOptions
2326 * Parameters for a [HoverRequest](#HoverRequest).
2328 type HoverParams struct {
2329 TextDocumentPositionParams
2330 WorkDoneProgressParams
2336 type ImplementationClientCapabilities struct {
2338 * Whether implementation supports dynamic registration. If this is set to `true`
2339 * the client supports the new `ImplementationRegistrationOptions` return value
2340 * for the corresponding server capability as well.
2342 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
2344 * The client supports additional metadata in the form of definition links.
2348 LinkSupport bool `json:"linkSupport,omitempty"`
2351 type ImplementationOptions struct {
2352 WorkDoneProgressOptions
2355 type ImplementationParams struct {
2356 TextDocumentPositionParams
2357 WorkDoneProgressParams
2361 type ImplementationRegistrationOptions struct {
2362 TextDocumentRegistrationOptions
2363 ImplementationOptions
2364 StaticRegistrationOptions
2368 * Known error codes for an `InitializeError`;
2370 type InitializeError float64
2372 type InitializeParams struct {
2374 * The process Id of the parent process that started
2377 ProcessID int32/*integer | null*/ `json:"processId"`
2379 * Information about the client
2385 * The name of the client as defined by the client.
2387 Name string `json:"name"`
2389 * The client's version as defined by the client.
2391 Version string `json:"version,omitempty"`
2392 } `json:"clientInfo,omitempty"`
2394 * The locale the client is currently showing the user interface
2395 * in. This must not necessarily be the locale of the operating
2398 * Uses IETF language tags as the value's syntax
2399 * (See https://en.wikipedia.org/wiki/IETF_language_tag)
2403 Locale string `json:"locale,omitempty"`
2405 * The rootPath of the workspace. Is null
2406 * if no folder is open.
2408 * @deprecated in favour of rootUri.
2410 RootPath string/*string | null*/ `json:"rootPath,omitempty"`
2412 * The rootUri of the workspace. Is null if no
2413 * folder is open. If both `rootPath` and `rootUri` are set
2416 * @deprecated in favour of workspaceFolders.
2418 RootURI DocumentURI/*DocumentUri | null*/ `json:"rootUri"`
2420 * The capabilities provided by the client (editor or tool)
2422 Capabilities ClientCapabilities `json:"capabilities"`
2424 * User provided initialization options.
2426 InitializationOptions interface{} `json:"initializationOptions,omitempty"`
2428 * The initial trace setting. If omitted trace is disabled ('off').
2430 Trace string/*'off' | 'messages' | 'verbose'*/ `json:"trace,omitempty"`
2432 * The actual configured workspace folders.
2434 WorkspaceFolders []WorkspaceFolder/*WorkspaceFolder[] | null*/ `json:"workspaceFolders"`
2438 * The result returned from an initialize request.
2440 type InitializeResult struct {
2442 * The capabilities the language server provides.
2444 Capabilities ServerCapabilities `json:"capabilities"`
2446 * Information about the server.
2452 * The name of the server as defined by the server.
2454 Name string `json:"name"`
2456 * The server's version as defined by the server.
2458 Version string `json:"version,omitempty"`
2459 } `json:"serverInfo,omitempty"`
2462 type InitializedParams struct {
2466 * A special text edit to provide an insert and a replace operation.
2470 type InsertReplaceEdit struct {
2472 * The string to be inserted.
2474 NewText string `json:"newText"`
2476 * The range if the insert is requested
2478 Insert Range `json:"insert"`
2480 * The range if the replace is requested.
2482 Replace Range `json:"replace"`
2486 * Defines whether the insert text in a completion item should be interpreted as
2487 * plain text or a snippet.
2489 type InsertTextFormat float64
2492 * How whitespace and indentation is handled during completion
2497 type InsertTextMode float64
2500 * Client capabilities for the linked editing range request.
2504 type LinkedEditingRangeClientCapabilities struct {
2506 * Whether implementation supports dynamic registration. If this is set to `true`
2507 * the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`
2508 * return value for the corresponding server capability as well.
2510 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
2513 type LinkedEditingRangeOptions struct {
2514 WorkDoneProgressOptions
2517 type LinkedEditingRangeParams struct {
2518 TextDocumentPositionParams
2519 WorkDoneProgressParams
2522 type LinkedEditingRangeRegistrationOptions struct {
2523 TextDocumentRegistrationOptions
2524 LinkedEditingRangeOptions
2525 StaticRegistrationOptions
2529 * The result of a linked editing range request.
2533 type LinkedEditingRanges struct {
2535 * A list of ranges that can be edited together. The ranges must have
2536 * identical length and contain identical text content. The ranges cannot overlap.
2538 Ranges []Range `json:"ranges"`
2540 * An optional word pattern (regular expression) that describes valid contents for
2541 * the given ranges. If no pattern is provided, the client configuration's word
2542 * pattern will be used.
2544 WordPattern string `json:"wordPattern,omitempty"`
2548 * Represents a location inside a resource, such as a line
2549 * inside a text file.
2551 type Location struct {
2552 URI DocumentURI `json:"uri"`
2553 Range Range `json:"range"`
2557 * Represents the connection of two locations. Provides additional metadata over normal [locations](#Location),
2558 * including an origin range.
2560 type LocationLink struct {
2562 * Span of the origin of this link.
2564 * Used as the underlined span for mouse definition hover. Defaults to the word range at
2565 * the definition position.
2567 OriginSelectionRange Range `json:"originSelectionRange,omitempty"`
2569 * The target resource identifier of this link.
2571 TargetURI DocumentURI `json:"targetUri"`
2573 * The full target range of this link. If the target for example is a symbol then target range is the
2574 * range enclosing this symbol not including leading/trailing whitespace but everything else
2575 * like comments. This information is typically used to highlight the range in the editor.
2577 TargetRange Range `json:"targetRange"`
2579 * The range that should be selected and revealed when this link is being followed, e.g the name of a function.
2580 * Must be contained by the the `targetRange`. See also `DocumentSymbol#range`
2582 TargetSelectionRange Range `json:"targetSelectionRange"`
2586 * The log message parameters.
2588 type LogMessageParams struct {
2590 * The message type. See {@link MessageType}
2592 Type MessageType `json:"type"`
2594 * The actual message
2596 Message string `json:"message"`
2599 type LogTraceParams struct {
2600 Message string `json:"message"`
2601 Verbose string `json:"verbose,omitempty"`
2605 * Client capabilities specific to the used markdown parser.
2609 type MarkdownClientCapabilities struct {
2611 * The name of the parser.
2613 Parser string `json:"parser"`
2615 * The version of the parser.
2617 Version string `json:"version,omitempty"`
2621 * MarkedString can be used to render human readable text. It is either a markdown string
2622 * or a code-block that provides a language and a code snippet. The language identifier
2623 * is semantically equal to the optional language identifier in fenced code blocks in GitHub
2624 * issues. See https://help.github.com/articles/creating-and-highlighting-code-blocks/#syntax-highlighting
2626 * The pair of a language and a value is an equivalent to markdown:
2631 * Note that markdown strings will be sanitized - that means html will be escaped.
2632 * @deprecated use MarkupContent instead.
2634 type MarkedString = string /*string | { language: string; value: string }*/
2637 * A `MarkupContent` literal represents a string value which content is interpreted base on its
2638 * kind flag. Currently the protocol supports `plaintext` and `markdown` as markup kinds.
2640 * If the kind is `markdown` then the value can contain fenced code blocks like in GitHub issues.
2641 * See https://help.github.com/articles/creating-and-highlighting-code-blocks/#syntax-highlighting
2643 * Here is an example how such a string can be constructed using JavaScript / TypeScript:
2645 * let markdown: MarkdownContent = {
2646 * kind: MarkupKind.Markdown,
2657 * *Please Note* that clients might sanitize the return markdown. A client could decide to
2658 * remove HTML from the markdown to avoid script execution.
2660 type MarkupContent struct {
2662 * The type of the Markup
2664 Kind MarkupKind `json:"kind"`
2666 * The content itself
2668 Value string `json:"value"`
2672 * Describes the content type that a client supports in various
2673 * result literals like `Hover`, `ParameterInfo` or `CompletionItem`.
2675 * Please note that `MarkupKinds` must not start with a `$`. This kinds
2676 * are reserved for internal usage.
2678 type MarkupKind string
2680 type MessageActionItem struct {
2682 * A short title like 'Retry', 'Open Log' etc.
2684 Title string `json:"title"`
2690 type MessageType float64
2693 * Moniker definition to match LSIF 0.5 moniker definition.
2697 type Moniker struct {
2699 * The scheme of the moniker. For example tsc or .Net
2701 Scheme string `json:"scheme"`
2703 * The identifier of the moniker. The value is opaque in LSIF however
2704 * schema owners are allowed to define the structure if they want.
2706 Identifier string `json:"identifier"`
2708 * The scope in which the moniker is unique
2710 Unique UniquenessLevel `json:"unique"`
2712 * The moniker kind if known.
2714 Kind MonikerKind `json:"kind,omitempty"`
2718 * Client capabilities specific to the moniker request.
2722 type MonikerClientCapabilities struct {
2724 * Whether moniker supports dynamic registration. If this is set to `true`
2725 * the client supports the new `MonikerRegistrationOptions` return value
2726 * for the corresponding server capability as well.
2728 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
2736 type MonikerKind string
2738 type MonikerOptions struct {
2739 WorkDoneProgressOptions
2742 type MonikerParams struct {
2743 TextDocumentPositionParams
2744 WorkDoneProgressParams
2748 type MonikerRegistrationOptions struct {
2749 TextDocumentRegistrationOptions
2754 * A text document identifier to optionally denote a specific version of a text document.
2756 type OptionalVersionedTextDocumentIdentifier struct {
2758 * The version number of this document. If a versioned text document identifier
2759 * is sent from the server to the client and the file is not open in the editor
2760 * (the server has not received an open notification before) the server can send
2761 * `null` to indicate that the version is unknown and the content on disk is the
2762 * truth (as specified with document content ownership).
2764 Version int32/*integer | null*/ `json:"version"`
2765 TextDocumentIdentifier
2769 * Represents a parameter of a callable-signature. A parameter can
2770 * have a label and a doc-comment.
2772 type ParameterInformation struct {
2774 * The label of this parameter information.
2776 * Either a string or an inclusive start and exclusive end offsets within its containing
2777 * signature label. (see SignatureInformation.label). The offsets are based on a UTF-16
2778 * string representation as `Position` and `Range` does.
2780 * *Note*: a label of type string should be a substring of its containing signature label.
2781 * Its intended use case is to highlight the parameter label part in the `SignatureInformation.label`.
2783 Label string/*string | [uinteger, uinteger]*/ `json:"label"`
2785 * The human-readable doc-comment of this signature. Will be shown
2786 * in the UI but can be omitted.
2788 Documentation string/*string | MarkupContent*/ `json:"documentation,omitempty"`
2791 type PartialResultParams struct {
2793 * An optional token that a server can use to report partial results (e.g. streaming) to
2796 PartialResultToken ProgressToken `json:"partialResultToken,omitempty"`
2800 * Position in a text document expressed as zero-based line and character offset.
2801 * The offsets are based on a UTF-16 string representation. So a string of the form
2802 * `a𐐀b` the character offset of the character `a` is 0, the character offset of `𐐀`
2803 * is 1 and the character offset of b is 3 since `𐐀` is represented using two code
2806 * Positions are line end character agnostic. So you can not specify a position that
2807 * denotes `\r|\n` or `\n|` where `|` represents the character offset.
2809 type Position struct {
2811 * Line position in a document (zero-based).
2813 Line uint32 `json:"line"`
2815 * Character offset on a line in a document (zero-based). Assuming that the line is
2816 * represented as a string, the `character` value represents the gap between the
2817 * `character` and `character + 1`.
2819 * If the character value is greater than the line length it defaults back to the
2822 Character uint32 `json:"character"`
2825 type PrepareRenameParams struct {
2826 TextDocumentPositionParams
2827 WorkDoneProgressParams
2830 type PrepareSupportDefaultBehavior = interface{}
2832 type ProgressParams struct {
2834 * The progress token provided by the client or server.
2836 Token ProgressToken `json:"token"`
2838 * The progress data.
2840 Value interface{} `json:"value"`
2843 type ProgressToken = interface{} /*number | string*/
2846 * The publish diagnostic client capabilities.
2848 type PublishDiagnosticsClientCapabilities struct {
2850 * Whether the clients accepts diagnostics with related information.
2852 RelatedInformation bool `json:"relatedInformation,omitempty"`
2854 * Client supports the tag property to provide meta data about a diagnostic.
2855 * Clients supporting tags have to handle unknown tags gracefully.
2861 * The tags supported by the client.
2863 ValueSet []DiagnosticTag `json:"valueSet"`
2864 } `json:"tagSupport,omitempty"`
2866 * Whether the client interprets the version property of the
2867 * `textDocument/publishDiagnostics` notification`s parameter.
2871 VersionSupport bool `json:"versionSupport,omitempty"`
2873 * Client supports a codeDescription property
2877 CodeDescriptionSupport bool `json:"codeDescriptionSupport,omitempty"`
2879 * Whether code action supports the `data` property which is
2880 * preserved between a `textDocument/publishDiagnostics` and
2881 * `textDocument/codeAction` request.
2885 DataSupport bool `json:"dataSupport,omitempty"`
2889 * The publish diagnostic notification's parameters.
2891 type PublishDiagnosticsParams struct {
2893 * The URI for which diagnostic information is reported.
2895 URI DocumentURI `json:"uri"`
2897 * Optional the version number of the document the diagnostics are published for.
2901 Version int32 `json:"version,omitempty"`
2903 * An array of diagnostic information items.
2905 Diagnostics []Diagnostic `json:"diagnostics"`
2909 * A range in a text document expressed as (zero-based) start and end positions.
2911 * If you want to specify a range that contains a line including the line ending
2912 * character(s) then use an end position denoting the start of the next line.
2916 * start: { line: 5, character: 23 }
2917 * end : { line 6, character : 0 }
2923 * The range's start position
2925 Start Position `json:"start"`
2927 * The range's end position.
2929 End Position `json:"end"`
2933 * Client Capabilities for a [ReferencesRequest](#ReferencesRequest).
2935 type ReferenceClientCapabilities struct {
2937 * Whether references supports dynamic registration.
2939 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
2943 * Value-object that contains additional information when
2944 * requesting references.
2946 type ReferenceContext struct {
2948 * Include the declaration of the current symbol.
2950 IncludeDeclaration bool `json:"includeDeclaration"`
2954 * Reference options.
2956 type ReferenceOptions struct {
2957 WorkDoneProgressOptions
2961 * Parameters for a [ReferencesRequest](#ReferencesRequest).
2963 type ReferenceParams struct {
2964 Context ReferenceContext `json:"context"`
2965 TextDocumentPositionParams
2966 WorkDoneProgressParams
2971 * General parameters to to register for an notification or to register a provider.
2973 type Registration struct {
2975 * The id used to register the request. The id can be used to deregister
2976 * the request again.
2978 ID string `json:"id"`
2980 * The method to register for.
2982 Method string `json:"method"`
2984 * Options necessary for the registration.
2986 RegisterOptions interface{} `json:"registerOptions,omitempty"`
2989 type RegistrationParams struct {
2990 Registrations []Registration `json:"registrations"`
2994 * Client capabilities specific to regular expressions.
2998 type RegularExpressionsClientCapabilities struct {
3000 * The engine's name.
3002 Engine string `json:"engine"`
3004 * The engine's version.
3006 Version string `json:"version,omitempty"`
3009 type RenameClientCapabilities struct {
3011 * Whether rename supports dynamic registration.
3013 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
3015 * Client supports testing for validity of rename operations
3020 PrepareSupport bool `json:"prepareSupport,omitempty"`
3022 * Client supports the default behavior result.
3024 * The value indicates the default behavior used by the
3029 PrepareSupportDefaultBehavior PrepareSupportDefaultBehavior `json:"prepareSupportDefaultBehavior,omitempty"`
3031 * Whether th client honors the change annotations in
3032 * text edits and resource operations returned via the
3033 * rename request's workspace edit by for example presenting
3034 * the workspace edit in the user interface and asking
3039 HonorsChangeAnnotations bool `json:"honorsChangeAnnotations,omitempty"`
3043 * Rename file operation
3045 type RenameFile struct {
3049 Kind string `json:"kind"`
3051 * The old (existing) location.
3053 OldURI DocumentURI `json:"oldUri"`
3057 NewURI DocumentURI `json:"newUri"`
3061 Options RenameFileOptions `json:"options,omitempty"`
3066 * Rename file options
3068 type RenameFileOptions struct {
3070 * Overwrite target if existing. Overwrite wins over `ignoreIfExists`
3072 Overwrite bool `json:"overwrite,omitempty"`
3074 * Ignores if target exists.
3076 IgnoreIfExists bool `json:"ignoreIfExists,omitempty"`
3080 * The parameters sent in file rename requests/notifications.
3084 type RenameFilesParams struct {
3086 * An array of all files/folders renamed in this operation. When a folder is renamed, only
3087 * the folder will be included, and not its children.
3089 Files []FileRename `json:"files"`
3093 * Provider options for a [RenameRequest](#RenameRequest).
3095 type RenameOptions struct {
3097 * Renames should be checked and tested before being executed.
3099 * @since version 3.12.0
3101 PrepareProvider bool `json:"prepareProvider,omitempty"`
3102 WorkDoneProgressOptions
3106 * The parameters of a [RenameRequest](#RenameRequest).
3108 type RenameParams struct {
3110 * The document to rename.
3112 TextDocument TextDocumentIdentifier `json:"textDocument"`
3114 * The position at which this request was sent.
3116 Position Position `json:"position"`
3118 * The new name of the symbol. If the given name is not valid the
3119 * request must return a [ResponseError](#ResponseError) with an
3120 * appropriate message set.
3122 NewName string `json:"newName"`
3123 WorkDoneProgressParams
3127 * A generic resource operation.
3129 type ResourceOperation struct {
3131 * The resource operation kind.
3133 Kind string `json:"kind"`
3135 * An optional annotation identifier describing the operation.
3139 AnnotationID ChangeAnnotationIdentifier `json:"annotationId,omitempty"`
3142 type ResourceOperationKind string
3147 type SaveOptions struct {
3149 * The client is supposed to include the content on save.
3151 IncludeText bool `json:"includeText,omitempty"`
3155 * A selection range represents a part of a selection hierarchy. A selection range
3156 * may have a parent selection range that contains it.
3158 type SelectionRange struct {
3160 * The [range](#Range) of this selection range.
3162 Range Range `json:"range"`
3164 * The parent selection range containing this range. Therefore `parent.range` must contain `this.range`.
3166 Parent *SelectionRange `json:"parent,omitempty"`
3169 type SelectionRangeClientCapabilities struct {
3171 * Whether implementation supports dynamic registration for selection range providers. If this is set to `true`
3172 * the client supports the new `SelectionRangeRegistrationOptions` return value for the corresponding server
3173 * capability as well.
3175 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
3178 type SelectionRangeOptions struct {
3179 WorkDoneProgressOptions
3183 * A parameter literal used in selection range requests.
3185 type SelectionRangeParams struct {
3187 * The text document.
3189 TextDocument TextDocumentIdentifier `json:"textDocument"`
3191 * The positions inside the text document.
3193 Positions []Position `json:"positions"`
3194 WorkDoneProgressParams
3198 type SelectionRangeRegistrationOptions struct {
3199 SelectionRangeOptions
3200 TextDocumentRegistrationOptions
3201 StaticRegistrationOptions
3207 type SemanticTokens struct {
3209 * An optional result id. If provided and clients support delta updating
3210 * the client will include the result id in the next semantic token request.
3211 * A server can then instead of computing all semantic tokens again simply
3214 ResultID string `json:"resultId,omitempty"`
3216 * The actual tokens.
3218 Data []uint32 `json:"data"`
3224 type SemanticTokensClientCapabilities struct {
3226 * Whether implementation supports dynamic registration. If this is set to `true`
3227 * the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`
3228 * return value for the corresponding server capability as well.
3230 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
3232 * Which requests the client supports and might send to the server
3233 * depending on the server's capability. Please note that clients might not
3234 * show semantic tokens or degrade some of the user experience if a range
3235 * or full request is advertised by the client but not provided by the
3236 * server. If for example the client capability `requests.full` and
3237 * `request.range` are both set to true but the server only provides a
3238 * range provider the client might not render a minimap correctly or might
3239 * even decide to not show any semantic tokens at all.
3243 * The client will send the `textDocument/semanticTokens/range` request if
3244 * the server provides a corresponding handler.
3246 Range bool/*boolean | { }*/ `json:"range,omitempty"`
3248 * The client will send the `textDocument/semanticTokens/full` request if
3249 * the server provides a corresponding handler.
3251 Full interface{}/*boolean | <elided struct>*/ `json:"full,omitempty"`
3254 * The token types that the client supports.
3256 TokenTypes []string `json:"tokenTypes"`
3258 * The token modifiers that the client supports.
3260 TokenModifiers []string `json:"tokenModifiers"`
3262 * The token formats the clients supports.
3264 Formats []TokenFormat `json:"formats"`
3266 * Whether the client supports tokens that can overlap each other.
3268 OverlappingTokenSupport bool `json:"overlappingTokenSupport,omitempty"`
3270 * Whether the client supports tokens that can span multiple lines.
3272 MultilineTokenSupport bool `json:"multilineTokenSupport,omitempty"`
3278 type SemanticTokensDelta struct {
3279 ResultID string `json:"resultId,omitempty"`
3281 * The semantic token edits to transform a previous result into a new result.
3283 Edits []SemanticTokensEdit `json:"edits"`
3289 type SemanticTokensDeltaParams struct {
3291 * The text document.
3293 TextDocument TextDocumentIdentifier `json:"textDocument"`
3295 * The result id of a previous response. The result Id can either point to a full response
3296 * or a delta response depending on what was received last.
3298 PreviousResultID string `json:"previousResultId"`
3299 WorkDoneProgressParams
3306 type SemanticTokensEdit struct {
3308 * The start offset of the edit.
3310 Start uint32 `json:"start"`
3312 * The count of elements to remove.
3314 DeleteCount uint32 `json:"deleteCount"`
3316 * The elements to insert.
3318 Data []uint32 `json:"data,omitempty"`
3324 type SemanticTokensLegend struct {
3326 * The token types a server uses.
3328 TokenTypes []string `json:"tokenTypes"`
3330 * The token modifiers a server uses.
3332 TokenModifiers []string `json:"tokenModifiers"`
3338 type SemanticTokensOptions struct {
3340 * The legend used by the server
3342 Legend SemanticTokensLegend `json:"legend"`
3344 * Server supports providing semantic tokens for a specific range
3347 Range bool/*boolean | { }*/ `json:"range,omitempty"`
3349 * Server supports providing semantic tokens for a full document.
3351 Full interface{}/*boolean | <elided struct>*/ `json:"full,omitempty"`
3352 WorkDoneProgressOptions
3358 type SemanticTokensParams struct {
3360 * The text document.
3362 TextDocument TextDocumentIdentifier `json:"textDocument"`
3363 WorkDoneProgressParams
3370 type SemanticTokensRangeParams struct {
3372 * The text document.
3374 TextDocument TextDocumentIdentifier `json:"textDocument"`
3376 * The range the semantic tokens are requested for.
3378 Range Range `json:"range"`
3379 WorkDoneProgressParams
3386 type SemanticTokensRegistrationOptions struct {
3387 TextDocumentRegistrationOptions
3388 SemanticTokensOptions
3389 StaticRegistrationOptions
3392 type SemanticTokensWorkspaceClientCapabilities struct {
3394 * Whether the client implementation supports a refresh request sent from
3395 * the server to the client.
3397 * Note that this event is global and will force the client to refresh all
3398 * semantic tokens currently shown. It should be used with absolute care
3399 * and is useful for situation where a server for example detect a project
3400 * wide change that requires such a calculation.
3402 RefreshSupport bool `json:"refreshSupport,omitempty"`
3405 type ServerCapabilities struct {
3407 * Defines how text documents are synced. Is either a detailed structure defining each notification or
3408 * for backwards compatibility the TextDocumentSyncKind number.
3410 TextDocumentSync interface{}/*TextDocumentSyncOptions | TextDocumentSyncKind*/ `json:"textDocumentSync,omitempty"`
3412 * The server provides completion support.
3414 CompletionProvider CompletionOptions `json:"completionProvider,omitempty"`
3416 * The server provides hover support.
3418 HoverProvider bool/*boolean | HoverOptions*/ `json:"hoverProvider,omitempty"`
3420 * The server provides signature help support.
3422 SignatureHelpProvider SignatureHelpOptions `json:"signatureHelpProvider,omitempty"`
3424 * The server provides Goto Declaration support.
3426 DeclarationProvider interface{}/* bool | DeclarationOptions | DeclarationRegistrationOptions*/ `json:"declarationProvider,omitempty"`
3428 * The server provides goto definition support.
3430 DefinitionProvider bool/*boolean | DefinitionOptions*/ `json:"definitionProvider,omitempty"`
3432 * The server provides Goto Type Definition support.
3434 TypeDefinitionProvider interface{}/* bool | TypeDefinitionOptions | TypeDefinitionRegistrationOptions*/ `json:"typeDefinitionProvider,omitempty"`
3436 * The server provides Goto Implementation support.
3438 ImplementationProvider interface{}/* bool | ImplementationOptions | ImplementationRegistrationOptions*/ `json:"implementationProvider,omitempty"`
3440 * The server provides find references support.
3442 ReferencesProvider bool/*boolean | ReferenceOptions*/ `json:"referencesProvider,omitempty"`
3444 * The server provides document highlight support.
3446 DocumentHighlightProvider bool/*boolean | DocumentHighlightOptions*/ `json:"documentHighlightProvider,omitempty"`
3448 * The server provides document symbol support.
3450 DocumentSymbolProvider bool/*boolean | DocumentSymbolOptions*/ `json:"documentSymbolProvider,omitempty"`
3452 * The server provides code actions. CodeActionOptions may only be
3453 * specified if the client states that it supports
3454 * `codeActionLiteralSupport` in its initial `initialize` request.
3456 CodeActionProvider interface{}/*boolean | CodeActionOptions*/ `json:"codeActionProvider,omitempty"`
3458 * The server provides code lens.
3460 CodeLensProvider CodeLensOptions `json:"codeLensProvider,omitempty"`
3462 * The server provides document link support.
3464 DocumentLinkProvider DocumentLinkOptions `json:"documentLinkProvider,omitempty"`
3466 * The server provides color provider support.
3468 ColorProvider interface{}/* bool | DocumentColorOptions | DocumentColorRegistrationOptions*/ `json:"colorProvider,omitempty"`
3470 * The server provides workspace symbol support.
3472 WorkspaceSymbolProvider bool/*boolean | WorkspaceSymbolOptions*/ `json:"workspaceSymbolProvider,omitempty"`
3474 * The server provides document formatting.
3476 DocumentFormattingProvider bool/*boolean | DocumentFormattingOptions*/ `json:"documentFormattingProvider,omitempty"`
3478 * The server provides document range formatting.
3480 DocumentRangeFormattingProvider bool/*boolean | DocumentRangeFormattingOptions*/ `json:"documentRangeFormattingProvider,omitempty"`
3482 * The server provides document formatting on typing.
3484 DocumentOnTypeFormattingProvider DocumentOnTypeFormattingOptions `json:"documentOnTypeFormattingProvider,omitempty"`
3486 * The server provides rename support. RenameOptions may only be
3487 * specified if the client states that it supports
3488 * `prepareSupport` in its initial `initialize` request.
3490 RenameProvider interface{}/*boolean | RenameOptions*/ `json:"renameProvider,omitempty"`
3492 * The server provides folding provider support.
3494 FoldingRangeProvider interface{}/* bool | FoldingRangeOptions | FoldingRangeRegistrationOptions*/ `json:"foldingRangeProvider,omitempty"`
3496 * The server provides selection range support.
3498 SelectionRangeProvider interface{}/* bool | SelectionRangeOptions | SelectionRangeRegistrationOptions*/ `json:"selectionRangeProvider,omitempty"`
3500 * The server provides execute command support.
3502 ExecuteCommandProvider ExecuteCommandOptions `json:"executeCommandProvider,omitempty"`
3504 * The server provides call hierarchy support.
3508 CallHierarchyProvider interface{}/* bool | CallHierarchyOptions | CallHierarchyRegistrationOptions*/ `json:"callHierarchyProvider,omitempty"`
3510 * The server provides linked editing range support.
3514 LinkedEditingRangeProvider interface{}/* bool | LinkedEditingRangeOptions | LinkedEditingRangeRegistrationOptions*/ `json:"linkedEditingRangeProvider,omitempty"`
3516 * The server provides semantic tokens support.
3520 SemanticTokensProvider interface{}/*SemanticTokensOptions | SemanticTokensRegistrationOptions*/ `json:"semanticTokensProvider,omitempty"`
3522 * The workspace server capabilities
3524 Workspace Workspace5Gn `json:"workspace,omitempty"`
3526 * The server provides moniker support.
3530 MonikerProvider interface{}/* bool | MonikerOptions | MonikerRegistrationOptions*/ `json:"monikerProvider,omitempty"`
3532 * Experimental server capabilities.
3534 Experimental interface{} `json:"experimental,omitempty"`
3537 type SetTraceParams struct {
3538 Value TraceValues `json:"value"`
3542 * Client capabilities for the show document request.
3546 type ShowDocumentClientCapabilities struct {
3548 * The client has support for the show document
3551 Support bool `json:"support"`
3555 * Params to show a document.
3559 type ShowDocumentParams struct {
3561 * The document uri to show.
3563 URI URI `json:"uri"`
3565 * Indicates to show the resource in an external program.
3566 * To show for example `https://code.visualstudio.com/`
3567 * in the default WEB browser set `external` to `true`.
3569 External bool `json:"external,omitempty"`
3571 * An optional property to indicate whether the editor
3572 * showing the document should take focus or not.
3573 * Clients might ignore this property if an external
3574 * program in started.
3576 TakeFocus bool `json:"takeFocus,omitempty"`
3578 * An optional selection range if the document is a text
3579 * document. Clients might ignore the property if an
3580 * external program is started or the file is not a text
3583 Selection Range `json:"selection,omitempty"`
3587 * The result of an show document request.
3591 type ShowDocumentResult struct {
3593 * A boolean indicating if the show was successful.
3595 Success bool `json:"success"`
3599 * The parameters of a notification message.
3601 type ShowMessageParams struct {
3603 * The message type. See {@link MessageType}
3605 Type MessageType `json:"type"`
3607 * The actual message
3609 Message string `json:"message"`
3613 * Show message request client capabilities
3615 type ShowMessageRequestClientCapabilities struct {
3617 * Capabilities specific to the `MessageActionItem` type.
3619 MessageActionItem struct {
3621 * Whether the client supports additional attributes which
3622 * are preserved and send back to the server in the
3623 * request's response.
3625 AdditionalPropertiesSupport bool `json:"additionalPropertiesSupport,omitempty"`
3626 } `json:"messageActionItem,omitempty"`
3629 type ShowMessageRequestParams struct {
3631 * The message type. See {@link MessageType}
3633 Type MessageType `json:"type"`
3635 * The actual message
3637 Message string `json:"message"`
3639 * The message action items to present.
3641 Actions []MessageActionItem `json:"actions,omitempty"`
3645 * Signature help represents the signature of something
3646 * callable. There can be multiple signature but only one
3647 * active and only one active parameter.
3649 type SignatureHelp struct {
3651 * One or more signatures.
3653 Signatures []SignatureInformation `json:"signatures"`
3655 * The active signature. Set to `null` if no
3658 ActiveSignature uint32/*uinteger | null*/ `json:"activeSignature"`
3660 * The active parameter of the active signature. Set to `null`
3661 * if the active signature has no parameters.
3663 ActiveParameter uint32/*uinteger | null*/ `json:"activeParameter"`
3667 * Client Capabilities for a [SignatureHelpRequest](#SignatureHelpRequest).
3669 type SignatureHelpClientCapabilities struct {
3671 * Whether signature help supports dynamic registration.
3673 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
3675 * The client supports the following `SignatureInformation`
3676 * specific properties.
3678 SignatureInformation struct {
3680 * Client supports the follow content formats for the documentation
3681 * property. The order describes the preferred format of the client.
3683 DocumentationFormat []MarkupKind `json:"documentationFormat,omitempty"`
3685 * Client capabilities specific to parameter information.
3687 ParameterInformation struct {
3689 * The client supports processing label offsets instead of a
3690 * simple label string.
3694 LabelOffsetSupport bool `json:"labelOffsetSupport,omitempty"`
3695 } `json:"parameterInformation,omitempty"`
3697 * The client support the `activeParameter` property on `SignatureInformation`
3702 ActiveParameterSupport bool `json:"activeParameterSupport,omitempty"`
3703 } `json:"signatureInformation,omitempty"`
3705 * The client supports to send additional context information for a
3706 * `textDocument/signatureHelp` request. A client that opts into
3707 * contextSupport will also support the `retriggerCharacters` on
3708 * `SignatureHelpOptions`.
3712 ContextSupport bool `json:"contextSupport,omitempty"`
3716 * Additional information about the context in which a signature help request was triggered.
3720 type SignatureHelpContext struct {
3722 * Action that caused signature help to be triggered.
3724 TriggerKind SignatureHelpTriggerKind `json:"triggerKind"`
3726 * Character that caused signature help to be triggered.
3728 * This is undefined when `triggerKind !== SignatureHelpTriggerKind.TriggerCharacter`
3730 TriggerCharacter string `json:"triggerCharacter,omitempty"`
3732 * `true` if signature help was already showing when it was triggered.
3734 * Retrigger occurs when the signature help is already active and can be caused by actions such as
3735 * typing a trigger character, a cursor move, or document content changes.
3737 IsRetrigger bool `json:"isRetrigger"`
3739 * The currently active `SignatureHelp`.
3741 * The `activeSignatureHelp` has its `SignatureHelp.activeSignature` field updated based on
3742 * the user navigating through available signatures.
3744 ActiveSignatureHelp SignatureHelp `json:"activeSignatureHelp,omitempty"`
3748 * Server Capabilities for a [SignatureHelpRequest](#SignatureHelpRequest).
3750 type SignatureHelpOptions struct {
3752 * List of characters that trigger signature help.
3754 TriggerCharacters []string `json:"triggerCharacters,omitempty"`
3756 * List of characters that re-trigger signature help.
3758 * These trigger characters are only active when signature help is already showing. All trigger characters
3759 * are also counted as re-trigger characters.
3763 RetriggerCharacters []string `json:"retriggerCharacters,omitempty"`
3764 WorkDoneProgressOptions
3768 * Parameters for a [SignatureHelpRequest](#SignatureHelpRequest).
3770 type SignatureHelpParams struct {
3772 * The signature help context. This is only available if the client specifies
3773 * to send this using the client capability `textDocument.signatureHelp.contextSupport === true`
3777 Context SignatureHelpContext `json:"context,omitempty"`
3778 TextDocumentPositionParams
3779 WorkDoneProgressParams
3783 * How a signature help was triggered.
3787 type SignatureHelpTriggerKind float64
3790 * Represents the signature of something callable. A signature
3791 * can have a label, like a function-name, a doc-comment, and
3792 * a set of parameters.
3794 type SignatureInformation struct {
3796 * The label of this signature. Will be shown in
3799 Label string `json:"label"`
3801 * The human-readable doc-comment of this signature. Will be shown
3802 * in the UI but can be omitted.
3804 Documentation string/*string | MarkupContent*/ `json:"documentation,omitempty"`
3806 * The parameters of this signature.
3808 Parameters []ParameterInformation `json:"parameters,omitempty"`
3810 * The index of the active parameter.
3812 * If provided, this is used in place of `SignatureHelp.activeParameter`.
3816 ActiveParameter uint32 `json:"activeParameter,omitempty"`
3820 * Static registration options to be returned in the initialize
3823 type StaticRegistrationOptions struct {
3825 * The id used to register the request. The id can be used to deregister
3826 * the request again. See also Registration#id.
3828 ID string `json:"id,omitempty"`
3832 * Represents information about programming constructs like variables, classes,
3835 type SymbolInformation struct {
3837 * The name of this symbol.
3839 Name string `json:"name"`
3841 * The kind of this symbol.
3843 Kind SymbolKind `json:"kind"`
3845 * Tags for this completion item.
3849 Tags []SymbolTag `json:"tags,omitempty"`
3851 * Indicates if this symbol is deprecated.
3853 * @deprecated Use tags instead
3855 Deprecated bool `json:"deprecated,omitempty"`
3857 * The location of this symbol. The location's range is used by a tool
3858 * to reveal the location in the editor. If the symbol is selected in the
3859 * tool the range's start information is used to position the cursor. So
3860 * the range usually spans more than the actual symbol's name and does
3861 * normally include thinks like visibility modifiers.
3863 * The range doesn't have to denote a node range in the sense of a abstract
3864 * syntax tree. It can therefore not be used to re-construct a hierarchy of
3867 Location Location `json:"location"`
3869 * The name of the symbol containing this symbol. This information is for
3870 * user interface purposes (e.g. to render a qualifier in the user interface
3871 * if necessary). It can't be used to re-infer a hierarchy for the document
3874 ContainerName string `json:"containerName,omitempty"`
3880 type SymbolKind float64
3883 * Symbol tags are extra annotations that tweak the rendering of a symbol.
3886 type SymbolTag float64
3889 * Text document specific client capabilities.
3891 type TextDocumentClientCapabilities struct {
3893 * Defines which synchronization capabilities the client supports.
3895 Synchronization TextDocumentSyncClientCapabilities `json:"synchronization,omitempty"`
3897 * Capabilities specific to the `textDocument/completion`
3899 Completion CompletionClientCapabilities `json:"completion,omitempty"`
3901 * Capabilities specific to the `textDocument/hover`
3903 Hover HoverClientCapabilities `json:"hover,omitempty"`
3905 * Capabilities specific to the `textDocument/signatureHelp`
3907 SignatureHelp SignatureHelpClientCapabilities `json:"signatureHelp,omitempty"`
3909 * Capabilities specific to the `textDocument/declaration`
3913 Declaration DeclarationClientCapabilities `json:"declaration,omitempty"`
3915 * Capabilities specific to the `textDocument/definition`
3917 Definition DefinitionClientCapabilities `json:"definition,omitempty"`
3919 * Capabilities specific to the `textDocument/typeDefinition`
3923 TypeDefinition TypeDefinitionClientCapabilities `json:"typeDefinition,omitempty"`
3925 * Capabilities specific to the `textDocument/implementation`
3929 Implementation ImplementationClientCapabilities `json:"implementation,omitempty"`
3931 * Capabilities specific to the `textDocument/references`
3933 References ReferenceClientCapabilities `json:"references,omitempty"`
3935 * Capabilities specific to the `textDocument/documentHighlight`
3937 DocumentHighlight DocumentHighlightClientCapabilities `json:"documentHighlight,omitempty"`
3939 * Capabilities specific to the `textDocument/documentSymbol`
3941 DocumentSymbol DocumentSymbolClientCapabilities `json:"documentSymbol,omitempty"`
3943 * Capabilities specific to the `textDocument/codeAction`
3945 CodeAction CodeActionClientCapabilities `json:"codeAction,omitempty"`
3947 * Capabilities specific to the `textDocument/codeLens`
3949 CodeLens CodeLensClientCapabilities `json:"codeLens,omitempty"`
3951 * Capabilities specific to the `textDocument/documentLink`
3953 DocumentLink DocumentLinkClientCapabilities `json:"documentLink,omitempty"`
3955 * Capabilities specific to the `textDocument/documentColor`
3957 ColorProvider DocumentColorClientCapabilities `json:"colorProvider,omitempty"`
3959 * Capabilities specific to the `textDocument/formatting`
3961 Formatting DocumentFormattingClientCapabilities `json:"formatting,omitempty"`
3963 * Capabilities specific to the `textDocument/rangeFormatting`
3965 RangeFormatting DocumentRangeFormattingClientCapabilities `json:"rangeFormatting,omitempty"`
3967 * Capabilities specific to the `textDocument/onTypeFormatting`
3969 OnTypeFormatting DocumentOnTypeFormattingClientCapabilities `json:"onTypeFormatting,omitempty"`
3971 * Capabilities specific to the `textDocument/rename`
3973 Rename RenameClientCapabilities `json:"rename,omitempty"`
3975 * Capabilities specific to `textDocument/foldingRange` request.
3979 FoldingRange FoldingRangeClientCapabilities `json:"foldingRange,omitempty"`
3981 * Capabilities specific to `textDocument/selectionRange` request.
3985 SelectionRange SelectionRangeClientCapabilities `json:"selectionRange,omitempty"`
3987 * Capabilities specific to `textDocument/publishDiagnostics` notification.
3989 PublishDiagnostics PublishDiagnosticsClientCapabilities `json:"publishDiagnostics,omitempty"`
3991 * Capabilities specific to the various call hierarchy request.
3995 CallHierarchy CallHierarchyClientCapabilities `json:"callHierarchy,omitempty"`
3997 * Capabilities specific to the various semantic token request.
4001 SemanticTokens SemanticTokensClientCapabilities `json:"semanticTokens,omitempty"`
4003 * Capabilities specific to the linked editing range request.
4007 LinkedEditingRange LinkedEditingRangeClientCapabilities `json:"linkedEditingRange,omitempty"`
4009 * Client capabilities specific to the moniker request.
4013 Moniker MonikerClientCapabilities `json:"moniker,omitempty"`
4017 * An event describing a change to a text document. If range and rangeLength are omitted
4018 * the new text is considered to be the full content of the document.
4020 type TextDocumentContentChangeEvent = struct {
4022 * The range of the document that changed.
4024 Range *Range `json:"range,omitempty"`
4026 * The optional length of the range that got replaced.
4028 * @deprecated use range instead.
4030 RangeLength uint32 `json:"rangeLength,omitempty"`
4032 * The new text for the provided range.
4034 Text string `json:"text"`
4038 * Describes textual changes on a text document. A TextDocumentEdit describes all changes
4039 * on a document version Si and after they are applied move the document to version Si+1.
4040 * So the creator of a TextDocumentEdit doesn't need to sort the array of edits or do any
4041 * kind of ordering. However the edits must be non overlapping.
4043 type TextDocumentEdit struct {
4045 * The text document to change.
4047 TextDocument OptionalVersionedTextDocumentIdentifier `json:"textDocument"`
4049 * The edits to be applied.
4051 * @since 3.16.0 - support for AnnotatedTextEdit. This is guarded using a
4052 * client capability.
4054 Edits []TextEdit/*TextEdit | AnnotatedTextEdit*/ `json:"edits"`
4058 * A literal to identify a text document in the client.
4060 type TextDocumentIdentifier struct {
4062 * The text document's uri.
4064 URI DocumentURI `json:"uri"`
4068 * An item to transfer a text document from the client to the
4071 type TextDocumentItem struct {
4073 * The text document's uri.
4075 URI DocumentURI `json:"uri"`
4077 * The text document's language identifier
4079 LanguageID string `json:"languageId"`
4081 * The version number of this document (it will increase after each
4082 * change, including undo/redo).
4084 Version int32 `json:"version"`
4086 * The content of the opened text document.
4088 Text string `json:"text"`
4092 * A parameter literal used in requests to pass a text document and a position inside that
4095 type TextDocumentPositionParams struct {
4097 * The text document.
4099 TextDocument TextDocumentIdentifier `json:"textDocument"`
4101 * The position inside the text document.
4103 Position Position `json:"position"`
4107 * General text document registration options.
4109 type TextDocumentRegistrationOptions struct {
4111 * A document selector to identify the scope of the registration. If set to null
4112 * the document selector provided on the client side will be used.
4114 DocumentSelector DocumentSelector /*DocumentSelector | null*/ `json:"documentSelector"`
4118 * Represents reasons why a text document is saved.
4120 type TextDocumentSaveReason float64
4122 type TextDocumentSyncClientCapabilities struct {
4124 * Whether text document synchronization supports dynamic registration.
4126 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
4128 * The client supports sending will save notifications.
4130 WillSave bool `json:"willSave,omitempty"`
4132 * The client supports sending a will save request and
4133 * waits for a response providing text edits which will
4134 * be applied to the document before it is saved.
4136 WillSaveWaitUntil bool `json:"willSaveWaitUntil,omitempty"`
4138 * The client supports did save notifications.
4140 DidSave bool `json:"didSave,omitempty"`
4144 * Defines how the host (editor) should sync
4145 * document changes to the language server.
4147 type TextDocumentSyncKind float64
4149 type TextDocumentSyncOptions struct {
4151 * Open and close notifications are sent to the server. If omitted open close notification should not
4154 OpenClose bool `json:"openClose,omitempty"`
4156 * Change notifications are sent to the server. See TextDocumentSyncKind.None, TextDocumentSyncKind.Full
4157 * and TextDocumentSyncKind.Incremental. If omitted it defaults to TextDocumentSyncKind.None.
4159 Change TextDocumentSyncKind `json:"change,omitempty"`
4161 * If present will save notifications are sent to the server. If omitted the notification should not be
4164 WillSave bool `json:"willSave,omitempty"`
4166 * If present will save wait until requests are sent to the server. If omitted the request should not be
4169 WillSaveWaitUntil bool `json:"willSaveWaitUntil,omitempty"`
4171 * If present save notifications are sent to the server. If omitted the notification should not be
4174 Save SaveOptions/*boolean | SaveOptions*/ `json:"save,omitempty"`
4178 * A text edit applicable to a text document.
4180 type TextEdit struct {
4182 * The range of the text document to be manipulated. To insert
4183 * text into a document create a range where start === end.
4185 Range Range `json:"range"`
4187 * The string to be inserted. For delete operations use an
4190 NewText string `json:"newText"`
4193 type TokenFormat = string
4195 type TraceValues = string /*'off' | 'messages' | 'verbose'*/
4200 type TypeDefinitionClientCapabilities struct {
4202 * Whether implementation supports dynamic registration. If this is set to `true`
4203 * the client supports the new `TypeDefinitionRegistrationOptions` return value
4204 * for the corresponding server capability as well.
4206 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
4208 * The client supports additional metadata in the form of definition links.
4212 LinkSupport bool `json:"linkSupport,omitempty"`
4215 type TypeDefinitionOptions struct {
4216 WorkDoneProgressOptions
4219 type TypeDefinitionParams struct {
4220 TextDocumentPositionParams
4221 WorkDoneProgressParams
4225 type TypeDefinitionRegistrationOptions struct {
4226 TextDocumentRegistrationOptions
4227 TypeDefinitionOptions
4228 StaticRegistrationOptions
4232 * A tagging type for string properties that are actually URIs
4239 * Moniker uniqueness level to define scope of the moniker.
4243 type UniquenessLevel string
4246 * General parameters to unregister a request or notification.
4248 type Unregistration struct {
4250 * The id used to unregister the request or notification. Usually an id
4251 * provided during the register request.
4253 ID string `json:"id"`
4255 * The method to unregister for.
4257 Method string `json:"method"`
4260 type UnregistrationParams struct {
4261 Unregisterations []Unregistration `json:"unregisterations"`
4265 * A text document identifier to denote a specific version of a text document.
4267 type VersionedTextDocumentIdentifier struct {
4269 * The version number of this document.
4271 Version int32 `json:"version"`
4272 TextDocumentIdentifier
4275 type WatchKind float64
4278 * The parameters send in a will save text document notification.
4280 type WillSaveTextDocumentParams struct {
4282 * The document that will be saved.
4284 TextDocument TextDocumentIdentifier `json:"textDocument"`
4286 * The 'TextDocumentSaveReason'.
4288 Reason TextDocumentSaveReason `json:"reason"`
4291 type WindowClientCapabilities struct {
4293 * Whether client supports handling progress notifications. If set
4294 * servers are allowed to report in `workDoneProgress` property in the
4295 * request specific server capabilities.
4299 WorkDoneProgress bool `json:"workDoneProgress,omitempty"`
4301 * Capabilities specific to the showMessage request.
4305 ShowMessage ShowMessageRequestClientCapabilities `json:"showMessage,omitempty"`
4307 * Capabilities specific to the showDocument request.
4311 ShowDocument ShowDocumentClientCapabilities `json:"showDocument,omitempty"`
4314 type WorkDoneProgressBegin struct {
4315 Kind string `json:"kind"`
4317 * Mandatory title of the progress operation. Used to briefly inform about
4318 * the kind of operation being performed.
4320 * Examples: "Indexing" or "Linking dependencies".
4322 Title string `json:"title"`
4324 * Controls if a cancel button should show to allow the user to cancel the
4325 * long running operation. Clients that don't support cancellation are allowed
4326 * to ignore the setting.
4328 Cancellable bool `json:"cancellable,omitempty"`
4330 * Optional, more detailed associated progress message. Contains
4331 * complementary information to the `title`.
4333 * Examples: "3/25 files", "project/src/module2", "node_modules/some_dep".
4334 * If unset, the previous progress message (if any) is still valid.
4336 Message string `json:"message,omitempty"`
4338 * Optional progress percentage to display (value 100 is considered 100%).
4339 * If not provided infinite progress is assumed and clients are allowed
4340 * to ignore the `percentage` value in subsequent in report notifications.
4342 * The value should be steadily rising. Clients are free to ignore values
4343 * that are not following this rule. The value range is [0, 100].
4345 Percentage uint32 `json:"percentage,omitempty"`
4348 type WorkDoneProgressCancelParams struct {
4350 * The token to be used to report progress.
4352 Token ProgressToken `json:"token"`
4355 type WorkDoneProgressClientCapabilities struct {
4357 * Window specific client capabilities.
4361 * Whether client supports server initiated progress using the
4362 * `window/workDoneProgress/create` request.
4366 WorkDoneProgress bool `json:"workDoneProgress,omitempty"`
4368 * Capabilities specific to the showMessage request.
4372 ShowMessage ShowMessageRequestClientCapabilities `json:"showMessage,omitempty"`
4374 * Capabilities specific to the showDocument request.
4378 ShowDocument ShowDocumentClientCapabilities `json:"showDocument,omitempty"`
4379 } `json:"window,omitempty"`
4382 type WorkDoneProgressCreateParams struct {
4384 * The token to be used to report progress.
4386 Token ProgressToken `json:"token"`
4389 type WorkDoneProgressEnd struct {
4390 Kind string `json:"kind"`
4392 * Optional, a final message indicating to for example indicate the outcome
4395 Message string `json:"message,omitempty"`
4398 type WorkDoneProgressOptions struct {
4399 WorkDoneProgress bool `json:"workDoneProgress,omitempty"`
4402 type WorkDoneProgressParams struct {
4404 * An optional token that a server can use to report work done progress.
4406 WorkDoneToken ProgressToken `json:"workDoneToken,omitempty"`
4409 type WorkDoneProgressReport struct {
4410 Kind string `json:"kind"`
4412 * Controls enablement state of a cancel button.
4414 * Clients that don't support cancellation or don't support controlling the button's
4415 * enablement state are allowed to ignore the property.
4417 Cancellable bool `json:"cancellable,omitempty"`
4419 * Optional, more detailed associated progress message. Contains
4420 * complementary information to the `title`.
4422 * Examples: "3/25 files", "project/src/module2", "node_modules/some_dep".
4423 * If unset, the previous progress message (if any) is still valid.
4425 Message string `json:"message,omitempty"`
4427 * Optional progress percentage to display (value 100 is considered 100%).
4428 * If not provided infinite progress is assumed and clients are allowed
4429 * to ignore the `percentage` value in subsequent in report notifications.
4431 * The value should be steadily rising. Clients are free to ignore values
4432 * that are not following this rule. The value range is [0, 100]
4434 Percentage uint32 `json:"percentage,omitempty"`
4438 * Workspace specific client capabilities.
4440 type WorkspaceClientCapabilities struct {
4442 * The client supports applying batch edits
4443 * to the workspace by supporting the request
4444 * 'workspace/applyEdit'
4446 ApplyEdit bool `json:"applyEdit,omitempty"`
4448 * Capabilities specific to `WorkspaceEdit`s
4450 WorkspaceEdit WorkspaceEditClientCapabilities `json:"workspaceEdit,omitempty"`
4452 * Capabilities specific to the `workspace/didChangeConfiguration` notification.
4454 DidChangeConfiguration DidChangeConfigurationClientCapabilities `json:"didChangeConfiguration,omitempty"`
4456 * Capabilities specific to the `workspace/didChangeWatchedFiles` notification.
4458 DidChangeWatchedFiles DidChangeWatchedFilesClientCapabilities `json:"didChangeWatchedFiles,omitempty"`
4460 * Capabilities specific to the `workspace/symbol` request.
4462 Symbol WorkspaceSymbolClientCapabilities `json:"symbol,omitempty"`
4464 * Capabilities specific to the `workspace/executeCommand` request.
4466 ExecuteCommand ExecuteCommandClientCapabilities `json:"executeCommand,omitempty"`
4468 * Capabilities specific to the semantic token requests scoped to the
4473 SemanticTokens SemanticTokensWorkspaceClientCapabilities `json:"semanticTokens,omitempty"`
4475 * Capabilities specific to the code lens requests scoped to the
4480 CodeLens CodeLensWorkspaceClientCapabilities `json:"codeLens,omitempty"`
4482 * The client has support for file notifications/requests for user operations on files.
4486 FileOperations FileOperationClientCapabilities `json:"fileOperations,omitempty"`
4490 * A workspace edit represents changes to many resources managed in the workspace. The edit
4491 * should either provide `changes` or `documentChanges`. If documentChanges are present
4492 * they are preferred over `changes` if the client can handle versioned document edits.
4494 type WorkspaceEdit struct {
4496 * Holds changes to existing resources.
4498 Changes map[string][]TextEdit `json:"changes,omitempty"`
4500 * Depending on the client capability `workspace.workspaceEdit.resourceOperations` document changes
4501 * are either an array of `TextDocumentEdit`s to express changes to n different text documents
4502 * where each text document edit addresses a specific version of a text document. Or it can contain
4503 * above `TextDocumentEdit`s mixed with create, rename and delete file / folder operations.
4505 * Whether a client supports versioned document edits is expressed via
4506 * `workspace.workspaceEdit.documentChanges` client capability.
4508 * If a client neither supports `documentChanges` nor `workspace.workspaceEdit.resourceOperations` then
4509 * only plain `TextEdit`s using the `changes` property are supported.
4511 DocumentChanges []TextDocumentEdit/*TextDocumentEdit | CreateFile | RenameFile | DeleteFile*/ `json:"documentChanges,omitempty"`
4513 * A map of change annotations that can be referenced in `AnnotatedTextEdit`s or create, rename and
4514 * delete file / folder operations.
4516 * Whether clients honor this property depends on the client capability `workspace.changeAnnotationSupport`.
4520 ChangeAnnotations map[string]ChangeAnnotationIdentifier `json:"changeAnnotations,omitempty"`
4523 type WorkspaceEditClientCapabilities struct {
4525 * The client supports versioned document changes in `WorkspaceEdit`s
4527 DocumentChanges bool `json:"documentChanges,omitempty"`
4529 * The resource operations the client supports. Clients should at least
4530 * support 'create', 'rename' and 'delete' files and folders.
4534 ResourceOperations []ResourceOperationKind `json:"resourceOperations,omitempty"`
4536 * The failure handling strategy of a client if applying the workspace edit
4541 FailureHandling FailureHandlingKind `json:"failureHandling,omitempty"`
4543 * Whether the client normalizes line endings to the client specific
4545 * If set to `true` the client will normalize line ending characters
4546 * in a workspace edit containing to the client specific new line
4551 NormalizesLineEndings bool `json:"normalizesLineEndings,omitempty"`
4553 * Whether the client in general supports change annotations on text edits,
4554 * create file, rename file and delete file changes.
4558 ChangeAnnotationSupport struct {
4560 * Whether the client groups edits with equal labels into tree nodes,
4561 * for instance all edits labelled with "Changes in Strings" would
4564 GroupsOnLabel bool `json:"groupsOnLabel,omitempty"`
4565 } `json:"changeAnnotationSupport,omitempty"`
4568 type WorkspaceFolder struct {
4570 * The associated URI for this workspace folder.
4572 URI string `json:"uri"`
4574 * The name of the workspace folder. Used to refer to this
4575 * workspace folder in the user interface.
4577 Name string `json:"name"`
4581 * The workspace folder change event.
4583 type WorkspaceFoldersChangeEvent struct {
4585 * The array of added workspace folders
4587 Added []WorkspaceFolder `json:"added"`
4589 * The array of the removed workspace folders
4591 Removed []WorkspaceFolder `json:"removed"`
4594 type WorkspaceFoldersClientCapabilities struct {
4596 * The workspace client capabilities
4598 Workspace Workspace6Gn `json:"workspace,omitempty"`
4601 type WorkspaceFoldersInitializeParams struct {
4603 * The actual configured workspace folders.
4605 WorkspaceFolders []WorkspaceFolder /*WorkspaceFolder[] | null*/ `json:"workspaceFolders"`
4608 type WorkspaceFoldersServerCapabilities struct {
4610 * The workspace server capabilities
4612 Workspace Workspace8Gn `json:"workspace,omitempty"`
4616 * Client capabilities for a [WorkspaceSymbolRequest](#WorkspaceSymbolRequest).
4618 type WorkspaceSymbolClientCapabilities struct {
4620 * Symbol request supports dynamic registration.
4622 DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
4624 * Specific capabilities for the `SymbolKind` in the `workspace/symbol` request.
4628 * The symbol kind values the client supports. When this
4629 * property exists the client also guarantees that it will
4630 * handle values outside its set gracefully and falls back
4631 * to a default value when unknown.
4633 * If this property is not present the client only supports
4634 * the symbol kinds from `File` to `Array` as defined in
4635 * the initial version of the protocol.
4637 ValueSet []SymbolKind `json:"valueSet,omitempty"`
4638 } `json:"symbolKind,omitempty"`
4640 * The client supports tags on `SymbolInformation`.
4641 * Clients supporting tags have to handle unknown tags gracefully.
4647 * The tags supported by the client.
4649 ValueSet []SymbolTag `json:"valueSet"`
4650 } `json:"tagSupport,omitempty"`
4654 * Server capabilities for a [WorkspaceSymbolRequest](#WorkspaceSymbolRequest).
4656 type WorkspaceSymbolOptions struct {
4657 WorkDoneProgressOptions
4661 * The parameters of a [WorkspaceSymbolRequest](#WorkspaceSymbolRequest).
4663 type WorkspaceSymbolParams struct {
4665 * A query string to filter symbols by. Clients may send an empty
4666 * string here to request all symbols.
4668 Query string `json:"query"`
4669 WorkDoneProgressParams
4678 Empty CodeActionKind = ""
4680 * Base kind for quickfix actions: 'quickfix'
4683 QuickFix CodeActionKind = "quickfix"
4685 * Base kind for refactoring actions: 'refactor'
4688 Refactor CodeActionKind = "refactor"
4690 * Base kind for refactoring extraction actions: 'refactor.extract'
4692 * Example extract actions:
4695 * - Extract function
4696 * - Extract variable
4697 * - Extract interface from class
4701 RefactorExtract CodeActionKind = "refactor.extract"
4703 * Base kind for refactoring inline actions: 'refactor.inline'
4705 * Example inline actions:
4713 RefactorInline CodeActionKind = "refactor.inline"
4715 * Base kind for refactoring rewrite actions: 'refactor.rewrite'
4717 * Example rewrite actions:
4719 * - Convert JavaScript function to class
4720 * - Add or remove parameter
4721 * - Encapsulate field
4722 * - Make method static
4723 * - Move method to base class
4727 RefactorRewrite CodeActionKind = "refactor.rewrite"
4729 * Base kind for source actions: `source`
4731 * Source code actions apply to the entire file.
4734 Source CodeActionKind = "source"
4736 * Base kind for an organize imports source action: `source.organizeImports`
4739 SourceOrganizeImports CodeActionKind = "source.organizeImports"
4741 * Base kind for auto-fix source actions: `source.fixAll`.
4743 * Fix all actions automatically fix errors that have a clear fix that do not require user input.
4744 * They should not suppress errors or perform unsafe fixes such as generating new types or classes.
4749 SourceFixAll CodeActionKind = "source.fixAll"
4750 TextCompletion CompletionItemKind = 1
4751 MethodCompletion CompletionItemKind = 2
4752 FunctionCompletion CompletionItemKind = 3
4753 ConstructorCompletion CompletionItemKind = 4
4754 FieldCompletion CompletionItemKind = 5
4755 VariableCompletion CompletionItemKind = 6
4756 ClassCompletion CompletionItemKind = 7
4757 InterfaceCompletion CompletionItemKind = 8
4758 ModuleCompletion CompletionItemKind = 9
4759 PropertyCompletion CompletionItemKind = 10
4760 UnitCompletion CompletionItemKind = 11
4761 ValueCompletion CompletionItemKind = 12
4762 EnumCompletion CompletionItemKind = 13
4763 KeywordCompletion CompletionItemKind = 14
4764 SnippetCompletion CompletionItemKind = 15
4765 ColorCompletion CompletionItemKind = 16
4766 FileCompletion CompletionItemKind = 17
4767 ReferenceCompletion CompletionItemKind = 18
4768 FolderCompletion CompletionItemKind = 19
4769 EnumMemberCompletion CompletionItemKind = 20
4770 ConstantCompletion CompletionItemKind = 21
4771 StructCompletion CompletionItemKind = 22
4772 EventCompletion CompletionItemKind = 23
4773 OperatorCompletion CompletionItemKind = 24
4774 TypeParameterCompletion CompletionItemKind = 25
4776 * Render a completion as obsolete, usually using a strike-out.
4779 ComplDeprecated CompletionItemTag = 1
4781 * Completion was triggered by typing an identifier (24x7 code
4782 * complete), manual invocation (e.g Ctrl+Space) or via API.
4785 Invoked CompletionTriggerKind = 1
4787 * Completion was triggered by a trigger character specified by
4788 * the `triggerCharacters` properties of the `CompletionRegistrationOptions`.
4791 TriggerCharacter CompletionTriggerKind = 2
4793 * Completion was re-triggered as current completion list is incomplete
4796 TriggerForIncompleteCompletions CompletionTriggerKind = 3
4801 SeverityError DiagnosticSeverity = 1
4803 * Reports a warning.
4806 SeverityWarning DiagnosticSeverity = 2
4808 * Reports an information.
4811 SeverityInformation DiagnosticSeverity = 3
4816 SeverityHint DiagnosticSeverity = 4
4818 * Unused or unnecessary code.
4820 * Clients are allowed to render diagnostics with this tag faded out instead of having
4821 * an error squiggle.
4824 Unnecessary DiagnosticTag = 1
4826 * Deprecated or obsolete code.
4828 * Clients are allowed to rendered diagnostics with this tag strike through.
4831 Deprecated DiagnosticTag = 2
4833 * A textual occurrence.
4836 Text DocumentHighlightKind = 1
4838 * Read-access of a symbol, like reading a variable.
4841 Read DocumentHighlightKind = 2
4843 * Write-access of a symbol, like writing to a variable.
4846 Write DocumentHighlightKind = 3
4848 * Applying the workspace change is simply aborted if one of the changes provided
4849 * fails. All operations executed before the failing operation stay executed.
4852 Abort FailureHandlingKind = "abort"
4854 * All operations are executed transactional. That means they either all
4855 * succeed or no changes at all are applied to the workspace.
4858 Transactional FailureHandlingKind = "transactional"
4860 * If the workspace edit contains only textual file changes they are executed transactional.
4861 * If resource changes (create, rename or delete file) are part of the change the failure
4862 * handling strategy is abort.
4865 TextOnlyTransactional FailureHandlingKind = "textOnlyTransactional"
4867 * The client tries to undo the operations already executed. But there is no
4868 * guarantee that this is succeeding.
4871 Undo FailureHandlingKind = "undo"
4873 * The file got created.
4876 Created FileChangeType = 1
4878 * The file got changed.
4881 Changed FileChangeType = 2
4883 * The file got deleted.
4886 Deleted FileChangeType = 3
4888 * The pattern matches a file only.
4891 FileOp FileOperationPatternKind = "file"
4893 * The pattern matches a folder only.
4896 FolderOp FileOperationPatternKind = "folder"
4898 * Folding range for a comment
4900 Comment FoldingRangeKind = "comment"
4902 * Folding range for a imports or includes
4904 Imports FoldingRangeKind = "imports"
4906 * Folding range for a region (e.g. `#region`)
4908 Region FoldingRangeKind = "region"
4910 * If the protocol version provided by the client can't be handled by the server.
4911 * @deprecated This initialize error got replaced by client capabilities. There is
4912 * no version handshake in version 3.0x
4915 UnknownProtocolVersion InitializeError = 1
4917 * The primary text to be inserted is treated as a plain string.
4920 PlainTextTextFormat InsertTextFormat = 1
4922 * The primary text to be inserted is treated as a snippet.
4924 * A snippet can define tab stops and placeholders with `$1`, `$2`
4925 * and `${3:foo}`. `$0` defines the final tab stop, it defaults to
4926 * the end of the snippet. Placeholders with equal identifiers are linked,
4927 * that is typing in one will update others too.
4929 * See also: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#snippet_syntax
4932 SnippetTextFormat InsertTextFormat = 2
4934 * The insertion or replace strings is taken as it is. If the
4935 * value is multi line the lines below the cursor will be
4936 * inserted using the indentation defined in the string value.
4937 * The client will not apply any kind of adjustments to the
4941 AsIs InsertTextMode = 1
4943 * The editor adjusts leading whitespace of new lines so that
4944 * they match the indentation up to the cursor of the line for
4945 * which the item is accepted.
4947 * Consider a line like this: <2tabs><cursor><3tabs>foo. Accepting a
4948 * multi line completion item is indented using 2 tabs and all
4949 * following lines inserted will be indented using 2 tabs as well.
4952 AdjustIndentation InsertTextMode = 2
4954 * Plain text is supported as a content format
4957 PlainText MarkupKind = "plaintext"
4959 * Markdown is supported as a content format
4962 Markdown MarkupKind = "markdown"
4967 Error MessageType = 1
4969 * A warning message.
4972 Warning MessageType = 2
4974 * An information message.
4977 Info MessageType = 3
4984 * The moniker represent a symbol that is imported into a project
4986 Import MonikerKind = "import"
4988 * The moniker represents a symbol that is exported from a project
4990 Export MonikerKind = "export"
4992 * The moniker represents a symbol that is local to a project (e.g. a local
4993 * variable of a function, a class not visible outside the project, ...)
4995 Local MonikerKind = "local"
4997 * Supports creating new files and folders.
5000 Create ResourceOperationKind = "create"
5002 * Supports renaming existing files and folders.
5005 Rename ResourceOperationKind = "rename"
5007 * Supports deleting existing files and folders.
5010 Delete ResourceOperationKind = "delete"
5012 * Signature help was invoked manually by the user or by a command.
5015 SigInvoked SignatureHelpTriggerKind = 1
5017 * Signature help was triggered by a trigger character.
5020 SigTriggerCharacter SignatureHelpTriggerKind = 2
5022 * Signature help was triggered by the cursor moving or by the document content changing.
5025 SigContentChange SignatureHelpTriggerKind = 3
5027 Module SymbolKind = 2
5028 Namespace SymbolKind = 3
5029 Package SymbolKind = 4
5030 Class SymbolKind = 5
5031 Method SymbolKind = 6
5032 Property SymbolKind = 7
5033 Field SymbolKind = 8
5034 Constructor SymbolKind = 9
5035 Enum SymbolKind = 10
5036 Interface SymbolKind = 11
5037 Function SymbolKind = 12
5038 Variable SymbolKind = 13
5039 Constant SymbolKind = 14
5040 String SymbolKind = 15
5041 Number SymbolKind = 16
5042 Boolean SymbolKind = 17
5043 Array SymbolKind = 18
5044 Object SymbolKind = 19
5046 Null SymbolKind = 21
5047 EnumMember SymbolKind = 22
5048 Struct SymbolKind = 23
5049 Event SymbolKind = 24
5050 Operator SymbolKind = 25
5051 TypeParameter SymbolKind = 26
5053 * Render a symbol as obsolete, usually using a strike-out.
5056 DeprecatedSymbol SymbolTag = 1
5058 * Manually triggered, e.g. by the user pressing save, by starting debugging,
5059 * or by an API call.
5062 Manual TextDocumentSaveReason = 1
5064 * Automatic after a delay.
5067 AfterDelay TextDocumentSaveReason = 2
5069 * When the editor lost focus.
5072 FocusOut TextDocumentSaveReason = 3
5074 * Documents should not be synced at all.
5077 None TextDocumentSyncKind = 0
5079 * Documents are synced by always sending the full content
5083 Full TextDocumentSyncKind = 1
5085 * Documents are synced by sending the full content on open.
5086 * After that only incremental updates to the document are
5090 Incremental TextDocumentSyncKind = 2
5092 * The moniker is only unique inside a document
5094 Document UniquenessLevel = "document"
5096 * The moniker is unique inside a project for which a dump got created
5098 Project UniquenessLevel = "project"
5100 * The moniker is unique inside the group to which a project belongs
5102 Group UniquenessLevel = "group"
5104 * The moniker is unique inside the moniker scheme.
5106 Scheme UniquenessLevel = "scheme"
5108 * The moniker is globally unique
5110 Global UniquenessLevel = "global"
5112 * Interested in create events.
5115 WatchCreate WatchKind = 1
5117 * Interested in change events
5120 WatchChange WatchKind = 2
5122 * Interested in delete events
5125 WatchDelete WatchKind = 4
5128 // Types created to name formal parameters and embedded structs
5129 type ParamConfiguration struct {
5133 type ParamInitialize struct {
5135 WorkDoneProgressParams
5137 type Workspace2Gn struct {
5139 * The client supports applying batch edits
5140 * to the workspace by supporting the request
5141 * 'workspace/applyEdit'
5143 ApplyEdit bool `json:"applyEdit,omitempty"`
5146 * Capabilities specific to `WorkspaceEdit`s
5148 WorkspaceEdit *WorkspaceEditClientCapabilities `json:"workspaceEdit,omitempty"`
5151 * Capabilities specific to the `workspace/didChangeConfiguration` notification.
5153 DidChangeConfiguration DidChangeConfigurationClientCapabilities `json:"didChangeConfiguration,omitempty"`
5156 * Capabilities specific to the `workspace/didChangeWatchedFiles` notification.
5158 DidChangeWatchedFiles DidChangeWatchedFilesClientCapabilities `json:"didChangeWatchedFiles,omitempty"`
5161 * Capabilities specific to the `workspace/symbol` request.
5163 Symbol *WorkspaceSymbolClientCapabilities `json:"symbol,omitempty"`
5166 * Capabilities specific to the `workspace/executeCommand` request.
5168 ExecuteCommand ExecuteCommandClientCapabilities `json:"executeCommand,omitempty"`
5171 * Capabilities specific to the semantic token requests scoped to the
5176 SemanticTokens SemanticTokensWorkspaceClientCapabilities `json:"semanticTokens,omitempty"`
5179 * Capabilities specific to the code lens requests scoped to the
5184 CodeLens CodeLensWorkspaceClientCapabilities `json:"codeLens,omitempty"`
5187 * The client has support for file notifications/requests for user operations on files.
5191 FileOperations *FileOperationClientCapabilities `json:"fileOperations,omitempty"`
5194 * The client has support for workspace folders
5198 WorkspaceFolders bool `json:"workspaceFolders,omitempty"`
5201 * The client supports `workspace/configuration` requests.
5205 Configuration bool `json:"configuration,omitempty"`
5207 type Workspace3Gn struct {
5209 * The client supports applying batch edits
5210 * to the workspace by supporting the request
5211 * 'workspace/applyEdit'
5213 ApplyEdit bool `json:"applyEdit,omitempty"`
5216 * Capabilities specific to `WorkspaceEdit`s
5218 WorkspaceEdit *WorkspaceEditClientCapabilities `json:"workspaceEdit,omitempty"`
5221 * Capabilities specific to the `workspace/didChangeConfiguration` notification.
5223 DidChangeConfiguration DidChangeConfigurationClientCapabilities `json:"didChangeConfiguration,omitempty"`
5226 * Capabilities specific to the `workspace/didChangeWatchedFiles` notification.
5228 DidChangeWatchedFiles DidChangeWatchedFilesClientCapabilities `json:"didChangeWatchedFiles,omitempty"`
5231 * Capabilities specific to the `workspace/symbol` request.
5233 Symbol *WorkspaceSymbolClientCapabilities `json:"symbol,omitempty"`
5236 * Capabilities specific to the `workspace/executeCommand` request.
5238 ExecuteCommand ExecuteCommandClientCapabilities `json:"executeCommand,omitempty"`
5241 * Capabilities specific to the semantic token requests scoped to the
5246 SemanticTokens SemanticTokensWorkspaceClientCapabilities `json:"semanticTokens,omitempty"`
5249 * Capabilities specific to the code lens requests scoped to the
5254 CodeLens CodeLensWorkspaceClientCapabilities `json:"codeLens,omitempty"`
5257 * The client has support for file notifications/requests for user operations on files.
5261 FileOperations *FileOperationClientCapabilities `json:"fileOperations,omitempty"`
5264 * The client has support for workspace folders
5268 WorkspaceFolders bool `json:"workspaceFolders,omitempty"`
5271 * The client supports `workspace/configuration` requests.
5275 Configuration bool `json:"configuration,omitempty"`
5277 type WorkspaceFolders4Gn struct {
5279 * The Server has support for workspace folders
5281 Supported bool `json:"supported,omitempty"`
5284 * Whether the server wants to receive workspace folder
5285 * change notifications.
5287 * If a strings is provided the string is treated as a ID
5288 * under which the notification is registered on the client
5289 * side. The ID can be used to unregister for these events
5290 * using the `client/unregisterCapability` request.
5292 ChangeNotifications string/*string | boolean*/ `json:"changeNotifications,omitempty"`
5294 type Workspace5Gn struct {
5296 * The server is interested in notifications/requests for operations on files.
5300 FileOperations *FileOperationOptions `json:"fileOperations,omitempty"`
5302 WorkspaceFolders WorkspaceFolders4Gn `json:"workspaceFolders,omitempty"`
5304 type Workspace6Gn struct {
5306 * The client supports applying batch edits
5307 * to the workspace by supporting the request
5308 * 'workspace/applyEdit'
5310 ApplyEdit bool `json:"applyEdit,omitempty"`
5313 * Capabilities specific to `WorkspaceEdit`s
5315 WorkspaceEdit *WorkspaceEditClientCapabilities `json:"workspaceEdit,omitempty"`
5318 * Capabilities specific to the `workspace/didChangeConfiguration` notification.
5320 DidChangeConfiguration DidChangeConfigurationClientCapabilities `json:"didChangeConfiguration,omitempty"`
5323 * Capabilities specific to the `workspace/didChangeWatchedFiles` notification.
5325 DidChangeWatchedFiles DidChangeWatchedFilesClientCapabilities `json:"didChangeWatchedFiles,omitempty"`
5328 * Capabilities specific to the `workspace/symbol` request.
5330 Symbol *WorkspaceSymbolClientCapabilities `json:"symbol,omitempty"`
5333 * Capabilities specific to the `workspace/executeCommand` request.
5335 ExecuteCommand ExecuteCommandClientCapabilities `json:"executeCommand,omitempty"`
5338 * Capabilities specific to the semantic token requests scoped to the
5343 SemanticTokens SemanticTokensWorkspaceClientCapabilities `json:"semanticTokens,omitempty"`
5346 * Capabilities specific to the code lens requests scoped to the
5351 CodeLens CodeLensWorkspaceClientCapabilities `json:"codeLens,omitempty"`
5354 * The client has support for file notifications/requests for user operations on files.
5358 FileOperations *FileOperationClientCapabilities `json:"fileOperations,omitempty"`
5361 * The client has support for workspace folders
5365 WorkspaceFolders bool `json:"workspaceFolders,omitempty"`
5368 * The client supports `workspace/configuration` requests.
5372 Configuration bool `json:"configuration,omitempty"`
5374 type WorkspaceFolders7Gn struct {
5376 * The Server has support for workspace folders
5378 Supported bool `json:"supported,omitempty"`
5381 * Whether the server wants to receive workspace folder
5382 * change notifications.
5384 * If a strings is provided the string is treated as a ID
5385 * under which the notification is registered on the client
5386 * side. The ID can be used to unregister for these events
5387 * using the `client/unregisterCapability` request.
5389 ChangeNotifications string/*string | boolean*/ `json:"changeNotifications,omitempty"`
5391 type Workspace8Gn struct {
5393 * The server is interested in notifications/requests for operations on files.
5397 FileOperations *FileOperationOptions `json:"fileOperations,omitempty"`
5399 WorkspaceFolders WorkspaceFolders7Gn `json:"workspaceFolders,omitempty"`