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