| 1 | // Copyright 2023 The Go Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style |
| 3 | // license that can be found in the LICENSE file. |
| 4 | |
| 5 | // Code generated for LSP. DO NOT EDIT. |
| 6 | |
| 7 | package protocol |
| 8 | |
| 9 | // Code generated from protocol/metaModel.json at ref release/protocol/3.17.6-next.14 (hash 66a087310eea0d60495ba3578d78f70409c403d9). |
| 10 | // https://github.com/microsoft/vscode-languageserver-node/blob/release/protocol/3.17.6-next.14/protocol/metaModel.json |
| 11 | // LSP metaData.version = 3.17.0. |
| 12 | |
| 13 | import "encoding/json" |
| 14 | |
| 15 | // A special text edit with an additional change annotation. |
| 16 | // |
| 17 | // @since 3.16.0. |
| 18 | // |
| 19 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#annotatedTextEdit |
| 20 | type AnnotatedTextEdit struct { |
| 21 | // The actual identifier of the change annotation |
| 22 | AnnotationID *ChangeAnnotationIdentifier `json:"annotationId,omitempty"` |
| 23 | TextEdit |
| 24 | } |
| 25 | |
| 26 | // Defines how values from a set of defaults and an individual item will be |
| 27 | // merged. |
| 28 | // |
| 29 | // @since 3.18.0 |
| 30 | type ApplyKind uint32 |
| 31 | |
| 32 | // The parameters passed via an apply workspace edit request. |
| 33 | // |
| 34 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#applyWorkspaceEditParams |
| 35 | type ApplyWorkspaceEditParams struct { |
| 36 | // An optional label of the workspace edit. This label is |
| 37 | // presented in the user interface for example on an undo |
| 38 | // stack to undo the workspace edit. |
| 39 | Label string `json:"label,omitempty"` |
| 40 | // The edits to apply. |
| 41 | Edit WorkspaceEdit `json:"edit"` |
| 42 | // Additional data about the edit. |
| 43 | // |
| 44 | // @since 3.18.0 |
| 45 | // @proposed |
| 46 | Metadata *WorkspaceEditMetadata `json:"metadata,omitempty"` |
| 47 | } |
| 48 | |
| 49 | // The result returned from the apply workspace edit request. |
| 50 | // |
| 51 | // @since 3.17 renamed from ApplyWorkspaceEditResponse |
| 52 | // |
| 53 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#applyWorkspaceEditResult |
| 54 | type ApplyWorkspaceEditResult struct { |
| 55 | // Indicates whether the edit was applied or not. |
| 56 | Applied bool `json:"applied"` |
| 57 | // An optional textual description for why the edit was not applied. |
| 58 | // This may be used by the server for diagnostic logging or to provide |
| 59 | // a suitable error for a request that triggered the edit. |
| 60 | FailureReason string `json:"failureReason,omitempty"` |
| 61 | // Depending on the client's failure handling strategy `failedChange` might |
| 62 | // contain the index of the change that failed. This property is only available |
| 63 | // if the client signals a `failureHandlingStrategy` in its client capabilities. |
| 64 | FailedChange uint32 `json:"failedChange"` |
| 65 | } |
| 66 | |
| 67 | // A base for all symbol information. |
| 68 | // |
| 69 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#baseSymbolInformation |
| 70 | type BaseSymbolInformation struct { |
| 71 | // The name of this symbol. |
| 72 | Name string `json:"name"` |
| 73 | // The kind of this symbol. |
| 74 | Kind SymbolKind `json:"kind"` |
| 75 | // Tags for this symbol. |
| 76 | // |
| 77 | // @since 3.16.0 |
| 78 | Tags []SymbolTag `json:"tags,omitempty"` |
| 79 | // The name of the symbol containing this symbol. This information is for |
| 80 | // user interface purposes (e.g. to render a qualifier in the user interface |
| 81 | // if necessary). It can't be used to re-infer a hierarchy for the document |
| 82 | // symbols. |
| 83 | ContainerName string `json:"containerName,omitempty"` |
| 84 | } |
| 85 | |
| 86 | // @since 3.16.0 |
| 87 | // |
| 88 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#callHierarchyClientCapabilities |
| 89 | type CallHierarchyClientCapabilities struct { |
| 90 | // Whether implementation supports dynamic registration. If this is set to `true` |
| 91 | // the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` |
| 92 | // return value for the corresponding server capability as well. |
| 93 | DynamicRegistration bool `json:"dynamicRegistration,omitempty"` |
| 94 | } |
| 95 | |
| 96 | // Represents an incoming call, e.g. a caller of a method or constructor. |
| 97 | // |
| 98 | // @since 3.16.0 |
| 99 | // |
| 100 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#callHierarchyIncomingCall |
| 101 | type CallHierarchyIncomingCall struct { |
| 102 | // The item that makes the call. |
| 103 | From CallHierarchyItem `json:"from"` |
| 104 | // The ranges at which the calls appear. This is relative to the caller |
| 105 | // denoted by {@link CallHierarchyIncomingCall.from `this.from`}. |
| 106 | FromRanges []Range `json:"fromRanges"` |
| 107 | } |
| 108 | |
| 109 | // The parameter of a `callHierarchy/incomingCalls` request. |
| 110 | // |
| 111 | // @since 3.16.0 |
| 112 | // |
| 113 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#callHierarchyIncomingCallsParams |
| 114 | type CallHierarchyIncomingCallsParams struct { |
| 115 | Item CallHierarchyItem `json:"item"` |
| 116 | WorkDoneProgressParams |
| 117 | PartialResultParams |
| 118 | } |
| 119 | |
| 120 | // Represents programming constructs like functions or constructors in the context |
| 121 | // of call hierarchy. |
| 122 | // |
| 123 | // @since 3.16.0 |
| 124 | // |
| 125 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#callHierarchyItem |
| 126 | type CallHierarchyItem struct { |
| 127 | // The name of this item. |
| 128 | Name string `json:"name"` |
| 129 | // The kind of this item. |
| 130 | Kind SymbolKind `json:"kind"` |
| 131 | // Tags for this item. |
| 132 | Tags []SymbolTag `json:"tags,omitempty"` |
| 133 | // More detail for this item, e.g. the signature of a function. |
| 134 | Detail string `json:"detail,omitempty"` |
| 135 | // The resource identifier of this item. |
| 136 | URI DocumentURI `json:"uri"` |
| 137 | // The range enclosing this symbol not including leading/trailing whitespace but everything else, e.g. comments and code. |
| 138 | Range Range `json:"range"` |
| 139 | // The range that should be selected and revealed when this symbol is being picked, e.g. the name of a function. |
| 140 | // Must be contained by the {@link CallHierarchyItem.range `range`}. |
| 141 | SelectionRange Range `json:"selectionRange"` |
| 142 | // A data entry field that is preserved between a call hierarchy prepare and |
| 143 | // incoming calls or outgoing calls requests. |
| 144 | Data any `json:"data,omitempty"` |
| 145 | } |
| 146 | |
| 147 | // Call hierarchy options used during static registration. |
| 148 | // |
| 149 | // @since 3.16.0 |
| 150 | // |
| 151 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#callHierarchyOptions |
| 152 | type CallHierarchyOptions struct { |
| 153 | WorkDoneProgressOptions |
| 154 | } |
| 155 | |
| 156 | // Represents an outgoing call, e.g. calling a getter from a method or a method from a constructor etc. |
| 157 | // |
| 158 | // @since 3.16.0 |
| 159 | // |
| 160 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#callHierarchyOutgoingCall |
| 161 | type CallHierarchyOutgoingCall struct { |
| 162 | // The item that is called. |
| 163 | To CallHierarchyItem `json:"to"` |
| 164 | // The range at which this item is called. This is the range relative to the caller, e.g the item |
| 165 | // passed to {@link CallHierarchyItemProvider.provideCallHierarchyOutgoingCalls `provideCallHierarchyOutgoingCalls`} |
| 166 | // and not {@link CallHierarchyOutgoingCall.to `this.to`}. |
| 167 | FromRanges []Range `json:"fromRanges"` |
| 168 | } |
| 169 | |
| 170 | // The parameter of a `callHierarchy/outgoingCalls` request. |
| 171 | // |
| 172 | // @since 3.16.0 |
| 173 | // |
| 174 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#callHierarchyOutgoingCallsParams |
| 175 | type CallHierarchyOutgoingCallsParams struct { |
| 176 | Item CallHierarchyItem `json:"item"` |
| 177 | WorkDoneProgressParams |
| 178 | PartialResultParams |
| 179 | } |
| 180 | |
| 181 | // The parameter of a `textDocument/prepareCallHierarchy` request. |
| 182 | // |
| 183 | // @since 3.16.0 |
| 184 | // |
| 185 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#callHierarchyPrepareParams |
| 186 | type CallHierarchyPrepareParams struct { |
| 187 | TextDocumentPositionParams |
| 188 | WorkDoneProgressParams |
| 189 | } |
| 190 | |
| 191 | // Call hierarchy options used during static or dynamic registration. |
| 192 | // |
| 193 | // @since 3.16.0 |
| 194 | // |
| 195 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#callHierarchyRegistrationOptions |
| 196 | type CallHierarchyRegistrationOptions struct { |
| 197 | TextDocumentRegistrationOptions |
| 198 | CallHierarchyOptions |
| 199 | StaticRegistrationOptions |
| 200 | } |
| 201 | |
| 202 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#cancelParams |
| 203 | type CancelParams struct { |
| 204 | // The request id to cancel. |
| 205 | ID any `json:"id"` |
| 206 | } |
| 207 | |
| 208 | // Additional information that describes document changes. |
| 209 | // |
| 210 | // @since 3.16.0 |
| 211 | // |
| 212 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#changeAnnotation |
| 213 | type ChangeAnnotation struct { |
| 214 | // A human-readable string describing the actual change. The string |
| 215 | // is rendered prominent in the user interface. |
| 216 | Label string `json:"label"` |
| 217 | // A flag which indicates that user confirmation is needed |
| 218 | // before applying the change. |
| 219 | NeedsConfirmation bool `json:"needsConfirmation,omitempty"` |
| 220 | // A human-readable string which is rendered less prominent in |
| 221 | // the user interface. |
| 222 | Description string `json:"description,omitempty"` |
| 223 | } |
| 224 | |
| 225 | // An identifier to refer to a change annotation stored with a workspace edit. |
| 226 | // |
| 227 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#changeAnnotationIdentifier |
| 228 | type ChangeAnnotationIdentifier = string // (alias) |
| 229 | // @since 3.18.0 |
| 230 | // |
| 231 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#changeAnnotationsSupportOptions |
| 232 | type ChangeAnnotationsSupportOptions struct { |
| 233 | // Whether the client groups edits with equal labels into tree nodes, |
| 234 | // for instance all edits labelled with "Changes in Strings" would |
| 235 | // be a tree node. |
| 236 | GroupsOnLabel bool `json:"groupsOnLabel,omitempty"` |
| 237 | } |
| 238 | |
| 239 | // Defines the capabilities provided by the client. |
| 240 | // |
| 241 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#clientCapabilities |
| 242 | type ClientCapabilities struct { |
| 243 | // Workspace specific client capabilities. |
| 244 | Workspace WorkspaceClientCapabilities `json:"workspace,omitempty"` |
| 245 | // Text document specific client capabilities. |
| 246 | TextDocument TextDocumentClientCapabilities `json:"textDocument,omitempty"` |
| 247 | // Capabilities specific to the notebook document support. |
| 248 | // |
| 249 | // @since 3.17.0 |
| 250 | NotebookDocument *NotebookDocumentClientCapabilities `json:"notebookDocument,omitempty"` |
| 251 | // Window specific client capabilities. |
| 252 | Window WindowClientCapabilities `json:"window,omitempty"` |
| 253 | // General client capabilities. |
| 254 | // |
| 255 | // @since 3.16.0 |
| 256 | General *GeneralClientCapabilities `json:"general,omitempty"` |
| 257 | // Experimental client capabilities. |
| 258 | Experimental any `json:"experimental,omitempty"` |
| 259 | } |
| 260 | |
| 261 | // @since 3.18.0 |
| 262 | // |
| 263 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#clientCodeActionKindOptions |
| 264 | type ClientCodeActionKindOptions struct { |
| 265 | // The code action kind values the client supports. When this |
| 266 | // property exists the client also guarantees that it will |
| 267 | // handle values outside its set gracefully and falls back |
| 268 | // to a default value when unknown. |
| 269 | ValueSet []CodeActionKind `json:"valueSet"` |
| 270 | } |
| 271 | |
| 272 | // @since 3.18.0 |
| 273 | // |
| 274 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#clientCodeActionLiteralOptions |
| 275 | type ClientCodeActionLiteralOptions struct { |
| 276 | // The code action kind is support with the following value |
| 277 | // set. |
| 278 | CodeActionKind ClientCodeActionKindOptions `json:"codeActionKind"` |
| 279 | } |
| 280 | |
| 281 | // @since 3.18.0 |
| 282 | // |
| 283 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#clientCodeActionResolveOptions |
| 284 | type ClientCodeActionResolveOptions struct { |
| 285 | // The properties that a client can resolve lazily. |
| 286 | Properties []string `json:"properties"` |
| 287 | } |
| 288 | |
| 289 | // @since 3.18.0 |
| 290 | // |
| 291 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#clientCodeLensResolveOptions |
| 292 | type ClientCodeLensResolveOptions struct { |
| 293 | // The properties that a client can resolve lazily. |
| 294 | Properties []string `json:"properties"` |
| 295 | } |
| 296 | |
| 297 | // @since 3.18.0 |
| 298 | // |
| 299 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#clientCompletionItemInsertTextModeOptions |
| 300 | type ClientCompletionItemInsertTextModeOptions struct { |
| 301 | ValueSet []InsertTextMode `json:"valueSet"` |
| 302 | } |
| 303 | |
| 304 | // @since 3.18.0 |
| 305 | // |
| 306 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#clientCompletionItemOptions |
| 307 | type ClientCompletionItemOptions struct { |
| 308 | // Client supports snippets as insert text. |
| 309 | // |
| 310 | // A snippet can define tab stops and placeholders with `$1`, `$2` |
| 311 | // and `${3:foo}`. `$0` defines the final tab stop, it defaults to |
| 312 | // the end of the snippet. Placeholders with equal identifiers are linked, |
| 313 | // that is typing in one will update others too. |
| 314 | SnippetSupport bool `json:"snippetSupport,omitempty"` |
| 315 | // Client supports commit characters on a completion item. |
| 316 | CommitCharactersSupport bool `json:"commitCharactersSupport,omitempty"` |
| 317 | // Client supports the following content formats for the documentation |
| 318 | // property. The order describes the preferred format of the client. |
| 319 | DocumentationFormat []MarkupKind `json:"documentationFormat,omitempty"` |
| 320 | // Client supports the deprecated property on a completion item. |
| 321 | DeprecatedSupport bool `json:"deprecatedSupport,omitempty"` |
| 322 | // Client supports the preselect property on a completion item. |
| 323 | PreselectSupport bool `json:"preselectSupport,omitempty"` |
| 324 | // Client supports the tag property on a completion item. Clients supporting |
| 325 | // tags have to handle unknown tags gracefully. Clients especially need to |
| 326 | // preserve unknown tags when sending a completion item back to the server in |
| 327 | // a resolve call. |
| 328 | // |
| 329 | // @since 3.15.0 |
| 330 | TagSupport *CompletionItemTagOptions `json:"tagSupport,omitempty"` |
| 331 | // Client support insert replace edit to control different behavior if a |
| 332 | // completion item is inserted in the text or should replace text. |
| 333 | // |
| 334 | // @since 3.16.0 |
| 335 | InsertReplaceSupport bool `json:"insertReplaceSupport,omitempty"` |
| 336 | // Indicates which properties a client can resolve lazily on a completion |
| 337 | // item. Before version 3.16.0 only the predefined properties `documentation` |
| 338 | // and `details` could be resolved lazily. |
| 339 | // |
| 340 | // @since 3.16.0 |
| 341 | ResolveSupport *ClientCompletionItemResolveOptions `json:"resolveSupport,omitempty"` |
| 342 | // The client supports the `insertTextMode` property on |
| 343 | // a completion item to override the whitespace handling mode |
| 344 | // as defined by the client (see `insertTextMode`). |
| 345 | // |
| 346 | // @since 3.16.0 |
| 347 | InsertTextModeSupport *ClientCompletionItemInsertTextModeOptions `json:"insertTextModeSupport,omitempty"` |
| 348 | // The client has support for completion item label |
| 349 | // details (see also `CompletionItemLabelDetails`). |
| 350 | // |
| 351 | // @since 3.17.0 |
| 352 | LabelDetailsSupport bool `json:"labelDetailsSupport,omitempty"` |
| 353 | } |
| 354 | |
| 355 | // @since 3.18.0 |
| 356 | // |
| 357 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#clientCompletionItemOptionsKind |
| 358 | type ClientCompletionItemOptionsKind struct { |
| 359 | // The completion item kind values the client supports. When this |
| 360 | // property exists the client also guarantees that it will |
| 361 | // handle values outside its set gracefully and falls back |
| 362 | // to a default value when unknown. |
| 363 | // |
| 364 | // If this property is not present the client only supports |
| 365 | // the completion items kinds from `Text` to `Reference` as defined in |
| 366 | // the initial version of the protocol. |
| 367 | ValueSet []CompletionItemKind `json:"valueSet,omitempty"` |
| 368 | } |
| 369 | |
| 370 | // @since 3.18.0 |
| 371 | // |
| 372 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#clientCompletionItemResolveOptions |
| 373 | type ClientCompletionItemResolveOptions struct { |
| 374 | // The properties that a client can resolve lazily. |
| 375 | Properties []string `json:"properties"` |
| 376 | } |
| 377 | |
| 378 | // @since 3.18.0 |
| 379 | // |
| 380 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#clientDiagnosticsTagOptions |
| 381 | type ClientDiagnosticsTagOptions struct { |
| 382 | // The tags supported by the client. |
| 383 | ValueSet []DiagnosticTag `json:"valueSet"` |
| 384 | } |
| 385 | |
| 386 | // @since 3.18.0 |
| 387 | // |
| 388 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#clientFoldingRangeKindOptions |
| 389 | type ClientFoldingRangeKindOptions struct { |
| 390 | // The folding range kind values the client supports. When this |
| 391 | // property exists the client also guarantees that it will |
| 392 | // handle values outside its set gracefully and falls back |
| 393 | // to a default value when unknown. |
| 394 | ValueSet []FoldingRangeKind `json:"valueSet,omitempty"` |
| 395 | } |
| 396 | |
| 397 | // @since 3.18.0 |
| 398 | // |
| 399 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#clientFoldingRangeOptions |
| 400 | type ClientFoldingRangeOptions struct { |
| 401 | // If set, the client signals that it supports setting collapsedText on |
| 402 | // folding ranges to display custom labels instead of the default text. |
| 403 | // |
| 404 | // @since 3.17.0 |
| 405 | CollapsedText bool `json:"collapsedText,omitempty"` |
| 406 | } |
| 407 | |
| 408 | // Information about the client |
| 409 | // |
| 410 | // @since 3.15.0 |
| 411 | // @since 3.18.0 ClientInfo type name added. |
| 412 | // |
| 413 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#clientInfo |
| 414 | type ClientInfo struct { |
| 415 | // The name of the client as defined by the client. |
| 416 | Name string `json:"name"` |
| 417 | // The client's version as defined by the client. |
| 418 | Version string `json:"version,omitempty"` |
| 419 | } |
| 420 | |
| 421 | // @since 3.18.0 |
| 422 | // |
| 423 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#clientInlayHintResolveOptions |
| 424 | type ClientInlayHintResolveOptions struct { |
| 425 | // The properties that a client can resolve lazily. |
| 426 | Properties []string `json:"properties"` |
| 427 | } |
| 428 | |
| 429 | // @since 3.18.0 |
| 430 | // |
| 431 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#clientSemanticTokensRequestFullDelta |
| 432 | type ClientSemanticTokensRequestFullDelta struct { |
| 433 | // The client will send the `textDocument/semanticTokens/full/delta` request if |
| 434 | // the server provides a corresponding handler. |
| 435 | Delta bool `json:"delta,omitempty"` |
| 436 | } |
| 437 | |
| 438 | // @since 3.18.0 |
| 439 | // |
| 440 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#clientSemanticTokensRequestOptions |
| 441 | type ClientSemanticTokensRequestOptions struct { |
| 442 | // The client will send the `textDocument/semanticTokens/range` request if |
| 443 | // the server provides a corresponding handler. |
| 444 | Range *Or_ClientSemanticTokensRequestOptions_range `json:"range,omitempty"` |
| 445 | // The client will send the `textDocument/semanticTokens/full` request if |
| 446 | // the server provides a corresponding handler. |
| 447 | Full *Or_ClientSemanticTokensRequestOptions_full `json:"full,omitempty"` |
| 448 | } |
| 449 | |
| 450 | // @since 3.18.0 |
| 451 | // |
| 452 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#clientShowMessageActionItemOptions |
| 453 | type ClientShowMessageActionItemOptions struct { |
| 454 | // Whether the client supports additional attributes which |
| 455 | // are preserved and send back to the server in the |
| 456 | // request's response. |
| 457 | AdditionalPropertiesSupport bool `json:"additionalPropertiesSupport,omitempty"` |
| 458 | } |
| 459 | |
| 460 | // @since 3.18.0 |
| 461 | // |
| 462 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#clientSignatureInformationOptions |
| 463 | type ClientSignatureInformationOptions struct { |
| 464 | // Client supports the following content formats for the documentation |
| 465 | // property. The order describes the preferred format of the client. |
| 466 | DocumentationFormat []MarkupKind `json:"documentationFormat,omitempty"` |
| 467 | // Client capabilities specific to parameter information. |
| 468 | ParameterInformation *ClientSignatureParameterInformationOptions `json:"parameterInformation,omitempty"` |
| 469 | // The client supports the `activeParameter` property on `SignatureInformation` |
| 470 | // literal. |
| 471 | // |
| 472 | // @since 3.16.0 |
| 473 | ActiveParameterSupport bool `json:"activeParameterSupport,omitempty"` |
| 474 | // The client supports the `activeParameter` property on |
| 475 | // `SignatureHelp`/`SignatureInformation` being set to `null` to |
| 476 | // indicate that no parameter should be active. |
| 477 | // |
| 478 | // @since 3.18.0 |
| 479 | // @proposed |
| 480 | NoActiveParameterSupport bool `json:"noActiveParameterSupport,omitempty"` |
| 481 | } |
| 482 | |
| 483 | // @since 3.18.0 |
| 484 | // |
| 485 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#clientSignatureParameterInformationOptions |
| 486 | type ClientSignatureParameterInformationOptions struct { |
| 487 | // The client supports processing label offsets instead of a |
| 488 | // simple label string. |
| 489 | // |
| 490 | // @since 3.14.0 |
| 491 | LabelOffsetSupport bool `json:"labelOffsetSupport,omitempty"` |
| 492 | } |
| 493 | |
| 494 | // @since 3.18.0 |
| 495 | // |
| 496 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#clientSymbolKindOptions |
| 497 | type ClientSymbolKindOptions struct { |
| 498 | // The symbol kind values the client supports. When this |
| 499 | // property exists the client also guarantees that it will |
| 500 | // handle values outside its set gracefully and falls back |
| 501 | // to a default value when unknown. |
| 502 | // |
| 503 | // If this property is not present the client only supports |
| 504 | // the symbol kinds from `File` to `Array` as defined in |
| 505 | // the initial version of the protocol. |
| 506 | ValueSet []SymbolKind `json:"valueSet,omitempty"` |
| 507 | } |
| 508 | |
| 509 | // @since 3.18.0 |
| 510 | // |
| 511 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#clientSymbolResolveOptions |
| 512 | type ClientSymbolResolveOptions struct { |
| 513 | // The properties that a client can resolve lazily. Usually |
| 514 | // `location.range` |
| 515 | Properties []string `json:"properties"` |
| 516 | } |
| 517 | |
| 518 | // @since 3.18.0 |
| 519 | // |
| 520 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#clientSymbolTagOptions |
| 521 | type ClientSymbolTagOptions struct { |
| 522 | // The tags supported by the client. |
| 523 | ValueSet []SymbolTag `json:"valueSet"` |
| 524 | } |
| 525 | |
| 526 | // A code action represents a change that can be performed in code, e.g. to fix a problem or |
| 527 | // to refactor code. |
| 528 | // |
| 529 | // A CodeAction must set either `edit` and/or a `command`. If both are supplied, the `edit` is applied first, then the `command` is executed. |
| 530 | // |
| 531 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#codeAction |
| 532 | type CodeAction struct { |
| 533 | // A short, human-readable, title for this code action. |
| 534 | Title string `json:"title"` |
| 535 | // The kind of the code action. |
| 536 | // |
| 537 | // Used to filter code actions. |
| 538 | Kind CodeActionKind `json:"kind,omitempty"` |
| 539 | // The diagnostics that this code action resolves. |
| 540 | Diagnostics []Diagnostic `json:"diagnostics,omitempty"` |
| 541 | // Marks this as a preferred action. Preferred actions are used by the `auto fix` command and can be targeted |
| 542 | // by keybindings. |
| 543 | // |
| 544 | // A quick fix should be marked preferred if it properly addresses the underlying error. |
| 545 | // A refactoring should be marked preferred if it is the most reasonable choice of actions to take. |
| 546 | // |
| 547 | // @since 3.15.0 |
| 548 | IsPreferred bool `json:"isPreferred,omitempty"` |
| 549 | // Marks that the code action cannot currently be applied. |
| 550 | // |
| 551 | // Clients should follow the following guidelines regarding disabled code actions: |
| 552 | // |
| 553 | // - Disabled code actions are not shown in automatic [lightbulbs](https://code.visualstudio.com/docs/editor/editingevolved#_code-action) |
| 554 | // code action menus. |
| 555 | // |
| 556 | // - Disabled actions are shown as faded out in the code action menu when the user requests a more specific type |
| 557 | // of code action, such as refactorings. |
| 558 | // |
| 559 | // - If the user has a [keybinding](https://code.visualstudio.com/docs/editor/refactoring#_keybindings-for-code-actions) |
| 560 | // that auto applies a code action and only disabled code actions are returned, the client should show the user an |
| 561 | // error message with `reason` in the editor. |
| 562 | // |
| 563 | // @since 3.16.0 |
| 564 | Disabled *CodeActionDisabled `json:"disabled,omitempty"` |
| 565 | // The workspace edit this code action performs. |
| 566 | Edit *WorkspaceEdit `json:"edit,omitempty"` |
| 567 | // A command this code action executes. If a code action |
| 568 | // provides an edit and a command, first the edit is |
| 569 | // executed and then the command. |
| 570 | Command *Command `json:"command,omitempty"` |
| 571 | // A data entry field that is preserved on a code action between |
| 572 | // a `textDocument/codeAction` and a `codeAction/resolve` request. |
| 573 | // |
| 574 | // @since 3.16.0 |
| 575 | Data *json.RawMessage `json:"data,omitempty"` |
| 576 | // Tags for this code action. |
| 577 | // |
| 578 | // @since 3.18.0 - proposed |
| 579 | Tags []CodeActionTag `json:"tags,omitempty"` |
| 580 | } |
| 581 | |
| 582 | // The Client Capabilities of a {@link CodeActionRequest}. |
| 583 | // |
| 584 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#codeActionClientCapabilities |
| 585 | type CodeActionClientCapabilities struct { |
| 586 | // Whether code action supports dynamic registration. |
| 587 | DynamicRegistration bool `json:"dynamicRegistration,omitempty"` |
| 588 | // The client support code action literals of type `CodeAction` as a valid |
| 589 | // response of the `textDocument/codeAction` request. If the property is not |
| 590 | // set the request can only return `Command` literals. |
| 591 | // |
| 592 | // @since 3.8.0 |
| 593 | CodeActionLiteralSupport ClientCodeActionLiteralOptions `json:"codeActionLiteralSupport,omitempty"` |
| 594 | // Whether code action supports the `isPreferred` property. |
| 595 | // |
| 596 | // @since 3.15.0 |
| 597 | IsPreferredSupport bool `json:"isPreferredSupport,omitempty"` |
| 598 | // Whether code action supports the `disabled` property. |
| 599 | // |
| 600 | // @since 3.16.0 |
| 601 | DisabledSupport bool `json:"disabledSupport,omitempty"` |
| 602 | // Whether code action supports the `data` property which is |
| 603 | // preserved between a `textDocument/codeAction` and a |
| 604 | // `codeAction/resolve` request. |
| 605 | // |
| 606 | // @since 3.16.0 |
| 607 | DataSupport bool `json:"dataSupport,omitempty"` |
| 608 | // Whether the client supports resolving additional code action |
| 609 | // properties via a separate `codeAction/resolve` request. |
| 610 | // |
| 611 | // @since 3.16.0 |
| 612 | ResolveSupport *ClientCodeActionResolveOptions `json:"resolveSupport,omitempty"` |
| 613 | // Whether the client honors the change annotations in |
| 614 | // text edits and resource operations returned via the |
| 615 | // `CodeAction#edit` property by for example presenting |
| 616 | // the workspace edit in the user interface and asking |
| 617 | // for confirmation. |
| 618 | // |
| 619 | // @since 3.16.0 |
| 620 | HonorsChangeAnnotations bool `json:"honorsChangeAnnotations,omitempty"` |
| 621 | // Whether the client supports documentation for a class of |
| 622 | // code actions. |
| 623 | // |
| 624 | // @since 3.18.0 |
| 625 | // @proposed |
| 626 | DocumentationSupport bool `json:"documentationSupport,omitempty"` |
| 627 | // Client supports the tag property on a code action. Clients |
| 628 | // supporting tags have to handle unknown tags gracefully. |
| 629 | // |
| 630 | // @since 3.18.0 - proposed |
| 631 | TagSupport *CodeActionTagOptions `json:"tagSupport,omitempty"` |
| 632 | } |
| 633 | |
| 634 | // Contains additional diagnostic information about the context in which |
| 635 | // a {@link CodeActionProvider.provideCodeActions code action} is run. |
| 636 | // |
| 637 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#codeActionContext |
| 638 | type CodeActionContext struct { |
| 639 | // An array of diagnostics known on the client side overlapping the range provided to the |
| 640 | // `textDocument/codeAction` request. They are provided so that the server knows which |
| 641 | // errors are currently presented to the user for the given range. There is no guarantee |
| 642 | // that these accurately reflect the error state of the resource. The primary parameter |
| 643 | // to compute code actions is the provided range. |
| 644 | Diagnostics []Diagnostic `json:"diagnostics"` |
| 645 | // Requested kind of actions to return. |
| 646 | // |
| 647 | // Actions not of this kind are filtered out by the client before being shown. So servers |
| 648 | // can omit computing them. |
| 649 | Only []CodeActionKind `json:"only,omitempty"` |
| 650 | // The reason why code actions were requested. |
| 651 | // |
| 652 | // @since 3.17.0 |
| 653 | TriggerKind *CodeActionTriggerKind `json:"triggerKind,omitempty"` |
| 654 | } |
| 655 | |
| 656 | // Captures why the code action is currently disabled. |
| 657 | // |
| 658 | // @since 3.18.0 |
| 659 | // |
| 660 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#codeActionDisabled |
| 661 | type CodeActionDisabled struct { |
| 662 | // Human readable description of why the code action is currently disabled. |
| 663 | // |
| 664 | // This is displayed in the code actions UI. |
| 665 | Reason string `json:"reason"` |
| 666 | } |
| 667 | |
| 668 | // A set of predefined code action kinds |
| 669 | type CodeActionKind string |
| 670 | |
| 671 | // Documentation for a class of code actions. |
| 672 | // |
| 673 | // @since 3.18.0 |
| 674 | // @proposed |
| 675 | // |
| 676 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#codeActionKindDocumentation |
| 677 | type CodeActionKindDocumentation struct { |
| 678 | // The kind of the code action being documented. |
| 679 | // |
| 680 | // If the kind is generic, such as `CodeActionKind.Refactor`, the documentation will be shown whenever any |
| 681 | // refactorings are returned. If the kind if more specific, such as `CodeActionKind.RefactorExtract`, the |
| 682 | // documentation will only be shown when extract refactoring code actions are returned. |
| 683 | Kind CodeActionKind `json:"kind"` |
| 684 | // Command that is ued to display the documentation to the user. |
| 685 | // |
| 686 | // The title of this documentation code action is taken from {@linkcode Command.title} |
| 687 | Command Command `json:"command"` |
| 688 | } |
| 689 | |
| 690 | // Provider options for a {@link CodeActionRequest}. |
| 691 | // |
| 692 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#codeActionOptions |
| 693 | type CodeActionOptions struct { |
| 694 | // CodeActionKinds that this server may return. |
| 695 | // |
| 696 | // The list of kinds may be generic, such as `CodeActionKind.Refactor`, or the server |
| 697 | // may list out every specific kind they provide. |
| 698 | CodeActionKinds []CodeActionKind `json:"codeActionKinds,omitempty"` |
| 699 | // Static documentation for a class of code actions. |
| 700 | // |
| 701 | // Documentation from the provider should be shown in the code actions menu if either: |
| 702 | // |
| 703 | // |
| 704 | // - Code actions of `kind` are requested by the editor. In this case, the editor will show the documentation that |
| 705 | // most closely matches the requested code action kind. For example, if a provider has documentation for |
| 706 | // both `Refactor` and `RefactorExtract`, when the user requests code actions for `RefactorExtract`, |
| 707 | // the editor will use the documentation for `RefactorExtract` instead of the documentation for `Refactor`. |
| 708 | // |
| 709 | // |
| 710 | // - Any code actions of `kind` are returned by the provider. |
| 711 | // |
| 712 | // At most one documentation entry should be shown per provider. |
| 713 | // |
| 714 | // @since 3.18.0 |
| 715 | // @proposed |
| 716 | Documentation []CodeActionKindDocumentation `json:"documentation,omitempty"` |
| 717 | // The server provides support to resolve additional |
| 718 | // information for a code action. |
| 719 | // |
| 720 | // @since 3.16.0 |
| 721 | ResolveProvider bool `json:"resolveProvider,omitempty"` |
| 722 | WorkDoneProgressOptions |
| 723 | } |
| 724 | |
| 725 | // The parameters of a {@link CodeActionRequest}. |
| 726 | // |
| 727 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#codeActionParams |
| 728 | type CodeActionParams struct { |
| 729 | // The document in which the command was invoked. |
| 730 | TextDocument TextDocumentIdentifier `json:"textDocument"` |
| 731 | // The range for which the command was invoked. |
| 732 | Range Range `json:"range"` |
| 733 | // Context carrying additional information. |
| 734 | Context CodeActionContext `json:"context"` |
| 735 | WorkDoneProgressParams |
| 736 | PartialResultParams |
| 737 | } |
| 738 | |
| 739 | // Registration options for a {@link CodeActionRequest}. |
| 740 | // |
| 741 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#codeActionRegistrationOptions |
| 742 | type CodeActionRegistrationOptions struct { |
| 743 | TextDocumentRegistrationOptions |
| 744 | CodeActionOptions |
| 745 | } |
| 746 | |
| 747 | // Code action tags are extra annotations that tweak the behavior of a code action. |
| 748 | // |
| 749 | // @since 3.18.0 - proposed |
| 750 | type CodeActionTag uint32 |
| 751 | |
| 752 | // @since 3.18.0 - proposed |
| 753 | // |
| 754 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#codeActionTagOptions |
| 755 | type CodeActionTagOptions struct { |
| 756 | // The tags supported by the client. |
| 757 | ValueSet []CodeActionTag `json:"valueSet"` |
| 758 | } |
| 759 | |
| 760 | // The reason why code actions were requested. |
| 761 | // |
| 762 | // @since 3.17.0 |
| 763 | type CodeActionTriggerKind uint32 |
| 764 | |
| 765 | // Structure to capture a description for an error code. |
| 766 | // |
| 767 | // @since 3.16.0 |
| 768 | // |
| 769 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#codeDescription |
| 770 | type CodeDescription struct { |
| 771 | // An URI to open with more information about the diagnostic error. |
| 772 | Href URI `json:"href"` |
| 773 | } |
| 774 | |
| 775 | // A code lens represents a {@link Command command} that should be shown along with |
| 776 | // source text, like the number of references, a way to run tests, etc. |
| 777 | // |
| 778 | // A code lens is _unresolved_ when no command is associated to it. For performance |
| 779 | // reasons the creation of a code lens and resolving should be done in two stages. |
| 780 | // |
| 781 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#codeLens |
| 782 | type CodeLens struct { |
| 783 | // The range in which this code lens is valid. Should only span a single line. |
| 784 | Range Range `json:"range"` |
| 785 | // The command this code lens represents. |
| 786 | Command *Command `json:"command,omitempty"` |
| 787 | // A data entry field that is preserved on a code lens item between |
| 788 | // a {@link CodeLensRequest} and a {@link CodeLensResolveRequest} |
| 789 | Data any `json:"data,omitempty"` |
| 790 | } |
| 791 | |
| 792 | // The client capabilities of a {@link CodeLensRequest}. |
| 793 | // |
| 794 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#codeLensClientCapabilities |
| 795 | type CodeLensClientCapabilities struct { |
| 796 | // Whether code lens supports dynamic registration. |
| 797 | DynamicRegistration bool `json:"dynamicRegistration,omitempty"` |
| 798 | // Whether the client supports resolving additional code lens |
| 799 | // properties via a separate `codeLens/resolve` request. |
| 800 | // |
| 801 | // @since 3.18.0 |
| 802 | ResolveSupport *ClientCodeLensResolveOptions `json:"resolveSupport,omitempty"` |
| 803 | } |
| 804 | |
| 805 | // Code Lens provider options of a {@link CodeLensRequest}. |
| 806 | // |
| 807 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#codeLensOptions |
| 808 | type CodeLensOptions struct { |
| 809 | // Code lens has a resolve provider as well. |
| 810 | ResolveProvider bool `json:"resolveProvider,omitempty"` |
| 811 | WorkDoneProgressOptions |
| 812 | } |
| 813 | |
| 814 | // The parameters of a {@link CodeLensRequest}. |
| 815 | // |
| 816 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#codeLensParams |
| 817 | type CodeLensParams struct { |
| 818 | // The document to request code lens for. |
| 819 | TextDocument TextDocumentIdentifier `json:"textDocument"` |
| 820 | WorkDoneProgressParams |
| 821 | PartialResultParams |
| 822 | } |
| 823 | |
| 824 | // Registration options for a {@link CodeLensRequest}. |
| 825 | // |
| 826 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#codeLensRegistrationOptions |
| 827 | type CodeLensRegistrationOptions struct { |
| 828 | TextDocumentRegistrationOptions |
| 829 | CodeLensOptions |
| 830 | } |
| 831 | |
| 832 | // @since 3.16.0 |
| 833 | // |
| 834 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#codeLensWorkspaceClientCapabilities |
| 835 | type CodeLensWorkspaceClientCapabilities struct { |
| 836 | // Whether the client implementation supports a refresh request sent from the |
| 837 | // server to the client. |
| 838 | // |
| 839 | // Note that this event is global and will force the client to refresh all |
| 840 | // code lenses currently shown. It should be used with absolute care and is |
| 841 | // useful for situation where a server for example detect a project wide |
| 842 | // change that requires such a calculation. |
| 843 | RefreshSupport bool `json:"refreshSupport,omitempty"` |
| 844 | } |
| 845 | |
| 846 | // Represents a color in RGBA space. |
| 847 | // |
| 848 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#color |
| 849 | type Color struct { |
| 850 | // The red component of this color in the range [0-1]. |
| 851 | Red float64 `json:"red"` |
| 852 | // The green component of this color in the range [0-1]. |
| 853 | Green float64 `json:"green"` |
| 854 | // The blue component of this color in the range [0-1]. |
| 855 | Blue float64 `json:"blue"` |
| 856 | // The alpha component of this color in the range [0-1]. |
| 857 | Alpha float64 `json:"alpha"` |
| 858 | } |
| 859 | |
| 860 | // Represents a color range from a document. |
| 861 | // |
| 862 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#colorInformation |
| 863 | type ColorInformation struct { |
| 864 | // The range in the document where this color appears. |
| 865 | Range Range `json:"range"` |
| 866 | // The actual color value for this color range. |
| 867 | Color Color `json:"color"` |
| 868 | } |
| 869 | |
| 870 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#colorPresentation |
| 871 | type ColorPresentation struct { |
| 872 | // The label of this color presentation. It will be shown on the color |
| 873 | // picker header. By default this is also the text that is inserted when selecting |
| 874 | // this color presentation. |
| 875 | Label string `json:"label"` |
| 876 | // An {@link TextEdit edit} which is applied to a document when selecting |
| 877 | // this presentation for the color. When `falsy` the {@link ColorPresentation.label label} |
| 878 | // is used. |
| 879 | TextEdit *TextEdit `json:"textEdit,omitempty"` |
| 880 | // An optional array of additional {@link TextEdit text edits} that are applied when |
| 881 | // selecting this color presentation. Edits must not overlap with the main {@link ColorPresentation.textEdit edit} nor with themselves. |
| 882 | AdditionalTextEdits []TextEdit `json:"additionalTextEdits,omitempty"` |
| 883 | } |
| 884 | |
| 885 | // Parameters for a {@link ColorPresentationRequest}. |
| 886 | // |
| 887 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#colorPresentationParams |
| 888 | type ColorPresentationParams struct { |
| 889 | // The text document. |
| 890 | TextDocument TextDocumentIdentifier `json:"textDocument"` |
| 891 | // The color to request presentations for. |
| 892 | Color Color `json:"color"` |
| 893 | // The range where the color would be inserted. Serves as a context. |
| 894 | Range Range `json:"range"` |
| 895 | WorkDoneProgressParams |
| 896 | PartialResultParams |
| 897 | } |
| 898 | |
| 899 | // Represents a reference to a command. Provides a title which |
| 900 | // will be used to represent a command in the UI and, optionally, |
| 901 | // an array of arguments which will be passed to the command handler |
| 902 | // function when invoked. |
| 903 | // |
| 904 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#command |
| 905 | type Command struct { |
| 906 | // Title of the command, like `save`. |
| 907 | Title string `json:"title"` |
| 908 | // An optional tooltip. |
| 909 | // |
| 910 | // @since 3.18.0 |
| 911 | // @proposed |
| 912 | Tooltip string `json:"tooltip,omitempty"` |
| 913 | // The identifier of the actual command handler. |
| 914 | Command string `json:"command"` |
| 915 | // Arguments that the command handler should be |
| 916 | // invoked with. |
| 917 | Arguments []json.RawMessage `json:"arguments,omitempty"` |
| 918 | } |
| 919 | |
| 920 | // Completion client capabilities |
| 921 | // |
| 922 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#completionClientCapabilities |
| 923 | type CompletionClientCapabilities struct { |
| 924 | // Whether completion supports dynamic registration. |
| 925 | DynamicRegistration bool `json:"dynamicRegistration,omitempty"` |
| 926 | // The client supports the following `CompletionItem` specific |
| 927 | // capabilities. |
| 928 | CompletionItem ClientCompletionItemOptions `json:"completionItem,omitempty"` |
| 929 | CompletionItemKind *ClientCompletionItemOptionsKind `json:"completionItemKind,omitempty"` |
| 930 | // Defines how the client handles whitespace and indentation |
| 931 | // when accepting a completion item that uses multi line |
| 932 | // text in either `insertText` or `textEdit`. |
| 933 | // |
| 934 | // @since 3.17.0 |
| 935 | InsertTextMode InsertTextMode `json:"insertTextMode,omitempty"` |
| 936 | // The client supports to send additional context information for a |
| 937 | // `textDocument/completion` request. |
| 938 | ContextSupport bool `json:"contextSupport,omitempty"` |
| 939 | // The client supports the following `CompletionList` specific |
| 940 | // capabilities. |
| 941 | // |
| 942 | // @since 3.17.0 |
| 943 | CompletionList *CompletionListCapabilities `json:"completionList,omitempty"` |
| 944 | } |
| 945 | |
| 946 | // Contains additional information about the context in which a completion request is triggered. |
| 947 | // |
| 948 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#completionContext |
| 949 | type CompletionContext struct { |
| 950 | // How the completion was triggered. |
| 951 | TriggerKind CompletionTriggerKind `json:"triggerKind"` |
| 952 | // The trigger character (a single character) that has trigger code complete. |
| 953 | // Is undefined if `triggerKind !== CompletionTriggerKind.TriggerCharacter` |
| 954 | TriggerCharacter string `json:"triggerCharacter,omitempty"` |
| 955 | } |
| 956 | |
| 957 | // A completion item represents a text snippet that is |
| 958 | // proposed to complete text that is being typed. |
| 959 | // |
| 960 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#completionItem |
| 961 | type CompletionItem struct { |
| 962 | // The label of this completion item. |
| 963 | // |
| 964 | // The label property is also by default the text that |
| 965 | // is inserted when selecting this completion. |
| 966 | // |
| 967 | // If label details are provided the label itself should |
| 968 | // be an unqualified name of the completion item. |
| 969 | Label string `json:"label"` |
| 970 | // Additional details for the label |
| 971 | // |
| 972 | // @since 3.17.0 |
| 973 | LabelDetails *CompletionItemLabelDetails `json:"labelDetails,omitempty"` |
| 974 | // The kind of this completion item. Based of the kind |
| 975 | // an icon is chosen by the editor. |
| 976 | Kind CompletionItemKind `json:"kind,omitempty"` |
| 977 | // Tags for this completion item. |
| 978 | // |
| 979 | // @since 3.15.0 |
| 980 | Tags []CompletionItemTag `json:"tags,omitempty"` |
| 981 | // A human-readable string with additional information |
| 982 | // about this item, like type or symbol information. |
| 983 | Detail string `json:"detail,omitempty"` |
| 984 | // A human-readable string that represents a doc-comment. |
| 985 | Documentation *Or_CompletionItem_documentation `json:"documentation,omitempty"` |
| 986 | // Indicates if this item is deprecated. |
| 987 | // @deprecated Use `tags` instead. |
| 988 | Deprecated bool `json:"deprecated,omitempty"` |
| 989 | // Select this item when showing. |
| 990 | // |
| 991 | // *Note* that only one completion item can be selected and that the |
| 992 | // tool / client decides which item that is. The rule is that the *first* |
| 993 | // item of those that match best is selected. |
| 994 | Preselect bool `json:"preselect,omitempty"` |
| 995 | // A string that should be used when comparing this item |
| 996 | // with other items. When `falsy` the {@link CompletionItem.label label} |
| 997 | // is used. |
| 998 | SortText string `json:"sortText,omitempty"` |
| 999 | // A string that should be used when filtering a set of |
| 1000 | // completion items. When `falsy` the {@link CompletionItem.label label} |
| 1001 | // is used. |
| 1002 | FilterText string `json:"filterText,omitempty"` |
| 1003 | // A string that should be inserted into a document when selecting |
| 1004 | // this completion. When `falsy` the {@link CompletionItem.label label} |
| 1005 | // is used. |
| 1006 | // |
| 1007 | // The `insertText` is subject to interpretation by the client side. |
| 1008 | // Some tools might not take the string literally. For example |
| 1009 | // VS Code when code complete is requested in this example |
| 1010 | // `con<cursor position>` and a completion item with an `insertText` of |
| 1011 | // `console` is provided it will only insert `sole`. Therefore it is |
| 1012 | // recommended to use `textEdit` instead since it avoids additional client |
| 1013 | // side interpretation. |
| 1014 | InsertText string `json:"insertText,omitempty"` |
| 1015 | // The format of the insert text. The format applies to both the |
| 1016 | // `insertText` property and the `newText` property of a provided |
| 1017 | // `textEdit`. If omitted defaults to `InsertTextFormat.PlainText`. |
| 1018 | // |
| 1019 | // Please note that the insertTextFormat doesn't apply to |
| 1020 | // `additionalTextEdits`. |
| 1021 | InsertTextFormat *InsertTextFormat `json:"insertTextFormat,omitempty"` |
| 1022 | // How whitespace and indentation is handled during completion |
| 1023 | // item insertion. If not provided the clients default value depends on |
| 1024 | // the `textDocument.completion.insertTextMode` client capability. |
| 1025 | // |
| 1026 | // @since 3.16.0 |
| 1027 | InsertTextMode *InsertTextMode `json:"insertTextMode,omitempty"` |
| 1028 | // An {@link TextEdit edit} which is applied to a document when selecting |
| 1029 | // this completion. When an edit is provided the value of |
| 1030 | // {@link CompletionItem.insertText insertText} is ignored. |
| 1031 | // |
| 1032 | // Most editors support two different operations when accepting a completion |
| 1033 | // item. One is to insert a completion text and the other is to replace an |
| 1034 | // existing text with a completion text. Since this can usually not be |
| 1035 | // predetermined by a server it can report both ranges. Clients need to |
| 1036 | // signal support for `InsertReplaceEdits` via the |
| 1037 | // `textDocument.completion.insertReplaceSupport` client capability |
| 1038 | // property. |
| 1039 | // |
| 1040 | // *Note 1:* The text edit's range as well as both ranges from an insert |
| 1041 | // replace edit must be a [single line] and they must contain the position |
| 1042 | // at which completion has been requested. |
| 1043 | // *Note 2:* If an `InsertReplaceEdit` is returned the edit's insert range |
| 1044 | // must be a prefix of the edit's replace range, that means it must be |
| 1045 | // contained and starting at the same position. |
| 1046 | // |
| 1047 | // @since 3.16.0 additional type `InsertReplaceEdit` |
| 1048 | TextEdit *Or_CompletionItem_textEdit `json:"textEdit,omitempty"` |
| 1049 | // The edit text used if the completion item is part of a CompletionList and |
| 1050 | // CompletionList defines an item default for the text edit range. |
| 1051 | // |
| 1052 | // Clients will only honor this property if they opt into completion list |
| 1053 | // item defaults using the capability `completionList.itemDefaults`. |
| 1054 | // |
| 1055 | // If not provided and a list's default range is provided the label |
| 1056 | // property is used as a text. |
| 1057 | // |
| 1058 | // @since 3.17.0 |
| 1059 | TextEditText string `json:"textEditText,omitempty"` |
| 1060 | // An optional array of additional {@link TextEdit text edits} that are applied when |
| 1061 | // selecting this completion. Edits must not overlap (including the same insert position) |
| 1062 | // with the main {@link CompletionItem.textEdit edit} nor with themselves. |
| 1063 | // |
| 1064 | // Additional text edits should be used to change text unrelated to the current cursor position |
| 1065 | // (for example adding an import statement at the top of the file if the completion item will |
| 1066 | // insert an unqualified type). |
| 1067 | AdditionalTextEdits []TextEdit `json:"additionalTextEdits,omitempty"` |
| 1068 | // An optional set of characters that when pressed while this completion is active will accept it first and |
| 1069 | // then type that character. *Note* that all commit characters should have `length=1` and that superfluous |
| 1070 | // characters will be ignored. |
| 1071 | CommitCharacters []string `json:"commitCharacters,omitempty"` |
| 1072 | // An optional {@link Command command} that is executed *after* inserting this completion. *Note* that |
| 1073 | // additional modifications to the current document should be described with the |
| 1074 | // {@link CompletionItem.additionalTextEdits additionalTextEdits}-property. |
| 1075 | Command *Command `json:"command,omitempty"` |
| 1076 | // A data entry field that is preserved on a completion item between a |
| 1077 | // {@link CompletionRequest} and a {@link CompletionResolveRequest}. |
| 1078 | Data any `json:"data,omitempty"` |
| 1079 | } |
| 1080 | |
| 1081 | // Specifies how fields from a completion item should be combined with those |
| 1082 | // from `completionList.itemDefaults`. |
| 1083 | // |
| 1084 | // If unspecified, all fields will be treated as ApplyKind.Replace. |
| 1085 | // |
| 1086 | // If a field's value is ApplyKind.Replace, the value from a completion item (if |
| 1087 | // provided and not `null`) will always be used instead of the value from |
| 1088 | // `completionItem.itemDefaults`. |
| 1089 | // |
| 1090 | // If a field's value is ApplyKind.Merge, the values will be merged using the rules |
| 1091 | // defined against each field below. |
| 1092 | // |
| 1093 | // Servers are only allowed to return `applyKind` if the client |
| 1094 | // signals support for this via the `completionList.applyKindSupport` |
| 1095 | // capability. |
| 1096 | // |
| 1097 | // @since 3.18.0 |
| 1098 | // |
| 1099 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#completionItemApplyKinds |
| 1100 | type CompletionItemApplyKinds struct { |
| 1101 | // Specifies whether commitCharacters on a completion will replace or be |
| 1102 | // merged with those in `completionList.itemDefaults.commitCharacters`. |
| 1103 | // |
| 1104 | // If ApplyKind.Replace, the commit characters from the completion item will |
| 1105 | // always be used unless not provided, in which case those from |
| 1106 | // `completionList.itemDefaults.commitCharacters` will be used. An |
| 1107 | // empty list can be used if a completion item does not have any commit |
| 1108 | // characters and also should not use those from |
| 1109 | // `completionList.itemDefaults.commitCharacters`. |
| 1110 | // |
| 1111 | // If ApplyKind.Merge the commitCharacters for the completion will be the |
| 1112 | // union of all values in both `completionList.itemDefaults.commitCharacters` |
| 1113 | // and the completion's own `commitCharacters`. |
| 1114 | // |
| 1115 | // @since 3.18.0 |
| 1116 | CommitCharacters *ApplyKind `json:"commitCharacters,omitempty"` |
| 1117 | // Specifies whether the `data` field on a completion will replace or |
| 1118 | // be merged with data from `completionList.itemDefaults.data`. |
| 1119 | // |
| 1120 | // If ApplyKind.Replace, the data from the completion item will be used if |
| 1121 | // provided (and not `null`), otherwise |
| 1122 | // `completionList.itemDefaults.data` will be used. An empty object can |
| 1123 | // be used if a completion item does not have any data but also should |
| 1124 | // not use the value from `completionList.itemDefaults.data`. |
| 1125 | // |
| 1126 | // If ApplyKind.Merge, a shallow merge will be performed between |
| 1127 | // `completionList.itemDefaults.data` and the completion's own data |
| 1128 | // using the following rules: |
| 1129 | // |
| 1130 | // |
| 1131 | // - If a completion's `data` field is not provided (or `null`), the |
| 1132 | // entire `data` field from `completionList.itemDefaults.data` will be |
| 1133 | // used as-is. |
| 1134 | // - If a completion's `data` field is provided, each field will |
| 1135 | // overwrite the field of the same name in |
| 1136 | // `completionList.itemDefaults.data` but no merging of nested fields |
| 1137 | // within that value will occur. |
| 1138 | // |
| 1139 | // @since 3.18.0 |
| 1140 | Data *ApplyKind `json:"data,omitempty"` |
| 1141 | } |
| 1142 | |
| 1143 | // In many cases the items of an actual completion result share the same |
| 1144 | // value for properties like `commitCharacters` or the range of a text |
| 1145 | // edit. A completion list can therefore define item defaults which will |
| 1146 | // be used if a completion item itself doesn't specify the value. |
| 1147 | // |
| 1148 | // If a completion list specifies a default value and a completion item |
| 1149 | // also specifies a corresponding value, the rules for combining these are |
| 1150 | // defined by `applyKinds` (if the client supports it), defaulting to |
| 1151 | // ApplyKind.Replace. |
| 1152 | // |
| 1153 | // Servers are only allowed to return default values if the client |
| 1154 | // signals support for this via the `completionList.itemDefaults` |
| 1155 | // capability. |
| 1156 | // |
| 1157 | // @since 3.17.0 |
| 1158 | // |
| 1159 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#completionItemDefaults |
| 1160 | type CompletionItemDefaults struct { |
| 1161 | // A default commit character set. |
| 1162 | // |
| 1163 | // @since 3.17.0 |
| 1164 | CommitCharacters []string `json:"commitCharacters,omitempty"` |
| 1165 | // A default edit range. |
| 1166 | // |
| 1167 | // @since 3.17.0 |
| 1168 | EditRange *Or_CompletionItemDefaults_editRange `json:"editRange,omitempty"` |
| 1169 | // A default insert text format. |
| 1170 | // |
| 1171 | // @since 3.17.0 |
| 1172 | InsertTextFormat *InsertTextFormat `json:"insertTextFormat,omitempty"` |
| 1173 | // A default insert text mode. |
| 1174 | // |
| 1175 | // @since 3.17.0 |
| 1176 | InsertTextMode *InsertTextMode `json:"insertTextMode,omitempty"` |
| 1177 | // A default data value. |
| 1178 | // |
| 1179 | // @since 3.17.0 |
| 1180 | Data any `json:"data,omitempty"` |
| 1181 | } |
| 1182 | |
| 1183 | // The kind of a completion entry. |
| 1184 | type CompletionItemKind uint32 |
| 1185 | |
| 1186 | // Additional details for a completion item label. |
| 1187 | // |
| 1188 | // @since 3.17.0 |
| 1189 | // |
| 1190 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#completionItemLabelDetails |
| 1191 | type CompletionItemLabelDetails struct { |
| 1192 | // An optional string which is rendered less prominently directly after {@link CompletionItem.label label}, |
| 1193 | // without any spacing. Should be used for function signatures and type annotations. |
| 1194 | Detail string `json:"detail,omitempty"` |
| 1195 | // An optional string which is rendered less prominently after {@link CompletionItem.detail}. Should be used |
| 1196 | // for fully qualified names and file paths. |
| 1197 | Description string `json:"description,omitempty"` |
| 1198 | } |
| 1199 | |
| 1200 | // Completion item tags are extra annotations that tweak the rendering of a completion |
| 1201 | // item. |
| 1202 | // |
| 1203 | // @since 3.15.0 |
| 1204 | type CompletionItemTag uint32 |
| 1205 | |
| 1206 | // @since 3.18.0 |
| 1207 | // |
| 1208 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#completionItemTagOptions |
| 1209 | type CompletionItemTagOptions struct { |
| 1210 | // The tags supported by the client. |
| 1211 | ValueSet []CompletionItemTag `json:"valueSet"` |
| 1212 | } |
| 1213 | |
| 1214 | // Represents a collection of {@link CompletionItem completion items} to be presented |
| 1215 | // in the editor. |
| 1216 | // |
| 1217 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#completionList |
| 1218 | type CompletionList struct { |
| 1219 | // This list it not complete. Further typing results in recomputing this list. |
| 1220 | // |
| 1221 | // Recomputed lists have all their items replaced (not appended) in the |
| 1222 | // incomplete completion sessions. |
| 1223 | IsIncomplete bool `json:"isIncomplete"` |
| 1224 | // In many cases the items of an actual completion result share the same |
| 1225 | // value for properties like `commitCharacters` or the range of a text |
| 1226 | // edit. A completion list can therefore define item defaults which will |
| 1227 | // be used if a completion item itself doesn't specify the value. |
| 1228 | // |
| 1229 | // If a completion list specifies a default value and a completion item |
| 1230 | // also specifies a corresponding value, the rules for combining these are |
| 1231 | // defined by `applyKinds` (if the client supports it), defaulting to |
| 1232 | // ApplyKind.Replace. |
| 1233 | // |
| 1234 | // Servers are only allowed to return default values if the client |
| 1235 | // signals support for this via the `completionList.itemDefaults` |
| 1236 | // capability. |
| 1237 | // |
| 1238 | // @since 3.17.0 |
| 1239 | ItemDefaults *CompletionItemDefaults `json:"itemDefaults,omitempty"` |
| 1240 | // Specifies how fields from a completion item should be combined with those |
| 1241 | // from `completionList.itemDefaults`. |
| 1242 | // |
| 1243 | // If unspecified, all fields will be treated as ApplyKind.Replace. |
| 1244 | // |
| 1245 | // If a field's value is ApplyKind.Replace, the value from a completion item |
| 1246 | // (if provided and not `null`) will always be used instead of the value |
| 1247 | // from `completionItem.itemDefaults`. |
| 1248 | // |
| 1249 | // If a field's value is ApplyKind.Merge, the values will be merged using |
| 1250 | // the rules defined against each field below. |
| 1251 | // |
| 1252 | // Servers are only allowed to return `applyKind` if the client |
| 1253 | // signals support for this via the `completionList.applyKindSupport` |
| 1254 | // capability. |
| 1255 | // |
| 1256 | // @since 3.18.0 |
| 1257 | ApplyKind *CompletionItemApplyKinds `json:"applyKind,omitempty"` |
| 1258 | // The completion items. |
| 1259 | Items []CompletionItem `json:"items"` |
| 1260 | } |
| 1261 | |
| 1262 | // The client supports the following `CompletionList` specific |
| 1263 | // capabilities. |
| 1264 | // |
| 1265 | // @since 3.17.0 |
| 1266 | // |
| 1267 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#completionListCapabilities |
| 1268 | type CompletionListCapabilities struct { |
| 1269 | // The client supports the following itemDefaults on |
| 1270 | // a completion list. |
| 1271 | // |
| 1272 | // The value lists the supported property names of the |
| 1273 | // `CompletionList.itemDefaults` object. If omitted |
| 1274 | // no properties are supported. |
| 1275 | // |
| 1276 | // @since 3.17.0 |
| 1277 | ItemDefaults []string `json:"itemDefaults,omitempty"` |
| 1278 | // Specifies whether the client supports `CompletionList.applyKind` to |
| 1279 | // indicate how supported values from `completionList.itemDefaults` |
| 1280 | // and `completion` will be combined. |
| 1281 | // |
| 1282 | // If a client supports `applyKind` it must support it for all fields |
| 1283 | // that it supports that are listed in `CompletionList.applyKind`. This |
| 1284 | // means when clients add support for new/future fields in completion |
| 1285 | // items the MUST also support merge for them if those fields are |
| 1286 | // defined in `CompletionList.applyKind`. |
| 1287 | // |
| 1288 | // @since 3.18.0 |
| 1289 | ApplyKindSupport bool `json:"applyKindSupport,omitempty"` |
| 1290 | } |
| 1291 | |
| 1292 | // Completion options. |
| 1293 | // |
| 1294 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#completionOptions |
| 1295 | type CompletionOptions struct { |
| 1296 | // Most tools trigger completion request automatically without explicitly requesting |
| 1297 | // it using a keyboard shortcut (e.g. Ctrl+Space). Typically they do so when the user |
| 1298 | // starts to type an identifier. For example if the user types `c` in a JavaScript file |
| 1299 | // code complete will automatically pop up present `console` besides others as a |
| 1300 | // completion item. Characters that make up identifiers don't need to be listed here. |
| 1301 | // |
| 1302 | // If code complete should automatically be trigger on characters not being valid inside |
| 1303 | // an identifier (for example `.` in JavaScript) list them in `triggerCharacters`. |
| 1304 | TriggerCharacters []string `json:"triggerCharacters,omitempty"` |
| 1305 | // The list of all possible characters that commit a completion. This field can be used |
| 1306 | // if clients don't support individual commit characters per completion item. See |
| 1307 | // `ClientCapabilities.textDocument.completion.completionItem.commitCharactersSupport` |
| 1308 | // |
| 1309 | // If a server provides both `allCommitCharacters` and commit characters on an individual |
| 1310 | // completion item the ones on the completion item win. |
| 1311 | // |
| 1312 | // @since 3.2.0 |
| 1313 | AllCommitCharacters []string `json:"allCommitCharacters,omitempty"` |
| 1314 | // The server provides support to resolve additional |
| 1315 | // information for a completion item. |
| 1316 | ResolveProvider bool `json:"resolveProvider,omitempty"` |
| 1317 | // The server supports the following `CompletionItem` specific |
| 1318 | // capabilities. |
| 1319 | // |
| 1320 | // @since 3.17.0 |
| 1321 | CompletionItem *ServerCompletionItemOptions `json:"completionItem,omitempty"` |
| 1322 | WorkDoneProgressOptions |
| 1323 | } |
| 1324 | |
| 1325 | // Completion parameters |
| 1326 | // |
| 1327 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#completionParams |
| 1328 | type CompletionParams struct { |
| 1329 | // The completion context. This is only available it the client specifies |
| 1330 | // to send this using the client capability `textDocument.completion.contextSupport === true` |
| 1331 | Context CompletionContext `json:"context,omitempty"` |
| 1332 | TextDocumentPositionParams |
| 1333 | WorkDoneProgressParams |
| 1334 | PartialResultParams |
| 1335 | } |
| 1336 | |
| 1337 | // Registration options for a {@link CompletionRequest}. |
| 1338 | // |
| 1339 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#completionRegistrationOptions |
| 1340 | type CompletionRegistrationOptions struct { |
| 1341 | TextDocumentRegistrationOptions |
| 1342 | CompletionOptions |
| 1343 | } |
| 1344 | |
| 1345 | // How a completion was triggered |
| 1346 | type CompletionTriggerKind uint32 |
| 1347 | |
| 1348 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#configurationItem |
| 1349 | type ConfigurationItem struct { |
| 1350 | // The scope to get the configuration section for. |
| 1351 | ScopeURI *URI `json:"scopeUri,omitempty"` |
| 1352 | // The configuration section asked for. |
| 1353 | Section string `json:"section,omitempty"` |
| 1354 | } |
| 1355 | |
| 1356 | // The parameters of a configuration request. |
| 1357 | // |
| 1358 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#configurationParams |
| 1359 | type ConfigurationParams struct { |
| 1360 | Items []ConfigurationItem `json:"items"` |
| 1361 | } |
| 1362 | |
| 1363 | // Create file operation. |
| 1364 | // |
| 1365 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#createFile |
| 1366 | type CreateFile struct { |
| 1367 | // A create |
| 1368 | Kind string `json:"kind"` |
| 1369 | // The resource to create. |
| 1370 | URI DocumentURI `json:"uri"` |
| 1371 | // Additional options |
| 1372 | Options *CreateFileOptions `json:"options,omitempty"` |
| 1373 | ResourceOperation |
| 1374 | } |
| 1375 | |
| 1376 | // Options to create a file. |
| 1377 | // |
| 1378 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#createFileOptions |
| 1379 | type CreateFileOptions struct { |
| 1380 | // Overwrite existing file. Overwrite wins over `ignoreIfExists` |
| 1381 | Overwrite bool `json:"overwrite,omitempty"` |
| 1382 | // Ignore if exists. |
| 1383 | IgnoreIfExists bool `json:"ignoreIfExists,omitempty"` |
| 1384 | } |
| 1385 | |
| 1386 | // The parameters sent in notifications/requests for user-initiated creation of |
| 1387 | // files. |
| 1388 | // |
| 1389 | // @since 3.16.0 |
| 1390 | // |
| 1391 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#createFilesParams |
| 1392 | type CreateFilesParams struct { |
| 1393 | // An array of all files/folders created in this operation. |
| 1394 | Files []FileCreate `json:"files"` |
| 1395 | } |
| 1396 | |
| 1397 | // The declaration of a symbol representation as one or many {@link Location locations}. |
| 1398 | // |
| 1399 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#declaration |
| 1400 | type Declaration = []Location // (alias) |
| 1401 | // @since 3.14.0 |
| 1402 | // |
| 1403 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#declarationClientCapabilities |
| 1404 | type DeclarationClientCapabilities struct { |
| 1405 | // Whether declaration supports dynamic registration. If this is set to `true` |
| 1406 | // the client supports the new `DeclarationRegistrationOptions` return value |
| 1407 | // for the corresponding server capability as well. |
| 1408 | DynamicRegistration bool `json:"dynamicRegistration,omitempty"` |
| 1409 | // The client supports additional metadata in the form of declaration links. |
| 1410 | LinkSupport bool `json:"linkSupport,omitempty"` |
| 1411 | } |
| 1412 | |
| 1413 | // Information about where a symbol is declared. |
| 1414 | // |
| 1415 | // Provides additional metadata over normal {@link Location location} declarations, including the range of |
| 1416 | // the declaring symbol. |
| 1417 | // |
| 1418 | // Servers should prefer returning `DeclarationLink` over `Declaration` if supported |
| 1419 | // by the client. |
| 1420 | // |
| 1421 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#declarationLink |
| 1422 | type DeclarationLink = LocationLink // (alias) |
| 1423 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#declarationOptions |
| 1424 | type DeclarationOptions struct { |
| 1425 | WorkDoneProgressOptions |
| 1426 | } |
| 1427 | |
| 1428 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#declarationParams |
| 1429 | type DeclarationParams struct { |
| 1430 | TextDocumentPositionParams |
| 1431 | WorkDoneProgressParams |
| 1432 | PartialResultParams |
| 1433 | } |
| 1434 | |
| 1435 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#declarationRegistrationOptions |
| 1436 | type DeclarationRegistrationOptions struct { |
| 1437 | DeclarationOptions |
| 1438 | TextDocumentRegistrationOptions |
| 1439 | StaticRegistrationOptions |
| 1440 | } |
| 1441 | |
| 1442 | // The definition of a symbol represented as one or many {@link Location locations}. |
| 1443 | // For most programming languages there is only one location at which a symbol is |
| 1444 | // defined. |
| 1445 | // |
| 1446 | // Servers should prefer returning `DefinitionLink` over `Definition` if supported |
| 1447 | // by the client. |
| 1448 | // |
| 1449 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#definition |
| 1450 | type Definition = Or_Definition // (alias) |
| 1451 | // Client Capabilities for a {@link DefinitionRequest}. |
| 1452 | // |
| 1453 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#definitionClientCapabilities |
| 1454 | type DefinitionClientCapabilities struct { |
| 1455 | // Whether definition supports dynamic registration. |
| 1456 | DynamicRegistration bool `json:"dynamicRegistration,omitempty"` |
| 1457 | // The client supports additional metadata in the form of definition links. |
| 1458 | // |
| 1459 | // @since 3.14.0 |
| 1460 | LinkSupport bool `json:"linkSupport,omitempty"` |
| 1461 | } |
| 1462 | |
| 1463 | // Information about where a symbol is defined. |
| 1464 | // |
| 1465 | // Provides additional metadata over normal {@link Location location} definitions, including the range of |
| 1466 | // the defining symbol |
| 1467 | // |
| 1468 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#definitionLink |
| 1469 | type DefinitionLink = LocationLink // (alias) |
| 1470 | // Server Capabilities for a {@link DefinitionRequest}. |
| 1471 | // |
| 1472 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#definitionOptions |
| 1473 | type DefinitionOptions struct { |
| 1474 | WorkDoneProgressOptions |
| 1475 | } |
| 1476 | |
| 1477 | // Parameters for a {@link DefinitionRequest}. |
| 1478 | // |
| 1479 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#definitionParams |
| 1480 | type DefinitionParams struct { |
| 1481 | TextDocumentPositionParams |
| 1482 | WorkDoneProgressParams |
| 1483 | PartialResultParams |
| 1484 | } |
| 1485 | |
| 1486 | // Registration options for a {@link DefinitionRequest}. |
| 1487 | // |
| 1488 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#definitionRegistrationOptions |
| 1489 | type DefinitionRegistrationOptions struct { |
| 1490 | TextDocumentRegistrationOptions |
| 1491 | DefinitionOptions |
| 1492 | } |
| 1493 | |
| 1494 | // Delete file operation |
| 1495 | // |
| 1496 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#deleteFile |
| 1497 | type DeleteFile struct { |
| 1498 | // A delete |
| 1499 | Kind string `json:"kind"` |
| 1500 | // The file to delete. |
| 1501 | URI DocumentURI `json:"uri"` |
| 1502 | // Delete options. |
| 1503 | Options *DeleteFileOptions `json:"options,omitempty"` |
| 1504 | ResourceOperation |
| 1505 | } |
| 1506 | |
| 1507 | // Delete file options |
| 1508 | // |
| 1509 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#deleteFileOptions |
| 1510 | type DeleteFileOptions struct { |
| 1511 | // Delete the content recursively if a folder is denoted. |
| 1512 | Recursive bool `json:"recursive,omitempty"` |
| 1513 | // Ignore the operation if the file doesn't exist. |
| 1514 | IgnoreIfNotExists bool `json:"ignoreIfNotExists,omitempty"` |
| 1515 | } |
| 1516 | |
| 1517 | // The parameters sent in notifications/requests for user-initiated deletes of |
| 1518 | // files. |
| 1519 | // |
| 1520 | // @since 3.16.0 |
| 1521 | // |
| 1522 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#deleteFilesParams |
| 1523 | type DeleteFilesParams struct { |
| 1524 | // An array of all files/folders deleted in this operation. |
| 1525 | Files []FileDelete `json:"files"` |
| 1526 | } |
| 1527 | |
| 1528 | // Represents a diagnostic, such as a compiler error or warning. Diagnostic objects |
| 1529 | // are only valid in the scope of a resource. |
| 1530 | // |
| 1531 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#diagnostic |
| 1532 | type Diagnostic struct { |
| 1533 | // The range at which the message applies |
| 1534 | Range Range `json:"range"` |
| 1535 | // The diagnostic's severity. To avoid interpretation mismatches when a |
| 1536 | // server is used with different clients it is highly recommended that servers |
| 1537 | // always provide a severity value. |
| 1538 | Severity DiagnosticSeverity `json:"severity,omitempty"` |
| 1539 | // The diagnostic's code, which usually appear in the user interface. |
| 1540 | Code any `json:"code,omitempty"` |
| 1541 | // An optional property to describe the error code. |
| 1542 | // Requires the code field (above) to be present/not null. |
| 1543 | // |
| 1544 | // @since 3.16.0 |
| 1545 | CodeDescription *CodeDescription `json:"codeDescription,omitempty"` |
| 1546 | // A human-readable string describing the source of this |
| 1547 | // diagnostic, e.g. 'typescript' or 'super lint'. It usually |
| 1548 | // appears in the user interface. |
| 1549 | Source string `json:"source,omitempty"` |
| 1550 | // The diagnostic's message. It usually appears in the user interface |
| 1551 | Message string `json:"message"` |
| 1552 | // Additional metadata about the diagnostic. |
| 1553 | // |
| 1554 | // @since 3.15.0 |
| 1555 | Tags []DiagnosticTag `json:"tags,omitempty"` |
| 1556 | // An array of related diagnostic information, e.g. when symbol-names within |
| 1557 | // a scope collide all definitions can be marked via this property. |
| 1558 | RelatedInformation []DiagnosticRelatedInformation `json:"relatedInformation,omitempty"` |
| 1559 | // A data entry field that is preserved between a `textDocument/publishDiagnostics` |
| 1560 | // notification and `textDocument/codeAction` request. |
| 1561 | // |
| 1562 | // @since 3.16.0 |
| 1563 | Data *json.RawMessage `json:"data,omitempty"` |
| 1564 | } |
| 1565 | |
| 1566 | // Client capabilities specific to diagnostic pull requests. |
| 1567 | // |
| 1568 | // @since 3.17.0 |
| 1569 | // |
| 1570 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#diagnosticClientCapabilities |
| 1571 | type DiagnosticClientCapabilities struct { |
| 1572 | // Whether implementation supports dynamic registration. If this is set to `true` |
| 1573 | // the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` |
| 1574 | // return value for the corresponding server capability as well. |
| 1575 | DynamicRegistration bool `json:"dynamicRegistration,omitempty"` |
| 1576 | // Whether the clients supports related documents for document diagnostic pulls. |
| 1577 | RelatedDocumentSupport bool `json:"relatedDocumentSupport,omitempty"` |
| 1578 | DiagnosticsCapabilities |
| 1579 | } |
| 1580 | |
| 1581 | // Diagnostic options. |
| 1582 | // |
| 1583 | // @since 3.17.0 |
| 1584 | // |
| 1585 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#diagnosticOptions |
| 1586 | type DiagnosticOptions struct { |
| 1587 | // An optional identifier under which the diagnostics are |
| 1588 | // managed by the client. |
| 1589 | Identifier string `json:"identifier,omitempty"` |
| 1590 | // Whether the language has inter file dependencies meaning that |
| 1591 | // editing code in one file can result in a different diagnostic |
| 1592 | // set in another file. Inter file dependencies are common for |
| 1593 | // most programming languages and typically uncommon for linters. |
| 1594 | InterFileDependencies bool `json:"interFileDependencies"` |
| 1595 | // The server provides support for workspace diagnostics as well. |
| 1596 | WorkspaceDiagnostics bool `json:"workspaceDiagnostics"` |
| 1597 | WorkDoneProgressOptions |
| 1598 | } |
| 1599 | |
| 1600 | // Diagnostic registration options. |
| 1601 | // |
| 1602 | // @since 3.17.0 |
| 1603 | // |
| 1604 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#diagnosticRegistrationOptions |
| 1605 | type DiagnosticRegistrationOptions struct { |
| 1606 | TextDocumentRegistrationOptions |
| 1607 | DiagnosticOptions |
| 1608 | StaticRegistrationOptions |
| 1609 | } |
| 1610 | |
| 1611 | // Represents a related message and source code location for a diagnostic. This should be |
| 1612 | // used to point to code locations that cause or related to a diagnostics, e.g when duplicating |
| 1613 | // a symbol in a scope. |
| 1614 | // |
| 1615 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#diagnosticRelatedInformation |
| 1616 | type DiagnosticRelatedInformation struct { |
| 1617 | // The location of this related diagnostic information. |
| 1618 | Location Location `json:"location"` |
| 1619 | // The message of this related diagnostic information. |
| 1620 | Message string `json:"message"` |
| 1621 | } |
| 1622 | |
| 1623 | // Cancellation data returned from a diagnostic request. |
| 1624 | // |
| 1625 | // @since 3.17.0 |
| 1626 | // |
| 1627 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#diagnosticServerCancellationData |
| 1628 | type DiagnosticServerCancellationData struct { |
| 1629 | RetriggerRequest bool `json:"retriggerRequest"` |
| 1630 | } |
| 1631 | |
| 1632 | // The diagnostic's severity. |
| 1633 | type DiagnosticSeverity uint32 |
| 1634 | |
| 1635 | // The diagnostic tags. |
| 1636 | // |
| 1637 | // @since 3.15.0 |
| 1638 | type DiagnosticTag uint32 |
| 1639 | |
| 1640 | // Workspace client capabilities specific to diagnostic pull requests. |
| 1641 | // |
| 1642 | // @since 3.17.0 |
| 1643 | // |
| 1644 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#diagnosticWorkspaceClientCapabilities |
| 1645 | type DiagnosticWorkspaceClientCapabilities struct { |
| 1646 | // Whether the client implementation supports a refresh request sent from |
| 1647 | // the server to the client. |
| 1648 | // |
| 1649 | // Note that this event is global and will force the client to refresh all |
| 1650 | // pulled diagnostics currently shown. It should be used with absolute care and |
| 1651 | // is useful for situation where a server for example detects a project wide |
| 1652 | // change that requires such a calculation. |
| 1653 | RefreshSupport bool `json:"refreshSupport,omitempty"` |
| 1654 | } |
| 1655 | |
| 1656 | // General diagnostics capabilities for pull and push model. |
| 1657 | // |
| 1658 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#diagnosticsCapabilities |
| 1659 | type DiagnosticsCapabilities struct { |
| 1660 | // Whether the clients accepts diagnostics with related information. |
| 1661 | RelatedInformation bool `json:"relatedInformation,omitempty"` |
| 1662 | // Client supports the tag property to provide meta data about a diagnostic. |
| 1663 | // Clients supporting tags have to handle unknown tags gracefully. |
| 1664 | // |
| 1665 | // @since 3.15.0 |
| 1666 | TagSupport *ClientDiagnosticsTagOptions `json:"tagSupport,omitempty"` |
| 1667 | // Client supports a codeDescription property |
| 1668 | // |
| 1669 | // @since 3.16.0 |
| 1670 | CodeDescriptionSupport bool `json:"codeDescriptionSupport,omitempty"` |
| 1671 | // Whether code action supports the `data` property which is |
| 1672 | // preserved between a `textDocument/publishDiagnostics` and |
| 1673 | // `textDocument/codeAction` request. |
| 1674 | // |
| 1675 | // @since 3.16.0 |
| 1676 | DataSupport bool `json:"dataSupport,omitempty"` |
| 1677 | } |
| 1678 | |
| 1679 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#didChangeConfigurationClientCapabilities |
| 1680 | type DidChangeConfigurationClientCapabilities struct { |
| 1681 | // Did change configuration notification supports dynamic registration. |
| 1682 | DynamicRegistration bool `json:"dynamicRegistration,omitempty"` |
| 1683 | } |
| 1684 | |
| 1685 | // The parameters of a change configuration notification. |
| 1686 | // |
| 1687 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#didChangeConfigurationParams |
| 1688 | type DidChangeConfigurationParams struct { |
| 1689 | // The actual changed settings |
| 1690 | Settings any `json:"settings"` |
| 1691 | } |
| 1692 | |
| 1693 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#didChangeConfigurationRegistrationOptions |
| 1694 | type DidChangeConfigurationRegistrationOptions struct { |
| 1695 | Section *OrPSection_workspace_didChangeConfiguration `json:"section,omitempty"` |
| 1696 | } |
| 1697 | |
| 1698 | // The params sent in a change notebook document notification. |
| 1699 | // |
| 1700 | // @since 3.17.0 |
| 1701 | // |
| 1702 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#didChangeNotebookDocumentParams |
| 1703 | type DidChangeNotebookDocumentParams struct { |
| 1704 | // The notebook document that did change. The version number points |
| 1705 | // to the version after all provided changes have been applied. If |
| 1706 | // only the text document content of a cell changes the notebook version |
| 1707 | // doesn't necessarily have to change. |
| 1708 | NotebookDocument VersionedNotebookDocumentIdentifier `json:"notebookDocument"` |
| 1709 | // The actual changes to the notebook document. |
| 1710 | // |
| 1711 | // The changes describe single state changes to the notebook document. |
| 1712 | // So if there are two changes c1 (at array index 0) and c2 (at array |
| 1713 | // index 1) for a notebook in state S then c1 moves the notebook from |
| 1714 | // S to S' and c2 from S' to S''. So c1 is computed on the state S and |
| 1715 | // c2 is computed on the state S'. |
| 1716 | // |
| 1717 | // To mirror the content of a notebook using change events use the following approach: |
| 1718 | // |
| 1719 | // - start with the same initial content |
| 1720 | // - apply the 'notebookDocument/didChange' notifications in the order you receive them. |
| 1721 | // - apply the `NotebookChangeEvent`s in a single notification in the order |
| 1722 | // you receive them. |
| 1723 | Change NotebookDocumentChangeEvent `json:"change"` |
| 1724 | } |
| 1725 | |
| 1726 | // The change text document notification's parameters. |
| 1727 | // |
| 1728 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#didChangeTextDocumentParams |
| 1729 | type DidChangeTextDocumentParams struct { |
| 1730 | // The document that did change. The version number points |
| 1731 | // to the version after all provided content changes have |
| 1732 | // been applied. |
| 1733 | TextDocument VersionedTextDocumentIdentifier `json:"textDocument"` |
| 1734 | // The actual content changes. The content changes describe single state changes |
| 1735 | // to the document. So if there are two content changes c1 (at array index 0) and |
| 1736 | // c2 (at array index 1) for a document in state S then c1 moves the document from |
| 1737 | // S to S' and c2 from S' to S''. So c1 is computed on the state S and c2 is computed |
| 1738 | // on the state S'. |
| 1739 | // |
| 1740 | // To mirror the content of a document using change events use the following approach: |
| 1741 | // |
| 1742 | // - start with the same initial content |
| 1743 | // - apply the 'textDocument/didChange' notifications in the order you receive them. |
| 1744 | // - apply the `TextDocumentContentChangeEvent`s in a single notification in the order |
| 1745 | // you receive them. |
| 1746 | ContentChanges []TextDocumentContentChangeEvent `json:"contentChanges"` |
| 1747 | } |
| 1748 | |
| 1749 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#didChangeWatchedFilesClientCapabilities |
| 1750 | type DidChangeWatchedFilesClientCapabilities struct { |
| 1751 | // Did change watched files notification supports dynamic registration. Please note |
| 1752 | // that the current protocol doesn't support static configuration for file changes |
| 1753 | // from the server side. |
| 1754 | DynamicRegistration bool `json:"dynamicRegistration,omitempty"` |
| 1755 | // Whether the client has support for {@link RelativePattern relative pattern} |
| 1756 | // or not. |
| 1757 | // |
| 1758 | // @since 3.17.0 |
| 1759 | RelativePatternSupport bool `json:"relativePatternSupport,omitempty"` |
| 1760 | } |
| 1761 | |
| 1762 | // The watched files change notification's parameters. |
| 1763 | // |
| 1764 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#didChangeWatchedFilesParams |
| 1765 | type DidChangeWatchedFilesParams struct { |
| 1766 | // The actual file events. |
| 1767 | Changes []FileEvent `json:"changes"` |
| 1768 | } |
| 1769 | |
| 1770 | // Describe options to be used when registered for text document change events. |
| 1771 | // |
| 1772 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#didChangeWatchedFilesRegistrationOptions |
| 1773 | type DidChangeWatchedFilesRegistrationOptions struct { |
| 1774 | // The watchers to register. |
| 1775 | Watchers []FileSystemWatcher `json:"watchers"` |
| 1776 | } |
| 1777 | |
| 1778 | // The parameters of a `workspace/didChangeWorkspaceFolders` notification. |
| 1779 | // |
| 1780 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#didChangeWorkspaceFoldersParams |
| 1781 | type DidChangeWorkspaceFoldersParams struct { |
| 1782 | // The actual workspace folder change event. |
| 1783 | Event WorkspaceFoldersChangeEvent `json:"event"` |
| 1784 | } |
| 1785 | |
| 1786 | // The params sent in a close notebook document notification. |
| 1787 | // |
| 1788 | // @since 3.17.0 |
| 1789 | // |
| 1790 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#didCloseNotebookDocumentParams |
| 1791 | type DidCloseNotebookDocumentParams struct { |
| 1792 | // The notebook document that got closed. |
| 1793 | NotebookDocument NotebookDocumentIdentifier `json:"notebookDocument"` |
| 1794 | // The text documents that represent the content |
| 1795 | // of a notebook cell that got closed. |
| 1796 | CellTextDocuments []TextDocumentIdentifier `json:"cellTextDocuments"` |
| 1797 | } |
| 1798 | |
| 1799 | // The parameters sent in a close text document notification |
| 1800 | // |
| 1801 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#didCloseTextDocumentParams |
| 1802 | type DidCloseTextDocumentParams struct { |
| 1803 | // The document that was closed. |
| 1804 | TextDocument TextDocumentIdentifier `json:"textDocument"` |
| 1805 | } |
| 1806 | |
| 1807 | // The params sent in an open notebook document notification. |
| 1808 | // |
| 1809 | // @since 3.17.0 |
| 1810 | // |
| 1811 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#didOpenNotebookDocumentParams |
| 1812 | type DidOpenNotebookDocumentParams struct { |
| 1813 | // The notebook document that got opened. |
| 1814 | NotebookDocument NotebookDocument `json:"notebookDocument"` |
| 1815 | // The text documents that represent the content |
| 1816 | // of a notebook cell. |
| 1817 | CellTextDocuments []TextDocumentItem `json:"cellTextDocuments"` |
| 1818 | } |
| 1819 | |
| 1820 | // The parameters sent in an open text document notification |
| 1821 | // |
| 1822 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#didOpenTextDocumentParams |
| 1823 | type DidOpenTextDocumentParams struct { |
| 1824 | // The document that was opened. |
| 1825 | TextDocument TextDocumentItem `json:"textDocument"` |
| 1826 | } |
| 1827 | |
| 1828 | // The params sent in a save notebook document notification. |
| 1829 | // |
| 1830 | // @since 3.17.0 |
| 1831 | // |
| 1832 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#didSaveNotebookDocumentParams |
| 1833 | type DidSaveNotebookDocumentParams struct { |
| 1834 | // The notebook document that got saved. |
| 1835 | NotebookDocument NotebookDocumentIdentifier `json:"notebookDocument"` |
| 1836 | } |
| 1837 | |
| 1838 | // The parameters sent in a save text document notification |
| 1839 | // |
| 1840 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#didSaveTextDocumentParams |
| 1841 | type DidSaveTextDocumentParams struct { |
| 1842 | // The document that was saved. |
| 1843 | TextDocument TextDocumentIdentifier `json:"textDocument"` |
| 1844 | // Optional the content when saved. Depends on the includeText value |
| 1845 | // when the save notification was requested. |
| 1846 | Text *string `json:"text,omitempty"` |
| 1847 | } |
| 1848 | |
| 1849 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentColorClientCapabilities |
| 1850 | type DocumentColorClientCapabilities struct { |
| 1851 | // Whether implementation supports dynamic registration. If this is set to `true` |
| 1852 | // the client supports the new `DocumentColorRegistrationOptions` return value |
| 1853 | // for the corresponding server capability as well. |
| 1854 | DynamicRegistration bool `json:"dynamicRegistration,omitempty"` |
| 1855 | } |
| 1856 | |
| 1857 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentColorOptions |
| 1858 | type DocumentColorOptions struct { |
| 1859 | WorkDoneProgressOptions |
| 1860 | } |
| 1861 | |
| 1862 | // Parameters for a {@link DocumentColorRequest}. |
| 1863 | // |
| 1864 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentColorParams |
| 1865 | type DocumentColorParams struct { |
| 1866 | // The text document. |
| 1867 | TextDocument TextDocumentIdentifier `json:"textDocument"` |
| 1868 | WorkDoneProgressParams |
| 1869 | PartialResultParams |
| 1870 | } |
| 1871 | |
| 1872 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentColorRegistrationOptions |
| 1873 | type DocumentColorRegistrationOptions struct { |
| 1874 | TextDocumentRegistrationOptions |
| 1875 | DocumentColorOptions |
| 1876 | StaticRegistrationOptions |
| 1877 | } |
| 1878 | |
| 1879 | // Parameters of the document diagnostic request. |
| 1880 | // |
| 1881 | // @since 3.17.0 |
| 1882 | // |
| 1883 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentDiagnosticParams |
| 1884 | type DocumentDiagnosticParams struct { |
| 1885 | // The text document. |
| 1886 | TextDocument TextDocumentIdentifier `json:"textDocument"` |
| 1887 | // The additional identifier provided during registration. |
| 1888 | Identifier string `json:"identifier,omitempty"` |
| 1889 | // The result id of a previous response if provided. |
| 1890 | PreviousResultID string `json:"previousResultId,omitempty"` |
| 1891 | WorkDoneProgressParams |
| 1892 | PartialResultParams |
| 1893 | } |
| 1894 | |
| 1895 | // The result of a document diagnostic pull request. A report can |
| 1896 | // either be a full report containing all diagnostics for the |
| 1897 | // requested document or an unchanged report indicating that nothing |
| 1898 | // has changed in terms of diagnostics in comparison to the last |
| 1899 | // pull request. |
| 1900 | // |
| 1901 | // @since 3.17.0 |
| 1902 | // |
| 1903 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentDiagnosticReport |
| 1904 | type DocumentDiagnosticReport = Or_DocumentDiagnosticReport // (alias) |
| 1905 | // The document diagnostic report kinds. |
| 1906 | // |
| 1907 | // @since 3.17.0 |
| 1908 | type DocumentDiagnosticReportKind string |
| 1909 | |
| 1910 | // A partial result for a document diagnostic report. |
| 1911 | // |
| 1912 | // @since 3.17.0 |
| 1913 | // |
| 1914 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentDiagnosticReportPartialResult |
| 1915 | type DocumentDiagnosticReportPartialResult struct { |
| 1916 | RelatedDocuments map[DocumentURI]any `json:"relatedDocuments"` |
| 1917 | } |
| 1918 | |
| 1919 | // A document filter describes a top level text document or |
| 1920 | // a notebook cell document. |
| 1921 | // |
| 1922 | // @since 3.17.0 - support for NotebookCellTextDocumentFilter. |
| 1923 | // |
| 1924 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentFilter |
| 1925 | type DocumentFilter = Or_DocumentFilter // (alias) |
| 1926 | // Client capabilities of a {@link DocumentFormattingRequest}. |
| 1927 | // |
| 1928 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentFormattingClientCapabilities |
| 1929 | type DocumentFormattingClientCapabilities struct { |
| 1930 | // Whether formatting supports dynamic registration. |
| 1931 | DynamicRegistration bool `json:"dynamicRegistration,omitempty"` |
| 1932 | } |
| 1933 | |
| 1934 | // Provider options for a {@link DocumentFormattingRequest}. |
| 1935 | // |
| 1936 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentFormattingOptions |
| 1937 | type DocumentFormattingOptions struct { |
| 1938 | WorkDoneProgressOptions |
| 1939 | } |
| 1940 | |
| 1941 | // The parameters of a {@link DocumentFormattingRequest}. |
| 1942 | // |
| 1943 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentFormattingParams |
| 1944 | type DocumentFormattingParams struct { |
| 1945 | // The document to format. |
| 1946 | TextDocument TextDocumentIdentifier `json:"textDocument"` |
| 1947 | // The format options. |
| 1948 | Options FormattingOptions `json:"options"` |
| 1949 | WorkDoneProgressParams |
| 1950 | } |
| 1951 | |
| 1952 | // Registration options for a {@link DocumentFormattingRequest}. |
| 1953 | // |
| 1954 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentFormattingRegistrationOptions |
| 1955 | type DocumentFormattingRegistrationOptions struct { |
| 1956 | TextDocumentRegistrationOptions |
| 1957 | DocumentFormattingOptions |
| 1958 | } |
| 1959 | |
| 1960 | // A document highlight is a range inside a text document which deserves |
| 1961 | // special attention. Usually a document highlight is visualized by changing |
| 1962 | // the background color of its range. |
| 1963 | // |
| 1964 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentHighlight |
| 1965 | type DocumentHighlight struct { |
| 1966 | // The range this highlight applies to. |
| 1967 | Range Range `json:"range"` |
| 1968 | // The highlight kind, default is {@link DocumentHighlightKind.Text text}. |
| 1969 | Kind DocumentHighlightKind `json:"kind,omitempty"` |
| 1970 | } |
| 1971 | |
| 1972 | // Client Capabilities for a {@link DocumentHighlightRequest}. |
| 1973 | // |
| 1974 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentHighlightClientCapabilities |
| 1975 | type DocumentHighlightClientCapabilities struct { |
| 1976 | // Whether document highlight supports dynamic registration. |
| 1977 | DynamicRegistration bool `json:"dynamicRegistration,omitempty"` |
| 1978 | } |
| 1979 | |
| 1980 | // A document highlight kind. |
| 1981 | type DocumentHighlightKind uint32 |
| 1982 | |
| 1983 | // Provider options for a {@link DocumentHighlightRequest}. |
| 1984 | // |
| 1985 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentHighlightOptions |
| 1986 | type DocumentHighlightOptions struct { |
| 1987 | WorkDoneProgressOptions |
| 1988 | } |
| 1989 | |
| 1990 | // Parameters for a {@link DocumentHighlightRequest}. |
| 1991 | // |
| 1992 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentHighlightParams |
| 1993 | type DocumentHighlightParams struct { |
| 1994 | TextDocumentPositionParams |
| 1995 | WorkDoneProgressParams |
| 1996 | PartialResultParams |
| 1997 | } |
| 1998 | |
| 1999 | // Registration options for a {@link DocumentHighlightRequest}. |
| 2000 | // |
| 2001 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentHighlightRegistrationOptions |
| 2002 | type DocumentHighlightRegistrationOptions struct { |
| 2003 | TextDocumentRegistrationOptions |
| 2004 | DocumentHighlightOptions |
| 2005 | } |
| 2006 | |
| 2007 | // A document link is a range in a text document that links to an internal or external resource, like another |
| 2008 | // text document or a web site. |
| 2009 | // |
| 2010 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentLink |
| 2011 | type DocumentLink struct { |
| 2012 | // The range this link applies to. |
| 2013 | Range Range `json:"range"` |
| 2014 | // The uri this link points to. If missing a resolve request is sent later. |
| 2015 | Target *URI `json:"target,omitempty"` |
| 2016 | // The tooltip text when you hover over this link. |
| 2017 | // |
| 2018 | // If a tooltip is provided, is will be displayed in a string that includes instructions on how to |
| 2019 | // trigger the link, such as `{0} (ctrl + click)`. The specific instructions vary depending on OS, |
| 2020 | // user settings, and localization. |
| 2021 | // |
| 2022 | // @since 3.15.0 |
| 2023 | Tooltip string `json:"tooltip,omitempty"` |
| 2024 | // A data entry field that is preserved on a document link between a |
| 2025 | // DocumentLinkRequest and a DocumentLinkResolveRequest. |
| 2026 | Data any `json:"data,omitempty"` |
| 2027 | } |
| 2028 | |
| 2029 | // The client capabilities of a {@link DocumentLinkRequest}. |
| 2030 | // |
| 2031 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentLinkClientCapabilities |
| 2032 | type DocumentLinkClientCapabilities struct { |
| 2033 | // Whether document link supports dynamic registration. |
| 2034 | DynamicRegistration bool `json:"dynamicRegistration,omitempty"` |
| 2035 | // Whether the client supports the `tooltip` property on `DocumentLink`. |
| 2036 | // |
| 2037 | // @since 3.15.0 |
| 2038 | TooltipSupport bool `json:"tooltipSupport,omitempty"` |
| 2039 | } |
| 2040 | |
| 2041 | // Provider options for a {@link DocumentLinkRequest}. |
| 2042 | // |
| 2043 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentLinkOptions |
| 2044 | type DocumentLinkOptions struct { |
| 2045 | // Document links have a resolve provider as well. |
| 2046 | ResolveProvider bool `json:"resolveProvider,omitempty"` |
| 2047 | WorkDoneProgressOptions |
| 2048 | } |
| 2049 | |
| 2050 | // The parameters of a {@link DocumentLinkRequest}. |
| 2051 | // |
| 2052 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentLinkParams |
| 2053 | type DocumentLinkParams struct { |
| 2054 | // The document to provide document links for. |
| 2055 | TextDocument TextDocumentIdentifier `json:"textDocument"` |
| 2056 | WorkDoneProgressParams |
| 2057 | PartialResultParams |
| 2058 | } |
| 2059 | |
| 2060 | // Registration options for a {@link DocumentLinkRequest}. |
| 2061 | // |
| 2062 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentLinkRegistrationOptions |
| 2063 | type DocumentLinkRegistrationOptions struct { |
| 2064 | TextDocumentRegistrationOptions |
| 2065 | DocumentLinkOptions |
| 2066 | } |
| 2067 | |
| 2068 | // Client capabilities of a {@link DocumentOnTypeFormattingRequest}. |
| 2069 | // |
| 2070 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentOnTypeFormattingClientCapabilities |
| 2071 | type DocumentOnTypeFormattingClientCapabilities struct { |
| 2072 | // Whether on type formatting supports dynamic registration. |
| 2073 | DynamicRegistration bool `json:"dynamicRegistration,omitempty"` |
| 2074 | } |
| 2075 | |
| 2076 | // Provider options for a {@link DocumentOnTypeFormattingRequest}. |
| 2077 | // |
| 2078 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentOnTypeFormattingOptions |
| 2079 | type DocumentOnTypeFormattingOptions struct { |
| 2080 | // A character on which formatting should be triggered, like `{`. |
| 2081 | FirstTriggerCharacter string `json:"firstTriggerCharacter"` |
| 2082 | // More trigger characters. |
| 2083 | MoreTriggerCharacter []string `json:"moreTriggerCharacter,omitempty"` |
| 2084 | } |
| 2085 | |
| 2086 | // The parameters of a {@link DocumentOnTypeFormattingRequest}. |
| 2087 | // |
| 2088 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentOnTypeFormattingParams |
| 2089 | type DocumentOnTypeFormattingParams struct { |
| 2090 | // The document to format. |
| 2091 | TextDocument TextDocumentIdentifier `json:"textDocument"` |
| 2092 | // The position around which the on type formatting should happen. |
| 2093 | // This is not necessarily the exact position where the character denoted |
| 2094 | // by the property `ch` got typed. |
| 2095 | Position Position `json:"position"` |
| 2096 | // The character that has been typed that triggered the formatting |
| 2097 | // on type request. That is not necessarily the last character that |
| 2098 | // got inserted into the document since the client could auto insert |
| 2099 | // characters as well (e.g. like automatic brace completion). |
| 2100 | Ch string `json:"ch"` |
| 2101 | // The formatting options. |
| 2102 | Options FormattingOptions `json:"options"` |
| 2103 | } |
| 2104 | |
| 2105 | // Registration options for a {@link DocumentOnTypeFormattingRequest}. |
| 2106 | // |
| 2107 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentOnTypeFormattingRegistrationOptions |
| 2108 | type DocumentOnTypeFormattingRegistrationOptions struct { |
| 2109 | TextDocumentRegistrationOptions |
| 2110 | DocumentOnTypeFormattingOptions |
| 2111 | } |
| 2112 | |
| 2113 | // Client capabilities of a {@link DocumentRangeFormattingRequest}. |
| 2114 | // |
| 2115 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentRangeFormattingClientCapabilities |
| 2116 | type DocumentRangeFormattingClientCapabilities struct { |
| 2117 | // Whether range formatting supports dynamic registration. |
| 2118 | DynamicRegistration bool `json:"dynamicRegistration,omitempty"` |
| 2119 | // Whether the client supports formatting multiple ranges at once. |
| 2120 | // |
| 2121 | // @since 3.18.0 |
| 2122 | // @proposed |
| 2123 | RangesSupport bool `json:"rangesSupport,omitempty"` |
| 2124 | } |
| 2125 | |
| 2126 | // Provider options for a {@link DocumentRangeFormattingRequest}. |
| 2127 | // |
| 2128 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentRangeFormattingOptions |
| 2129 | type DocumentRangeFormattingOptions struct { |
| 2130 | // Whether the server supports formatting multiple ranges at once. |
| 2131 | // |
| 2132 | // @since 3.18.0 |
| 2133 | // @proposed |
| 2134 | RangesSupport bool `json:"rangesSupport,omitempty"` |
| 2135 | WorkDoneProgressOptions |
| 2136 | } |
| 2137 | |
| 2138 | // The parameters of a {@link DocumentRangeFormattingRequest}. |
| 2139 | // |
| 2140 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentRangeFormattingParams |
| 2141 | type DocumentRangeFormattingParams struct { |
| 2142 | // The document to format. |
| 2143 | TextDocument TextDocumentIdentifier `json:"textDocument"` |
| 2144 | // The range to format |
| 2145 | Range Range `json:"range"` |
| 2146 | // The format options |
| 2147 | Options FormattingOptions `json:"options"` |
| 2148 | WorkDoneProgressParams |
| 2149 | } |
| 2150 | |
| 2151 | // Registration options for a {@link DocumentRangeFormattingRequest}. |
| 2152 | // |
| 2153 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentRangeFormattingRegistrationOptions |
| 2154 | type DocumentRangeFormattingRegistrationOptions struct { |
| 2155 | TextDocumentRegistrationOptions |
| 2156 | DocumentRangeFormattingOptions |
| 2157 | } |
| 2158 | |
| 2159 | // The parameters of a {@link DocumentRangesFormattingRequest}. |
| 2160 | // |
| 2161 | // @since 3.18.0 |
| 2162 | // @proposed |
| 2163 | // |
| 2164 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentRangesFormattingParams |
| 2165 | type DocumentRangesFormattingParams struct { |
| 2166 | // The document to format. |
| 2167 | TextDocument TextDocumentIdentifier `json:"textDocument"` |
| 2168 | // The ranges to format |
| 2169 | Ranges []Range `json:"ranges"` |
| 2170 | // The format options |
| 2171 | Options FormattingOptions `json:"options"` |
| 2172 | WorkDoneProgressParams |
| 2173 | } |
| 2174 | |
| 2175 | // A document selector is the combination of one or many document filters. |
| 2176 | // |
| 2177 | // @sample `let sel:DocumentSelector = [{ language: 'typescript' }, { language: 'json', pattern: '**∕tsconfig.json' }]`; |
| 2178 | // |
| 2179 | // The use of a string as a document filter is deprecated @since 3.16.0. |
| 2180 | // |
| 2181 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentSelector |
| 2182 | type DocumentSelector = []DocumentFilter // (alias) |
| 2183 | // Represents programming constructs like variables, classes, interfaces etc. |
| 2184 | // that appear in a document. Document symbols can be hierarchical and they |
| 2185 | // have two ranges: one that encloses its definition and one that points to |
| 2186 | // its most interesting range, e.g. the range of an identifier. |
| 2187 | // |
| 2188 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentSymbol |
| 2189 | type DocumentSymbol struct { |
| 2190 | // The name of this symbol. Will be displayed in the user interface and therefore must not be |
| 2191 | // an empty string or a string only consisting of white spaces. |
| 2192 | Name string `json:"name"` |
| 2193 | // More detail for this symbol, e.g the signature of a function. |
| 2194 | Detail string `json:"detail,omitempty"` |
| 2195 | // The kind of this symbol. |
| 2196 | Kind SymbolKind `json:"kind"` |
| 2197 | // Tags for this document symbol. |
| 2198 | // |
| 2199 | // @since 3.16.0 |
| 2200 | Tags []SymbolTag `json:"tags,omitempty"` |
| 2201 | // Indicates if this symbol is deprecated. |
| 2202 | // |
| 2203 | // @deprecated Use tags instead |
| 2204 | Deprecated bool `json:"deprecated,omitempty"` |
| 2205 | // The range enclosing this symbol not including leading/trailing whitespace but everything else |
| 2206 | // like comments. This information is typically used to determine if the clients cursor is |
| 2207 | // inside the symbol to reveal in the symbol in the UI. |
| 2208 | Range Range `json:"range"` |
| 2209 | // The range that should be selected and revealed when this symbol is being picked, e.g the name of a function. |
| 2210 | // Must be contained by the `range`. |
| 2211 | SelectionRange Range `json:"selectionRange"` |
| 2212 | // Children of this symbol, e.g. properties of a class. |
| 2213 | Children []DocumentSymbol `json:"children,omitempty"` |
| 2214 | } |
| 2215 | |
| 2216 | // Client Capabilities for a {@link DocumentSymbolRequest}. |
| 2217 | // |
| 2218 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentSymbolClientCapabilities |
| 2219 | type DocumentSymbolClientCapabilities struct { |
| 2220 | // Whether document symbol supports dynamic registration. |
| 2221 | DynamicRegistration bool `json:"dynamicRegistration,omitempty"` |
| 2222 | // Specific capabilities for the `SymbolKind` in the |
| 2223 | // `textDocument/documentSymbol` request. |
| 2224 | SymbolKind *ClientSymbolKindOptions `json:"symbolKind,omitempty"` |
| 2225 | // The client supports hierarchical document symbols. |
| 2226 | HierarchicalDocumentSymbolSupport bool `json:"hierarchicalDocumentSymbolSupport,omitempty"` |
| 2227 | // The client supports tags on `SymbolInformation`. Tags are supported on |
| 2228 | // `DocumentSymbol` if `hierarchicalDocumentSymbolSupport` is set to true. |
| 2229 | // Clients supporting tags have to handle unknown tags gracefully. |
| 2230 | // |
| 2231 | // @since 3.16.0 |
| 2232 | TagSupport *ClientSymbolTagOptions `json:"tagSupport,omitempty"` |
| 2233 | // The client supports an additional label presented in the UI when |
| 2234 | // registering a document symbol provider. |
| 2235 | // |
| 2236 | // @since 3.16.0 |
| 2237 | LabelSupport bool `json:"labelSupport,omitempty"` |
| 2238 | } |
| 2239 | |
| 2240 | // Provider options for a {@link DocumentSymbolRequest}. |
| 2241 | // |
| 2242 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentSymbolOptions |
| 2243 | type DocumentSymbolOptions struct { |
| 2244 | // A human-readable string that is shown when multiple outlines trees |
| 2245 | // are shown for the same document. |
| 2246 | // |
| 2247 | // @since 3.16.0 |
| 2248 | Label string `json:"label,omitempty"` |
| 2249 | WorkDoneProgressOptions |
| 2250 | } |
| 2251 | |
| 2252 | // Parameters for a {@link DocumentSymbolRequest}. |
| 2253 | // |
| 2254 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentSymbolParams |
| 2255 | type DocumentSymbolParams struct { |
| 2256 | // The text document. |
| 2257 | TextDocument TextDocumentIdentifier `json:"textDocument"` |
| 2258 | WorkDoneProgressParams |
| 2259 | PartialResultParams |
| 2260 | } |
| 2261 | |
| 2262 | // Registration options for a {@link DocumentSymbolRequest}. |
| 2263 | // |
| 2264 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#documentSymbolRegistrationOptions |
| 2265 | type DocumentSymbolRegistrationOptions struct { |
| 2266 | TextDocumentRegistrationOptions |
| 2267 | DocumentSymbolOptions |
| 2268 | } |
| 2269 | |
| 2270 | // Edit range variant that includes ranges for insert and replace operations. |
| 2271 | // |
| 2272 | // @since 3.18.0 |
| 2273 | // |
| 2274 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#editRangeWithInsertReplace |
| 2275 | type EditRangeWithInsertReplace struct { |
| 2276 | Insert Range `json:"insert"` |
| 2277 | Replace Range `json:"replace"` |
| 2278 | } |
| 2279 | |
| 2280 | // Predefined error codes. |
| 2281 | type ErrorCodes int32 |
| 2282 | |
| 2283 | // The client capabilities of a {@link ExecuteCommandRequest}. |
| 2284 | // |
| 2285 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#executeCommandClientCapabilities |
| 2286 | type ExecuteCommandClientCapabilities struct { |
| 2287 | // Execute command supports dynamic registration. |
| 2288 | DynamicRegistration bool `json:"dynamicRegistration,omitempty"` |
| 2289 | } |
| 2290 | |
| 2291 | // The server capabilities of a {@link ExecuteCommandRequest}. |
| 2292 | // |
| 2293 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#executeCommandOptions |
| 2294 | type ExecuteCommandOptions struct { |
| 2295 | // The commands to be executed on the server |
| 2296 | Commands []string `json:"commands"` |
| 2297 | WorkDoneProgressOptions |
| 2298 | } |
| 2299 | |
| 2300 | // The parameters of a {@link ExecuteCommandRequest}. |
| 2301 | // |
| 2302 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#executeCommandParams |
| 2303 | type ExecuteCommandParams struct { |
| 2304 | // The identifier of the actual command handler. |
| 2305 | Command string `json:"command"` |
| 2306 | // Arguments that the command should be invoked with. |
| 2307 | Arguments []json.RawMessage `json:"arguments,omitempty"` |
| 2308 | |
| 2309 | // Support interactive command execution. |
| 2310 | // |
| 2311 | // Note: This is a non-standard protocol extension. See golang/go#76331. |
| 2312 | InteractiveParams |
| 2313 | WorkDoneProgressParams |
| 2314 | } |
| 2315 | |
| 2316 | // Registration options for a {@link ExecuteCommandRequest}. |
| 2317 | // |
| 2318 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#executeCommandRegistrationOptions |
| 2319 | type ExecuteCommandRegistrationOptions struct { |
| 2320 | ExecuteCommandOptions |
| 2321 | } |
| 2322 | |
| 2323 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#executionSummary |
| 2324 | type ExecutionSummary struct { |
| 2325 | // A strict monotonically increasing value |
| 2326 | // indicating the execution order of a cell |
| 2327 | // inside a notebook. |
| 2328 | ExecutionOrder uint32 `json:"executionOrder"` |
| 2329 | // Whether the execution was successful or |
| 2330 | // not if known by the client. |
| 2331 | Success bool `json:"success,omitempty"` |
| 2332 | } |
| 2333 | type FailureHandlingKind string |
| 2334 | |
| 2335 | // The file event type |
| 2336 | type FileChangeType uint32 |
| 2337 | |
| 2338 | // Represents information on a file/folder create. |
| 2339 | // |
| 2340 | // @since 3.16.0 |
| 2341 | // |
| 2342 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#fileCreate |
| 2343 | type FileCreate struct { |
| 2344 | // A file:// URI for the location of the file/folder being created. |
| 2345 | URI DocumentURI `json:"uri"` |
| 2346 | } |
| 2347 | |
| 2348 | // Represents information on a file/folder delete. |
| 2349 | // |
| 2350 | // @since 3.16.0 |
| 2351 | // |
| 2352 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#fileDelete |
| 2353 | type FileDelete struct { |
| 2354 | // A file:// URI for the location of the file/folder being deleted. |
| 2355 | URI DocumentURI `json:"uri"` |
| 2356 | } |
| 2357 | |
| 2358 | // An event describing a file change. |
| 2359 | // |
| 2360 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#fileEvent |
| 2361 | type FileEvent struct { |
| 2362 | // The file's uri. |
| 2363 | URI DocumentURI `json:"uri"` |
| 2364 | // The change type. |
| 2365 | Type FileChangeType `json:"type"` |
| 2366 | } |
| 2367 | |
| 2368 | // Capabilities relating to events from file operations by the user in the client. |
| 2369 | // |
| 2370 | // These events do not come from the file system, they come from user operations |
| 2371 | // like renaming a file in the UI. |
| 2372 | // |
| 2373 | // @since 3.16.0 |
| 2374 | // |
| 2375 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#fileOperationClientCapabilities |
| 2376 | type FileOperationClientCapabilities struct { |
| 2377 | // Whether the client supports dynamic registration for file requests/notifications. |
| 2378 | DynamicRegistration bool `json:"dynamicRegistration,omitempty"` |
| 2379 | // The client has support for sending didCreateFiles notifications. |
| 2380 | DidCreate bool `json:"didCreate,omitempty"` |
| 2381 | // The client has support for sending willCreateFiles requests. |
| 2382 | WillCreate bool `json:"willCreate,omitempty"` |
| 2383 | // The client has support for sending didRenameFiles notifications. |
| 2384 | DidRename bool `json:"didRename,omitempty"` |
| 2385 | // The client has support for sending willRenameFiles requests. |
| 2386 | WillRename bool `json:"willRename,omitempty"` |
| 2387 | // The client has support for sending didDeleteFiles notifications. |
| 2388 | DidDelete bool `json:"didDelete,omitempty"` |
| 2389 | // The client has support for sending willDeleteFiles requests. |
| 2390 | WillDelete bool `json:"willDelete,omitempty"` |
| 2391 | } |
| 2392 | |
| 2393 | // A filter to describe in which file operation requests or notifications |
| 2394 | // the server is interested in receiving. |
| 2395 | // |
| 2396 | // @since 3.16.0 |
| 2397 | // |
| 2398 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#fileOperationFilter |
| 2399 | type FileOperationFilter struct { |
| 2400 | // A Uri scheme like `file` or `untitled`. |
| 2401 | Scheme string `json:"scheme,omitempty"` |
| 2402 | // The actual file operation pattern. |
| 2403 | Pattern FileOperationPattern `json:"pattern"` |
| 2404 | } |
| 2405 | |
| 2406 | // Options for notifications/requests for user operations on files. |
| 2407 | // |
| 2408 | // @since 3.16.0 |
| 2409 | // |
| 2410 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#fileOperationOptions |
| 2411 | type FileOperationOptions struct { |
| 2412 | // The server is interested in receiving didCreateFiles notifications. |
| 2413 | DidCreate *FileOperationRegistrationOptions `json:"didCreate,omitempty"` |
| 2414 | // The server is interested in receiving willCreateFiles requests. |
| 2415 | WillCreate *FileOperationRegistrationOptions `json:"willCreate,omitempty"` |
| 2416 | // The server is interested in receiving didRenameFiles notifications. |
| 2417 | DidRename *FileOperationRegistrationOptions `json:"didRename,omitempty"` |
| 2418 | // The server is interested in receiving willRenameFiles requests. |
| 2419 | WillRename *FileOperationRegistrationOptions `json:"willRename,omitempty"` |
| 2420 | // The server is interested in receiving didDeleteFiles file notifications. |
| 2421 | DidDelete *FileOperationRegistrationOptions `json:"didDelete,omitempty"` |
| 2422 | // The server is interested in receiving willDeleteFiles file requests. |
| 2423 | WillDelete *FileOperationRegistrationOptions `json:"willDelete,omitempty"` |
| 2424 | } |
| 2425 | |
| 2426 | // A pattern to describe in which file operation requests or notifications |
| 2427 | // the server is interested in receiving. |
| 2428 | // |
| 2429 | // @since 3.16.0 |
| 2430 | // |
| 2431 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#fileOperationPattern |
| 2432 | type FileOperationPattern struct { |
| 2433 | // The glob pattern to match. Glob patterns can have the following syntax: |
| 2434 | // |
| 2435 | // - `*` to match one or more characters in a path segment |
| 2436 | // - `?` to match on one character in a path segment |
| 2437 | // - `**` to match any number of path segments, including none |
| 2438 | // - `{}` to group sub patterns into an OR expression. (e.g. `**/*.{ts,js}` matches all TypeScript and JavaScript files) |
| 2439 | // - `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …) |
| 2440 | // - `[!...]` 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`) |
| 2441 | Glob string `json:"glob"` |
| 2442 | // Whether to match files or folders with this pattern. |
| 2443 | // |
| 2444 | // Matches both if undefined. |
| 2445 | Matches *FileOperationPatternKind `json:"matches,omitempty"` |
| 2446 | // Additional options used during matching. |
| 2447 | Options *FileOperationPatternOptions `json:"options,omitempty"` |
| 2448 | } |
| 2449 | |
| 2450 | // A pattern kind describing if a glob pattern matches a file a folder or |
| 2451 | // both. |
| 2452 | // |
| 2453 | // @since 3.16.0 |
| 2454 | type FileOperationPatternKind string |
| 2455 | |
| 2456 | // Matching options for the file operation pattern. |
| 2457 | // |
| 2458 | // @since 3.16.0 |
| 2459 | // |
| 2460 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#fileOperationPatternOptions |
| 2461 | type FileOperationPatternOptions struct { |
| 2462 | // The pattern should be matched ignoring casing. |
| 2463 | IgnoreCase bool `json:"ignoreCase,omitempty"` |
| 2464 | } |
| 2465 | |
| 2466 | // The options to register for file operations. |
| 2467 | // |
| 2468 | // @since 3.16.0 |
| 2469 | // |
| 2470 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#fileOperationRegistrationOptions |
| 2471 | type FileOperationRegistrationOptions struct { |
| 2472 | // The actual filters. |
| 2473 | Filters []FileOperationFilter `json:"filters"` |
| 2474 | } |
| 2475 | |
| 2476 | // Represents information on a file/folder rename. |
| 2477 | // |
| 2478 | // @since 3.16.0 |
| 2479 | // |
| 2480 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#fileRename |
| 2481 | type FileRename struct { |
| 2482 | // A file:// URI for the original location of the file/folder being renamed. |
| 2483 | OldURI DocumentURI `json:"oldUri"` |
| 2484 | // A file:// URI for the new location of the file/folder being renamed. |
| 2485 | NewURI DocumentURI `json:"newUri"` |
| 2486 | } |
| 2487 | |
| 2488 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#fileSystemWatcher |
| 2489 | type FileSystemWatcher struct { |
| 2490 | // The glob pattern to watch. See {@link GlobPattern glob pattern} for more detail. |
| 2491 | // |
| 2492 | // @since 3.17.0 support for relative patterns. |
| 2493 | GlobPattern GlobPattern `json:"globPattern"` |
| 2494 | // The kind of events of interest. If omitted it defaults |
| 2495 | // to WatchKind.Create | WatchKind.Change | WatchKind.Delete |
| 2496 | // which is 7. |
| 2497 | Kind *WatchKind `json:"kind,omitempty"` |
| 2498 | } |
| 2499 | |
| 2500 | // Represents a folding range. To be valid, start and end line must be bigger than zero and smaller |
| 2501 | // than the number of lines in the document. Clients are free to ignore invalid ranges. |
| 2502 | // |
| 2503 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#foldingRange |
| 2504 | type FoldingRange struct { |
| 2505 | // The zero-based start line of the range to fold. The folded area starts after the line's last character. |
| 2506 | // To be valid, the end must be zero or larger and smaller than the number of lines in the document. |
| 2507 | StartLine *uint32 `json:"startLine,omitempty"` |
| 2508 | // The zero-based character offset from where the folded range starts. If not defined, defaults to the length of the start line. |
| 2509 | StartCharacter *uint32 `json:"startCharacter,omitempty"` |
| 2510 | // The zero-based end line of the range to fold. The folded area ends with the line's last character. |
| 2511 | // To be valid, the end must be zero or larger and smaller than the number of lines in the document. |
| 2512 | EndLine *uint32 `json:"endLine,omitempty"` |
| 2513 | // The zero-based character offset before the folded range ends. If not defined, defaults to the length of the end line. |
| 2514 | EndCharacter *uint32 `json:"endCharacter,omitempty"` |
| 2515 | // Describes the kind of the folding range such as 'comment' or 'region'. The kind |
| 2516 | // is used to categorize folding ranges and used by commands like 'Fold all comments'. |
| 2517 | // See {@link FoldingRangeKind} for an enumeration of standardized kinds. |
| 2518 | Kind string `json:"kind,omitempty"` |
| 2519 | // The text that the client should show when the specified range is |
| 2520 | // collapsed. If not defined or not supported by the client, a default |
| 2521 | // will be chosen by the client. |
| 2522 | // |
| 2523 | // @since 3.17.0 |
| 2524 | CollapsedText string `json:"collapsedText,omitempty"` |
| 2525 | } |
| 2526 | |
| 2527 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#foldingRangeClientCapabilities |
| 2528 | type FoldingRangeClientCapabilities struct { |
| 2529 | // Whether implementation supports dynamic registration for folding range |
| 2530 | // providers. If this is set to `true` the client supports the new |
| 2531 | // `FoldingRangeRegistrationOptions` return value for the corresponding |
| 2532 | // server capability as well. |
| 2533 | DynamicRegistration bool `json:"dynamicRegistration,omitempty"` |
| 2534 | // The maximum number of folding ranges that the client prefers to receive |
| 2535 | // per document. The value serves as a hint, servers are free to follow the |
| 2536 | // limit. |
| 2537 | RangeLimit uint32 `json:"rangeLimit"` |
| 2538 | // If set, the client signals that it only supports folding complete lines. |
| 2539 | // If set, client will ignore specified `startCharacter` and `endCharacter` |
| 2540 | // properties in a FoldingRange. |
| 2541 | LineFoldingOnly bool `json:"lineFoldingOnly,omitempty"` |
| 2542 | // Specific options for the folding range kind. |
| 2543 | // |
| 2544 | // @since 3.17.0 |
| 2545 | FoldingRangeKind *ClientFoldingRangeKindOptions `json:"foldingRangeKind,omitempty"` |
| 2546 | // Specific options for the folding range. |
| 2547 | // |
| 2548 | // @since 3.17.0 |
| 2549 | FoldingRange *ClientFoldingRangeOptions `json:"foldingRange,omitempty"` |
| 2550 | } |
| 2551 | |
| 2552 | // A set of predefined range kinds. |
| 2553 | type FoldingRangeKind string |
| 2554 | |
| 2555 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#foldingRangeOptions |
| 2556 | type FoldingRangeOptions struct { |
| 2557 | WorkDoneProgressOptions |
| 2558 | } |
| 2559 | |
| 2560 | // Parameters for a {@link FoldingRangeRequest}. |
| 2561 | // |
| 2562 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#foldingRangeParams |
| 2563 | type FoldingRangeParams struct { |
| 2564 | // The text document. |
| 2565 | TextDocument TextDocumentIdentifier `json:"textDocument"` |
| 2566 | WorkDoneProgressParams |
| 2567 | PartialResultParams |
| 2568 | } |
| 2569 | |
| 2570 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#foldingRangeRegistrationOptions |
| 2571 | type FoldingRangeRegistrationOptions struct { |
| 2572 | TextDocumentRegistrationOptions |
| 2573 | FoldingRangeOptions |
| 2574 | StaticRegistrationOptions |
| 2575 | } |
| 2576 | |
| 2577 | // Client workspace capabilities specific to folding ranges |
| 2578 | // |
| 2579 | // @since 3.18.0 |
| 2580 | // @proposed |
| 2581 | // |
| 2582 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#foldingRangeWorkspaceClientCapabilities |
| 2583 | type FoldingRangeWorkspaceClientCapabilities struct { |
| 2584 | // Whether the client implementation supports a refresh request sent from the |
| 2585 | // server to the client. |
| 2586 | // |
| 2587 | // Note that this event is global and will force the client to refresh all |
| 2588 | // folding ranges currently shown. It should be used with absolute care and is |
| 2589 | // useful for situation where a server for example detects a project wide |
| 2590 | // change that requires such a calculation. |
| 2591 | // |
| 2592 | // @since 3.18.0 |
| 2593 | // @proposed |
| 2594 | RefreshSupport bool `json:"refreshSupport,omitempty"` |
| 2595 | } |
| 2596 | |
| 2597 | // Value-object describing what options formatting should use. |
| 2598 | // |
| 2599 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#formattingOptions |
| 2600 | type FormattingOptions struct { |
| 2601 | // Size of a tab in spaces. |
| 2602 | TabSize uint32 `json:"tabSize"` |
| 2603 | // Prefer spaces over tabs. |
| 2604 | InsertSpaces bool `json:"insertSpaces"` |
| 2605 | // Trim trailing whitespace on a line. |
| 2606 | // |
| 2607 | // @since 3.15.0 |
| 2608 | TrimTrailingWhitespace bool `json:"trimTrailingWhitespace,omitempty"` |
| 2609 | // Insert a newline character at the end of the file if one does not exist. |
| 2610 | // |
| 2611 | // @since 3.15.0 |
| 2612 | InsertFinalNewline bool `json:"insertFinalNewline,omitempty"` |
| 2613 | // Trim all newlines after the final newline at the end of the file. |
| 2614 | // |
| 2615 | // @since 3.15.0 |
| 2616 | TrimFinalNewlines bool `json:"trimFinalNewlines,omitempty"` |
| 2617 | } |
| 2618 | |
| 2619 | // A diagnostic report with a full set of problems. |
| 2620 | // |
| 2621 | // @since 3.17.0 |
| 2622 | // |
| 2623 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#fullDocumentDiagnosticReport |
| 2624 | type FullDocumentDiagnosticReport struct { |
| 2625 | // A full document diagnostic report. |
| 2626 | Kind string `json:"kind"` |
| 2627 | // An optional result id. If provided it will |
| 2628 | // be sent on the next diagnostic request for the |
| 2629 | // same document. |
| 2630 | ResultID string `json:"resultId,omitempty"` |
| 2631 | // The actual items. |
| 2632 | Items []Diagnostic `json:"items"` |
| 2633 | } |
| 2634 | |
| 2635 | // General client capabilities. |
| 2636 | // |
| 2637 | // @since 3.16.0 |
| 2638 | // |
| 2639 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#generalClientCapabilities |
| 2640 | type GeneralClientCapabilities struct { |
| 2641 | // Client capability that signals how the client |
| 2642 | // handles stale requests (e.g. a request |
| 2643 | // for which the client will not process the response |
| 2644 | // anymore since the information is outdated). |
| 2645 | // |
| 2646 | // @since 3.17.0 |
| 2647 | StaleRequestSupport *StaleRequestSupportOptions `json:"staleRequestSupport,omitempty"` |
| 2648 | // Client capabilities specific to regular expressions. |
| 2649 | // |
| 2650 | // @since 3.16.0 |
| 2651 | RegularExpressions *RegularExpressionsClientCapabilities `json:"regularExpressions,omitempty"` |
| 2652 | // Client capabilities specific to the client's markdown parser. |
| 2653 | // |
| 2654 | // @since 3.16.0 |
| 2655 | Markdown *MarkdownClientCapabilities `json:"markdown,omitempty"` |
| 2656 | // The position encodings supported by the client. Client and server |
| 2657 | // have to agree on the same position encoding to ensure that offsets |
| 2658 | // (e.g. character position in a line) are interpreted the same on both |
| 2659 | // sides. |
| 2660 | // |
| 2661 | // To keep the protocol backwards compatible the following applies: if |
| 2662 | // the value 'utf-16' is missing from the array of position encodings |
| 2663 | // servers can assume that the client supports UTF-16. UTF-16 is |
| 2664 | // therefore a mandatory encoding. |
| 2665 | // |
| 2666 | // If omitted it defaults to ['utf-16']. |
| 2667 | // |
| 2668 | // Implementation considerations: since the conversion from one encoding |
| 2669 | // into another requires the content of the file / line the conversion |
| 2670 | // is best done where the file is read which is usually on the server |
| 2671 | // side. |
| 2672 | // |
| 2673 | // @since 3.17.0 |
| 2674 | PositionEncodings []PositionEncodingKind `json:"positionEncodings,omitempty"` |
| 2675 | } |
| 2676 | |
| 2677 | // The glob pattern. Either a string pattern or a relative pattern. |
| 2678 | // |
| 2679 | // @since 3.17.0 |
| 2680 | // |
| 2681 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#globPattern |
| 2682 | type GlobPattern = Or_GlobPattern // (alias) |
| 2683 | // The result of a hover request. |
| 2684 | // |
| 2685 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#hover |
| 2686 | type Hover struct { |
| 2687 | // The hover's content |
| 2688 | Contents MarkupContent `json:"contents"` |
| 2689 | // An optional range inside the text document that is used to |
| 2690 | // visualize the hover, e.g. by changing the background color. |
| 2691 | Range Range `json:"range,omitempty"` |
| 2692 | } |
| 2693 | |
| 2694 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#hoverClientCapabilities |
| 2695 | type HoverClientCapabilities struct { |
| 2696 | // Whether hover supports dynamic registration. |
| 2697 | DynamicRegistration bool `json:"dynamicRegistration,omitempty"` |
| 2698 | // Client supports the following content formats for the content |
| 2699 | // property. The order describes the preferred format of the client. |
| 2700 | ContentFormat []MarkupKind `json:"contentFormat,omitempty"` |
| 2701 | } |
| 2702 | |
| 2703 | // Hover options. |
| 2704 | // |
| 2705 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#hoverOptions |
| 2706 | type HoverOptions struct { |
| 2707 | WorkDoneProgressOptions |
| 2708 | } |
| 2709 | |
| 2710 | // Parameters for a {@link HoverRequest}. |
| 2711 | // |
| 2712 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#hoverParams |
| 2713 | type HoverParams struct { |
| 2714 | TextDocumentPositionParams |
| 2715 | WorkDoneProgressParams |
| 2716 | } |
| 2717 | |
| 2718 | // Registration options for a {@link HoverRequest}. |
| 2719 | // |
| 2720 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#hoverRegistrationOptions |
| 2721 | type HoverRegistrationOptions struct { |
| 2722 | TextDocumentRegistrationOptions |
| 2723 | HoverOptions |
| 2724 | } |
| 2725 | |
| 2726 | // @since 3.6.0 |
| 2727 | // |
| 2728 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#implementationClientCapabilities |
| 2729 | type ImplementationClientCapabilities struct { |
| 2730 | // Whether implementation supports dynamic registration. If this is set to `true` |
| 2731 | // the client supports the new `ImplementationRegistrationOptions` return value |
| 2732 | // for the corresponding server capability as well. |
| 2733 | DynamicRegistration bool `json:"dynamicRegistration,omitempty"` |
| 2734 | // The client supports additional metadata in the form of definition links. |
| 2735 | // |
| 2736 | // @since 3.14.0 |
| 2737 | LinkSupport bool `json:"linkSupport,omitempty"` |
| 2738 | } |
| 2739 | |
| 2740 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#implementationOptions |
| 2741 | type ImplementationOptions struct { |
| 2742 | WorkDoneProgressOptions |
| 2743 | } |
| 2744 | |
| 2745 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#implementationParams |
| 2746 | type ImplementationParams struct { |
| 2747 | TextDocumentPositionParams |
| 2748 | WorkDoneProgressParams |
| 2749 | PartialResultParams |
| 2750 | } |
| 2751 | |
| 2752 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#implementationRegistrationOptions |
| 2753 | type ImplementationRegistrationOptions struct { |
| 2754 | TextDocumentRegistrationOptions |
| 2755 | ImplementationOptions |
| 2756 | StaticRegistrationOptions |
| 2757 | } |
| 2758 | |
| 2759 | // The data type of the ResponseError if the |
| 2760 | // initialize request fails. |
| 2761 | // |
| 2762 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#initializeError |
| 2763 | type InitializeError struct { |
| 2764 | // Indicates whether the client execute the following retry logic: |
| 2765 | // (1) show the message provided by the ResponseError to the user |
| 2766 | // (2) user selects retry or cancel |
| 2767 | // (3) if user selected retry the initialize method is sent again. |
| 2768 | Retry bool `json:"retry"` |
| 2769 | } |
| 2770 | |
| 2771 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#initializeParams |
| 2772 | type InitializeParams struct { |
| 2773 | XInitializeParams |
| 2774 | WorkspaceFoldersInitializeParams |
| 2775 | } |
| 2776 | |
| 2777 | // The result returned from an initialize request. |
| 2778 | // |
| 2779 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#initializeResult |
| 2780 | type InitializeResult struct { |
| 2781 | // The capabilities the language server provides. |
| 2782 | Capabilities ServerCapabilities `json:"capabilities"` |
| 2783 | // Information about the server. |
| 2784 | // |
| 2785 | // @since 3.15.0 |
| 2786 | ServerInfo *ServerInfo `json:"serverInfo,omitempty"` |
| 2787 | } |
| 2788 | |
| 2789 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#initializedParams |
| 2790 | type InitializedParams struct { |
| 2791 | } |
| 2792 | |
| 2793 | // Inlay hint information. |
| 2794 | // |
| 2795 | // @since 3.17.0 |
| 2796 | // |
| 2797 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#inlayHint |
| 2798 | type InlayHint struct { |
| 2799 | // The position of this hint. |
| 2800 | // |
| 2801 | // If multiple hints have the same position, they will be shown in the order |
| 2802 | // they appear in the response. |
| 2803 | Position Position `json:"position"` |
| 2804 | // The label of this hint. A human readable string or an array of |
| 2805 | // InlayHintLabelPart label parts. |
| 2806 | // |
| 2807 | // *Note* that neither the string nor the label part can be empty. |
| 2808 | Label []InlayHintLabelPart `json:"label"` |
| 2809 | // The kind of this hint. Can be omitted in which case the client |
| 2810 | // should fall back to a reasonable default. |
| 2811 | Kind InlayHintKind `json:"kind,omitempty"` |
| 2812 | // Optional text edits that are performed when accepting this inlay hint. |
| 2813 | // |
| 2814 | // *Note* that edits are expected to change the document so that the inlay |
| 2815 | // hint (or its nearest variant) is now part of the document and the inlay |
| 2816 | // hint itself is now obsolete. |
| 2817 | TextEdits []TextEdit `json:"textEdits,omitempty"` |
| 2818 | // The tooltip text when you hover over this item. |
| 2819 | Tooltip *OrPTooltip_textDocument_inlayHint `json:"tooltip,omitempty"` |
| 2820 | // Render padding before the hint. |
| 2821 | // |
| 2822 | // Note: Padding should use the editor's background color, not the |
| 2823 | // background color of the hint itself. That means padding can be used |
| 2824 | // to visually align/separate an inlay hint. |
| 2825 | PaddingLeft bool `json:"paddingLeft,omitempty"` |
| 2826 | // Render padding after the hint. |
| 2827 | // |
| 2828 | // Note: Padding should use the editor's background color, not the |
| 2829 | // background color of the hint itself. That means padding can be used |
| 2830 | // to visually align/separate an inlay hint. |
| 2831 | PaddingRight bool `json:"paddingRight,omitempty"` |
| 2832 | // A data entry field that is preserved on an inlay hint between |
| 2833 | // a `textDocument/inlayHint` and a `inlayHint/resolve` request. |
| 2834 | Data any `json:"data,omitempty"` |
| 2835 | } |
| 2836 | |
| 2837 | // Inlay hint client capabilities. |
| 2838 | // |
| 2839 | // @since 3.17.0 |
| 2840 | // |
| 2841 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#inlayHintClientCapabilities |
| 2842 | type InlayHintClientCapabilities struct { |
| 2843 | // Whether inlay hints support dynamic registration. |
| 2844 | DynamicRegistration bool `json:"dynamicRegistration,omitempty"` |
| 2845 | // Indicates which properties a client can resolve lazily on an inlay |
| 2846 | // hint. |
| 2847 | ResolveSupport *ClientInlayHintResolveOptions `json:"resolveSupport,omitempty"` |
| 2848 | } |
| 2849 | |
| 2850 | // Inlay hint kinds. |
| 2851 | // |
| 2852 | // @since 3.17.0 |
| 2853 | type InlayHintKind uint32 |
| 2854 | |
| 2855 | // An inlay hint label part allows for interactive and composite labels |
| 2856 | // of inlay hints. |
| 2857 | // |
| 2858 | // @since 3.17.0 |
| 2859 | // |
| 2860 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#inlayHintLabelPart |
| 2861 | type InlayHintLabelPart struct { |
| 2862 | // The value of this label part. |
| 2863 | Value string `json:"value"` |
| 2864 | // The tooltip text when you hover over this label part. Depending on |
| 2865 | // the client capability `inlayHint.resolveSupport` clients might resolve |
| 2866 | // this property late using the resolve request. |
| 2867 | Tooltip *OrPTooltipPLabel `json:"tooltip,omitempty"` |
| 2868 | // An optional source code location that represents this |
| 2869 | // label part. |
| 2870 | // |
| 2871 | // The editor will use this location for the hover and for code navigation |
| 2872 | // features: This part will become a clickable link that resolves to the |
| 2873 | // definition of the symbol at the given location (not necessarily the |
| 2874 | // location itself), it shows the hover that shows at the given location, |
| 2875 | // and it shows a context menu with further code navigation commands. |
| 2876 | // |
| 2877 | // Depending on the client capability `inlayHint.resolveSupport` clients |
| 2878 | // might resolve this property late using the resolve request. |
| 2879 | Location *Location `json:"location,omitempty"` |
| 2880 | // An optional command for this label part. |
| 2881 | // |
| 2882 | // Depending on the client capability `inlayHint.resolveSupport` clients |
| 2883 | // might resolve this property late using the resolve request. |
| 2884 | Command *Command `json:"command,omitempty"` |
| 2885 | } |
| 2886 | |
| 2887 | // Inlay hint options used during static registration. |
| 2888 | // |
| 2889 | // @since 3.17.0 |
| 2890 | // |
| 2891 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#inlayHintOptions |
| 2892 | type InlayHintOptions struct { |
| 2893 | // The server provides support to resolve additional |
| 2894 | // information for an inlay hint item. |
| 2895 | ResolveProvider bool `json:"resolveProvider,omitempty"` |
| 2896 | WorkDoneProgressOptions |
| 2897 | } |
| 2898 | |
| 2899 | // A parameter literal used in inlay hint requests. |
| 2900 | // |
| 2901 | // @since 3.17.0 |
| 2902 | // |
| 2903 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#inlayHintParams |
| 2904 | type InlayHintParams struct { |
| 2905 | // The text document. |
| 2906 | TextDocument TextDocumentIdentifier `json:"textDocument"` |
| 2907 | // The document range for which inlay hints should be computed. |
| 2908 | Range Range `json:"range"` |
| 2909 | WorkDoneProgressParams |
| 2910 | } |
| 2911 | |
| 2912 | // Inlay hint options used during static or dynamic registration. |
| 2913 | // |
| 2914 | // @since 3.17.0 |
| 2915 | // |
| 2916 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#inlayHintRegistrationOptions |
| 2917 | type InlayHintRegistrationOptions struct { |
| 2918 | InlayHintOptions |
| 2919 | TextDocumentRegistrationOptions |
| 2920 | StaticRegistrationOptions |
| 2921 | } |
| 2922 | |
| 2923 | // Client workspace capabilities specific to inlay hints. |
| 2924 | // |
| 2925 | // @since 3.17.0 |
| 2926 | // |
| 2927 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#inlayHintWorkspaceClientCapabilities |
| 2928 | type InlayHintWorkspaceClientCapabilities struct { |
| 2929 | // Whether the client implementation supports a refresh request sent from |
| 2930 | // the server to the client. |
| 2931 | // |
| 2932 | // Note that this event is global and will force the client to refresh all |
| 2933 | // inlay hints currently shown. It should be used with absolute care and |
| 2934 | // is useful for situation where a server for example detects a project wide |
| 2935 | // change that requires such a calculation. |
| 2936 | RefreshSupport bool `json:"refreshSupport,omitempty"` |
| 2937 | } |
| 2938 | |
| 2939 | // Client capabilities specific to inline completions. |
| 2940 | // |
| 2941 | // @since 3.18.0 |
| 2942 | // @proposed |
| 2943 | // |
| 2944 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#inlineCompletionClientCapabilities |
| 2945 | type InlineCompletionClientCapabilities struct { |
| 2946 | // Whether implementation supports dynamic registration for inline completion providers. |
| 2947 | DynamicRegistration bool `json:"dynamicRegistration,omitempty"` |
| 2948 | } |
| 2949 | |
| 2950 | // Provides information about the context in which an inline completion was requested. |
| 2951 | // |
| 2952 | // @since 3.18.0 |
| 2953 | // @proposed |
| 2954 | // |
| 2955 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#inlineCompletionContext |
| 2956 | type InlineCompletionContext struct { |
| 2957 | // Describes how the inline completion was triggered. |
| 2958 | TriggerKind InlineCompletionTriggerKind `json:"triggerKind"` |
| 2959 | // Provides information about the currently selected item in the autocomplete widget if it is visible. |
| 2960 | SelectedCompletionInfo *SelectedCompletionInfo `json:"selectedCompletionInfo,omitempty"` |
| 2961 | } |
| 2962 | |
| 2963 | // An inline completion item represents a text snippet that is proposed inline to complete text that is being typed. |
| 2964 | // |
| 2965 | // @since 3.18.0 |
| 2966 | // @proposed |
| 2967 | // |
| 2968 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#inlineCompletionItem |
| 2969 | type InlineCompletionItem struct { |
| 2970 | // The text to replace the range with. Must be set. |
| 2971 | InsertText Or_InlineCompletionItem_insertText `json:"insertText"` |
| 2972 | // A text that is used to decide if this inline completion should be shown. When `falsy` the {@link InlineCompletionItem.insertText} is used. |
| 2973 | FilterText string `json:"filterText,omitempty"` |
| 2974 | // The range to replace. Must begin and end on the same line. |
| 2975 | Range *Range `json:"range,omitempty"` |
| 2976 | // An optional {@link Command} that is executed *after* inserting this completion. |
| 2977 | Command *Command `json:"command,omitempty"` |
| 2978 | } |
| 2979 | |
| 2980 | // Represents a collection of {@link InlineCompletionItem inline completion items} to be presented in the editor. |
| 2981 | // |
| 2982 | // @since 3.18.0 |
| 2983 | // @proposed |
| 2984 | // |
| 2985 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#inlineCompletionList |
| 2986 | type InlineCompletionList struct { |
| 2987 | // The inline completion items |
| 2988 | Items []InlineCompletionItem `json:"items"` |
| 2989 | } |
| 2990 | |
| 2991 | // Inline completion options used during static registration. |
| 2992 | // |
| 2993 | // @since 3.18.0 |
| 2994 | // @proposed |
| 2995 | // |
| 2996 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#inlineCompletionOptions |
| 2997 | type InlineCompletionOptions struct { |
| 2998 | WorkDoneProgressOptions |
| 2999 | } |
| 3000 | |
| 3001 | // A parameter literal used in inline completion requests. |
| 3002 | // |
| 3003 | // @since 3.18.0 |
| 3004 | // @proposed |
| 3005 | // |
| 3006 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#inlineCompletionParams |
| 3007 | type InlineCompletionParams struct { |
| 3008 | // Additional information about the context in which inline completions were |
| 3009 | // requested. |
| 3010 | Context InlineCompletionContext `json:"context"` |
| 3011 | TextDocumentPositionParams |
| 3012 | WorkDoneProgressParams |
| 3013 | } |
| 3014 | |
| 3015 | // Inline completion options used during static or dynamic registration. |
| 3016 | // |
| 3017 | // @since 3.18.0 |
| 3018 | // @proposed |
| 3019 | // |
| 3020 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#inlineCompletionRegistrationOptions |
| 3021 | type InlineCompletionRegistrationOptions struct { |
| 3022 | InlineCompletionOptions |
| 3023 | TextDocumentRegistrationOptions |
| 3024 | StaticRegistrationOptions |
| 3025 | } |
| 3026 | |
| 3027 | // Describes how an {@link InlineCompletionItemProvider inline completion provider} was triggered. |
| 3028 | // |
| 3029 | // @since 3.18.0 |
| 3030 | // @proposed |
| 3031 | type InlineCompletionTriggerKind uint32 |
| 3032 | |
| 3033 | // Inline value information can be provided by different means: |
| 3034 | // |
| 3035 | // - directly as a text value (class InlineValueText). |
| 3036 | // - as a name to use for a variable lookup (class InlineValueVariableLookup) |
| 3037 | // - as an evaluatable expression (class InlineValueEvaluatableExpression) |
| 3038 | // |
| 3039 | // The InlineValue types combines all inline value types into one type. |
| 3040 | // |
| 3041 | // @since 3.17.0 |
| 3042 | // |
| 3043 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#inlineValue |
| 3044 | type InlineValue = Or_InlineValue // (alias) |
| 3045 | // Client capabilities specific to inline values. |
| 3046 | // |
| 3047 | // @since 3.17.0 |
| 3048 | // |
| 3049 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#inlineValueClientCapabilities |
| 3050 | type InlineValueClientCapabilities struct { |
| 3051 | // Whether implementation supports dynamic registration for inline value providers. |
| 3052 | DynamicRegistration bool `json:"dynamicRegistration,omitempty"` |
| 3053 | } |
| 3054 | |
| 3055 | // @since 3.17.0 |
| 3056 | // |
| 3057 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#inlineValueContext |
| 3058 | type InlineValueContext struct { |
| 3059 | // The stack frame (as a DAP Id) where the execution has stopped. |
| 3060 | FrameID int32 `json:"frameId"` |
| 3061 | // The document range where execution has stopped. |
| 3062 | // Typically the end position of the range denotes the line where the inline values are shown. |
| 3063 | StoppedLocation Range `json:"stoppedLocation"` |
| 3064 | } |
| 3065 | |
| 3066 | // Provide an inline value through an expression evaluation. |
| 3067 | // If only a range is specified, the expression will be extracted from the underlying document. |
| 3068 | // An optional expression can be used to override the extracted expression. |
| 3069 | // |
| 3070 | // @since 3.17.0 |
| 3071 | // |
| 3072 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#inlineValueEvaluatableExpression |
| 3073 | type InlineValueEvaluatableExpression struct { |
| 3074 | // The document range for which the inline value applies. |
| 3075 | // The range is used to extract the evaluatable expression from the underlying document. |
| 3076 | Range Range `json:"range"` |
| 3077 | // If specified the expression overrides the extracted expression. |
| 3078 | Expression string `json:"expression,omitempty"` |
| 3079 | } |
| 3080 | |
| 3081 | // Inline value options used during static registration. |
| 3082 | // |
| 3083 | // @since 3.17.0 |
| 3084 | // |
| 3085 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#inlineValueOptions |
| 3086 | type InlineValueOptions struct { |
| 3087 | WorkDoneProgressOptions |
| 3088 | } |
| 3089 | |
| 3090 | // A parameter literal used in inline value requests. |
| 3091 | // |
| 3092 | // @since 3.17.0 |
| 3093 | // |
| 3094 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#inlineValueParams |
| 3095 | type InlineValueParams struct { |
| 3096 | // The text document. |
| 3097 | TextDocument TextDocumentIdentifier `json:"textDocument"` |
| 3098 | // The document range for which inline values should be computed. |
| 3099 | Range Range `json:"range"` |
| 3100 | // Additional information about the context in which inline values were |
| 3101 | // requested. |
| 3102 | Context InlineValueContext `json:"context"` |
| 3103 | WorkDoneProgressParams |
| 3104 | } |
| 3105 | |
| 3106 | // Inline value options used during static or dynamic registration. |
| 3107 | // |
| 3108 | // @since 3.17.0 |
| 3109 | // |
| 3110 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#inlineValueRegistrationOptions |
| 3111 | type InlineValueRegistrationOptions struct { |
| 3112 | InlineValueOptions |
| 3113 | TextDocumentRegistrationOptions |
| 3114 | StaticRegistrationOptions |
| 3115 | } |
| 3116 | |
| 3117 | // Provide inline value as text. |
| 3118 | // |
| 3119 | // @since 3.17.0 |
| 3120 | // |
| 3121 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#inlineValueText |
| 3122 | type InlineValueText struct { |
| 3123 | // The document range for which the inline value applies. |
| 3124 | Range Range `json:"range"` |
| 3125 | // The text of the inline value. |
| 3126 | Text string `json:"text"` |
| 3127 | } |
| 3128 | |
| 3129 | // Provide inline value through a variable lookup. |
| 3130 | // If only a range is specified, the variable name will be extracted from the underlying document. |
| 3131 | // An optional variable name can be used to override the extracted name. |
| 3132 | // |
| 3133 | // @since 3.17.0 |
| 3134 | // |
| 3135 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#inlineValueVariableLookup |
| 3136 | type InlineValueVariableLookup struct { |
| 3137 | // The document range for which the inline value applies. |
| 3138 | // The range is used to extract the variable name from the underlying document. |
| 3139 | Range Range `json:"range"` |
| 3140 | // If specified the name of the variable to look up. |
| 3141 | VariableName string `json:"variableName,omitempty"` |
| 3142 | // How to perform the lookup. |
| 3143 | CaseSensitiveLookup bool `json:"caseSensitiveLookup"` |
| 3144 | } |
| 3145 | |
| 3146 | // Client workspace capabilities specific to inline values. |
| 3147 | // |
| 3148 | // @since 3.17.0 |
| 3149 | // |
| 3150 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#inlineValueWorkspaceClientCapabilities |
| 3151 | type InlineValueWorkspaceClientCapabilities struct { |
| 3152 | // Whether the client implementation supports a refresh request sent from the |
| 3153 | // server to the client. |
| 3154 | // |
| 3155 | // Note that this event is global and will force the client to refresh all |
| 3156 | // inline values currently shown. It should be used with absolute care and is |
| 3157 | // useful for situation where a server for example detects a project wide |
| 3158 | // change that requires such a calculation. |
| 3159 | RefreshSupport bool `json:"refreshSupport,omitempty"` |
| 3160 | } |
| 3161 | |
| 3162 | // A special text edit to provide an insert and a replace operation. |
| 3163 | // |
| 3164 | // @since 3.16.0 |
| 3165 | // |
| 3166 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#insertReplaceEdit |
| 3167 | type InsertReplaceEdit struct { |
| 3168 | // The string to be inserted. |
| 3169 | NewText string `json:"newText"` |
| 3170 | // The range if the insert is requested |
| 3171 | Insert Range `json:"insert"` |
| 3172 | // The range if the replace is requested. |
| 3173 | Replace Range `json:"replace"` |
| 3174 | } |
| 3175 | |
| 3176 | // Defines whether the insert text in a completion item should be interpreted as |
| 3177 | // plain text or a snippet. |
| 3178 | type InsertTextFormat uint32 |
| 3179 | |
| 3180 | // How whitespace and indentation is handled during completion |
| 3181 | // item insertion. |
| 3182 | // |
| 3183 | // @since 3.16.0 |
| 3184 | type InsertTextMode uint32 |
| 3185 | type LSPAny = any |
| 3186 | |
| 3187 | // LSP arrays. |
| 3188 | // @since 3.17.0 |
| 3189 | // |
| 3190 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#lSPArray |
| 3191 | type LSPArray = []any // (alias) |
| 3192 | type LSPErrorCodes int32 |
| 3193 | |
| 3194 | // LSP object definition. |
| 3195 | // @since 3.17.0 |
| 3196 | // |
| 3197 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#lSPObject |
| 3198 | type LSPObject = map[string]LSPAny // (alias) |
| 3199 | // Predefined Language kinds |
| 3200 | // @since 3.18.0 |
| 3201 | type LanguageKind string |
| 3202 | |
| 3203 | // Client capabilities for the linked editing range request. |
| 3204 | // |
| 3205 | // @since 3.16.0 |
| 3206 | // |
| 3207 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#linkedEditingRangeClientCapabilities |
| 3208 | type LinkedEditingRangeClientCapabilities struct { |
| 3209 | // Whether implementation supports dynamic registration. If this is set to `true` |
| 3210 | // the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` |
| 3211 | // return value for the corresponding server capability as well. |
| 3212 | DynamicRegistration bool `json:"dynamicRegistration,omitempty"` |
| 3213 | } |
| 3214 | |
| 3215 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#linkedEditingRangeOptions |
| 3216 | type LinkedEditingRangeOptions struct { |
| 3217 | WorkDoneProgressOptions |
| 3218 | } |
| 3219 | |
| 3220 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#linkedEditingRangeParams |
| 3221 | type LinkedEditingRangeParams struct { |
| 3222 | TextDocumentPositionParams |
| 3223 | WorkDoneProgressParams |
| 3224 | } |
| 3225 | |
| 3226 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#linkedEditingRangeRegistrationOptions |
| 3227 | type LinkedEditingRangeRegistrationOptions struct { |
| 3228 | TextDocumentRegistrationOptions |
| 3229 | LinkedEditingRangeOptions |
| 3230 | StaticRegistrationOptions |
| 3231 | } |
| 3232 | |
| 3233 | // The result of a linked editing range request. |
| 3234 | // |
| 3235 | // @since 3.16.0 |
| 3236 | // |
| 3237 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#linkedEditingRanges |
| 3238 | type LinkedEditingRanges struct { |
| 3239 | // A list of ranges that can be edited together. The ranges must have |
| 3240 | // identical length and contain identical text content. The ranges cannot overlap. |
| 3241 | Ranges []Range `json:"ranges"` |
| 3242 | // An optional word pattern (regular expression) that describes valid contents for |
| 3243 | // the given ranges. If no pattern is provided, the client configuration's word |
| 3244 | // pattern will be used. |
| 3245 | WordPattern string `json:"wordPattern,omitempty"` |
| 3246 | } |
| 3247 | |
| 3248 | // created for Literal (Lit_ClientSemanticTokensRequestOptions_range_Item1) |
| 3249 | type Lit_ClientSemanticTokensRequestOptions_range_Item1 struct { |
| 3250 | } |
| 3251 | |
| 3252 | // Represents a location inside a resource, such as a line |
| 3253 | // inside a text file. |
| 3254 | // |
| 3255 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#location |
| 3256 | type Location struct { |
| 3257 | URI DocumentURI `json:"uri"` |
| 3258 | Range Range `json:"range"` |
| 3259 | } |
| 3260 | |
| 3261 | // Represents the connection of two locations. Provides additional metadata over normal {@link Location locations}, |
| 3262 | // including an origin range. |
| 3263 | // |
| 3264 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#locationLink |
| 3265 | type LocationLink struct { |
| 3266 | // Span of the origin of this link. |
| 3267 | // |
| 3268 | // Used as the underlined span for mouse interaction. Defaults to the word range at |
| 3269 | // the definition position. |
| 3270 | OriginSelectionRange *Range `json:"originSelectionRange,omitempty"` |
| 3271 | // The target resource identifier of this link. |
| 3272 | TargetURI DocumentURI `json:"targetUri"` |
| 3273 | // The full target range of this link. If the target for example is a symbol then target range is the |
| 3274 | // range enclosing this symbol not including leading/trailing whitespace but everything else |
| 3275 | // like comments. This information is typically used to highlight the range in the editor. |
| 3276 | TargetRange Range `json:"targetRange"` |
| 3277 | // The range that should be selected and revealed when this link is being followed, e.g the name of a function. |
| 3278 | // Must be contained by the `targetRange`. See also `DocumentSymbol#range` |
| 3279 | TargetSelectionRange Range `json:"targetSelectionRange"` |
| 3280 | } |
| 3281 | |
| 3282 | // Location with only uri and does not include range. |
| 3283 | // |
| 3284 | // @since 3.18.0 |
| 3285 | // |
| 3286 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#locationUriOnly |
| 3287 | type LocationUriOnly struct { |
| 3288 | URI DocumentURI `json:"uri"` |
| 3289 | } |
| 3290 | |
| 3291 | // The log message parameters. |
| 3292 | // |
| 3293 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#logMessageParams |
| 3294 | type LogMessageParams struct { |
| 3295 | // The message type. See {@link MessageType} |
| 3296 | Type MessageType `json:"type"` |
| 3297 | // The actual message. |
| 3298 | Message string `json:"message"` |
| 3299 | } |
| 3300 | |
| 3301 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#logTraceParams |
| 3302 | type LogTraceParams struct { |
| 3303 | Message string `json:"message"` |
| 3304 | Verbose string `json:"verbose,omitempty"` |
| 3305 | } |
| 3306 | |
| 3307 | // Client capabilities specific to the used markdown parser. |
| 3308 | // |
| 3309 | // @since 3.16.0 |
| 3310 | // |
| 3311 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#markdownClientCapabilities |
| 3312 | type MarkdownClientCapabilities struct { |
| 3313 | // The name of the parser. |
| 3314 | Parser string `json:"parser"` |
| 3315 | // The version of the parser. |
| 3316 | Version string `json:"version,omitempty"` |
| 3317 | // A list of HTML tags that the client allows / supports in |
| 3318 | // Markdown. |
| 3319 | // |
| 3320 | // @since 3.17.0 |
| 3321 | AllowedTags []string `json:"allowedTags,omitempty"` |
| 3322 | } |
| 3323 | |
| 3324 | // MarkedString can be used to render human readable text. It is either a markdown string |
| 3325 | // or a code-block that provides a language and a code snippet. The language identifier |
| 3326 | // is semantically equal to the optional language identifier in fenced code blocks in GitHub |
| 3327 | // issues. See https://help.github.com/articles/creating-and-highlighting-code-blocks/#syntax-highlighting |
| 3328 | // |
| 3329 | // The pair of a language and a value is an equivalent to markdown: |
| 3330 | // ```${language} |
| 3331 | // ${value} |
| 3332 | // ``` |
| 3333 | // |
| 3334 | // Note that markdown strings will be sanitized - that means html will be escaped. |
| 3335 | // @deprecated use MarkupContent instead. |
| 3336 | // |
| 3337 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#markedString |
| 3338 | type MarkedString = Or_MarkedString // (alias) |
| 3339 | // @since 3.18.0 |
| 3340 | // @deprecated use MarkupContent instead. |
| 3341 | // |
| 3342 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#markedStringWithLanguage |
| 3343 | type MarkedStringWithLanguage struct { |
| 3344 | Language string `json:"language"` |
| 3345 | Value string `json:"value"` |
| 3346 | } |
| 3347 | |
| 3348 | // A `MarkupContent` literal represents a string value which content is interpreted base on its |
| 3349 | // kind flag. Currently the protocol supports `plaintext` and `markdown` as markup kinds. |
| 3350 | // |
| 3351 | // If the kind is `markdown` then the value can contain fenced code blocks like in GitHub issues. |
| 3352 | // See https://help.github.com/articles/creating-and-highlighting-code-blocks/#syntax-highlighting |
| 3353 | // |
| 3354 | // Here is an example how such a string can be constructed using JavaScript / TypeScript: |
| 3355 | // ```ts |
| 3356 | // |
| 3357 | // let markdown: MarkdownContent = { |
| 3358 | // kind: MarkupKind.Markdown, |
| 3359 | // value: [ |
| 3360 | // '# Header', |
| 3361 | // 'Some text', |
| 3362 | // '```typescript', |
| 3363 | // 'someCode();', |
| 3364 | // '```' |
| 3365 | // ].join('\n') |
| 3366 | // }; |
| 3367 | // |
| 3368 | // ``` |
| 3369 | // |
| 3370 | // *Please Note* that clients might sanitize the return markdown. A client could decide to |
| 3371 | // remove HTML from the markdown to avoid script execution. |
| 3372 | // |
| 3373 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#markupContent |
| 3374 | type MarkupContent struct { |
| 3375 | // The type of the Markup |
| 3376 | Kind MarkupKind `json:"kind"` |
| 3377 | // The content itself |
| 3378 | Value string `json:"value"` |
| 3379 | } |
| 3380 | |
| 3381 | // Describes the content type that a client supports in various |
| 3382 | // result literals like `Hover`, `ParameterInfo` or `CompletionItem`. |
| 3383 | // |
| 3384 | // Please note that `MarkupKinds` must not start with a `$`. This kinds |
| 3385 | // are reserved for internal usage. |
| 3386 | type MarkupKind string |
| 3387 | |
| 3388 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#messageActionItem |
| 3389 | type MessageActionItem struct { |
| 3390 | // A short title like 'Retry', 'Open Log' etc. |
| 3391 | Title string `json:"title"` |
| 3392 | } |
| 3393 | |
| 3394 | // The message type |
| 3395 | type MessageType uint32 |
| 3396 | |
| 3397 | // Moniker definition to match LSIF 0.5 moniker definition. |
| 3398 | // |
| 3399 | // @since 3.16.0 |
| 3400 | // |
| 3401 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#moniker |
| 3402 | type Moniker struct { |
| 3403 | // The scheme of the moniker. For example tsc or .Net |
| 3404 | Scheme string `json:"scheme"` |
| 3405 | // The identifier of the moniker. The value is opaque in LSIF however |
| 3406 | // schema owners are allowed to define the structure if they want. |
| 3407 | Identifier string `json:"identifier"` |
| 3408 | // The scope in which the moniker is unique |
| 3409 | Unique UniquenessLevel `json:"unique"` |
| 3410 | // The moniker kind if known. |
| 3411 | Kind *MonikerKind `json:"kind,omitempty"` |
| 3412 | } |
| 3413 | |
| 3414 | // Client capabilities specific to the moniker request. |
| 3415 | // |
| 3416 | // @since 3.16.0 |
| 3417 | // |
| 3418 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#monikerClientCapabilities |
| 3419 | type MonikerClientCapabilities struct { |
| 3420 | // Whether moniker supports dynamic registration. If this is set to `true` |
| 3421 | // the client supports the new `MonikerRegistrationOptions` return value |
| 3422 | // for the corresponding server capability as well. |
| 3423 | DynamicRegistration bool `json:"dynamicRegistration,omitempty"` |
| 3424 | } |
| 3425 | |
| 3426 | // The moniker kind. |
| 3427 | // |
| 3428 | // @since 3.16.0 |
| 3429 | type MonikerKind string |
| 3430 | |
| 3431 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#monikerOptions |
| 3432 | type MonikerOptions struct { |
| 3433 | WorkDoneProgressOptions |
| 3434 | } |
| 3435 | |
| 3436 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#monikerParams |
| 3437 | type MonikerParams struct { |
| 3438 | TextDocumentPositionParams |
| 3439 | WorkDoneProgressParams |
| 3440 | PartialResultParams |
| 3441 | } |
| 3442 | |
| 3443 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#monikerRegistrationOptions |
| 3444 | type MonikerRegistrationOptions struct { |
| 3445 | TextDocumentRegistrationOptions |
| 3446 | MonikerOptions |
| 3447 | } |
| 3448 | |
| 3449 | // A notebook cell. |
| 3450 | // |
| 3451 | // A cell's document URI must be unique across ALL notebook |
| 3452 | // cells and can therefore be used to uniquely identify a |
| 3453 | // notebook cell or the cell's text document. |
| 3454 | // |
| 3455 | // @since 3.17.0 |
| 3456 | // |
| 3457 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#notebookCell |
| 3458 | type NotebookCell struct { |
| 3459 | // The cell's kind |
| 3460 | Kind NotebookCellKind `json:"kind"` |
| 3461 | // The URI of the cell's text document |
| 3462 | // content. |
| 3463 | Document DocumentURI `json:"document"` |
| 3464 | // Additional metadata stored with the cell. |
| 3465 | // |
| 3466 | // Note: should always be an object literal (e.g. LSPObject) |
| 3467 | Metadata *LSPObject `json:"metadata,omitempty"` |
| 3468 | // Additional execution summary information |
| 3469 | // if supported by the client. |
| 3470 | ExecutionSummary *ExecutionSummary `json:"executionSummary,omitempty"` |
| 3471 | } |
| 3472 | |
| 3473 | // A change describing how to move a `NotebookCell` |
| 3474 | // array from state S to S'. |
| 3475 | // |
| 3476 | // @since 3.17.0 |
| 3477 | // |
| 3478 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#notebookCellArrayChange |
| 3479 | type NotebookCellArrayChange struct { |
| 3480 | // The start oftest of the cell that changed. |
| 3481 | Start uint32 `json:"start"` |
| 3482 | // The deleted cells |
| 3483 | DeleteCount uint32 `json:"deleteCount"` |
| 3484 | // The new cells, if any |
| 3485 | Cells []NotebookCell `json:"cells,omitempty"` |
| 3486 | } |
| 3487 | |
| 3488 | // A notebook cell kind. |
| 3489 | // |
| 3490 | // @since 3.17.0 |
| 3491 | type NotebookCellKind uint32 |
| 3492 | |
| 3493 | // @since 3.18.0 |
| 3494 | // |
| 3495 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#notebookCellLanguage |
| 3496 | type NotebookCellLanguage struct { |
| 3497 | Language string `json:"language"` |
| 3498 | } |
| 3499 | |
| 3500 | // A notebook cell text document filter denotes a cell text |
| 3501 | // document by different properties. |
| 3502 | // |
| 3503 | // @since 3.17.0 |
| 3504 | // |
| 3505 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#notebookCellTextDocumentFilter |
| 3506 | type NotebookCellTextDocumentFilter struct { |
| 3507 | // A filter that matches against the notebook |
| 3508 | // containing the notebook cell. If a string |
| 3509 | // value is provided it matches against the |
| 3510 | // notebook type. '*' matches every notebook. |
| 3511 | Notebook Or_NotebookCellTextDocumentFilter_notebook `json:"notebook"` |
| 3512 | // A language id like `python`. |
| 3513 | // |
| 3514 | // Will be matched against the language id of the |
| 3515 | // notebook cell document. '*' matches every language. |
| 3516 | Language string `json:"language,omitempty"` |
| 3517 | } |
| 3518 | |
| 3519 | // A notebook document. |
| 3520 | // |
| 3521 | // @since 3.17.0 |
| 3522 | // |
| 3523 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#notebookDocument |
| 3524 | type NotebookDocument struct { |
| 3525 | // The notebook document's uri. |
| 3526 | URI URI `json:"uri"` |
| 3527 | // The type of the notebook. |
| 3528 | NotebookType string `json:"notebookType"` |
| 3529 | // The version number of this document (it will increase after each |
| 3530 | // change, including undo/redo). |
| 3531 | Version int32 `json:"version"` |
| 3532 | // Additional metadata stored with the notebook |
| 3533 | // document. |
| 3534 | // |
| 3535 | // Note: should always be an object literal (e.g. LSPObject) |
| 3536 | Metadata *LSPObject `json:"metadata,omitempty"` |
| 3537 | // The cells of a notebook. |
| 3538 | Cells []NotebookCell `json:"cells"` |
| 3539 | } |
| 3540 | |
| 3541 | // Structural changes to cells in a notebook document. |
| 3542 | // |
| 3543 | // @since 3.18.0 |
| 3544 | // |
| 3545 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#notebookDocumentCellChangeStructure |
| 3546 | type NotebookDocumentCellChangeStructure struct { |
| 3547 | // The change to the cell array. |
| 3548 | Array NotebookCellArrayChange `json:"array"` |
| 3549 | // Additional opened cell text documents. |
| 3550 | DidOpen []TextDocumentItem `json:"didOpen,omitempty"` |
| 3551 | // Additional closed cell text documents. |
| 3552 | DidClose []TextDocumentIdentifier `json:"didClose,omitempty"` |
| 3553 | } |
| 3554 | |
| 3555 | // Cell changes to a notebook document. |
| 3556 | // |
| 3557 | // @since 3.18.0 |
| 3558 | // |
| 3559 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#notebookDocumentCellChanges |
| 3560 | type NotebookDocumentCellChanges struct { |
| 3561 | // Changes to the cell structure to add or |
| 3562 | // remove cells. |
| 3563 | Structure *NotebookDocumentCellChangeStructure `json:"structure,omitempty"` |
| 3564 | // Changes to notebook cells properties like its |
| 3565 | // kind, execution summary or metadata. |
| 3566 | Data []NotebookCell `json:"data,omitempty"` |
| 3567 | // Changes to the text content of notebook cells. |
| 3568 | TextContent []NotebookDocumentCellContentChanges `json:"textContent,omitempty"` |
| 3569 | } |
| 3570 | |
| 3571 | // Content changes to a cell in a notebook document. |
| 3572 | // |
| 3573 | // @since 3.18.0 |
| 3574 | // |
| 3575 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#notebookDocumentCellContentChanges |
| 3576 | type NotebookDocumentCellContentChanges struct { |
| 3577 | Document VersionedTextDocumentIdentifier `json:"document"` |
| 3578 | Changes []TextDocumentContentChangeEvent `json:"changes"` |
| 3579 | } |
| 3580 | |
| 3581 | // A change event for a notebook document. |
| 3582 | // |
| 3583 | // @since 3.17.0 |
| 3584 | // |
| 3585 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#notebookDocumentChangeEvent |
| 3586 | type NotebookDocumentChangeEvent struct { |
| 3587 | // The changed meta data if any. |
| 3588 | // |
| 3589 | // Note: should always be an object literal (e.g. LSPObject) |
| 3590 | Metadata *LSPObject `json:"metadata,omitempty"` |
| 3591 | // Changes to cells |
| 3592 | Cells *NotebookDocumentCellChanges `json:"cells,omitempty"` |
| 3593 | } |
| 3594 | |
| 3595 | // Capabilities specific to the notebook document support. |
| 3596 | // |
| 3597 | // @since 3.17.0 |
| 3598 | // |
| 3599 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#notebookDocumentClientCapabilities |
| 3600 | type NotebookDocumentClientCapabilities struct { |
| 3601 | // Capabilities specific to notebook document synchronization |
| 3602 | // |
| 3603 | // @since 3.17.0 |
| 3604 | Synchronization NotebookDocumentSyncClientCapabilities `json:"synchronization"` |
| 3605 | } |
| 3606 | |
| 3607 | // A notebook document filter denotes a notebook document by |
| 3608 | // different properties. The properties will be match |
| 3609 | // against the notebook's URI (same as with documents) |
| 3610 | // |
| 3611 | // @since 3.17.0 |
| 3612 | // |
| 3613 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#notebookDocumentFilter |
| 3614 | type NotebookDocumentFilter = Or_NotebookDocumentFilter // (alias) |
| 3615 | // A notebook document filter where `notebookType` is required field. |
| 3616 | // |
| 3617 | // @since 3.18.0 |
| 3618 | // |
| 3619 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#notebookDocumentFilterNotebookType |
| 3620 | type NotebookDocumentFilterNotebookType struct { |
| 3621 | // The type of the enclosing notebook. |
| 3622 | NotebookType string `json:"notebookType"` |
| 3623 | // A Uri {@link Uri.scheme scheme}, like `file` or `untitled`. |
| 3624 | Scheme string `json:"scheme,omitempty"` |
| 3625 | // A glob pattern. |
| 3626 | Pattern *GlobPattern `json:"pattern,omitempty"` |
| 3627 | } |
| 3628 | |
| 3629 | // A notebook document filter where `pattern` is required field. |
| 3630 | // |
| 3631 | // @since 3.18.0 |
| 3632 | // |
| 3633 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#notebookDocumentFilterPattern |
| 3634 | type NotebookDocumentFilterPattern struct { |
| 3635 | // The type of the enclosing notebook. |
| 3636 | NotebookType string `json:"notebookType,omitempty"` |
| 3637 | // A Uri {@link Uri.scheme scheme}, like `file` or `untitled`. |
| 3638 | Scheme string `json:"scheme,omitempty"` |
| 3639 | // A glob pattern. |
| 3640 | Pattern GlobPattern `json:"pattern"` |
| 3641 | } |
| 3642 | |
| 3643 | // A notebook document filter where `scheme` is required field. |
| 3644 | // |
| 3645 | // @since 3.18.0 |
| 3646 | // |
| 3647 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#notebookDocumentFilterScheme |
| 3648 | type NotebookDocumentFilterScheme struct { |
| 3649 | // The type of the enclosing notebook. |
| 3650 | NotebookType string `json:"notebookType,omitempty"` |
| 3651 | // A Uri {@link Uri.scheme scheme}, like `file` or `untitled`. |
| 3652 | Scheme string `json:"scheme"` |
| 3653 | // A glob pattern. |
| 3654 | Pattern *GlobPattern `json:"pattern,omitempty"` |
| 3655 | } |
| 3656 | |
| 3657 | // @since 3.18.0 |
| 3658 | // |
| 3659 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#notebookDocumentFilterWithCells |
| 3660 | type NotebookDocumentFilterWithCells struct { |
| 3661 | // The notebook to be synced If a string |
| 3662 | // value is provided it matches against the |
| 3663 | // notebook type. '*' matches every notebook. |
| 3664 | Notebook *Or_NotebookDocumentFilterWithCells_notebook `json:"notebook,omitempty"` |
| 3665 | // The cells of the matching notebook to be synced. |
| 3666 | Cells []NotebookCellLanguage `json:"cells"` |
| 3667 | } |
| 3668 | |
| 3669 | // @since 3.18.0 |
| 3670 | // |
| 3671 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#notebookDocumentFilterWithNotebook |
| 3672 | type NotebookDocumentFilterWithNotebook struct { |
| 3673 | // The notebook to be synced If a string |
| 3674 | // value is provided it matches against the |
| 3675 | // notebook type. '*' matches every notebook. |
| 3676 | Notebook Or_NotebookDocumentFilterWithNotebook_notebook `json:"notebook"` |
| 3677 | // The cells of the matching notebook to be synced. |
| 3678 | Cells []NotebookCellLanguage `json:"cells,omitempty"` |
| 3679 | } |
| 3680 | |
| 3681 | // A literal to identify a notebook document in the client. |
| 3682 | // |
| 3683 | // @since 3.17.0 |
| 3684 | // |
| 3685 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#notebookDocumentIdentifier |
| 3686 | type NotebookDocumentIdentifier struct { |
| 3687 | // The notebook document's uri. |
| 3688 | URI URI `json:"uri"` |
| 3689 | } |
| 3690 | |
| 3691 | // Notebook specific client capabilities. |
| 3692 | // |
| 3693 | // @since 3.17.0 |
| 3694 | // |
| 3695 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#notebookDocumentSyncClientCapabilities |
| 3696 | type NotebookDocumentSyncClientCapabilities struct { |
| 3697 | // Whether implementation supports dynamic registration. If this is |
| 3698 | // set to `true` the client supports the new |
| 3699 | // `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` |
| 3700 | // return value for the corresponding server capability as well. |
| 3701 | DynamicRegistration bool `json:"dynamicRegistration,omitempty"` |
| 3702 | // The client supports sending execution summary data per cell. |
| 3703 | ExecutionSummarySupport bool `json:"executionSummarySupport,omitempty"` |
| 3704 | } |
| 3705 | |
| 3706 | // Options specific to a notebook plus its cells |
| 3707 | // to be synced to the server. |
| 3708 | // |
| 3709 | // If a selector provides a notebook document |
| 3710 | // filter but no cell selector all cells of a |
| 3711 | // matching notebook document will be synced. |
| 3712 | // |
| 3713 | // If a selector provides no notebook document |
| 3714 | // filter but only a cell selector all notebook |
| 3715 | // document that contain at least one matching |
| 3716 | // cell will be synced. |
| 3717 | // |
| 3718 | // @since 3.17.0 |
| 3719 | // |
| 3720 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#notebookDocumentSyncOptions |
| 3721 | type NotebookDocumentSyncOptions struct { |
| 3722 | // The notebooks to be synced |
| 3723 | NotebookSelector []Or_NotebookDocumentSyncOptions_notebookSelector_Elem `json:"notebookSelector"` |
| 3724 | // Whether save notification should be forwarded to |
| 3725 | // the server. Will only be honored if mode === `notebook`. |
| 3726 | Save bool `json:"save,omitempty"` |
| 3727 | } |
| 3728 | |
| 3729 | // Registration options specific to a notebook. |
| 3730 | // |
| 3731 | // @since 3.17.0 |
| 3732 | // |
| 3733 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#notebookDocumentSyncRegistrationOptions |
| 3734 | type NotebookDocumentSyncRegistrationOptions struct { |
| 3735 | NotebookDocumentSyncOptions |
| 3736 | StaticRegistrationOptions |
| 3737 | } |
| 3738 | |
| 3739 | // A text document identifier to optionally denote a specific version of a text document. |
| 3740 | // |
| 3741 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#optionalVersionedTextDocumentIdentifier |
| 3742 | type OptionalVersionedTextDocumentIdentifier struct { |
| 3743 | // The version number of this document. If a versioned text document identifier |
| 3744 | // is sent from the server to the client and the file is not open in the editor |
| 3745 | // (the server has not received an open notification before) the server can send |
| 3746 | // `null` to indicate that the version is unknown and the content on disk is the |
| 3747 | // truth (as specified with document content ownership). |
| 3748 | Version int32 `json:"version"` |
| 3749 | TextDocumentIdentifier |
| 3750 | } |
| 3751 | |
| 3752 | // created for Or [Location LocationUriOnly] |
| 3753 | type OrPLocation_workspace_symbol struct { |
| 3754 | Value any `json:"value"` |
| 3755 | } |
| 3756 | |
| 3757 | // created for Or [[]string string] |
| 3758 | type OrPSection_workspace_didChangeConfiguration struct { |
| 3759 | Value any `json:"value"` |
| 3760 | } |
| 3761 | |
| 3762 | // created for Or [MarkupContent string] |
| 3763 | type OrPTooltipPLabel struct { |
| 3764 | Value any `json:"value"` |
| 3765 | } |
| 3766 | |
| 3767 | // created for Or [MarkupContent string] |
| 3768 | type OrPTooltip_textDocument_inlayHint struct { |
| 3769 | Value any `json:"value"` |
| 3770 | } |
| 3771 | |
| 3772 | // created for Or [int32 string] |
| 3773 | type Or_CancelParams_id struct { |
| 3774 | Value any `json:"value"` |
| 3775 | } |
| 3776 | |
| 3777 | // created for Or [ClientSemanticTokensRequestFullDelta bool] |
| 3778 | type Or_ClientSemanticTokensRequestOptions_full struct { |
| 3779 | Value any `json:"value"` |
| 3780 | } |
| 3781 | |
| 3782 | // created for Or [Lit_ClientSemanticTokensRequestOptions_range_Item1 bool] |
| 3783 | type Or_ClientSemanticTokensRequestOptions_range struct { |
| 3784 | Value any `json:"value"` |
| 3785 | } |
| 3786 | |
| 3787 | // created for Or [EditRangeWithInsertReplace Range] |
| 3788 | type Or_CompletionItemDefaults_editRange struct { |
| 3789 | Value any `json:"value"` |
| 3790 | } |
| 3791 | |
| 3792 | // created for Or [MarkupContent string] |
| 3793 | type Or_CompletionItem_documentation struct { |
| 3794 | Value any `json:"value"` |
| 3795 | } |
| 3796 | |
| 3797 | // created for Or [InsertReplaceEdit TextEdit] |
| 3798 | type Or_CompletionItem_textEdit struct { |
| 3799 | Value any `json:"value"` |
| 3800 | } |
| 3801 | |
| 3802 | // created for Or [Location []Location] |
| 3803 | type Or_Definition struct { |
| 3804 | Value any `json:"value"` |
| 3805 | } |
| 3806 | |
| 3807 | // created for Or [int32 string] |
| 3808 | type Or_Diagnostic_code struct { |
| 3809 | Value any `json:"value"` |
| 3810 | } |
| 3811 | |
| 3812 | // created for Or [RelatedFullDocumentDiagnosticReport RelatedUnchangedDocumentDiagnosticReport] |
| 3813 | type Or_DocumentDiagnosticReport struct { |
| 3814 | Value any `json:"value"` |
| 3815 | } |
| 3816 | |
| 3817 | // created for Or [FullDocumentDiagnosticReport UnchangedDocumentDiagnosticReport] |
| 3818 | type Or_DocumentDiagnosticReportPartialResult_relatedDocuments_Value struct { |
| 3819 | Value any `json:"value"` |
| 3820 | } |
| 3821 | |
| 3822 | // created for Or [NotebookCellTextDocumentFilter TextDocumentFilter] |
| 3823 | type Or_DocumentFilter struct { |
| 3824 | Value any `json:"value"` |
| 3825 | } |
| 3826 | |
| 3827 | // created for Or [Pattern RelativePattern] |
| 3828 | type Or_GlobPattern struct { |
| 3829 | Value any `json:"value"` |
| 3830 | } |
| 3831 | |
| 3832 | // created for Or [MarkedString MarkupContent []MarkedString] |
| 3833 | type Or_Hover_contents struct { |
| 3834 | Value any `json:"value"` |
| 3835 | } |
| 3836 | |
| 3837 | // created for Or [[]InlayHintLabelPart string] |
| 3838 | type Or_InlayHint_label struct { |
| 3839 | Value any `json:"value"` |
| 3840 | } |
| 3841 | |
| 3842 | // created for Or [StringValue string] |
| 3843 | type Or_InlineCompletionItem_insertText struct { |
| 3844 | Value any `json:"value"` |
| 3845 | } |
| 3846 | |
| 3847 | // created for Or [InlineValueEvaluatableExpression InlineValueText InlineValueVariableLookup] |
| 3848 | type Or_InlineValue struct { |
| 3849 | Value any `json:"value"` |
| 3850 | } |
| 3851 | |
| 3852 | // created for Or [MarkedStringWithLanguage string] |
| 3853 | type Or_MarkedString struct { |
| 3854 | Value any `json:"value"` |
| 3855 | } |
| 3856 | |
| 3857 | // created for Or [NotebookDocumentFilter string] |
| 3858 | type Or_NotebookCellTextDocumentFilter_notebook struct { |
| 3859 | Value any `json:"value"` |
| 3860 | } |
| 3861 | |
| 3862 | // created for Or [NotebookDocumentFilterNotebookType NotebookDocumentFilterPattern NotebookDocumentFilterScheme] |
| 3863 | type Or_NotebookDocumentFilter struct { |
| 3864 | Value any `json:"value"` |
| 3865 | } |
| 3866 | |
| 3867 | // created for Or [NotebookDocumentFilter string] |
| 3868 | type Or_NotebookDocumentFilterWithCells_notebook struct { |
| 3869 | Value any `json:"value"` |
| 3870 | } |
| 3871 | |
| 3872 | // created for Or [NotebookDocumentFilter string] |
| 3873 | type Or_NotebookDocumentFilterWithNotebook_notebook struct { |
| 3874 | Value any `json:"value"` |
| 3875 | } |
| 3876 | |
| 3877 | // created for Or [NotebookDocumentFilterWithCells NotebookDocumentFilterWithNotebook] |
| 3878 | type Or_NotebookDocumentSyncOptions_notebookSelector_Elem struct { |
| 3879 | Value any `json:"value"` |
| 3880 | } |
| 3881 | |
| 3882 | // created for Or [FullDocumentDiagnosticReport UnchangedDocumentDiagnosticReport] |
| 3883 | type Or_RelatedFullDocumentDiagnosticReport_relatedDocuments_Value struct { |
| 3884 | Value any `json:"value"` |
| 3885 | } |
| 3886 | |
| 3887 | // created for Or [FullDocumentDiagnosticReport UnchangedDocumentDiagnosticReport] |
| 3888 | type Or_RelatedUnchangedDocumentDiagnosticReport_relatedDocuments_Value struct { |
| 3889 | Value any `json:"value"` |
| 3890 | } |
| 3891 | |
| 3892 | // created for Or [CodeAction Command] |
| 3893 | type Or_Result_textDocument_codeAction_Item0_Elem struct { |
| 3894 | Value any `json:"value"` |
| 3895 | } |
| 3896 | |
| 3897 | // created for Or [InlineCompletionList []InlineCompletionItem] |
| 3898 | type Or_Result_textDocument_inlineCompletion struct { |
| 3899 | Value any `json:"value"` |
| 3900 | } |
| 3901 | |
| 3902 | // created for Or [SemanticTokensFullDelta bool] |
| 3903 | type Or_SemanticTokensOptions_full struct { |
| 3904 | Value any `json:"value"` |
| 3905 | } |
| 3906 | |
| 3907 | // created for Or [PRangeESemanticTokensOptions bool] |
| 3908 | type Or_SemanticTokensOptions_range struct { |
| 3909 | Value any `json:"value"` |
| 3910 | } |
| 3911 | |
| 3912 | // created for Or [CallHierarchyOptions CallHierarchyRegistrationOptions bool] |
| 3913 | type Or_ServerCapabilities_callHierarchyProvider struct { |
| 3914 | Value any `json:"value"` |
| 3915 | } |
| 3916 | |
| 3917 | // created for Or [CodeActionOptions bool] |
| 3918 | type Or_ServerCapabilities_codeActionProvider struct { |
| 3919 | Value any `json:"value"` |
| 3920 | } |
| 3921 | |
| 3922 | // created for Or [DocumentColorOptions DocumentColorRegistrationOptions bool] |
| 3923 | type Or_ServerCapabilities_colorProvider struct { |
| 3924 | Value any `json:"value"` |
| 3925 | } |
| 3926 | |
| 3927 | // created for Or [DeclarationOptions DeclarationRegistrationOptions bool] |
| 3928 | type Or_ServerCapabilities_declarationProvider struct { |
| 3929 | Value any `json:"value"` |
| 3930 | } |
| 3931 | |
| 3932 | // created for Or [DefinitionOptions bool] |
| 3933 | type Or_ServerCapabilities_definitionProvider struct { |
| 3934 | Value any `json:"value"` |
| 3935 | } |
| 3936 | |
| 3937 | // created for Or [DiagnosticOptions DiagnosticRegistrationOptions] |
| 3938 | type Or_ServerCapabilities_diagnosticProvider struct { |
| 3939 | Value any `json:"value"` |
| 3940 | } |
| 3941 | |
| 3942 | // created for Or [DocumentFormattingOptions bool] |
| 3943 | type Or_ServerCapabilities_documentFormattingProvider struct { |
| 3944 | Value any `json:"value"` |
| 3945 | } |
| 3946 | |
| 3947 | // created for Or [DocumentHighlightOptions bool] |
| 3948 | type Or_ServerCapabilities_documentHighlightProvider struct { |
| 3949 | Value any `json:"value"` |
| 3950 | } |
| 3951 | |
| 3952 | // created for Or [DocumentRangeFormattingOptions bool] |
| 3953 | type Or_ServerCapabilities_documentRangeFormattingProvider struct { |
| 3954 | Value any `json:"value"` |
| 3955 | } |
| 3956 | |
| 3957 | // created for Or [DocumentSymbolOptions bool] |
| 3958 | type Or_ServerCapabilities_documentSymbolProvider struct { |
| 3959 | Value any `json:"value"` |
| 3960 | } |
| 3961 | |
| 3962 | // created for Or [FoldingRangeOptions FoldingRangeRegistrationOptions bool] |
| 3963 | type Or_ServerCapabilities_foldingRangeProvider struct { |
| 3964 | Value any `json:"value"` |
| 3965 | } |
| 3966 | |
| 3967 | // created for Or [HoverOptions bool] |
| 3968 | type Or_ServerCapabilities_hoverProvider struct { |
| 3969 | Value any `json:"value"` |
| 3970 | } |
| 3971 | |
| 3972 | // created for Or [ImplementationOptions ImplementationRegistrationOptions bool] |
| 3973 | type Or_ServerCapabilities_implementationProvider struct { |
| 3974 | Value any `json:"value"` |
| 3975 | } |
| 3976 | |
| 3977 | // created for Or [InlayHintOptions InlayHintRegistrationOptions bool] |
| 3978 | type Or_ServerCapabilities_inlayHintProvider struct { |
| 3979 | Value any `json:"value"` |
| 3980 | } |
| 3981 | |
| 3982 | // created for Or [InlineCompletionOptions bool] |
| 3983 | type Or_ServerCapabilities_inlineCompletionProvider struct { |
| 3984 | Value any `json:"value"` |
| 3985 | } |
| 3986 | |
| 3987 | // created for Or [InlineValueOptions InlineValueRegistrationOptions bool] |
| 3988 | type Or_ServerCapabilities_inlineValueProvider struct { |
| 3989 | Value any `json:"value"` |
| 3990 | } |
| 3991 | |
| 3992 | // created for Or [LinkedEditingRangeOptions LinkedEditingRangeRegistrationOptions bool] |
| 3993 | type Or_ServerCapabilities_linkedEditingRangeProvider struct { |
| 3994 | Value any `json:"value"` |
| 3995 | } |
| 3996 | |
| 3997 | // created for Or [MonikerOptions MonikerRegistrationOptions bool] |
| 3998 | type Or_ServerCapabilities_monikerProvider struct { |
| 3999 | Value any `json:"value"` |
| 4000 | } |
| 4001 | |
| 4002 | // created for Or [NotebookDocumentSyncOptions NotebookDocumentSyncRegistrationOptions] |
| 4003 | type Or_ServerCapabilities_notebookDocumentSync struct { |
| 4004 | Value any `json:"value"` |
| 4005 | } |
| 4006 | |
| 4007 | // created for Or [ReferenceOptions bool] |
| 4008 | type Or_ServerCapabilities_referencesProvider struct { |
| 4009 | Value any `json:"value"` |
| 4010 | } |
| 4011 | |
| 4012 | // created for Or [RenameOptions bool] |
| 4013 | type Or_ServerCapabilities_renameProvider struct { |
| 4014 | Value any `json:"value"` |
| 4015 | } |
| 4016 | |
| 4017 | // created for Or [SelectionRangeOptions SelectionRangeRegistrationOptions bool] |
| 4018 | type Or_ServerCapabilities_selectionRangeProvider struct { |
| 4019 | Value any `json:"value"` |
| 4020 | } |
| 4021 | |
| 4022 | // created for Or [SemanticTokensOptions SemanticTokensRegistrationOptions] |
| 4023 | type Or_ServerCapabilities_semanticTokensProvider struct { |
| 4024 | Value any `json:"value"` |
| 4025 | } |
| 4026 | |
| 4027 | // created for Or [TextDocumentSyncKind TextDocumentSyncOptions] |
| 4028 | type Or_ServerCapabilities_textDocumentSync struct { |
| 4029 | Value any `json:"value"` |
| 4030 | } |
| 4031 | |
| 4032 | // created for Or [TypeDefinitionOptions TypeDefinitionRegistrationOptions bool] |
| 4033 | type Or_ServerCapabilities_typeDefinitionProvider struct { |
| 4034 | Value any `json:"value"` |
| 4035 | } |
| 4036 | |
| 4037 | // created for Or [TypeHierarchyOptions TypeHierarchyRegistrationOptions bool] |
| 4038 | type Or_ServerCapabilities_typeHierarchyProvider struct { |
| 4039 | Value any `json:"value"` |
| 4040 | } |
| 4041 | |
| 4042 | // created for Or [WorkspaceSymbolOptions bool] |
| 4043 | type Or_ServerCapabilities_workspaceSymbolProvider struct { |
| 4044 | Value any `json:"value"` |
| 4045 | } |
| 4046 | |
| 4047 | // created for Or [MarkupContent string] |
| 4048 | type Or_SignatureInformation_documentation struct { |
| 4049 | Value any `json:"value"` |
| 4050 | } |
| 4051 | |
| 4052 | // created for Or [AnnotatedTextEdit SnippetTextEdit TextEdit] |
| 4053 | type Or_TextDocumentEdit_edits_Elem struct { |
| 4054 | Value any `json:"value"` |
| 4055 | } |
| 4056 | |
| 4057 | // created for Or [TextDocumentFilterLanguage TextDocumentFilterPattern TextDocumentFilterScheme] |
| 4058 | type Or_TextDocumentFilter struct { |
| 4059 | Value any `json:"value"` |
| 4060 | } |
| 4061 | |
| 4062 | // created for Or [SaveOptions bool] |
| 4063 | type Or_TextDocumentSyncOptions_save struct { |
| 4064 | Value any `json:"value"` |
| 4065 | } |
| 4066 | |
| 4067 | // created for Or [WorkspaceFullDocumentDiagnosticReport WorkspaceUnchangedDocumentDiagnosticReport] |
| 4068 | type Or_WorkspaceDocumentDiagnosticReport struct { |
| 4069 | Value any `json:"value"` |
| 4070 | } |
| 4071 | |
| 4072 | // created for Or [CreateFile DeleteFile RenameFile TextDocumentEdit] |
| 4073 | type Or_WorkspaceEdit_documentChanges_Elem struct { |
| 4074 | Value any `json:"value"` |
| 4075 | } |
| 4076 | |
| 4077 | // created for Or [TextDocumentContentOptions TextDocumentContentRegistrationOptions] |
| 4078 | type Or_WorkspaceOptions_textDocumentContent struct { |
| 4079 | Value any `json:"value"` |
| 4080 | } |
| 4081 | |
| 4082 | // created for Or [Declaration []DeclarationLink] |
| 4083 | type Or_textDocument_declaration struct { |
| 4084 | Value any `json:"value"` |
| 4085 | } |
| 4086 | |
| 4087 | // created for Literal (Lit_SemanticTokensOptions_range_Item1) |
| 4088 | type PRangeESemanticTokensOptions struct { |
| 4089 | } |
| 4090 | |
| 4091 | // The parameters of a configuration request. |
| 4092 | // |
| 4093 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#configurationParams |
| 4094 | type ParamConfiguration struct { |
| 4095 | Items []ConfigurationItem `json:"items"` |
| 4096 | } |
| 4097 | |
| 4098 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#initializeParams |
| 4099 | type ParamInitialize struct { |
| 4100 | XInitializeParams |
| 4101 | WorkspaceFoldersInitializeParams |
| 4102 | } |
| 4103 | |
| 4104 | // Represents a parameter of a callable-signature. A parameter can |
| 4105 | // have a label and a doc-comment. |
| 4106 | // |
| 4107 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#parameterInformation |
| 4108 | type ParameterInformation struct { |
| 4109 | // The label of this parameter information. |
| 4110 | // |
| 4111 | // Either a string or an inclusive start and exclusive end offsets within its containing |
| 4112 | // signature label. (see SignatureInformation.label). The offsets are based on a UTF-16 |
| 4113 | // string representation as `Position` and `Range` does. |
| 4114 | // |
| 4115 | // To avoid ambiguities a server should use the [start, end] offset value instead of using |
| 4116 | // a substring. Whether a client support this is controlled via `labelOffsetSupport` client |
| 4117 | // capability. |
| 4118 | // |
| 4119 | // *Note*: a label of type string should be a substring of its containing signature label. |
| 4120 | // Its intended use case is to highlight the parameter label part in the `SignatureInformation.label`. |
| 4121 | Label string `json:"label"` |
| 4122 | // The human-readable doc-comment of this parameter. Will be shown |
| 4123 | // in the UI but can be omitted. |
| 4124 | Documentation string `json:"documentation,omitempty"` |
| 4125 | } |
| 4126 | |
| 4127 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#partialResultParams |
| 4128 | type PartialResultParams struct { |
| 4129 | // An optional token that a server can use to report partial results (e.g. streaming) to |
| 4130 | // the client. |
| 4131 | PartialResultToken *ProgressToken `json:"partialResultToken,omitempty"` |
| 4132 | } |
| 4133 | |
| 4134 | // The glob pattern to watch relative to the base path. Glob patterns can have the following syntax: |
| 4135 | // |
| 4136 | // - `*` to match one or more characters in a path segment |
| 4137 | // - `?` to match on one character in a path segment |
| 4138 | // - `**` to match any number of path segments, including none |
| 4139 | // - `{}` to group conditions (e.g. `**/*.{ts,js}` matches all TypeScript and JavaScript files) |
| 4140 | // - `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …) |
| 4141 | // - `[!...]` 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`) |
| 4142 | // |
| 4143 | // @since 3.17.0 |
| 4144 | // |
| 4145 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#pattern |
| 4146 | type Pattern = string // (alias) |
| 4147 | // Position in a text document expressed as zero-based line and character |
| 4148 | // offset. Prior to 3.17 the offsets were always based on a UTF-16 string |
| 4149 | // representation. So a string of the form `a𐐀b` the character offset of the |
| 4150 | // character `a` is 0, the character offset of `𐐀` is 1 and the character |
| 4151 | // offset of b is 3 since `𐐀` is represented using two code units in UTF-16. |
| 4152 | // Since 3.17 clients and servers can agree on a different string encoding |
| 4153 | // representation (e.g. UTF-8). The client announces it's supported encoding |
| 4154 | // via the client capability [`general.positionEncodings`](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#clientCapabilities). |
| 4155 | // The value is an array of position encodings the client supports, with |
| 4156 | // decreasing preference (e.g. the encoding at index `0` is the most preferred |
| 4157 | // one). To stay backwards compatible the only mandatory encoding is UTF-16 |
| 4158 | // represented via the string `utf-16`. The server can pick one of the |
| 4159 | // encodings offered by the client and signals that encoding back to the |
| 4160 | // client via the initialize result's property |
| 4161 | // [`capabilities.positionEncoding`](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#serverCapabilities). If the string value |
| 4162 | // `utf-16` is missing from the client's capability `general.positionEncodings` |
| 4163 | // servers can safely assume that the client supports UTF-16. If the server |
| 4164 | // omits the position encoding in its initialize result the encoding defaults |
| 4165 | // to the string value `utf-16`. Implementation considerations: since the |
| 4166 | // conversion from one encoding into another requires the content of the |
| 4167 | // file / line the conversion is best done where the file is read which is |
| 4168 | // usually on the server side. |
| 4169 | // |
| 4170 | // Positions are line end character agnostic. So you can not specify a position |
| 4171 | // that denotes `\r|\n` or `\n|` where `|` represents the character offset. |
| 4172 | // |
| 4173 | // @since 3.17.0 - support for negotiated position encoding. |
| 4174 | // |
| 4175 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#position |
| 4176 | type Position struct { |
| 4177 | // Line position in a document (zero-based). |
| 4178 | Line uint32 `json:"line"` |
| 4179 | // Character offset on a line in a document (zero-based). |
| 4180 | // |
| 4181 | // The meaning of this offset is determined by the negotiated |
| 4182 | // `PositionEncodingKind`. |
| 4183 | Character uint32 `json:"character"` |
| 4184 | } |
| 4185 | |
| 4186 | // A set of predefined position encoding kinds. |
| 4187 | // |
| 4188 | // @since 3.17.0 |
| 4189 | type PositionEncodingKind string |
| 4190 | |
| 4191 | // @since 3.18.0 |
| 4192 | // |
| 4193 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#prepareRenameDefaultBehavior |
| 4194 | type PrepareRenameDefaultBehavior struct { |
| 4195 | DefaultBehavior bool `json:"defaultBehavior"` |
| 4196 | } |
| 4197 | |
| 4198 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#prepareRenameParams |
| 4199 | type PrepareRenameParams struct { |
| 4200 | TextDocumentPositionParams |
| 4201 | WorkDoneProgressParams |
| 4202 | } |
| 4203 | |
| 4204 | // @since 3.18.0 |
| 4205 | // |
| 4206 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#prepareRenamePlaceholder |
| 4207 | type PrepareRenamePlaceholder struct { |
| 4208 | Range Range `json:"range"` |
| 4209 | Placeholder string `json:"placeholder"` |
| 4210 | } |
| 4211 | |
| 4212 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#prepareRenameResult |
| 4213 | type PrepareRenameResult = PrepareRenamePlaceholder // (alias) |
| 4214 | type PrepareSupportDefaultBehavior uint32 |
| 4215 | |
| 4216 | // A previous result id in a workspace pull request. |
| 4217 | // |
| 4218 | // @since 3.17.0 |
| 4219 | // |
| 4220 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#previousResultId |
| 4221 | type PreviousResultID struct { |
| 4222 | // The URI for which the client knowns a |
| 4223 | // result id. |
| 4224 | URI DocumentURI `json:"uri"` |
| 4225 | // The value of the previous result id. |
| 4226 | Value string `json:"value"` |
| 4227 | } |
| 4228 | |
| 4229 | // A previous result id in a workspace pull request. |
| 4230 | // |
| 4231 | // @since 3.17.0 |
| 4232 | // |
| 4233 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#previousResultId |
| 4234 | type PreviousResultId struct { |
| 4235 | // The URI for which the client knowns a |
| 4236 | // result id. |
| 4237 | URI DocumentURI `json:"uri"` |
| 4238 | // The value of the previous result id. |
| 4239 | Value string `json:"value"` |
| 4240 | } |
| 4241 | |
| 4242 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#progressParams |
| 4243 | type ProgressParams struct { |
| 4244 | // The progress token provided by the client or server. |
| 4245 | Token ProgressToken `json:"token"` |
| 4246 | // The progress data. |
| 4247 | Value any `json:"value"` |
| 4248 | } |
| 4249 | |
| 4250 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#progressToken |
| 4251 | type ProgressToken = any // (alias) |
| 4252 | // The publish diagnostic client capabilities. |
| 4253 | // |
| 4254 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#publishDiagnosticsClientCapabilities |
| 4255 | type PublishDiagnosticsClientCapabilities struct { |
| 4256 | // Whether the client interprets the version property of the |
| 4257 | // `textDocument/publishDiagnostics` notification's parameter. |
| 4258 | // |
| 4259 | // @since 3.15.0 |
| 4260 | VersionSupport bool `json:"versionSupport,omitempty"` |
| 4261 | DiagnosticsCapabilities |
| 4262 | } |
| 4263 | |
| 4264 | // The publish diagnostic notification's parameters. |
| 4265 | // |
| 4266 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#publishDiagnosticsParams |
| 4267 | type PublishDiagnosticsParams struct { |
| 4268 | // The URI for which diagnostic information is reported. |
| 4269 | URI DocumentURI `json:"uri"` |
| 4270 | // Optional the version number of the document the diagnostics are published for. |
| 4271 | // |
| 4272 | // @since 3.15.0 |
| 4273 | Version int32 `json:"version,omitempty"` |
| 4274 | // An array of diagnostic information items. |
| 4275 | Diagnostics []Diagnostic `json:"diagnostics"` |
| 4276 | } |
| 4277 | |
| 4278 | // A range in a text document expressed as (zero-based) start and end positions. |
| 4279 | // |
| 4280 | // If you want to specify a range that contains a line including the line ending |
| 4281 | // character(s) then use an end position denoting the start of the next line. |
| 4282 | // For example: |
| 4283 | // ```ts |
| 4284 | // |
| 4285 | // { |
| 4286 | // start: { line: 5, character: 23 } |
| 4287 | // end : { line 6, character : 0 } |
| 4288 | // } |
| 4289 | // |
| 4290 | // ``` |
| 4291 | // |
| 4292 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#range |
| 4293 | type Range struct { |
| 4294 | // The range's start position. |
| 4295 | Start Position `json:"start"` |
| 4296 | // The range's end position. |
| 4297 | End Position `json:"end"` |
| 4298 | } |
| 4299 | |
| 4300 | // Client Capabilities for a {@link ReferencesRequest}. |
| 4301 | // |
| 4302 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#referenceClientCapabilities |
| 4303 | type ReferenceClientCapabilities struct { |
| 4304 | // Whether references supports dynamic registration. |
| 4305 | DynamicRegistration bool `json:"dynamicRegistration,omitempty"` |
| 4306 | } |
| 4307 | |
| 4308 | // Value-object that contains additional information when |
| 4309 | // requesting references. |
| 4310 | // |
| 4311 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#referenceContext |
| 4312 | type ReferenceContext struct { |
| 4313 | // Include the declaration of the current symbol. |
| 4314 | IncludeDeclaration bool `json:"includeDeclaration"` |
| 4315 | } |
| 4316 | |
| 4317 | // Reference options. |
| 4318 | // |
| 4319 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#referenceOptions |
| 4320 | type ReferenceOptions struct { |
| 4321 | WorkDoneProgressOptions |
| 4322 | } |
| 4323 | |
| 4324 | // Parameters for a {@link ReferencesRequest}. |
| 4325 | // |
| 4326 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#referenceParams |
| 4327 | type ReferenceParams struct { |
| 4328 | Context ReferenceContext `json:"context"` |
| 4329 | TextDocumentPositionParams |
| 4330 | WorkDoneProgressParams |
| 4331 | PartialResultParams |
| 4332 | } |
| 4333 | |
| 4334 | // Registration options for a {@link ReferencesRequest}. |
| 4335 | // |
| 4336 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#referenceRegistrationOptions |
| 4337 | type ReferenceRegistrationOptions struct { |
| 4338 | TextDocumentRegistrationOptions |
| 4339 | ReferenceOptions |
| 4340 | } |
| 4341 | |
| 4342 | // General parameters to register for a notification or to register a provider. |
| 4343 | // |
| 4344 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#registration |
| 4345 | type Registration struct { |
| 4346 | // The id used to register the request. The id can be used to deregister |
| 4347 | // the request again. |
| 4348 | ID string `json:"id"` |
| 4349 | // The method / capability to register for. |
| 4350 | Method string `json:"method"` |
| 4351 | // Options necessary for the registration. |
| 4352 | RegisterOptions any `json:"registerOptions,omitempty"` |
| 4353 | } |
| 4354 | |
| 4355 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#registrationParams |
| 4356 | type RegistrationParams struct { |
| 4357 | Registrations []Registration `json:"registrations"` |
| 4358 | } |
| 4359 | |
| 4360 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#regularExpressionEngineKind |
| 4361 | type RegularExpressionEngineKind = string // (alias) |
| 4362 | // Client capabilities specific to regular expressions. |
| 4363 | // |
| 4364 | // @since 3.16.0 |
| 4365 | // |
| 4366 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#regularExpressionsClientCapabilities |
| 4367 | type RegularExpressionsClientCapabilities struct { |
| 4368 | // The engine's name. |
| 4369 | Engine RegularExpressionEngineKind `json:"engine"` |
| 4370 | // The engine's version. |
| 4371 | Version string `json:"version,omitempty"` |
| 4372 | } |
| 4373 | |
| 4374 | // A full diagnostic report with a set of related documents. |
| 4375 | // |
| 4376 | // @since 3.17.0 |
| 4377 | // |
| 4378 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#relatedFullDocumentDiagnosticReport |
| 4379 | type RelatedFullDocumentDiagnosticReport struct { |
| 4380 | // Diagnostics of related documents. This information is useful |
| 4381 | // in programming languages where code in a file A can generate |
| 4382 | // diagnostics in a file B which A depends on. An example of |
| 4383 | // such a language is C/C++ where marco definitions in a file |
| 4384 | // a.cpp and result in errors in a header file b.hpp. |
| 4385 | // |
| 4386 | // @since 3.17.0 |
| 4387 | RelatedDocuments map[DocumentURI]any `json:"relatedDocuments,omitempty"` |
| 4388 | FullDocumentDiagnosticReport |
| 4389 | } |
| 4390 | |
| 4391 | // An unchanged diagnostic report with a set of related documents. |
| 4392 | // |
| 4393 | // @since 3.17.0 |
| 4394 | // |
| 4395 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#relatedUnchangedDocumentDiagnosticReport |
| 4396 | type RelatedUnchangedDocumentDiagnosticReport struct { |
| 4397 | // Diagnostics of related documents. This information is useful |
| 4398 | // in programming languages where code in a file A can generate |
| 4399 | // diagnostics in a file B which A depends on. An example of |
| 4400 | // such a language is C/C++ where marco definitions in a file |
| 4401 | // a.cpp and result in errors in a header file b.hpp. |
| 4402 | // |
| 4403 | // @since 3.17.0 |
| 4404 | RelatedDocuments map[DocumentURI]any `json:"relatedDocuments,omitempty"` |
| 4405 | UnchangedDocumentDiagnosticReport |
| 4406 | } |
| 4407 | |
| 4408 | // A relative pattern is a helper to construct glob patterns that are matched |
| 4409 | // relatively to a base URI. The common value for a `baseUri` is a workspace |
| 4410 | // folder root, but it can be another absolute URI as well. |
| 4411 | // |
| 4412 | // @since 3.17.0 |
| 4413 | // |
| 4414 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#relativePattern |
| 4415 | type RelativePattern struct { |
| 4416 | // A workspace folder or a base URI to which this pattern will be matched |
| 4417 | // against relatively. |
| 4418 | BaseURI DocumentURI `json:"baseUri"` |
| 4419 | // The actual glob pattern; |
| 4420 | Pattern Pattern `json:"pattern"` |
| 4421 | } |
| 4422 | |
| 4423 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#renameClientCapabilities |
| 4424 | type RenameClientCapabilities struct { |
| 4425 | // Whether rename supports dynamic registration. |
| 4426 | DynamicRegistration bool `json:"dynamicRegistration,omitempty"` |
| 4427 | // Client supports testing for validity of rename operations |
| 4428 | // before execution. |
| 4429 | // |
| 4430 | // @since 3.12.0 |
| 4431 | PrepareSupport bool `json:"prepareSupport,omitempty"` |
| 4432 | // Client supports the default behavior result. |
| 4433 | // |
| 4434 | // The value indicates the default behavior used by the |
| 4435 | // client. |
| 4436 | // |
| 4437 | // @since 3.16.0 |
| 4438 | PrepareSupportDefaultBehavior *PrepareSupportDefaultBehavior `json:"prepareSupportDefaultBehavior,omitempty"` |
| 4439 | // Whether the client honors the change annotations in |
| 4440 | // text edits and resource operations returned via the |
| 4441 | // rename request's workspace edit by for example presenting |
| 4442 | // the workspace edit in the user interface and asking |
| 4443 | // for confirmation. |
| 4444 | // |
| 4445 | // @since 3.16.0 |
| 4446 | HonorsChangeAnnotations bool `json:"honorsChangeAnnotations,omitempty"` |
| 4447 | } |
| 4448 | |
| 4449 | // Rename file operation |
| 4450 | // |
| 4451 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#renameFile |
| 4452 | type RenameFile struct { |
| 4453 | // A rename |
| 4454 | Kind string `json:"kind"` |
| 4455 | // The old (existing) location. |
| 4456 | OldURI DocumentURI `json:"oldUri"` |
| 4457 | // The new location. |
| 4458 | NewURI DocumentURI `json:"newUri"` |
| 4459 | // Rename options. |
| 4460 | Options *RenameFileOptions `json:"options,omitempty"` |
| 4461 | ResourceOperation |
| 4462 | } |
| 4463 | |
| 4464 | // Rename file options |
| 4465 | // |
| 4466 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#renameFileOptions |
| 4467 | type RenameFileOptions struct { |
| 4468 | // Overwrite target if existing. Overwrite wins over `ignoreIfExists` |
| 4469 | Overwrite bool `json:"overwrite,omitempty"` |
| 4470 | // Ignores if target exists. |
| 4471 | IgnoreIfExists bool `json:"ignoreIfExists,omitempty"` |
| 4472 | } |
| 4473 | |
| 4474 | // The parameters sent in notifications/requests for user-initiated renames of |
| 4475 | // files. |
| 4476 | // |
| 4477 | // @since 3.16.0 |
| 4478 | // |
| 4479 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#renameFilesParams |
| 4480 | type RenameFilesParams struct { |
| 4481 | // An array of all files/folders renamed in this operation. When a folder is renamed, only |
| 4482 | // the folder will be included, and not its children. |
| 4483 | Files []FileRename `json:"files"` |
| 4484 | } |
| 4485 | |
| 4486 | // Provider options for a {@link RenameRequest}. |
| 4487 | // |
| 4488 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#renameOptions |
| 4489 | type RenameOptions struct { |
| 4490 | // Renames should be checked and tested before being executed. |
| 4491 | // |
| 4492 | // @since version 3.12.0 |
| 4493 | PrepareProvider bool `json:"prepareProvider,omitempty"` |
| 4494 | WorkDoneProgressOptions |
| 4495 | } |
| 4496 | |
| 4497 | // The parameters of a {@link RenameRequest}. |
| 4498 | // |
| 4499 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#renameParams |
| 4500 | type RenameParams struct { |
| 4501 | // The new name of the symbol. If the given name is not valid the |
| 4502 | // request must return a {@link ResponseError} with an |
| 4503 | // appropriate message set. |
| 4504 | NewName string `json:"newName"` |
| 4505 | TextDocumentPositionParams |
| 4506 | WorkDoneProgressParams |
| 4507 | } |
| 4508 | |
| 4509 | // Registration options for a {@link RenameRequest}. |
| 4510 | // |
| 4511 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#renameRegistrationOptions |
| 4512 | type RenameRegistrationOptions struct { |
| 4513 | TextDocumentRegistrationOptions |
| 4514 | RenameOptions |
| 4515 | } |
| 4516 | |
| 4517 | // A generic resource operation. |
| 4518 | // |
| 4519 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#resourceOperation |
| 4520 | type ResourceOperation struct { |
| 4521 | // The resource operation kind. |
| 4522 | Kind string `json:"kind"` |
| 4523 | // An optional annotation identifier describing the operation. |
| 4524 | // |
| 4525 | // @since 3.16.0 |
| 4526 | AnnotationID *ChangeAnnotationIdentifier `json:"annotationId,omitempty"` |
| 4527 | } |
| 4528 | type ResourceOperationKind string |
| 4529 | |
| 4530 | // Save options. |
| 4531 | // |
| 4532 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#saveOptions |
| 4533 | type SaveOptions struct { |
| 4534 | // The client is supposed to include the content on save. |
| 4535 | IncludeText bool `json:"includeText,omitempty"` |
| 4536 | } |
| 4537 | |
| 4538 | // Describes the currently selected completion item. |
| 4539 | // |
| 4540 | // @since 3.18.0 |
| 4541 | // @proposed |
| 4542 | // |
| 4543 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#selectedCompletionInfo |
| 4544 | type SelectedCompletionInfo struct { |
| 4545 | // The range that will be replaced if this completion item is accepted. |
| 4546 | Range Range `json:"range"` |
| 4547 | // The text the range will be replaced with if this completion is accepted. |
| 4548 | Text string `json:"text"` |
| 4549 | } |
| 4550 | |
| 4551 | // A selection range represents a part of a selection hierarchy. A selection range |
| 4552 | // may have a parent selection range that contains it. |
| 4553 | // |
| 4554 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#selectionRange |
| 4555 | type SelectionRange struct { |
| 4556 | // The {@link Range range} of this selection range. |
| 4557 | Range Range `json:"range"` |
| 4558 | // The parent selection range containing this range. Therefore `parent.range` must contain `this.range`. |
| 4559 | Parent *SelectionRange `json:"parent,omitempty"` |
| 4560 | } |
| 4561 | |
| 4562 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#selectionRangeClientCapabilities |
| 4563 | type SelectionRangeClientCapabilities struct { |
| 4564 | // Whether implementation supports dynamic registration for selection range providers. If this is set to `true` |
| 4565 | // the client supports the new `SelectionRangeRegistrationOptions` return value for the corresponding server |
| 4566 | // capability as well. |
| 4567 | DynamicRegistration bool `json:"dynamicRegistration,omitempty"` |
| 4568 | } |
| 4569 | |
| 4570 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#selectionRangeOptions |
| 4571 | type SelectionRangeOptions struct { |
| 4572 | WorkDoneProgressOptions |
| 4573 | } |
| 4574 | |
| 4575 | // A parameter literal used in selection range requests. |
| 4576 | // |
| 4577 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#selectionRangeParams |
| 4578 | type SelectionRangeParams struct { |
| 4579 | // The text document. |
| 4580 | TextDocument TextDocumentIdentifier `json:"textDocument"` |
| 4581 | // The positions inside the text document. |
| 4582 | Positions []Position `json:"positions"` |
| 4583 | WorkDoneProgressParams |
| 4584 | PartialResultParams |
| 4585 | } |
| 4586 | |
| 4587 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#selectionRangeRegistrationOptions |
| 4588 | type SelectionRangeRegistrationOptions struct { |
| 4589 | SelectionRangeOptions |
| 4590 | TextDocumentRegistrationOptions |
| 4591 | StaticRegistrationOptions |
| 4592 | } |
| 4593 | |
| 4594 | // A set of predefined token modifiers. This set is not fixed |
| 4595 | // an clients can specify additional token types via the |
| 4596 | // corresponding client capabilities. |
| 4597 | // |
| 4598 | // @since 3.16.0 |
| 4599 | type SemanticTokenModifiers string |
| 4600 | |
| 4601 | // A set of predefined token types. This set is not fixed |
| 4602 | // an clients can specify additional token types via the |
| 4603 | // corresponding client capabilities. |
| 4604 | // |
| 4605 | // @since 3.16.0 |
| 4606 | type SemanticTokenTypes string |
| 4607 | |
| 4608 | // @since 3.16.0 |
| 4609 | // |
| 4610 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#semanticTokens |
| 4611 | type SemanticTokens struct { |
| 4612 | // An optional result id. If provided and clients support delta updating |
| 4613 | // the client will include the result id in the next semantic token request. |
| 4614 | // A server can then instead of computing all semantic tokens again simply |
| 4615 | // send a delta. |
| 4616 | ResultID string `json:"resultId,omitempty"` |
| 4617 | // The actual tokens. |
| 4618 | Data []uint32 `json:"data"` |
| 4619 | } |
| 4620 | |
| 4621 | // @since 3.16.0 |
| 4622 | // |
| 4623 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#semanticTokensClientCapabilities |
| 4624 | type SemanticTokensClientCapabilities struct { |
| 4625 | // Whether implementation supports dynamic registration. If this is set to `true` |
| 4626 | // the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` |
| 4627 | // return value for the corresponding server capability as well. |
| 4628 | DynamicRegistration bool `json:"dynamicRegistration,omitempty"` |
| 4629 | // Which requests the client supports and might send to the server |
| 4630 | // depending on the server's capability. Please note that clients might not |
| 4631 | // show semantic tokens or degrade some of the user experience if a range |
| 4632 | // or full request is advertised by the client but not provided by the |
| 4633 | // server. If for example the client capability `requests.full` and |
| 4634 | // `request.range` are both set to true but the server only provides a |
| 4635 | // range provider the client might not render a minimap correctly or might |
| 4636 | // even decide to not show any semantic tokens at all. |
| 4637 | Requests ClientSemanticTokensRequestOptions `json:"requests"` |
| 4638 | // The token types that the client supports. |
| 4639 | TokenTypes []string `json:"tokenTypes"` |
| 4640 | // The token modifiers that the client supports. |
| 4641 | TokenModifiers []string `json:"tokenModifiers"` |
| 4642 | // The token formats the clients supports. |
| 4643 | Formats []TokenFormat `json:"formats"` |
| 4644 | // Whether the client supports tokens that can overlap each other. |
| 4645 | OverlappingTokenSupport bool `json:"overlappingTokenSupport,omitempty"` |
| 4646 | // Whether the client supports tokens that can span multiple lines. |
| 4647 | MultilineTokenSupport bool `json:"multilineTokenSupport,omitempty"` |
| 4648 | // Whether the client allows the server to actively cancel a |
| 4649 | // semantic token request, e.g. supports returning |
| 4650 | // LSPErrorCodes.ServerCancelled. If a server does the client |
| 4651 | // needs to retrigger the request. |
| 4652 | // |
| 4653 | // @since 3.17.0 |
| 4654 | ServerCancelSupport bool `json:"serverCancelSupport,omitempty"` |
| 4655 | // Whether the client uses semantic tokens to augment existing |
| 4656 | // syntax tokens. If set to `true` client side created syntax |
| 4657 | // tokens and semantic tokens are both used for colorization. If |
| 4658 | // set to `false` the client only uses the returned semantic tokens |
| 4659 | // for colorization. |
| 4660 | // |
| 4661 | // If the value is `undefined` then the client behavior is not |
| 4662 | // specified. |
| 4663 | // |
| 4664 | // @since 3.17.0 |
| 4665 | AugmentsSyntaxTokens bool `json:"augmentsSyntaxTokens,omitempty"` |
| 4666 | } |
| 4667 | |
| 4668 | // @since 3.16.0 |
| 4669 | // |
| 4670 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#semanticTokensDelta |
| 4671 | type SemanticTokensDelta struct { |
| 4672 | ResultID string `json:"resultId,omitempty"` |
| 4673 | // The semantic token edits to transform a previous result into a new result. |
| 4674 | Edits []SemanticTokensEdit `json:"edits"` |
| 4675 | } |
| 4676 | |
| 4677 | // @since 3.16.0 |
| 4678 | // |
| 4679 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#semanticTokensDeltaParams |
| 4680 | type SemanticTokensDeltaParams struct { |
| 4681 | // The text document. |
| 4682 | TextDocument TextDocumentIdentifier `json:"textDocument"` |
| 4683 | // The result id of a previous response. The result Id can either point to a full response |
| 4684 | // or a delta response depending on what was received last. |
| 4685 | PreviousResultID string `json:"previousResultId"` |
| 4686 | WorkDoneProgressParams |
| 4687 | PartialResultParams |
| 4688 | } |
| 4689 | |
| 4690 | // @since 3.16.0 |
| 4691 | // |
| 4692 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#semanticTokensDeltaPartialResult |
| 4693 | type SemanticTokensDeltaPartialResult struct { |
| 4694 | Edits []SemanticTokensEdit `json:"edits"` |
| 4695 | } |
| 4696 | |
| 4697 | // @since 3.16.0 |
| 4698 | // |
| 4699 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#semanticTokensEdit |
| 4700 | type SemanticTokensEdit struct { |
| 4701 | // The start offset of the edit. |
| 4702 | Start uint32 `json:"start"` |
| 4703 | // The count of elements to remove. |
| 4704 | DeleteCount uint32 `json:"deleteCount"` |
| 4705 | // The elements to insert. |
| 4706 | Data []uint32 `json:"data,omitempty"` |
| 4707 | } |
| 4708 | |
| 4709 | // Semantic tokens options to support deltas for full documents |
| 4710 | // |
| 4711 | // @since 3.18.0 |
| 4712 | // |
| 4713 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#semanticTokensFullDelta |
| 4714 | type SemanticTokensFullDelta struct { |
| 4715 | // The server supports deltas for full documents. |
| 4716 | Delta bool `json:"delta,omitempty"` |
| 4717 | } |
| 4718 | |
| 4719 | // @since 3.16.0 |
| 4720 | // |
| 4721 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#semanticTokensLegend |
| 4722 | type SemanticTokensLegend struct { |
| 4723 | // The token types a server uses. |
| 4724 | TokenTypes []string `json:"tokenTypes"` |
| 4725 | // The token modifiers a server uses. |
| 4726 | TokenModifiers []string `json:"tokenModifiers"` |
| 4727 | } |
| 4728 | |
| 4729 | // @since 3.16.0 |
| 4730 | // |
| 4731 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#semanticTokensOptions |
| 4732 | type SemanticTokensOptions struct { |
| 4733 | // The legend used by the server |
| 4734 | Legend SemanticTokensLegend `json:"legend"` |
| 4735 | // Server supports providing semantic tokens for a specific range |
| 4736 | // of a document. |
| 4737 | Range *Or_SemanticTokensOptions_range `json:"range,omitempty"` |
| 4738 | // Server supports providing semantic tokens for a full document. |
| 4739 | Full *Or_SemanticTokensOptions_full `json:"full,omitempty"` |
| 4740 | WorkDoneProgressOptions |
| 4741 | } |
| 4742 | |
| 4743 | // @since 3.16.0 |
| 4744 | // |
| 4745 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#semanticTokensParams |
| 4746 | type SemanticTokensParams struct { |
| 4747 | // The text document. |
| 4748 | TextDocument TextDocumentIdentifier `json:"textDocument"` |
| 4749 | WorkDoneProgressParams |
| 4750 | PartialResultParams |
| 4751 | } |
| 4752 | |
| 4753 | // @since 3.16.0 |
| 4754 | // |
| 4755 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#semanticTokensPartialResult |
| 4756 | type SemanticTokensPartialResult struct { |
| 4757 | Data []uint32 `json:"data"` |
| 4758 | } |
| 4759 | |
| 4760 | // @since 3.16.0 |
| 4761 | // |
| 4762 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#semanticTokensRangeParams |
| 4763 | type SemanticTokensRangeParams struct { |
| 4764 | // The text document. |
| 4765 | TextDocument TextDocumentIdentifier `json:"textDocument"` |
| 4766 | // The range the semantic tokens are requested for. |
| 4767 | Range Range `json:"range"` |
| 4768 | WorkDoneProgressParams |
| 4769 | PartialResultParams |
| 4770 | } |
| 4771 | |
| 4772 | // @since 3.16.0 |
| 4773 | // |
| 4774 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#semanticTokensRegistrationOptions |
| 4775 | type SemanticTokensRegistrationOptions struct { |
| 4776 | TextDocumentRegistrationOptions |
| 4777 | SemanticTokensOptions |
| 4778 | StaticRegistrationOptions |
| 4779 | } |
| 4780 | |
| 4781 | // @since 3.16.0 |
| 4782 | // |
| 4783 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#semanticTokensWorkspaceClientCapabilities |
| 4784 | type SemanticTokensWorkspaceClientCapabilities struct { |
| 4785 | // Whether the client implementation supports a refresh request sent from |
| 4786 | // the server to the client. |
| 4787 | // |
| 4788 | // Note that this event is global and will force the client to refresh all |
| 4789 | // semantic tokens currently shown. It should be used with absolute care |
| 4790 | // and is useful for situation where a server for example detects a project |
| 4791 | // wide change that requires such a calculation. |
| 4792 | RefreshSupport bool `json:"refreshSupport,omitempty"` |
| 4793 | } |
| 4794 | |
| 4795 | // Defines the capabilities provided by a language |
| 4796 | // server. |
| 4797 | // |
| 4798 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#serverCapabilities |
| 4799 | type ServerCapabilities struct { |
| 4800 | // The position encoding the server picked from the encodings offered |
| 4801 | // by the client via the client capability `general.positionEncodings`. |
| 4802 | // |
| 4803 | // If the client didn't provide any position encodings the only valid |
| 4804 | // value that a server can return is 'utf-16'. |
| 4805 | // |
| 4806 | // If omitted it defaults to 'utf-16'. |
| 4807 | // |
| 4808 | // @since 3.17.0 |
| 4809 | PositionEncoding *PositionEncodingKind `json:"positionEncoding,omitempty"` |
| 4810 | // Defines how text documents are synced. Is either a detailed structure |
| 4811 | // defining each notification or for backwards compatibility the |
| 4812 | // TextDocumentSyncKind number. |
| 4813 | TextDocumentSync any `json:"textDocumentSync,omitempty"` |
| 4814 | // Defines how notebook documents are synced. |
| 4815 | // |
| 4816 | // @since 3.17.0 |
| 4817 | NotebookDocumentSync *Or_ServerCapabilities_notebookDocumentSync `json:"notebookDocumentSync,omitempty"` |
| 4818 | // The server provides completion support. |
| 4819 | CompletionProvider *CompletionOptions `json:"completionProvider,omitempty"` |
| 4820 | // The server provides hover support. |
| 4821 | HoverProvider *Or_ServerCapabilities_hoverProvider `json:"hoverProvider,omitempty"` |
| 4822 | // The server provides signature help support. |
| 4823 | SignatureHelpProvider *SignatureHelpOptions `json:"signatureHelpProvider,omitempty"` |
| 4824 | // The server provides Goto Declaration support. |
| 4825 | DeclarationProvider *Or_ServerCapabilities_declarationProvider `json:"declarationProvider,omitempty"` |
| 4826 | // The server provides goto definition support. |
| 4827 | DefinitionProvider *Or_ServerCapabilities_definitionProvider `json:"definitionProvider,omitempty"` |
| 4828 | // The server provides Goto Type Definition support. |
| 4829 | TypeDefinitionProvider *Or_ServerCapabilities_typeDefinitionProvider `json:"typeDefinitionProvider,omitempty"` |
| 4830 | // The server provides Goto Implementation support. |
| 4831 | ImplementationProvider *Or_ServerCapabilities_implementationProvider `json:"implementationProvider,omitempty"` |
| 4832 | // The server provides find references support. |
| 4833 | ReferencesProvider *Or_ServerCapabilities_referencesProvider `json:"referencesProvider,omitempty"` |
| 4834 | // The server provides document highlight support. |
| 4835 | DocumentHighlightProvider *Or_ServerCapabilities_documentHighlightProvider `json:"documentHighlightProvider,omitempty"` |
| 4836 | // The server provides document symbol support. |
| 4837 | DocumentSymbolProvider *Or_ServerCapabilities_documentSymbolProvider `json:"documentSymbolProvider,omitempty"` |
| 4838 | // The server provides code actions. CodeActionOptions may only be |
| 4839 | // specified if the client states that it supports |
| 4840 | // `codeActionLiteralSupport` in its initial `initialize` request. |
| 4841 | CodeActionProvider any `json:"codeActionProvider,omitempty"` |
| 4842 | // The server provides code lens. |
| 4843 | CodeLensProvider *CodeLensOptions `json:"codeLensProvider,omitempty"` |
| 4844 | // The server provides document link support. |
| 4845 | DocumentLinkProvider *DocumentLinkOptions `json:"documentLinkProvider,omitempty"` |
| 4846 | // The server provides color provider support. |
| 4847 | ColorProvider *Or_ServerCapabilities_colorProvider `json:"colorProvider,omitempty"` |
| 4848 | // The server provides workspace symbol support. |
| 4849 | WorkspaceSymbolProvider *Or_ServerCapabilities_workspaceSymbolProvider `json:"workspaceSymbolProvider,omitempty"` |
| 4850 | // The server provides document formatting. |
| 4851 | DocumentFormattingProvider *Or_ServerCapabilities_documentFormattingProvider `json:"documentFormattingProvider,omitempty"` |
| 4852 | // The server provides document range formatting. |
| 4853 | DocumentRangeFormattingProvider *Or_ServerCapabilities_documentRangeFormattingProvider `json:"documentRangeFormattingProvider,omitempty"` |
| 4854 | // The server provides document formatting on typing. |
| 4855 | DocumentOnTypeFormattingProvider *DocumentOnTypeFormattingOptions `json:"documentOnTypeFormattingProvider,omitempty"` |
| 4856 | // The server provides rename support. RenameOptions may only be |
| 4857 | // specified if the client states that it supports |
| 4858 | // `prepareSupport` in its initial `initialize` request. |
| 4859 | RenameProvider any `json:"renameProvider,omitempty"` |
| 4860 | // The server provides folding provider support. |
| 4861 | FoldingRangeProvider *Or_ServerCapabilities_foldingRangeProvider `json:"foldingRangeProvider,omitempty"` |
| 4862 | // The server provides selection range support. |
| 4863 | SelectionRangeProvider *Or_ServerCapabilities_selectionRangeProvider `json:"selectionRangeProvider,omitempty"` |
| 4864 | // The server provides execute command support. |
| 4865 | ExecuteCommandProvider *ExecuteCommandOptions `json:"executeCommandProvider,omitempty"` |
| 4866 | // The server provides call hierarchy support. |
| 4867 | // |
| 4868 | // @since 3.16.0 |
| 4869 | CallHierarchyProvider *Or_ServerCapabilities_callHierarchyProvider `json:"callHierarchyProvider,omitempty"` |
| 4870 | // The server provides linked editing range support. |
| 4871 | // |
| 4872 | // @since 3.16.0 |
| 4873 | LinkedEditingRangeProvider *Or_ServerCapabilities_linkedEditingRangeProvider `json:"linkedEditingRangeProvider,omitempty"` |
| 4874 | // The server provides semantic tokens support. |
| 4875 | // |
| 4876 | // @since 3.16.0 |
| 4877 | SemanticTokensProvider any `json:"semanticTokensProvider,omitempty"` |
| 4878 | // The server provides moniker support. |
| 4879 | // |
| 4880 | // @since 3.16.0 |
| 4881 | MonikerProvider *Or_ServerCapabilities_monikerProvider `json:"monikerProvider,omitempty"` |
| 4882 | // The server provides type hierarchy support. |
| 4883 | // |
| 4884 | // @since 3.17.0 |
| 4885 | TypeHierarchyProvider *Or_ServerCapabilities_typeHierarchyProvider `json:"typeHierarchyProvider,omitempty"` |
| 4886 | // The server provides inline values. |
| 4887 | // |
| 4888 | // @since 3.17.0 |
| 4889 | InlineValueProvider *Or_ServerCapabilities_inlineValueProvider `json:"inlineValueProvider,omitempty"` |
| 4890 | // The server provides inlay hints. |
| 4891 | // |
| 4892 | // @since 3.17.0 |
| 4893 | InlayHintProvider any `json:"inlayHintProvider,omitempty"` |
| 4894 | // The server has support for pull model diagnostics. |
| 4895 | // |
| 4896 | // @since 3.17.0 |
| 4897 | DiagnosticProvider *Or_ServerCapabilities_diagnosticProvider `json:"diagnosticProvider,omitempty"` |
| 4898 | // Inline completion options used during static registration. |
| 4899 | // |
| 4900 | // @since 3.18.0 |
| 4901 | // @proposed |
| 4902 | InlineCompletionProvider *Or_ServerCapabilities_inlineCompletionProvider `json:"inlineCompletionProvider,omitempty"` |
| 4903 | // Workspace specific server capabilities. |
| 4904 | Workspace *WorkspaceOptions `json:"workspace,omitempty"` |
| 4905 | // Experimental server capabilities. |
| 4906 | Experimental any `json:"experimental,omitempty"` |
| 4907 | } |
| 4908 | |
| 4909 | // @since 3.18.0 |
| 4910 | // |
| 4911 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#serverCompletionItemOptions |
| 4912 | type ServerCompletionItemOptions struct { |
| 4913 | // The server has support for completion item label |
| 4914 | // details (see also `CompletionItemLabelDetails`) when |
| 4915 | // receiving a completion item in a resolve call. |
| 4916 | // |
| 4917 | // @since 3.17.0 |
| 4918 | LabelDetailsSupport bool `json:"labelDetailsSupport,omitempty"` |
| 4919 | } |
| 4920 | |
| 4921 | // Information about the server |
| 4922 | // |
| 4923 | // @since 3.15.0 |
| 4924 | // @since 3.18.0 ServerInfo type name added. |
| 4925 | // |
| 4926 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#serverInfo |
| 4927 | type ServerInfo struct { |
| 4928 | // The name of the server as defined by the server. |
| 4929 | Name string `json:"name"` |
| 4930 | // The server's version as defined by the server. |
| 4931 | Version string `json:"version,omitempty"` |
| 4932 | } |
| 4933 | |
| 4934 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#setTraceParams |
| 4935 | type SetTraceParams struct { |
| 4936 | Value TraceValue `json:"value"` |
| 4937 | } |
| 4938 | |
| 4939 | // Client capabilities for the showDocument request. |
| 4940 | // |
| 4941 | // @since 3.16.0 |
| 4942 | // |
| 4943 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#showDocumentClientCapabilities |
| 4944 | type ShowDocumentClientCapabilities struct { |
| 4945 | // The client has support for the showDocument |
| 4946 | // request. |
| 4947 | Support bool `json:"support"` |
| 4948 | } |
| 4949 | |
| 4950 | // Params to show a resource in the UI. |
| 4951 | // |
| 4952 | // @since 3.16.0 |
| 4953 | // |
| 4954 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#showDocumentParams |
| 4955 | type ShowDocumentParams struct { |
| 4956 | // The uri to show. |
| 4957 | URI URI `json:"uri"` |
| 4958 | // Indicates to show the resource in an external program. |
| 4959 | // To show, for example, `https://code.visualstudio.com/` |
| 4960 | // in the default WEB browser set `external` to `true`. |
| 4961 | External bool `json:"external,omitempty"` |
| 4962 | // An optional property to indicate whether the editor |
| 4963 | // showing the document should take focus or not. |
| 4964 | // Clients might ignore this property if an external |
| 4965 | // program is started. |
| 4966 | TakeFocus bool `json:"takeFocus,omitempty"` |
| 4967 | // An optional selection range if the document is a text |
| 4968 | // document. Clients might ignore the property if an |
| 4969 | // external program is started or the file is not a text |
| 4970 | // file. |
| 4971 | Selection *Range `json:"selection,omitempty"` |
| 4972 | } |
| 4973 | |
| 4974 | // The result of a showDocument request. |
| 4975 | // |
| 4976 | // @since 3.16.0 |
| 4977 | // |
| 4978 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#showDocumentResult |
| 4979 | type ShowDocumentResult struct { |
| 4980 | // A boolean indicating if the show was successful. |
| 4981 | Success bool `json:"success"` |
| 4982 | } |
| 4983 | |
| 4984 | // The parameters of a notification message. |
| 4985 | // |
| 4986 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#showMessageParams |
| 4987 | type ShowMessageParams struct { |
| 4988 | // The message type. See {@link MessageType} |
| 4989 | Type MessageType `json:"type"` |
| 4990 | // The actual message. |
| 4991 | Message string `json:"message"` |
| 4992 | } |
| 4993 | |
| 4994 | // Show message request client capabilities |
| 4995 | // |
| 4996 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#showMessageRequestClientCapabilities |
| 4997 | type ShowMessageRequestClientCapabilities struct { |
| 4998 | // Capabilities specific to the `MessageActionItem` type. |
| 4999 | MessageActionItem *ClientShowMessageActionItemOptions `json:"messageActionItem,omitempty"` |
| 5000 | } |
| 5001 | |
| 5002 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#showMessageRequestParams |
| 5003 | type ShowMessageRequestParams struct { |
| 5004 | // The message type. See {@link MessageType} |
| 5005 | Type MessageType `json:"type"` |
| 5006 | // The actual message. |
| 5007 | Message string `json:"message"` |
| 5008 | // The message action items to present. |
| 5009 | Actions []MessageActionItem `json:"actions,omitempty"` |
| 5010 | } |
| 5011 | |
| 5012 | // Signature help represents the signature of something |
| 5013 | // callable. There can be multiple signature but only one |
| 5014 | // active and only one active parameter. |
| 5015 | // |
| 5016 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#signatureHelp |
| 5017 | type SignatureHelp struct { |
| 5018 | // One or more signatures. |
| 5019 | Signatures []SignatureInformation `json:"signatures"` |
| 5020 | // The active signature. If omitted or the value lies outside the |
| 5021 | // range of `signatures` the value defaults to zero or is ignored if |
| 5022 | // the `SignatureHelp` has no signatures. |
| 5023 | // |
| 5024 | // Whenever possible implementors should make an active decision about |
| 5025 | // the active signature and shouldn't rely on a default value. |
| 5026 | // |
| 5027 | // In future version of the protocol this property might become |
| 5028 | // mandatory to better express this. |
| 5029 | ActiveSignature uint32 `json:"activeSignature"` |
| 5030 | // The active parameter of the active signature. |
| 5031 | // |
| 5032 | // If `null`, no parameter of the signature is active (for example a named |
| 5033 | // argument that does not match any declared parameters). This is only valid |
| 5034 | // if the client specifies the client capability |
| 5035 | // `textDocument.signatureHelp.noActiveParameterSupport === true` |
| 5036 | // |
| 5037 | // If omitted or the value lies outside the range of |
| 5038 | // `signatures[activeSignature].parameters` defaults to 0 if the active |
| 5039 | // signature has parameters. |
| 5040 | // |
| 5041 | // If the active signature has no parameters it is ignored. |
| 5042 | // |
| 5043 | // In future version of the protocol this property might become |
| 5044 | // mandatory (but still nullable) to better express the active parameter if |
| 5045 | // the active signature does have any. |
| 5046 | ActiveParameter *uint32 `json:"activeParameter,omitempty"` |
| 5047 | } |
| 5048 | |
| 5049 | // Client Capabilities for a {@link SignatureHelpRequest}. |
| 5050 | // |
| 5051 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#signatureHelpClientCapabilities |
| 5052 | type SignatureHelpClientCapabilities struct { |
| 5053 | // Whether signature help supports dynamic registration. |
| 5054 | DynamicRegistration bool `json:"dynamicRegistration,omitempty"` |
| 5055 | // The client supports the following `SignatureInformation` |
| 5056 | // specific properties. |
| 5057 | SignatureInformation *ClientSignatureInformationOptions `json:"signatureInformation,omitempty"` |
| 5058 | // The client supports to send additional context information for a |
| 5059 | // `textDocument/signatureHelp` request. A client that opts into |
| 5060 | // contextSupport will also support the `retriggerCharacters` on |
| 5061 | // `SignatureHelpOptions`. |
| 5062 | // |
| 5063 | // @since 3.15.0 |
| 5064 | ContextSupport bool `json:"contextSupport,omitempty"` |
| 5065 | } |
| 5066 | |
| 5067 | // Additional information about the context in which a signature help request was triggered. |
| 5068 | // |
| 5069 | // @since 3.15.0 |
| 5070 | // |
| 5071 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#signatureHelpContext |
| 5072 | type SignatureHelpContext struct { |
| 5073 | // Action that caused signature help to be triggered. |
| 5074 | TriggerKind SignatureHelpTriggerKind `json:"triggerKind"` |
| 5075 | // Character that caused signature help to be triggered. |
| 5076 | // |
| 5077 | // This is undefined when `triggerKind !== SignatureHelpTriggerKind.TriggerCharacter` |
| 5078 | TriggerCharacter string `json:"triggerCharacter,omitempty"` |
| 5079 | // `true` if signature help was already showing when it was triggered. |
| 5080 | // |
| 5081 | // Retriggers occurs when the signature help is already active and can be caused by actions such as |
| 5082 | // typing a trigger character, a cursor move, or document content changes. |
| 5083 | IsRetrigger bool `json:"isRetrigger"` |
| 5084 | // The currently active `SignatureHelp`. |
| 5085 | // |
| 5086 | // The `activeSignatureHelp` has its `SignatureHelp.activeSignature` field updated based on |
| 5087 | // the user navigating through available signatures. |
| 5088 | ActiveSignatureHelp *SignatureHelp `json:"activeSignatureHelp,omitempty"` |
| 5089 | } |
| 5090 | |
| 5091 | // Server Capabilities for a {@link SignatureHelpRequest}. |
| 5092 | // |
| 5093 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#signatureHelpOptions |
| 5094 | type SignatureHelpOptions struct { |
| 5095 | // List of characters that trigger signature help automatically. |
| 5096 | TriggerCharacters []string `json:"triggerCharacters,omitempty"` |
| 5097 | // List of characters that re-trigger signature help. |
| 5098 | // |
| 5099 | // These trigger characters are only active when signature help is already showing. All trigger characters |
| 5100 | // are also counted as re-trigger characters. |
| 5101 | // |
| 5102 | // @since 3.15.0 |
| 5103 | RetriggerCharacters []string `json:"retriggerCharacters,omitempty"` |
| 5104 | WorkDoneProgressOptions |
| 5105 | } |
| 5106 | |
| 5107 | // Parameters for a {@link SignatureHelpRequest}. |
| 5108 | // |
| 5109 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#signatureHelpParams |
| 5110 | type SignatureHelpParams struct { |
| 5111 | // The signature help context. This is only available if the client specifies |
| 5112 | // to send this using the client capability `textDocument.signatureHelp.contextSupport === true` |
| 5113 | // |
| 5114 | // @since 3.15.0 |
| 5115 | Context *SignatureHelpContext `json:"context,omitempty"` |
| 5116 | TextDocumentPositionParams |
| 5117 | WorkDoneProgressParams |
| 5118 | } |
| 5119 | |
| 5120 | // Registration options for a {@link SignatureHelpRequest}. |
| 5121 | // |
| 5122 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#signatureHelpRegistrationOptions |
| 5123 | type SignatureHelpRegistrationOptions struct { |
| 5124 | TextDocumentRegistrationOptions |
| 5125 | SignatureHelpOptions |
| 5126 | } |
| 5127 | |
| 5128 | // How a signature help was triggered. |
| 5129 | // |
| 5130 | // @since 3.15.0 |
| 5131 | type SignatureHelpTriggerKind uint32 |
| 5132 | |
| 5133 | // Represents the signature of something callable. A signature |
| 5134 | // can have a label, like a function-name, a doc-comment, and |
| 5135 | // a set of parameters. |
| 5136 | // |
| 5137 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#signatureInformation |
| 5138 | type SignatureInformation struct { |
| 5139 | // The label of this signature. Will be shown in |
| 5140 | // the UI. |
| 5141 | Label string `json:"label"` |
| 5142 | // The human-readable doc-comment of this signature. Will be shown |
| 5143 | // in the UI but can be omitted. |
| 5144 | Documentation *Or_SignatureInformation_documentation `json:"documentation,omitempty"` |
| 5145 | // The parameters of this signature. |
| 5146 | Parameters []ParameterInformation `json:"parameters,omitempty"` |
| 5147 | // The index of the active parameter. |
| 5148 | // |
| 5149 | // If `null`, no parameter of the signature is active (for example a named |
| 5150 | // argument that does not match any declared parameters). This is only valid |
| 5151 | // if the client specifies the client capability |
| 5152 | // `textDocument.signatureHelp.noActiveParameterSupport === true` |
| 5153 | // |
| 5154 | // If provided (or `null`), this is used in place of |
| 5155 | // `SignatureHelp.activeParameter`. |
| 5156 | // |
| 5157 | // @since 3.16.0 |
| 5158 | ActiveParameter *uint32 `json:"activeParameter,omitempty"` |
| 5159 | } |
| 5160 | |
| 5161 | // An interactive text edit. |
| 5162 | // |
| 5163 | // @since 3.18.0 |
| 5164 | // @proposed |
| 5165 | // |
| 5166 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#snippetTextEdit |
| 5167 | type SnippetTextEdit struct { |
| 5168 | // The range of the text document to be manipulated. |
| 5169 | Range Range `json:"range"` |
| 5170 | // The snippet to be inserted. |
| 5171 | Snippet StringValue `json:"snippet"` |
| 5172 | // The actual identifier of the snippet edit. |
| 5173 | AnnotationID *ChangeAnnotationIdentifier `json:"annotationId,omitempty"` |
| 5174 | } |
| 5175 | |
| 5176 | // @since 3.18.0 |
| 5177 | // |
| 5178 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#staleRequestSupportOptions |
| 5179 | type StaleRequestSupportOptions struct { |
| 5180 | // The client will actively cancel the request. |
| 5181 | Cancel bool `json:"cancel"` |
| 5182 | // The list of requests for which the client |
| 5183 | // will retry the request if it receives a |
| 5184 | // response with error code `ContentModified` |
| 5185 | RetryOnContentModified []string `json:"retryOnContentModified"` |
| 5186 | } |
| 5187 | |
| 5188 | // Static registration options to be returned in the initialize |
| 5189 | // request. |
| 5190 | // |
| 5191 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#staticRegistrationOptions |
| 5192 | type StaticRegistrationOptions struct { |
| 5193 | // The id used to register the request. The id can be used to deregister |
| 5194 | // the request again. See also Registration#id. |
| 5195 | ID string `json:"id,omitempty"` |
| 5196 | } |
| 5197 | |
| 5198 | // A string value used as a snippet is a template which allows to insert text |
| 5199 | // and to control the editor cursor when insertion happens. |
| 5200 | // |
| 5201 | // A snippet can define tab stops and placeholders with `$1`, `$2` |
| 5202 | // and `${3:foo}`. `$0` defines the final tab stop, it defaults to |
| 5203 | // the end of the snippet. Variables are defined with `$name` and |
| 5204 | // `${name:default value}`. |
| 5205 | // |
| 5206 | // @since 3.18.0 |
| 5207 | // @proposed |
| 5208 | // |
| 5209 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#stringValue |
| 5210 | type StringValue struct { |
| 5211 | // The kind of string value. |
| 5212 | Kind string `json:"kind"` |
| 5213 | // The snippet string. |
| 5214 | Value string `json:"value"` |
| 5215 | } |
| 5216 | |
| 5217 | // Represents information about programming constructs like variables, classes, |
| 5218 | // interfaces etc. |
| 5219 | // |
| 5220 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#symbolInformation |
| 5221 | type SymbolInformation struct { |
| 5222 | // extends BaseSymbolInformation |
| 5223 | // Indicates if this symbol is deprecated. |
| 5224 | // |
| 5225 | // @deprecated Use tags instead |
| 5226 | Deprecated bool `json:"deprecated,omitempty"` |
| 5227 | // The location of this symbol. The location's range is used by a tool |
| 5228 | // to reveal the location in the editor. If the symbol is selected in the |
| 5229 | // tool the range's start information is used to position the cursor. So |
| 5230 | // the range usually spans more than the actual symbol's name and does |
| 5231 | // normally include things like visibility modifiers. |
| 5232 | // |
| 5233 | // The range doesn't have to denote a node range in the sense of an abstract |
| 5234 | // syntax tree. It can therefore not be used to re-construct a hierarchy of |
| 5235 | // the symbols. |
| 5236 | Location Location `json:"location"` |
| 5237 | // The name of this symbol. |
| 5238 | Name string `json:"name"` |
| 5239 | // The kind of this symbol. |
| 5240 | Kind SymbolKind `json:"kind"` |
| 5241 | // Tags for this symbol. |
| 5242 | // |
| 5243 | // @since 3.16.0 |
| 5244 | Tags []SymbolTag `json:"tags,omitempty"` |
| 5245 | // The name of the symbol containing this symbol. This information is for |
| 5246 | // user interface purposes (e.g. to render a qualifier in the user interface |
| 5247 | // if necessary). It can't be used to re-infer a hierarchy for the document |
| 5248 | // symbols. |
| 5249 | ContainerName string `json:"containerName,omitempty"` |
| 5250 | } |
| 5251 | |
| 5252 | // A symbol kind. |
| 5253 | type SymbolKind uint32 |
| 5254 | |
| 5255 | // Symbol tags are extra annotations that tweak the rendering of a symbol. |
| 5256 | // |
| 5257 | // @since 3.16 |
| 5258 | type SymbolTag uint32 |
| 5259 | |
| 5260 | // Describe options to be used when registered for text document change events. |
| 5261 | // |
| 5262 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocumentChangeRegistrationOptions |
| 5263 | type TextDocumentChangeRegistrationOptions struct { |
| 5264 | // How documents are synced to the server. |
| 5265 | SyncKind TextDocumentSyncKind `json:"syncKind"` |
| 5266 | TextDocumentRegistrationOptions |
| 5267 | } |
| 5268 | |
| 5269 | // Text document specific client capabilities. |
| 5270 | // |
| 5271 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocumentClientCapabilities |
| 5272 | type TextDocumentClientCapabilities struct { |
| 5273 | // Defines which synchronization capabilities the client supports. |
| 5274 | Synchronization *TextDocumentSyncClientCapabilities `json:"synchronization,omitempty"` |
| 5275 | // Defines which filters the client supports. |
| 5276 | // |
| 5277 | // @since 3.18.0 |
| 5278 | Filters *TextDocumentFilterClientCapabilities `json:"filters,omitempty"` |
| 5279 | // Capabilities specific to the `textDocument/completion` request. |
| 5280 | Completion CompletionClientCapabilities `json:"completion,omitempty"` |
| 5281 | // Capabilities specific to the `textDocument/hover` request. |
| 5282 | Hover *HoverClientCapabilities `json:"hover,omitempty"` |
| 5283 | // Capabilities specific to the `textDocument/signatureHelp` request. |
| 5284 | SignatureHelp *SignatureHelpClientCapabilities `json:"signatureHelp,omitempty"` |
| 5285 | // Capabilities specific to the `textDocument/declaration` request. |
| 5286 | // |
| 5287 | // @since 3.14.0 |
| 5288 | Declaration *DeclarationClientCapabilities `json:"declaration,omitempty"` |
| 5289 | // Capabilities specific to the `textDocument/definition` request. |
| 5290 | Definition *DefinitionClientCapabilities `json:"definition,omitempty"` |
| 5291 | // Capabilities specific to the `textDocument/typeDefinition` request. |
| 5292 | // |
| 5293 | // @since 3.6.0 |
| 5294 | TypeDefinition *TypeDefinitionClientCapabilities `json:"typeDefinition,omitempty"` |
| 5295 | // Capabilities specific to the `textDocument/implementation` request. |
| 5296 | // |
| 5297 | // @since 3.6.0 |
| 5298 | Implementation *ImplementationClientCapabilities `json:"implementation,omitempty"` |
| 5299 | // Capabilities specific to the `textDocument/references` request. |
| 5300 | References *ReferenceClientCapabilities `json:"references,omitempty"` |
| 5301 | // Capabilities specific to the `textDocument/documentHighlight` request. |
| 5302 | DocumentHighlight *DocumentHighlightClientCapabilities `json:"documentHighlight,omitempty"` |
| 5303 | // Capabilities specific to the `textDocument/documentSymbol` request. |
| 5304 | DocumentSymbol DocumentSymbolClientCapabilities `json:"documentSymbol,omitempty"` |
| 5305 | // Capabilities specific to the `textDocument/codeAction` request. |
| 5306 | CodeAction CodeActionClientCapabilities `json:"codeAction,omitempty"` |
| 5307 | // Capabilities specific to the `textDocument/codeLens` request. |
| 5308 | CodeLens *CodeLensClientCapabilities `json:"codeLens,omitempty"` |
| 5309 | // Capabilities specific to the `textDocument/documentLink` request. |
| 5310 | DocumentLink *DocumentLinkClientCapabilities `json:"documentLink,omitempty"` |
| 5311 | // Capabilities specific to the `textDocument/documentColor` and the |
| 5312 | // `textDocument/colorPresentation` request. |
| 5313 | // |
| 5314 | // @since 3.6.0 |
| 5315 | ColorProvider *DocumentColorClientCapabilities `json:"colorProvider,omitempty"` |
| 5316 | // Capabilities specific to the `textDocument/formatting` request. |
| 5317 | Formatting *DocumentFormattingClientCapabilities `json:"formatting,omitempty"` |
| 5318 | // Capabilities specific to the `textDocument/rangeFormatting` request. |
| 5319 | RangeFormatting *DocumentRangeFormattingClientCapabilities `json:"rangeFormatting,omitempty"` |
| 5320 | // Capabilities specific to the `textDocument/onTypeFormatting` request. |
| 5321 | OnTypeFormatting *DocumentOnTypeFormattingClientCapabilities `json:"onTypeFormatting,omitempty"` |
| 5322 | // Capabilities specific to the `textDocument/rename` request. |
| 5323 | Rename *RenameClientCapabilities `json:"rename,omitempty"` |
| 5324 | // Capabilities specific to the `textDocument/foldingRange` request. |
| 5325 | // |
| 5326 | // @since 3.10.0 |
| 5327 | FoldingRange *FoldingRangeClientCapabilities `json:"foldingRange,omitempty"` |
| 5328 | // Capabilities specific to the `textDocument/selectionRange` request. |
| 5329 | // |
| 5330 | // @since 3.15.0 |
| 5331 | SelectionRange *SelectionRangeClientCapabilities `json:"selectionRange,omitempty"` |
| 5332 | // Capabilities specific to the `textDocument/publishDiagnostics` notification. |
| 5333 | PublishDiagnostics PublishDiagnosticsClientCapabilities `json:"publishDiagnostics,omitempty"` |
| 5334 | // Capabilities specific to the various call hierarchy requests. |
| 5335 | // |
| 5336 | // @since 3.16.0 |
| 5337 | CallHierarchy *CallHierarchyClientCapabilities `json:"callHierarchy,omitempty"` |
| 5338 | // Capabilities specific to the various semantic token request. |
| 5339 | // |
| 5340 | // @since 3.16.0 |
| 5341 | SemanticTokens SemanticTokensClientCapabilities `json:"semanticTokens,omitempty"` |
| 5342 | // Capabilities specific to the `textDocument/linkedEditingRange` request. |
| 5343 | // |
| 5344 | // @since 3.16.0 |
| 5345 | LinkedEditingRange *LinkedEditingRangeClientCapabilities `json:"linkedEditingRange,omitempty"` |
| 5346 | // Client capabilities specific to the `textDocument/moniker` request. |
| 5347 | // |
| 5348 | // @since 3.16.0 |
| 5349 | Moniker *MonikerClientCapabilities `json:"moniker,omitempty"` |
| 5350 | // Capabilities specific to the various type hierarchy requests. |
| 5351 | // |
| 5352 | // @since 3.17.0 |
| 5353 | TypeHierarchy *TypeHierarchyClientCapabilities `json:"typeHierarchy,omitempty"` |
| 5354 | // Capabilities specific to the `textDocument/inlineValue` request. |
| 5355 | // |
| 5356 | // @since 3.17.0 |
| 5357 | InlineValue *InlineValueClientCapabilities `json:"inlineValue,omitempty"` |
| 5358 | // Capabilities specific to the `textDocument/inlayHint` request. |
| 5359 | // |
| 5360 | // @since 3.17.0 |
| 5361 | InlayHint *InlayHintClientCapabilities `json:"inlayHint,omitempty"` |
| 5362 | // Capabilities specific to the diagnostic pull model. |
| 5363 | // |
| 5364 | // @since 3.17.0 |
| 5365 | Diagnostic *DiagnosticClientCapabilities `json:"diagnostic,omitempty"` |
| 5366 | // Client capabilities specific to inline completions. |
| 5367 | // |
| 5368 | // @since 3.18.0 |
| 5369 | // @proposed |
| 5370 | InlineCompletion *InlineCompletionClientCapabilities `json:"inlineCompletion,omitempty"` |
| 5371 | } |
| 5372 | |
| 5373 | // An event describing a change to a text document. If only a text is provided |
| 5374 | // it is considered to be the full content of the document. |
| 5375 | // |
| 5376 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocumentContentChangeEvent |
| 5377 | type TextDocumentContentChangeEvent = TextDocumentContentChangePartial // (alias) |
| 5378 | // @since 3.18.0 |
| 5379 | // |
| 5380 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocumentContentChangePartial |
| 5381 | type TextDocumentContentChangePartial struct { |
| 5382 | // The range of the document that changed. |
| 5383 | Range *Range `json:"range,omitempty"` |
| 5384 | // The optional length of the range that got replaced. |
| 5385 | // |
| 5386 | // @deprecated use range instead. |
| 5387 | RangeLength *uint32 `json:"rangeLength,omitempty"` |
| 5388 | // The new text for the provided range. |
| 5389 | Text string `json:"text"` |
| 5390 | } |
| 5391 | |
| 5392 | // @since 3.18.0 |
| 5393 | // |
| 5394 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocumentContentChangeWholeDocument |
| 5395 | type TextDocumentContentChangeWholeDocument struct { |
| 5396 | // The new text of the whole document. |
| 5397 | Text string `json:"text"` |
| 5398 | } |
| 5399 | |
| 5400 | // Client capabilities for a text document content provider. |
| 5401 | // |
| 5402 | // @since 3.18.0 |
| 5403 | // @proposed |
| 5404 | // |
| 5405 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocumentContentClientCapabilities |
| 5406 | type TextDocumentContentClientCapabilities struct { |
| 5407 | // Text document content provider supports dynamic registration. |
| 5408 | DynamicRegistration bool `json:"dynamicRegistration,omitempty"` |
| 5409 | } |
| 5410 | |
| 5411 | // Text document content provider options. |
| 5412 | // |
| 5413 | // @since 3.18.0 |
| 5414 | // @proposed |
| 5415 | // |
| 5416 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocumentContentOptions |
| 5417 | type TextDocumentContentOptions struct { |
| 5418 | // The schemes for which the server provides content. |
| 5419 | Schemes []string `json:"schemes"` |
| 5420 | } |
| 5421 | |
| 5422 | // Parameters for the `workspace/textDocumentContent` request. |
| 5423 | // |
| 5424 | // @since 3.18.0 |
| 5425 | // @proposed |
| 5426 | // |
| 5427 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocumentContentParams |
| 5428 | type TextDocumentContentParams struct { |
| 5429 | // The uri of the text document. |
| 5430 | URI DocumentURI `json:"uri"` |
| 5431 | } |
| 5432 | |
| 5433 | // Parameters for the `workspace/textDocumentContent/refresh` request. |
| 5434 | // |
| 5435 | // @since 3.18.0 |
| 5436 | // @proposed |
| 5437 | // |
| 5438 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocumentContentRefreshParams |
| 5439 | type TextDocumentContentRefreshParams struct { |
| 5440 | // The uri of the text document to refresh. |
| 5441 | URI DocumentURI `json:"uri"` |
| 5442 | } |
| 5443 | |
| 5444 | // Text document content provider registration options. |
| 5445 | // |
| 5446 | // @since 3.18.0 |
| 5447 | // @proposed |
| 5448 | // |
| 5449 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocumentContentRegistrationOptions |
| 5450 | type TextDocumentContentRegistrationOptions struct { |
| 5451 | TextDocumentContentOptions |
| 5452 | StaticRegistrationOptions |
| 5453 | } |
| 5454 | |
| 5455 | // Result of the `workspace/textDocumentContent` request. |
| 5456 | // |
| 5457 | // @since 3.18.0 |
| 5458 | // @proposed |
| 5459 | // |
| 5460 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocumentContentResult |
| 5461 | type TextDocumentContentResult struct { |
| 5462 | // The text content of the text document. Please note, that the content of |
| 5463 | // any subsequent open notifications for the text document might differ |
| 5464 | // from the returned content due to whitespace and line ending |
| 5465 | // normalizations done on the client |
| 5466 | Text string `json:"text"` |
| 5467 | } |
| 5468 | |
| 5469 | // Describes textual changes on a text document. A TextDocumentEdit describes all changes |
| 5470 | // on a document version Si and after they are applied move the document to version Si+1. |
| 5471 | // So the creator of a TextDocumentEdit doesn't need to sort the array of edits or do any |
| 5472 | // kind of ordering. However the edits must be non overlapping. |
| 5473 | // |
| 5474 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocumentEdit |
| 5475 | type TextDocumentEdit struct { |
| 5476 | // The text document to change. |
| 5477 | TextDocument OptionalVersionedTextDocumentIdentifier `json:"textDocument"` |
| 5478 | // The edits to be applied. |
| 5479 | // |
| 5480 | // @since 3.16.0 - support for AnnotatedTextEdit. This is guarded using a |
| 5481 | // client capability. |
| 5482 | // |
| 5483 | // @since 3.18.0 - support for SnippetTextEdit. This is guarded using a |
| 5484 | // client capability. |
| 5485 | Edits []Or_TextDocumentEdit_edits_Elem `json:"edits"` |
| 5486 | } |
| 5487 | |
| 5488 | // A document filter denotes a document by different properties like |
| 5489 | // the {@link TextDocument.languageId language}, the {@link Uri.scheme scheme} of |
| 5490 | // its resource, or a glob-pattern that is applied to the {@link TextDocument.fileName path}. |
| 5491 | // |
| 5492 | // Glob patterns can have the following syntax: |
| 5493 | // |
| 5494 | // - `*` to match one or more characters in a path segment |
| 5495 | // - `?` to match on one character in a path segment |
| 5496 | // - `**` to match any number of path segments, including none |
| 5497 | // - `{}` to group sub patterns into an OR expression. (e.g. `**/*.{ts,js}` matches all TypeScript and JavaScript files) |
| 5498 | // - `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …) |
| 5499 | // - `[!...]` 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`) |
| 5500 | // |
| 5501 | // @sample A language filter that applies to typescript files on disk: `{ language: 'typescript', scheme: 'file' }` |
| 5502 | // @sample A language filter that applies to all package.json paths: `{ language: 'json', pattern: '**package.json' }` |
| 5503 | // |
| 5504 | // @since 3.17.0 |
| 5505 | // |
| 5506 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocumentFilter |
| 5507 | type TextDocumentFilter = Or_TextDocumentFilter // (alias) |
| 5508 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocumentFilterClientCapabilities |
| 5509 | type TextDocumentFilterClientCapabilities struct { |
| 5510 | // The client supports Relative Patterns. |
| 5511 | // |
| 5512 | // @since 3.18.0 |
| 5513 | RelativePatternSupport bool `json:"relativePatternSupport,omitempty"` |
| 5514 | } |
| 5515 | |
| 5516 | // A document filter where `language` is required field. |
| 5517 | // |
| 5518 | // @since 3.18.0 |
| 5519 | // |
| 5520 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocumentFilterLanguage |
| 5521 | type TextDocumentFilterLanguage struct { |
| 5522 | // A language id, like `typescript`. |
| 5523 | Language string `json:"language"` |
| 5524 | // A Uri {@link Uri.scheme scheme}, like `file` or `untitled`. |
| 5525 | Scheme string `json:"scheme,omitempty"` |
| 5526 | // A glob pattern, like **/*.{ts,js}. See TextDocumentFilter for examples. |
| 5527 | // |
| 5528 | // @since 3.18.0 - support for relative patterns. Whether clients support |
| 5529 | // relative patterns depends on the client capability |
| 5530 | // `textDocuments.filters.relativePatternSupport`. |
| 5531 | Pattern *GlobPattern `json:"pattern,omitempty"` |
| 5532 | } |
| 5533 | |
| 5534 | // A document filter where `pattern` is required field. |
| 5535 | // |
| 5536 | // @since 3.18.0 |
| 5537 | // |
| 5538 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocumentFilterPattern |
| 5539 | type TextDocumentFilterPattern struct { |
| 5540 | // A language id, like `typescript`. |
| 5541 | Language string `json:"language,omitempty"` |
| 5542 | // A Uri {@link Uri.scheme scheme}, like `file` or `untitled`. |
| 5543 | Scheme string `json:"scheme,omitempty"` |
| 5544 | // A glob pattern, like **/*.{ts,js}. See TextDocumentFilter for examples. |
| 5545 | // |
| 5546 | // @since 3.18.0 - support for relative patterns. Whether clients support |
| 5547 | // relative patterns depends on the client capability |
| 5548 | // `textDocuments.filters.relativePatternSupport`. |
| 5549 | Pattern GlobPattern `json:"pattern"` |
| 5550 | } |
| 5551 | |
| 5552 | // A document filter where `scheme` is required field. |
| 5553 | // |
| 5554 | // @since 3.18.0 |
| 5555 | // |
| 5556 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocumentFilterScheme |
| 5557 | type TextDocumentFilterScheme struct { |
| 5558 | // A language id, like `typescript`. |
| 5559 | Language string `json:"language,omitempty"` |
| 5560 | // A Uri {@link Uri.scheme scheme}, like `file` or `untitled`. |
| 5561 | Scheme string `json:"scheme"` |
| 5562 | // A glob pattern, like **/*.{ts,js}. See TextDocumentFilter for examples. |
| 5563 | // |
| 5564 | // @since 3.18.0 - support for relative patterns. Whether clients support |
| 5565 | // relative patterns depends on the client capability |
| 5566 | // `textDocuments.filters.relativePatternSupport`. |
| 5567 | Pattern *GlobPattern `json:"pattern,omitempty"` |
| 5568 | } |
| 5569 | |
| 5570 | // A literal to identify a text document in the client. |
| 5571 | // |
| 5572 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocumentIdentifier |
| 5573 | type TextDocumentIdentifier struct { |
| 5574 | // The text document's uri. |
| 5575 | URI DocumentURI `json:"uri"` |
| 5576 | } |
| 5577 | |
| 5578 | // An item to transfer a text document from the client to the |
| 5579 | // server. |
| 5580 | // |
| 5581 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocumentItem |
| 5582 | type TextDocumentItem struct { |
| 5583 | // The text document's uri. |
| 5584 | URI DocumentURI `json:"uri"` |
| 5585 | // The text document's language identifier. |
| 5586 | LanguageID LanguageKind `json:"languageId"` |
| 5587 | // The version number of this document (it will increase after each |
| 5588 | // change, including undo/redo). |
| 5589 | Version int32 `json:"version"` |
| 5590 | // The content of the opened text document. |
| 5591 | Text string `json:"text"` |
| 5592 | } |
| 5593 | |
| 5594 | // A parameter literal used in requests to pass a text document and a position inside that |
| 5595 | // document. |
| 5596 | // |
| 5597 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocumentPositionParams |
| 5598 | type TextDocumentPositionParams struct { |
| 5599 | // The text document. |
| 5600 | TextDocument TextDocumentIdentifier `json:"textDocument"` |
| 5601 | // The position inside the text document. |
| 5602 | // |
| 5603 | // Deprecated: gopls should use [TextDocumentPositionParams.Range] instead. |
| 5604 | Position Position `json:"position"` |
| 5605 | // Range is an optional field representing the user's text selection in the document. |
| 5606 | // If provided, the Position must be contained within this range. |
| 5607 | // |
| 5608 | // Note: This is a non-standard protocol extension. See microsoft/language-server-protocol#377. |
| 5609 | Range Range `json:"range"` |
| 5610 | } |
| 5611 | |
| 5612 | // General text document registration options. |
| 5613 | // |
| 5614 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocumentRegistrationOptions |
| 5615 | type TextDocumentRegistrationOptions struct { |
| 5616 | // A document selector to identify the scope of the registration. If set to null |
| 5617 | // the document selector provided on the client side will be used. |
| 5618 | DocumentSelector DocumentSelector `json:"documentSelector"` |
| 5619 | } |
| 5620 | |
| 5621 | // Represents reasons why a text document is saved. |
| 5622 | type TextDocumentSaveReason uint32 |
| 5623 | |
| 5624 | // Save registration options. |
| 5625 | // |
| 5626 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocumentSaveRegistrationOptions |
| 5627 | type TextDocumentSaveRegistrationOptions struct { |
| 5628 | TextDocumentRegistrationOptions |
| 5629 | SaveOptions |
| 5630 | } |
| 5631 | |
| 5632 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocumentSyncClientCapabilities |
| 5633 | type TextDocumentSyncClientCapabilities struct { |
| 5634 | // Whether text document synchronization supports dynamic registration. |
| 5635 | DynamicRegistration bool `json:"dynamicRegistration,omitempty"` |
| 5636 | // The client supports sending will save notifications. |
| 5637 | WillSave bool `json:"willSave,omitempty"` |
| 5638 | // The client supports sending a will save request and |
| 5639 | // waits for a response providing text edits which will |
| 5640 | // be applied to the document before it is saved. |
| 5641 | WillSaveWaitUntil bool `json:"willSaveWaitUntil,omitempty"` |
| 5642 | // The client supports did save notifications. |
| 5643 | DidSave bool `json:"didSave,omitempty"` |
| 5644 | } |
| 5645 | |
| 5646 | // Defines how the host (editor) should sync |
| 5647 | // document changes to the language server. |
| 5648 | type TextDocumentSyncKind uint32 |
| 5649 | |
| 5650 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textDocumentSyncOptions |
| 5651 | type TextDocumentSyncOptions struct { |
| 5652 | // Open and close notifications are sent to the server. If omitted open close notification should not |
| 5653 | // be sent. |
| 5654 | OpenClose bool `json:"openClose,omitempty"` |
| 5655 | // Change notifications are sent to the server. See TextDocumentSyncKind.None, TextDocumentSyncKind.Full |
| 5656 | // and TextDocumentSyncKind.Incremental. If omitted it defaults to TextDocumentSyncKind.None. |
| 5657 | Change TextDocumentSyncKind `json:"change,omitempty"` |
| 5658 | // If present will save notifications are sent to the server. If omitted the notification should not be |
| 5659 | // sent. |
| 5660 | WillSave bool `json:"willSave,omitempty"` |
| 5661 | // If present will save wait until requests are sent to the server. If omitted the request should not be |
| 5662 | // sent. |
| 5663 | WillSaveWaitUntil bool `json:"willSaveWaitUntil,omitempty"` |
| 5664 | // If present save notifications are sent to the server. If omitted the notification should not be |
| 5665 | // sent. |
| 5666 | Save *SaveOptions `json:"save,omitempty"` |
| 5667 | } |
| 5668 | |
| 5669 | // A text edit applicable to a text document. |
| 5670 | // |
| 5671 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#textEdit |
| 5672 | type TextEdit struct { |
| 5673 | // The range of the text document to be manipulated. To insert |
| 5674 | // text into a document create a range where start === end. |
| 5675 | Range Range `json:"range"` |
| 5676 | // The string to be inserted. For delete operations use an |
| 5677 | // empty string. |
| 5678 | NewText string `json:"newText"` |
| 5679 | } |
| 5680 | type TokenFormat string |
| 5681 | type TraceValue string |
| 5682 | |
| 5683 | // Since 3.6.0 |
| 5684 | // |
| 5685 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#typeDefinitionClientCapabilities |
| 5686 | type TypeDefinitionClientCapabilities struct { |
| 5687 | // Whether implementation supports dynamic registration. If this is set to `true` |
| 5688 | // the client supports the new `TypeDefinitionRegistrationOptions` return value |
| 5689 | // for the corresponding server capability as well. |
| 5690 | DynamicRegistration bool `json:"dynamicRegistration,omitempty"` |
| 5691 | // The client supports additional metadata in the form of definition links. |
| 5692 | // |
| 5693 | // Since 3.14.0 |
| 5694 | LinkSupport bool `json:"linkSupport,omitempty"` |
| 5695 | } |
| 5696 | |
| 5697 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#typeDefinitionOptions |
| 5698 | type TypeDefinitionOptions struct { |
| 5699 | WorkDoneProgressOptions |
| 5700 | } |
| 5701 | |
| 5702 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#typeDefinitionParams |
| 5703 | type TypeDefinitionParams struct { |
| 5704 | TextDocumentPositionParams |
| 5705 | WorkDoneProgressParams |
| 5706 | PartialResultParams |
| 5707 | } |
| 5708 | |
| 5709 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#typeDefinitionRegistrationOptions |
| 5710 | type TypeDefinitionRegistrationOptions struct { |
| 5711 | TextDocumentRegistrationOptions |
| 5712 | TypeDefinitionOptions |
| 5713 | StaticRegistrationOptions |
| 5714 | } |
| 5715 | |
| 5716 | // @since 3.17.0 |
| 5717 | // |
| 5718 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#typeHierarchyClientCapabilities |
| 5719 | type TypeHierarchyClientCapabilities struct { |
| 5720 | // Whether implementation supports dynamic registration. If this is set to `true` |
| 5721 | // the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` |
| 5722 | // return value for the corresponding server capability as well. |
| 5723 | DynamicRegistration bool `json:"dynamicRegistration,omitempty"` |
| 5724 | } |
| 5725 | |
| 5726 | // @since 3.17.0 |
| 5727 | // |
| 5728 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#typeHierarchyItem |
| 5729 | type TypeHierarchyItem struct { |
| 5730 | // The name of this item. |
| 5731 | Name string `json:"name"` |
| 5732 | // The kind of this item. |
| 5733 | Kind SymbolKind `json:"kind"` |
| 5734 | // Tags for this item. |
| 5735 | Tags []SymbolTag `json:"tags,omitempty"` |
| 5736 | // More detail for this item, e.g. the signature of a function. |
| 5737 | Detail string `json:"detail,omitempty"` |
| 5738 | // The resource identifier of this item. |
| 5739 | URI DocumentURI `json:"uri"` |
| 5740 | // The range enclosing this symbol not including leading/trailing whitespace |
| 5741 | // but everything else, e.g. comments and code. |
| 5742 | Range Range `json:"range"` |
| 5743 | // The range that should be selected and revealed when this symbol is being |
| 5744 | // picked, e.g. the name of a function. Must be contained by the |
| 5745 | // {@link TypeHierarchyItem.range `range`}. |
| 5746 | SelectionRange Range `json:"selectionRange"` |
| 5747 | // A data entry field that is preserved between a type hierarchy prepare and |
| 5748 | // supertypes or subtypes requests. It could also be used to identify the |
| 5749 | // type hierarchy in the server, helping improve the performance on |
| 5750 | // resolving supertypes and subtypes. |
| 5751 | Data any `json:"data,omitempty"` |
| 5752 | } |
| 5753 | |
| 5754 | // Type hierarchy options used during static registration. |
| 5755 | // |
| 5756 | // @since 3.17.0 |
| 5757 | // |
| 5758 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#typeHierarchyOptions |
| 5759 | type TypeHierarchyOptions struct { |
| 5760 | WorkDoneProgressOptions |
| 5761 | } |
| 5762 | |
| 5763 | // The parameter of a `textDocument/prepareTypeHierarchy` request. |
| 5764 | // |
| 5765 | // @since 3.17.0 |
| 5766 | // |
| 5767 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#typeHierarchyPrepareParams |
| 5768 | type TypeHierarchyPrepareParams struct { |
| 5769 | TextDocumentPositionParams |
| 5770 | WorkDoneProgressParams |
| 5771 | } |
| 5772 | |
| 5773 | // Type hierarchy options used during static or dynamic registration. |
| 5774 | // |
| 5775 | // @since 3.17.0 |
| 5776 | // |
| 5777 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#typeHierarchyRegistrationOptions |
| 5778 | type TypeHierarchyRegistrationOptions struct { |
| 5779 | TextDocumentRegistrationOptions |
| 5780 | TypeHierarchyOptions |
| 5781 | StaticRegistrationOptions |
| 5782 | } |
| 5783 | |
| 5784 | // The parameter of a `typeHierarchy/subtypes` request. |
| 5785 | // |
| 5786 | // @since 3.17.0 |
| 5787 | // |
| 5788 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#typeHierarchySubtypesParams |
| 5789 | type TypeHierarchySubtypesParams struct { |
| 5790 | Item TypeHierarchyItem `json:"item"` |
| 5791 | WorkDoneProgressParams |
| 5792 | PartialResultParams |
| 5793 | } |
| 5794 | |
| 5795 | // The parameter of a `typeHierarchy/supertypes` request. |
| 5796 | // |
| 5797 | // @since 3.17.0 |
| 5798 | // |
| 5799 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#typeHierarchySupertypesParams |
| 5800 | type TypeHierarchySupertypesParams struct { |
| 5801 | Item TypeHierarchyItem `json:"item"` |
| 5802 | WorkDoneProgressParams |
| 5803 | PartialResultParams |
| 5804 | } |
| 5805 | |
| 5806 | // created for Tuple |
| 5807 | type UIntCommaUInt struct { |
| 5808 | Fld0 uint32 `json:"fld0"` |
| 5809 | Fld1 uint32 `json:"fld1"` |
| 5810 | } |
| 5811 | |
| 5812 | // A diagnostic report indicating that the last returned |
| 5813 | // report is still accurate. |
| 5814 | // |
| 5815 | // @since 3.17.0 |
| 5816 | // |
| 5817 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#unchangedDocumentDiagnosticReport |
| 5818 | type UnchangedDocumentDiagnosticReport struct { |
| 5819 | // A document diagnostic report indicating |
| 5820 | // no changes to the last result. A server can |
| 5821 | // only return `unchanged` if result ids are |
| 5822 | // provided. |
| 5823 | Kind string `json:"kind"` |
| 5824 | // A result id which will be sent on the next |
| 5825 | // diagnostic request for the same document. |
| 5826 | ResultID string `json:"resultId"` |
| 5827 | } |
| 5828 | |
| 5829 | // Moniker uniqueness level to define scope of the moniker. |
| 5830 | // |
| 5831 | // @since 3.16.0 |
| 5832 | type UniquenessLevel string |
| 5833 | |
| 5834 | // General parameters to unregister a request or notification. |
| 5835 | // |
| 5836 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#unregistration |
| 5837 | type Unregistration struct { |
| 5838 | // The id used to unregister the request or notification. Usually an id |
| 5839 | // provided during the register request. |
| 5840 | ID string `json:"id"` |
| 5841 | // The method to unregister for. |
| 5842 | Method string `json:"method"` |
| 5843 | } |
| 5844 | |
| 5845 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#unregistrationParams |
| 5846 | type UnregistrationParams struct { |
| 5847 | Unregisterations []Unregistration `json:"unregisterations"` |
| 5848 | } |
| 5849 | |
| 5850 | // A versioned notebook document identifier. |
| 5851 | // |
| 5852 | // @since 3.17.0 |
| 5853 | // |
| 5854 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#versionedNotebookDocumentIdentifier |
| 5855 | type VersionedNotebookDocumentIdentifier struct { |
| 5856 | // The version number of this notebook document. |
| 5857 | Version int32 `json:"version"` |
| 5858 | // The notebook document's uri. |
| 5859 | URI URI `json:"uri"` |
| 5860 | } |
| 5861 | |
| 5862 | // A text document identifier to denote a specific version of a text document. |
| 5863 | // |
| 5864 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#versionedTextDocumentIdentifier |
| 5865 | type VersionedTextDocumentIdentifier struct { |
| 5866 | // The version number of this document. |
| 5867 | Version int32 `json:"version"` |
| 5868 | TextDocumentIdentifier |
| 5869 | } |
| 5870 | type WatchKind = uint32 // The parameters sent in a will save text document notification. |
| 5871 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#willSaveTextDocumentParams |
| 5872 | type WillSaveTextDocumentParams struct { |
| 5873 | // The document that will be saved. |
| 5874 | TextDocument TextDocumentIdentifier `json:"textDocument"` |
| 5875 | // The 'TextDocumentSaveReason'. |
| 5876 | Reason TextDocumentSaveReason `json:"reason"` |
| 5877 | } |
| 5878 | |
| 5879 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#windowClientCapabilities |
| 5880 | type WindowClientCapabilities struct { |
| 5881 | // It indicates whether the client supports server initiated |
| 5882 | // progress using the `window/workDoneProgress/create` request. |
| 5883 | // |
| 5884 | // The capability also controls Whether client supports handling |
| 5885 | // of progress notifications. If set servers are allowed to report a |
| 5886 | // `workDoneProgress` property in the request specific server |
| 5887 | // capabilities. |
| 5888 | // |
| 5889 | // @since 3.15.0 |
| 5890 | WorkDoneProgress bool `json:"workDoneProgress,omitempty"` |
| 5891 | // Capabilities specific to the showMessage request. |
| 5892 | // |
| 5893 | // @since 3.16.0 |
| 5894 | ShowMessage *ShowMessageRequestClientCapabilities `json:"showMessage,omitempty"` |
| 5895 | // Capabilities specific to the showDocument request. |
| 5896 | // |
| 5897 | // @since 3.16.0 |
| 5898 | ShowDocument *ShowDocumentClientCapabilities `json:"showDocument,omitempty"` |
| 5899 | } |
| 5900 | |
| 5901 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workDoneProgressBegin |
| 5902 | type WorkDoneProgressBegin struct { |
| 5903 | Kind string `json:"kind"` |
| 5904 | // Mandatory title of the progress operation. Used to briefly inform about |
| 5905 | // the kind of operation being performed. |
| 5906 | // |
| 5907 | // Examples: "Indexing" or "Linking dependencies". |
| 5908 | Title string `json:"title"` |
| 5909 | // Controls if a cancel button should show to allow the user to cancel the |
| 5910 | // long running operation. Clients that don't support cancellation are allowed |
| 5911 | // to ignore the setting. |
| 5912 | Cancellable bool `json:"cancellable,omitempty"` |
| 5913 | // Optional, more detailed associated progress message. Contains |
| 5914 | // complementary information to the `title`. |
| 5915 | // |
| 5916 | // Examples: "3/25 files", "project/src/module2", "node_modules/some_dep". |
| 5917 | // If unset, the previous progress message (if any) is still valid. |
| 5918 | Message string `json:"message,omitempty"` |
| 5919 | // Optional progress percentage to display (value 100 is considered 100%). |
| 5920 | // If not provided infinite progress is assumed and clients are allowed |
| 5921 | // to ignore the `percentage` value in subsequent in report notifications. |
| 5922 | // |
| 5923 | // The value should be steadily rising. Clients are free to ignore values |
| 5924 | // that are not following this rule. The value range is [0, 100]. |
| 5925 | Percentage *uint32 `json:"percentage,omitempty"` |
| 5926 | } |
| 5927 | |
| 5928 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workDoneProgressCancelParams |
| 5929 | type WorkDoneProgressCancelParams struct { |
| 5930 | // The token to be used to report progress. |
| 5931 | Token ProgressToken `json:"token"` |
| 5932 | } |
| 5933 | |
| 5934 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workDoneProgressCreateParams |
| 5935 | type WorkDoneProgressCreateParams struct { |
| 5936 | // The token to be used to report progress. |
| 5937 | Token ProgressToken `json:"token"` |
| 5938 | } |
| 5939 | |
| 5940 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workDoneProgressEnd |
| 5941 | type WorkDoneProgressEnd struct { |
| 5942 | Kind string `json:"kind"` |
| 5943 | // Optional, a final message indicating to for example indicate the outcome |
| 5944 | // of the operation. |
| 5945 | Message string `json:"message,omitempty"` |
| 5946 | } |
| 5947 | |
| 5948 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workDoneProgressOptions |
| 5949 | type WorkDoneProgressOptions struct { |
| 5950 | WorkDoneProgress bool `json:"workDoneProgress,omitempty"` |
| 5951 | } |
| 5952 | |
| 5953 | // created for And |
| 5954 | type WorkDoneProgressOptionsAndTextDocumentRegistrationOptions struct { |
| 5955 | WorkDoneProgressOptions |
| 5956 | TextDocumentRegistrationOptions |
| 5957 | } |
| 5958 | |
| 5959 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workDoneProgressParams |
| 5960 | type WorkDoneProgressParams struct { |
| 5961 | // An optional token that a server can use to report work done progress. |
| 5962 | WorkDoneToken ProgressToken `json:"workDoneToken,omitempty"` |
| 5963 | } |
| 5964 | |
| 5965 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workDoneProgressReport |
| 5966 | type WorkDoneProgressReport struct { |
| 5967 | Kind string `json:"kind"` |
| 5968 | // Controls enablement state of a cancel button. |
| 5969 | // |
| 5970 | // Clients that don't support cancellation or don't support controlling the button's |
| 5971 | // enablement state are allowed to ignore the property. |
| 5972 | Cancellable bool `json:"cancellable,omitempty"` |
| 5973 | // Optional, more detailed associated progress message. Contains |
| 5974 | // complementary information to the `title`. |
| 5975 | // |
| 5976 | // Examples: "3/25 files", "project/src/module2", "node_modules/some_dep". |
| 5977 | // If unset, the previous progress message (if any) is still valid. |
| 5978 | Message string `json:"message,omitempty"` |
| 5979 | // Optional progress percentage to display (value 100 is considered 100%). |
| 5980 | // If not provided infinite progress is assumed and clients are allowed |
| 5981 | // to ignore the `percentage` value in subsequent in report notifications. |
| 5982 | // |
| 5983 | // The value should be steadily rising. Clients are free to ignore values |
| 5984 | // that are not following this rule. The value range is [0, 100] |
| 5985 | Percentage *uint32 `json:"percentage,omitempty"` |
| 5986 | } |
| 5987 | |
| 5988 | // Workspace specific client capabilities. |
| 5989 | // |
| 5990 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspaceClientCapabilities |
| 5991 | type WorkspaceClientCapabilities struct { |
| 5992 | // The client supports applying batch edits |
| 5993 | // to the workspace by supporting the request |
| 5994 | // 'workspace/applyEdit' |
| 5995 | ApplyEdit bool `json:"applyEdit,omitempty"` |
| 5996 | // Capabilities specific to `WorkspaceEdit`s. |
| 5997 | WorkspaceEdit *WorkspaceEditClientCapabilities `json:"workspaceEdit,omitempty"` |
| 5998 | // Capabilities specific to the `workspace/didChangeConfiguration` notification. |
| 5999 | DidChangeConfiguration DidChangeConfigurationClientCapabilities `json:"didChangeConfiguration,omitempty"` |
| 6000 | // Capabilities specific to the `workspace/didChangeWatchedFiles` notification. |
| 6001 | DidChangeWatchedFiles DidChangeWatchedFilesClientCapabilities `json:"didChangeWatchedFiles,omitempty"` |
| 6002 | // Capabilities specific to the `workspace/symbol` request. |
| 6003 | Symbol *WorkspaceSymbolClientCapabilities `json:"symbol,omitempty"` |
| 6004 | // Capabilities specific to the `workspace/executeCommand` request. |
| 6005 | ExecuteCommand *ExecuteCommandClientCapabilities `json:"executeCommand,omitempty"` |
| 6006 | // The client has support for workspace folders. |
| 6007 | // |
| 6008 | // @since 3.6.0 |
| 6009 | WorkspaceFolders bool `json:"workspaceFolders,omitempty"` |
| 6010 | // The client supports `workspace/configuration` requests. |
| 6011 | // |
| 6012 | // @since 3.6.0 |
| 6013 | Configuration bool `json:"configuration,omitempty"` |
| 6014 | // Capabilities specific to the semantic token requests scoped to the |
| 6015 | // workspace. |
| 6016 | // |
| 6017 | // @since 3.16.0. |
| 6018 | SemanticTokens *SemanticTokensWorkspaceClientCapabilities `json:"semanticTokens,omitempty"` |
| 6019 | // Capabilities specific to the code lens requests scoped to the |
| 6020 | // workspace. |
| 6021 | // |
| 6022 | // @since 3.16.0. |
| 6023 | CodeLens *CodeLensWorkspaceClientCapabilities `json:"codeLens,omitempty"` |
| 6024 | // The client has support for file notifications/requests for user operations on files. |
| 6025 | // |
| 6026 | // Since 3.16.0 |
| 6027 | FileOperations *FileOperationClientCapabilities `json:"fileOperations,omitempty"` |
| 6028 | // Capabilities specific to the inline values requests scoped to the |
| 6029 | // workspace. |
| 6030 | // |
| 6031 | // @since 3.17.0. |
| 6032 | InlineValue *InlineValueWorkspaceClientCapabilities `json:"inlineValue,omitempty"` |
| 6033 | // Capabilities specific to the inlay hint requests scoped to the |
| 6034 | // workspace. |
| 6035 | // |
| 6036 | // @since 3.17.0. |
| 6037 | InlayHint *InlayHintWorkspaceClientCapabilities `json:"inlayHint,omitempty"` |
| 6038 | // Capabilities specific to the diagnostic requests scoped to the |
| 6039 | // workspace. |
| 6040 | // |
| 6041 | // @since 3.17.0. |
| 6042 | Diagnostics *DiagnosticWorkspaceClientCapabilities `json:"diagnostics,omitempty"` |
| 6043 | // Capabilities specific to the folding range requests scoped to the workspace. |
| 6044 | // |
| 6045 | // @since 3.18.0 |
| 6046 | // @proposed |
| 6047 | FoldingRange *FoldingRangeWorkspaceClientCapabilities `json:"foldingRange,omitempty"` |
| 6048 | // Capabilities specific to the `workspace/textDocumentContent` request. |
| 6049 | // |
| 6050 | // @since 3.18.0 |
| 6051 | // @proposed |
| 6052 | TextDocumentContent *TextDocumentContentClientCapabilities `json:"textDocumentContent,omitempty"` |
| 6053 | } |
| 6054 | |
| 6055 | // Parameters of the workspace diagnostic request. |
| 6056 | // |
| 6057 | // @since 3.17.0 |
| 6058 | // |
| 6059 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspaceDiagnosticParams |
| 6060 | type WorkspaceDiagnosticParams struct { |
| 6061 | // The additional identifier provided during registration. |
| 6062 | Identifier string `json:"identifier,omitempty"` |
| 6063 | // The currently known diagnostic reports with their |
| 6064 | // previous result ids. |
| 6065 | PreviousResultIds []PreviousResultID `json:"previousResultIds"` |
| 6066 | WorkDoneProgressParams |
| 6067 | PartialResultParams |
| 6068 | } |
| 6069 | |
| 6070 | // A workspace diagnostic report. |
| 6071 | // |
| 6072 | // @since 3.17.0 |
| 6073 | // |
| 6074 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspaceDiagnosticReport |
| 6075 | type WorkspaceDiagnosticReport struct { |
| 6076 | Items []WorkspaceDocumentDiagnosticReport `json:"items"` |
| 6077 | } |
| 6078 | |
| 6079 | // A partial result for a workspace diagnostic report. |
| 6080 | // |
| 6081 | // @since 3.17.0 |
| 6082 | // |
| 6083 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspaceDiagnosticReportPartialResult |
| 6084 | type WorkspaceDiagnosticReportPartialResult struct { |
| 6085 | Items []WorkspaceDocumentDiagnosticReport `json:"items"` |
| 6086 | } |
| 6087 | |
| 6088 | // A workspace diagnostic document report. |
| 6089 | // |
| 6090 | // @since 3.17.0 |
| 6091 | // |
| 6092 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspaceDocumentDiagnosticReport |
| 6093 | type WorkspaceDocumentDiagnosticReport = Or_WorkspaceDocumentDiagnosticReport // (alias) |
| 6094 | // A workspace edit represents changes to many resources managed in the workspace. The edit |
| 6095 | // should either provide `changes` or `documentChanges`. If documentChanges are present |
| 6096 | // they are preferred over `changes` if the client can handle versioned document edits. |
| 6097 | // |
| 6098 | // Since version 3.13.0 a workspace edit can contain resource operations as well. If resource |
| 6099 | // operations are present clients need to execute the operations in the order in which they |
| 6100 | // are provided. So a workspace edit for example can consist of the following two changes: |
| 6101 | // (1) a create file a.txt and (2) a text document edit which insert text into file a.txt. |
| 6102 | // |
| 6103 | // An invalid sequence (e.g. (1) delete file a.txt and (2) insert text into file a.txt) will |
| 6104 | // cause failure of the operation. How the client recovers from the failure is described by |
| 6105 | // the client capability: `workspace.workspaceEdit.failureHandling` |
| 6106 | // |
| 6107 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspaceEdit |
| 6108 | type WorkspaceEdit struct { |
| 6109 | // Holds changes to existing resources. |
| 6110 | Changes map[DocumentURI][]TextEdit `json:"changes,omitempty"` |
| 6111 | // Depending on the client capability `workspace.workspaceEdit.resourceOperations` document changes |
| 6112 | // are either an array of `TextDocumentEdit`s to express changes to n different text documents |
| 6113 | // where each text document edit addresses a specific version of a text document. Or it can contain |
| 6114 | // above `TextDocumentEdit`s mixed with create, rename and delete file / folder operations. |
| 6115 | // |
| 6116 | // Whether a client supports versioned document edits is expressed via |
| 6117 | // `workspace.workspaceEdit.documentChanges` client capability. |
| 6118 | // |
| 6119 | // If a client neither supports `documentChanges` nor `workspace.workspaceEdit.resourceOperations` then |
| 6120 | // only plain `TextEdit`s using the `changes` property are supported. |
| 6121 | DocumentChanges []DocumentChange `json:"documentChanges,omitempty"` |
| 6122 | // A map of change annotations that can be referenced in `AnnotatedTextEdit`s or create, rename and |
| 6123 | // delete file / folder operations. |
| 6124 | // |
| 6125 | // Whether clients honor this property depends on the client capability `workspace.changeAnnotationSupport`. |
| 6126 | // |
| 6127 | // @since 3.16.0 |
| 6128 | ChangeAnnotations map[ChangeAnnotationIdentifier]ChangeAnnotation `json:"changeAnnotations,omitempty"` |
| 6129 | } |
| 6130 | |
| 6131 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspaceEditClientCapabilities |
| 6132 | type WorkspaceEditClientCapabilities struct { |
| 6133 | // The client supports versioned document changes in `WorkspaceEdit`s |
| 6134 | DocumentChanges bool `json:"documentChanges,omitempty"` |
| 6135 | // The resource operations the client supports. Clients should at least |
| 6136 | // support 'create', 'rename' and 'delete' files and folders. |
| 6137 | // |
| 6138 | // @since 3.13.0 |
| 6139 | ResourceOperations []ResourceOperationKind `json:"resourceOperations,omitempty"` |
| 6140 | // The failure handling strategy of a client if applying the workspace edit |
| 6141 | // fails. |
| 6142 | // |
| 6143 | // @since 3.13.0 |
| 6144 | FailureHandling *FailureHandlingKind `json:"failureHandling,omitempty"` |
| 6145 | // Whether the client normalizes line endings to the client specific |
| 6146 | // setting. |
| 6147 | // If set to `true` the client will normalize line ending characters |
| 6148 | // in a workspace edit to the client-specified new line |
| 6149 | // character. |
| 6150 | // |
| 6151 | // @since 3.16.0 |
| 6152 | NormalizesLineEndings bool `json:"normalizesLineEndings,omitempty"` |
| 6153 | // Whether the client in general supports change annotations on text edits, |
| 6154 | // create file, rename file and delete file changes. |
| 6155 | // |
| 6156 | // @since 3.16.0 |
| 6157 | ChangeAnnotationSupport *ChangeAnnotationsSupportOptions `json:"changeAnnotationSupport,omitempty"` |
| 6158 | // Whether the client supports `WorkspaceEditMetadata` in `WorkspaceEdit`s. |
| 6159 | // |
| 6160 | // @since 3.18.0 |
| 6161 | // @proposed |
| 6162 | MetadataSupport bool `json:"metadataSupport,omitempty"` |
| 6163 | // Whether the client supports snippets as text edits. |
| 6164 | // |
| 6165 | // @since 3.18.0 |
| 6166 | // @proposed |
| 6167 | SnippetEditSupport bool `json:"snippetEditSupport,omitempty"` |
| 6168 | } |
| 6169 | |
| 6170 | // Additional data about a workspace edit. |
| 6171 | // |
| 6172 | // @since 3.18.0 |
| 6173 | // @proposed |
| 6174 | // |
| 6175 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspaceEditMetadata |
| 6176 | type WorkspaceEditMetadata struct { |
| 6177 | // Signal to the editor that this edit is a refactoring. |
| 6178 | IsRefactoring bool `json:"isRefactoring,omitempty"` |
| 6179 | } |
| 6180 | |
| 6181 | // A workspace folder inside a client. |
| 6182 | // |
| 6183 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspaceFolder |
| 6184 | type WorkspaceFolder struct { |
| 6185 | // The associated URI for this workspace folder. |
| 6186 | URI URI `json:"uri"` |
| 6187 | // The name of the workspace folder. Used to refer to this |
| 6188 | // workspace folder in the user interface. |
| 6189 | Name string `json:"name"` |
| 6190 | } |
| 6191 | |
| 6192 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspaceFoldersServerCapabilities |
| 6193 | type WorkspaceFolders5Gn struct { |
| 6194 | // The server has support for workspace folders |
| 6195 | Supported bool `json:"supported,omitempty"` |
| 6196 | // Whether the server wants to receive workspace folder |
| 6197 | // change notifications. |
| 6198 | // |
| 6199 | // If a string is provided the string is treated as an ID |
| 6200 | // under which the notification is registered on the client |
| 6201 | // side. The ID can be used to unregister for these events |
| 6202 | // using the `client/unregisterCapability` request. |
| 6203 | ChangeNotifications string `json:"changeNotifications,omitempty"` |
| 6204 | } |
| 6205 | |
| 6206 | // The workspace folder change event. |
| 6207 | // |
| 6208 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspaceFoldersChangeEvent |
| 6209 | type WorkspaceFoldersChangeEvent struct { |
| 6210 | // The array of added workspace folders |
| 6211 | Added []WorkspaceFolder `json:"added"` |
| 6212 | // The array of the removed workspace folders |
| 6213 | Removed []WorkspaceFolder `json:"removed"` |
| 6214 | } |
| 6215 | |
| 6216 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspaceFoldersInitializeParams |
| 6217 | type WorkspaceFoldersInitializeParams struct { |
| 6218 | // The workspace folders configured in the client when the server starts. |
| 6219 | // |
| 6220 | // This property is only available if the client supports workspace folders. |
| 6221 | // It can be `null` if the client supports workspace folders but none are |
| 6222 | // configured. |
| 6223 | // |
| 6224 | // @since 3.6.0 |
| 6225 | WorkspaceFolders []WorkspaceFolder `json:"workspaceFolders,omitempty"` |
| 6226 | } |
| 6227 | |
| 6228 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspaceFoldersServerCapabilities |
| 6229 | type WorkspaceFoldersServerCapabilities struct { |
| 6230 | // The server has support for workspace folders |
| 6231 | Supported bool `json:"supported,omitempty"` |
| 6232 | // Whether the server wants to receive workspace folder |
| 6233 | // change notifications. |
| 6234 | // |
| 6235 | // If a string is provided the string is treated as an ID |
| 6236 | // under which the notification is registered on the client |
| 6237 | // side. The ID can be used to unregister for these events |
| 6238 | // using the `client/unregisterCapability` request. |
| 6239 | ChangeNotifications string `json:"changeNotifications,omitempty"` |
| 6240 | } |
| 6241 | |
| 6242 | // A full document diagnostic report for a workspace diagnostic result. |
| 6243 | // |
| 6244 | // @since 3.17.0 |
| 6245 | // |
| 6246 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspaceFullDocumentDiagnosticReport |
| 6247 | type WorkspaceFullDocumentDiagnosticReport struct { |
| 6248 | // The URI for which diagnostic information is reported. |
| 6249 | URI DocumentURI `json:"uri"` |
| 6250 | // The version number for which the diagnostics are reported. |
| 6251 | // If the document is not marked as open `null` can be provided. |
| 6252 | Version int32 `json:"version"` |
| 6253 | FullDocumentDiagnosticReport |
| 6254 | } |
| 6255 | |
| 6256 | // Defines workspace specific capabilities of the server. |
| 6257 | // |
| 6258 | // @since 3.18.0 |
| 6259 | // |
| 6260 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspaceOptions |
| 6261 | type WorkspaceOptions struct { |
| 6262 | // The server supports workspace folder. |
| 6263 | // |
| 6264 | // @since 3.6.0 |
| 6265 | WorkspaceFolders *WorkspaceFolders5Gn `json:"workspaceFolders,omitempty"` |
| 6266 | // The server is interested in notifications/requests for operations on files. |
| 6267 | // |
| 6268 | // @since 3.16.0 |
| 6269 | FileOperations *FileOperationOptions `json:"fileOperations,omitempty"` |
| 6270 | // The server supports the `workspace/textDocumentContent` request. |
| 6271 | // |
| 6272 | // @since 3.18.0 |
| 6273 | // @proposed |
| 6274 | TextDocumentContent *Or_WorkspaceOptions_textDocumentContent `json:"textDocumentContent,omitempty"` |
| 6275 | } |
| 6276 | |
| 6277 | // A special workspace symbol that supports locations without a range. |
| 6278 | // |
| 6279 | // See also SymbolInformation. |
| 6280 | // |
| 6281 | // @since 3.17.0 |
| 6282 | // |
| 6283 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspaceSymbol |
| 6284 | type WorkspaceSymbol struct { |
| 6285 | // The location of the symbol. Whether a server is allowed to |
| 6286 | // return a location without a range depends on the client |
| 6287 | // capability `workspace.symbol.resolveSupport`. |
| 6288 | // |
| 6289 | // See SymbolInformation#location for more details. |
| 6290 | Location OrPLocation_workspace_symbol `json:"location"` |
| 6291 | // A data entry field that is preserved on a workspace symbol between a |
| 6292 | // workspace symbol request and a workspace symbol resolve request. |
| 6293 | Data any `json:"data,omitempty"` |
| 6294 | BaseSymbolInformation |
| 6295 | } |
| 6296 | |
| 6297 | // Client capabilities for a {@link WorkspaceSymbolRequest}. |
| 6298 | // |
| 6299 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspaceSymbolClientCapabilities |
| 6300 | type WorkspaceSymbolClientCapabilities struct { |
| 6301 | // Symbol request supports dynamic registration. |
| 6302 | DynamicRegistration bool `json:"dynamicRegistration,omitempty"` |
| 6303 | // Specific capabilities for the `SymbolKind` in the `workspace/symbol` request. |
| 6304 | SymbolKind *ClientSymbolKindOptions `json:"symbolKind,omitempty"` |
| 6305 | // The client supports tags on `SymbolInformation`. |
| 6306 | // Clients supporting tags have to handle unknown tags gracefully. |
| 6307 | // |
| 6308 | // @since 3.16.0 |
| 6309 | TagSupport *ClientSymbolTagOptions `json:"tagSupport,omitempty"` |
| 6310 | // The client support partial workspace symbols. The client will send the |
| 6311 | // request `workspaceSymbol/resolve` to the server to resolve additional |
| 6312 | // properties. |
| 6313 | // |
| 6314 | // @since 3.17.0 |
| 6315 | ResolveSupport *ClientSymbolResolveOptions `json:"resolveSupport,omitempty"` |
| 6316 | } |
| 6317 | |
| 6318 | // Server capabilities for a {@link WorkspaceSymbolRequest}. |
| 6319 | // |
| 6320 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspaceSymbolOptions |
| 6321 | type WorkspaceSymbolOptions struct { |
| 6322 | // The server provides support to resolve additional |
| 6323 | // information for a workspace symbol. |
| 6324 | // |
| 6325 | // @since 3.17.0 |
| 6326 | ResolveProvider bool `json:"resolveProvider,omitempty"` |
| 6327 | WorkDoneProgressOptions |
| 6328 | } |
| 6329 | |
| 6330 | // The parameters of a {@link WorkspaceSymbolRequest}. |
| 6331 | // |
| 6332 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspaceSymbolParams |
| 6333 | type WorkspaceSymbolParams struct { |
| 6334 | // A query string to filter symbols by. Clients may send an empty |
| 6335 | // string here to request all symbols. |
| 6336 | // |
| 6337 | // The `query`-parameter should be interpreted in a *relaxed way* as editors |
| 6338 | // will apply their own highlighting and scoring on the results. A good rule |
| 6339 | // of thumb is to match case-insensitive and to simply check that the |
| 6340 | // characters of *query* appear in their order in a candidate symbol. |
| 6341 | // Servers shouldn't use prefix, substring, or similar strict matching. |
| 6342 | Query string `json:"query"` |
| 6343 | WorkDoneProgressParams |
| 6344 | PartialResultParams |
| 6345 | } |
| 6346 | |
| 6347 | // Registration options for a {@link WorkspaceSymbolRequest}. |
| 6348 | // |
| 6349 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspaceSymbolRegistrationOptions |
| 6350 | type WorkspaceSymbolRegistrationOptions struct { |
| 6351 | WorkspaceSymbolOptions |
| 6352 | } |
| 6353 | |
| 6354 | // An unchanged document diagnostic report for a workspace diagnostic result. |
| 6355 | // |
| 6356 | // @since 3.17.0 |
| 6357 | // |
| 6358 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#workspaceUnchangedDocumentDiagnosticReport |
| 6359 | type WorkspaceUnchangedDocumentDiagnosticReport struct { |
| 6360 | // The URI for which diagnostic information is reported. |
| 6361 | URI DocumentURI `json:"uri"` |
| 6362 | // The version number for which the diagnostics are reported. |
| 6363 | // If the document is not marked as open `null` can be provided. |
| 6364 | Version int32 `json:"version"` |
| 6365 | UnchangedDocumentDiagnosticReport |
| 6366 | } |
| 6367 | |
| 6368 | // The initialize parameters |
| 6369 | // |
| 6370 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#_InitializeParams |
| 6371 | type XInitializeParams struct { |
| 6372 | // The process Id of the parent process that started |
| 6373 | // the server. |
| 6374 | // |
| 6375 | // Is `null` if the process has not been started by another process. |
| 6376 | // If the parent process is not alive then the server should exit. |
| 6377 | ProcessID int32 `json:"processId"` |
| 6378 | // Information about the client |
| 6379 | // |
| 6380 | // @since 3.15.0 |
| 6381 | ClientInfo *ClientInfo `json:"clientInfo,omitempty"` |
| 6382 | // The locale the client is currently showing the user interface |
| 6383 | // in. This must not necessarily be the locale of the operating |
| 6384 | // system. |
| 6385 | // |
| 6386 | // Uses IETF language tags as the value's syntax |
| 6387 | // (See https://en.wikipedia.org/wiki/IETF_language_tag) |
| 6388 | // |
| 6389 | // @since 3.16.0 |
| 6390 | Locale string `json:"locale,omitempty"` |
| 6391 | // The rootPath of the workspace. Is null |
| 6392 | // if no folder is open. |
| 6393 | // |
| 6394 | // @deprecated in favour of rootUri. |
| 6395 | RootPath string `json:"rootPath,omitempty"` |
| 6396 | // The rootUri of the workspace. Is null if no |
| 6397 | // folder is open. If both `rootPath` and `rootUri` are set |
| 6398 | // `rootUri` wins. |
| 6399 | // |
| 6400 | // @deprecated in favour of workspaceFolders. |
| 6401 | RootURI DocumentURI `json:"rootUri"` |
| 6402 | // The capabilities provided by the client (editor or tool) |
| 6403 | Capabilities ClientCapabilities `json:"capabilities"` |
| 6404 | // User provided initialization options. |
| 6405 | InitializationOptions any `json:"initializationOptions,omitempty"` |
| 6406 | // The initial trace setting. If omitted trace is disabled ('off'). |
| 6407 | Trace *TraceValue `json:"trace,omitempty"` |
| 6408 | WorkDoneProgressParams |
| 6409 | } |
| 6410 | |
| 6411 | // The initialize parameters |
| 6412 | // |
| 6413 | // See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification#_InitializeParams |
| 6414 | type _InitializeParams struct { |
| 6415 | // The process Id of the parent process that started |
| 6416 | // the server. |
| 6417 | // |
| 6418 | // Is `null` if the process has not been started by another process. |
| 6419 | // If the parent process is not alive then the server should exit. |
| 6420 | ProcessID int32 `json:"processId"` |
| 6421 | // Information about the client |
| 6422 | // |
| 6423 | // @since 3.15.0 |
| 6424 | ClientInfo *ClientInfo `json:"clientInfo,omitempty"` |
| 6425 | // The locale the client is currently showing the user interface |
| 6426 | // in. This must not necessarily be the locale of the operating |
| 6427 | // system. |
| 6428 | // |
| 6429 | // Uses IETF language tags as the value's syntax |
| 6430 | // (See https://en.wikipedia.org/wiki/IETF_language_tag) |
| 6431 | // |
| 6432 | // @since 3.16.0 |
| 6433 | Locale string `json:"locale,omitempty"` |
| 6434 | // The rootPath of the workspace. Is null |
| 6435 | // if no folder is open. |
| 6436 | // |
| 6437 | // @deprecated in favour of rootUri. |
| 6438 | RootPath string `json:"rootPath,omitempty"` |
| 6439 | // The rootUri of the workspace. Is null if no |
| 6440 | // folder is open. If both `rootPath` and `rootUri` are set |
| 6441 | // `rootUri` wins. |
| 6442 | // |
| 6443 | // @deprecated in favour of workspaceFolders. |
| 6444 | RootURI DocumentURI `json:"rootUri"` |
| 6445 | // The capabilities provided by the client (editor or tool) |
| 6446 | Capabilities ClientCapabilities `json:"capabilities"` |
| 6447 | // User provided initialization options. |
| 6448 | InitializationOptions any `json:"initializationOptions,omitempty"` |
| 6449 | // The initial trace setting. If omitted trace is disabled ('off'). |
| 6450 | Trace *TraceValue `json:"trace,omitempty"` |
| 6451 | WorkDoneProgressParams |
| 6452 | } |
| 6453 | |
| 6454 | const ( |
| 6455 | // Defines how values from a set of defaults and an individual item will be |
| 6456 | // merged. |
| 6457 | // |
| 6458 | // @since 3.18.0 |
| 6459 | // The value from the individual item (if provided and not `null`) will be |
| 6460 | // used instead of the default. |
| 6461 | Replace ApplyKind = 1 |
| 6462 | // The value from the item will be merged with the default. |
| 6463 | // |
| 6464 | // The specific rules for mergeing values are defined against each field |
| 6465 | // that supports merging. |
| 6466 | Merge ApplyKind = 2 |
| 6467 | // A set of predefined code action kinds |
| 6468 | // Empty kind. |
| 6469 | Empty CodeActionKind = "" |
| 6470 | // Base kind for quickfix actions: 'quickfix' |
| 6471 | QuickFix CodeActionKind = "quickfix" |
| 6472 | // Base kind for refactoring actions: 'refactor' |
| 6473 | Refactor CodeActionKind = "refactor" |
| 6474 | // Base kind for refactoring extraction actions: 'refactor.extract' |
| 6475 | // |
| 6476 | // Example extract actions: |
| 6477 | // |
| 6478 | // |
| 6479 | // - Extract method |
| 6480 | // - Extract function |
| 6481 | // - Extract variable |
| 6482 | // - Extract interface from class |
| 6483 | // - ... |
| 6484 | RefactorExtract CodeActionKind = "refactor.extract" |
| 6485 | // Base kind for refactoring inline actions: 'refactor.inline' |
| 6486 | // |
| 6487 | // Example inline actions: |
| 6488 | // |
| 6489 | // |
| 6490 | // - Inline function |
| 6491 | // - Inline variable |
| 6492 | // - Inline constant |
| 6493 | // - ... |
| 6494 | RefactorInline CodeActionKind = "refactor.inline" |
| 6495 | // Base kind for refactoring move actions: `refactor.move` |
| 6496 | // |
| 6497 | // Example move actions: |
| 6498 | // |
| 6499 | // |
| 6500 | // - Move a function to a new file |
| 6501 | // - Move a property between classes |
| 6502 | // - Move method to base class |
| 6503 | // - ... |
| 6504 | // |
| 6505 | // @since 3.18.0 |
| 6506 | // @proposed |
| 6507 | RefactorMove CodeActionKind = "refactor.move" |
| 6508 | // Base kind for refactoring rewrite actions: 'refactor.rewrite' |
| 6509 | // |
| 6510 | // Example rewrite actions: |
| 6511 | // |
| 6512 | // |
| 6513 | // - Convert JavaScript function to class |
| 6514 | // - Add or remove parameter |
| 6515 | // - Encapsulate field |
| 6516 | // - Make method static |
| 6517 | // - Move method to base class |
| 6518 | // - ... |
| 6519 | RefactorRewrite CodeActionKind = "refactor.rewrite" |
| 6520 | // Base kind for source actions: `source` |
| 6521 | // |
| 6522 | // Source code actions apply to the entire file. |
| 6523 | Source CodeActionKind = "source" |
| 6524 | // Base kind for an organize imports source action: `source.organizeImports` |
| 6525 | SourceOrganizeImports CodeActionKind = "source.organizeImports" |
| 6526 | // Base kind for auto-fix source actions: `source.fixAll`. |
| 6527 | // |
| 6528 | // Fix all actions automatically fix errors that have a clear fix that do not require user input. |
| 6529 | // They should not suppress errors or perform unsafe fixes such as generating new types or classes. |
| 6530 | // |
| 6531 | // @since 3.15.0 |
| 6532 | SourceFixAll CodeActionKind = "source.fixAll" |
| 6533 | // Base kind for all code actions applying to the entire notebook's scope. CodeActionKinds using |
| 6534 | // this should always begin with `notebook.` |
| 6535 | // |
| 6536 | // @since 3.18.0 |
| 6537 | Notebook CodeActionKind = "notebook" |
| 6538 | // Code action tags are extra annotations that tweak the behavior of a code action. |
| 6539 | // |
| 6540 | // @since 3.18.0 - proposed |
| 6541 | // Marks the code action as LLM-generated. |
| 6542 | LLMGenerated CodeActionTag = 1 |
| 6543 | // The reason why code actions were requested. |
| 6544 | // |
| 6545 | // @since 3.17.0 |
| 6546 | // Code actions were explicitly requested by the user or by an extension. |
| 6547 | CodeActionInvoked CodeActionTriggerKind = 1 |
| 6548 | // Code actions were requested automatically. |
| 6549 | // |
| 6550 | // This typically happens when current selection in a file changes, but can |
| 6551 | // also be triggered when file content changes. |
| 6552 | CodeActionAutomatic CodeActionTriggerKind = 2 |
| 6553 | // The kind of a completion entry. |
| 6554 | TextCompletion CompletionItemKind = 1 |
| 6555 | MethodCompletion CompletionItemKind = 2 |
| 6556 | FunctionCompletion CompletionItemKind = 3 |
| 6557 | ConstructorCompletion CompletionItemKind = 4 |
| 6558 | FieldCompletion CompletionItemKind = 5 |
| 6559 | VariableCompletion CompletionItemKind = 6 |
| 6560 | ClassCompletion CompletionItemKind = 7 |
| 6561 | InterfaceCompletion CompletionItemKind = 8 |
| 6562 | ModuleCompletion CompletionItemKind = 9 |
| 6563 | PropertyCompletion CompletionItemKind = 10 |
| 6564 | UnitCompletion CompletionItemKind = 11 |
| 6565 | ValueCompletion CompletionItemKind = 12 |
| 6566 | EnumCompletion CompletionItemKind = 13 |
| 6567 | KeywordCompletion CompletionItemKind = 14 |
| 6568 | SnippetCompletion CompletionItemKind = 15 |
| 6569 | ColorCompletion CompletionItemKind = 16 |
| 6570 | FileCompletion CompletionItemKind = 17 |
| 6571 | ReferenceCompletion CompletionItemKind = 18 |
| 6572 | FolderCompletion CompletionItemKind = 19 |
| 6573 | EnumMemberCompletion CompletionItemKind = 20 |
| 6574 | ConstantCompletion CompletionItemKind = 21 |
| 6575 | StructCompletion CompletionItemKind = 22 |
| 6576 | EventCompletion CompletionItemKind = 23 |
| 6577 | OperatorCompletion CompletionItemKind = 24 |
| 6578 | TypeParameterCompletion CompletionItemKind = 25 |
| 6579 | // Completion item tags are extra annotations that tweak the rendering of a completion |
| 6580 | // item. |
| 6581 | // |
| 6582 | // @since 3.15.0 |
| 6583 | // Render a completion as obsolete, usually using a strike-out. |
| 6584 | ComplDeprecated CompletionItemTag = 1 |
| 6585 | // How a completion was triggered |
| 6586 | // Completion was triggered by typing an identifier (24x7 code |
| 6587 | // complete), manual invocation (e.g Ctrl+Space) or via API. |
| 6588 | Invoked CompletionTriggerKind = 1 |
| 6589 | // Completion was triggered by a trigger character specified by |
| 6590 | // the `triggerCharacters` properties of the `CompletionRegistrationOptions`. |
| 6591 | TriggerCharacter CompletionTriggerKind = 2 |
| 6592 | // Completion was re-triggered as current completion list is incomplete |
| 6593 | TriggerForIncompleteCompletions CompletionTriggerKind = 3 |
| 6594 | // The diagnostic's severity. |
| 6595 | // Reports an error. |
| 6596 | SeverityError DiagnosticSeverity = 1 |
| 6597 | // Reports a warning. |
| 6598 | SeverityWarning DiagnosticSeverity = 2 |
| 6599 | // Reports an information. |
| 6600 | SeverityInformation DiagnosticSeverity = 3 |
| 6601 | // Reports a hint. |
| 6602 | SeverityHint DiagnosticSeverity = 4 |
| 6603 | // The diagnostic tags. |
| 6604 | // |
| 6605 | // @since 3.15.0 |
| 6606 | // Unused or unnecessary code. |
| 6607 | // |
| 6608 | // Clients are allowed to render diagnostics with this tag faded out instead of having |
| 6609 | // an error squiggle. |
| 6610 | Unnecessary DiagnosticTag = 1 |
| 6611 | // Deprecated or obsolete code. |
| 6612 | // |
| 6613 | // Clients are allowed to rendered diagnostics with this tag strike through. |
| 6614 | Deprecated DiagnosticTag = 2 |
| 6615 | // The document diagnostic report kinds. |
| 6616 | // |
| 6617 | // @since 3.17.0 |
| 6618 | // A diagnostic report with a full |
| 6619 | // set of problems. |
| 6620 | DiagnosticFull DocumentDiagnosticReportKind = "full" |
| 6621 | // A report indicating that the last |
| 6622 | // returned report is still accurate. |
| 6623 | DiagnosticUnchanged DocumentDiagnosticReportKind = "unchanged" |
| 6624 | // A document highlight kind. |
| 6625 | // A textual occurrence. |
| 6626 | Text DocumentHighlightKind = 1 |
| 6627 | // Read-access of a symbol, like reading a variable. |
| 6628 | Read DocumentHighlightKind = 2 |
| 6629 | // Write-access of a symbol, like writing to a variable. |
| 6630 | Write DocumentHighlightKind = 3 |
| 6631 | // Predefined error codes. |
| 6632 | ParseError ErrorCodes = -32700 |
| 6633 | InvalidRequest ErrorCodes = -32600 |
| 6634 | MethodNotFound ErrorCodes = -32601 |
| 6635 | InvalidParams ErrorCodes = -32602 |
| 6636 | InternalError ErrorCodes = -32603 |
| 6637 | // Error code indicating that a server received a notification or |
| 6638 | // request before the server has received the `initialize` request. |
| 6639 | ServerNotInitialized ErrorCodes = -32002 |
| 6640 | UnknownErrorCode ErrorCodes = -32001 |
| 6641 | // Applying the workspace change is simply aborted if one of the changes provided |
| 6642 | // fails. All operations executed before the failing operation stay executed. |
| 6643 | Abort FailureHandlingKind = "abort" |
| 6644 | // All operations are executed transactional. That means they either all |
| 6645 | // succeed or no changes at all are applied to the workspace. |
| 6646 | Transactional FailureHandlingKind = "transactional" |
| 6647 | // If the workspace edit contains only textual file changes they are executed transactional. |
| 6648 | // If resource changes (create, rename or delete file) are part of the change the failure |
| 6649 | // handling strategy is abort. |
| 6650 | TextOnlyTransactional FailureHandlingKind = "textOnlyTransactional" |
| 6651 | // The client tries to undo the operations already executed. But there is no |
| 6652 | // guarantee that this is succeeding. |
| 6653 | Undo FailureHandlingKind = "undo" |
| 6654 | // The file event type |
| 6655 | // The file got created. |
| 6656 | Created FileChangeType = 1 |
| 6657 | // The file got changed. |
| 6658 | Changed FileChangeType = 2 |
| 6659 | // The file got deleted. |
| 6660 | Deleted FileChangeType = 3 |
| 6661 | // A pattern kind describing if a glob pattern matches a file a folder or |
| 6662 | // both. |
| 6663 | // |
| 6664 | // @since 3.16.0 |
| 6665 | // The pattern matches a file only. |
| 6666 | FilePattern FileOperationPatternKind = "file" |
| 6667 | // The pattern matches a folder only. |
| 6668 | FolderPattern FileOperationPatternKind = "folder" |
| 6669 | // A set of predefined range kinds. |
| 6670 | // Folding range for a comment |
| 6671 | Comment FoldingRangeKind = "comment" |
| 6672 | // Folding range for an import or include |
| 6673 | Imports FoldingRangeKind = "imports" |
| 6674 | // Folding range for a region (e.g. `#region`) |
| 6675 | Region FoldingRangeKind = "region" |
| 6676 | // Inlay hint kinds. |
| 6677 | // |
| 6678 | // @since 3.17.0 |
| 6679 | // An inlay hint that for a type annotation. |
| 6680 | Type InlayHintKind = 1 |
| 6681 | // An inlay hint that is for a parameter. |
| 6682 | Parameter InlayHintKind = 2 |
| 6683 | // Describes how an {@link InlineCompletionItemProvider inline completion provider} was triggered. |
| 6684 | // |
| 6685 | // @since 3.18.0 |
| 6686 | // @proposed |
| 6687 | // Completion was triggered explicitly by a user gesture. |
| 6688 | InlineInvoked InlineCompletionTriggerKind = 1 |
| 6689 | // Completion was triggered automatically while editing. |
| 6690 | InlineAutomatic InlineCompletionTriggerKind = 2 |
| 6691 | // Defines whether the insert text in a completion item should be interpreted as |
| 6692 | // plain text or a snippet. |
| 6693 | // The primary text to be inserted is treated as a plain string. |
| 6694 | PlainTextTextFormat InsertTextFormat = 1 |
| 6695 | // The primary text to be inserted is treated as a snippet. |
| 6696 | // |
| 6697 | // A snippet can define tab stops and placeholders with `$1`, `$2` |
| 6698 | // and `${3:foo}`. `$0` defines the final tab stop, it defaults to |
| 6699 | // the end of the snippet. Placeholders with equal identifiers are linked, |
| 6700 | // that is typing in one will update others too. |
| 6701 | // |
| 6702 | // See also: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#snippet_syntax |
| 6703 | SnippetTextFormat InsertTextFormat = 2 |
| 6704 | // How whitespace and indentation is handled during completion |
| 6705 | // item insertion. |
| 6706 | // |
| 6707 | // @since 3.16.0 |
| 6708 | // The insertion or replace strings is taken as it is. If the |
| 6709 | // value is multi line the lines below the cursor will be |
| 6710 | // inserted using the indentation defined in the string value. |
| 6711 | // The client will not apply any kind of adjustments to the |
| 6712 | // string. |
| 6713 | AsIs InsertTextMode = 1 |
| 6714 | // The editor adjusts leading whitespace of new lines so that |
| 6715 | // they match the indentation up to the cursor of the line for |
| 6716 | // which the item is accepted. |
| 6717 | // |
| 6718 | // Consider a line like this: <2tabs><cursor><3tabs>foo. Accepting a |
| 6719 | // multi line completion item is indented using 2 tabs and all |
| 6720 | // following lines inserted will be indented using 2 tabs as well. |
| 6721 | AdjustIndentation InsertTextMode = 2 |
| 6722 | // A request failed but it was syntactically correct, e.g the |
| 6723 | // method name was known and the parameters were valid. The error |
| 6724 | // message should contain human readable information about why |
| 6725 | // the request failed. |
| 6726 | // |
| 6727 | // @since 3.17.0 |
| 6728 | RequestFailed LSPErrorCodes = -32803 |
| 6729 | // The server cancelled the request. This error code should |
| 6730 | // only be used for requests that explicitly support being |
| 6731 | // server cancellable. |
| 6732 | // |
| 6733 | // @since 3.17.0 |
| 6734 | ServerCancelled LSPErrorCodes = -32802 |
| 6735 | // The server detected that the content of a document got |
| 6736 | // modified outside normal conditions. A server should |
| 6737 | // NOT send this error code if it detects a content change |
| 6738 | // in it unprocessed messages. The result even computed |
| 6739 | // on an older state might still be useful for the client. |
| 6740 | // |
| 6741 | // If a client decides that a result is not of any use anymore |
| 6742 | // the client should cancel the request. |
| 6743 | ContentModified LSPErrorCodes = -32801 |
| 6744 | // The client has canceled a request and a server has detected |
| 6745 | // the cancel. |
| 6746 | RequestCancelled LSPErrorCodes = -32800 |
| 6747 | // Predefined Language kinds |
| 6748 | // @since 3.18.0 |
| 6749 | LangABAP LanguageKind = "abap" |
| 6750 | LangWindowsBat LanguageKind = "bat" |
| 6751 | LangBibTeX LanguageKind = "bibtex" |
| 6752 | LangClojure LanguageKind = "clojure" |
| 6753 | LangCoffeescript LanguageKind = "coffeescript" |
| 6754 | LangC LanguageKind = "c" |
| 6755 | LangCPP LanguageKind = "cpp" |
| 6756 | LangCSharp LanguageKind = "csharp" |
| 6757 | LangCSS LanguageKind = "css" |
| 6758 | // @since 3.18.0 |
| 6759 | // @proposed |
| 6760 | LangD LanguageKind = "d" |
| 6761 | // @since 3.18.0 |
| 6762 | // @proposed |
| 6763 | LangDelphi LanguageKind = "pascal" |
| 6764 | LangDiff LanguageKind = "diff" |
| 6765 | LangDart LanguageKind = "dart" |
| 6766 | LangDockerfile LanguageKind = "dockerfile" |
| 6767 | LangElixir LanguageKind = "elixir" |
| 6768 | LangErlang LanguageKind = "erlang" |
| 6769 | LangFSharp LanguageKind = "fsharp" |
| 6770 | LangGitCommit LanguageKind = "git-commit" |
| 6771 | LangGitRebase LanguageKind = "rebase" |
| 6772 | LangGo LanguageKind = "go" |
| 6773 | LangGroovy LanguageKind = "groovy" |
| 6774 | LangHandlebars LanguageKind = "handlebars" |
| 6775 | LangHaskell LanguageKind = "haskell" |
| 6776 | LangHTML LanguageKind = "html" |
| 6777 | LangIni LanguageKind = "ini" |
| 6778 | LangJava LanguageKind = "java" |
| 6779 | LangJavaScript LanguageKind = "javascript" |
| 6780 | LangJavaScriptReact LanguageKind = "javascriptreact" |
| 6781 | LangJSON LanguageKind = "json" |
| 6782 | LangLaTeX LanguageKind = "latex" |
| 6783 | LangLess LanguageKind = "less" |
| 6784 | LangLua LanguageKind = "lua" |
| 6785 | LangMakefile LanguageKind = "makefile" |
| 6786 | LangMarkdown LanguageKind = "markdown" |
| 6787 | LangObjectiveC LanguageKind = "objective-c" |
| 6788 | LangObjectiveCPP LanguageKind = "objective-cpp" |
| 6789 | // @since 3.18.0 |
| 6790 | // @proposed |
| 6791 | LangPascal LanguageKind = "pascal" |
| 6792 | LangPerl LanguageKind = "perl" |
| 6793 | LangPerl6 LanguageKind = "perl6" |
| 6794 | LangPHP LanguageKind = "php" |
| 6795 | LangPowershell LanguageKind = "powershell" |
| 6796 | LangPug LanguageKind = "jade" |
| 6797 | LangPython LanguageKind = "python" |
| 6798 | LangR LanguageKind = "r" |
| 6799 | LangRazor LanguageKind = "razor" |
| 6800 | LangRuby LanguageKind = "ruby" |
| 6801 | LangRust LanguageKind = "rust" |
| 6802 | LangSCSS LanguageKind = "scss" |
| 6803 | LangSASS LanguageKind = "sass" |
| 6804 | LangScala LanguageKind = "scala" |
| 6805 | LangShaderLab LanguageKind = "shaderlab" |
| 6806 | LangShellScript LanguageKind = "shellscript" |
| 6807 | LangSQL LanguageKind = "sql" |
| 6808 | LangSwift LanguageKind = "swift" |
| 6809 | LangTypeScript LanguageKind = "typescript" |
| 6810 | LangTypeScriptReact LanguageKind = "typescriptreact" |
| 6811 | LangTeX LanguageKind = "tex" |
| 6812 | LangVisualBasic LanguageKind = "vb" |
| 6813 | LangXML LanguageKind = "xml" |
| 6814 | LangXSL LanguageKind = "xsl" |
| 6815 | LangYAML LanguageKind = "yaml" |
| 6816 | // Describes the content type that a client supports in various |
| 6817 | // result literals like `Hover`, `ParameterInfo` or `CompletionItem`. |
| 6818 | // |
| 6819 | // Please note that `MarkupKinds` must not start with a `$`. This kinds |
| 6820 | // are reserved for internal usage. |
| 6821 | // Plain text is supported as a content format |
| 6822 | PlainText MarkupKind = "plaintext" |
| 6823 | // Markdown is supported as a content format |
| 6824 | Markdown MarkupKind = "markdown" |
| 6825 | // The message type |
| 6826 | // An error message. |
| 6827 | Error MessageType = 1 |
| 6828 | // A warning message. |
| 6829 | Warning MessageType = 2 |
| 6830 | // An information message. |
| 6831 | Info MessageType = 3 |
| 6832 | // A log message. |
| 6833 | Log MessageType = 4 |
| 6834 | // A debug message. |
| 6835 | // |
| 6836 | // @since 3.18.0 |
| 6837 | // @proposed |
| 6838 | Debug MessageType = 5 |
| 6839 | // The moniker kind. |
| 6840 | // |
| 6841 | // @since 3.16.0 |
| 6842 | // The moniker represent a symbol that is imported into a project |
| 6843 | Import MonikerKind = "import" |
| 6844 | // The moniker represents a symbol that is exported from a project |
| 6845 | Export MonikerKind = "export" |
| 6846 | // The moniker represents a symbol that is local to a project (e.g. a local |
| 6847 | // variable of a function, a class not visible outside the project, ...) |
| 6848 | Local MonikerKind = "local" |
| 6849 | // A notebook cell kind. |
| 6850 | // |
| 6851 | // @since 3.17.0 |
| 6852 | // A markup-cell is formatted source that is used for display. |
| 6853 | Markup NotebookCellKind = 1 |
| 6854 | // A code-cell is source code. |
| 6855 | Code NotebookCellKind = 2 |
| 6856 | // A set of predefined position encoding kinds. |
| 6857 | // |
| 6858 | // @since 3.17.0 |
| 6859 | // Character offsets count UTF-8 code units (e.g. bytes). |
| 6860 | UTF8 PositionEncodingKind = "utf-8" |
| 6861 | // Character offsets count UTF-16 code units. |
| 6862 | // |
| 6863 | // This is the default and must always be supported |
| 6864 | // by servers |
| 6865 | UTF16 PositionEncodingKind = "utf-16" |
| 6866 | // Character offsets count UTF-32 code units. |
| 6867 | // |
| 6868 | // Implementation note: these are the same as Unicode codepoints, |
| 6869 | // so this `PositionEncodingKind` may also be used for an |
| 6870 | // encoding-agnostic representation of character offsets. |
| 6871 | UTF32 PositionEncodingKind = "utf-32" |
| 6872 | // The client's default behavior is to select the identifier |
| 6873 | // according the to language's syntax rule. |
| 6874 | Identifier PrepareSupportDefaultBehavior = 1 |
| 6875 | // Supports creating new files and folders. |
| 6876 | Create ResourceOperationKind = "create" |
| 6877 | // Supports renaming existing files and folders. |
| 6878 | Rename ResourceOperationKind = "rename" |
| 6879 | // Supports deleting existing files and folders. |
| 6880 | Delete ResourceOperationKind = "delete" |
| 6881 | // A set of predefined token modifiers. This set is not fixed |
| 6882 | // an clients can specify additional token types via the |
| 6883 | // corresponding client capabilities. |
| 6884 | // |
| 6885 | // @since 3.16.0 |
| 6886 | ModDeclaration SemanticTokenModifiers = "declaration" |
| 6887 | ModDefinition SemanticTokenModifiers = "definition" |
| 6888 | ModReadonly SemanticTokenModifiers = "readonly" |
| 6889 | ModStatic SemanticTokenModifiers = "static" |
| 6890 | ModDeprecated SemanticTokenModifiers = "deprecated" |
| 6891 | ModAbstract SemanticTokenModifiers = "abstract" |
| 6892 | ModAsync SemanticTokenModifiers = "async" |
| 6893 | ModModification SemanticTokenModifiers = "modification" |
| 6894 | ModDocumentation SemanticTokenModifiers = "documentation" |
| 6895 | ModDefaultLibrary SemanticTokenModifiers = "defaultLibrary" |
| 6896 | // A set of predefined token types. This set is not fixed |
| 6897 | // an clients can specify additional token types via the |
| 6898 | // corresponding client capabilities. |
| 6899 | // |
| 6900 | // @since 3.16.0 |
| 6901 | NamespaceType SemanticTokenTypes = "namespace" |
| 6902 | // Represents a generic type. Acts as a fallback for types which can't be mapped to |
| 6903 | // a specific type like class or enum. |
| 6904 | TypeType SemanticTokenTypes = "type" |
| 6905 | ClassType SemanticTokenTypes = "class" |
| 6906 | EnumType SemanticTokenTypes = "enum" |
| 6907 | InterfaceType SemanticTokenTypes = "interface" |
| 6908 | StructType SemanticTokenTypes = "struct" |
| 6909 | TypeParameterType SemanticTokenTypes = "typeParameter" |
| 6910 | ParameterType SemanticTokenTypes = "parameter" |
| 6911 | VariableType SemanticTokenTypes = "variable" |
| 6912 | PropertyType SemanticTokenTypes = "property" |
| 6913 | EnumMemberType SemanticTokenTypes = "enumMember" |
| 6914 | EventType SemanticTokenTypes = "event" |
| 6915 | FunctionType SemanticTokenTypes = "function" |
| 6916 | MethodType SemanticTokenTypes = "method" |
| 6917 | MacroType SemanticTokenTypes = "macro" |
| 6918 | KeywordType SemanticTokenTypes = "keyword" |
| 6919 | ModifierType SemanticTokenTypes = "modifier" |
| 6920 | CommentType SemanticTokenTypes = "comment" |
| 6921 | StringType SemanticTokenTypes = "string" |
| 6922 | NumberType SemanticTokenTypes = "number" |
| 6923 | RegexpType SemanticTokenTypes = "regexp" |
| 6924 | OperatorType SemanticTokenTypes = "operator" |
| 6925 | // @since 3.17.0 |
| 6926 | DecoratorType SemanticTokenTypes = "decorator" |
| 6927 | // @since 3.18.0 |
| 6928 | LabelType SemanticTokenTypes = "label" |
| 6929 | // How a signature help was triggered. |
| 6930 | // |
| 6931 | // @since 3.15.0 |
| 6932 | // Signature help was invoked manually by the user or by a command. |
| 6933 | SigInvoked SignatureHelpTriggerKind = 1 |
| 6934 | // Signature help was triggered by a trigger character. |
| 6935 | SigTriggerCharacter SignatureHelpTriggerKind = 2 |
| 6936 | // Signature help was triggered by the cursor moving or by the document content changing. |
| 6937 | SigContentChange SignatureHelpTriggerKind = 3 |
| 6938 | // A symbol kind. |
| 6939 | File SymbolKind = 1 |
| 6940 | Module SymbolKind = 2 |
| 6941 | Namespace SymbolKind = 3 |
| 6942 | Package SymbolKind = 4 |
| 6943 | Class SymbolKind = 5 |
| 6944 | Method SymbolKind = 6 |
| 6945 | Property SymbolKind = 7 |
| 6946 | Field SymbolKind = 8 |
| 6947 | Constructor SymbolKind = 9 |
| 6948 | Enum SymbolKind = 10 |
| 6949 | Interface SymbolKind = 11 |
| 6950 | Function SymbolKind = 12 |
| 6951 | Variable SymbolKind = 13 |
| 6952 | Constant SymbolKind = 14 |
| 6953 | String SymbolKind = 15 |
| 6954 | Number SymbolKind = 16 |
| 6955 | Boolean SymbolKind = 17 |
| 6956 | Array SymbolKind = 18 |
| 6957 | Object SymbolKind = 19 |
| 6958 | Key SymbolKind = 20 |
| 6959 | Null SymbolKind = 21 |
| 6960 | EnumMember SymbolKind = 22 |
| 6961 | Struct SymbolKind = 23 |
| 6962 | Event SymbolKind = 24 |
| 6963 | Operator SymbolKind = 25 |
| 6964 | TypeParameter SymbolKind = 26 |
| 6965 | // Symbol tags are extra annotations that tweak the rendering of a symbol. |
| 6966 | // |
| 6967 | // @since 3.16 |
| 6968 | // Render a symbol as obsolete, usually using a strike-out. |
| 6969 | DeprecatedSymbol SymbolTag = 1 |
| 6970 | // Represents reasons why a text document is saved. |
| 6971 | // Manually triggered, e.g. by the user pressing save, by starting debugging, |
| 6972 | // or by an API call. |
| 6973 | Manual TextDocumentSaveReason = 1 |
| 6974 | // Automatic after a delay. |
| 6975 | AfterDelay TextDocumentSaveReason = 2 |
| 6976 | // When the editor lost focus. |
| 6977 | FocusOut TextDocumentSaveReason = 3 |
| 6978 | // Defines how the host (editor) should sync |
| 6979 | // document changes to the language server. |
| 6980 | // Documents should not be synced at all. |
| 6981 | None TextDocumentSyncKind = 0 |
| 6982 | // Documents are synced by always sending the full content |
| 6983 | // of the document. |
| 6984 | Full TextDocumentSyncKind = 1 |
| 6985 | // Documents are synced by sending the full content on open. |
| 6986 | // After that only incremental updates to the document are |
| 6987 | // send. |
| 6988 | Incremental TextDocumentSyncKind = 2 |
| 6989 | Relative TokenFormat = "relative" |
| 6990 | // Turn tracing off. |
| 6991 | Off TraceValue = "off" |
| 6992 | // Trace messages only. |
| 6993 | Messages TraceValue = "messages" |
| 6994 | // Verbose message tracing. |
| 6995 | Verbose TraceValue = "verbose" |
| 6996 | // Moniker uniqueness level to define scope of the moniker. |
| 6997 | // |
| 6998 | // @since 3.16.0 |
| 6999 | // The moniker is only unique inside a document |
| 7000 | Document UniquenessLevel = "document" |
| 7001 | // The moniker is unique inside a project for which a dump got created |
| 7002 | Project UniquenessLevel = "project" |
| 7003 | // The moniker is unique inside the group to which a project belongs |
| 7004 | Group UniquenessLevel = "group" |
| 7005 | // The moniker is unique inside the moniker scheme. |
| 7006 | Scheme UniquenessLevel = "scheme" |
| 7007 | // The moniker is globally unique |
| 7008 | Global UniquenessLevel = "global" |
| 7009 | // Interested in create events. |
| 7010 | WatchCreate WatchKind = 1 |
| 7011 | // Interested in change events |
| 7012 | WatchChange WatchKind = 2 |
| 7013 | // Interested in delete events |
| 7014 | WatchDelete WatchKind = 4 |
| 7015 | ) |