gopls/internal/protocol: add links to LSP spec
This makes it a little easier to click one's way to the
authoritative description.
It isn't perfect; notably, the LSP spec has irregular
anchors (workspace_symbolResolve should be
workspaceSymbol_Resolve).
Change-Id: I62f88b53d2398d777a298ca765f6c71167761e74
Reviewed-on: https://go-review.googlesource.com/c/tools/+/581120
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Peter Weinberger <pjw@google.com>
diff --git a/gopls/internal/protocol/generate/main.go b/gopls/internal/protocol/generate/main.go
index 29d2f88..de42540 100644
--- a/gopls/internal/protocol/generate/main.go
+++ b/gopls/internal/protocol/generate/main.go
@@ -27,7 +27,8 @@
// lspGitRef names a branch or tag in vscodeRepo.
// It implicitly determines the protocol version of the LSP used by gopls.
-// For example, tag release/protocol/3.17.3 of the repo defines protocol version 3.17.0.
+// For example, tag release/protocol/3.17.3 of the repo defines
+// protocol version 3.17.0 (as declared by the metaData.version field).
// (Point releases are reflected in the git tag version even when they are cosmetic
// and don't change the protocol.)
var lspGitRef = "release/protocol/3.17.6-next.2"
@@ -116,16 +117,7 @@
for _, k := range cfuncs.keys() {
out.WriteString(cfuncs[k])
}
-
- x, err := format.Source(out.Bytes())
- if err != nil {
- os.WriteFile("/tmp/a.go", out.Bytes(), 0644)
- log.Fatalf("tsclient.go: %v", err)
- }
-
- if err := os.WriteFile(filepath.Join(*outputdir, "tsclient.go"), x, 0644); err != nil {
- log.Fatalf("%v writing tsclient.go", err)
- }
+ formatTo("tsclient.go", out.Bytes())
}
func writeserver() {
@@ -156,15 +148,7 @@
for _, k := range sfuncs.keys() {
out.WriteString(sfuncs[k])
}
- x, err := format.Source(out.Bytes())
- if err != nil {
- os.WriteFile("/tmp/a.go", out.Bytes(), 0644)
- log.Fatalf("tsserver.go: %v", err)
- }
-
- if err := os.WriteFile(filepath.Join(*outputdir, "tsserver.go"), x, 0644); err != nil {
- log.Fatalf("%v writing tsserver.go", err)
- }
+ formatTo("tsserver.go", out.Bytes())
}
func writeprotocol() {
@@ -197,14 +181,7 @@
out.WriteString(consts[k])
}
out.WriteString(")\n\n")
- x, err := format.Source(out.Bytes())
- if err != nil {
- os.WriteFile("/tmp/a.go", out.Bytes(), 0644)
- log.Fatalf("tsprotocol.go: %v", err)
- }
- if err := os.WriteFile(filepath.Join(*outputdir, "tsprotocol.go"), x, 0644); err != nil {
- log.Fatalf("%v writing tsprotocol.go", err)
- }
+ formatTo("tsprotocol.go", out.Bytes())
}
func writejsons() {
@@ -228,18 +205,24 @@
for _, k := range jsons.keys() {
out.WriteString(jsons[k])
}
- x, err := format.Source(out.Bytes())
+ formatTo("tsjson.go", out.Bytes())
+}
+
+// formatTo formats the Go source and writes it to *outputdir/basename.
+func formatTo(basename string, src []byte) {
+ formatted, err := format.Source(src)
if err != nil {
- os.WriteFile("/tmp/a.go", out.Bytes(), 0644)
- log.Fatalf("tsjson.go: %v", err)
+ failed := filepath.Join("/tmp", basename+".fail")
+ os.WriteFile(failed, src, 0644)
+ log.Fatalf("formatting %s: %v (see %s)", basename, err, failed)
}
- if err := os.WriteFile(filepath.Join(*outputdir, "tsjson.go"), x, 0644); err != nil {
- log.Fatalf("%v writing tsjson.go", err)
+ if err := os.WriteFile(filepath.Join(*outputdir, basename), formatted, 0644); err != nil {
+ log.Fatal(err)
}
}
// create the common file header for the output files
-func fileHeader(model Model) string {
+func fileHeader(model *Model) string {
fname := filepath.Join(*repodir, ".git", "HEAD")
buf, err := os.ReadFile(fname)
if err != nil {
@@ -281,14 +264,14 @@
model.Version.Version) // 5
}
-func parse(fname string) Model {
+func parse(fname string) *Model {
buf, err := os.ReadFile(fname)
if err != nil {
log.Fatal(err)
}
buf = addLineNumbers(buf)
- var model Model
- if err := json.Unmarshal(buf, &model); err != nil {
+ model := new(Model)
+ if err := json.Unmarshal(buf, model); err != nil {
log.Fatal(err)
}
return model
diff --git a/gopls/internal/protocol/generate/output.go b/gopls/internal/protocol/generate/output.go
index 4760862..87d6f66 100644
--- a/gopls/internal/protocol/generate/output.go
+++ b/gopls/internal/protocol/generate/output.go
@@ -28,19 +28,19 @@
jsons = make(sortedMap[string])
)
-func generateOutput(model Model) {
+func generateOutput(model *Model) {
for _, r := range model.Requests {
- genDecl(r.Method, r.Params, r.Result, r.Direction)
- genCase(r.Method, r.Params, r.Result, r.Direction)
- genFunc(r.Method, r.Params, r.Result, r.Direction, false)
+ genDecl(model, r.Method, r.Params, r.Result, r.Direction)
+ genCase(model, r.Method, r.Params, r.Result, r.Direction)
+ genFunc(model, r.Method, r.Params, r.Result, r.Direction, false)
}
for _, n := range model.Notifications {
if n.Method == "$/cancelRequest" {
continue // handled internally by jsonrpc2
}
- genDecl(n.Method, n.Params, nil, n.Direction)
- genCase(n.Method, n.Params, nil, n.Direction)
- genFunc(n.Method, n.Params, nil, n.Direction, true)
+ genDecl(model, n.Method, n.Params, nil, n.Direction)
+ genCase(model, n.Method, n.Params, nil, n.Direction)
+ genFunc(model, n.Method, n.Params, nil, n.Direction, true)
}
genStructs(model)
genAliases(model)
@@ -49,7 +49,7 @@
genMarshal()
}
-func genDecl(method string, param, result *Type, dir string) {
+func genDecl(model *Model, method string, param, result *Type, dir string) {
fname := methodName(method)
p := ""
if notNil(param) {
@@ -71,7 +71,8 @@
p = ", *ParamConfiguration"
ret = "([]LSPAny, error)"
}
- msg := fmt.Sprintf("\t%s(context.Context%s) %s // %s\n", fname, p, ret, method)
+ fragment := strings.ReplaceAll(strings.TrimPrefix(method, "$/"), "/", "_")
+ msg := fmt.Sprintf("\t%s\t%s(context.Context%s) %s\n", lspLink(model, fragment), fname, p, ret)
switch dir {
case "clientToServer":
sdecls[method] = msg
@@ -85,7 +86,7 @@
}
}
-func genCase(method string, param, result *Type, dir string) {
+func genCase(model *Model, method string, param, result *Type, dir string) {
out := new(bytes.Buffer)
fmt.Fprintf(out, "\tcase %q:\n", method)
var p string
@@ -127,7 +128,7 @@
}
}
-func genFunc(method string, param, result *Type, dir string, isnotify bool) {
+func genFunc(model *Model, method string, param, result *Type, dir string, isnotify bool) {
out := new(bytes.Buffer)
var p, r string
var goResult string
@@ -202,7 +203,7 @@
}
}
-func genStructs(model Model) {
+func genStructs(model *Model) {
structures := make(map[string]*Structure) // for expanding Extends
for _, s := range model.Structures {
structures[s.Name] = s
@@ -215,6 +216,8 @@
// a weird case, and needed only so the generated code contains the old gopls code
nm = "DocumentDiagnosticParams"
}
+ fmt.Fprintf(out, "//\n")
+ out.WriteString(lspLink(model, camelCase(s.Name)))
fmt.Fprintf(out, "type %s struct {%s\n", nm, linex(s.Line))
// for gpls compatibilitye, embed most extensions, but expand the rest some day
props := append([]NameType{}, s.Properties...)
@@ -245,6 +248,19 @@
}
+// "FooBar" -> "fooBar"
+func camelCase(TitleCased string) string {
+ return strings.ToLower(TitleCased[:1]) + TitleCased[1:]
+}
+
+func lspLink(model *Model, fragment string) string {
+ // Derive URL version from metaData.version in JSON file.
+ parts := strings.Split(model.Version.Version, ".") // e.g. "3.17.0"
+ return fmt.Sprintf("// See https://microsoft.github.io/language-server-protocol/specifications/lsp/%s.%s/specification#%s\n",
+ parts[0], parts[1], // major.minor
+ fragment)
+}
+
func genProps(out *bytes.Buffer, props []NameType, name string) {
for _, p := range props {
tp := goplsName(p.Type)
@@ -263,7 +279,7 @@
}
}
-func genAliases(model Model) {
+func genAliases(model *Model) {
for _, ta := range model.TypeAliases {
out := new(bytes.Buffer)
generateDoc(out, ta.Documentation)
@@ -272,6 +288,8 @@
continue // renamed the type, e.g., "DocumentDiagnosticReport", an or-type to "string"
}
tp := goplsName(ta.Type)
+ fmt.Fprintf(out, "//\n")
+ out.WriteString(lspLink(model, camelCase(ta.Name)))
fmt.Fprintf(out, "type %s = %s // (alias)\n", nm, tp)
types[nm] = out.String()
}
@@ -320,7 +338,7 @@
types[nm] = out.String()
}
}
-func genConsts(model Model) {
+func genConsts(model *Model) {
for _, e := range model.Enumerations {
out := new(bytes.Buffer)
generateDoc(out, e.Documentation)
diff --git a/gopls/internal/protocol/generate/typenames.go b/gopls/internal/protocol/generate/typenames.go
index 83f25a0..69fa7cf 100644
--- a/gopls/internal/protocol/generate/typenames.go
+++ b/gopls/internal/protocol/generate/typenames.go
@@ -13,7 +13,7 @@
var typeNames = make(map[*Type]string)
var genTypes []*newType
-func findTypeNames(model Model) {
+func findTypeNames(model *Model) {
for _, s := range model.Structures {
for _, e := range s.Extends {
nameType(e, nil) // all references
diff --git a/gopls/internal/protocol/tsclient.go b/gopls/internal/protocol/tsclient.go
index 6305d76..3f860d5 100644
--- a/gopls/internal/protocol/tsclient.go
+++ b/gopls/internal/protocol/tsclient.go
@@ -17,26 +17,46 @@
)
type Client interface {
- LogTrace(context.Context, *LogTraceParams) error // $/logTrace
- Progress(context.Context, *ProgressParams) error // $/progress
- RegisterCapability(context.Context, *RegistrationParams) error // client/registerCapability
- UnregisterCapability(context.Context, *UnregistrationParams) error // client/unregisterCapability
- Event(context.Context, *interface{}) error // telemetry/event
- PublishDiagnostics(context.Context, *PublishDiagnosticsParams) error // textDocument/publishDiagnostics
- LogMessage(context.Context, *LogMessageParams) error // window/logMessage
- ShowDocument(context.Context, *ShowDocumentParams) (*ShowDocumentResult, error) // window/showDocument
- ShowMessage(context.Context, *ShowMessageParams) error // window/showMessage
- ShowMessageRequest(context.Context, *ShowMessageRequestParams) (*MessageActionItem, error) // window/showMessageRequest
- WorkDoneProgressCreate(context.Context, *WorkDoneProgressCreateParams) error // window/workDoneProgress/create
- ApplyEdit(context.Context, *ApplyWorkspaceEditParams) (*ApplyWorkspaceEditResult, error) // workspace/applyEdit
- CodeLensRefresh(context.Context) error // workspace/codeLens/refresh
- Configuration(context.Context, *ParamConfiguration) ([]LSPAny, error) // workspace/configuration
- DiagnosticRefresh(context.Context) error // workspace/diagnostic/refresh
- FoldingRangeRefresh(context.Context) error // workspace/foldingRange/refresh
- InlayHintRefresh(context.Context) error // workspace/inlayHint/refresh
- InlineValueRefresh(context.Context) error // workspace/inlineValue/refresh
- SemanticTokensRefresh(context.Context) error // workspace/semanticTokens/refresh
- WorkspaceFolders(context.Context) ([]WorkspaceFolder, error) // workspace/workspaceFolders
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#logTrace
+ LogTrace(context.Context, *LogTraceParams) error
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#progress
+ Progress(context.Context, *ProgressParams) error
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#client_registerCapability
+ RegisterCapability(context.Context, *RegistrationParams) error
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#client_unregisterCapability
+ UnregisterCapability(context.Context, *UnregistrationParams) error
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#telemetry_event
+ Event(context.Context, *interface{}) error
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocument_publishDiagnostics
+ PublishDiagnostics(context.Context, *PublishDiagnosticsParams) error
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#window_logMessage
+ LogMessage(context.Context, *LogMessageParams) error
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#window_showDocument
+ ShowDocument(context.Context, *ShowDocumentParams) (*ShowDocumentResult, error)
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#window_showMessage
+ ShowMessage(context.Context, *ShowMessageParams) error
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#window_showMessageRequest
+ ShowMessageRequest(context.Context, *ShowMessageRequestParams) (*MessageActionItem, error)
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#window_workDoneProgress_create
+ WorkDoneProgressCreate(context.Context, *WorkDoneProgressCreateParams) error
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspace_applyEdit
+ ApplyEdit(context.Context, *ApplyWorkspaceEditParams) (*ApplyWorkspaceEditResult, error)
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspace_codeLens_refresh
+ CodeLensRefresh(context.Context) error
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspace_configuration
+ Configuration(context.Context, *ParamConfiguration) ([]LSPAny, error)
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspace_diagnostic_refresh
+ DiagnosticRefresh(context.Context) error
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspace_foldingRange_refresh
+ FoldingRangeRefresh(context.Context) error
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspace_inlayHint_refresh
+ InlayHintRefresh(context.Context) error
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspace_inlineValue_refresh
+ InlineValueRefresh(context.Context) error
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspace_semanticTokens_refresh
+ SemanticTokensRefresh(context.Context) error
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspace_workspaceFolders
+ WorkspaceFolders(context.Context) ([]WorkspaceFolder, error)
}
func clientDispatch(ctx context.Context, client Client, reply jsonrpc2.Replier, r jsonrpc2.Request) (bool, error) {
diff --git a/gopls/internal/protocol/tsprotocol.go b/gopls/internal/protocol/tsprotocol.go
index 6fcfee2..ac2de6f 100644
--- a/gopls/internal/protocol/tsprotocol.go
+++ b/gopls/internal/protocol/tsprotocol.go
@@ -15,6 +15,8 @@
// A special text edit with an additional change annotation.
//
// @since 3.16.0.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#annotatedTextEdit
type AnnotatedTextEdit struct {
// The actual identifier of the change annotation
AnnotationID *ChangeAnnotationIdentifier `json:"annotationId,omitempty"`
@@ -22,6 +24,8 @@
}
// The parameters passed via an apply workspace edit request.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#applyWorkspaceEditParams
type ApplyWorkspaceEditParams struct {
// An optional label of the workspace edit. This label is
// presented in the user interface for example on an undo
@@ -34,6 +38,8 @@
// The result returned from the apply workspace edit request.
//
// @since 3.17 renamed from ApplyWorkspaceEditResponse
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#applyWorkspaceEditResult
type ApplyWorkspaceEditResult struct {
// Indicates whether the edit was applied or not.
Applied bool `json:"applied"`
@@ -48,6 +54,8 @@
}
// A base for all symbol information.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#baseSymbolInformation
type BaseSymbolInformation struct {
// The name of this symbol.
Name string `json:"name"`
@@ -65,6 +73,8 @@
}
// @since 3.16.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#callHierarchyClientCapabilities
type CallHierarchyClientCapabilities struct {
// Whether implementation supports dynamic registration. If this is set to `true`
// the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`
@@ -75,6 +85,8 @@
// Represents an incoming call, e.g. a caller of a method or constructor.
//
// @since 3.16.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#callHierarchyIncomingCall
type CallHierarchyIncomingCall struct {
// The item that makes the call.
From CallHierarchyItem `json:"from"`
@@ -86,6 +98,8 @@
// The parameter of a `callHierarchy/incomingCalls` request.
//
// @since 3.16.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#callHierarchyIncomingCallsParams
type CallHierarchyIncomingCallsParams struct {
Item CallHierarchyItem `json:"item"`
WorkDoneProgressParams
@@ -96,6 +110,8 @@
// of call hierarchy.
//
// @since 3.16.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#callHierarchyItem
type CallHierarchyItem struct {
// The name of this item.
Name string `json:"name"`
@@ -120,6 +136,8 @@
// Call hierarchy options used during static registration.
//
// @since 3.16.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#callHierarchyOptions
type CallHierarchyOptions struct {
WorkDoneProgressOptions
}
@@ -127,6 +145,8 @@
// Represents an outgoing call, e.g. calling a getter from a method or a method from a constructor etc.
//
// @since 3.16.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#callHierarchyOutgoingCall
type CallHierarchyOutgoingCall struct {
// The item that is called.
To CallHierarchyItem `json:"to"`
@@ -139,6 +159,8 @@
// The parameter of a `callHierarchy/outgoingCalls` request.
//
// @since 3.16.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#callHierarchyOutgoingCallsParams
type CallHierarchyOutgoingCallsParams struct {
Item CallHierarchyItem `json:"item"`
WorkDoneProgressParams
@@ -148,6 +170,8 @@
// The parameter of a `textDocument/prepareCallHierarchy` request.
//
// @since 3.16.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#callHierarchyPrepareParams
type CallHierarchyPrepareParams struct {
TextDocumentPositionParams
WorkDoneProgressParams
@@ -156,11 +180,15 @@
// Call hierarchy options used during static or dynamic registration.
//
// @since 3.16.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#callHierarchyRegistrationOptions
type CallHierarchyRegistrationOptions struct {
TextDocumentRegistrationOptions
CallHierarchyOptions
StaticRegistrationOptions
}
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#cancelParams
type CancelParams struct {
// The request id to cancel.
ID interface{} `json:"id"`
@@ -169,6 +197,8 @@
// Additional information that describes document changes.
//
// @since 3.16.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#changeAnnotation
type ChangeAnnotation struct {
// A human-readable string describing the actual change. The string
// is rendered prominent in the user interface.
@@ -182,9 +212,13 @@
}
// An identifier to refer to a change annotation stored with a workspace edit.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#changeAnnotationIdentifier
type ChangeAnnotationIdentifier = string // (alias)
// @since 3.18.0
// @proposed
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#changeAnnotationsSupportOptions
type ChangeAnnotationsSupportOptions struct {
// Whether the client groups edits with equal labels into tree nodes,
// for instance all edits labelled with "Changes in Strings" would
@@ -193,6 +227,8 @@
}
// Defines the capabilities provided by the client.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#clientCapabilities
type ClientCapabilities struct {
// Workspace specific client capabilities.
Workspace WorkspaceClientCapabilities `json:"workspace,omitempty"`
@@ -214,6 +250,8 @@
// @since 3.18.0
// @proposed
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#clientCodeActionKindOptions
type ClientCodeActionKindOptions struct {
// The code action kind values the client supports. When this
// property exists the client also guarantees that it will
@@ -224,6 +262,8 @@
// @since 3.18.0
// @proposed
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#clientCodeActionLiteralOptions
type ClientCodeActionLiteralOptions struct {
// The code action kind is support with the following value
// set.
@@ -232,6 +272,8 @@
// @since 3.18.0
// @proposed
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#clientCodeActionResolveOptions
type ClientCodeActionResolveOptions struct {
// The properties that a client can resolve lazily.
Properties []string `json:"properties"`
@@ -239,12 +281,16 @@
// @since 3.18.0
// @proposed
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#clientCompletionItemInsertTextModeOptions
type ClientCompletionItemInsertTextModeOptions struct {
ValueSet []InsertTextMode `json:"valueSet"`
}
// @since 3.18.0
// @proposed
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#clientCompletionItemOptions
type ClientCompletionItemOptions struct {
// Client supports snippets as insert text.
//
@@ -295,6 +341,8 @@
// @since 3.18.0
// @proposed
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#clientCompletionItemOptionsKind
type ClientCompletionItemOptionsKind struct {
// The completion item kind values the client supports. When this
// property exists the client also guarantees that it will
@@ -309,6 +357,8 @@
// @since 3.18.0
// @proposed
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#clientCompletionItemResolveOptions
type ClientCompletionItemResolveOptions struct {
// The properties that a client can resolve lazily.
Properties []string `json:"properties"`
@@ -316,6 +366,8 @@
// @since 3.18.0
// @proposed
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#clientDiagnosticsTagOptions
type ClientDiagnosticsTagOptions struct {
// The tags supported by the client.
ValueSet []DiagnosticTag `json:"valueSet"`
@@ -323,6 +375,8 @@
// @since 3.18.0
// @proposed
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#clientFoldingRangeKindOptions
type ClientFoldingRangeKindOptions struct {
// The folding range kind values the client supports. When this
// property exists the client also guarantees that it will
@@ -333,6 +387,8 @@
// @since 3.18.0
// @proposed
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#clientFoldingRangeOptions
type ClientFoldingRangeOptions struct {
// If set, the client signals that it supports setting collapsedText on
// folding ranges to display custom labels instead of the default text.
@@ -346,6 +402,8 @@
// @since 3.15.0
// @since 3.18.0 ClientInfo type name added.
// @proposed
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#clientInfo
type ClientInfo struct {
// The name of the client as defined by the client.
Name string `json:"name"`
@@ -355,6 +413,8 @@
// @since 3.18.0
// @proposed
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#clientInlayHintResolveOptions
type ClientInlayHintResolveOptions struct {
// The properties that a client can resolve lazily.
Properties []string `json:"properties"`
@@ -362,6 +422,8 @@
// @since 3.18.0
// @proposed
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#clientSemanticTokensRequestFullDelta
type ClientSemanticTokensRequestFullDelta struct {
// The client will send the `textDocument/semanticTokens/full/delta` request if
// the server provides a corresponding handler.
@@ -370,6 +432,8 @@
// @since 3.18.0
// @proposed
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#clientSemanticTokensRequestOptions
type ClientSemanticTokensRequestOptions struct {
// The client will send the `textDocument/semanticTokens/range` request if
// the server provides a corresponding handler.
@@ -381,6 +445,8 @@
// @since 3.18.0
// @proposed
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#clientShowMessageActionItemOptions
type ClientShowMessageActionItemOptions struct {
// Whether the client supports additional attributes which
// are preserved and send back to the server in the
@@ -390,6 +456,8 @@
// @since 3.18.0
// @proposed
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#clientSignatureInformationOptions
type ClientSignatureInformationOptions struct {
// Client supports the following content formats for the documentation
// property. The order describes the preferred format of the client.
@@ -412,6 +480,8 @@
// @since 3.18.0
// @proposed
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#clientSignatureParameterInformationOptions
type ClientSignatureParameterInformationOptions struct {
// The client supports processing label offsets instead of a
// simple label string.
@@ -422,6 +492,8 @@
// @since 3.18.0
// @proposed
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#clientSymbolKindOptions
type ClientSymbolKindOptions struct {
// The symbol kind values the client supports. When this
// property exists the client also guarantees that it will
@@ -436,6 +508,8 @@
// @since 3.18.0
// @proposed
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#clientSymbolResolveOptions
type ClientSymbolResolveOptions struct {
// The properties that a client can resolve lazily. Usually
// `location.range`
@@ -444,6 +518,8 @@
// @since 3.18.0
// @proposed
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#clientSymbolTagOptions
type ClientSymbolTagOptions struct {
// The tags supported by the client.
ValueSet []SymbolTag `json:"valueSet"`
@@ -453,6 +529,8 @@
// to refactor code.
//
// A CodeAction must set either `edit` and/or a `command`. If both are supplied, the `edit` is applied first, then the `command` is executed.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#codeAction
type CodeAction struct {
// A short, human-readable, title for this code action.
Title string `json:"title"`
@@ -500,6 +578,8 @@
}
// The Client Capabilities of a {@link CodeActionRequest}.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#codeActionClientCapabilities
type CodeActionClientCapabilities struct {
// Whether code action supports dynamic registration.
DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
@@ -546,6 +626,8 @@
// Contains additional diagnostic information about the context in which
// a {@link CodeActionProvider.provideCodeActions code action} is run.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#codeActionContext
type CodeActionContext struct {
// An array of diagnostics known on the client side overlapping the range provided to the
// `textDocument/codeAction` request. They are provided so that the server knows which
@@ -568,6 +650,8 @@
//
// @since 3.18.0
// @proposed
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#codeActionDisabled
type CodeActionDisabled struct {
// Human readable description of why the code action is currently disabled.
//
@@ -582,6 +666,8 @@
//
// @since 3.18.0
// @proposed
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#codeActionKindDocumentation
type CodeActionKindDocumentation struct {
// The kind of the code action being documented.
//
@@ -596,6 +682,8 @@
}
// Provider options for a {@link CodeActionRequest}.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#codeActionOptions
type CodeActionOptions struct {
// CodeActionKinds that this server may return.
//
@@ -629,6 +717,8 @@
}
// The parameters of a {@link CodeActionRequest}.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#codeActionParams
type CodeActionParams struct {
// The document in which the command was invoked.
TextDocument TextDocumentIdentifier `json:"textDocument"`
@@ -641,6 +731,8 @@
}
// Registration options for a {@link CodeActionRequest}.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#codeActionRegistrationOptions
type CodeActionRegistrationOptions struct {
TextDocumentRegistrationOptions
CodeActionOptions
@@ -654,6 +746,8 @@
// Structure to capture a description for an error code.
//
// @since 3.16.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#codeDescription
type CodeDescription struct {
// An URI to open with more information about the diagnostic error.
Href URI `json:"href"`
@@ -664,6 +758,8 @@
//
// A code lens is _unresolved_ when no command is associated to it. For performance
// reasons the creation of a code lens and resolving should be done in two stages.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#codeLens
type CodeLens struct {
// The range in which this code lens is valid. Should only span a single line.
Range Range `json:"range"`
@@ -675,12 +771,16 @@
}
// The client capabilities of a {@link CodeLensRequest}.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#codeLensClientCapabilities
type CodeLensClientCapabilities struct {
// Whether code lens supports dynamic registration.
DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
}
// Code Lens provider options of a {@link CodeLensRequest}.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#codeLensOptions
type CodeLensOptions struct {
// Code lens has a resolve provider as well.
ResolveProvider bool `json:"resolveProvider,omitempty"`
@@ -688,6 +788,8 @@
}
// The parameters of a {@link CodeLensRequest}.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#codeLensParams
type CodeLensParams struct {
// The document to request code lens for.
TextDocument TextDocumentIdentifier `json:"textDocument"`
@@ -696,12 +798,16 @@
}
// Registration options for a {@link CodeLensRequest}.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#codeLensRegistrationOptions
type CodeLensRegistrationOptions struct {
TextDocumentRegistrationOptions
CodeLensOptions
}
// @since 3.16.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#codeLensWorkspaceClientCapabilities
type CodeLensWorkspaceClientCapabilities struct {
// Whether the client implementation supports a refresh request sent from the
// server to the client.
@@ -714,6 +820,8 @@
}
// Represents a color in RGBA space.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#color
type Color struct {
// The red component of this color in the range [0-1].
Red float64 `json:"red"`
@@ -726,12 +834,16 @@
}
// Represents a color range from a document.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#colorInformation
type ColorInformation struct {
// The range in the document where this color appears.
Range Range `json:"range"`
// The actual color value for this color range.
Color Color `json:"color"`
}
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#colorPresentation
type ColorPresentation struct {
// The label of this color presentation. It will be shown on the color
// picker header. By default this is also the text that is inserted when selecting
@@ -747,6 +859,8 @@
}
// Parameters for a {@link ColorPresentationRequest}.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#colorPresentationParams
type ColorPresentationParams struct {
// The text document.
TextDocument TextDocumentIdentifier `json:"textDocument"`
@@ -762,6 +876,8 @@
// will be used to represent a command in the UI and, optionally,
// an array of arguments which will be passed to the command handler
// function when invoked.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#command
type Command struct {
// Title of the command, like `save`.
Title string `json:"title"`
@@ -778,6 +894,8 @@
}
// Completion client capabilities
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#completionClientCapabilities
type CompletionClientCapabilities struct {
// Whether completion supports dynamic registration.
DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
@@ -802,6 +920,8 @@
}
// Contains additional information about the context in which a completion request is triggered.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#completionContext
type CompletionContext struct {
// How the completion was triggered.
TriggerKind CompletionTriggerKind `json:"triggerKind"`
@@ -812,6 +932,8 @@
// A completion item represents a text snippet that is
// proposed to complete text that is being typed.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#completionItem
type CompletionItem struct {
// The label of this completion item.
//
@@ -945,6 +1067,8 @@
// capability.
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#completionItemDefaults
type CompletionItemDefaults struct {
// A default commit character set.
//
@@ -974,6 +1098,8 @@
// Additional details for a completion item label.
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#completionItemLabelDetails
type CompletionItemLabelDetails struct {
// An optional string which is rendered less prominently directly after {@link CompletionItem.label label},
// without any spacing. Should be used for function signatures and type annotations.
@@ -991,6 +1117,8 @@
// @since 3.18.0
// @proposed
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#completionItemTagOptions
type CompletionItemTagOptions struct {
// The tags supported by the client.
ValueSet []CompletionItemTag `json:"valueSet"`
@@ -998,6 +1126,8 @@
// Represents a collection of {@link CompletionItem completion items} to be presented
// in the editor.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#completionList
type CompletionList struct {
// This list it not complete. Further typing results in recomputing this list.
//
@@ -1026,6 +1156,8 @@
// capabilities.
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#completionListCapabilities
type CompletionListCapabilities struct {
// The client supports the following itemDefaults on
// a completion list.
@@ -1039,6 +1171,8 @@
}
// Completion options.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#completionOptions
type CompletionOptions struct {
// Most tools trigger completion request automatically without explicitly requesting
// it using a keyboard shortcut (e.g. Ctrl+Space). Typically they do so when the user
@@ -1070,6 +1204,8 @@
}
// Completion parameters
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#completionParams
type CompletionParams struct {
// The completion context. This is only available it the client specifies
// to send this using the client capability `textDocument.completion.contextSupport === true`
@@ -1080,6 +1216,8 @@
}
// Registration options for a {@link CompletionRequest}.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#completionRegistrationOptions
type CompletionRegistrationOptions struct {
TextDocumentRegistrationOptions
CompletionOptions
@@ -1087,6 +1225,8 @@
// How a completion was triggered
type CompletionTriggerKind uint32
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#configurationItem
type ConfigurationItem struct {
// The scope to get the configuration section for.
ScopeURI *URI `json:"scopeUri,omitempty"`
@@ -1095,11 +1235,15 @@
}
// The parameters of a configuration request.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#configurationParams
type ConfigurationParams struct {
Items []ConfigurationItem `json:"items"`
}
// Create file operation.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#createFile
type CreateFile struct {
// A create
Kind string `json:"kind"`
@@ -1111,6 +1255,8 @@
}
// Options to create a file.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#createFileOptions
type CreateFileOptions struct {
// Overwrite existing file. Overwrite wins over `ignoreIfExists`
Overwrite bool `json:"overwrite,omitempty"`
@@ -1122,14 +1268,20 @@
// files.
//
// @since 3.16.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#createFilesParams
type CreateFilesParams struct {
// An array of all files/folders created in this operation.
Files []FileCreate `json:"files"`
}
// The declaration of a symbol representation as one or many {@link Location locations}.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#declaration
type Declaration = []Location // (alias)
// @since 3.14.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#declarationClientCapabilities
type DeclarationClientCapabilities struct {
// Whether declaration supports dynamic registration. If this is set to `true`
// the client supports the new `DeclarationRegistrationOptions` return value
@@ -1146,15 +1298,22 @@
//
// Servers should prefer returning `DeclarationLink` over `Declaration` if supported
// by the client.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#declarationLink
type DeclarationLink = LocationLink // (alias)
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#declarationOptions
type DeclarationOptions struct {
WorkDoneProgressOptions
}
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#declarationParams
type DeclarationParams struct {
TextDocumentPositionParams
WorkDoneProgressParams
PartialResultParams
}
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#declarationRegistrationOptions
type DeclarationRegistrationOptions struct {
DeclarationOptions
TextDocumentRegistrationOptions
@@ -1167,8 +1326,12 @@
//
// Servers should prefer returning `DefinitionLink` over `Definition` if supported
// by the client.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#definition
type Definition = Or_Definition // (alias)
// Client Capabilities for a {@link DefinitionRequest}.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#definitionClientCapabilities
type DefinitionClientCapabilities struct {
// Whether definition supports dynamic registration.
DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
@@ -1182,13 +1345,19 @@
//
// Provides additional metadata over normal {@link Location location} definitions, including the range of
// the defining symbol
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#definitionLink
type DefinitionLink = LocationLink // (alias)
// Server Capabilities for a {@link DefinitionRequest}.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#definitionOptions
type DefinitionOptions struct {
WorkDoneProgressOptions
}
// Parameters for a {@link DefinitionRequest}.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#definitionParams
type DefinitionParams struct {
TextDocumentPositionParams
WorkDoneProgressParams
@@ -1196,12 +1365,16 @@
}
// Registration options for a {@link DefinitionRequest}.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#definitionRegistrationOptions
type DefinitionRegistrationOptions struct {
TextDocumentRegistrationOptions
DefinitionOptions
}
// Delete file operation
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#deleteFile
type DeleteFile struct {
// A delete
Kind string `json:"kind"`
@@ -1213,6 +1386,8 @@
}
// Delete file options
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#deleteFileOptions
type DeleteFileOptions struct {
// Delete the content recursively if a folder is denoted.
Recursive bool `json:"recursive,omitempty"`
@@ -1224,6 +1399,8 @@
// files.
//
// @since 3.16.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#deleteFilesParams
type DeleteFilesParams struct {
// An array of all files/folders deleted in this operation.
Files []FileDelete `json:"files"`
@@ -1231,6 +1408,8 @@
// Represents a diagnostic, such as a compiler error or warning. Diagnostic objects
// are only valid in the scope of a resource.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#diagnostic
type Diagnostic struct {
// The range at which the message applies
Range Range `json:"range"`
@@ -1267,6 +1446,8 @@
// Client capabilities specific to diagnostic pull requests.
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#diagnosticClientCapabilities
type DiagnosticClientCapabilities struct {
// Whether implementation supports dynamic registration. If this is set to `true`
// the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`
@@ -1279,6 +1460,8 @@
// Diagnostic options.
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#diagnosticOptions
type DiagnosticOptions struct {
// An optional identifier under which the diagnostics are
// managed by the client.
@@ -1296,6 +1479,8 @@
// Diagnostic registration options.
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#diagnosticRegistrationOptions
type DiagnosticRegistrationOptions struct {
TextDocumentRegistrationOptions
DiagnosticOptions
@@ -1305,6 +1490,8 @@
// Represents a related message and source code location for a diagnostic. This should be
// used to point to code locations that cause or related to a diagnostics, e.g when duplicating
// a symbol in a scope.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#diagnosticRelatedInformation
type DiagnosticRelatedInformation struct {
// The location of this related diagnostic information.
Location Location `json:"location"`
@@ -1315,6 +1502,8 @@
// Cancellation data returned from a diagnostic request.
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#diagnosticServerCancellationData
type DiagnosticServerCancellationData struct {
RetriggerRequest bool `json:"retriggerRequest"`
}
@@ -1330,6 +1519,8 @@
// Workspace client capabilities specific to diagnostic pull requests.
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#diagnosticWorkspaceClientCapabilities
type DiagnosticWorkspaceClientCapabilities struct {
// Whether the client implementation supports a refresh request sent from
// the server to the client.
@@ -1340,16 +1531,22 @@
// change that requires such a calculation.
RefreshSupport bool `json:"refreshSupport,omitempty"`
}
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#didChangeConfigurationClientCapabilities
type DidChangeConfigurationClientCapabilities struct {
// Did change configuration notification supports dynamic registration.
DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
}
// The parameters of a change configuration notification.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#didChangeConfigurationParams
type DidChangeConfigurationParams struct {
// The actual changed settings
Settings interface{} `json:"settings"`
}
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#didChangeConfigurationRegistrationOptions
type DidChangeConfigurationRegistrationOptions struct {
Section *OrPSection_workspace_didChangeConfiguration `json:"section,omitempty"`
}
@@ -1357,6 +1554,8 @@
// The params sent in a change notebook document notification.
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#didChangeNotebookDocumentParams
type DidChangeNotebookDocumentParams struct {
// The notebook document that did change. The version number points
// to the version after all provided changes have been applied. If
@@ -1381,6 +1580,8 @@
}
// The change text document notification's parameters.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#didChangeTextDocumentParams
type DidChangeTextDocumentParams struct {
// The document that did change. The version number points
// to the version after all provided content changes have
@@ -1400,6 +1601,8 @@
// you receive them.
ContentChanges []TextDocumentContentChangeEvent `json:"contentChanges"`
}
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#didChangeWatchedFilesClientCapabilities
type DidChangeWatchedFilesClientCapabilities struct {
// Did change watched files notification supports dynamic registration. Please note
// that the current protocol doesn't support static configuration for file changes
@@ -1413,18 +1616,24 @@
}
// The watched files change notification's parameters.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#didChangeWatchedFilesParams
type DidChangeWatchedFilesParams struct {
// The actual file events.
Changes []FileEvent `json:"changes"`
}
// Describe options to be used when registered for text document change events.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#didChangeWatchedFilesRegistrationOptions
type DidChangeWatchedFilesRegistrationOptions struct {
// The watchers to register.
Watchers []FileSystemWatcher `json:"watchers"`
}
// The parameters of a `workspace/didChangeWorkspaceFolders` notification.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#didChangeWorkspaceFoldersParams
type DidChangeWorkspaceFoldersParams struct {
// The actual workspace folder change event.
Event WorkspaceFoldersChangeEvent `json:"event"`
@@ -1433,6 +1642,8 @@
// The params sent in a close notebook document notification.
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#didCloseNotebookDocumentParams
type DidCloseNotebookDocumentParams struct {
// The notebook document that got closed.
NotebookDocument NotebookDocumentIdentifier `json:"notebookDocument"`
@@ -1442,6 +1653,8 @@
}
// The parameters sent in a close text document notification
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#didCloseTextDocumentParams
type DidCloseTextDocumentParams struct {
// The document that was closed.
TextDocument TextDocumentIdentifier `json:"textDocument"`
@@ -1450,6 +1663,8 @@
// The params sent in an open notebook document notification.
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#didOpenNotebookDocumentParams
type DidOpenNotebookDocumentParams struct {
// The notebook document that got opened.
NotebookDocument NotebookDocument `json:"notebookDocument"`
@@ -1459,6 +1674,8 @@
}
// The parameters sent in an open text document notification
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#didOpenTextDocumentParams
type DidOpenTextDocumentParams struct {
// The document that was opened.
TextDocument TextDocumentItem `json:"textDocument"`
@@ -1467,12 +1684,16 @@
// The params sent in a save notebook document notification.
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#didSaveNotebookDocumentParams
type DidSaveNotebookDocumentParams struct {
// The notebook document that got saved.
NotebookDocument NotebookDocumentIdentifier `json:"notebookDocument"`
}
// The parameters sent in a save text document notification
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#didSaveTextDocumentParams
type DidSaveTextDocumentParams struct {
// The document that was saved.
TextDocument TextDocumentIdentifier `json:"textDocument"`
@@ -1480,23 +1701,31 @@
// when the save notification was requested.
Text *string `json:"text,omitempty"`
}
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentColorClientCapabilities
type DocumentColorClientCapabilities struct {
// Whether implementation supports dynamic registration. If this is set to `true`
// the client supports the new `DocumentColorRegistrationOptions` return value
// for the corresponding server capability as well.
DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
}
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentColorOptions
type DocumentColorOptions struct {
WorkDoneProgressOptions
}
// Parameters for a {@link DocumentColorRequest}.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentColorParams
type DocumentColorParams struct {
// The text document.
TextDocument TextDocumentIdentifier `json:"textDocument"`
WorkDoneProgressParams
PartialResultParams
}
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentColorRegistrationOptions
type DocumentColorRegistrationOptions struct {
TextDocumentRegistrationOptions
DocumentColorOptions
@@ -1506,6 +1735,8 @@
// Parameters of the document diagnostic request.
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentDiagnosticParams
type DocumentDiagnosticParams struct {
// The text document.
TextDocument TextDocumentIdentifier `json:"textDocument"`
@@ -1525,6 +1756,8 @@
// A partial result for a document diagnostic report.
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentDiagnosticReportPartialResult
type DocumentDiagnosticReportPartialResult struct {
RelatedDocuments map[DocumentURI]interface{} `json:"relatedDocuments"`
}
@@ -1533,19 +1766,27 @@
// a notebook cell document.
//
// @since 3.17.0 - proposed support for NotebookCellTextDocumentFilter.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentFilter
type DocumentFilter = Or_DocumentFilter // (alias)
// Client capabilities of a {@link DocumentFormattingRequest}.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentFormattingClientCapabilities
type DocumentFormattingClientCapabilities struct {
// Whether formatting supports dynamic registration.
DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
}
// Provider options for a {@link DocumentFormattingRequest}.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentFormattingOptions
type DocumentFormattingOptions struct {
WorkDoneProgressOptions
}
// The parameters of a {@link DocumentFormattingRequest}.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentFormattingParams
type DocumentFormattingParams struct {
// The document to format.
TextDocument TextDocumentIdentifier `json:"textDocument"`
@@ -1555,6 +1796,8 @@
}
// Registration options for a {@link DocumentFormattingRequest}.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentFormattingRegistrationOptions
type DocumentFormattingRegistrationOptions struct {
TextDocumentRegistrationOptions
DocumentFormattingOptions
@@ -1563,6 +1806,8 @@
// A document highlight is a range inside a text document which deserves
// special attention. Usually a document highlight is visualized by changing
// the background color of its range.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentHighlight
type DocumentHighlight struct {
// The range this highlight applies to.
Range Range `json:"range"`
@@ -1571,6 +1816,8 @@
}
// Client Capabilities for a {@link DocumentHighlightRequest}.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentHighlightClientCapabilities
type DocumentHighlightClientCapabilities struct {
// Whether document highlight supports dynamic registration.
DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
@@ -1580,11 +1827,15 @@
type DocumentHighlightKind uint32
// Provider options for a {@link DocumentHighlightRequest}.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentHighlightOptions
type DocumentHighlightOptions struct {
WorkDoneProgressOptions
}
// Parameters for a {@link DocumentHighlightRequest}.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentHighlightParams
type DocumentHighlightParams struct {
TextDocumentPositionParams
WorkDoneProgressParams
@@ -1592,6 +1843,8 @@
}
// Registration options for a {@link DocumentHighlightRequest}.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentHighlightRegistrationOptions
type DocumentHighlightRegistrationOptions struct {
TextDocumentRegistrationOptions
DocumentHighlightOptions
@@ -1599,6 +1852,8 @@
// A document link is a range in a text document that links to an internal or external resource, like another
// text document or a web site.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentLink
type DocumentLink struct {
// The range this link applies to.
Range Range `json:"range"`
@@ -1618,6 +1873,8 @@
}
// The client capabilities of a {@link DocumentLinkRequest}.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentLinkClientCapabilities
type DocumentLinkClientCapabilities struct {
// Whether document link supports dynamic registration.
DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
@@ -1628,6 +1885,8 @@
}
// Provider options for a {@link DocumentLinkRequest}.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentLinkOptions
type DocumentLinkOptions struct {
// Document links have a resolve provider as well.
ResolveProvider bool `json:"resolveProvider,omitempty"`
@@ -1635,6 +1894,8 @@
}
// The parameters of a {@link DocumentLinkRequest}.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentLinkParams
type DocumentLinkParams struct {
// The document to provide document links for.
TextDocument TextDocumentIdentifier `json:"textDocument"`
@@ -1643,18 +1904,24 @@
}
// Registration options for a {@link DocumentLinkRequest}.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentLinkRegistrationOptions
type DocumentLinkRegistrationOptions struct {
TextDocumentRegistrationOptions
DocumentLinkOptions
}
// Client capabilities of a {@link DocumentOnTypeFormattingRequest}.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentOnTypeFormattingClientCapabilities
type DocumentOnTypeFormattingClientCapabilities struct {
// Whether on type formatting supports dynamic registration.
DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
}
// Provider options for a {@link DocumentOnTypeFormattingRequest}.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentOnTypeFormattingOptions
type DocumentOnTypeFormattingOptions struct {
// A character on which formatting should be triggered, like `{`.
FirstTriggerCharacter string `json:"firstTriggerCharacter"`
@@ -1663,6 +1930,8 @@
}
// The parameters of a {@link DocumentOnTypeFormattingRequest}.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentOnTypeFormattingParams
type DocumentOnTypeFormattingParams struct {
// The document to format.
TextDocument TextDocumentIdentifier `json:"textDocument"`
@@ -1680,12 +1949,16 @@
}
// Registration options for a {@link DocumentOnTypeFormattingRequest}.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentOnTypeFormattingRegistrationOptions
type DocumentOnTypeFormattingRegistrationOptions struct {
TextDocumentRegistrationOptions
DocumentOnTypeFormattingOptions
}
// Client capabilities of a {@link DocumentRangeFormattingRequest}.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentRangeFormattingClientCapabilities
type DocumentRangeFormattingClientCapabilities struct {
// Whether range formatting supports dynamic registration.
DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
@@ -1697,6 +1970,8 @@
}
// Provider options for a {@link DocumentRangeFormattingRequest}.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentRangeFormattingOptions
type DocumentRangeFormattingOptions struct {
// Whether the server supports formatting multiple ranges at once.
//
@@ -1707,6 +1982,8 @@
}
// The parameters of a {@link DocumentRangeFormattingRequest}.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentRangeFormattingParams
type DocumentRangeFormattingParams struct {
// The document to format.
TextDocument TextDocumentIdentifier `json:"textDocument"`
@@ -1718,6 +1995,8 @@
}
// Registration options for a {@link DocumentRangeFormattingRequest}.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentRangeFormattingRegistrationOptions
type DocumentRangeFormattingRegistrationOptions struct {
TextDocumentRegistrationOptions
DocumentRangeFormattingOptions
@@ -1727,6 +2006,8 @@
//
// @since 3.18.0
// @proposed
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentRangesFormattingParams
type DocumentRangesFormattingParams struct {
// The document to format.
TextDocument TextDocumentIdentifier `json:"textDocument"`
@@ -1742,11 +2023,15 @@
// @sample `let sel:DocumentSelector = [{ language: 'typescript' }, { language: 'json', pattern: '**∕tsconfig.json' }]`;
//
// The use of a string as a document filter is deprecated @since 3.16.0.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentSelector
type DocumentSelector = []DocumentFilter // (alias)
// Represents programming constructs like variables, classes, interfaces etc.
// that appear in a document. Document symbols can be hierarchical and they
// have two ranges: one that encloses its definition and one that points to
// its most interesting range, e.g. the range of an identifier.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentSymbol
type DocumentSymbol struct {
// The name of this symbol. Will be displayed in the user interface and therefore must not be
// an empty string or a string only consisting of white spaces.
@@ -1775,6 +2060,8 @@
}
// Client Capabilities for a {@link DocumentSymbolRequest}.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentSymbolClientCapabilities
type DocumentSymbolClientCapabilities struct {
// Whether document symbol supports dynamic registration.
DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
@@ -1797,6 +2084,8 @@
}
// Provider options for a {@link DocumentSymbolRequest}.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentSymbolOptions
type DocumentSymbolOptions struct {
// A human-readable string that is shown when multiple outlines trees
// are shown for the same document.
@@ -1807,6 +2096,8 @@
}
// Parameters for a {@link DocumentSymbolRequest}.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentSymbolParams
type DocumentSymbolParams struct {
// The text document.
TextDocument TextDocumentIdentifier `json:"textDocument"`
@@ -1815,6 +2106,8 @@
}
// Registration options for a {@link DocumentSymbolRequest}.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentSymbolRegistrationOptions
type DocumentSymbolRegistrationOptions struct {
TextDocumentRegistrationOptions
DocumentSymbolOptions
@@ -1824,6 +2117,8 @@
//
// @since 3.18.0
// @proposed
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#editRangeWithInsertReplace
type EditRangeWithInsertReplace struct {
Insert Range `json:"insert"`
Replace Range `json:"replace"`
@@ -1833,12 +2128,16 @@
type ErrorCodes int32
// The client capabilities of a {@link ExecuteCommandRequest}.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#executeCommandClientCapabilities
type ExecuteCommandClientCapabilities struct {
// Execute command supports dynamic registration.
DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
}
// The server capabilities of a {@link ExecuteCommandRequest}.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#executeCommandOptions
type ExecuteCommandOptions struct {
// The commands to be executed on the server
Commands []string `json:"commands"`
@@ -1846,6 +2145,8 @@
}
// The parameters of a {@link ExecuteCommandRequest}.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#executeCommandParams
type ExecuteCommandParams struct {
// The identifier of the actual command handler.
Command string `json:"command"`
@@ -1855,9 +2156,13 @@
}
// Registration options for a {@link ExecuteCommandRequest}.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#executeCommandRegistrationOptions
type ExecuteCommandRegistrationOptions struct {
ExecuteCommandOptions
}
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#executionSummary
type ExecutionSummary struct {
// A strict monotonically increasing value
// indicating the execution order of a cell
@@ -1875,6 +2180,8 @@
// Represents information on a file/folder create.
//
// @since 3.16.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#fileCreate
type FileCreate struct {
// A file:// URI for the location of the file/folder being created.
URI string `json:"uri"`
@@ -1883,12 +2190,16 @@
// Represents information on a file/folder delete.
//
// @since 3.16.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#fileDelete
type FileDelete struct {
// A file:// URI for the location of the file/folder being deleted.
URI string `json:"uri"`
}
// An event describing a file change.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#fileEvent
type FileEvent struct {
// The file's uri.
URI DocumentURI `json:"uri"`
@@ -1902,6 +2213,8 @@
// like renaming a file in the UI.
//
// @since 3.16.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#fileOperationClientCapabilities
type FileOperationClientCapabilities struct {
// Whether the client supports dynamic registration for file requests/notifications.
DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
@@ -1923,6 +2236,8 @@
// the server is interested in receiving.
//
// @since 3.16.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#fileOperationFilter
type FileOperationFilter struct {
// A Uri scheme like `file` or `untitled`.
Scheme string `json:"scheme,omitempty"`
@@ -1933,6 +2248,8 @@
// Options for notifications/requests for user operations on files.
//
// @since 3.16.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#fileOperationOptions
type FileOperationOptions struct {
// The server is interested in receiving didCreateFiles notifications.
DidCreate *FileOperationRegistrationOptions `json:"didCreate,omitempty"`
@@ -1952,6 +2269,8 @@
// the server is interested in receiving.
//
// @since 3.16.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#fileOperationPattern
type FileOperationPattern struct {
// The glob pattern to match. Glob patterns can have the following syntax:
//
@@ -1979,6 +2298,8 @@
// Matching options for the file operation pattern.
//
// @since 3.16.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#fileOperationPatternOptions
type FileOperationPatternOptions struct {
// The pattern should be matched ignoring casing.
IgnoreCase bool `json:"ignoreCase,omitempty"`
@@ -1987,6 +2308,8 @@
// The options to register for file operations.
//
// @since 3.16.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#fileOperationRegistrationOptions
type FileOperationRegistrationOptions struct {
// The actual filters.
Filters []FileOperationFilter `json:"filters"`
@@ -1995,12 +2318,16 @@
// Represents information on a file/folder rename.
//
// @since 3.16.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#fileRename
type FileRename struct {
// A file:// URI for the original location of the file/folder being renamed.
OldURI string `json:"oldUri"`
// A file:// URI for the new location of the file/folder being renamed.
NewURI string `json:"newUri"`
}
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#fileSystemWatcher
type FileSystemWatcher struct {
// The glob pattern to watch. See {@link GlobPattern glob pattern} for more detail.
//
@@ -2014,6 +2341,8 @@
// Represents a folding range. To be valid, start and end line must be bigger than zero and smaller
// than the number of lines in the document. Clients are free to ignore invalid ranges.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#foldingRange
type FoldingRange struct {
// The zero-based start line of the range to fold. The folded area starts after the line's last character.
// To be valid, the end must be zero or larger and smaller than the number of lines in the document.
@@ -2036,6 +2365,8 @@
// @since 3.17.0
CollapsedText string `json:"collapsedText,omitempty"`
}
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#foldingRangeClientCapabilities
type FoldingRangeClientCapabilities struct {
// Whether implementation supports dynamic registration for folding range
// providers. If this is set to `true` the client supports the new
@@ -2062,17 +2393,23 @@
// A set of predefined range kinds.
type FoldingRangeKind string
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#foldingRangeOptions
type FoldingRangeOptions struct {
WorkDoneProgressOptions
}
// Parameters for a {@link FoldingRangeRequest}.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#foldingRangeParams
type FoldingRangeParams struct {
// The text document.
TextDocument TextDocumentIdentifier `json:"textDocument"`
WorkDoneProgressParams
PartialResultParams
}
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#foldingRangeRegistrationOptions
type FoldingRangeRegistrationOptions struct {
TextDocumentRegistrationOptions
FoldingRangeOptions
@@ -2083,6 +2420,8 @@
//
// @since 3.18.0
// @proposed
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#foldingRangeWorkspaceClientCapabilities
type FoldingRangeWorkspaceClientCapabilities struct {
// Whether the client implementation supports a refresh request sent from the
// server to the client.
@@ -2098,6 +2437,8 @@
}
// Value-object describing what options formatting should use.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#formattingOptions
type FormattingOptions struct {
// Size of a tab in spaces.
TabSize uint32 `json:"tabSize"`
@@ -2120,6 +2461,8 @@
// A diagnostic report with a full set of problems.
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#fullDocumentDiagnosticReport
type FullDocumentDiagnosticReport struct {
// A full document diagnostic report.
Kind string `json:"kind"`
@@ -2134,6 +2477,8 @@
// General client capabilities.
//
// @since 3.16.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#generalClientCapabilities
type GeneralClientCapabilities struct {
// Client capability that signals how the client
// handles stale requests (e.g. a request
@@ -2174,8 +2519,12 @@
// The glob pattern. Either a string pattern or a relative pattern.
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#globPattern
type GlobPattern = Or_GlobPattern // (alias)
// The result of a hover request.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#hover
type Hover struct {
// The hover's content
Contents MarkupContent `json:"contents"`
@@ -2183,6 +2532,8 @@
// visualize the hover, e.g. by changing the background color.
Range Range `json:"range,omitempty"`
}
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#hoverClientCapabilities
type HoverClientCapabilities struct {
// Whether hover supports dynamic registration.
DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
@@ -2192,23 +2543,31 @@
}
// Hover options.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#hoverOptions
type HoverOptions struct {
WorkDoneProgressOptions
}
// Parameters for a {@link HoverRequest}.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#hoverParams
type HoverParams struct {
TextDocumentPositionParams
WorkDoneProgressParams
}
// Registration options for a {@link HoverRequest}.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#hoverRegistrationOptions
type HoverRegistrationOptions struct {
TextDocumentRegistrationOptions
HoverOptions
}
// @since 3.6.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#implementationClientCapabilities
type ImplementationClientCapabilities struct {
// Whether implementation supports dynamic registration. If this is set to `true`
// the client supports the new `ImplementationRegistrationOptions` return value
@@ -2219,14 +2578,20 @@
// @since 3.14.0
LinkSupport bool `json:"linkSupport,omitempty"`
}
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#implementationOptions
type ImplementationOptions struct {
WorkDoneProgressOptions
}
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#implementationParams
type ImplementationParams struct {
TextDocumentPositionParams
WorkDoneProgressParams
PartialResultParams
}
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#implementationRegistrationOptions
type ImplementationRegistrationOptions struct {
TextDocumentRegistrationOptions
ImplementationOptions
@@ -2235,6 +2600,8 @@
// The data type of the ResponseError if the
// initialize request fails.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#initializeError
type InitializeError struct {
// Indicates whether the client execute the following retry logic:
// (1) show the message provided by the ResponseError to the user
@@ -2242,12 +2609,16 @@
// (3) if user selected retry the initialize method is sent again.
Retry bool `json:"retry"`
}
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#initializeParams
type InitializeParams struct {
XInitializeParams
WorkspaceFoldersInitializeParams
}
// The result returned from an initialize request.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#initializeResult
type InitializeResult struct {
// The capabilities the language server provides.
Capabilities ServerCapabilities `json:"capabilities"`
@@ -2256,12 +2627,16 @@
// @since 3.15.0
ServerInfo *ServerInfo `json:"serverInfo,omitempty"`
}
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#initializedParams
type InitializedParams struct {
}
// Inlay hint information.
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#inlayHint
type InlayHint struct {
// The position of this hint.
//
@@ -2304,6 +2679,8 @@
// Inlay hint client capabilities.
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#inlayHintClientCapabilities
type InlayHintClientCapabilities struct {
// Whether inlay hints support dynamic registration.
DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
@@ -2321,6 +2698,8 @@
// of inlay hints.
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#inlayHintLabelPart
type InlayHintLabelPart struct {
// The value of this label part.
Value string `json:"value"`
@@ -2350,6 +2729,8 @@
// Inlay hint options used during static registration.
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#inlayHintOptions
type InlayHintOptions struct {
// The server provides support to resolve additional
// information for an inlay hint item.
@@ -2360,6 +2741,8 @@
// A parameter literal used in inlay hint requests.
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#inlayHintParams
type InlayHintParams struct {
// The text document.
TextDocument TextDocumentIdentifier `json:"textDocument"`
@@ -2371,6 +2754,8 @@
// Inlay hint options used during static or dynamic registration.
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#inlayHintRegistrationOptions
type InlayHintRegistrationOptions struct {
InlayHintOptions
TextDocumentRegistrationOptions
@@ -2380,6 +2765,8 @@
// Client workspace capabilities specific to inlay hints.
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#inlayHintWorkspaceClientCapabilities
type InlayHintWorkspaceClientCapabilities struct {
// Whether the client implementation supports a refresh request sent from
// the server to the client.
@@ -2395,6 +2782,8 @@
//
// @since 3.18.0
// @proposed
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#inlineCompletionClientCapabilities
type InlineCompletionClientCapabilities struct {
// Whether implementation supports dynamic registration for inline completion providers.
DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
@@ -2404,6 +2793,8 @@
//
// @since 3.18.0
// @proposed
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#inlineCompletionContext
type InlineCompletionContext struct {
// Describes how the inline completion was triggered.
TriggerKind InlineCompletionTriggerKind `json:"triggerKind"`
@@ -2415,6 +2806,8 @@
//
// @since 3.18.0
// @proposed
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#inlineCompletionItem
type InlineCompletionItem struct {
// The text to replace the range with. Must be set.
InsertText Or_InlineCompletionItem_insertText `json:"insertText"`
@@ -2430,6 +2823,8 @@
//
// @since 3.18.0
// @proposed
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#inlineCompletionList
type InlineCompletionList struct {
// The inline completion items
Items []InlineCompletionItem `json:"items"`
@@ -2439,6 +2834,8 @@
//
// @since 3.18.0
// @proposed
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#inlineCompletionOptions
type InlineCompletionOptions struct {
WorkDoneProgressOptions
}
@@ -2447,6 +2844,8 @@
//
// @since 3.18.0
// @proposed
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#inlineCompletionParams
type InlineCompletionParams struct {
// Additional information about the context in which inline completions were
// requested.
@@ -2459,6 +2858,8 @@
//
// @since 3.18.0
// @proposed
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#inlineCompletionRegistrationOptions
type InlineCompletionRegistrationOptions struct {
InlineCompletionOptions
TextDocumentRegistrationOptions
@@ -2480,16 +2881,22 @@
// The InlineValue types combines all inline value types into one type.
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#inlineValue
type InlineValue = Or_InlineValue // (alias)
// Client capabilities specific to inline values.
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#inlineValueClientCapabilities
type InlineValueClientCapabilities struct {
// Whether implementation supports dynamic registration for inline value providers.
DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
}
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#inlineValueContext
type InlineValueContext struct {
// The stack frame (as a DAP Id) where the execution has stopped.
FrameID int32 `json:"frameId"`
@@ -2503,6 +2910,8 @@
// An optional expression can be used to override the extracted expression.
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#inlineValueEvaluatableExpression
type InlineValueEvaluatableExpression struct {
// The document range for which the inline value applies.
// The range is used to extract the evaluatable expression from the underlying document.
@@ -2514,6 +2923,8 @@
// Inline value options used during static registration.
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#inlineValueOptions
type InlineValueOptions struct {
WorkDoneProgressOptions
}
@@ -2521,6 +2932,8 @@
// A parameter literal used in inline value requests.
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#inlineValueParams
type InlineValueParams struct {
// The text document.
TextDocument TextDocumentIdentifier `json:"textDocument"`
@@ -2535,6 +2948,8 @@
// Inline value options used during static or dynamic registration.
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#inlineValueRegistrationOptions
type InlineValueRegistrationOptions struct {
InlineValueOptions
TextDocumentRegistrationOptions
@@ -2544,6 +2959,8 @@
// Provide inline value as text.
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#inlineValueText
type InlineValueText struct {
// The document range for which the inline value applies.
Range Range `json:"range"`
@@ -2556,6 +2973,8 @@
// An optional variable name can be used to override the extracted name.
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#inlineValueVariableLookup
type InlineValueVariableLookup struct {
// The document range for which the inline value applies.
// The range is used to extract the variable name from the underlying document.
@@ -2569,6 +2988,8 @@
// Client workspace capabilities specific to inline values.
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#inlineValueWorkspaceClientCapabilities
type InlineValueWorkspaceClientCapabilities struct {
// Whether the client implementation supports a refresh request sent from the
// server to the client.
@@ -2583,6 +3004,8 @@
// A special text edit to provide an insert and a replace operation.
//
// @since 3.16.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#insertReplaceEdit
type InsertReplaceEdit struct {
// The string to be inserted.
NewText string `json:"newText"`
@@ -2605,11 +3028,15 @@
// LSP arrays.
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#lSPArray
type LSPArray = []interface{} // (alias)
type LSPErrorCodes int32
// LSP object definition.
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#lSPObject
type LSPObject = map[string]LSPAny // (alias)
// Predefined Language kinds
// @since 3.18.0
@@ -2619,19 +3046,27 @@
// Client capabilities for the linked editing range request.
//
// @since 3.16.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#linkedEditingRangeClientCapabilities
type LinkedEditingRangeClientCapabilities struct {
// Whether implementation supports dynamic registration. If this is set to `true`
// the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`
// return value for the corresponding server capability as well.
DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
}
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#linkedEditingRangeOptions
type LinkedEditingRangeOptions struct {
WorkDoneProgressOptions
}
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#linkedEditingRangeParams
type LinkedEditingRangeParams struct {
TextDocumentPositionParams
WorkDoneProgressParams
}
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#linkedEditingRangeRegistrationOptions
type LinkedEditingRangeRegistrationOptions struct {
TextDocumentRegistrationOptions
LinkedEditingRangeOptions
@@ -2641,6 +3076,8 @@
// The result of a linked editing range request.
//
// @since 3.16.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#linkedEditingRanges
type LinkedEditingRanges struct {
// A list of ranges that can be edited together. The ranges must have
// identical length and contain identical text content. The ranges cannot overlap.
@@ -2657,6 +3094,8 @@
// Represents a location inside a resource, such as a line
// inside a text file.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#location
type Location struct {
URI DocumentURI `json:"uri"`
Range Range `json:"range"`
@@ -2664,6 +3103,8 @@
// Represents the connection of two locations. Provides additional metadata over normal {@link Location locations},
// including an origin range.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#locationLink
type LocationLink struct {
// Span of the origin of this link.
//
@@ -2685,17 +3126,23 @@
//
// @since 3.18.0
// @proposed
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#locationUriOnly
type LocationUriOnly struct {
URI DocumentURI `json:"uri"`
}
// The log message parameters.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#logMessageParams
type LogMessageParams struct {
// The message type. See {@link MessageType}
Type MessageType `json:"type"`
// The actual message.
Message string `json:"message"`
}
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#logTraceParams
type LogTraceParams struct {
Message string `json:"message"`
Verbose string `json:"verbose,omitempty"`
@@ -2704,6 +3151,8 @@
// Client capabilities specific to the used markdown parser.
//
// @since 3.16.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#markdownClientCapabilities
type MarkdownClientCapabilities struct {
// The name of the parser.
Parser string `json:"parser"`
@@ -2728,10 +3177,14 @@
//
// Note that markdown strings will be sanitized - that means html will be escaped.
// @deprecated use MarkupContent instead.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#markedString
type MarkedString = Or_MarkedString // (alias)
// @since 3.18.0
// @proposed
// @deprecated use MarkupContent instead.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#markedStringWithLanguage
type MarkedStringWithLanguage struct {
Language string `json:"language"`
Value string `json:"value"`
@@ -2761,6 +3214,8 @@
//
// *Please Note* that clients might sanitize the return markdown. A client could decide to
// remove HTML from the markdown to avoid script execution.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#markupContent
type MarkupContent struct {
// The type of the Markup
Kind MarkupKind `json:"kind"`
@@ -2774,6 +3229,8 @@
// Please note that `MarkupKinds` must not start with a `$`. This kinds
// are reserved for internal usage.
type MarkupKind string
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#messageActionItem
type MessageActionItem struct {
// A short title like 'Retry', 'Open Log' etc.
Title string `json:"title"`
@@ -2785,6 +3242,8 @@
// Moniker definition to match LSIF 0.5 moniker definition.
//
// @since 3.16.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#moniker
type Moniker struct {
// The scheme of the moniker. For example tsc or .Net
Scheme string `json:"scheme"`
@@ -2800,6 +3259,8 @@
// Client capabilities specific to the moniker request.
//
// @since 3.16.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#monikerClientCapabilities
type MonikerClientCapabilities struct {
// Whether moniker supports dynamic registration. If this is set to `true`
// the client supports the new `MonikerRegistrationOptions` return value
@@ -2811,14 +3272,20 @@
//
// @since 3.16.0
type MonikerKind string
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#monikerOptions
type MonikerOptions struct {
WorkDoneProgressOptions
}
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#monikerParams
type MonikerParams struct {
TextDocumentPositionParams
WorkDoneProgressParams
PartialResultParams
}
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#monikerRegistrationOptions
type MonikerRegistrationOptions struct {
TextDocumentRegistrationOptions
MonikerOptions
@@ -2831,6 +3298,8 @@
// notebook cell or the cell's text document.
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#notebookCell
type NotebookCell struct {
// The cell's kind
Kind NotebookCellKind `json:"kind"`
@@ -2850,6 +3319,8 @@
// array from state S to S'.
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#notebookCellArrayChange
type NotebookCellArrayChange struct {
// The start oftest of the cell that changed.
Start uint32 `json:"start"`
@@ -2866,6 +3337,8 @@
// @since 3.18.0
// @proposed
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#notebookCellLanguage
type NotebookCellLanguage struct {
Language string `json:"language"`
}
@@ -2874,6 +3347,8 @@
// document by different properties.
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#notebookCellTextDocumentFilter
type NotebookCellTextDocumentFilter struct {
// A filter that matches against the notebook
// containing the notebook cell. If a string
@@ -2890,6 +3365,8 @@
// A notebook document.
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#notebookDocument
type NotebookDocument struct {
// The notebook document's uri.
URI URI `json:"uri"`
@@ -2911,6 +3388,8 @@
//
// @since 3.18.0
// @proposed
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#notebookDocumentCellChangeStructure
type NotebookDocumentCellChangeStructure struct {
// The change to the cell array.
Array NotebookCellArrayChange `json:"array"`
@@ -2924,6 +3403,8 @@
//
// @since 3.18.0
// @proposed
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#notebookDocumentCellChanges
type NotebookDocumentCellChanges struct {
// Changes to the cell structure to add or
// remove cells.
@@ -2939,6 +3420,8 @@
//
// @since 3.18.0
// @proposed
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#notebookDocumentCellContentChanges
type NotebookDocumentCellContentChanges struct {
Document VersionedTextDocumentIdentifier `json:"document"`
Changes []TextDocumentContentChangeEvent `json:"changes"`
@@ -2947,6 +3430,8 @@
// A change event for a notebook document.
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#notebookDocumentChangeEvent
type NotebookDocumentChangeEvent struct {
// The changed meta data if any.
//
@@ -2959,6 +3444,8 @@
// Capabilities specific to the notebook document support.
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#notebookDocumentClientCapabilities
type NotebookDocumentClientCapabilities struct {
// Capabilities specific to notebook document synchronization
//
@@ -2971,11 +3458,15 @@
// against the notebook's URI (same as with documents)
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#notebookDocumentFilter
type NotebookDocumentFilter = Or_NotebookDocumentFilter // (alias)
// A notebook document filter where `notebookType` is required field.
//
// @since 3.18.0
// @proposed
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#notebookDocumentFilterNotebookType
type NotebookDocumentFilterNotebookType struct {
// The type of the enclosing notebook.
NotebookType string `json:"notebookType"`
@@ -2989,6 +3480,8 @@
//
// @since 3.18.0
// @proposed
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#notebookDocumentFilterPattern
type NotebookDocumentFilterPattern struct {
// The type of the enclosing notebook.
NotebookType string `json:"notebookType,omitempty"`
@@ -3002,6 +3495,8 @@
//
// @since 3.18.0
// @proposed
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#notebookDocumentFilterScheme
type NotebookDocumentFilterScheme struct {
// The type of the enclosing notebook.
NotebookType string `json:"notebookType,omitempty"`
@@ -3013,6 +3508,8 @@
// @since 3.18.0
// @proposed
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#notebookDocumentFilterWithCells
type NotebookDocumentFilterWithCells struct {
// The notebook to be synced If a string
// value is provided it matches against the
@@ -3024,6 +3521,8 @@
// @since 3.18.0
// @proposed
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#notebookDocumentFilterWithNotebook
type NotebookDocumentFilterWithNotebook struct {
// The notebook to be synced If a string
// value is provided it matches against the
@@ -3036,6 +3535,8 @@
// A literal to identify a notebook document in the client.
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#notebookDocumentIdentifier
type NotebookDocumentIdentifier struct {
// The notebook document's uri.
URI URI `json:"uri"`
@@ -3044,6 +3545,8 @@
// Notebook specific client capabilities.
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#notebookDocumentSyncClientCapabilities
type NotebookDocumentSyncClientCapabilities struct {
// Whether implementation supports dynamic registration. If this is
// set to `true` the client supports the new
@@ -3067,6 +3570,8 @@
// cell will be synced.
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#notebookDocumentSyncOptions
type NotebookDocumentSyncOptions struct {
// The notebooks to be synced
NotebookSelector []Or_NotebookDocumentSyncOptions_notebookSelector_Elem `json:"notebookSelector"`
@@ -3078,12 +3583,16 @@
// Registration options specific to a notebook.
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#notebookDocumentSyncRegistrationOptions
type NotebookDocumentSyncRegistrationOptions struct {
NotebookDocumentSyncOptions
StaticRegistrationOptions
}
// A text document identifier to optionally denote a specific version of a text document.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#optionalVersionedTextDocumentIdentifier
type OptionalVersionedTextDocumentIdentifier struct {
// The version number of this document. If a versioned text document identifier
// is sent from the server to the client and the file is not open in the editor
@@ -3429,9 +3938,13 @@
}
// The parameters of a configuration request.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#configurationParams
type ParamConfiguration struct {
Items []ConfigurationItem `json:"items"`
}
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#initializeParams
type ParamInitialize struct {
XInitializeParams
WorkspaceFoldersInitializeParams
@@ -3439,6 +3952,8 @@
// Represents a parameter of a callable-signature. A parameter can
// have a label and a doc-comment.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#parameterInformation
type ParameterInformation struct {
// The label of this parameter information.
//
@@ -3457,6 +3972,8 @@
// in the UI but can be omitted.
Documentation string `json:"documentation,omitempty"`
}
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#partialResultParams
type PartialResultParams struct {
// An optional token that a server can use to report partial results (e.g. streaming) to
// the client.
@@ -3473,6 +3990,8 @@
// - `[!...]` 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`)
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#pattern
type Pattern = string // (alias)
// Position in a text document expressed as zero-based line and character
// offset. Prior to 3.17 the offsets were always based on a UTF-16 string
@@ -3501,6 +4020,8 @@
// that denotes `\r|\n` or `\n|` where `|` represents the character offset.
//
// @since 3.17.0 - support for negotiated position encoding.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#position
type Position struct {
// Line position in a document (zero-based).
//
@@ -3524,9 +4045,13 @@
// @since 3.18.0
// @proposed
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#prepareRenameDefaultBehavior
type PrepareRenameDefaultBehavior struct {
DefaultBehavior bool `json:"defaultBehavior"`
}
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#prepareRenameParams
type PrepareRenameParams struct {
TextDocumentPositionParams
WorkDoneProgressParams
@@ -3534,16 +4059,22 @@
// @since 3.18.0
// @proposed
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#prepareRenamePlaceholder
type PrepareRenamePlaceholder struct {
Range Range `json:"range"`
Placeholder string `json:"placeholder"`
}
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#prepareRenameResult
type PrepareRenameResult = PrepareRenamePlaceholder // (alias)
type PrepareSupportDefaultBehavior uint32
// A previous result id in a workspace pull request.
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#previousResultId
type PreviousResultID struct {
// The URI for which the client knowns a
// result id.
@@ -3555,6 +4086,8 @@
// A previous result id in a workspace pull request.
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#previousResultId
type PreviousResultId struct {
// The URI for which the client knowns a
// result id.
@@ -3562,14 +4095,20 @@
// The value of the previous result id.
Value string `json:"value"`
}
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#progressParams
type ProgressParams struct {
// The progress token provided by the client or server.
Token ProgressToken `json:"token"`
// The progress data.
Value interface{} `json:"value"`
}
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#progressToken
type ProgressToken = interface{} // (alias)
// The publish diagnostic client capabilities.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#publishDiagnosticsClientCapabilities
type PublishDiagnosticsClientCapabilities struct {
// Whether the clients accepts diagnostics with related information.
RelatedInformation bool `json:"relatedInformation,omitempty"`
@@ -3596,6 +4135,8 @@
}
// The publish diagnostic notification's parameters.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#publishDiagnosticsParams
type PublishDiagnosticsParams struct {
// The URI for which diagnostic information is reported.
URI DocumentURI `json:"uri"`
@@ -3620,6 +4161,8 @@
// }
//
// ```
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#range
type Range struct {
// The range's start position.
Start Position `json:"start"`
@@ -3628,6 +4171,8 @@
}
// Client Capabilities for a {@link ReferencesRequest}.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#referenceClientCapabilities
type ReferenceClientCapabilities struct {
// Whether references supports dynamic registration.
DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
@@ -3635,17 +4180,23 @@
// Value-object that contains additional information when
// requesting references.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#referenceContext
type ReferenceContext struct {
// Include the declaration of the current symbol.
IncludeDeclaration bool `json:"includeDeclaration"`
}
// Reference options.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#referenceOptions
type ReferenceOptions struct {
WorkDoneProgressOptions
}
// Parameters for a {@link ReferencesRequest}.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#referenceParams
type ReferenceParams struct {
Context ReferenceContext `json:"context"`
TextDocumentPositionParams
@@ -3654,12 +4205,16 @@
}
// Registration options for a {@link ReferencesRequest}.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#referenceRegistrationOptions
type ReferenceRegistrationOptions struct {
TextDocumentRegistrationOptions
ReferenceOptions
}
// General parameters to register for a notification or to register a provider.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#registration
type Registration struct {
// The id used to register the request. The id can be used to deregister
// the request again.
@@ -3669,13 +4224,19 @@
// Options necessary for the registration.
RegisterOptions interface{} `json:"registerOptions,omitempty"`
}
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#registrationParams
type RegistrationParams struct {
Registrations []Registration `json:"registrations"`
}
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#regularExpressionEngineKind
type RegularExpressionEngineKind = string // (alias)
// Client capabilities specific to regular expressions.
//
// @since 3.16.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#regularExpressionsClientCapabilities
type RegularExpressionsClientCapabilities struct {
// The engine's name.
Engine RegularExpressionEngineKind `json:"engine"`
@@ -3686,6 +4247,8 @@
// A full diagnostic report with a set of related documents.
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#relatedFullDocumentDiagnosticReport
type RelatedFullDocumentDiagnosticReport struct {
// Diagnostics of related documents. This information is useful
// in programming languages where code in a file A can generate
@@ -3701,6 +4264,8 @@
// An unchanged diagnostic report with a set of related documents.
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#relatedUnchangedDocumentDiagnosticReport
type RelatedUnchangedDocumentDiagnosticReport struct {
// Diagnostics of related documents. This information is useful
// in programming languages where code in a file A can generate
@@ -3718,6 +4283,8 @@
// folder root, but it can be another absolute URI as well.
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#relativePattern
type RelativePattern struct {
// A workspace folder or a base URI to which this pattern will be matched
// against relatively.
@@ -3725,6 +4292,8 @@
// The actual glob pattern;
Pattern Pattern `json:"pattern"`
}
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#renameClientCapabilities
type RenameClientCapabilities struct {
// Whether rename supports dynamic registration.
DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
@@ -3751,6 +4320,8 @@
}
// Rename file operation
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#renameFile
type RenameFile struct {
// A rename
Kind string `json:"kind"`
@@ -3764,6 +4335,8 @@
}
// Rename file options
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#renameFileOptions
type RenameFileOptions struct {
// Overwrite target if existing. Overwrite wins over `ignoreIfExists`
Overwrite bool `json:"overwrite,omitempty"`
@@ -3775,6 +4348,8 @@
// files.
//
// @since 3.16.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#renameFilesParams
type RenameFilesParams struct {
// An array of all files/folders renamed in this operation. When a folder is renamed, only
// the folder will be included, and not its children.
@@ -3782,6 +4357,8 @@
}
// Provider options for a {@link RenameRequest}.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#renameOptions
type RenameOptions struct {
// Renames should be checked and tested before being executed.
//
@@ -3791,6 +4368,8 @@
}
// The parameters of a {@link RenameRequest}.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#renameParams
type RenameParams struct {
// The document to rename.
TextDocument TextDocumentIdentifier `json:"textDocument"`
@@ -3804,12 +4383,16 @@
}
// Registration options for a {@link RenameRequest}.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#renameRegistrationOptions
type RenameRegistrationOptions struct {
TextDocumentRegistrationOptions
RenameOptions
}
// A generic resource operation.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#resourceOperation
type ResourceOperation struct {
// The resource operation kind.
Kind string `json:"kind"`
@@ -3821,6 +4404,8 @@
type ResourceOperationKind string
// Save options.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#saveOptions
type SaveOptions struct {
// The client is supposed to include the content on save.
IncludeText bool `json:"includeText,omitempty"`
@@ -3830,6 +4415,8 @@
//
// @since 3.18.0
// @proposed
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#selectedCompletionInfo
type SelectedCompletionInfo struct {
// The range that will be replaced if this completion item is accepted.
Range Range `json:"range"`
@@ -3839,23 +4426,31 @@
// A selection range represents a part of a selection hierarchy. A selection range
// may have a parent selection range that contains it.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#selectionRange
type SelectionRange struct {
// The {@link Range range} of this selection range.
Range Range `json:"range"`
// The parent selection range containing this range. Therefore `parent.range` must contain `this.range`.
Parent *SelectionRange `json:"parent,omitempty"`
}
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#selectionRangeClientCapabilities
type SelectionRangeClientCapabilities struct {
// Whether implementation supports dynamic registration for selection range providers. If this is set to `true`
// the client supports the new `SelectionRangeRegistrationOptions` return value for the corresponding server
// capability as well.
DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
}
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#selectionRangeOptions
type SelectionRangeOptions struct {
WorkDoneProgressOptions
}
// A parameter literal used in selection range requests.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#selectionRangeParams
type SelectionRangeParams struct {
// The text document.
TextDocument TextDocumentIdentifier `json:"textDocument"`
@@ -3864,6 +4459,8 @@
WorkDoneProgressParams
PartialResultParams
}
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#selectionRangeRegistrationOptions
type SelectionRangeRegistrationOptions struct {
SelectionRangeOptions
TextDocumentRegistrationOptions
@@ -3885,6 +4482,8 @@
type SemanticTokenTypes string
// @since 3.16.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#semanticTokens
type SemanticTokens struct {
// An optional result id. If provided and clients support delta updating
// the client will include the result id in the next semantic token request.
@@ -3896,6 +4495,8 @@
}
// @since 3.16.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#semanticTokensClientCapabilities
type SemanticTokensClientCapabilities struct {
// Whether implementation supports dynamic registration. If this is set to `true`
// the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`
@@ -3941,6 +4542,8 @@
}
// @since 3.16.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#semanticTokensDelta
type SemanticTokensDelta struct {
ResultID string `json:"resultId,omitempty"`
// The semantic token edits to transform a previous result into a new result.
@@ -3948,6 +4551,8 @@
}
// @since 3.16.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#semanticTokensDeltaParams
type SemanticTokensDeltaParams struct {
// The text document.
TextDocument TextDocumentIdentifier `json:"textDocument"`
@@ -3959,11 +4564,15 @@
}
// @since 3.16.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#semanticTokensDeltaPartialResult
type SemanticTokensDeltaPartialResult struct {
Edits []SemanticTokensEdit `json:"edits"`
}
// @since 3.16.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#semanticTokensEdit
type SemanticTokensEdit struct {
// The start offset of the edit.
Start uint32 `json:"start"`
@@ -3977,12 +4586,16 @@
//
// @since 3.18.0
// @proposed
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#semanticTokensFullDelta
type SemanticTokensFullDelta struct {
// The server supports deltas for full documents.
Delta bool `json:"delta,omitempty"`
}
// @since 3.16.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#semanticTokensLegend
type SemanticTokensLegend struct {
// The token types a server uses.
TokenTypes []string `json:"tokenTypes"`
@@ -3991,6 +4604,8 @@
}
// @since 3.16.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#semanticTokensOptions
type SemanticTokensOptions struct {
// The legend used by the server
Legend SemanticTokensLegend `json:"legend"`
@@ -4003,6 +4618,8 @@
}
// @since 3.16.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#semanticTokensParams
type SemanticTokensParams struct {
// The text document.
TextDocument TextDocumentIdentifier `json:"textDocument"`
@@ -4011,11 +4628,15 @@
}
// @since 3.16.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#semanticTokensPartialResult
type SemanticTokensPartialResult struct {
Data []uint32 `json:"data"`
}
// @since 3.16.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#semanticTokensRangeParams
type SemanticTokensRangeParams struct {
// The text document.
TextDocument TextDocumentIdentifier `json:"textDocument"`
@@ -4026,6 +4647,8 @@
}
// @since 3.16.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#semanticTokensRegistrationOptions
type SemanticTokensRegistrationOptions struct {
TextDocumentRegistrationOptions
SemanticTokensOptions
@@ -4033,6 +4656,8 @@
}
// @since 3.16.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#semanticTokensWorkspaceClientCapabilities
type SemanticTokensWorkspaceClientCapabilities struct {
// Whether the client implementation supports a refresh request sent from
// the server to the client.
@@ -4046,6 +4671,8 @@
// Defines the capabilities provided by a language
// server.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#serverCapabilities
type ServerCapabilities struct {
// The position encoding the server picked from the encodings offered
// by the client via the client capability `general.positionEncodings`.
@@ -4158,6 +4785,8 @@
// @since 3.18.0
// @proposed
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#serverCompletionItemOptions
type ServerCompletionItemOptions struct {
// The server has support for completion item label
// details (see also `CompletionItemLabelDetails`) when
@@ -4172,12 +4801,16 @@
// @since 3.15.0
// @since 3.18.0 ServerInfo type name added.
// @proposed
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#serverInfo
type ServerInfo struct {
// The name of the server as defined by the server.
Name string `json:"name"`
// The server's version as defined by the server.
Version string `json:"version,omitempty"`
}
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#setTraceParams
type SetTraceParams struct {
Value TraceValue `json:"value"`
}
@@ -4185,6 +4818,8 @@
// Client capabilities for the showDocument request.
//
// @since 3.16.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#showDocumentClientCapabilities
type ShowDocumentClientCapabilities struct {
// The client has support for the showDocument
// request.
@@ -4194,6 +4829,8 @@
// Params to show a resource in the UI.
//
// @since 3.16.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#showDocumentParams
type ShowDocumentParams struct {
// The uri to show.
URI URI `json:"uri"`
@@ -4216,12 +4853,16 @@
// The result of a showDocument request.
//
// @since 3.16.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#showDocumentResult
type ShowDocumentResult struct {
// A boolean indicating if the show was successful.
Success bool `json:"success"`
}
// The parameters of a notification message.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#showMessageParams
type ShowMessageParams struct {
// The message type. See {@link MessageType}
Type MessageType `json:"type"`
@@ -4230,10 +4871,14 @@
}
// Show message request client capabilities
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#showMessageRequestClientCapabilities
type ShowMessageRequestClientCapabilities struct {
// Capabilities specific to the `MessageActionItem` type.
MessageActionItem *ClientShowMessageActionItemOptions `json:"messageActionItem,omitempty"`
}
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#showMessageRequestParams
type ShowMessageRequestParams struct {
// The message type. See {@link MessageType}
Type MessageType `json:"type"`
@@ -4246,6 +4891,8 @@
// Signature help represents the signature of something
// callable. There can be multiple signature but only one
// active and only one active parameter.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#signatureHelp
type SignatureHelp struct {
// One or more signatures.
Signatures []SignatureInformation `json:"signatures"`
@@ -4279,6 +4926,8 @@
}
// Client Capabilities for a {@link SignatureHelpRequest}.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#signatureHelpClientCapabilities
type SignatureHelpClientCapabilities struct {
// Whether signature help supports dynamic registration.
DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
@@ -4297,6 +4946,8 @@
// Additional information about the context in which a signature help request was triggered.
//
// @since 3.15.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#signatureHelpContext
type SignatureHelpContext struct {
// Action that caused signature help to be triggered.
TriggerKind SignatureHelpTriggerKind `json:"triggerKind"`
@@ -4317,6 +4968,8 @@
}
// Server Capabilities for a {@link SignatureHelpRequest}.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#signatureHelpOptions
type SignatureHelpOptions struct {
// List of characters that trigger signature help automatically.
TriggerCharacters []string `json:"triggerCharacters,omitempty"`
@@ -4331,6 +4984,8 @@
}
// Parameters for a {@link SignatureHelpRequest}.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#signatureHelpParams
type SignatureHelpParams struct {
// The signature help context. This is only available if the client specifies
// to send this using the client capability `textDocument.signatureHelp.contextSupport === true`
@@ -4342,6 +4997,8 @@
}
// Registration options for a {@link SignatureHelpRequest}.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#signatureHelpRegistrationOptions
type SignatureHelpRegistrationOptions struct {
TextDocumentRegistrationOptions
SignatureHelpOptions
@@ -4355,6 +5012,8 @@
// Represents the signature of something callable. A signature
// can have a label, like a function-name, a doc-comment, and
// a set of parameters.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#signatureInformation
type SignatureInformation struct {
// The label of this signature. Will be shown in
// the UI.
@@ -4380,6 +5039,8 @@
// @since 3.18.0
// @proposed
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#staleRequestSupportOptions
type StaleRequestSupportOptions struct {
// The client will actively cancel the request.
Cancel bool `json:"cancel"`
@@ -4391,6 +5052,8 @@
// Static registration options to be returned in the initialize
// request.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#staticRegistrationOptions
type StaticRegistrationOptions struct {
// The id used to register the request. The id can be used to deregister
// the request again. See also Registration#id.
@@ -4407,6 +5070,8 @@
//
// @since 3.18.0
// @proposed
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#stringValue
type StringValue struct {
// The kind of string value.
Kind string `json:"kind"`
@@ -4416,6 +5081,8 @@
// Represents information about programming constructs like variables, classes,
// interfaces etc.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#symbolInformation
type SymbolInformation struct {
// extends BaseSymbolInformation
// Indicates if this symbol is deprecated.
@@ -4456,6 +5123,8 @@
type SymbolTag uint32
// Describe options to be used when registered for text document change events.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocumentChangeRegistrationOptions
type TextDocumentChangeRegistrationOptions struct {
// How documents are synced to the server.
SyncKind TextDocumentSyncKind `json:"syncKind"`
@@ -4463,6 +5132,8 @@
}
// Text document specific client capabilities.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocumentClientCapabilities
type TextDocumentClientCapabilities struct {
// Defines which synchronization capabilities the client supports.
Synchronization *TextDocumentSyncClientCapabilities `json:"synchronization,omitempty"`
@@ -4562,9 +5233,13 @@
// An event describing a change to a text document. If only a text is provided
// it is considered to be the full content of the document.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocumentContentChangeEvent
type TextDocumentContentChangeEvent = TextDocumentContentChangePartial // (alias)
// @since 3.18.0
// @proposed
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocumentContentChangePartial
type TextDocumentContentChangePartial struct {
// The range of the document that changed.
Range *Range `json:"range,omitempty"`
@@ -4578,6 +5253,8 @@
// @since 3.18.0
// @proposed
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocumentContentChangeWholeDocument
type TextDocumentContentChangeWholeDocument struct {
// The new text of the whole document.
Text string `json:"text"`
@@ -4587,6 +5264,8 @@
// on a document version Si and after they are applied move the document to version Si+1.
// So the creator of a TextDocumentEdit doesn't need to sort the array of edits or do any
// kind of ordering. However the edits must be non overlapping.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocumentEdit
type TextDocumentEdit struct {
// The text document to change.
TextDocument OptionalVersionedTextDocumentIdentifier `json:"textDocument"`
@@ -4614,11 +5293,15 @@
// @sample A language filter that applies to all package.json paths: `{ language: 'json', pattern: '**package.json' }`
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocumentFilter
type TextDocumentFilter = Or_TextDocumentFilter // (alias)
// A document filter where `language` is required field.
//
// @since 3.18.0
// @proposed
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocumentFilterLanguage
type TextDocumentFilterLanguage struct {
// A language id, like `typescript`.
Language string `json:"language"`
@@ -4632,6 +5315,8 @@
//
// @since 3.18.0
// @proposed
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocumentFilterPattern
type TextDocumentFilterPattern struct {
// A language id, like `typescript`.
Language string `json:"language,omitempty"`
@@ -4645,6 +5330,8 @@
//
// @since 3.18.0
// @proposed
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocumentFilterScheme
type TextDocumentFilterScheme struct {
// A language id, like `typescript`.
Language string `json:"language,omitempty"`
@@ -4655,6 +5342,8 @@
}
// A literal to identify a text document in the client.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocumentIdentifier
type TextDocumentIdentifier struct {
// The text document's uri.
URI DocumentURI `json:"uri"`
@@ -4662,6 +5351,8 @@
// An item to transfer a text document from the client to the
// server.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocumentItem
type TextDocumentItem struct {
// The text document's uri.
URI DocumentURI `json:"uri"`
@@ -4676,6 +5367,8 @@
// A parameter literal used in requests to pass a text document and a position inside that
// document.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocumentPositionParams
type TextDocumentPositionParams struct {
// The text document.
TextDocument TextDocumentIdentifier `json:"textDocument"`
@@ -4684,6 +5377,8 @@
}
// General text document registration options.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocumentRegistrationOptions
type TextDocumentRegistrationOptions struct {
// A document selector to identify the scope of the registration. If set to null
// the document selector provided on the client side will be used.
@@ -4694,10 +5389,14 @@
type TextDocumentSaveReason uint32
// Save registration options.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocumentSaveRegistrationOptions
type TextDocumentSaveRegistrationOptions struct {
TextDocumentRegistrationOptions
SaveOptions
}
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocumentSyncClientCapabilities
type TextDocumentSyncClientCapabilities struct {
// Whether text document synchronization supports dynamic registration.
DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
@@ -4714,6 +5413,8 @@
// Defines how the host (editor) should sync
// document changes to the language server.
type TextDocumentSyncKind uint32
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocumentSyncOptions
type TextDocumentSyncOptions struct {
// Open and close notifications are sent to the server. If omitted open close notification should not
// be sent.
@@ -4733,6 +5434,8 @@
}
// A text edit applicable to a text document.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textEdit
type TextEdit struct {
// The range of the text document to be manipulated. To insert
// text into a document create a range where start === end.
@@ -4745,6 +5448,8 @@
type TraceValue string
// Since 3.6.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#typeDefinitionClientCapabilities
type TypeDefinitionClientCapabilities struct {
// Whether implementation supports dynamic registration. If this is set to `true`
// the client supports the new `TypeDefinitionRegistrationOptions` return value
@@ -4755,14 +5460,20 @@
// Since 3.14.0
LinkSupport bool `json:"linkSupport,omitempty"`
}
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#typeDefinitionOptions
type TypeDefinitionOptions struct {
WorkDoneProgressOptions
}
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#typeDefinitionParams
type TypeDefinitionParams struct {
TextDocumentPositionParams
WorkDoneProgressParams
PartialResultParams
}
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#typeDefinitionRegistrationOptions
type TypeDefinitionRegistrationOptions struct {
TextDocumentRegistrationOptions
TypeDefinitionOptions
@@ -4770,6 +5481,8 @@
}
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#typeHierarchyClientCapabilities
type TypeHierarchyClientCapabilities struct {
// Whether implementation supports dynamic registration. If this is set to `true`
// the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`
@@ -4778,6 +5491,8 @@
}
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#typeHierarchyItem
type TypeHierarchyItem struct {
// The name of this item.
Name string `json:"name"`
@@ -4806,6 +5521,8 @@
// Type hierarchy options used during static registration.
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#typeHierarchyOptions
type TypeHierarchyOptions struct {
WorkDoneProgressOptions
}
@@ -4813,6 +5530,8 @@
// The parameter of a `textDocument/prepareTypeHierarchy` request.
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#typeHierarchyPrepareParams
type TypeHierarchyPrepareParams struct {
TextDocumentPositionParams
WorkDoneProgressParams
@@ -4821,6 +5540,8 @@
// Type hierarchy options used during static or dynamic registration.
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#typeHierarchyRegistrationOptions
type TypeHierarchyRegistrationOptions struct {
TextDocumentRegistrationOptions
TypeHierarchyOptions
@@ -4830,6 +5551,8 @@
// The parameter of a `typeHierarchy/subtypes` request.
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#typeHierarchySubtypesParams
type TypeHierarchySubtypesParams struct {
Item TypeHierarchyItem `json:"item"`
WorkDoneProgressParams
@@ -4839,6 +5562,8 @@
// The parameter of a `typeHierarchy/supertypes` request.
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#typeHierarchySupertypesParams
type TypeHierarchySupertypesParams struct {
Item TypeHierarchyItem `json:"item"`
WorkDoneProgressParams
@@ -4855,6 +5580,8 @@
// report is still accurate.
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#unchangedDocumentDiagnosticReport
type UnchangedDocumentDiagnosticReport struct {
// A document diagnostic report indicating
// no changes to the last result. A server can
@@ -4872,6 +5599,8 @@
type UniquenessLevel string
// General parameters to unregister a request or notification.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#unregistration
type Unregistration struct {
// The id used to unregister the request or notification. Usually an id
// provided during the register request.
@@ -4879,6 +5608,8 @@
// The method to unregister for.
Method string `json:"method"`
}
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#unregistrationParams
type UnregistrationParams struct {
Unregisterations []Unregistration `json:"unregisterations"`
}
@@ -4886,6 +5617,8 @@
// A versioned notebook document identifier.
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#versionedNotebookDocumentIdentifier
type VersionedNotebookDocumentIdentifier struct {
// The version number of this notebook document.
Version int32 `json:"version"`
@@ -4894,18 +5627,23 @@
}
// A text document identifier to denote a specific version of a text document.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#versionedTextDocumentIdentifier
type VersionedTextDocumentIdentifier struct {
// The version number of this document.
Version int32 `json:"version"`
TextDocumentIdentifier
}
type WatchKind = uint32 // The parameters sent in a will save text document notification.
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#willSaveTextDocumentParams
type WillSaveTextDocumentParams struct {
// The document that will be saved.
TextDocument TextDocumentIdentifier `json:"textDocument"`
// The 'TextDocumentSaveReason'.
Reason TextDocumentSaveReason `json:"reason"`
}
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#windowClientCapabilities
type WindowClientCapabilities struct {
// It indicates whether the client supports server initiated
// progress using the `window/workDoneProgress/create` request.
@@ -4926,6 +5664,8 @@
// @since 3.16.0
ShowDocument *ShowDocumentClientCapabilities `json:"showDocument,omitempty"`
}
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workDoneProgressBegin
type WorkDoneProgressBegin struct {
Kind string `json:"kind"`
// Mandatory title of the progress operation. Used to briefly inform about
@@ -4951,20 +5691,28 @@
// that are not following this rule. The value range is [0, 100].
Percentage uint32 `json:"percentage,omitempty"`
}
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workDoneProgressCancelParams
type WorkDoneProgressCancelParams struct {
// The token to be used to report progress.
Token ProgressToken `json:"token"`
}
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workDoneProgressCreateParams
type WorkDoneProgressCreateParams struct {
// The token to be used to report progress.
Token ProgressToken `json:"token"`
}
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workDoneProgressEnd
type WorkDoneProgressEnd struct {
Kind string `json:"kind"`
// Optional, a final message indicating to for example indicate the outcome
// of the operation.
Message string `json:"message,omitempty"`
}
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workDoneProgressOptions
type WorkDoneProgressOptions struct {
WorkDoneProgress bool `json:"workDoneProgress,omitempty"`
}
@@ -4974,10 +5722,14 @@
WorkDoneProgressOptions
TextDocumentRegistrationOptions
}
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workDoneProgressParams
type WorkDoneProgressParams struct {
// An optional token that a server can use to report work done progress.
WorkDoneToken ProgressToken `json:"workDoneToken,omitempty"`
}
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workDoneProgressReport
type WorkDoneProgressReport struct {
Kind string `json:"kind"`
// Controls enablement state of a cancel button.
@@ -5001,6 +5753,8 @@
}
// Workspace specific client capabilities.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspaceClientCapabilities
type WorkspaceClientCapabilities struct {
// The client supports applying batch edits
// to the workspace by supporting the request
@@ -5063,6 +5817,8 @@
// Parameters of the workspace diagnostic request.
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspaceDiagnosticParams
type WorkspaceDiagnosticParams struct {
// The additional identifier provided during registration.
Identifier string `json:"identifier,omitempty"`
@@ -5076,6 +5832,8 @@
// A workspace diagnostic report.
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspaceDiagnosticReport
type WorkspaceDiagnosticReport struct {
Items []WorkspaceDocumentDiagnosticReport `json:"items"`
}
@@ -5083,6 +5841,8 @@
// A partial result for a workspace diagnostic report.
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspaceDiagnosticReportPartialResult
type WorkspaceDiagnosticReportPartialResult struct {
Items []WorkspaceDocumentDiagnosticReport `json:"items"`
}
@@ -5090,6 +5850,8 @@
// A workspace diagnostic document report.
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspaceDocumentDiagnosticReport
type WorkspaceDocumentDiagnosticReport = Or_WorkspaceDocumentDiagnosticReport // (alias)
// A workspace edit represents changes to many resources managed in the workspace. The edit
// should either provide `changes` or `documentChanges`. If documentChanges are present
@@ -5103,6 +5865,8 @@
// An invalid sequence (e.g. (1) delete file a.txt and (2) insert text into file a.txt) will
// cause failure of the operation. How the client recovers from the failure is described by
// the client capability: `workspace.workspaceEdit.failureHandling`
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspaceEdit
type WorkspaceEdit struct {
// Holds changes to existing resources.
Changes map[DocumentURI][]TextEdit `json:"changes,omitempty"`
@@ -5125,6 +5889,8 @@
// @since 3.16.0
ChangeAnnotations map[ChangeAnnotationIdentifier]ChangeAnnotation `json:"changeAnnotations,omitempty"`
}
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspaceEditClientCapabilities
type WorkspaceEditClientCapabilities struct {
// The client supports versioned document changes in `WorkspaceEdit`s
DocumentChanges bool `json:"documentChanges,omitempty"`
@@ -5154,6 +5920,8 @@
}
// A workspace folder inside a client.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspaceFolder
type WorkspaceFolder struct {
// The associated URI for this workspace folder.
URI URI `json:"uri"`
@@ -5161,6 +5929,8 @@
// workspace folder in the user interface.
Name string `json:"name"`
}
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspaceFoldersServerCapabilities
type WorkspaceFolders5Gn struct {
// The server has support for workspace folders
Supported bool `json:"supported,omitempty"`
@@ -5175,12 +5945,16 @@
}
// The workspace folder change event.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspaceFoldersChangeEvent
type WorkspaceFoldersChangeEvent struct {
// The array of added workspace folders
Added []WorkspaceFolder `json:"added"`
// The array of the removed workspace folders
Removed []WorkspaceFolder `json:"removed"`
}
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspaceFoldersInitializeParams
type WorkspaceFoldersInitializeParams struct {
// The workspace folders configured in the client when the server starts.
//
@@ -5191,6 +5965,8 @@
// @since 3.6.0
WorkspaceFolders []WorkspaceFolder `json:"workspaceFolders,omitempty"`
}
+
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspaceFoldersServerCapabilities
type WorkspaceFoldersServerCapabilities struct {
// The server has support for workspace folders
Supported bool `json:"supported,omitempty"`
@@ -5207,6 +5983,8 @@
// A full document diagnostic report for a workspace diagnostic result.
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspaceFullDocumentDiagnosticReport
type WorkspaceFullDocumentDiagnosticReport struct {
// The URI for which diagnostic information is reported.
URI DocumentURI `json:"uri"`
@@ -5220,6 +5998,8 @@
//
// @since 3.18.0
// @proposed
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspaceOptions
type WorkspaceOptions struct {
// The server supports workspace folder.
//
@@ -5236,6 +6016,8 @@
// See also SymbolInformation.
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspaceSymbol
type WorkspaceSymbol struct {
// The location of the symbol. Whether a server is allowed to
// return a location without a range depends on the client
@@ -5250,6 +6032,8 @@
}
// Client capabilities for a {@link WorkspaceSymbolRequest}.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspaceSymbolClientCapabilities
type WorkspaceSymbolClientCapabilities struct {
// Symbol request supports dynamic registration.
DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
@@ -5269,6 +6053,8 @@
}
// Server capabilities for a {@link WorkspaceSymbolRequest}.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspaceSymbolOptions
type WorkspaceSymbolOptions struct {
// The server provides support to resolve additional
// information for a workspace symbol.
@@ -5279,6 +6065,8 @@
}
// The parameters of a {@link WorkspaceSymbolRequest}.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspaceSymbolParams
type WorkspaceSymbolParams struct {
// A query string to filter symbols by. Clients may send an empty
// string here to request all symbols.
@@ -5288,6 +6076,8 @@
}
// Registration options for a {@link WorkspaceSymbolRequest}.
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspaceSymbolRegistrationOptions
type WorkspaceSymbolRegistrationOptions struct {
WorkspaceSymbolOptions
}
@@ -5295,6 +6085,8 @@
// An unchanged document diagnostic report for a workspace diagnostic result.
//
// @since 3.17.0
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspaceUnchangedDocumentDiagnosticReport
type WorkspaceUnchangedDocumentDiagnosticReport struct {
// The URI for which diagnostic information is reported.
URI DocumentURI `json:"uri"`
@@ -5305,6 +6097,8 @@
}
// The initialize parameters
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#_InitializeParams
type XInitializeParams struct {
// The process Id of the parent process that started
// the server.
@@ -5346,6 +6140,8 @@
}
// The initialize parameters
+//
+// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#_InitializeParams
type _InitializeParams struct {
// The process Id of the parent process that started
// the server.
diff --git a/gopls/internal/protocol/tsserver.go b/gopls/internal/protocol/tsserver.go
index 5ebd19b..b405aae 100644
--- a/gopls/internal/protocol/tsserver.go
+++ b/gopls/internal/protocol/tsserver.go
@@ -17,80 +17,152 @@
)
type Server interface {
- Progress(context.Context, *ProgressParams) error // $/progress
- SetTrace(context.Context, *SetTraceParams) error // $/setTrace
- IncomingCalls(context.Context, *CallHierarchyIncomingCallsParams) ([]CallHierarchyIncomingCall, error) // callHierarchy/incomingCalls
- OutgoingCalls(context.Context, *CallHierarchyOutgoingCallsParams) ([]CallHierarchyOutgoingCall, error) // callHierarchy/outgoingCalls
- ResolveCodeAction(context.Context, *CodeAction) (*CodeAction, error) // codeAction/resolve
- ResolveCodeLens(context.Context, *CodeLens) (*CodeLens, error) // codeLens/resolve
- ResolveCompletionItem(context.Context, *CompletionItem) (*CompletionItem, error) // completionItem/resolve
- ResolveDocumentLink(context.Context, *DocumentLink) (*DocumentLink, error) // documentLink/resolve
- Exit(context.Context) error // exit
- Initialize(context.Context, *ParamInitialize) (*InitializeResult, error) // initialize
- Initialized(context.Context, *InitializedParams) error // initialized
- Resolve(context.Context, *InlayHint) (*InlayHint, error) // inlayHint/resolve
- DidChangeNotebookDocument(context.Context, *DidChangeNotebookDocumentParams) error // notebookDocument/didChange
- DidCloseNotebookDocument(context.Context, *DidCloseNotebookDocumentParams) error // notebookDocument/didClose
- DidOpenNotebookDocument(context.Context, *DidOpenNotebookDocumentParams) error // notebookDocument/didOpen
- DidSaveNotebookDocument(context.Context, *DidSaveNotebookDocumentParams) error // notebookDocument/didSave
- Shutdown(context.Context) error // shutdown
- CodeAction(context.Context, *CodeActionParams) ([]CodeAction, error) // textDocument/codeAction
- CodeLens(context.Context, *CodeLensParams) ([]CodeLens, error) // textDocument/codeLens
- ColorPresentation(context.Context, *ColorPresentationParams) ([]ColorPresentation, error) // textDocument/colorPresentation
- Completion(context.Context, *CompletionParams) (*CompletionList, error) // textDocument/completion
- Declaration(context.Context, *DeclarationParams) (*Or_textDocument_declaration, error) // textDocument/declaration
- Definition(context.Context, *DefinitionParams) ([]Location, error) // textDocument/definition
- Diagnostic(context.Context, *string) (*string, error) // textDocument/diagnostic
- DidChange(context.Context, *DidChangeTextDocumentParams) error // textDocument/didChange
- DidClose(context.Context, *DidCloseTextDocumentParams) error // textDocument/didClose
- DidOpen(context.Context, *DidOpenTextDocumentParams) error // textDocument/didOpen
- DidSave(context.Context, *DidSaveTextDocumentParams) error // textDocument/didSave
- DocumentColor(context.Context, *DocumentColorParams) ([]ColorInformation, error) // textDocument/documentColor
- DocumentHighlight(context.Context, *DocumentHighlightParams) ([]DocumentHighlight, error) // textDocument/documentHighlight
- DocumentLink(context.Context, *DocumentLinkParams) ([]DocumentLink, error) // textDocument/documentLink
- DocumentSymbol(context.Context, *DocumentSymbolParams) ([]interface{}, error) // textDocument/documentSymbol
- FoldingRange(context.Context, *FoldingRangeParams) ([]FoldingRange, error) // textDocument/foldingRange
- Formatting(context.Context, *DocumentFormattingParams) ([]TextEdit, error) // textDocument/formatting
- Hover(context.Context, *HoverParams) (*Hover, error) // textDocument/hover
- Implementation(context.Context, *ImplementationParams) ([]Location, error) // textDocument/implementation
- InlayHint(context.Context, *InlayHintParams) ([]InlayHint, error) // textDocument/inlayHint
- InlineCompletion(context.Context, *InlineCompletionParams) (*Or_Result_textDocument_inlineCompletion, error) // textDocument/inlineCompletion
- InlineValue(context.Context, *InlineValueParams) ([]InlineValue, error) // textDocument/inlineValue
- LinkedEditingRange(context.Context, *LinkedEditingRangeParams) (*LinkedEditingRanges, error) // textDocument/linkedEditingRange
- Moniker(context.Context, *MonikerParams) ([]Moniker, error) // textDocument/moniker
- OnTypeFormatting(context.Context, *DocumentOnTypeFormattingParams) ([]TextEdit, error) // textDocument/onTypeFormatting
- PrepareCallHierarchy(context.Context, *CallHierarchyPrepareParams) ([]CallHierarchyItem, error) // textDocument/prepareCallHierarchy
- PrepareRename(context.Context, *PrepareRenameParams) (*PrepareRenameResult, error) // textDocument/prepareRename
- PrepareTypeHierarchy(context.Context, *TypeHierarchyPrepareParams) ([]TypeHierarchyItem, error) // textDocument/prepareTypeHierarchy
- RangeFormatting(context.Context, *DocumentRangeFormattingParams) ([]TextEdit, error) // textDocument/rangeFormatting
- RangesFormatting(context.Context, *DocumentRangesFormattingParams) ([]TextEdit, error) // textDocument/rangesFormatting
- References(context.Context, *ReferenceParams) ([]Location, error) // textDocument/references
- Rename(context.Context, *RenameParams) (*WorkspaceEdit, error) // textDocument/rename
- SelectionRange(context.Context, *SelectionRangeParams) ([]SelectionRange, error) // textDocument/selectionRange
- SemanticTokensFull(context.Context, *SemanticTokensParams) (*SemanticTokens, error) // textDocument/semanticTokens/full
- SemanticTokensFullDelta(context.Context, *SemanticTokensDeltaParams) (interface{}, error) // textDocument/semanticTokens/full/delta
- SemanticTokensRange(context.Context, *SemanticTokensRangeParams) (*SemanticTokens, error) // textDocument/semanticTokens/range
- SignatureHelp(context.Context, *SignatureHelpParams) (*SignatureHelp, error) // textDocument/signatureHelp
- TypeDefinition(context.Context, *TypeDefinitionParams) ([]Location, error) // textDocument/typeDefinition
- WillSave(context.Context, *WillSaveTextDocumentParams) error // textDocument/willSave
- WillSaveWaitUntil(context.Context, *WillSaveTextDocumentParams) ([]TextEdit, error) // textDocument/willSaveWaitUntil
- Subtypes(context.Context, *TypeHierarchySubtypesParams) ([]TypeHierarchyItem, error) // typeHierarchy/subtypes
- Supertypes(context.Context, *TypeHierarchySupertypesParams) ([]TypeHierarchyItem, error) // typeHierarchy/supertypes
- WorkDoneProgressCancel(context.Context, *WorkDoneProgressCancelParams) error // window/workDoneProgress/cancel
- DiagnosticWorkspace(context.Context, *WorkspaceDiagnosticParams) (*WorkspaceDiagnosticReport, error) // workspace/diagnostic
- DidChangeConfiguration(context.Context, *DidChangeConfigurationParams) error // workspace/didChangeConfiguration
- DidChangeWatchedFiles(context.Context, *DidChangeWatchedFilesParams) error // workspace/didChangeWatchedFiles
- DidChangeWorkspaceFolders(context.Context, *DidChangeWorkspaceFoldersParams) error // workspace/didChangeWorkspaceFolders
- DidCreateFiles(context.Context, *CreateFilesParams) error // workspace/didCreateFiles
- DidDeleteFiles(context.Context, *DeleteFilesParams) error // workspace/didDeleteFiles
- DidRenameFiles(context.Context, *RenameFilesParams) error // workspace/didRenameFiles
- ExecuteCommand(context.Context, *ExecuteCommandParams) (interface{}, error) // workspace/executeCommand
- Symbol(context.Context, *WorkspaceSymbolParams) ([]SymbolInformation, error) // workspace/symbol
- WillCreateFiles(context.Context, *CreateFilesParams) (*WorkspaceEdit, error) // workspace/willCreateFiles
- WillDeleteFiles(context.Context, *DeleteFilesParams) (*WorkspaceEdit, error) // workspace/willDeleteFiles
- WillRenameFiles(context.Context, *RenameFilesParams) (*WorkspaceEdit, error) // workspace/willRenameFiles
- ResolveWorkspaceSymbol(context.Context, *WorkspaceSymbol) (*WorkspaceSymbol, error) // workspaceSymbol/resolve
-
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#progress
+ Progress(context.Context, *ProgressParams) error
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#setTrace
+ SetTrace(context.Context, *SetTraceParams) error
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#callHierarchy_incomingCalls
+ IncomingCalls(context.Context, *CallHierarchyIncomingCallsParams) ([]CallHierarchyIncomingCall, error)
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#callHierarchy_outgoingCalls
+ OutgoingCalls(context.Context, *CallHierarchyOutgoingCallsParams) ([]CallHierarchyOutgoingCall, error)
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#codeAction_resolve
+ ResolveCodeAction(context.Context, *CodeAction) (*CodeAction, error)
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#codeLens_resolve
+ ResolveCodeLens(context.Context, *CodeLens) (*CodeLens, error)
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#completionItem_resolve
+ ResolveCompletionItem(context.Context, *CompletionItem) (*CompletionItem, error)
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentLink_resolve
+ ResolveDocumentLink(context.Context, *DocumentLink) (*DocumentLink, error)
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#exit
+ Exit(context.Context) error
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#initialize
+ Initialize(context.Context, *ParamInitialize) (*InitializeResult, error)
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#initialized
+ Initialized(context.Context, *InitializedParams) error
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#inlayHint_resolve
+ Resolve(context.Context, *InlayHint) (*InlayHint, error)
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#notebookDocument_didChange
+ DidChangeNotebookDocument(context.Context, *DidChangeNotebookDocumentParams) error
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#notebookDocument_didClose
+ DidCloseNotebookDocument(context.Context, *DidCloseNotebookDocumentParams) error
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#notebookDocument_didOpen
+ DidOpenNotebookDocument(context.Context, *DidOpenNotebookDocumentParams) error
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#notebookDocument_didSave
+ DidSaveNotebookDocument(context.Context, *DidSaveNotebookDocumentParams) error
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#shutdown
+ Shutdown(context.Context) error
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocument_codeAction
+ CodeAction(context.Context, *CodeActionParams) ([]CodeAction, error)
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocument_codeLens
+ CodeLens(context.Context, *CodeLensParams) ([]CodeLens, error)
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocument_colorPresentation
+ ColorPresentation(context.Context, *ColorPresentationParams) ([]ColorPresentation, error)
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocument_completion
+ Completion(context.Context, *CompletionParams) (*CompletionList, error)
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocument_declaration
+ Declaration(context.Context, *DeclarationParams) (*Or_textDocument_declaration, error)
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocument_definition
+ Definition(context.Context, *DefinitionParams) ([]Location, error)
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocument_diagnostic
+ Diagnostic(context.Context, *string) (*string, error)
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocument_didChange
+ DidChange(context.Context, *DidChangeTextDocumentParams) error
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocument_didClose
+ DidClose(context.Context, *DidCloseTextDocumentParams) error
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocument_didOpen
+ DidOpen(context.Context, *DidOpenTextDocumentParams) error
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocument_didSave
+ DidSave(context.Context, *DidSaveTextDocumentParams) error
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocument_documentColor
+ DocumentColor(context.Context, *DocumentColorParams) ([]ColorInformation, error)
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocument_documentHighlight
+ DocumentHighlight(context.Context, *DocumentHighlightParams) ([]DocumentHighlight, error)
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocument_documentLink
+ DocumentLink(context.Context, *DocumentLinkParams) ([]DocumentLink, error)
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocument_documentSymbol
+ DocumentSymbol(context.Context, *DocumentSymbolParams) ([]interface{}, error)
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocument_foldingRange
+ FoldingRange(context.Context, *FoldingRangeParams) ([]FoldingRange, error)
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocument_formatting
+ Formatting(context.Context, *DocumentFormattingParams) ([]TextEdit, error)
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocument_hover
+ Hover(context.Context, *HoverParams) (*Hover, error)
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocument_implementation
+ Implementation(context.Context, *ImplementationParams) ([]Location, error)
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocument_inlayHint
+ InlayHint(context.Context, *InlayHintParams) ([]InlayHint, error)
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocument_inlineCompletion
+ InlineCompletion(context.Context, *InlineCompletionParams) (*Or_Result_textDocument_inlineCompletion, error)
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocument_inlineValue
+ InlineValue(context.Context, *InlineValueParams) ([]InlineValue, error)
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocument_linkedEditingRange
+ LinkedEditingRange(context.Context, *LinkedEditingRangeParams) (*LinkedEditingRanges, error)
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocument_moniker
+ Moniker(context.Context, *MonikerParams) ([]Moniker, error)
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocument_onTypeFormatting
+ OnTypeFormatting(context.Context, *DocumentOnTypeFormattingParams) ([]TextEdit, error)
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocument_prepareCallHierarchy
+ PrepareCallHierarchy(context.Context, *CallHierarchyPrepareParams) ([]CallHierarchyItem, error)
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocument_prepareRename
+ PrepareRename(context.Context, *PrepareRenameParams) (*PrepareRenameResult, error)
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocument_prepareTypeHierarchy
+ PrepareTypeHierarchy(context.Context, *TypeHierarchyPrepareParams) ([]TypeHierarchyItem, error)
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocument_rangeFormatting
+ RangeFormatting(context.Context, *DocumentRangeFormattingParams) ([]TextEdit, error)
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocument_rangesFormatting
+ RangesFormatting(context.Context, *DocumentRangesFormattingParams) ([]TextEdit, error)
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocument_references
+ References(context.Context, *ReferenceParams) ([]Location, error)
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocument_rename
+ Rename(context.Context, *RenameParams) (*WorkspaceEdit, error)
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocument_selectionRange
+ SelectionRange(context.Context, *SelectionRangeParams) ([]SelectionRange, error)
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocument_semanticTokens_full
+ SemanticTokensFull(context.Context, *SemanticTokensParams) (*SemanticTokens, error)
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocument_semanticTokens_full_delta
+ SemanticTokensFullDelta(context.Context, *SemanticTokensDeltaParams) (interface{}, error)
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocument_semanticTokens_range
+ SemanticTokensRange(context.Context, *SemanticTokensRangeParams) (*SemanticTokens, error)
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocument_signatureHelp
+ SignatureHelp(context.Context, *SignatureHelpParams) (*SignatureHelp, error)
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocument_typeDefinition
+ TypeDefinition(context.Context, *TypeDefinitionParams) ([]Location, error)
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocument_willSave
+ WillSave(context.Context, *WillSaveTextDocumentParams) error
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocument_willSaveWaitUntil
+ WillSaveWaitUntil(context.Context, *WillSaveTextDocumentParams) ([]TextEdit, error)
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#typeHierarchy_subtypes
+ Subtypes(context.Context, *TypeHierarchySubtypesParams) ([]TypeHierarchyItem, error)
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#typeHierarchy_supertypes
+ Supertypes(context.Context, *TypeHierarchySupertypesParams) ([]TypeHierarchyItem, error)
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#window_workDoneProgress_cancel
+ WorkDoneProgressCancel(context.Context, *WorkDoneProgressCancelParams) error
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspace_diagnostic
+ DiagnosticWorkspace(context.Context, *WorkspaceDiagnosticParams) (*WorkspaceDiagnosticReport, error)
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspace_didChangeConfiguration
+ DidChangeConfiguration(context.Context, *DidChangeConfigurationParams) error
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspace_didChangeWatchedFiles
+ DidChangeWatchedFiles(context.Context, *DidChangeWatchedFilesParams) error
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspace_didChangeWorkspaceFolders
+ DidChangeWorkspaceFolders(context.Context, *DidChangeWorkspaceFoldersParams) error
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspace_didCreateFiles
+ DidCreateFiles(context.Context, *CreateFilesParams) error
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspace_didDeleteFiles
+ DidDeleteFiles(context.Context, *DeleteFilesParams) error
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspace_didRenameFiles
+ DidRenameFiles(context.Context, *RenameFilesParams) error
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspace_executeCommand
+ ExecuteCommand(context.Context, *ExecuteCommandParams) (interface{}, error)
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspace_symbol
+ Symbol(context.Context, *WorkspaceSymbolParams) ([]SymbolInformation, error)
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspace_willCreateFiles
+ WillCreateFiles(context.Context, *CreateFilesParams) (*WorkspaceEdit, error)
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspace_willDeleteFiles
+ WillDeleteFiles(context.Context, *DeleteFilesParams) (*WorkspaceEdit, error)
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspace_willRenameFiles
+ WillRenameFiles(context.Context, *RenameFilesParams) (*WorkspaceEdit, error)
+ // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspaceSymbol_resolve
+ ResolveWorkspaceSymbol(context.Context, *WorkspaceSymbol) (*WorkspaceSymbol, error)
}
func serverDispatch(ctx context.Context, server Server, reply jsonrpc2.Replier, r jsonrpc2.Request) (bool, error) {