diff --git a/generator/lsp.json b/generator/lsp.json index 7746def..7b88937 100644 --- a/generator/lsp.json +++ b/generator/lsp.json @@ -1706,6 +1706,37 @@ }, "documentation": "A request to format a range in a document." }, + { + "method": "textDocument/rangesFormatting", + "result": { + "kind": "or", + "items": [ + { + "kind": "array", + "element": { + "kind": "reference", + "name": "TextEdit" + } + }, + { + "kind": "base", + "name": "null" + } + ] + }, + "messageDirection": "clientToServer", + "params": { + "kind": "reference", + "name": "DocumentRangesFormattingParams" + }, + "registrationOptions": { + "kind": "reference", + "name": "DocumentRangeFormattingRegistrationOptions" + }, + "documentation": "A request to format ranges in a document.\n\n@since 3.18.0\n@proposed", + "since": "3.18.0", + "proposed": true + }, { "method": "textDocument/onTypeFormatting", "result": { @@ -5982,6 +6013,47 @@ ], "documentation": "Registration options for a {@link DocumentRangeFormattingRequest}." }, + { + "name": "DocumentRangesFormattingParams", + "properties": [ + { + "name": "textDocument", + "type": { + "kind": "reference", + "name": "TextDocumentIdentifier" + }, + "documentation": "The document to format." + }, + { + "name": "ranges", + "type": { + "kind": "array", + "element": { + "kind": "reference", + "name": "Range" + } + }, + "documentation": "The ranges to format" + }, + { + "name": "options", + "type": { + "kind": "reference", + "name": "FormattingOptions" + }, + "documentation": "The format options" + } + ], + "mixins": [ + { + "kind": "reference", + "name": "WorkDoneProgressParams" + } + ], + "documentation": "The parameters of a {@link DocumentRangesFormattingRequest}.\n\n@since 3.18.0\n@proposed", + "since": "3.18.0", + "proposed": true + }, { "name": "DocumentOnTypeFormattingParams", "properties": [ @@ -9477,7 +9549,19 @@ }, { "name": "DocumentRangeFormattingOptions", - "properties": [], + "properties": [ + { + "name": "rangesSupport", + "type": { + "kind": "base", + "name": "boolean" + }, + "optional": true, + "documentation": "Whether the server supports formatting multiple ranges at once.\n\n@since 3.18.0\n@proposed", + "since": "3.18.0", + "proposed": true + } + ], "mixins": [ { "kind": "reference", @@ -12193,6 +12277,17 @@ }, "optional": true, "documentation": "Whether range formatting supports dynamic registration." + }, + { + "name": "rangesSupport", + "type": { + "kind": "base", + "name": "boolean" + }, + "optional": true, + "documentation": "Whether the client supports formatting multiple ranges at once.\n\n@since 3.18.0\n@proposed", + "since": "3.18.0", + "proposed": true } ], "documentation": "Client capabilities of a {@link DocumentRangeFormattingRequest}." diff --git a/noxfile.py b/noxfile.py index fb0a942..7dcf8f3 100644 --- a/noxfile.py +++ b/noxfile.py @@ -1,6 +1,7 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. import json +import os import pathlib import urllib.request as url_lib @@ -19,65 +20,60 @@ def _install_requirements(session: nox.Session): @nox.session() def tests(session: nox.Session): - """Run tests for lsprotocol and generator.""" + """Run tests for generator and generated code in all languages.""" _install_requirements(session) + + session.log("Running tests: generator and generated Python code.") session.run("pytest", "./tests") + # TODO: Uncomment after tests are ready + # session.log("Running tests: generated Rust code.") + # with session.chdir("./tests/rust/lsprotocol"): + # session.run("cargo", "test", external=True) + + # TODO: Uncomment after tests are ready + # session.log("Running tests: generated C# code.") + # with session.chdir("./test/dotnet/lsprotocol_tests"): + # session.run("dotnet", "test", external=True) + @nox.session() def lint(session: nox.Session): - """Lint all packages.""" + """Linting for generator and generated code in all languages.""" _install_requirements(session) + session.log("Linting: generator and generated Python code.") session.install("isort", "black", "mypy") session.run("isort", "--profile", "black", "--check", ".") session.run("black", "--check", ".") session.run("mypy", "--strict", "--no-incremental", "./packages/python/lsprotocol") + session.log("Linting: generated Rust code.") with session.chdir("./packages/rust/lsprotocol"): session.run("cargo", "fmt", "--check", external=True) @nox.session() def format(session: nox.Session): - """Format all code.""" - _format_code(session) - - -def _generate_model(session: nox.Session): - _install_requirements(session) - - session.run("python", "-m", "generator") + """Format generator and lsprotocol package for PyPI.""" _format_code(session) def _format_code(session: nox.Session): - session.install("isort", "black", "docformatter") + session.install("isort", "black") - session.run("isort", "--profile", "black", ".") - session.run("black", ".") - session.run("docformatter", "--in-place", "--recursive", "--black", ".") session.run("isort", "--profile", "black", ".") session.run("black", ".") # this is for the lsprotocol package only - python_package_path = "./packages/python/lsprotocol" - session.run("isort", "--profile", "black", python_package_path) - session.run("black", python_package_path) - session.run( - "docformatter", "--in-place", "--recursive", "--black", python_package_path - ) - # do it again to correct any adjustments done by docformatter - session.run("isort", "--profile", "black", python_package_path) - session.run("black", python_package_path) - - with session.chdir("./packages/rust/lsprotocol"): - session.run("cargo", "fmt", external=True) + python_package_path = pathlib.Path("./packages/python/lsprotocol") + session.run("isort", "--profile", "black", os.fspath(python_package_path)) + session.run("black", os.fspath(python_package_path)) @nox.session() def build(session: nox.Session): - """Build lsprotocol package.""" + """Build lsprotocol (python) package for PyPI.""" session.install("flit") with session.chdir("./packages/python"): session.run("flit", "build") @@ -117,15 +113,18 @@ def _download_models(session: nox.session): @nox.session() def build_lsp(session: nox.Session): - """Generate lsprotocol package from LSP model.""" - _generate_model(session) + """Generate lsprotocol for all languages.""" + generate_python(session) + generate_dotnet(session) + generate_rust(session) @nox.session() def update_lsp(session: nox.Session): - """Update the LSP model and generate the lsprotocol content.""" + """Update the LSP model and generate the lsprotocol for all languages.""" + update_packages(session) _download_models(session) - _generate_model(session) + build_lsp(session) @nox.session() @@ -136,10 +135,17 @@ def update_packages(session: nox.Session): session.run( "pip-compile", "--generate-hashes", + "--resolver=backtracking", "--upgrade", "./packages/python/requirements.in", ) - session.run("pip-compile", "--generate-hashes", "--upgrade", "./requirements.in") + session.run( + "pip-compile", + "--generate-hashes", + "--resolver=backtracking", + "--upgrade", + "./requirements.in", + ) @nox.session() @@ -218,11 +224,29 @@ def create_plugin(session: nox.Session): @nox.session() -def update_dotnet(session: nox.Session): +def generate_dotnet(session: nox.Session): """Update the dotnet code.""" - _download_models(session) _install_requirements(session) session.run("python", "-m", "generator", "--plugin", "dotnet") with session.chdir("./packages/dotnet/lsprotocol"): - session.run("dotnet", "build") + session.run("dotnet", "build", external=True) + + +@nox.session() +def generate_python(session: nox.Session): + """Update the python code.""" + _install_requirements(session) + + session.run("python", "-m", "generator", "--plugin", "python") + _format_code(session) + + +@nox.session() +def generate_rust(session: nox.Session): + """Update the rust code.""" + _install_requirements(session) + + session.run("python", "-m", "generator", "--plugin", "rust") + with session.chdir("./packages/rust/lsprotocol"): + session.run("cargo", "fmt", external=True) diff --git a/packages/python/lsprotocol/types.py b/packages/python/lsprotocol/types.py index 6a60838..c0b330d 100644 --- a/packages/python/lsprotocol/types.py +++ b/packages/python/lsprotocol/types.py @@ -20,20 +20,17 @@ @enum.unique class SemanticTokenTypes(str, enum.Enum): - """A set of predefined token types. This set is not fixed an clients can specify - additional token types via the corresponding client capabilities. + """A set of predefined token types. This set is not fixed + an clients can specify additional token types via the + corresponding client capabilities. - @since 3.16.0 - """ + @since 3.16.0""" # Since: 3.16.0 Namespace = "namespace" Type = "type" - """Represents a generic type. - - Acts as a fallback for types which can't be mapped to a specific type like class or - enum. - """ + """Represents a generic type. Acts as a fallback for types which can't be mapped to + a specific type like class or enum.""" Class = "class" Enum = "enum" Interface = "interface" @@ -61,11 +58,11 @@ class SemanticTokenTypes(str, enum.Enum): @enum.unique class SemanticTokenModifiers(str, enum.Enum): - """A set of predefined token modifiers. This set is not fixed an clients can specify - additional token types via the corresponding client capabilities. + """A set of predefined token modifiers. This set is not fixed + an clients can specify additional token types via the + corresponding client capabilities. - @since 3.16.0 - """ + @since 3.16.0""" # Since: 3.16.0 Declaration = "declaration" @@ -84,14 +81,15 @@ class SemanticTokenModifiers(str, enum.Enum): class DocumentDiagnosticReportKind(str, enum.Enum): """The document diagnostic report kinds. - @since 3.17.0 - """ + @since 3.17.0""" # Since: 3.17.0 Full = "full" - """A diagnostic report with a full set of problems.""" + """A diagnostic report with a full + set of problems.""" Unchanged = "unchanged" - """A report indicating that the last returned report is still accurate.""" + """A report indicating that the last + returned report is still accurate.""" class ErrorCodes(int, enum.Enum): @@ -110,31 +108,32 @@ class ErrorCodes(int, enum.Enum): class LSPErrorCodes(int, enum.Enum): RequestFailed = -32803 - """A request failed but it was syntactically correct, e.g the method name was known - and the parameters were valid. The error message should contain human readable - information about why the request failed. - - @since 3.17.0 - """ + """A request failed but it was syntactically correct, e.g the + method name was known and the parameters were valid. The error + message should contain human readable information about why + the request failed. + + @since 3.17.0""" # Since: 3.17.0 ServerCancelled = -32802 - """The server cancelled the request. This error code should only be used for - requests that explicitly support being server cancellable. - - @since 3.17.0 - """ + """The server cancelled the request. This error code should + only be used for requests that explicitly support being + server cancellable. + + @since 3.17.0""" # Since: 3.17.0 ContentModified = -32801 - """The server detected that the content of a document got modified outside normal - conditions. A server should NOT send this error code if it detects a content change - in it unprocessed messages. The result even computed on an older state might still - be useful for the client. - - If a client decides that a result is not of any use anymore the client should cancel - the request. - """ + """The server detected that the content of a document got + modified outside normal conditions. A server should + NOT send this error code if it detects a content change + in it unprocessed messages. The result even computed + on an older state might still be useful for the client. + + If a client decides that a result is not of any use anymore + the client should cancel the request.""" RequestCancelled = -32800 - """The client has canceled a request and a server as detected the cancel.""" + """The client has canceled a request and a server as detected + the cancel.""" @enum.unique @@ -142,9 +141,9 @@ class FoldingRangeKind(str, enum.Enum): """A set of predefined range kinds.""" Comment = "comment" - """Folding range for a comment.""" + """Folding range for a comment""" Imports = "imports" - """Folding range for an import or include.""" + """Folding range for an import or include""" Region = "region" """Folding range for a region (e.g. `#region`)""" @@ -185,8 +184,7 @@ class SymbolKind(int, enum.Enum): class SymbolTag(int, enum.Enum): """Symbol tags are extra annotations that tweak the rendering of a symbol. - @since 3.16 - """ + @since 3.16""" # Since: 3.16 Deprecated = 1 @@ -197,34 +195,32 @@ class SymbolTag(int, enum.Enum): class UniquenessLevel(str, enum.Enum): """Moniker uniqueness level to define scope of the moniker. - @since 3.16.0 - """ + @since 3.16.0""" # Since: 3.16.0 Document = "document" - """The moniker is only unique inside a document.""" + """The moniker is only unique inside a document""" Project = "project" - """The moniker is unique inside a project for which a dump got created.""" + """The moniker is unique inside a project for which a dump got created""" Group = "group" - """The moniker is unique inside the group to which a project belongs.""" + """The moniker is unique inside the group to which a project belongs""" Scheme = "scheme" """The moniker is unique inside the moniker scheme.""" Global = "global" - """The moniker is globally unique.""" + """The moniker is globally unique""" @enum.unique class MonikerKind(str, enum.Enum): """The moniker kind. - @since 3.16.0 - """ + @since 3.16.0""" # Since: 3.16.0 Import = "import" - """The moniker represent a symbol that is imported into a project.""" + """The moniker represent a symbol that is imported into a project""" Export = "export" - """The moniker represents a symbol that is exported from a project.""" + """The moniker represents a symbol that is exported from a project""" Local = "local" """The moniker represents a symbol that is local to a project (e.g. a local variable of a function, a class not visible outside the project, ...)""" @@ -234,8 +230,7 @@ class MonikerKind(str, enum.Enum): class InlayHintKind(int, enum.Enum): """Inlay hint kinds. - @since 3.17.0 - """ + @since 3.17.0""" # Since: 3.17.0 Type = 1 @@ -246,7 +241,7 @@ class InlayHintKind(int, enum.Enum): @enum.unique class MessageType(int, enum.Enum): - """The message type.""" + """The message type""" Error = 1 """An error message.""" @@ -260,18 +255,18 @@ class MessageType(int, enum.Enum): @enum.unique class TextDocumentSyncKind(int, enum.Enum): - """Defines how the host (editor) should sync document changes to the language - server.""" + """Defines how the host (editor) should sync + document changes to the language server.""" None_ = 0 """Documents should not be synced at all.""" Full = 1 - """Documents are synced by always sending the full content of the document.""" + """Documents are synced by always sending the full content + of the document.""" Incremental = 2 """Documents are synced by sending the full content on open. - - After that only incremental updates to the document are send. - """ + After that only incremental updates to the document are + send.""" @enum.unique @@ -279,8 +274,8 @@ class TextDocumentSaveReason(int, enum.Enum): """Represents reasons why a text document is saved.""" Manual = 1 - """Manually triggered, e.g. by the user pressing save, by starting debugging, or by - an API call.""" + """Manually triggered, e.g. by the user pressing save, by starting debugging, + or by an API call.""" AfterDelay = 2 """Automatic after a delay.""" FocusOut = 3 @@ -320,11 +315,10 @@ class CompletionItemKind(int, enum.Enum): @enum.unique class CompletionItemTag(int, enum.Enum): - """Completion item tags are extra annotations that tweak the rendering of a - completion item. + """Completion item tags are extra annotations that tweak the rendering of a completion + item. - @since 3.15.0 - """ + @since 3.15.0""" # Since: 3.15.0 Deprecated = 1 @@ -340,39 +334,37 @@ class InsertTextFormat(int, enum.Enum): """The primary text to be inserted is treated as a plain string.""" Snippet = 2 """The primary text to be inserted is treated as a snippet. - + A snippet can define tab stops and placeholders with `$1`, `$2` and `${3:foo}`. `$0` defines the final tab stop, it defaults to the end of the snippet. Placeholders with equal identifiers are linked, that is typing in one will update others too. - - See also: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#snippet_syntax - """ + + See also: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#snippet_syntax""" @enum.unique class InsertTextMode(int, enum.Enum): - """How whitespace and indentation is handled during completion item insertion. + """How whitespace and indentation is handled during completion + item insertion. - @since 3.16.0 - """ + @since 3.16.0""" # Since: 3.16.0 AsIs = 1 - """The insertion or replace strings is taken as it is. - - If the value is multi line the lines below the cursor will be inserted using the - indentation defined in the string value. The client will not apply any kind of - adjustments to the string. - """ + """The insertion or replace strings is taken as it is. If the + value is multi line the lines below the cursor will be + inserted using the indentation defined in the string value. + The client will not apply any kind of adjustments to the + string.""" AdjustIndentation = 2 - """The editor adjusts leading whitespace of new lines so that they match the - indentation up to the cursor of the line for which the item is accepted. - + """The editor adjusts leading whitespace of new lines so that + they match the indentation up to the cursor of the line for + which the item is accepted. + Consider a line like this: <2tabs><3tabs>foo. Accepting a multi line completion item is indented using 2 tabs and all - following lines inserted will be indented using 2 tabs as well. - """ + following lines inserted will be indented using 2 tabs as well.""" @enum.unique @@ -389,7 +381,7 @@ class DocumentHighlightKind(int, enum.Enum): @enum.unique class CodeActionKind(str, enum.Enum): - """A set of predefined code action kinds.""" + """A set of predefined code action kinds""" Empty = "" """Empty kind.""" @@ -462,19 +454,17 @@ class MarkupKind(str, enum.Enum): are reserved for internal usage.""" PlainText = "plaintext" - """Plain text is supported as a content format.""" + """Plain text is supported as a content format""" Markdown = "markdown" - """Markdown is supported as a content format.""" + """Markdown is supported as a content format""" @enum.unique class InlineCompletionTriggerKind(int, enum.Enum): - """Describes how an {@link InlineCompletionItemProvider inline completion provider} - was triggered. + """Describes how an {@link InlineCompletionItemProvider inline completion provider} was triggered. @since 3.18.0 - @proposed - """ + @proposed""" # Since: 3.18.0 # Proposed @@ -488,29 +478,27 @@ class InlineCompletionTriggerKind(int, enum.Enum): class PositionEncodingKind(str, enum.Enum): """A set of predefined position encoding kinds. - @since 3.17.0 - """ + @since 3.17.0""" # Since: 3.17.0 Utf8 = "utf-8" """Character offsets count UTF-8 code units (e.g. bytes).""" Utf16 = "utf-16" """Character offsets count UTF-16 code units. - - This is the default and must always be supported by servers - """ + + This is the default and must always be supported + by servers""" Utf32 = "utf-32" """Character offsets count UTF-32 code units. - + Implementation note: these are the same as Unicode codepoints, so this `PositionEncodingKind` may also be used for an - encoding-agnostic representation of character offsets. - """ + encoding-agnostic representation of character offsets.""" @enum.unique class FileChangeType(int, enum.Enum): - """The file event type.""" + """The file event type""" Created = 1 """The file got created.""" @@ -525,9 +513,9 @@ class WatchKind(int, enum.Enum): Create = 1 """Interested in create events.""" Change = 2 - """Interested in change events.""" + """Interested in change events""" Delete = 4 - """Interested in delete events.""" + """Interested in delete events""" @enum.unique @@ -548,43 +536,39 @@ class DiagnosticSeverity(int, enum.Enum): class DiagnosticTag(int, enum.Enum): """The diagnostic tags. - @since 3.15.0 - """ + @since 3.15.0""" # Since: 3.15.0 Unnecessary = 1 """Unused or unnecessary code. - + Clients are allowed to render diagnostics with this tag faded out instead of having - an error squiggle. - """ + an error squiggle.""" Deprecated = 2 """Deprecated or obsolete code. - - Clients are allowed to rendered diagnostics with this tag strike through. - """ + + Clients are allowed to rendered diagnostics with this tag strike through.""" @enum.unique class CompletionTriggerKind(int, enum.Enum): - """How a completion was triggered.""" + """How a completion was triggered""" Invoked = 1 - """Completion was triggered by typing an identifier (24x7 code complete), manual - invocation (e.g Ctrl+Space) or via API.""" + """Completion was triggered by typing an identifier (24x7 code + complete), manual invocation (e.g Ctrl+Space) or via API.""" TriggerCharacter = 2 """Completion was triggered by a trigger character specified by the `triggerCharacters` properties of the `CompletionRegistrationOptions`.""" TriggerForIncompleteCompletions = 3 - """Completion was re-triggered as current completion list is incomplete.""" + """Completion was re-triggered as current completion list is incomplete""" @enum.unique class SignatureHelpTriggerKind(int, enum.Enum): """How a signature help was triggered. - @since 3.15.0 - """ + @since 3.15.0""" # Since: 3.15.0 Invoked = 1 @@ -592,34 +576,31 @@ class SignatureHelpTriggerKind(int, enum.Enum): TriggerCharacter = 2 """Signature help was triggered by a trigger character.""" ContentChange = 3 - """Signature help was triggered by the cursor moving or by the document content - changing.""" + """Signature help was triggered by the cursor moving or by the document content changing.""" @enum.unique class CodeActionTriggerKind(int, enum.Enum): """The reason why code actions were requested. - @since 3.17.0 - """ + @since 3.17.0""" # Since: 3.17.0 Invoked = 1 """Code actions were explicitly requested by the user or by an extension.""" Automatic = 2 """Code actions were requested automatically. - - This typically happens when current selection in a file changes, but can also be - triggered when file content changes. - """ + + This typically happens when current selection in a file changes, but can + also be triggered when file content changes.""" @enum.unique class FileOperationPatternKind(str, enum.Enum): - """A pattern kind describing if a glob pattern matches a file a folder or both. + """A pattern kind describing if a glob pattern matches a file a folder or + both. - @since 3.16.0 - """ + @since 3.16.0""" # Since: 3.16.0 File = "file" @@ -632,8 +613,7 @@ class FileOperationPatternKind(str, enum.Enum): class NotebookCellKind(int, enum.Enum): """A notebook cell kind. - @since 3.17.0 - """ + @since 3.17.0""" # Since: 3.17.0 Markup = 1 @@ -656,35 +636,24 @@ class ResourceOperationKind(str, enum.Enum): class FailureHandlingKind(str, enum.Enum): Abort = "abort" """Applying the workspace change is simply aborted if one of the changes provided - fails. - - All operations executed before the failing operation stay executed. - """ + fails. All operations executed before the failing operation stay executed.""" Transactional = "transactional" - """All operations are executed transactional. - - That means they either all succeed or no changes at all are applied to the - workspace. - """ + """All operations are executed transactional. That means they either all + succeed or no changes at all are applied to the workspace.""" TextOnlyTransactional = "textOnlyTransactional" - """If the workspace edit contains only textual file changes they are executed - transactional. - - If resource changes (create, rename or delete file) are part of the change the - failure handling strategy is abort. - """ + """If the workspace edit contains only textual file changes they are executed transactional. + If resource changes (create, rename or delete file) are part of the change the failure + handling strategy is abort.""" Undo = "undo" - """The client tries to undo the operations already executed. - - But there is no guarantee that this is succeeding. - """ + """The client tries to undo the operations already executed. But there is no + guarantee that this is succeeding.""" @enum.unique class PrepareSupportDefaultBehavior(int, enum.Enum): Identifier = 1 - """The client's default behavior is to select the identifier according the to - language's syntax rule.""" + """The client's default behavior is to select the identifier + according the to language's syntax rule.""" @enum.unique @@ -694,36 +663,31 @@ class TokenFormat(str, enum.Enum): class LSPObject: """LSP object definition. - - @since 3.17.0 - """ + @since 3.17.0""" # Since: 3.17.0 pass Definition = Union["Location", List["Location"]] -"""The definition of a symbol represented as one or many {@link Location locations}. For -most programming languages there is only one location at which a symbol is defined. +"""The definition of a symbol represented as one or many {@link Location locations}. +For most programming languages there is only one location at which a symbol is +defined. Servers should prefer returning `DefinitionLink` over `Definition` if supported -by the client. -""" +by the client.""" DefinitionLink = Union["LocationLink", "LocationLink"] """Information about where a symbol is defined. -Provides additional metadata over normal {@link Location location} definitions, -including the range of the defining symbol -""" +Provides additional metadata over normal {@link Location location} definitions, including the range of +the defining symbol""" LSPArray = List["LSPAny"] """LSP arrays. - -@since 3.17.0 -""" +@since 3.17.0""" # Since: 3.17.0 @@ -738,8 +702,7 @@ class LSPObject: Declaration = Union["Location", List["Location"]] -"""The declaration of a symbol representation as one or many {@link Location -locations}.""" +"""The declaration of a symbol representation as one or many {@link Location locations}.""" DeclarationLink = Union["LocationLink", "LocationLink"] @@ -749,8 +712,7 @@ class LSPObject: the declaring symbol. Servers should prefer returning `DeclarationLink` over `Declaration` if supported -by the client. -""" +by the client.""" InlineValue = Union[ @@ -769,13 +731,13 @@ class LSPObject: DocumentDiagnosticReport = Union[ "RelatedFullDocumentDiagnosticReport", "RelatedUnchangedDocumentDiagnosticReport" ] -"""The result of a document diagnostic pull request. A report can either be a full -report containing all diagnostics for the requested document or an unchanged report -indicating that nothing has changed in terms of diagnostics in comparison to the last +"""The result of a document diagnostic pull request. A report can +either be a full report containing all diagnostics for the +requested document or an unchanged report indicating that nothing +has changed in terms of diagnostics in comparison to the last pull request. -@since 3.17.0 -""" +@since 3.17.0""" # Since: 3.17.0 @@ -799,11 +761,9 @@ class PrepareRenameResult_Type2: DocumentSelector = List["DocumentFilter"] """A document selector is the combination of one or many document filters. -@sample `let sel:DocumentSelector = [{ language: 'typescript' }, { language: 'json', -pattern: '**/tsconfig.json' }]`; +@sample `let sel:DocumentSelector = [{ language: 'typescript' }, { language: 'json', pattern: '**/tsconfig.json' }]`; -The use of a string as a document filter is deprecated @since 3.16.0. -""" +The use of a string as a document filter is deprecated @since 3.16.0.""" # Since: 3.16.0. @@ -820,8 +780,7 @@ class PrepareRenameResult_Type2: ] """A workspace diagnostic document report. -@since 3.17.0 -""" +@since 3.17.0""" # Since: 3.17.0 @@ -837,9 +796,8 @@ class TextDocumentContentChangeEvent_Type1: validator=attrs.validators.optional(validators.uinteger_validator), default=None ) """The optional length of the range that got replaced. - - @deprecated use range instead. - """ + + @deprecated use range instead.""" @attrs.define @@ -851,10 +809,8 @@ class TextDocumentContentChangeEvent_Type2: TextDocumentContentChangeEvent = Union[ "TextDocumentContentChangeEvent_Type1", "TextDocumentContentChangeEvent_Type2" ] -"""An event describing a change to a text document. - -If only a text is provided it is considered to be the full content of the document. -""" +"""An event describing a change to a text document. If only a text is provided +it is considered to be the full content of the document.""" @attrs.define @@ -880,18 +836,17 @@ class MarkedString_Type1: DocumentFilter = Union["TextDocumentFilter", "NotebookCellTextDocumentFilter"] -"""A document filter describes a top level text document or a notebook cell document. +"""A document filter describes a top level text document or +a notebook cell document. -@since 3.17.0 - proposed support for NotebookCellTextDocumentFilter. -""" +@since 3.17.0 - proposed support for NotebookCellTextDocumentFilter.""" # Since: 3.17.0 - proposed support for NotebookCellTextDocumentFilter. GlobPattern = Union["Pattern", "RelativePattern"] """The glob pattern. Either a string pattern or a relative pattern. -@since 3.17.0 -""" +@since 3.17.0""" # Since: 3.17.0 @@ -952,9 +907,9 @@ class TextDocumentFilter_Type3: TextDocumentFilter = Union[ "TextDocumentFilter_Type1", "TextDocumentFilter_Type2", "TextDocumentFilter_Type3" ] -"""A document filter denotes a document by different properties like the {@link -TextDocument.languageId language}, the {@link Uri.scheme scheme} of its resource, or a -glob-pattern that is applied to the {@link TextDocument.fileName path}. +"""A document filter denotes a document by different properties like +the {@link TextDocument.languageId language}, the {@link Uri.scheme scheme} of +its resource, or a glob-pattern that is applied to the {@link TextDocument.fileName path}. Glob patterns can have the following syntax: - `*` to match one or more characters in a path segment @@ -967,8 +922,7 @@ class TextDocumentFilter_Type3: @sample A language filter that applies to typescript files on disk: `{ language: 'typescript', scheme: 'file' }` @sample A language filter that applies to all package.json paths: `{ language: 'json', pattern: '**package.json' }` -@since 3.17.0 -""" +@since 3.17.0""" # Since: 3.17.0 @@ -1031,18 +985,16 @@ class NotebookDocumentFilter_Type3: "NotebookDocumentFilter_Type2", "NotebookDocumentFilter_Type3", ] -"""A notebook document filter denotes a notebook document by different properties. The -properties will be match against the notebook's URI (same as with documents) +"""A notebook document filter denotes a notebook document by +different properties. The properties will be match +against the notebook's URI (same as with documents) -@since 3.17.0 -""" +@since 3.17.0""" # Since: 3.17.0 Pattern = str -"""The glob pattern to watch relative to the base path. Glob patterns can have the -following syntax: - +"""The glob pattern to watch relative to the base path. Glob patterns can have the following syntax: - `*` to match one or more characters in a path segment - `?` to match on one character in a path segment - `**` to match any number of path segments, including none @@ -1050,15 +1002,14 @@ class NotebookDocumentFilter_Type3: - `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …) - `[!...]` to negate a range of characters to match in a path segment (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but not `example.0`) -@since 3.17.0 -""" +@since 3.17.0""" # Since: 3.17.0 @attrs.define class TextDocumentPositionParams: - """A parameter literal used in requests to pass a text document and a position - inside that document.""" + """A parameter literal used in requests to pass a text document and a position inside that + document.""" text_document: "TextDocumentIdentifier" = attrs.field() """The text document.""" @@ -1076,8 +1027,8 @@ class WorkDoneProgressParams: @attrs.define class PartialResultParams: partial_result_token: Optional[ProgressToken] = attrs.field(default=None) - """An optional token that a server can use to report partial results (e.g. - streaming) to the client.""" + """An optional token that a server can use to report partial results (e.g. streaming) to + the client.""" @attrs.define @@ -1092,13 +1043,14 @@ class ImplementationParams: """An optional token that a server can use to report work done progress.""" partial_result_token: Optional[ProgressToken] = attrs.field(default=None) - """An optional token that a server can use to report partial results (e.g. - streaming) to the client.""" + """An optional token that a server can use to report partial results (e.g. streaming) to + the client.""" @attrs.define class Location: - """Represents a location inside a resource, such as a line inside a text file.""" + """Represents a location inside a resource, such as a line + inside a text file.""" uri: str = attrs.field(validator=attrs.validators.instance_of(str)) @@ -1120,10 +1072,8 @@ class TextDocumentRegistrationOptions: document_selector: Optional[Union[DocumentSelector, None]] = attrs.field( default=None ) - """A document selector to identify the scope of the registration. - - If set to null the document selector provided on the client side will be used. - """ + """A document selector to identify the scope of the registration. If set to null + the document selector provided on the client side will be used.""" @attrs.define @@ -1144,16 +1094,15 @@ class ImplementationOptions: @attrs.define class StaticRegistrationOptions: - """Static registration options to be returned in the initialize request.""" + """Static registration options to be returned in the initialize + request.""" id: Optional[str] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(str)), default=None, ) - """The id used to register the request. - - The id can be used to deregister the request again. See also Registration#id. - """ + """The id used to register the request. The id can be used to deregister + the request again. See also Registration#id.""" @attrs.define @@ -1161,10 +1110,8 @@ class ImplementationRegistrationOptions: document_selector: Optional[Union[DocumentSelector, None]] = attrs.field( default=None ) - """A document selector to identify the scope of the registration. - - If set to null the document selector provided on the client side will be used. - """ + """A document selector to identify the scope of the registration. If set to null + the document selector provided on the client side will be used.""" work_done_progress: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), @@ -1175,10 +1122,8 @@ class ImplementationRegistrationOptions: validator=attrs.validators.optional(attrs.validators.instance_of(str)), default=None, ) - """The id used to register the request. - - The id can be used to deregister the request again. See also Registration#id. - """ + """The id used to register the request. The id can be used to deregister + the request again. See also Registration#id.""" @attrs.define @@ -1193,8 +1138,8 @@ class TypeDefinitionParams: """An optional token that a server can use to report work done progress.""" partial_result_token: Optional[ProgressToken] = attrs.field(default=None) - """An optional token that a server can use to report partial results (e.g. - streaming) to the client.""" + """An optional token that a server can use to report partial results (e.g. streaming) to + the client.""" @attrs.define @@ -1210,10 +1155,8 @@ class TypeDefinitionRegistrationOptions: document_selector: Optional[Union[DocumentSelector, None]] = attrs.field( default=None ) - """A document selector to identify the scope of the registration. - - If set to null the document selector provided on the client side will be used. - """ + """A document selector to identify the scope of the registration. If set to null + the document selector provided on the client side will be used.""" work_done_progress: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), @@ -1224,10 +1167,8 @@ class TypeDefinitionRegistrationOptions: validator=attrs.validators.optional(attrs.validators.instance_of(str)), default=None, ) - """The id used to register the request. - - The id can be used to deregister the request again. See also Registration#id. - """ + """The id used to register the request. The id can be used to deregister + the request again. See also Registration#id.""" @attrs.define @@ -1238,10 +1179,8 @@ class WorkspaceFolder: """The associated URI for this workspace folder.""" name: str = attrs.field(validator=attrs.validators.instance_of(str)) - """The name of the workspace folder. - - Used to refer to this workspace folder in the user interface. - """ + """The name of the workspace folder. Used to refer to this + workspace folder in the user interface.""" @attrs.define @@ -1270,8 +1209,8 @@ class DocumentColorParams: """An optional token that a server can use to report work done progress.""" partial_result_token: Optional[ProgressToken] = attrs.field(default=None) - """An optional token that a server can use to report partial results (e.g. - streaming) to the client.""" + """An optional token that a server can use to report partial results (e.g. streaming) to + the client.""" @attrs.define @@ -1298,10 +1237,8 @@ class DocumentColorRegistrationOptions: document_selector: Optional[Union[DocumentSelector, None]] = attrs.field( default=None ) - """A document selector to identify the scope of the registration. - - If set to null the document selector provided on the client side will be used. - """ + """A document selector to identify the scope of the registration. If set to null + the document selector provided on the client side will be used.""" work_done_progress: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), @@ -1312,10 +1249,8 @@ class DocumentColorRegistrationOptions: validator=attrs.validators.optional(attrs.validators.instance_of(str)), default=None, ) - """The id used to register the request. - - The id can be used to deregister the request again. See also Registration#id. - """ + """The id used to register the request. The id can be used to deregister + the request again. See also Registration#id.""" @attrs.define @@ -1329,43 +1264,31 @@ class ColorPresentationParams: """The color to request presentations for.""" range: "Range" = attrs.field() - """The range where the color would be inserted. - - Serves as a context. - """ + """The range where the color would be inserted. Serves as a context.""" work_done_token: Optional[ProgressToken] = attrs.field(default=None) """An optional token that a server can use to report work done progress.""" partial_result_token: Optional[ProgressToken] = attrs.field(default=None) - """An optional token that a server can use to report partial results (e.g. - streaming) to the client.""" + """An optional token that a server can use to report partial results (e.g. streaming) to + the client.""" @attrs.define class ColorPresentation: label: str = attrs.field(validator=attrs.validators.instance_of(str)) - """The label of this color presentation. - - It will be shown on the color picker header. By default this is also the text that - is inserted when selecting this color presentation. - """ + """The label of this color presentation. It will be shown on the color + picker header. By default this is also the text that is inserted when selecting + this color presentation.""" text_edit: Optional["TextEdit"] = attrs.field(default=None) - """An {@link TextEdit edit} which is applied to a document when selecting this - presentation for the color. - - When `falsy` the {@link ColorPresentation.label label} - is used. - """ + """An {@link TextEdit edit} which is applied to a document when selecting + this presentation for the color. When `falsy` the {@link ColorPresentation.label label} + is used.""" additional_text_edits: Optional[List["TextEdit"]] = attrs.field(default=None) """An optional array of additional {@link TextEdit text edits} that are applied when - selecting this color presentation. - - Edits must not overlap with the main {@link ColorPresentation.textEdit edit} nor - with themselves. - """ + selecting this color presentation. Edits must not overlap with the main {@link ColorPresentation.textEdit edit} nor with themselves.""" @attrs.define @@ -1379,64 +1302,48 @@ class FoldingRangeParams: """An optional token that a server can use to report work done progress.""" partial_result_token: Optional[ProgressToken] = attrs.field(default=None) - """An optional token that a server can use to report partial results (e.g. - streaming) to the client.""" + """An optional token that a server can use to report partial results (e.g. streaming) to + the client.""" @attrs.define class FoldingRange: - """Represents a folding range. - - To be valid, start and end line must be bigger than zero and smaller than the number - of lines in the document. Clients are free to ignore invalid ranges. + """Represents a folding range. To be valid, start and end line must be bigger than zero and smaller + than the number of lines in the document. Clients are free to ignore invalid ranges. """ start_line: int = attrs.field(validator=validators.uinteger_validator) - """The zero-based start line of the range to fold. - - The folded area starts after the line's last character. To be valid, the end must be - zero or larger and smaller than the number of lines in the document. - """ + """The zero-based start line of the range to fold. The folded area starts after the line's last character. + To be valid, the end must be zero or larger and smaller than the number of lines in the document.""" end_line: int = attrs.field(validator=validators.uinteger_validator) - """The zero-based end line of the range to fold. - - The folded area ends with the line's last character. To be valid, the end must be - zero or larger and smaller than the number of lines in the document. - """ + """The zero-based end line of the range to fold. The folded area ends with the line's last character. + To be valid, the end must be zero or larger and smaller than the number of lines in the document.""" start_character: Optional[int] = attrs.field( validator=attrs.validators.optional(validators.uinteger_validator), default=None ) - """The zero-based character offset from where the folded range starts. - - If not defined, defaults to the length of the start line. - """ + """The zero-based character offset from where the folded range starts. If not defined, defaults to the length of the start line.""" end_character: Optional[int] = attrs.field( validator=attrs.validators.optional(validators.uinteger_validator), default=None ) - """The zero-based character offset before the folded range ends. - - If not defined, defaults to the length of the end line. - """ + """The zero-based character offset before the folded range ends. If not defined, defaults to the length of the end line.""" kind: Optional[Union[FoldingRangeKind, str]] = attrs.field(default=None) - """Describes the kind of the folding range such as `comment' or 'region'. - - The kind is used to categorize folding ranges and used by commands like 'Fold all - comments'. See {@link FoldingRangeKind} for an enumeration of standardized kinds. - """ + """Describes the kind of the folding range such as `comment' or 'region'. The kind + is used to categorize folding ranges and used by commands like 'Fold all comments'. + See {@link FoldingRangeKind} for an enumeration of standardized kinds.""" collapsed_text: Optional[str] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(str)), default=None, ) - """The text that the client should show when the specified range is collapsed. If - not defined or not supported by the client, a default will be chosen by the client. - - @since 3.17.0 - """ + """The text that the client should show when the specified range is + collapsed. If not defined or not supported by the client, a default + will be chosen by the client. + + @since 3.17.0""" # Since: 3.17.0 @@ -1453,10 +1360,8 @@ class FoldingRangeRegistrationOptions: document_selector: Optional[Union[DocumentSelector, None]] = attrs.field( default=None ) - """A document selector to identify the scope of the registration. - - If set to null the document selector provided on the client side will be used. - """ + """A document selector to identify the scope of the registration. If set to null + the document selector provided on the client side will be used.""" work_done_progress: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), @@ -1467,10 +1372,8 @@ class FoldingRangeRegistrationOptions: validator=attrs.validators.optional(attrs.validators.instance_of(str)), default=None, ) - """The id used to register the request. - - The id can be used to deregister the request again. See also Registration#id. - """ + """The id used to register the request. The id can be used to deregister + the request again. See also Registration#id.""" @attrs.define @@ -1485,8 +1388,8 @@ class DeclarationParams: """An optional token that a server can use to report work done progress.""" partial_result_token: Optional[ProgressToken] = attrs.field(default=None) - """An optional token that a server can use to report partial results (e.g. - streaming) to the client.""" + """An optional token that a server can use to report partial results (e.g. streaming) to + the client.""" @attrs.define @@ -1507,19 +1410,15 @@ class DeclarationRegistrationOptions: document_selector: Optional[Union[DocumentSelector, None]] = attrs.field( default=None ) - """A document selector to identify the scope of the registration. - - If set to null the document selector provided on the client side will be used. - """ + """A document selector to identify the scope of the registration. If set to null + the document selector provided on the client side will be used.""" id: Optional[str] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(str)), default=None, ) - """The id used to register the request. - - The id can be used to deregister the request again. See also Registration#id. - """ + """The id used to register the request. The id can be used to deregister + the request again. See also Registration#id.""" @attrs.define @@ -1536,25 +1435,20 @@ class SelectionRangeParams: """An optional token that a server can use to report work done progress.""" partial_result_token: Optional[ProgressToken] = attrs.field(default=None) - """An optional token that a server can use to report partial results (e.g. - streaming) to the client.""" + """An optional token that a server can use to report partial results (e.g. streaming) to + the client.""" @attrs.define class SelectionRange: - """A selection range represents a part of a selection hierarchy. - - A selection range may have a parent selection range that contains it. - """ + """A selection range represents a part of a selection hierarchy. A selection range + may have a parent selection range that contains it.""" range: "Range" = attrs.field() """The {@link Range range} of this selection range.""" parent: Optional["SelectionRange"] = attrs.field(default=None) - """The parent selection range containing this range. - - Therefore `parent.range` must contain `this.range`. - """ + """The parent selection range containing this range. Therefore `parent.range` must contain `this.range`.""" @attrs.define @@ -1575,19 +1469,15 @@ class SelectionRangeRegistrationOptions: document_selector: Optional[Union[DocumentSelector, None]] = attrs.field( default=None ) - """A document selector to identify the scope of the registration. - - If set to null the document selector provided on the client side will be used. - """ + """A document selector to identify the scope of the registration. If set to null + the document selector provided on the client side will be used.""" id: Optional[str] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(str)), default=None, ) - """The id used to register the request. - - The id can be used to deregister the request again. See also Registration#id. - """ + """The id used to register the request. The id can be used to deregister + the request again. See also Registration#id.""" @attrs.define @@ -1606,8 +1496,7 @@ class WorkDoneProgressCancelParams: class CallHierarchyPrepareParams: """The parameter of a `textDocument/prepareCallHierarchy` request. - @since 3.16.0 - """ + @since 3.16.0""" # Since: 3.16.0 @@ -1626,8 +1515,7 @@ class CallHierarchyItem: """Represents programming constructs like functions or constructors in the context of call hierarchy. - @since 3.16.0 - """ + @since 3.16.0""" # Since: 3.16.0 @@ -1641,15 +1529,11 @@ class CallHierarchyItem: """The resource identifier of this item.""" range: "Range" = attrs.field() - """The range enclosing this symbol not including leading/trailing whitespace but - everything else, e.g. comments and code.""" + """The range enclosing this symbol not including leading/trailing whitespace but everything else, e.g. comments and code.""" selection_range: "Range" = attrs.field() - """The range that should be selected and revealed when this symbol is being picked, - e.g. the name of a function. - - Must be contained by the {@link CallHierarchyItem.range `range`}. - """ + """The range that should be selected and revealed when this symbol is being picked, e.g. the name of a function. + Must be contained by the {@link CallHierarchyItem.range `range`}.""" tags: Optional[List[SymbolTag]] = attrs.field(default=None) """Tags for this item.""" @@ -1669,8 +1553,7 @@ class CallHierarchyItem: class CallHierarchyOptions: """Call hierarchy options used during static registration. - @since 3.16.0 - """ + @since 3.16.0""" # Since: 3.16.0 @@ -1684,18 +1567,15 @@ class CallHierarchyOptions: class CallHierarchyRegistrationOptions: """Call hierarchy options used during static or dynamic registration. - @since 3.16.0 - """ + @since 3.16.0""" # Since: 3.16.0 document_selector: Optional[Union[DocumentSelector, None]] = attrs.field( default=None ) - """A document selector to identify the scope of the registration. - - If set to null the document selector provided on the client side will be used. - """ + """A document selector to identify the scope of the registration. If set to null + the document selector provided on the client side will be used.""" work_done_progress: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), @@ -1706,18 +1586,15 @@ class CallHierarchyRegistrationOptions: validator=attrs.validators.optional(attrs.validators.instance_of(str)), default=None, ) - """The id used to register the request. - - The id can be used to deregister the request again. See also Registration#id. - """ + """The id used to register the request. The id can be used to deregister + the request again. See also Registration#id.""" @attrs.define class CallHierarchyIncomingCallsParams: """The parameter of a `callHierarchy/incomingCalls` request. - @since 3.16.0 - """ + @since 3.16.0""" # Since: 3.16.0 @@ -1727,16 +1604,15 @@ class CallHierarchyIncomingCallsParams: """An optional token that a server can use to report work done progress.""" partial_result_token: Optional[ProgressToken] = attrs.field(default=None) - """An optional token that a server can use to report partial results (e.g. - streaming) to the client.""" + """An optional token that a server can use to report partial results (e.g. streaming) to + the client.""" @attrs.define class CallHierarchyIncomingCall: """Represents an incoming call, e.g. a caller of a method or constructor. - @since 3.16.0 - """ + @since 3.16.0""" # Since: 3.16.0 @@ -1744,19 +1620,15 @@ class CallHierarchyIncomingCall: """The item that makes the call.""" from_ranges: List["Range"] = attrs.field() - """The ranges at which the calls appear. - - This is relative to the caller - denoted by {@link CallHierarchyIncomingCall.from `this.from`}. - """ + """The ranges at which the calls appear. This is relative to the caller + denoted by {@link CallHierarchyIncomingCall.from `this.from`}.""" @attrs.define class CallHierarchyOutgoingCallsParams: """The parameter of a `callHierarchy/outgoingCalls` request. - @since 3.16.0 - """ + @since 3.16.0""" # Since: 3.16.0 @@ -1766,17 +1638,15 @@ class CallHierarchyOutgoingCallsParams: """An optional token that a server can use to report work done progress.""" partial_result_token: Optional[ProgressToken] = attrs.field(default=None) - """An optional token that a server can use to report partial results (e.g. - streaming) to the client.""" + """An optional token that a server can use to report partial results (e.g. streaming) to + the client.""" @attrs.define class CallHierarchyOutgoingCall: - """Represents an outgoing call, e.g. calling a getter from a method or a method from - a constructor etc. + """Represents an outgoing call, e.g. calling a getter from a method or a method from a constructor etc. - @since 3.16.0 - """ + @since 3.16.0""" # Since: 3.16.0 @@ -1784,12 +1654,9 @@ class CallHierarchyOutgoingCall: """The item that is called.""" from_ranges: List["Range"] = attrs.field() - """The range at which this item is called. - - This is the range relative to the caller, e.g the item + """The range at which this item is called. This is the range relative to the caller, e.g the item passed to {@link CallHierarchyItemProvider.provideCallHierarchyOutgoingCalls `provideCallHierarchyOutgoingCalls`} - and not {@link CallHierarchyOutgoingCall.to `this.to`}. - """ + and not {@link CallHierarchyOutgoingCall.to `this.to`}.""" @attrs.define @@ -1805,8 +1672,8 @@ class SemanticTokensParams: """An optional token that a server can use to report work done progress.""" partial_result_token: Optional[ProgressToken] = attrs.field(default=None) - """An optional token that a server can use to report partial results (e.g. - streaming) to the client.""" + """An optional token that a server can use to report partial results (e.g. streaming) to + the client.""" @attrs.define @@ -1822,12 +1689,10 @@ class SemanticTokens: validator=attrs.validators.optional(attrs.validators.instance_of(str)), default=None, ) - """An optional result id. - - If provided and clients support delta updating the client will include the result id - in the next semantic token request. A server can then instead of computing all - semantic tokens again simply send a delta. - """ + """An optional result id. If provided and clients support delta updating + the client will include the result id in the next semantic token request. + A server can then instead of computing all semantic tokens again simply + send a delta.""" @attrs.define @@ -1855,10 +1720,11 @@ class SemanticTokensOptions: # Since: 3.16.0 legend: "SemanticTokensLegend" = attrs.field() - """The legend used by the server.""" + """The legend used by the server""" range: Optional[Union[bool, Any]] = attrs.field(default=None) - """Server supports providing semantic tokens for a specific range of a document.""" + """Server supports providing semantic tokens for a specific range + of a document.""" full: Optional[Union[bool, "SemanticTokensOptionsFullType1"]] = attrs.field( default=None @@ -1887,18 +1753,17 @@ class SemanticTokensRegistrationOptions: # Since: 3.16.0 legend: "SemanticTokensLegend" = attrs.field() - """The legend used by the server.""" + """The legend used by the server""" document_selector: Optional[Union[DocumentSelector, None]] = attrs.field( default=None ) - """A document selector to identify the scope of the registration. - - If set to null the document selector provided on the client side will be used. - """ + """A document selector to identify the scope of the registration. If set to null + the document selector provided on the client side will be used.""" range: Optional[Union[bool, Any]] = attrs.field(default=None) - """Server supports providing semantic tokens for a specific range of a document.""" + """Server supports providing semantic tokens for a specific range + of a document.""" full: Optional[ Union[bool, "SemanticTokensRegistrationOptionsFullType1"] @@ -1914,10 +1779,8 @@ class SemanticTokensRegistrationOptions: validator=attrs.validators.optional(attrs.validators.instance_of(str)), default=None, ) - """The id used to register the request. - - The id can be used to deregister the request again. See also Registration#id. - """ + """The id used to register the request. The id can be used to deregister + the request again. See also Registration#id.""" @attrs.define @@ -1930,18 +1793,15 @@ class SemanticTokensDeltaParams: """The text document.""" previous_result_id: str = attrs.field(validator=attrs.validators.instance_of(str)) - """The result id of a previous response. - - The result Id can either point to a full response or a delta response depending on - what was received last. - """ + """The result id of a previous response. The result Id can either point to a full response + or a delta response depending on what was received last.""" work_done_token: Optional[ProgressToken] = attrs.field(default=None) """An optional token that a server can use to report work done progress.""" partial_result_token: Optional[ProgressToken] = attrs.field(default=None) - """An optional token that a server can use to report partial results (e.g. - streaming) to the client.""" + """An optional token that a server can use to report partial results (e.g. streaming) to + the client.""" @attrs.define @@ -1984,16 +1844,15 @@ class SemanticTokensRangeParams: """An optional token that a server can use to report work done progress.""" partial_result_token: Optional[ProgressToken] = attrs.field(default=None) - """An optional token that a server can use to report partial results (e.g. - streaming) to the client.""" + """An optional token that a server can use to report partial results (e.g. streaming) to + the client.""" @attrs.define class ShowDocumentParams: """Params to show a resource in the UI. - @since 3.16.0 - """ + @since 3.16.0""" # Since: 3.16.0 @@ -2005,35 +1864,30 @@ class ShowDocumentParams: default=None, ) """Indicates to show the resource in an external program. - To show, for example, `https://code.visualstudio.com/` - in the default WEB browser set `external` to `true`. - """ + in the default WEB browser set `external` to `true`.""" take_focus: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """An optional property to indicate whether the editor showing the document should - take focus or not. - - Clients might ignore this property if an external program is started. - """ + """An optional property to indicate whether the editor + showing the document should take focus or not. + Clients might ignore this property if an external + program is started.""" selection: Optional["Range"] = attrs.field(default=None) - """An optional selection range if the document is a text document. - - Clients might ignore the property if an external program is started or the file is - not a text file. - """ + """An optional selection range if the document is a text + document. Clients might ignore the property if an + external program is started or the file is not a text + file.""" @attrs.define class ShowDocumentResult: """The result of a showDocument request. - @since 3.16.0 - """ + @since 3.16.0""" # Since: 3.16.0 @@ -2057,27 +1911,21 @@ class LinkedEditingRangeParams: class LinkedEditingRanges: """The result of a linked editing range request. - @since 3.16.0 - """ + @since 3.16.0""" # Since: 3.16.0 ranges: List["Range"] = attrs.field() - """A list of ranges that can be edited together. - - The ranges must have identical length and contain identical text content. The ranges - cannot overlap. - """ + """A list of ranges that can be edited together. The ranges must have + identical length and contain identical text content. The ranges cannot overlap.""" word_pattern: Optional[str] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(str)), default=None, ) """An optional word pattern (regular expression) that describes valid contents for - the given ranges. - - If no pattern is provided, the client configuration's word pattern will be used. - """ + the given ranges. If no pattern is provided, the client configuration's word + pattern will be used.""" @attrs.define @@ -2093,10 +1941,8 @@ class LinkedEditingRangeRegistrationOptions: document_selector: Optional[Union[DocumentSelector, None]] = attrs.field( default=None ) - """A document selector to identify the scope of the registration. - - If set to null the document selector provided on the client side will be used. - """ + """A document selector to identify the scope of the registration. If set to null + the document selector provided on the client side will be used.""" work_done_progress: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), @@ -2107,10 +1953,8 @@ class LinkedEditingRangeRegistrationOptions: validator=attrs.validators.optional(attrs.validators.instance_of(str)), default=None, ) - """The id used to register the request. - - The id can be used to deregister the request again. See also Registration#id. - """ + """The id used to register the request. The id can be used to deregister + the request again. See also Registration#id.""" @attrs.define @@ -2118,8 +1962,7 @@ class CreateFilesParams: """The parameters sent in notifications/requests for user-initiated creation of files. - @since 3.16.0 - """ + @since 3.16.0""" # Since: 3.16.0 @@ -2175,8 +2018,7 @@ class WorkspaceEdit: class FileOperationRegistrationOptions: """The options to register for file operations. - @since 3.16.0 - """ + @since 3.16.0""" # Since: 3.16.0 @@ -2189,16 +2031,13 @@ class RenameFilesParams: """The parameters sent in notifications/requests for user-initiated renames of files. - @since 3.16.0 - """ + @since 3.16.0""" # Since: 3.16.0 files: List["FileRename"] = attrs.field() - """An array of all files/folders renamed in this operation. - - When a folder is renamed, only the folder will be included, and not its children. - """ + """An array of all files/folders renamed in this operation. When a folder is renamed, only + the folder will be included, and not its children.""" @attrs.define @@ -2206,8 +2045,7 @@ class DeleteFilesParams: """The parameters sent in notifications/requests for user-initiated deletes of files. - @since 3.16.0 - """ + @since 3.16.0""" # Since: 3.16.0 @@ -2227,34 +2065,27 @@ class MonikerParams: """An optional token that a server can use to report work done progress.""" partial_result_token: Optional[ProgressToken] = attrs.field(default=None) - """An optional token that a server can use to report partial results (e.g. - streaming) to the client.""" + """An optional token that a server can use to report partial results (e.g. streaming) to + the client.""" @attrs.define class Moniker: """Moniker definition to match LSIF 0.5 moniker definition. - @since 3.16.0 - """ + @since 3.16.0""" # Since: 3.16.0 scheme: str = attrs.field(validator=attrs.validators.instance_of(str)) - """The scheme of the moniker. - - For example tsc or .Net - """ + """The scheme of the moniker. For example tsc or .Net""" identifier: str = attrs.field(validator=attrs.validators.instance_of(str)) - """The identifier of the moniker. - - The value is opaque in LSIF however schema owners are allowed to define the - structure if they want. - """ + """The identifier of the moniker. The value is opaque in LSIF however + schema owners are allowed to define the structure if they want.""" unique: UniquenessLevel = attrs.field() - """The scope in which the moniker is unique.""" + """The scope in which the moniker is unique""" kind: Optional[MonikerKind] = attrs.field(default=None) """The moniker kind if known.""" @@ -2273,10 +2104,8 @@ class MonikerRegistrationOptions: document_selector: Optional[Union[DocumentSelector, None]] = attrs.field( default=None ) - """A document selector to identify the scope of the registration. - - If set to null the document selector provided on the client side will be used. - """ + """A document selector to identify the scope of the registration. If set to null + the document selector provided on the client side will be used.""" work_done_progress: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), @@ -2288,8 +2117,7 @@ class MonikerRegistrationOptions: class TypeHierarchyPrepareParams: """The parameter of a `textDocument/prepareTypeHierarchy` request. - @since 3.17.0 - """ + @since 3.17.0""" # Since: 3.17.0 @@ -2319,16 +2147,13 @@ class TypeHierarchyItem: """The resource identifier of this item.""" range: "Range" = attrs.field() - """The range enclosing this symbol not including leading/trailing whitespace but - everything else, e.g. comments and code.""" + """The range enclosing this symbol not including leading/trailing whitespace + but everything else, e.g. comments and code.""" selection_range: "Range" = attrs.field() - """The range that should be selected and revealed when this symbol is being picked, - e.g. the name of a function. - - Must be contained by the - {@link TypeHierarchyItem.range `range`}. - """ + """The range that should be selected and revealed when this symbol is being + picked, e.g. the name of a function. Must be contained by the + {@link TypeHierarchyItem.range `range`}.""" tags: Optional[List[SymbolTag]] = attrs.field(default=None) """Tags for this item.""" @@ -2341,19 +2166,16 @@ class TypeHierarchyItem: data: Optional[LSPAny] = attrs.field(default=None) """A data entry field that is preserved between a type hierarchy prepare and - supertypes or subtypes requests. - - It could also be used to identify the type hierarchy in the server, helping improve - the performance on resolving supertypes and subtypes. - """ + supertypes or subtypes requests. It could also be used to identify the + type hierarchy in the server, helping improve the performance on + resolving supertypes and subtypes.""" @attrs.define class TypeHierarchyOptions: """Type hierarchy options used during static registration. - @since 3.17.0 - """ + @since 3.17.0""" # Since: 3.17.0 @@ -2367,18 +2189,15 @@ class TypeHierarchyOptions: class TypeHierarchyRegistrationOptions: """Type hierarchy options used during static or dynamic registration. - @since 3.17.0 - """ + @since 3.17.0""" # Since: 3.17.0 document_selector: Optional[Union[DocumentSelector, None]] = attrs.field( default=None ) - """A document selector to identify the scope of the registration. - - If set to null the document selector provided on the client side will be used. - """ + """A document selector to identify the scope of the registration. If set to null + the document selector provided on the client side will be used.""" work_done_progress: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), @@ -2389,18 +2208,15 @@ class TypeHierarchyRegistrationOptions: validator=attrs.validators.optional(attrs.validators.instance_of(str)), default=None, ) - """The id used to register the request. - - The id can be used to deregister the request again. See also Registration#id. - """ + """The id used to register the request. The id can be used to deregister + the request again. See also Registration#id.""" @attrs.define class TypeHierarchySupertypesParams: """The parameter of a `typeHierarchy/supertypes` request. - @since 3.17.0 - """ + @since 3.17.0""" # Since: 3.17.0 @@ -2410,16 +2226,15 @@ class TypeHierarchySupertypesParams: """An optional token that a server can use to report work done progress.""" partial_result_token: Optional[ProgressToken] = attrs.field(default=None) - """An optional token that a server can use to report partial results (e.g. - streaming) to the client.""" + """An optional token that a server can use to report partial results (e.g. streaming) to + the client.""" @attrs.define class TypeHierarchySubtypesParams: """The parameter of a `typeHierarchy/subtypes` request. - @since 3.17.0 - """ + @since 3.17.0""" # Since: 3.17.0 @@ -2429,16 +2244,15 @@ class TypeHierarchySubtypesParams: """An optional token that a server can use to report work done progress.""" partial_result_token: Optional[ProgressToken] = attrs.field(default=None) - """An optional token that a server can use to report partial results (e.g. - streaming) to the client.""" + """An optional token that a server can use to report partial results (e.g. streaming) to + the client.""" @attrs.define class InlineValueParams: """A parameter literal used in inline value requests. - @since 3.17.0 - """ + @since 3.17.0""" # Since: 3.17.0 @@ -2460,8 +2274,7 @@ class InlineValueParams: class InlineValueOptions: """Inline value options used during static registration. - @since 3.17.0 - """ + @since 3.17.0""" # Since: 3.17.0 @@ -2475,8 +2288,7 @@ class InlineValueOptions: class InlineValueRegistrationOptions: """Inline value options used during static or dynamic registration. - @since 3.17.0 - """ + @since 3.17.0""" # Since: 3.17.0 @@ -2488,27 +2300,22 @@ class InlineValueRegistrationOptions: document_selector: Optional[Union[DocumentSelector, None]] = attrs.field( default=None ) - """A document selector to identify the scope of the registration. - - If set to null the document selector provided on the client side will be used. - """ + """A document selector to identify the scope of the registration. If set to null + the document selector provided on the client side will be used.""" id: Optional[str] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(str)), default=None, ) - """The id used to register the request. - - The id can be used to deregister the request again. See also Registration#id. - """ + """The id used to register the request. The id can be used to deregister + the request again. See also Registration#id.""" @attrs.define class InlayHintParams: """A parameter literal used in inlay hint requests. - @since 3.17.0 - """ + @since 3.17.0""" # Since: 3.17.0 @@ -2526,8 +2333,7 @@ class InlayHintParams: class InlayHint: """Inlay hint information. - @since 3.17.0 - """ + @since 3.17.0""" # Since: 3.17.0 @@ -2535,25 +2341,21 @@ class InlayHint: """The position of this hint.""" label: Union[str, List["InlayHintLabelPart"]] = attrs.field() - """The label of this hint. A human readable string or an array of InlayHintLabelPart - label parts. - - *Note* that neither the string nor the label part can be empty. - """ + """The label of this hint. A human readable string or an array of + InlayHintLabelPart label parts. + + *Note* that neither the string nor the label part can be empty.""" kind: Optional[InlayHintKind] = attrs.field(default=None) - """The kind of this hint. - - Can be omitted in which case the client should fall back to a reasonable default. - """ + """The kind of this hint. Can be omitted in which case the client + should fall back to a reasonable default.""" text_edits: Optional[List["TextEdit"]] = attrs.field(default=None) """Optional text edits that are performed when accepting this inlay hint. - - *Note* that edits are expected to change the document so that the inlay hint (or its - nearest variant) is now part of the document and the inlay hint itself is now - obsolete. - """ + + *Note* that edits are expected to change the document so that the inlay + hint (or its nearest variant) is now part of the document and the inlay + hint itself is now obsolete.""" tooltip: Optional[Union[str, "MarkupContent"]] = attrs.field(default=None) """The tooltip text when you hover over this item.""" @@ -2563,34 +2365,31 @@ class InlayHint: default=None, ) """Render padding before the hint. - + Note: Padding should use the editor's background color, not the background color of the hint itself. That means padding can be used - to visually align/separate an inlay hint. - """ + to visually align/separate an inlay hint.""" padding_right: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) """Render padding after the hint. - + Note: Padding should use the editor's background color, not the background color of the hint itself. That means padding can be used - to visually align/separate an inlay hint. - """ + to visually align/separate an inlay hint.""" data: Optional[LSPAny] = attrs.field(default=None) - """A data entry field that is preserved on an inlay hint between a - `textDocument/inlayHint` and a `inlayHint/resolve` request.""" + """A data entry field that is preserved on an inlay hint between + a `textDocument/inlayHint` and a `inlayHint/resolve` request.""" @attrs.define class InlayHintOptions: """Inlay hint options used during static registration. - @since 3.17.0 - """ + @since 3.17.0""" # Since: 3.17.0 @@ -2598,8 +2397,8 @@ class InlayHintOptions: validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """The server provides support to resolve additional information for an inlay hint - item.""" + """The server provides support to resolve additional + information for an inlay hint item.""" work_done_progress: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), @@ -2611,8 +2410,7 @@ class InlayHintOptions: class InlayHintRegistrationOptions: """Inlay hint options used during static or dynamic registration. - @since 3.17.0 - """ + @since 3.17.0""" # Since: 3.17.0 @@ -2620,8 +2418,8 @@ class InlayHintRegistrationOptions: validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """The server provides support to resolve additional information for an inlay hint - item.""" + """The server provides support to resolve additional + information for an inlay hint item.""" work_done_progress: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), @@ -2631,27 +2429,22 @@ class InlayHintRegistrationOptions: document_selector: Optional[Union[DocumentSelector, None]] = attrs.field( default=None ) - """A document selector to identify the scope of the registration. - - If set to null the document selector provided on the client side will be used. - """ + """A document selector to identify the scope of the registration. If set to null + the document selector provided on the client side will be used.""" id: Optional[str] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(str)), default=None, ) - """The id used to register the request. - - The id can be used to deregister the request again. See also Registration#id. - """ + """The id used to register the request. The id can be used to deregister + the request again. See also Registration#id.""" @attrs.define class DocumentDiagnosticParams: """Parameters of the document diagnostic request. - @since 3.17.0 - """ + @since 3.17.0""" # Since: 3.17.0 @@ -2674,16 +2467,15 @@ class DocumentDiagnosticParams: """An optional token that a server can use to report work done progress.""" partial_result_token: Optional[ProgressToken] = attrs.field(default=None) - """An optional token that a server can use to report partial results (e.g. - streaming) to the client.""" + """An optional token that a server can use to report partial results (e.g. streaming) to + the client.""" @attrs.define class DocumentDiagnosticReportPartialResult: """A partial result for a document diagnostic report. - @since 3.17.0 - """ + @since 3.17.0""" # Since: 3.17.0 @@ -2696,8 +2488,7 @@ class DocumentDiagnosticReportPartialResult: class DiagnosticServerCancellationData: """Cancellation data returned from a diagnostic request. - @since 3.17.0 - """ + @since 3.17.0""" # Since: 3.17.0 @@ -2708,20 +2499,17 @@ class DiagnosticServerCancellationData: class DiagnosticOptions: """Diagnostic options. - @since 3.17.0 - """ + @since 3.17.0""" # Since: 3.17.0 inter_file_dependencies: bool = attrs.field( validator=attrs.validators.instance_of(bool) ) - """Whether the language has inter file dependencies meaning that editing code in one - file can result in a different diagnostic set in another file. - - Inter file dependencies are common for most programming languages and typically - uncommon for linters. - """ + """Whether the language has inter file dependencies meaning that + editing code in one file can result in a different diagnostic + set in another file. Inter file dependencies are common for + most programming languages and typically uncommon for linters.""" workspace_diagnostics: bool = attrs.field( validator=attrs.validators.instance_of(bool) @@ -2732,7 +2520,8 @@ class DiagnosticOptions: validator=attrs.validators.optional(attrs.validators.instance_of(str)), default=None, ) - """An optional identifier under which the diagnostics are managed by the client.""" + """An optional identifier under which the diagnostics are + managed by the client.""" work_done_progress: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), @@ -2744,20 +2533,17 @@ class DiagnosticOptions: class DiagnosticRegistrationOptions: """Diagnostic registration options. - @since 3.17.0 - """ + @since 3.17.0""" # Since: 3.17.0 inter_file_dependencies: bool = attrs.field( validator=attrs.validators.instance_of(bool) ) - """Whether the language has inter file dependencies meaning that editing code in one - file can result in a different diagnostic set in another file. - - Inter file dependencies are common for most programming languages and typically - uncommon for linters. - """ + """Whether the language has inter file dependencies meaning that + editing code in one file can result in a different diagnostic + set in another file. Inter file dependencies are common for + most programming languages and typically uncommon for linters.""" workspace_diagnostics: bool = attrs.field( validator=attrs.validators.instance_of(bool) @@ -2767,16 +2553,15 @@ class DiagnosticRegistrationOptions: document_selector: Optional[Union[DocumentSelector, None]] = attrs.field( default=None ) - """A document selector to identify the scope of the registration. - - If set to null the document selector provided on the client side will be used. - """ + """A document selector to identify the scope of the registration. If set to null + the document selector provided on the client side will be used.""" identifier: Optional[str] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(str)), default=None, ) - """An optional identifier under which the diagnostics are managed by the client.""" + """An optional identifier under which the diagnostics are + managed by the client.""" work_done_progress: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), @@ -2787,23 +2572,21 @@ class DiagnosticRegistrationOptions: validator=attrs.validators.optional(attrs.validators.instance_of(str)), default=None, ) - """The id used to register the request. - - The id can be used to deregister the request again. See also Registration#id. - """ + """The id used to register the request. The id can be used to deregister + the request again. See also Registration#id.""" @attrs.define class WorkspaceDiagnosticParams: """Parameters of the workspace diagnostic request. - @since 3.17.0 - """ + @since 3.17.0""" # Since: 3.17.0 previous_result_ids: List["PreviousResultId"] = attrs.field() - """The currently known diagnostic reports with their previous result ids.""" + """The currently known diagnostic reports with their + previous result ids.""" identifier: Optional[str] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(str)), @@ -2815,16 +2598,15 @@ class WorkspaceDiagnosticParams: """An optional token that a server can use to report work done progress.""" partial_result_token: Optional[ProgressToken] = attrs.field(default=None) - """An optional token that a server can use to report partial results (e.g. - streaming) to the client.""" + """An optional token that a server can use to report partial results (e.g. streaming) to + the client.""" @attrs.define class WorkspaceDiagnosticReport: """A workspace diagnostic report. - @since 3.17.0 - """ + @since 3.17.0""" # Since: 3.17.0 @@ -2835,8 +2617,7 @@ class WorkspaceDiagnosticReport: class WorkspaceDiagnosticReportPartialResult: """A partial result for a workspace diagnostic report. - @since 3.17.0 - """ + @since 3.17.0""" # Since: 3.17.0 @@ -2847,8 +2628,7 @@ class WorkspaceDiagnosticReportPartialResult: class DidOpenNotebookDocumentParams: """The params sent in an open notebook document notification. - @since 3.17.0 - """ + @since 3.17.0""" # Since: 3.17.0 @@ -2856,49 +2636,45 @@ class DidOpenNotebookDocumentParams: """The notebook document that got opened.""" cell_text_documents: List["TextDocumentItem"] = attrs.field() - """The text documents that represent the content of a notebook cell.""" + """The text documents that represent the content + of a notebook cell.""" @attrs.define class DidChangeNotebookDocumentParams: """The params sent in a change notebook document notification. - @since 3.17.0 - """ + @since 3.17.0""" # Since: 3.17.0 notebook_document: "VersionedNotebookDocumentIdentifier" = attrs.field() - """The notebook document that did change. - - The version number points to the version after all provided changes have been - applied. If only the text document content of a cell changes the notebook version - doesn't necessarily have to change. - """ + """The notebook document that did change. The version number points + to the version after all provided changes have been applied. If + only the text document content of a cell changes the notebook version + doesn't necessarily have to change.""" change: "NotebookDocumentChangeEvent" = attrs.field() """The actual changes to the notebook document. - + The changes describe single state changes to the notebook document. So if there are two changes c1 (at array index 0) and c2 (at array index 1) for a notebook in state S then c1 moves the notebook from S to S' and c2 from S' to S''. So c1 is computed on the state S and c2 is computed on the state S'. - + To mirror the content of a notebook using change events use the following approach: - start with the same initial content - apply the 'notebookDocument/didChange' notifications in the order you receive them. - apply the `NotebookChangeEvent`s in a single notification in the order - you receive them. - """ + you receive them.""" @attrs.define class DidSaveNotebookDocumentParams: """The params sent in a save notebook document notification. - @since 3.17.0 - """ + @since 3.17.0""" # Since: 3.17.0 @@ -2910,8 +2686,7 @@ class DidSaveNotebookDocumentParams: class DidCloseNotebookDocumentParams: """The params sent in a close notebook document notification. - @since 3.17.0 - """ + @since 3.17.0""" # Since: 3.17.0 @@ -2919,8 +2694,8 @@ class DidCloseNotebookDocumentParams: """The notebook document that got closed.""" cell_text_documents: List["TextDocumentIdentifier"] = attrs.field() - """The text documents that represent the content of a notebook cell that got - closed.""" + """The text documents that represent the content + of a notebook cell that got closed.""" @attrs.define @@ -2928,8 +2703,7 @@ class InlineCompletionParams: """A parameter literal used in inline completion requests. @since 3.18.0 - @proposed - """ + @proposed""" # Since: 3.18.0 # Proposed @@ -2950,56 +2724,42 @@ class InlineCompletionParams: @attrs.define class InlineCompletionList: - """Represents a collection of {@link InlineCompletionItem inline completion items} - to be presented in the editor. + """Represents a collection of {@link InlineCompletionItem inline completion items} to be presented in the editor. @since 3.18.0 - @proposed - """ + @proposed""" # Since: 3.18.0 # Proposed items: List["InlineCompletionItem"] = attrs.field() - """The inline completion items.""" + """The inline completion items""" @attrs.define class InlineCompletionItem: - """An inline completion item represents a text snippet that is proposed inline to - complete text that is being typed. + """An inline completion item represents a text snippet that is proposed inline to complete text that is being typed. @since 3.18.0 - @proposed - """ + @proposed""" # Since: 3.18.0 # Proposed insert_text: Union[str, "StringValue"] = attrs.field() - """The text to replace the range with. - - Must be set. - """ + """The text to replace the range with. Must be set.""" filter_text: Optional[str] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(str)), default=None, ) - """A text that is used to decide if this inline completion should be shown. - - When `falsy` the {@link InlineCompletionItem.insertText} is used. - """ + """A text that is used to decide if this inline completion should be shown. When `falsy` the {@link InlineCompletionItem.insertText} is used.""" range: Optional["Range"] = attrs.field(default=None) - """The range to replace. - - Must begin and end on the same line. - """ + """The range to replace. Must begin and end on the same line.""" command: Optional["Command"] = attrs.field(default=None) - """An optional {@link Command} that is executed *after* inserting this - completion.""" + """An optional {@link Command} that is executed *after* inserting this completion.""" @attrs.define @@ -3007,8 +2767,7 @@ class InlineCompletionOptions: """Inline completion options used during static registration. @since 3.18.0 - @proposed - """ + @proposed""" # Since: 3.18.0 # Proposed @@ -3024,8 +2783,7 @@ class InlineCompletionRegistrationOptions: """Inline completion options used during static or dynamic registration. @since 3.18.0 - @proposed - """ + @proposed""" # Since: 3.18.0 # Proposed @@ -3038,19 +2796,15 @@ class InlineCompletionRegistrationOptions: document_selector: Optional[Union[DocumentSelector, None]] = attrs.field( default=None ) - """A document selector to identify the scope of the registration. - - If set to null the document selector provided on the client side will be used. - """ + """A document selector to identify the scope of the registration. If set to null + the document selector provided on the client side will be used.""" id: Optional[str] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(str)), default=None, ) - """The id used to register the request. - - The id can be used to deregister the request again. See also Registration#id. - """ + """The id used to register the request. The id can be used to deregister + the request again. See also Registration#id.""" @attrs.define @@ -3077,44 +2831,43 @@ class InitializeParamsClientInfoType: @attrs.define class _InitializeParams: - """The initialize parameters.""" + """The initialize parameters""" capabilities: "ClientCapabilities" = attrs.field() """The capabilities provided by the client (editor or tool)""" process_id: Optional[Union[int, None]] = attrs.field(default=None) - """The process Id of the parent process that started the server. - + """The process Id of the parent process that started + the server. + Is `null` if the process has not been started by another process. - If the parent process is not alive then the server should exit. - """ + If the parent process is not alive then the server should exit.""" client_info: Optional["InitializeParamsClientInfoType"] = attrs.field(default=None) - """Information about the client. - - @since 3.15.0 - """ + """Information about the client + + @since 3.15.0""" # Since: 3.15.0 locale: Optional[str] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(str)), default=None, ) - """The locale the client is currently showing the user interface in. This must not - necessarily be the locale of the operating system. - + """The locale the client is currently showing the user interface + in. This must not necessarily be the locale of the operating + system. + Uses IETF language tags as the value's syntax (See https://en.wikipedia.org/wiki/IETF_language_tag) - - @since 3.16.0 - """ + + @since 3.16.0""" # Since: 3.16.0 root_path: Optional[Union[str, None]] = attrs.field(default=None) - """The rootPath of the workspace. Is null if no folder is open. - - @deprecated in favour of rootUri. - """ + """The rootPath of the workspace. Is null + if no folder is open. + + @deprecated in favour of rootUri.""" root_uri: Optional[Union[str, None]] = attrs.field(default=None) """The rootUri of the workspace. Is null if no @@ -3127,10 +2880,7 @@ class _InitializeParams: """User provided initialization options.""" trace: Optional[TraceValues] = attrs.field(default=None) - """The initial trace setting. - - If omitted trace is disabled ('off'). - """ + """The initial trace setting. If omitted trace is disabled ('off').""" work_done_token: Optional[ProgressToken] = attrs.field(default=None) """An optional token that a server can use to report work done progress.""" @@ -3142,13 +2892,12 @@ class WorkspaceFoldersInitializeParams: default=None ) """The workspace folders configured in the client when the server starts. - + This property is only available if the client supports workspace folders. It can be `null` if the client supports workspace folders but none are configured. - - @since 3.6.0 - """ + + @since 3.6.0""" # Since: 3.6.0 @@ -3158,38 +2907,37 @@ class InitializeParams: """The capabilities provided by the client (editor or tool)""" process_id: Optional[Union[int, None]] = attrs.field(default=None) - """The process Id of the parent process that started the server. - + """The process Id of the parent process that started + the server. + Is `null` if the process has not been started by another process. - If the parent process is not alive then the server should exit. - """ + If the parent process is not alive then the server should exit.""" client_info: Optional["InitializeParamsClientInfoType"] = attrs.field(default=None) - """Information about the client. - - @since 3.15.0 - """ + """Information about the client + + @since 3.15.0""" # Since: 3.15.0 locale: Optional[str] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(str)), default=None, ) - """The locale the client is currently showing the user interface in. This must not - necessarily be the locale of the operating system. - + """The locale the client is currently showing the user interface + in. This must not necessarily be the locale of the operating + system. + Uses IETF language tags as the value's syntax (See https://en.wikipedia.org/wiki/IETF_language_tag) - - @since 3.16.0 - """ + + @since 3.16.0""" # Since: 3.16.0 root_path: Optional[Union[str, None]] = attrs.field(default=None) - """The rootPath of the workspace. Is null if no folder is open. - - @deprecated in favour of rootUri. - """ + """The rootPath of the workspace. Is null + if no folder is open. + + @deprecated in favour of rootUri.""" root_uri: Optional[Union[str, None]] = attrs.field(default=None) """The rootUri of the workspace. Is null if no @@ -3202,10 +2950,7 @@ class InitializeParams: """User provided initialization options.""" trace: Optional[TraceValues] = attrs.field(default=None) - """The initial trace setting. - - If omitted trace is disabled ('off'). - """ + """The initial trace setting. If omitted trace is disabled ('off').""" work_done_token: Optional[ProgressToken] = attrs.field(default=None) """An optional token that a server can use to report work done progress.""" @@ -3214,13 +2959,12 @@ class InitializeParams: default=None ) """The workspace folders configured in the client when the server starts. - + This property is only available if the client supports workspace folders. It can be `null` if the client supports workspace folders but none are configured. - - @since 3.6.0 - """ + + @since 3.6.0""" # Since: 3.6.0 @@ -3245,15 +2989,15 @@ class InitializeResult: server_info: Optional["InitializeResultServerInfoType"] = attrs.field(default=None) """Information about the server. - - @since 3.15.0 - """ + + @since 3.15.0""" # Since: 3.15.0 @attrs.define class InitializeError: - """The data type of the ResponseError if the initialize request fails.""" + """The data type of the ResponseError if the + initialize request fails.""" retry: bool = attrs.field(validator=attrs.validators.instance_of(bool)) """Indicates whether the client execute the following retry logic: @@ -3272,7 +3016,7 @@ class DidChangeConfigurationParams: """The parameters of a change configuration notification.""" settings: LSPAny = attrs.field() - """The actual changed settings.""" + """The actual changed settings""" @attrs.define @@ -3285,10 +3029,7 @@ class ShowMessageParams: """The parameters of a notification message.""" type: MessageType = attrs.field() - """The message type. - - See {@link MessageType} - """ + """The message type. See {@link MessageType}""" message: str = attrs.field(validator=attrs.validators.instance_of(str)) """The actual message.""" @@ -3297,10 +3038,7 @@ class ShowMessageParams: @attrs.define class ShowMessageRequestParams: type: MessageType = attrs.field() - """The message type. - - See {@link MessageType} - """ + """The message type. See {@link MessageType}""" message: str = attrs.field(validator=attrs.validators.instance_of(str)) """The actual message.""" @@ -3320,10 +3058,7 @@ class LogMessageParams: """The log message parameters.""" type: MessageType = attrs.field() - """The message type. - - See {@link MessageType} - """ + """The message type. See {@link MessageType}""" message: str = attrs.field(validator=attrs.validators.instance_of(str)) """The actual message.""" @@ -3331,7 +3066,7 @@ class LogMessageParams: @attrs.define class DidOpenTextDocumentParams: - """The parameters sent in an open text document notification.""" + """The parameters sent in an open text document notification""" text_document: "TextDocumentItem" = attrs.field() """The document that was opened.""" @@ -3342,25 +3077,22 @@ class DidChangeTextDocumentParams: """The change text document notification's parameters.""" text_document: "VersionedTextDocumentIdentifier" = attrs.field() - """The document that did change. - - The version number points to the version after all provided content changes have - been applied. - """ + """The document that did change. The version number points + to the version after all provided content changes have + been applied.""" content_changes: List[TextDocumentContentChangeEvent] = attrs.field() - """The actual content changes. The content changes describe single state changes to - the document. So if there are two content changes c1 (at array index 0) and c2 (at - array index 1) for a document in state S then c1 moves the document from S to S' and - c2 from S' to S''. So c1 is computed on the state S and c2 is computed on the state - S'. - + """The actual content changes. The content changes describe single state changes + to the document. So if there are two content changes c1 (at array index 0) and + c2 (at array index 1) for a document in state S then c1 moves the document from + S to S' and c2 from S' to S''. So c1 is computed on the state S and c2 is computed + on the state S'. + To mirror the content of a document using change events use the following approach: - start with the same initial content - apply the 'textDocument/didChange' notifications in the order you receive them. - apply the `TextDocumentContentChangeEvent`s in a single notification in the order - you receive them. - """ + you receive them.""" @attrs.define @@ -3373,15 +3105,13 @@ class TextDocumentChangeRegistrationOptions: document_selector: Optional[Union[DocumentSelector, None]] = attrs.field( default=None ) - """A document selector to identify the scope of the registration. - - If set to null the document selector provided on the client side will be used. - """ + """A document selector to identify the scope of the registration. If set to null + the document selector provided on the client side will be used.""" @attrs.define class DidCloseTextDocumentParams: - """The parameters sent in a close text document notification.""" + """The parameters sent in a close text document notification""" text_document: "TextDocumentIdentifier" = attrs.field() """The document that was closed.""" @@ -3389,7 +3119,7 @@ class DidCloseTextDocumentParams: @attrs.define class DidSaveTextDocumentParams: - """The parameters sent in a save text document notification.""" + """The parameters sent in a save text document notification""" text_document: "TextDocumentIdentifier" = attrs.field() """The document that was saved.""" @@ -3398,10 +3128,8 @@ class DidSaveTextDocumentParams: validator=attrs.validators.optional(attrs.validators.instance_of(str)), default=None, ) - """Optional the content when saved. - - Depends on the includeText value when the save notification was requested. - """ + """Optional the content when saved. Depends on the includeText value + when the save notification was requested.""" @attrs.define @@ -3422,10 +3150,8 @@ class TextDocumentSaveRegistrationOptions: document_selector: Optional[Union[DocumentSelector, None]] = attrs.field( default=None ) - """A document selector to identify the scope of the registration. - - If set to null the document selector provided on the client side will be used. - """ + """A document selector to identify the scope of the registration. If set to null + the document selector provided on the client side will be used.""" include_text: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), @@ -3450,16 +3176,12 @@ class TextEdit: """A text edit applicable to a text document.""" range: "Range" = attrs.field() - """The range of the text document to be manipulated. - - To insert text into a document create a range where start === end. - """ + """The range of the text document to be manipulated. To insert + text into a document create a range where start === end.""" new_text: str = attrs.field(validator=attrs.validators.instance_of(str)) - """The string to be inserted. - - For delete operations use an empty string. - """ + """The string to be inserted. For delete operations use an + empty string.""" @attrs.define @@ -3492,15 +3214,14 @@ class PublishDiagnosticsParams: validator=attrs.validators.optional(validators.integer_validator), default=None ) """Optional the version number of the document the diagnostics are published for. - - @since 3.15.0 - """ + + @since 3.15.0""" # Since: 3.15.0 @attrs.define class CompletionParams: - """Completion parameters.""" + """Completion parameters""" text_document: "TextDocumentIdentifier" = attrs.field() """The text document.""" @@ -3509,61 +3230,53 @@ class CompletionParams: """The position inside the text document.""" context: Optional["CompletionContext"] = attrs.field(default=None) - """The completion context. - - This is only available it the client specifies to send this using the client - capability `textDocument.completion.contextSupport === true` - """ + """The completion context. This is only available it the client specifies + to send this using the client capability `textDocument.completion.contextSupport === true`""" work_done_token: Optional[ProgressToken] = attrs.field(default=None) """An optional token that a server can use to report work done progress.""" partial_result_token: Optional[ProgressToken] = attrs.field(default=None) - """An optional token that a server can use to report partial results (e.g. - streaming) to the client.""" + """An optional token that a server can use to report partial results (e.g. streaming) to + the client.""" @attrs.define class CompletionItem: - """A completion item represents a text snippet that is proposed to complete text - that is being typed.""" + """A completion item represents a text snippet that is + proposed to complete text that is being typed.""" label: str = attrs.field(validator=attrs.validators.instance_of(str)) """The label of this completion item. - - The label property is also by default the text that is inserted when selecting this - completion. - - If label details are provided the label itself should be an unqualified name of the - completion item. - """ + + The label property is also by default the text that + is inserted when selecting this completion. + + If label details are provided the label itself should + be an unqualified name of the completion item.""" label_details: Optional["CompletionItemLabelDetails"] = attrs.field(default=None) - """Additional details for the label. - - @since 3.17.0 - """ + """Additional details for the label + + @since 3.17.0""" # Since: 3.17.0 kind: Optional[CompletionItemKind] = attrs.field(default=None) - """The kind of this completion item. - - Based of the kind an icon is chosen by the editor. - """ + """The kind of this completion item. Based of the kind + an icon is chosen by the editor.""" tags: Optional[List[CompletionItemTag]] = attrs.field(default=None) """Tags for this completion item. - - @since 3.15.0 - """ + + @since 3.15.0""" # Since: 3.15.0 detail: Optional[str] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(str)), default=None, ) - """A human-readable string with additional information about this item, like type or - symbol information.""" + """A human-readable string with additional information + about this item, like type or symbol information.""" documentation: Optional[Union[str, "MarkupContent"]] = attrs.field(default=None) """A human-readable string that represents a doc-comment.""" @@ -3573,40 +3286,33 @@ class CompletionItem: default=None, ) """Indicates if this item is deprecated. - - @deprecated Use `tags` instead. - """ + @deprecated Use `tags` instead.""" preselect: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) """Select this item when showing. - - *Note* that only one completion item can be selected and that the tool / client - decides which item that is. The rule is that the *first* item of those that match - best is selected. - """ + + *Note* that only one completion item can be selected and that the + tool / client decides which item that is. The rule is that the *first* + item of those that match best is selected.""" sort_text: Optional[str] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(str)), default=None, ) - """A string that should be used when comparing this item with other items. - - When `falsy` the {@link CompletionItem.label label} - is used. - """ + """A string that should be used when comparing this item + with other items. When `falsy` the {@link CompletionItem.label label} + is used.""" filter_text: Optional[str] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(str)), default=None, ) - """A string that should be used when filtering a set of completion items. - - When `falsy` the {@link CompletionItem.label label} - is used. - """ + """A string that should be used when filtering a set of + completion items. When `falsy` the {@link CompletionItem.label label} + is used.""" insert_text: Optional[str] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(str)), @@ -3643,10 +3349,10 @@ class CompletionItem: text_edit: Optional[Union[TextEdit, "InsertReplaceEdit"]] = attrs.field( default=None ) - """An {@link TextEdit edit} which is applied to a document when selecting this - completion. When an edit is provided the value of {@link CompletionItem.insertText - insertText} is ignored. - + """An {@link TextEdit edit} which is applied to a document when selecting + this completion. When an edit is provided the value of + {@link CompletionItem.insertText insertText} is ignored. + Most editors support two different operations when accepting a completion item. One is to insert a completion text and the other is to replace an existing text with a completion text. Since this can usually not be @@ -3654,16 +3360,15 @@ class CompletionItem: signal support for `InsertReplaceEdits` via the `textDocument.completion.insertReplaceSupport` client capability property. - + *Note 1:* The text edit's range as well as both ranges from an insert replace edit must be a [single line] and they must contain the position at which completion has been requested. *Note 2:* If an `InsertReplaceEdit` is returned the edit's insert range must be a prefix of the edit's replace range, that means it must be contained and starting at the same position. - - @since 3.16.0 additional type `InsertReplaceEdit` - """ + + @since 3.16.0 additional type `InsertReplaceEdit`""" # Since: 3.16.0 additional type `InsertReplaceEdit` text_edit_text: Optional[str] = attrs.field( @@ -3672,46 +3377,38 @@ class CompletionItem: ) """The edit text used if the completion item is part of a CompletionList and CompletionList defines an item default for the text edit range. - + Clients will only honor this property if they opt into completion list item defaults using the capability `completionList.itemDefaults`. - + If not provided and a list's default range is provided the label property is used as a text. - - @since 3.17.0 - """ + + @since 3.17.0""" # Since: 3.17.0 additional_text_edits: Optional[List[TextEdit]] = attrs.field(default=None) """An optional array of additional {@link TextEdit text edits} that are applied when - selecting this completion. Edits must not overlap (including the same insert - position) with the main {@link CompletionItem.textEdit edit} nor with themselves. - - Additional text edits should be used to change text unrelated to the current cursor - position (for example adding an import statement at the top of the file if the - completion item will insert an unqualified type). - """ + selecting this completion. Edits must not overlap (including the same insert position) + with the main {@link CompletionItem.textEdit edit} nor with themselves. + + Additional text edits should be used to change text unrelated to the current cursor position + (for example adding an import statement at the top of the file if the completion item will + insert an unqualified type).""" commit_characters: Optional[List[str]] = attrs.field(default=None) - """An optional set of characters that when pressed while this completion is active - will accept it first and then type that character. - - *Note* that all commit characters should have `length=1` and that superfluous - characters will be ignored. - """ + """An optional set of characters that when pressed while this completion is active will accept it first and + then type that character. *Note* that all commit characters should have `length=1` and that superfluous + characters will be ignored.""" command: Optional["Command"] = attrs.field(default=None) - """An optional {@link Command command} that is executed *after* inserting this - completion. - - *Note* that additional modifications to the current document should be described - with the {@link CompletionItem.additionalTextEdits additionalTextEdits}-property. - """ + """An optional {@link Command command} that is executed *after* inserting this completion. *Note* that + additional modifications to the current document should be described with the + {@link CompletionItem.additionalTextEdits additionalTextEdits}-property.""" data: Optional[LSPAny] = attrs.field(default=None) - """A data entry field that is preserved on a completion item between a {@link - CompletionRequest} and a {@link CompletionResolveRequest}.""" + """A data entry field that is preserved on a completion item between a + {@link CompletionRequest} and a {@link CompletionResolveRequest}.""" @attrs.define @@ -3725,53 +3422,47 @@ class CompletionListItemDefaultsTypeEditRangeType1: class CompletionListItemDefaultsType: commit_characters: Optional[List[str]] = attrs.field(default=None) """A default commit character set. - - @since 3.17.0 - """ + + @since 3.17.0""" # Since: 3.17.0 edit_range: Optional[ Union["Range", "CompletionListItemDefaultsTypeEditRangeType1"] ] = attrs.field(default=None) """A default edit range. - - @since 3.17.0 - """ + + @since 3.17.0""" # Since: 3.17.0 insert_text_format: Optional[InsertTextFormat] = attrs.field(default=None) """A default insert text format. - - @since 3.17.0 - """ + + @since 3.17.0""" # Since: 3.17.0 insert_text_mode: Optional[InsertTextMode] = attrs.field(default=None) """A default insert text mode. - - @since 3.17.0 - """ + + @since 3.17.0""" # Since: 3.17.0 data: Optional[LSPAny] = attrs.field(default=None) """A default data value. - - @since 3.17.0 - """ + + @since 3.17.0""" # Since: 3.17.0 @attrs.define class CompletionList: - """Represents a collection of {@link CompletionItem completion items} to be - presented in the editor.""" + """Represents a collection of {@link CompletionItem completion items} to be presented + in the editor.""" is_incomplete: bool = attrs.field(validator=attrs.validators.instance_of(bool)) """This list it not complete. Further typing results in recomputing this list. - - Recomputed lists have all their items replaced (not appended) in the incomplete - completion sessions. - """ + + Recomputed lists have all their items replaced (not appended) in the + incomplete completion sessions.""" items: List[CompletionItem] = attrs.field() """The completion items.""" @@ -3838,8 +3529,8 @@ class CompletionOptions: validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """The server provides support to resolve additional information for a completion - item.""" + """The server provides support to resolve additional + information for a completion item.""" completion_item: Optional["CompletionOptionsCompletionItemType"] = attrs.field( default=None @@ -3877,10 +3568,8 @@ class CompletionRegistrationOptions: document_selector: Optional[Union[DocumentSelector, None]] = attrs.field( default=None ) - """A document selector to identify the scope of the registration. - - If set to null the document selector provided on the client side will be used. - """ + """A document selector to identify the scope of the registration. If set to null + the document selector provided on the client side will be used.""" trigger_characters: Optional[List[str]] = attrs.field(default=None) """Most tools trigger completion request automatically without explicitly requesting @@ -3907,8 +3596,8 @@ class CompletionRegistrationOptions: validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """The server provides support to resolve additional information for a completion - item.""" + """The server provides support to resolve additional + information for a completion item.""" completion_item: Optional[ "CompletionRegistrationOptionsCompletionItemType" @@ -3944,11 +3633,11 @@ class Hover: """The result of a hover request.""" contents: Union["MarkupContent", MarkedString, List[MarkedString]] = attrs.field() - """The hover's content.""" + """The hover's content""" range: Optional["Range"] = attrs.field(default=None) - """An optional range inside the text document that is used to visualize the hover, - e.g. by changing the background color.""" + """An optional range inside the text document that is used to + visualize the hover, e.g. by changing the background color.""" @attrs.define @@ -3968,10 +3657,8 @@ class HoverRegistrationOptions: document_selector: Optional[Union[DocumentSelector, None]] = attrs.field( default=None ) - """A document selector to identify the scope of the registration. - - If set to null the document selector provided on the client side will be used. - """ + """A document selector to identify the scope of the registration. If set to null + the document selector provided on the client side will be used.""" work_done_progress: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), @@ -3990,12 +3677,10 @@ class SignatureHelpParams: """The position inside the text document.""" context: Optional["SignatureHelpContext"] = attrs.field(default=None) - """The signature help context. This is only available if the client specifies to - send this using the client capability `textDocument.signatureHelp.contextSupport === - true` - - @since 3.15.0 - """ + """The signature help context. This is only available if the client specifies + to send this using the client capability `textDocument.signatureHelp.contextSupport === true` + + @since 3.15.0""" # Since: 3.15.0 work_done_token: Optional[ProgressToken] = attrs.field(default=None) @@ -4004,10 +3689,9 @@ class SignatureHelpParams: @attrs.define class SignatureHelp: - """Signature help represents the signature of something callable. - - There can be multiple signature but only one active and only one active parameter. - """ + """Signature help represents the signature of something + callable. There can be multiple signature but only one + active and only one active parameter.""" signatures: List["SignatureInformation"] = attrs.field() """One or more signatures.""" @@ -4028,14 +3712,13 @@ class SignatureHelp: active_parameter: Optional[int] = attrs.field( validator=attrs.validators.optional(validators.uinteger_validator), default=None ) - """The active parameter of the active signature. - - If omitted or the value lies outside the range of - `signatures[activeSignature].parameters` defaults to 0 if the active signature has - parameters. If the active signature has no parameters it is ignored. In future - version of the protocol this property might become mandatory to better express the - active parameter if the active signature does have any. - """ + """The active parameter of the active signature. If omitted or the value + lies outside the range of `signatures[activeSignature].parameters` + defaults to 0 if the active signature has parameters. If + the active signature has no parameters it is ignored. + In future version of the protocol this property might become + mandatory to better express the active parameter if the + active signature does have any.""" @attrs.define @@ -4047,12 +3730,11 @@ class SignatureHelpOptions: retrigger_characters: Optional[List[str]] = attrs.field(default=None) """List of characters that re-trigger signature help. - + These trigger characters are only active when signature help is already showing. All trigger characters are also counted as re-trigger characters. - - @since 3.15.0 - """ + + @since 3.15.0""" # Since: 3.15.0 work_done_progress: Optional[bool] = attrs.field( @@ -4068,22 +3750,19 @@ class SignatureHelpRegistrationOptions: document_selector: Optional[Union[DocumentSelector, None]] = attrs.field( default=None ) - """A document selector to identify the scope of the registration. - - If set to null the document selector provided on the client side will be used. - """ + """A document selector to identify the scope of the registration. If set to null + the document selector provided on the client side will be used.""" trigger_characters: Optional[List[str]] = attrs.field(default=None) """List of characters that trigger signature help automatically.""" retrigger_characters: Optional[List[str]] = attrs.field(default=None) """List of characters that re-trigger signature help. - + These trigger characters are only active when signature help is already showing. All trigger characters are also counted as re-trigger characters. - - @since 3.15.0 - """ + + @since 3.15.0""" # Since: 3.15.0 work_done_progress: Optional[bool] = attrs.field( @@ -4106,8 +3785,8 @@ class DefinitionParams: """An optional token that a server can use to report work done progress.""" partial_result_token: Optional[ProgressToken] = attrs.field(default=None) - """An optional token that a server can use to report partial results (e.g. - streaming) to the client.""" + """An optional token that a server can use to report partial results (e.g. streaming) to + the client.""" @attrs.define @@ -4127,10 +3806,8 @@ class DefinitionRegistrationOptions: document_selector: Optional[Union[DocumentSelector, None]] = attrs.field( default=None ) - """A document selector to identify the scope of the registration. - - If set to null the document selector provided on the client side will be used. - """ + """A document selector to identify the scope of the registration. If set to null + the document selector provided on the client side will be used.""" work_done_progress: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), @@ -4154,8 +3831,8 @@ class ReferenceParams: """An optional token that a server can use to report work done progress.""" partial_result_token: Optional[ProgressToken] = attrs.field(default=None) - """An optional token that a server can use to report partial results (e.g. - streaming) to the client.""" + """An optional token that a server can use to report partial results (e.g. streaming) to + the client.""" @attrs.define @@ -4175,10 +3852,8 @@ class ReferenceRegistrationOptions: document_selector: Optional[Union[DocumentSelector, None]] = attrs.field( default=None ) - """A document selector to identify the scope of the registration. - - If set to null the document selector provided on the client side will be used. - """ + """A document selector to identify the scope of the registration. If set to null + the document selector provided on the client side will be used.""" work_done_progress: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), @@ -4200,18 +3875,15 @@ class DocumentHighlightParams: """An optional token that a server can use to report work done progress.""" partial_result_token: Optional[ProgressToken] = attrs.field(default=None) - """An optional token that a server can use to report partial results (e.g. - streaming) to the client.""" + """An optional token that a server can use to report partial results (e.g. streaming) to + the client.""" @attrs.define class DocumentHighlight: - """A document highlight is a range inside a text document which deserves special - attention. - - Usually a document highlight is visualized by changing the background color of its - range. - """ + """A document highlight is a range inside a text document which deserves + special attention. Usually a document highlight is visualized by changing + the background color of its range.""" range: "Range" = attrs.field() """The range this highlight applies to.""" @@ -4237,10 +3909,8 @@ class DocumentHighlightRegistrationOptions: document_selector: Optional[Union[DocumentSelector, None]] = attrs.field( default=None ) - """A document selector to identify the scope of the registration. - - If set to null the document selector provided on the client side will be used. - """ + """A document selector to identify the scope of the registration. If set to null + the document selector provided on the client side will be used.""" work_done_progress: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), @@ -4259,8 +3929,8 @@ class DocumentSymbolParams: """An optional token that a server can use to report work done progress.""" partial_result_token: Optional[ProgressToken] = attrs.field(default=None) - """An optional token that a server can use to report partial results (e.g. - streaming) to the client.""" + """An optional token that a server can use to report partial results (e.g. streaming) to + the client.""" @attrs.define @@ -4275,21 +3945,18 @@ class BaseSymbolInformation: tags: Optional[List[SymbolTag]] = attrs.field(default=None) """Tags for this symbol. - - @since 3.16.0 - """ + + @since 3.16.0""" # Since: 3.16.0 container_name: Optional[str] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(str)), default=None, ) - """The name of the symbol containing this symbol. - - This information is for user interface purposes (e.g. to render a qualifier in the - user interface if necessary). It can't be used to re-infer a hierarchy for the - document symbols. - """ + """The name of the symbol containing this symbol. This information is for + user interface purposes (e.g. to render a qualifier in the user interface + if necessary). It can't be used to re-infer a hierarchy for the document + symbols.""" @attrs.define @@ -4298,14 +3965,15 @@ class SymbolInformation: interfaces etc.""" location: Location = attrs.field() - """The location of this symbol. The location's range is used by a tool to reveal the - location in the editor. If the symbol is selected in the tool the range's start - information is used to position the cursor. So the range usually spans more than the - actual symbol's name and does normally include things like visibility modifiers. - - The range doesn't have to denote a node range in the sense of an abstract syntax - tree. It can therefore not be used to re-construct a hierarchy of the symbols. - """ + """The location of this symbol. The location's range is used by a tool + to reveal the location in the editor. If the symbol is selected in the + tool the range's start information is used to position the cursor. So + the range usually spans more than the actual symbol's name and does + normally include things like visibility modifiers. + + The range doesn't have to denote a node range in the sense of an abstract + syntax tree. It can therefore not be used to re-construct a hierarchy of + the symbols.""" name: str = attrs.field(validator=attrs.validators.instance_of(str)) """The name of this symbol.""" @@ -4318,62 +3986,47 @@ class SymbolInformation: default=None, ) """Indicates if this symbol is deprecated. - - @deprecated Use tags instead - """ + + @deprecated Use tags instead""" tags: Optional[List[SymbolTag]] = attrs.field(default=None) """Tags for this symbol. - - @since 3.16.0 - """ + + @since 3.16.0""" # Since: 3.16.0 container_name: Optional[str] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(str)), default=None, ) - """The name of the symbol containing this symbol. - - This information is for user interface purposes (e.g. to render a qualifier in the - user interface if necessary). It can't be used to re-infer a hierarchy for the - document symbols. - """ + """The name of the symbol containing this symbol. This information is for + user interface purposes (e.g. to render a qualifier in the user interface + if necessary). It can't be used to re-infer a hierarchy for the document + symbols.""" @attrs.define class DocumentSymbol: """Represents programming constructs like variables, classes, interfaces etc. - that appear in a document. Document symbols can be hierarchical and they have two ranges: one that encloses its definition and one that points to - its most interesting range, e.g. the range of an identifier. - """ + its most interesting range, e.g. the range of an identifier.""" name: str = attrs.field(validator=attrs.validators.instance_of(str)) - """The name of this symbol. - - Will be displayed in the user interface and therefore must not be an empty string or - a string only consisting of white spaces. - """ + """The name of this symbol. Will be displayed in the user interface and therefore must not be + an empty string or a string only consisting of white spaces.""" kind: SymbolKind = attrs.field() """The kind of this symbol.""" range: "Range" = attrs.field() - """The range enclosing this symbol not including leading/trailing whitespace but - everything else like comments. - - This information is typically used to determine if the clients cursor is inside the - symbol to reveal in the symbol in the UI. - """ + """The range enclosing this symbol not including leading/trailing whitespace but everything else + like comments. This information is typically used to determine if the clients cursor is + inside the symbol to reveal in the symbol in the UI.""" selection_range: "Range" = attrs.field() - """The range that should be selected and revealed when this symbol is being picked, - e.g the name of a function. - - Must be contained by the `range`. - """ + """The range that should be selected and revealed when this symbol is being picked, e.g the name of a function. + Must be contained by the `range`.""" detail: Optional[str] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(str)), @@ -4383,9 +4036,8 @@ class DocumentSymbol: tags: Optional[List[SymbolTag]] = attrs.field(default=None) """Tags for this document symbol. - - @since 3.16.0 - """ + + @since 3.16.0""" # Since: 3.16.0 deprecated: Optional[bool] = attrs.field( @@ -4393,9 +4045,8 @@ class DocumentSymbol: default=None, ) """Indicates if this symbol is deprecated. - - @deprecated Use tags instead - """ + + @deprecated Use tags instead""" children: Optional[List["DocumentSymbol"]] = attrs.field(default=None) """Children of this symbol, e.g. properties of a class.""" @@ -4409,11 +4060,10 @@ class DocumentSymbolOptions: validator=attrs.validators.optional(attrs.validators.instance_of(str)), default=None, ) - """A human-readable string that is shown when multiple outlines trees are shown for - the same document. - - @since 3.16.0 - """ + """A human-readable string that is shown when multiple outlines trees + are shown for the same document. + + @since 3.16.0""" # Since: 3.16.0 work_done_progress: Optional[bool] = attrs.field( @@ -4429,20 +4079,17 @@ class DocumentSymbolRegistrationOptions: document_selector: Optional[Union[DocumentSelector, None]] = attrs.field( default=None ) - """A document selector to identify the scope of the registration. - - If set to null the document selector provided on the client side will be used. - """ + """A document selector to identify the scope of the registration. If set to null + the document selector provided on the client side will be used.""" label: Optional[str] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(str)), default=None, ) - """A human-readable string that is shown when multiple outlines trees are shown for - the same document. - - @since 3.16.0 - """ + """A human-readable string that is shown when multiple outlines trees + are shown for the same document. + + @since 3.16.0""" # Since: 3.16.0 work_done_progress: Optional[bool] = attrs.field( @@ -4468,18 +4115,16 @@ class CodeActionParams: """An optional token that a server can use to report work done progress.""" partial_result_token: Optional[ProgressToken] = attrs.field(default=None) - """An optional token that a server can use to report partial results (e.g. - streaming) to the client.""" + """An optional token that a server can use to report partial results (e.g. streaming) to + the client.""" @attrs.define class Command: - """Represents a reference to a command. - - Provides a title which will be used to represent a command in the UI and, - optionally, an array of arguments which will be passed to the command handler - function when invoked. - """ + """Represents a reference to a command. Provides a title which + will be used to represent a command in the UI and, optionally, + an array of arguments which will be passed to the command handler + function when invoked.""" title: str = attrs.field(validator=attrs.validators.instance_of(str)) """Title of the command, like `save`.""" @@ -4488,22 +4133,22 @@ class Command: """The identifier of the actual command handler.""" arguments: Optional[List[LSPAny]] = attrs.field(default=None) - """Arguments that the command handler should be invoked with.""" + """Arguments that the command handler should be + invoked with.""" @attrs.define class CodeActionDisabledType: reason: str = attrs.field(validator=attrs.validators.instance_of(str)) """Human readable description of why the code action is currently disabled. - - This is displayed in the code actions UI. - """ + + This is displayed in the code actions UI.""" @attrs.define class CodeAction: - """A code action represents a change that can be performed in code, e.g. to fix a - problem or to refactor code. + """A code action represents a change that can be performed in code, e.g. to fix a problem or + to refactor code. A CodeAction must set either `edit` and/or a `command`. If both are supplied, the `edit` is applied first, then the `command` is executed. """ @@ -4513,9 +4158,8 @@ class CodeAction: kind: Optional[Union[CodeActionKind, str]] = attrs.field(default=None) """The kind of the code action. - - Used to filter code actions. - """ + + Used to filter code actions.""" diagnostics: Optional[List["Diagnostic"]] = attrs.field(default=None) """The diagnostics that this code action resolves.""" @@ -4524,51 +4168,46 @@ class CodeAction: validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """Marks this as a preferred action. Preferred actions are used by the `auto fix` - command and can be targeted by keybindings. - + """Marks this as a preferred action. Preferred actions are used by the `auto fix` command and can be targeted + by keybindings. + A quick fix should be marked preferred if it properly addresses the underlying error. A refactoring should be marked preferred if it is the most reasonable choice of actions to take. - - @since 3.15.0 - """ + + @since 3.15.0""" # Since: 3.15.0 disabled: Optional["CodeActionDisabledType"] = attrs.field(default=None) """Marks that the code action cannot currently be applied. - + Clients should follow the following guidelines regarding disabled code actions: - + - Disabled code actions are not shown in automatic [lightbulbs](https://code.visualstudio.com/docs/editor/editingevolved#_code-action) code action menus. - + - Disabled actions are shown as faded out in the code action menu when the user requests a more specific type of code action, such as refactorings. - + - If the user has a [keybinding](https://code.visualstudio.com/docs/editor/refactoring#_keybindings-for-code-actions) that auto applies a code action and only disabled code actions are returned, the client should show the user an error message with `reason` in the editor. - - @since 3.16.0 - """ + + @since 3.16.0""" # Since: 3.16.0 edit: Optional[WorkspaceEdit] = attrs.field(default=None) """The workspace edit this code action performs.""" command: Optional[Command] = attrs.field(default=None) - """A command this code action executes. - - If a code action provides an edit and a command, first the edit is executed and then - the command. - """ + """A command this code action executes. If a code action + provides an edit and a command, first the edit is + executed and then the command.""" data: Optional[LSPAny] = attrs.field(default=None) - """A data entry field that is preserved on a code action between a - `textDocument/codeAction` and a `codeAction/resolve` request. - - @since 3.16.0 - """ + """A data entry field that is preserved on a code action between + a `textDocument/codeAction` and a `codeAction/resolve` request. + + @since 3.16.0""" # Since: 3.16.0 @@ -4580,19 +4219,18 @@ class CodeActionOptions: default=None ) """CodeActionKinds that this server may return. - + The list of kinds may be generic, such as `CodeActionKind.Refactor`, or the server - may list out every specific kind they provide. - """ + may list out every specific kind they provide.""" resolve_provider: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """The server provides support to resolve additional information for a code action. - - @since 3.16.0 - """ + """The server provides support to resolve additional + information for a code action. + + @since 3.16.0""" # Since: 3.16.0 work_done_progress: Optional[bool] = attrs.field( @@ -4608,28 +4246,25 @@ class CodeActionRegistrationOptions: document_selector: Optional[Union[DocumentSelector, None]] = attrs.field( default=None ) - """A document selector to identify the scope of the registration. - - If set to null the document selector provided on the client side will be used. - """ + """A document selector to identify the scope of the registration. If set to null + the document selector provided on the client side will be used.""" code_action_kinds: Optional[List[Union[CodeActionKind, str]]] = attrs.field( default=None ) """CodeActionKinds that this server may return. - + The list of kinds may be generic, such as `CodeActionKind.Refactor`, or the server - may list out every specific kind they provide. - """ + may list out every specific kind they provide.""" resolve_provider: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """The server provides support to resolve additional information for a code action. - - @since 3.16.0 - """ + """The server provides support to resolve additional + information for a code action. + + @since 3.16.0""" # Since: 3.16.0 work_done_progress: Optional[bool] = attrs.field( @@ -4643,17 +4278,15 @@ class WorkspaceSymbolParams: """The parameters of a {@link WorkspaceSymbolRequest}.""" query: str = attrs.field(validator=attrs.validators.instance_of(str)) - """A query string to filter symbols by. - - Clients may send an empty string here to request all symbols. - """ + """A query string to filter symbols by. Clients may send an empty + string here to request all symbols.""" work_done_token: Optional[ProgressToken] = attrs.field(default=None) """An optional token that a server can use to report work done progress.""" partial_result_token: Optional[ProgressToken] = attrs.field(default=None) - """An optional token that a server can use to report partial results (e.g. - streaming) to the client.""" + """An optional token that a server can use to report partial results (e.g. streaming) to + the client.""" @attrs.define @@ -4667,8 +4300,7 @@ class WorkspaceSymbol: See also SymbolInformation. - @since 3.17.0 - """ + @since 3.17.0""" # Since: 3.17.0 @@ -4686,26 +4318,23 @@ class WorkspaceSymbol: """The kind of this symbol.""" data: Optional[LSPAny] = attrs.field(default=None) - """A data entry field that is preserved on a workspace symbol between a workspace - symbol request and a workspace symbol resolve request.""" + """A data entry field that is preserved on a workspace symbol between a + workspace symbol request and a workspace symbol resolve request.""" tags: Optional[List[SymbolTag]] = attrs.field(default=None) """Tags for this symbol. - - @since 3.16.0 - """ + + @since 3.16.0""" # Since: 3.16.0 container_name: Optional[str] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(str)), default=None, ) - """The name of the symbol containing this symbol. - - This information is for user interface purposes (e.g. to render a qualifier in the - user interface if necessary). It can't be used to re-infer a hierarchy for the - document symbols. - """ + """The name of the symbol containing this symbol. This information is for + user interface purposes (e.g. to render a qualifier in the user interface + if necessary). It can't be used to re-infer a hierarchy for the document + symbols.""" @attrs.define @@ -4716,11 +4345,10 @@ class WorkspaceSymbolOptions: validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """The server provides support to resolve additional information for a workspace - symbol. - - @since 3.17.0 - """ + """The server provides support to resolve additional + information for a workspace symbol. + + @since 3.17.0""" # Since: 3.17.0 work_done_progress: Optional[bool] = attrs.field( @@ -4737,11 +4365,10 @@ class WorkspaceSymbolRegistrationOptions: validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """The server provides support to resolve additional information for a workspace - symbol. - - @since 3.17.0 - """ + """The server provides support to resolve additional + information for a workspace symbol. + + @since 3.17.0""" # Since: 3.17.0 work_done_progress: Optional[bool] = attrs.field( @@ -4761,8 +4388,8 @@ class CodeLensParams: """An optional token that a server can use to report work done progress.""" partial_result_token: Optional[ProgressToken] = attrs.field(default=None) - """An optional token that a server can use to report partial results (e.g. - streaming) to the client.""" + """An optional token that a server can use to report partial results (e.g. streaming) to + the client.""" @attrs.define @@ -4771,21 +4398,18 @@ class CodeLens: source text, like the number of references, a way to run tests, etc. A code lens is _unresolved_ when no command is associated to it. For performance - reasons the creation of a code lens and resolving should be done in two stages. - """ + reasons the creation of a code lens and resolving should be done in two stages.""" range: "Range" = attrs.field() - """The range in which this code lens is valid. - - Should only span a single line. - """ + """The range in which this code lens is valid. Should only span a single line.""" command: Optional[Command] = attrs.field(default=None) """The command this code lens represents.""" data: Optional[LSPAny] = attrs.field(default=None) - """A data entry field that is preserved on a code lens item between a {@link - CodeLensRequest} and a [CodeLensResolveRequest] (#CodeLensResolveRequest)""" + """A data entry field that is preserved on a code lens item between + a {@link CodeLensRequest} and a [CodeLensResolveRequest] + (#CodeLensResolveRequest)""" @attrs.define @@ -4811,10 +4435,8 @@ class CodeLensRegistrationOptions: document_selector: Optional[Union[DocumentSelector, None]] = attrs.field( default=None ) - """A document selector to identify the scope of the registration. - - If set to null the document selector provided on the client side will be used. - """ + """A document selector to identify the scope of the registration. If set to null + the document selector provided on the client side will be used.""" resolve_provider: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), @@ -4839,14 +4461,14 @@ class DocumentLinkParams: """An optional token that a server can use to report work done progress.""" partial_result_token: Optional[ProgressToken] = attrs.field(default=None) - """An optional token that a server can use to report partial results (e.g. - streaming) to the client.""" + """An optional token that a server can use to report partial results (e.g. streaming) to + the client.""" @attrs.define class DocumentLink: - """A document link is a range in a text document that links to an internal or - external resource, like another text document or a web site.""" + """A document link is a range in a text document that links to an internal or external resource, like another + text document or a web site.""" range: "Range" = attrs.field() """The range this link applies to.""" @@ -4855,23 +4477,19 @@ class DocumentLink: validator=attrs.validators.optional(attrs.validators.instance_of(str)), default=None, ) - """The uri this link points to. - - If missing a resolve request is sent later. - """ + """The uri this link points to. If missing a resolve request is sent later.""" tooltip: Optional[str] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(str)), default=None, ) """The tooltip text when you hover over this link. - + If a tooltip is provided, is will be displayed in a string that includes instructions on how to trigger the link, such as `{0} (ctrl + click)`. The specific instructions vary depending on OS, user settings, and localization. - - @since 3.15.0 - """ + + @since 3.15.0""" # Since: 3.15.0 data: Optional[LSPAny] = attrs.field(default=None) @@ -4902,10 +4520,8 @@ class DocumentLinkRegistrationOptions: document_selector: Optional[Union[DocumentSelector, None]] = attrs.field( default=None ) - """A document selector to identify the scope of the registration. - - If set to null the document selector provided on the client side will be used. - """ + """A document selector to identify the scope of the registration. If set to null + the document selector provided on the client side will be used.""" resolve_provider: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), @@ -4950,10 +4566,8 @@ class DocumentFormattingRegistrationOptions: document_selector: Optional[Union[DocumentSelector, None]] = attrs.field( default=None ) - """A document selector to identify the scope of the registration. - - If set to null the document selector provided on the client side will be used. - """ + """A document selector to identify the scope of the registration. If set to null + the document selector provided on the client side will be used.""" work_done_progress: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), @@ -4969,10 +4583,10 @@ class DocumentRangeFormattingParams: """The document to format.""" range: "Range" = attrs.field() - """The range to format.""" + """The range to format""" options: "FormattingOptions" = attrs.field() - """The format options.""" + """The format options""" work_done_token: Optional[ProgressToken] = attrs.field(default=None) """An optional token that a server can use to report work done progress.""" @@ -4982,6 +4596,17 @@ class DocumentRangeFormattingParams: class DocumentRangeFormattingOptions: """Provider options for a {@link DocumentRangeFormattingRequest}.""" + ranges_support: Optional[bool] = attrs.field( + validator=attrs.validators.optional(attrs.validators.instance_of(bool)), + default=None, + ) + """Whether the server supports formatting multiple ranges at once. + + @since 3.18.0 + @proposed""" + # Since: 3.18.0 + # Proposed + work_done_progress: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, @@ -4995,10 +4620,19 @@ class DocumentRangeFormattingRegistrationOptions: document_selector: Optional[Union[DocumentSelector, None]] = attrs.field( default=None ) - """A document selector to identify the scope of the registration. + """A document selector to identify the scope of the registration. If set to null + the document selector provided on the client side will be used.""" - If set to null the document selector provided on the client side will be used. - """ + ranges_support: Optional[bool] = attrs.field( + validator=attrs.validators.optional(attrs.validators.instance_of(bool)), + default=None, + ) + """Whether the server supports formatting multiple ranges at once. + + @since 3.18.0 + @proposed""" + # Since: 3.18.0 + # Proposed work_done_progress: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), @@ -5006,6 +4640,29 @@ class DocumentRangeFormattingRegistrationOptions: ) +@attrs.define +class DocumentRangesFormattingParams: + """The parameters of a {@link DocumentRangesFormattingRequest}. + + @since 3.18.0 + @proposed""" + + # Since: 3.18.0 + # Proposed + + text_document: "TextDocumentIdentifier" = attrs.field() + """The document to format.""" + + ranges: List["Range"] = attrs.field() + """The ranges to format""" + + options: "FormattingOptions" = attrs.field() + """The format options""" + + work_done_token: Optional[ProgressToken] = attrs.field(default=None) + """An optional token that a server can use to report work done progress.""" + + @attrs.define class DocumentOnTypeFormattingParams: """The parameters of a {@link DocumentOnTypeFormattingRequest}.""" @@ -5015,18 +4672,14 @@ class DocumentOnTypeFormattingParams: position: "Position" = attrs.field() """The position around which the on type formatting should happen. - This is not necessarily the exact position where the character denoted - by the property `ch` got typed. - """ + by the property `ch` got typed.""" ch: str = attrs.field(validator=attrs.validators.instance_of(str)) - """The character that has been typed that triggered the formatting on type request. - - That is not necessarily the last character that got inserted into the document since - the client could auto insert characters as well (e.g. like automatic brace - completion). - """ + """The character that has been typed that triggered the formatting + on type request. That is not necessarily the last character that + got inserted into the document since the client could auto insert + characters as well (e.g. like automatic brace completion).""" options: "FormattingOptions" = attrs.field() """The formatting options.""" @@ -5057,10 +4710,8 @@ class DocumentOnTypeFormattingRegistrationOptions: document_selector: Optional[Union[DocumentSelector, None]] = attrs.field( default=None ) - """A document selector to identify the scope of the registration. - - If set to null the document selector provided on the client side will be used. - """ + """A document selector to identify the scope of the registration. If set to null + the document selector provided on the client side will be used.""" more_trigger_character: Optional[List[str]] = attrs.field(default=None) """More trigger characters.""" @@ -5077,11 +4728,9 @@ class RenameParams: """The position at which this request was sent.""" new_name: str = attrs.field(validator=attrs.validators.instance_of(str)) - """The new name of the symbol. - - If the given name is not valid the request must return a {@link ResponseError} with - an appropriate message set. - """ + """The new name of the symbol. If the given name is not valid the + request must return a {@link ResponseError} with an + appropriate message set.""" work_done_token: Optional[ProgressToken] = attrs.field(default=None) """An optional token that a server can use to report work done progress.""" @@ -5096,9 +4745,8 @@ class RenameOptions: default=None, ) """Renames should be checked and tested before being executed. - - @since version 3.12.0 - """ + + @since version 3.12.0""" # Since: version 3.12.0 work_done_progress: Optional[bool] = attrs.field( @@ -5114,19 +4762,16 @@ class RenameRegistrationOptions: document_selector: Optional[Union[DocumentSelector, None]] = attrs.field( default=None ) - """A document selector to identify the scope of the registration. - - If set to null the document selector provided on the client side will be used. - """ + """A document selector to identify the scope of the registration. If set to null + the document selector provided on the client side will be used.""" prepare_provider: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) """Renames should be checked and tested before being executed. - - @since version 3.12.0 - """ + + @since version 3.12.0""" # Since: version 3.12.0 work_done_progress: Optional[bool] = attrs.field( @@ -5166,7 +4811,7 @@ class ExecuteCommandOptions: """The server capabilities of a {@link ExecuteCommandRequest}.""" commands: List[str] = attrs.field() - """The commands to be executed on the server.""" + """The commands to be executed on the server""" work_done_progress: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), @@ -5179,7 +4824,7 @@ class ExecuteCommandRegistrationOptions: """Registration options for a {@link ExecuteCommandRequest}.""" commands: List[str] = attrs.field() - """The commands to be executed on the server.""" + """The commands to be executed on the server""" work_done_progress: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), @@ -5198,19 +4843,16 @@ class ApplyWorkspaceEditParams: validator=attrs.validators.optional(attrs.validators.instance_of(str)), default=None, ) - """An optional label of the workspace edit. - - This label is presented in the user interface for example on an undo stack to undo - the workspace edit. - """ + """An optional label of the workspace edit. This label is + presented in the user interface for example on an undo + stack to undo the workspace edit.""" @attrs.define class ApplyWorkspaceEditResult: """The result returned from the apply workspace edit request. - @since 3.17 renamed from ApplyWorkspaceEditResponse - """ + @since 3.17 renamed from ApplyWorkspaceEditResponse""" # Since: 3.17 renamed from ApplyWorkspaceEditResponse @@ -5222,10 +4864,8 @@ class ApplyWorkspaceEditResult: default=None, ) """An optional textual description for why the edit was not applied. - - This may be used by the server for diagnostic logging or to provide a suitable error - for a request that triggered the edit. - """ + This may be used by the server for diagnostic logging or to provide + a suitable error for a request that triggered the edit.""" failed_change: Optional[int] = attrs.field( validator=attrs.validators.optional(validators.uinteger_validator), default=None @@ -5238,11 +4878,10 @@ class ApplyWorkspaceEditResult: @attrs.define class WorkDoneProgressBegin: title: str = attrs.field(validator=attrs.validators.instance_of(str)) - """Mandatory title of the progress operation. Used to briefly inform about the kind - of operation being performed. - - Examples: "Indexing" or "Linking dependencies". - """ + """Mandatory title of the progress operation. Used to briefly inform about + the kind of operation being performed. + + Examples: "Indexing" or "Linking dependencies".""" kind: str = attrs.field(validator=attrs.validators.in_(["begin"]), default="begin") @@ -5250,11 +4889,9 @@ class WorkDoneProgressBegin: validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """Controls if a cancel button should show to allow the user to cancel the long - running operation. - - Clients that don't support cancellation are allowed to ignore the setting. - """ + """Controls if a cancel button should show to allow the user to cancel the + long running operation. Clients that don't support cancellation are allowed + to ignore the setting.""" message: Optional[str] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(str)), @@ -5288,10 +4925,9 @@ class WorkDoneProgressReport: default=None, ) """Controls enablement state of a cancel button. - + Clients that don't support cancellation or don't support controlling the button's - enablement state are allowed to ignore the property. - """ + enablement state are allowed to ignore the property.""" message: Optional[str] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(str)), @@ -5322,8 +4958,8 @@ class WorkDoneProgressEnd: validator=attrs.validators.optional(attrs.validators.instance_of(str)), default=None, ) - """Optional, a final message indicating to for example indicate the outcome of the - operation.""" + """Optional, a final message indicating to for example indicate the outcome + of the operation.""" @attrs.define @@ -5358,36 +4994,26 @@ class ProgressParams: @attrs.define class LocationLink: - """Represents the connection of two locations. - - Provides additional metadata over normal {@link Location locations}, including an - origin range. - """ + """Represents the connection of two locations. Provides additional metadata over normal {@link Location locations}, + including an origin range.""" target_uri: str = attrs.field(validator=attrs.validators.instance_of(str)) """The target resource identifier of this link.""" target_range: "Range" = attrs.field() - """The full target range of this link. - - If the target for example is a symbol then target range is the range enclosing this - symbol not including leading/trailing whitespace but everything else like comments. - This information is typically used to highlight the range in the editor. - """ + """The full target range of this link. If the target for example is a symbol then target range is the + range enclosing this symbol not including leading/trailing whitespace but everything else + like comments. This information is typically used to highlight the range in the editor.""" target_selection_range: "Range" = attrs.field() - """The range that should be selected and revealed when this link is being followed, - e.g the name of a function. - - Must be contained by the `targetRange`. See also `DocumentSymbol#range` - """ + """The range that should be selected and revealed when this link is being followed, e.g the name of a function. + Must be contained by the `targetRange`. See also `DocumentSymbol#range`""" origin_selection_range: Optional["Range"] = attrs.field(default=None) """Span of the origin of this link. - - Used as the underlined span for mouse interaction. Defaults to the word range at the - definition position. - """ + + Used as the underlined span for mouse interaction. Defaults to the word range at + the definition position.""" @attrs.define @@ -5402,8 +5028,7 @@ class Range: start: { line: 5, character: 23 } end : { line 6, character : 0 } } - ``` - """ + ```""" start: "Position" = attrs.field() """The range's start position.""" @@ -5425,10 +5050,10 @@ class WorkspaceFoldersChangeEvent: """The workspace folder change event.""" added: List[WorkspaceFolder] = attrs.field() - """The array of added workspace folders.""" + """The array of added workspace folders""" removed: List[WorkspaceFolder] = attrs.field() - """The array of the removed workspace folders.""" + """The array of the removed workspace folders""" @attrs.define @@ -5506,21 +5131,18 @@ class Position: line: int = attrs.field(validator=validators.uinteger_validator) """Line position in a document (zero-based). - - 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. If a line number is negative, it defaults to - 0. - """ + + 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. + If a line number is negative, it defaults to 0.""" character: int = attrs.field(validator=validators.uinteger_validator) """Character offset on a line in a document (zero-based). - + The meaning of this offset is determined by the negotiated `PositionEncodingKind`. - + If the character value is greater than the line length it defaults back to the - line length. - """ + line length.""" def __eq__(self, o: object) -> bool: if not isinstance(o, Position): @@ -5556,8 +5178,7 @@ class SemanticTokensEdit: class FileCreate: """Represents information on a file/folder create. - @since 3.16.0 - """ + @since 3.16.0""" # Since: 3.16.0 @@ -5567,23 +5188,19 @@ class FileCreate: @attrs.define class TextDocumentEdit: - """Describes textual changes on a text document. - - A TextDocumentEdit describes all changes on a document version Si and after they are - applied move the document to version Si+1. So the creator of a TextDocumentEdit - doesn't need to sort the array of edits or do any kind of ordering. However the - edits must be non overlapping. - """ + """Describes textual changes on a text document. A TextDocumentEdit describes all changes + on a document version Si and after they are applied move the document to version Si+1. + So the creator of a TextDocumentEdit doesn't need to sort the array of edits or do any + kind of ordering. However the edits must be non overlapping.""" text_document: "OptionalVersionedTextDocumentIdentifier" = attrs.field() """The text document to change.""" edits: List[Union[TextEdit, "AnnotatedTextEdit"]] = attrs.field() """The edits to be applied. - + @since 3.16.0 - support for AnnotatedTextEdit. This is guarded using a - client capability. - """ + client capability.""" # Since: 3.16.0 - support for AnnotatedTextEdit. This is guarded using aclient capability. @@ -5596,9 +5213,8 @@ class ResourceOperation: annotation_id: Optional[ChangeAnnotationIdentifier] = attrs.field(default=None) """An optional annotation identifier describing the operation. - - @since 3.16.0 - """ + + @since 3.16.0""" # Since: 3.16.0 @@ -5612,22 +5228,21 @@ class CreateFile: kind: str = attrs.field( validator=attrs.validators.in_(["create"]), default="create" ) - """A create.""" + """A create""" options: Optional["CreateFileOptions"] = attrs.field(default=None) - """Additional options.""" + """Additional options""" annotation_id: Optional[ChangeAnnotationIdentifier] = attrs.field(default=None) """An optional annotation identifier describing the operation. - - @since 3.16.0 - """ + + @since 3.16.0""" # Since: 3.16.0 @attrs.define class RenameFile: - """Rename file operation.""" + """Rename file operation""" old_uri: str = attrs.field(validator=attrs.validators.instance_of(str)) """The old (existing) location.""" @@ -5638,22 +5253,21 @@ class RenameFile: kind: str = attrs.field( validator=attrs.validators.in_(["rename"]), default="rename" ) - """A rename.""" + """A rename""" options: Optional["RenameFileOptions"] = attrs.field(default=None) """Rename options.""" annotation_id: Optional[ChangeAnnotationIdentifier] = attrs.field(default=None) """An optional annotation identifier describing the operation. - - @since 3.16.0 - """ + + @since 3.16.0""" # Since: 3.16.0 @attrs.define class DeleteFile: - """Delete file operation.""" + """Delete file operation""" uri: str = attrs.field(validator=attrs.validators.instance_of(str)) """The file to delete.""" @@ -5661,16 +5275,15 @@ class DeleteFile: kind: str = attrs.field( validator=attrs.validators.in_(["delete"]), default="delete" ) - """A delete.""" + """A delete""" options: Optional["DeleteFileOptions"] = attrs.field(default=None) """Delete options.""" annotation_id: Optional[ChangeAnnotationIdentifier] = attrs.field(default=None) """An optional annotation identifier describing the operation. - - @since 3.16.0 - """ + + @since 3.16.0""" # Since: 3.16.0 @@ -5678,39 +5291,35 @@ class DeleteFile: class ChangeAnnotation: """Additional information that describes document changes. - @since 3.16.0 - """ + @since 3.16.0""" # Since: 3.16.0 label: str = attrs.field(validator=attrs.validators.instance_of(str)) - """A human-readable string describing the actual change. - - The string is rendered prominent in the user interface. - """ + """A human-readable string describing the actual change. The string + is rendered prominent in the user interface.""" needs_confirmation: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """A flag which indicates that user confirmation is needed before applying the - change.""" + """A flag which indicates that user confirmation is needed + before applying the change.""" description: Optional[str] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(str)), default=None, ) - """A human-readable string which is rendered less prominent in the user - interface.""" + """A human-readable string which is rendered less prominent in + the user interface.""" @attrs.define class FileOperationFilter: - """A filter to describe in which file operation requests or notifications the server - is interested in receiving. + """A filter to describe in which file operation requests or notifications + the server is interested in receiving. - @since 3.16.0 - """ + @since 3.16.0""" # Since: 3.16.0 @@ -5728,8 +5337,7 @@ class FileOperationFilter: class FileRename: """Represents information on a file/folder rename. - @since 3.16.0 - """ + @since 3.16.0""" # Since: 3.16.0 @@ -5744,8 +5352,7 @@ class FileRename: class FileDelete: """Represents information on a file/folder delete. - @since 3.16.0 - """ + @since 3.16.0""" # Since: 3.16.0 @@ -5764,18 +5371,14 @@ class InlineValueContext: stopped_location: Range = attrs.field() """The document range where execution has stopped. - - Typically the end position of the range denotes the line where the inline values are - shown. - """ + Typically the end position of the range denotes the line where the inline values are shown.""" @attrs.define class InlineValueText: """Provide inline value as text. - @since 3.17.0 - """ + @since 3.17.0""" # Since: 3.17.0 @@ -5788,20 +5391,17 @@ class InlineValueText: @attrs.define class InlineValueVariableLookup: - """Provide inline value through a variable lookup. If only a range is specified, the - variable name will be extracted from the underlying document. An optional variable - name can be used to override the extracted name. + """Provide inline value through a variable lookup. + If only a range is specified, the variable name will be extracted from the underlying document. + An optional variable name can be used to override the extracted name. - @since 3.17.0 - """ + @since 3.17.0""" # Since: 3.17.0 range: Range = attrs.field() """The document range for which the inline value applies. - - The range is used to extract the variable name from the underlying document. - """ + The range is used to extract the variable name from the underlying document.""" case_sensitive_lookup: bool = attrs.field( validator=attrs.validators.instance_of(bool) @@ -5817,21 +5417,17 @@ class InlineValueVariableLookup: @attrs.define class InlineValueEvaluatableExpression: - """Provide an inline value through an expression evaluation. If only a range is - specified, the expression will be extracted from the underlying document. An - optional expression can be used to override the extracted expression. + """Provide an inline value through an expression evaluation. + If only a range is specified, the expression will be extracted from the underlying document. + An optional expression can be used to override the extracted expression. - @since 3.17.0 - """ + @since 3.17.0""" # Since: 3.17.0 range: Range = attrs.field() """The document range for which the inline value applies. - - The range is used to extract the evaluatable expression from the underlying - document. - """ + The range is used to extract the evaluatable expression from the underlying document.""" expression: Optional[str] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(str)), @@ -5842,11 +5438,10 @@ class InlineValueEvaluatableExpression: @attrs.define class InlayHintLabelPart: - """An inlay hint label part allows for interactive and composite labels of inlay - hints. + """An inlay hint label part allows for interactive and composite labels + of inlay hints. - @since 3.17.0 - """ + @since 3.17.0""" # Since: 3.17.0 @@ -5854,32 +5449,28 @@ class InlayHintLabelPart: """The value of this label part.""" tooltip: Optional[Union[str, "MarkupContent"]] = attrs.field(default=None) - """The tooltip text when you hover over this label part. - - Depending on + """The tooltip text when you hover over this label part. Depending on the client capability `inlayHint.resolveSupport` clients might resolve - this property late using the resolve request. - """ + this property late using the resolve request.""" location: Optional[Location] = attrs.field(default=None) - """An optional source code location that represents this label part. - + """An optional source code location that represents this + label part. + The editor will use this location for the hover and for code navigation features: This part will become a clickable link that resolves to the definition of the symbol at the given location (not necessarily the location itself), it shows the hover that shows at the given location, and it shows a context menu with further code navigation commands. - + Depending on the client capability `inlayHint.resolveSupport` clients - might resolve this property late using the resolve request. - """ + might resolve this property late using the resolve request.""" command: Optional[Command] = attrs.field(default=None) """An optional command for this label part. - + Depending on the client capability `inlayHint.resolveSupport` clients - might resolve this property late using the resolve request. - """ + might resolve this property late using the resolve request.""" @attrs.define @@ -5908,18 +5499,17 @@ class MarkupContent: remove HTML from the markdown to avoid script execution.""" kind: MarkupKind = attrs.field() - """The type of the Markup.""" + """The type of the Markup""" value: str = attrs.field(validator=attrs.validators.instance_of(str)) - """The content itself.""" + """The content itself""" @attrs.define class FullDocumentDiagnosticReport: """A diagnostic report with a full set of problems. - @since 3.17.0 - """ + @since 3.17.0""" # Since: 3.17.0 @@ -5933,18 +5523,16 @@ class FullDocumentDiagnosticReport: validator=attrs.validators.optional(attrs.validators.instance_of(str)), default=None, ) - """An optional result id. - - If provided it will be sent on the next diagnostic request for the same document. - """ + """An optional result id. If provided it will + be sent on the next diagnostic request for the + same document.""" @attrs.define class RelatedFullDocumentDiagnosticReport: """A full diagnostic report with a set of related documents. - @since 3.17.0 - """ + @since 3.17.0""" # Since: 3.17.0 @@ -5957,13 +5545,13 @@ class RelatedFullDocumentDiagnosticReport: Union[FullDocumentDiagnosticReport, "UnchangedDocumentDiagnosticReport"], ] ] = attrs.field(default=None) - """Diagnostics of related documents. This information is useful in programming - languages where code in a file A can generate diagnostics in a file B which A - depends on. An example of such a language is C/C++ where marco definitions in a file + """Diagnostics of related documents. This information is useful + in programming languages where code in a file A can generate + diagnostics in a file B which A depends on. An example of + such a language is C/C++ where marco definitions in a file a.cpp and result in errors in a header file b.hpp. - - @since 3.17.0 - """ + + @since 3.17.0""" # Since: 3.17.0 kind: str = attrs.field(validator=attrs.validators.in_(["full"]), default="full") @@ -5973,85 +5561,79 @@ class RelatedFullDocumentDiagnosticReport: validator=attrs.validators.optional(attrs.validators.instance_of(str)), default=None, ) - """An optional result id. - - If provided it will be sent on the next diagnostic request for the same document. - """ + """An optional result id. If provided it will + be sent on the next diagnostic request for the + same document.""" @attrs.define class UnchangedDocumentDiagnosticReport: - """A diagnostic report indicating that the last returned report is still accurate. + """A diagnostic report indicating that the last returned + report is still accurate. - @since 3.17.0 - """ + @since 3.17.0""" # Since: 3.17.0 result_id: str = attrs.field(validator=attrs.validators.instance_of(str)) - """A result id which will be sent on the next diagnostic request for the same - document.""" + """A result id which will be sent on the next + diagnostic request for the same document.""" kind: str = attrs.field( validator=attrs.validators.in_(["unchanged"]), default="unchanged" ) - """A document diagnostic report indicating no changes to the last result. - - A server can + """A document diagnostic report indicating + no changes to the last result. A server can only return `unchanged` if result ids are - provided. - """ + provided.""" @attrs.define class RelatedUnchangedDocumentDiagnosticReport: """An unchanged diagnostic report with a set of related documents. - @since 3.17.0 - """ + @since 3.17.0""" # Since: 3.17.0 result_id: str = attrs.field(validator=attrs.validators.instance_of(str)) - """A result id which will be sent on the next diagnostic request for the same - document.""" + """A result id which will be sent on the next + diagnostic request for the same document.""" related_documents: Optional[ Dict[ str, Union[FullDocumentDiagnosticReport, UnchangedDocumentDiagnosticReport] ] ] = attrs.field(default=None) - """Diagnostics of related documents. This information is useful in programming - languages where code in a file A can generate diagnostics in a file B which A - depends on. An example of such a language is C/C++ where marco definitions in a file + """Diagnostics of related documents. This information is useful + in programming languages where code in a file A can generate + diagnostics in a file B which A depends on. An example of + such a language is C/C++ where marco definitions in a file a.cpp and result in errors in a header file b.hpp. - - @since 3.17.0 - """ + + @since 3.17.0""" # Since: 3.17.0 kind: str = attrs.field( validator=attrs.validators.in_(["unchanged"]), default="unchanged" ) - """A document diagnostic report indicating no changes to the last result. - - A server can + """A document diagnostic report indicating + no changes to the last result. A server can only return `unchanged` if result ids are - provided. - """ + provided.""" @attrs.define class PreviousResultId: """A previous result id in a workspace pull request. - @since 3.17.0 - """ + @since 3.17.0""" # Since: 3.17.0 uri: str = attrs.field(validator=attrs.validators.instance_of(str)) - """The URI for which the client knowns a result id.""" + """The URI for which the client knowns a + result id.""" value: str = attrs.field(validator=attrs.validators.instance_of(str)) """The value of the previous result id.""" @@ -6061,8 +5643,7 @@ class PreviousResultId: class NotebookDocument: """A notebook document. - @since 3.17.0 - """ + @since 3.17.0""" # Since: 3.17.0 @@ -6073,22 +5654,23 @@ class NotebookDocument: """The type of the notebook.""" version: int = attrs.field(validator=validators.integer_validator) - """The version number of this document (it will increase after each change, - including undo/redo).""" + """The version number of this document (it will increase after each + change, including undo/redo).""" cells: List["NotebookCell"] = attrs.field() """The cells of a notebook.""" metadata: Optional[LSPObject] = attrs.field(default=None) - """Additional metadata stored with the notebook document. - - Note: should always be an object literal (e.g. LSPObject) - """ + """Additional metadata stored with the notebook + document. + + Note: should always be an object literal (e.g. LSPObject)""" @attrs.define class TextDocumentItem: - """An item to transfer a text document from the client to the server.""" + """An item to transfer a text document from the client to the + server.""" uri: str = attrs.field(validator=attrs.validators.instance_of(str)) """The text document's uri.""" @@ -6097,8 +5679,8 @@ class TextDocumentItem: """The text document's language identifier.""" version: int = attrs.field(validator=validators.integer_validator) - """The version number of this document (it will increase after each change, - including undo/redo).""" + """The version number of this document (it will increase after each + change, including undo/redo).""" text: str = attrs.field(validator=attrs.validators.instance_of(str)) """The content of the opened text document.""" @@ -6108,8 +5690,7 @@ class TextDocumentItem: class VersionedNotebookDocumentIdentifier: """A versioned notebook document identifier. - @since 3.17.0 - """ + @since 3.17.0""" # Since: 3.17.0 @@ -6144,11 +5725,12 @@ class NotebookDocumentChangeEventCellsType: structure: Optional[ "NotebookDocumentChangeEventCellsTypeStructureType" ] = attrs.field(default=None) - """Changes to the cell structure to add or remove cells.""" + """Changes to the cell structure to add or + remove cells.""" data: Optional[List["NotebookCell"]] = attrs.field(default=None) - """Changes to notebook cells properties like its kind, execution summary or - metadata.""" + """Changes to notebook cells properties like its + kind, execution summary or metadata.""" text_content: Optional[ List["NotebookDocumentChangeEventCellsTypeTextContentType"] @@ -6160,27 +5742,24 @@ class NotebookDocumentChangeEventCellsType: class NotebookDocumentChangeEvent: """A change event for a notebook document. - @since 3.17.0 - """ + @since 3.17.0""" # Since: 3.17.0 metadata: Optional[LSPObject] = attrs.field(default=None) """The changed meta data if any. - - Note: should always be an object literal (e.g. LSPObject) - """ + + Note: should always be an object literal (e.g. LSPObject)""" cells: Optional["NotebookDocumentChangeEventCellsType"] = attrs.field(default=None) - """Changes to cells.""" + """Changes to cells""" @attrs.define class NotebookDocumentIdentifier: """A literal to identify a notebook document in the client. - @since 3.17.0 - """ + @since 3.17.0""" # Since: 3.17.0 @@ -6190,12 +5769,10 @@ class NotebookDocumentIdentifier: @attrs.define class InlineCompletionContext: - """Provides information about the context in which an inline completion was - requested. + """Provides information about the context in which an inline completion was requested. @since 3.18.0 - @proposed - """ + @proposed""" # Since: 3.18.0 # Proposed @@ -6206,14 +5783,13 @@ class InlineCompletionContext: selected_completion_info: Optional["SelectedCompletionInfo"] = attrs.field( default=None ) - """Provides information about the currently selected item in the autocomplete widget - if it is visible.""" + """Provides information about the currently selected item in the autocomplete widget if it is visible.""" @attrs.define class StringValue: - """A string value used as a snippet is a template which allows to insert text and to - control the editor cursor when insertion happens. + """A string value used as a snippet is a template which allows to insert text + and to control the editor cursor when insertion happens. A snippet can define tab stops and placeholders with `$1`, `$2` and `${3:foo}`. `$0` defines the final tab stop, it defaults to @@ -6221,8 +5797,7 @@ class StringValue: `${name:default value}`. @since 3.18.0 - @proposed - """ + @proposed""" # Since: 3.18.0 # Proposed @@ -6241,10 +5816,8 @@ class Registration: """General parameters to register for a notification or to register a provider.""" id: str = attrs.field(validator=attrs.validators.instance_of(str)) - """The id used to register the request. - - The id can be used to deregister the request again. - """ + """The id used to register the request. The id can be used to deregister + the request again.""" method: str = attrs.field(validator=attrs.validators.instance_of(str)) """The method / capability to register for.""" @@ -6258,10 +5831,8 @@ class Unregistration: """General parameters to unregister a request or notification.""" id: str = attrs.field(validator=attrs.validators.instance_of(str)) - """The id used to unregister the request or notification. - - Usually an id provided during the register request. - """ + """The id used to unregister the request or notification. Usually an id + provided during the register request.""" method: str = attrs.field(validator=attrs.validators.instance_of(str)) """The method to unregister for.""" @@ -6273,22 +5844,21 @@ class ServerCapabilitiesWorkspaceType: default=None ) """The server supports workspace folder. - - @since 3.6.0 - """ + + @since 3.6.0""" # Since: 3.6.0 file_operations: Optional["FileOperationOptions"] = attrs.field(default=None) """The server is interested in notifications/requests for operations on files. - - @since 3.16.0 - """ + + @since 3.16.0""" # Since: 3.16.0 @attrs.define class ServerCapabilities: - """Defines the capabilities provided by a language server.""" + """Defines the capabilities provided by a language + server.""" position_encoding: Optional[Union[PositionEncodingKind, str]] = attrs.field( default=None @@ -6307,19 +5877,16 @@ class ServerCapabilities: text_document_sync: Optional[ Union["TextDocumentSyncOptions", TextDocumentSyncKind] ] = attrs.field(default=None) - """Defines how text documents are synced. - - Is either a detailed structure defining each notification or for backwards - compatibility the TextDocumentSyncKind number. - """ + """Defines how text documents are synced. Is either a detailed structure + defining each notification or for backwards compatibility the + TextDocumentSyncKind number.""" notebook_document_sync: Optional[ Union["NotebookDocumentSyncOptions", "NotebookDocumentSyncRegistrationOptions"] ] = attrs.field(default=None) """Defines how notebook documents are synced. - - @since 3.17.0 - """ + + @since 3.17.0""" # Since: 3.17.0 completion_provider: Optional[CompletionOptions] = attrs.field(default=None) @@ -6369,12 +5936,9 @@ class ServerCapabilities: code_action_provider: Optional[Union[bool, CodeActionOptions]] = attrs.field( default=None ) - """The server provides code actions. - - CodeActionOptions may only be + """The server provides code actions. CodeActionOptions may only be specified if the client states that it supports - `codeActionLiteralSupport` in its initial `initialize` request. - """ + `codeActionLiteralSupport` in its initial `initialize` request.""" code_lens_provider: Optional[CodeLensOptions] = attrs.field(default=None) """The server provides code lens.""" @@ -6408,12 +5972,9 @@ class ServerCapabilities: """The server provides document formatting on typing.""" rename_provider: Optional[Union[bool, RenameOptions]] = attrs.field(default=None) - """The server provides rename support. - - RenameOptions may only be + """The server provides rename support. RenameOptions may only be specified if the client states that it supports - `prepareSupport` in its initial `initialize` request. - """ + `prepareSupport` in its initial `initialize` request.""" folding_range_provider: Optional[ Union[bool, FoldingRangeOptions, FoldingRangeRegistrationOptions] @@ -6434,82 +5995,73 @@ class ServerCapabilities: Union[bool, CallHierarchyOptions, CallHierarchyRegistrationOptions] ] = attrs.field(default=None) """The server provides call hierarchy support. - - @since 3.16.0 - """ + + @since 3.16.0""" # Since: 3.16.0 linked_editing_range_provider: Optional[ Union[bool, LinkedEditingRangeOptions, LinkedEditingRangeRegistrationOptions] ] = attrs.field(default=None) """The server provides linked editing range support. - - @since 3.16.0 - """ + + @since 3.16.0""" # Since: 3.16.0 semantic_tokens_provider: Optional[ Union[SemanticTokensOptions, SemanticTokensRegistrationOptions] ] = attrs.field(default=None) """The server provides semantic tokens support. - - @since 3.16.0 - """ + + @since 3.16.0""" # Since: 3.16.0 moniker_provider: Optional[ Union[bool, MonikerOptions, MonikerRegistrationOptions] ] = attrs.field(default=None) """The server provides moniker support. - - @since 3.16.0 - """ + + @since 3.16.0""" # Since: 3.16.0 type_hierarchy_provider: Optional[ Union[bool, TypeHierarchyOptions, TypeHierarchyRegistrationOptions] ] = attrs.field(default=None) """The server provides type hierarchy support. - - @since 3.17.0 - """ + + @since 3.17.0""" # Since: 3.17.0 inline_value_provider: Optional[ Union[bool, InlineValueOptions, InlineValueRegistrationOptions] ] = attrs.field(default=None) """The server provides inline values. - - @since 3.17.0 - """ + + @since 3.17.0""" # Since: 3.17.0 inlay_hint_provider: Optional[ Union[bool, InlayHintOptions, InlayHintRegistrationOptions] ] = attrs.field(default=None) """The server provides inlay hints. - - @since 3.17.0 - """ + + @since 3.17.0""" # Since: 3.17.0 diagnostic_provider: Optional[ Union[DiagnosticOptions, DiagnosticRegistrationOptions] ] = attrs.field(default=None) """The server has support for pull model diagnostics. - - @since 3.17.0 - """ + + @since 3.17.0""" # Since: 3.17.0 inline_completion_provider: Optional[ Union[bool, InlineCompletionOptions] ] = attrs.field(default=None) """Inline completion options used during static registration. - + @since 3.18.0 - @proposed - """ + @proposed""" # Since: 3.18.0 # Proposed @@ -6546,89 +6098,72 @@ class FileEvent: class FileSystemWatcher: glob_pattern: GlobPattern = attrs.field() """The glob pattern to watch. See {@link GlobPattern glob pattern} for more detail. - - @since 3.17.0 support for relative patterns. - """ + + @since 3.17.0 support for relative patterns.""" # Since: 3.17.0 support for relative patterns. kind: Optional[Union[WatchKind, int]] = attrs.field(default=None) - """The kind of events of interest. - - If omitted it defaults to WatchKind.Create | WatchKind.Change | WatchKind.Delete - which is 7. - """ + """The kind of events of interest. If omitted it defaults + to WatchKind.Create | WatchKind.Change | WatchKind.Delete + which is 7.""" @attrs.define class Diagnostic: - """Represents a diagnostic, such as a compiler error or warning. - - Diagnostic objects are only valid in the scope of a resource. - """ + """Represents a diagnostic, such as a compiler error or warning. Diagnostic objects + are only valid in the scope of a resource.""" range: Range = attrs.field() - """The range at which the message applies.""" + """The range at which the message applies""" message: str = attrs.field(validator=attrs.validators.instance_of(str)) - """The diagnostic's message. - - It usually appears in the user interface - """ + """The diagnostic's message. It usually appears in the user interface""" severity: Optional[DiagnosticSeverity] = attrs.field(default=None) - """The diagnostic's severity. - - Can be omitted. If omitted it is up to the client to interpret diagnostics as error, - warning, info or hint. - """ + """The diagnostic's severity. Can be omitted. If omitted it is up to the + client to interpret diagnostics as error, warning, info or hint.""" code: Optional[Union[int, str]] = attrs.field(default=None) """The diagnostic's code, which usually appear in the user interface.""" code_description: Optional["CodeDescription"] = attrs.field(default=None) - """An optional property to describe the error code. Requires the code field (above) - to be present/not null. - - @since 3.16.0 - """ + """An optional property to describe the error code. + Requires the code field (above) to be present/not null. + + @since 3.16.0""" # Since: 3.16.0 source: Optional[str] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(str)), default=None, ) - """A human-readable string describing the source of this diagnostic, e.g. - 'typescript' or 'super lint'. - - It usually appears in the user interface. - """ + """A human-readable string describing the source of this + diagnostic, e.g. 'typescript' or 'super lint'. It usually + appears in the user interface.""" tags: Optional[List[DiagnosticTag]] = attrs.field(default=None) """Additional metadata about the diagnostic. - - @since 3.15.0 - """ + + @since 3.15.0""" # Since: 3.15.0 related_information: Optional[List["DiagnosticRelatedInformation"]] = attrs.field( default=None ) - """An array of related diagnostic information, e.g. when symbol-names within a scope - collide all definitions can be marked via this property.""" + """An array of related diagnostic information, e.g. when symbol-names within + a scope collide all definitions can be marked via this property.""" data: Optional[LSPAny] = attrs.field(default=None) """A data entry field that is preserved between a `textDocument/publishDiagnostics` notification and `textDocument/codeAction` request. - - @since 3.16.0 - """ + + @since 3.16.0""" # Since: 3.16.0 @attrs.define class CompletionContext: - """Contains additional information about the context in which a completion request - is triggered.""" + """Contains additional information about the context in which a completion request is triggered.""" trigger_kind: CompletionTriggerKind = attrs.field() """How the completion was triggered.""" @@ -6638,17 +6173,14 @@ class CompletionContext: default=None, ) """The trigger character (a single character) that has trigger code complete. - - Is undefined if `triggerKind !== CompletionTriggerKind.TriggerCharacter` - """ + Is undefined if `triggerKind !== CompletionTriggerKind.TriggerCharacter`""" @attrs.define class CompletionItemLabelDetails: """Additional details for a completion item label. - @since 3.17.0 - """ + @since 3.17.0""" # Since: 3.17.0 @@ -6656,29 +6188,22 @@ class CompletionItemLabelDetails: validator=attrs.validators.optional(attrs.validators.instance_of(str)), default=None, ) - """An optional string which is rendered less prominently directly after {@link - CompletionItem.label label}, without any spacing. - - Should be used for function signatures and type annotations. - """ + """An optional string which is rendered less prominently directly after {@link CompletionItem.label label}, + without any spacing. Should be used for function signatures and type annotations.""" description: Optional[str] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(str)), default=None, ) - """An optional string which is rendered less prominently after {@link - CompletionItem.detail}. - - Should be used for fully qualified names and file paths. - """ + """An optional string which is rendered less prominently after {@link CompletionItem.detail}. Should be used + for fully qualified names and file paths.""" @attrs.define class InsertReplaceEdit: """A special text edit to provide an insert and a replace operation. - @since 3.16.0 - """ + @since 3.16.0""" # Since: 3.16.0 @@ -6686,7 +6211,7 @@ class InsertReplaceEdit: """The string to be inserted.""" insert: Range = attrs.field() - """The range if the insert is requested.""" + """The range if the insert is requested""" replace: Range = attrs.field() """The range if the replace is requested.""" @@ -6694,11 +6219,9 @@ class InsertReplaceEdit: @attrs.define class SignatureHelpContext: - """Additional information about the context in which a signature help request was - triggered. + """Additional information about the context in which a signature help request was triggered. - @since 3.15.0 - """ + @since 3.15.0""" # Since: 3.15.0 @@ -6716,9 +6239,8 @@ class SignatureHelpContext: default=None, ) """Character that caused signature help to be triggered. - - This is undefined when `triggerKind !== SignatureHelpTriggerKind.TriggerCharacter` - """ + + This is undefined when `triggerKind !== SignatureHelpTriggerKind.TriggerCharacter`""" active_signature_help: Optional[SignatureHelp] = attrs.field(default=None) """The currently active `SignatureHelp`. @@ -6729,23 +6251,17 @@ class SignatureHelpContext: @attrs.define class SignatureInformation: - """Represents the signature of something callable. - - A signature can have a label, like a function-name, a doc-comment, and a set of - parameters. - """ + """Represents the signature of something callable. A signature + can have a label, like a function-name, a doc-comment, and + a set of parameters.""" label: str = attrs.field(validator=attrs.validators.instance_of(str)) - """The label of this signature. - - Will be shown in the UI. - """ + """The label of this signature. Will be shown in + the UI.""" documentation: Optional[Union[str, MarkupContent]] = attrs.field(default=None) - """The human-readable doc-comment of this signature. - - Will be shown in the UI but can be omitted. - """ + """The human-readable doc-comment of this signature. Will be shown + in the UI but can be omitted.""" parameters: Optional[List["ParameterInformation"]] = attrs.field(default=None) """The parameters of this signature.""" @@ -6754,17 +6270,17 @@ class SignatureInformation: validator=attrs.validators.optional(validators.uinteger_validator), default=None ) """The index of the active parameter. - + If provided, this is used in place of `SignatureHelp.activeParameter`. - - @since 3.16.0 - """ + + @since 3.16.0""" # Since: 3.16.0 @attrs.define class ReferenceContext: - """Value-object that contains additional information when requesting references.""" + """Value-object that contains additional information when + requesting references.""" include_declaration: bool = attrs.field( validator=attrs.validators.instance_of(bool) @@ -6774,31 +6290,26 @@ class ReferenceContext: @attrs.define class CodeActionContext: - """Contains additional diagnostic information about the context in which a {@link - CodeActionProvider.provideCodeActions code action} is run.""" + """Contains additional diagnostic information about the context in which + a {@link CodeActionProvider.provideCodeActions code action} is run.""" diagnostics: List[Diagnostic] = attrs.field() - """An array of diagnostics known on the client side overlapping the range provided - to the `textDocument/codeAction` request. - - They are provided so that the server knows which errors are currently presented to - the user for the given range. There is no guarantee that these accurately reflect - the error state of the resource. The primary parameter to compute code actions is - the provided range. - """ + """An array of diagnostics known on the client side overlapping the range provided to the + `textDocument/codeAction` request. They are provided so that the server knows which + errors are currently presented to the user for the given range. There is no guarantee + that these accurately reflect the error state of the resource. The primary parameter + to compute code actions is the provided range.""" only: Optional[List[Union[CodeActionKind, str]]] = attrs.field(default=None) """Requested kind of actions to return. - - Actions not of this kind are filtered out by the client before being shown. So - servers can omit computing them. - """ + + Actions not of this kind are filtered out by the client before being shown. So servers + can omit computing them.""" trigger_kind: Optional[CodeActionTriggerKind] = attrs.field(default=None) """The reason why code actions were requested. - - @since 3.17.0 - """ + + @since 3.17.0""" # Since: 3.17.0 @@ -6817,9 +6328,8 @@ class FormattingOptions: default=None, ) """Trim trailing whitespace on a line. - - @since 3.15.0 - """ + + @since 3.15.0""" # Since: 3.15.0 insert_final_newline: Optional[bool] = attrs.field( @@ -6827,9 +6337,8 @@ class FormattingOptions: default=None, ) """Insert a newline character at the end of the file if one does not exist. - - @since 3.15.0 - """ + + @since 3.15.0""" # Since: 3.15.0 trim_final_newlines: Optional[bool] = attrs.field( @@ -6837,9 +6346,8 @@ class FormattingOptions: default=None, ) """Trim all newlines after the final newline at the end of the file. - - @since 3.15.0 - """ + + @since 3.15.0""" # Since: 3.15.0 @@ -6858,46 +6366,37 @@ class SemanticTokensLegend: @attrs.define class OptionalVersionedTextDocumentIdentifier: - """A text document identifier to optionally denote a specific version of a text - document.""" + """A text document identifier to optionally denote a specific version of a text document.""" uri: str = attrs.field(validator=attrs.validators.instance_of(str)) """The text document's uri.""" version: Optional[Union[int, None]] = attrs.field(default=None) - """The version number of this document. - - If a versioned text document identifier + """The version number of this document. If a versioned text document identifier is sent from the server to the client and the file is not open in the editor (the server has not received an open notification before) the server can send `null` to indicate that the version is unknown and the content on disk is the - truth (as specified with document content ownership). - """ + truth (as specified with document content ownership).""" @attrs.define class AnnotatedTextEdit: """A special text edit with an additional change annotation. - @since 3.16.0. - """ + @since 3.16.0.""" # Since: 3.16.0. annotation_id: ChangeAnnotationIdentifier = attrs.field() - """The actual identifier of the change annotation.""" + """The actual identifier of the change annotation""" range: Range = attrs.field() - """The range of the text document to be manipulated. - - To insert text into a document create a range where start === end. - """ + """The range of the text document to be manipulated. To insert + text into a document create a range where start === end.""" new_text: str = attrs.field(validator=attrs.validators.instance_of(str)) - """The string to be inserted. - - For delete operations use an empty string. - """ + """The string to be inserted. For delete operations use an + empty string.""" @attrs.define @@ -6908,10 +6407,7 @@ class CreateFileOptions: validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """Overwrite existing file. - - Overwrite wins over `ignoreIfExists` - """ + """Overwrite existing file. Overwrite wins over `ignoreIfExists`""" ignore_if_exists: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), @@ -6922,16 +6418,13 @@ class CreateFileOptions: @attrs.define class RenameFileOptions: - """Rename file options.""" + """Rename file options""" overwrite: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """Overwrite target if existing. - - Overwrite wins over `ignoreIfExists` - """ + """Overwrite target if existing. Overwrite wins over `ignoreIfExists`""" ignore_if_exists: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), @@ -6942,7 +6435,7 @@ class RenameFileOptions: @attrs.define class DeleteFileOptions: - """Delete file options.""" + """Delete file options""" recursive: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), @@ -6959,30 +6452,26 @@ class DeleteFileOptions: @attrs.define class FileOperationPattern: - """A pattern to describe in which file operation requests or notifications the - server is interested in receiving. + """A pattern to describe in which file operation requests or notifications + the server is interested in receiving. - @since 3.16.0 - """ + @since 3.16.0""" # Since: 3.16.0 glob: str = attrs.field(validator=attrs.validators.instance_of(str)) """The glob pattern to match. Glob patterns can have the following syntax: - - `*` to match one or more characters in a path segment - `?` to match on one character in a path segment - `**` to match any number of path segments, including none - `{}` to group sub patterns into an OR expression. (e.g. `**/*.{ts,js}` matches all TypeScript and JavaScript files) - `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …) - - `[!...]` 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`) - """ + - `[!...]` 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`)""" matches: Optional[FileOperationPatternKind] = attrs.field(default=None) """Whether to match files or folders with this pattern. - - Matches both if undefined. - """ + + Matches both if undefined.""" options: Optional["FileOperationPatternOptions"] = attrs.field(default=None) """Additional options used during matching.""" @@ -6992,8 +6481,7 @@ class FileOperationPattern: class WorkspaceFullDocumentDiagnosticReport: """A full document diagnostic report for a workspace diagnostic result. - @since 3.17.0 - """ + @since 3.17.0""" # Since: 3.17.0 @@ -7005,9 +6493,7 @@ class WorkspaceFullDocumentDiagnosticReport: version: Optional[Union[int, None]] = attrs.field(default=None) """The version number for which the diagnostics are reported. - - If the document is not marked as open `null` can be provided. - """ + If the document is not marked as open `null` can be provided.""" kind: str = attrs.field(validator=attrs.validators.in_(["full"]), default="full") """A full document diagnostic report.""" @@ -7016,18 +6502,16 @@ class WorkspaceFullDocumentDiagnosticReport: validator=attrs.validators.optional(attrs.validators.instance_of(str)), default=None, ) - """An optional result id. - - If provided it will be sent on the next diagnostic request for the same document. - """ + """An optional result id. If provided it will + be sent on the next diagnostic request for the + same document.""" @attrs.define class WorkspaceUnchangedDocumentDiagnosticReport: """An unchanged document diagnostic report for a workspace diagnostic result. - @since 3.17.0 - """ + @since 3.17.0""" # Since: 3.17.0 @@ -7035,24 +6519,20 @@ class WorkspaceUnchangedDocumentDiagnosticReport: """The URI for which diagnostic information is reported.""" result_id: str = attrs.field(validator=attrs.validators.instance_of(str)) - """A result id which will be sent on the next diagnostic request for the same - document.""" + """A result id which will be sent on the next + diagnostic request for the same document.""" version: Optional[Union[int, None]] = attrs.field(default=None) """The version number for which the diagnostics are reported. - - If the document is not marked as open `null` can be provided. - """ + If the document is not marked as open `null` can be provided.""" kind: str = attrs.field( validator=attrs.validators.in_(["unchanged"]), default="unchanged" ) - """A document diagnostic report indicating no changes to the last result. - - A server can + """A document diagnostic report indicating + no changes to the last result. A server can only return `unchanged` if result ids are - provided. - """ + provided.""" @attrs.define @@ -7063,25 +6543,25 @@ class NotebookCell: cells and can therefore be used to uniquely identify a notebook cell or the cell's text document. - @since 3.17.0 - """ + @since 3.17.0""" # Since: 3.17.0 kind: NotebookCellKind = attrs.field() - """The cell's kind.""" + """The cell's kind""" document: str = attrs.field(validator=attrs.validators.instance_of(str)) - """The URI of the cell's text document content.""" + """The URI of the cell's text document + content.""" metadata: Optional[LSPObject] = attrs.field(default=None) """Additional metadata stored with the cell. - - Note: should always be an object literal (e.g. LSPObject) - """ + + Note: should always be an object literal (e.g. LSPObject)""" execution_summary: Optional["ExecutionSummary"] = attrs.field(default=None) - """Additional execution summary information if supported by the client.""" + """Additional execution summary information + if supported by the client.""" @attrs.define @@ -7097,10 +6577,10 @@ class NotebookCellArrayChange: """The start oftest of the cell that changed.""" delete_count: int = attrs.field(validator=validators.uinteger_validator) - """The deleted cells.""" + """The deleted cells""" cells: Optional[List[NotebookCell]] = attrs.field(default=None) - """The new cells, if any.""" + """The new cells, if any""" @attrs.define @@ -7108,8 +6588,7 @@ class SelectedCompletionInfo: """Describes the currently selected completion item. @since 3.18.0 - @proposed - """ + @proposed""" # Since: 3.18.0 # Proposed @@ -7137,9 +6616,8 @@ class ClientCapabilities: default=None ) """Capabilities specific to the notebook document support. - - @since 3.17.0 - """ + + @since 3.17.0""" # Since: 3.17.0 window: Optional["WindowClientCapabilities"] = attrs.field(default=None) @@ -7147,9 +6625,8 @@ class ClientCapabilities: general: Optional["GeneralClientCapabilities"] = attrs.field(default=None) """General client capabilities. - - @since 3.16.0 - """ + + @since 3.16.0""" # Since: 3.16.0 experimental: Optional[LSPAny] = attrs.field(default=None) @@ -7162,42 +6639,30 @@ class TextDocumentSyncOptions: validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """Open and close notifications are sent to the server. - - If omitted open close notification should not be sent. - """ + """Open and close notifications are sent to the server. If omitted open close notification should not + be sent.""" change: Optional[TextDocumentSyncKind] = attrs.field(default=None) - """Change notifications are sent to the server. - - See TextDocumentSyncKind.None, TextDocumentSyncKind.Full and - TextDocumentSyncKind.Incremental. If omitted it defaults to - TextDocumentSyncKind.None. - """ + """Change notifications are sent to the server. See TextDocumentSyncKind.None, TextDocumentSyncKind.Full + and TextDocumentSyncKind.Incremental. If omitted it defaults to TextDocumentSyncKind.None.""" will_save: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """If present will save notifications are sent to the server. - - If omitted the notification should not be sent. - """ + """If present will save notifications are sent to the server. If omitted the notification should not be + sent.""" will_save_wait_until: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """If present will save wait until requests are sent to the server. - - If omitted the request should not be sent. - """ + """If present will save wait until requests are sent to the server. If omitted the request should not be + sent.""" save: Optional[Union[bool, SaveOptions]] = attrs.field(default=None) - """If present save notifications are sent to the server. - - If omitted the notification should not be sent. - """ + """If present save notifications are sent to the server. If omitted the notification should not be + sent.""" @attrs.define @@ -7208,11 +6673,9 @@ class NotebookDocumentSyncOptionsNotebookSelectorType1CellsType: @attrs.define class NotebookDocumentSyncOptionsNotebookSelectorType1: notebook: Union[str, NotebookDocumentFilter] = attrs.field() - """The notebook to be synced If a string value is provided it matches against the - notebook type. - - '*' matches every notebook. - """ + """The notebook to be synced If a string + value is provided it matches against the + notebook type. '*' matches every notebook.""" cells: Optional[ List["NotebookDocumentSyncOptionsNotebookSelectorType1CellsType"] @@ -7233,16 +6696,15 @@ class NotebookDocumentSyncOptionsNotebookSelectorType2: """The cells of the matching notebook to be synced.""" notebook: Optional[Union[str, NotebookDocumentFilter]] = attrs.field(default=None) - """The notebook to be synced If a string value is provided it matches against the - notebook type. - - '*' matches every notebook. - """ + """The notebook to be synced If a string + value is provided it matches against the + notebook type. '*' matches every notebook.""" @attrs.define class NotebookDocumentSyncOptions: - """Options specific to a notebook plus its cells to be synced to the server. + """Options specific to a notebook plus its cells + to be synced to the server. If a selector provides a notebook document filter but no cell selector all cells of a @@ -7253,8 +6715,7 @@ class NotebookDocumentSyncOptions: document that contain at least one matching cell will be synced. - @since 3.17.0 - """ + @since 3.17.0""" # Since: 3.17.0 @@ -7264,16 +6725,14 @@ class NotebookDocumentSyncOptions: "NotebookDocumentSyncOptionsNotebookSelectorType2", ] ] = attrs.field() - """The notebooks to be synced.""" + """The notebooks to be synced""" save: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """Whether save notification should be forwarded to the server. - - Will only be honored if mode === `notebook`. - """ + """Whether save notification should be forwarded to + the server. Will only be honored if mode === `notebook`.""" @attrs.define @@ -7284,11 +6743,9 @@ class NotebookDocumentSyncRegistrationOptionsNotebookSelectorType1CellsType: @attrs.define class NotebookDocumentSyncRegistrationOptionsNotebookSelectorType1: notebook: Union[str, NotebookDocumentFilter] = attrs.field() - """The notebook to be synced If a string value is provided it matches against the - notebook type. - - '*' matches every notebook. - """ + """The notebook to be synced If a string + value is provided it matches against the + notebook type. '*' matches every notebook.""" cells: Optional[ List["NotebookDocumentSyncRegistrationOptionsNotebookSelectorType1CellsType"] @@ -7309,19 +6766,16 @@ class NotebookDocumentSyncRegistrationOptionsNotebookSelectorType2: """The cells of the matching notebook to be synced.""" notebook: Optional[Union[str, NotebookDocumentFilter]] = attrs.field(default=None) - """The notebook to be synced If a string value is provided it matches against the - notebook type. - - '*' matches every notebook. - """ + """The notebook to be synced If a string + value is provided it matches against the + notebook type. '*' matches every notebook.""" @attrs.define class NotebookDocumentSyncRegistrationOptions: """Registration options specific to a notebook. - @since 3.17.0 - """ + @since 3.17.0""" # Since: 3.17.0 @@ -7331,25 +6785,21 @@ class NotebookDocumentSyncRegistrationOptions: "NotebookDocumentSyncRegistrationOptionsNotebookSelectorType2", ] ] = attrs.field() - """The notebooks to be synced.""" + """The notebooks to be synced""" save: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """Whether save notification should be forwarded to the server. - - Will only be honored if mode === `notebook`. - """ + """Whether save notification should be forwarded to + the server. Will only be honored if mode === `notebook`.""" id: Optional[str] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(str)), default=None, ) - """The id used to register the request. - - The id can be used to deregister the request again. See also Registration#id. - """ + """The id used to register the request. The id can be used to deregister + the request again. See also Registration#id.""" @attrs.define @@ -7358,23 +6808,23 @@ class WorkspaceFoldersServerCapabilities: validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """The server has support for workspace folders.""" + """The server has support for workspace folders""" change_notifications: Optional[Union[str, bool]] = attrs.field(default=None) - """Whether the server wants to receive workspace folder change notifications. - - If a string is provided the string is treated as an ID under which the notification - is registered on the client side. The ID can be used to unregister for these events - using the `client/unregisterCapability` request. - """ + """Whether the server wants to receive workspace folder + change notifications. + + If a string is provided the string is treated as an ID + under which the notification is registered on the client + side. The ID can be used to unregister for these events + using the `client/unregisterCapability` request.""" @attrs.define class FileOperationOptions: """Options for notifications/requests for user operations on files. - @since 3.16.0 - """ + @since 3.16.0""" # Since: 3.16.0 @@ -7401,8 +6851,7 @@ class FileOperationOptions: class CodeDescription: """Structure to capture a description for an error code. - @since 3.16.0 - """ + @since 3.16.0""" # Since: 3.16.0 @@ -7412,11 +6861,9 @@ class CodeDescription: @attrs.define class DiagnosticRelatedInformation: - """Represents a related message and source code location for a diagnostic. - - This should be used to point to code locations that cause or related to a - diagnostics, e.g when duplicating a symbol in a scope. - """ + """Represents a related message and source code location for a diagnostic. This should be + used to point to code locations that cause or related to a diagnostics, e.g when duplicating + a symbol in a scope.""" location: Location = attrs.field() """The location of this related diagnostic information.""" @@ -7427,45 +6874,38 @@ class DiagnosticRelatedInformation: @attrs.define class ParameterInformation: - """Represents a parameter of a callable-signature. - - A parameter can have a label and a doc-comment. - """ + """Represents a parameter of a callable-signature. A parameter can + have a label and a doc-comment.""" label: Union[str, Tuple[int, int]] = attrs.field() """The label of this parameter information. - + Either a string or an inclusive start and exclusive end offsets within its containing signature label. (see SignatureInformation.label). The offsets are based on a UTF-16 string representation as `Position` and `Range` does. - + *Note*: a label of type string should be a substring of its containing signature label. - Its intended use case is to highlight the parameter label part in the `SignatureInformation.label`. - """ + Its intended use case is to highlight the parameter label part in the `SignatureInformation.label`.""" documentation: Optional[Union[str, MarkupContent]] = attrs.field(default=None) - """The human-readable doc-comment of this parameter. - - Will be shown in the UI but can be omitted. - """ + """The human-readable doc-comment of this parameter. Will be shown + in the UI but can be omitted.""" @attrs.define class NotebookCellTextDocumentFilter: - """A notebook cell text document filter denotes a cell text document by different - properties. + """A notebook cell text document filter denotes a cell text + document by different properties. - @since 3.17.0 - """ + @since 3.17.0""" # Since: 3.17.0 notebook: Union[str, NotebookDocumentFilter] = attrs.field() - """A filter that matches against the notebook containing the notebook cell. - - If a string value is provided it matches against the notebook type. '*' matches - every notebook. - """ + """A filter that matches against the notebook + containing the notebook cell. If a string + value is provided it matches against the + notebook type. '*' matches every notebook.""" language: Optional[str] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(str)), @@ -7481,8 +6921,7 @@ class NotebookCellTextDocumentFilter: class FileOperationPatternOptions: """Matching options for the file operation pattern. - @since 3.16.0 - """ + @since 3.16.0""" # Since: 3.16.0 @@ -7496,14 +6935,16 @@ class FileOperationPatternOptions: @attrs.define class ExecutionSummary: execution_order: int = attrs.field(validator=validators.uinteger_validator) - """A strict monotonically increasing value indicating the execution order of a cell + """A strict monotonically increasing value + indicating the execution order of a cell inside a notebook.""" success: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """Whether the execution was successful or not if known by the client.""" + """Whether the execution was successful or + not if known by the client.""" @attrs.define @@ -7514,8 +6955,9 @@ class WorkspaceClientCapabilities: validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """The client supports applying batch edits to the workspace by supporting the - request 'workspace/applyEdit'.""" + """The client supports applying batch edits + to the workspace by supporting the request + 'workspace/applyEdit'""" workspace_edit: Optional["WorkspaceEditClientCapabilities"] = attrs.field( default=None @@ -7545,9 +6987,8 @@ class WorkspaceClientCapabilities: default=None, ) """The client has support for workspace folders. - - @since 3.6.0 - """ + + @since 3.6.0""" # Since: 3.6.0 configuration: Optional[bool] = attrs.field( @@ -7555,63 +6996,60 @@ class WorkspaceClientCapabilities: default=None, ) """The client supports `workspace/configuration` requests. - - @since 3.6.0 - """ + + @since 3.6.0""" # Since: 3.6.0 semantic_tokens: Optional[ "SemanticTokensWorkspaceClientCapabilities" ] = attrs.field(default=None) - """Capabilities specific to the semantic token requests scoped to the workspace. - - @since 3.16.0. - """ + """Capabilities specific to the semantic token requests scoped to the + workspace. + + @since 3.16.0.""" # Since: 3.16.0. code_lens: Optional["CodeLensWorkspaceClientCapabilities"] = attrs.field( default=None ) - """Capabilities specific to the code lens requests scoped to the workspace. - - @since 3.16.0. - """ + """Capabilities specific to the code lens requests scoped to the + workspace. + + @since 3.16.0.""" # Since: 3.16.0. file_operations: Optional["FileOperationClientCapabilities"] = attrs.field( default=None ) - """The client has support for file notifications/requests for user operations on - files. - - Since 3.16.0 - """ + """The client has support for file notifications/requests for user operations on files. + + Since 3.16.0""" inline_value: Optional["InlineValueWorkspaceClientCapabilities"] = attrs.field( default=None ) - """Capabilities specific to the inline values requests scoped to the workspace. - - @since 3.17.0. - """ + """Capabilities specific to the inline values requests scoped to the + workspace. + + @since 3.17.0.""" # Since: 3.17.0. inlay_hint: Optional["InlayHintWorkspaceClientCapabilities"] = attrs.field( default=None ) - """Capabilities specific to the inlay hint requests scoped to the workspace. - - @since 3.17.0. - """ + """Capabilities specific to the inlay hint requests scoped to the + workspace. + + @since 3.17.0.""" # Since: 3.17.0. diagnostics: Optional["DiagnosticWorkspaceClientCapabilities"] = attrs.field( default=None ) - """Capabilities specific to the diagnostic requests scoped to the workspace. - - @since 3.17.0. - """ + """Capabilities specific to the diagnostic requests scoped to the + workspace. + + @since 3.17.0.""" # Since: 3.17.0. @@ -7637,9 +7075,8 @@ class TextDocumentClientCapabilities: declaration: Optional["DeclarationClientCapabilities"] = attrs.field(default=None) """Capabilities specific to the `textDocument/declaration` request. - - @since 3.14.0 - """ + + @since 3.14.0""" # Since: 3.14.0 definition: Optional["DefinitionClientCapabilities"] = attrs.field(default=None) @@ -7649,18 +7086,16 @@ class TextDocumentClientCapabilities: default=None ) """Capabilities specific to the `textDocument/typeDefinition` request. - - @since 3.6.0 - """ + + @since 3.6.0""" # Since: 3.6.0 implementation: Optional["ImplementationClientCapabilities"] = attrs.field( default=None ) """Capabilities specific to the `textDocument/implementation` request. - - @since 3.6.0 - """ + + @since 3.6.0""" # Since: 3.6.0 references: Optional["ReferenceClientCapabilities"] = attrs.field(default=None) @@ -7692,9 +7127,8 @@ class TextDocumentClientCapabilities: ) """Capabilities specific to the `textDocument/documentColor` and the `textDocument/colorPresentation` request. - - @since 3.6.0 - """ + + @since 3.6.0""" # Since: 3.6.0 formatting: Optional["DocumentFormattingClientCapabilities"] = attrs.field( @@ -7719,18 +7153,16 @@ class TextDocumentClientCapabilities: default=None ) """Capabilities specific to the `textDocument/foldingRange` request. - - @since 3.10.0 - """ + + @since 3.10.0""" # Since: 3.10.0 selection_range: Optional["SelectionRangeClientCapabilities"] = attrs.field( default=None ) """Capabilities specific to the `textDocument/selectionRange` request. - - @since 3.15.0 - """ + + @since 3.15.0""" # Since: 3.15.0 publish_diagnostics: Optional["PublishDiagnosticsClientCapabilities"] = attrs.field( @@ -7742,74 +7174,65 @@ class TextDocumentClientCapabilities: default=None ) """Capabilities specific to the various call hierarchy requests. - - @since 3.16.0 - """ + + @since 3.16.0""" # Since: 3.16.0 semantic_tokens: Optional["SemanticTokensClientCapabilities"] = attrs.field( default=None ) """Capabilities specific to the various semantic token request. - - @since 3.16.0 - """ + + @since 3.16.0""" # Since: 3.16.0 linked_editing_range: Optional[ "LinkedEditingRangeClientCapabilities" ] = attrs.field(default=None) """Capabilities specific to the `textDocument/linkedEditingRange` request. - - @since 3.16.0 - """ + + @since 3.16.0""" # Since: 3.16.0 moniker: Optional["MonikerClientCapabilities"] = attrs.field(default=None) """Client capabilities specific to the `textDocument/moniker` request. - - @since 3.16.0 - """ + + @since 3.16.0""" # Since: 3.16.0 type_hierarchy: Optional["TypeHierarchyClientCapabilities"] = attrs.field( default=None ) """Capabilities specific to the various type hierarchy requests. - - @since 3.17.0 - """ + + @since 3.17.0""" # Since: 3.17.0 inline_value: Optional["InlineValueClientCapabilities"] = attrs.field(default=None) """Capabilities specific to the `textDocument/inlineValue` request. - - @since 3.17.0 - """ + + @since 3.17.0""" # Since: 3.17.0 inlay_hint: Optional["InlayHintClientCapabilities"] = attrs.field(default=None) """Capabilities specific to the `textDocument/inlayHint` request. - - @since 3.17.0 - """ + + @since 3.17.0""" # Since: 3.17.0 diagnostic: Optional["DiagnosticClientCapabilities"] = attrs.field(default=None) """Capabilities specific to the diagnostic pull model. - - @since 3.17.0 - """ + + @since 3.17.0""" # Since: 3.17.0 inline_completion: Optional["InlineCompletionClientCapabilities"] = attrs.field( default=None ) """Client capabilities specific to inline completions. - + @since 3.18.0 - @proposed - """ + @proposed""" # Since: 3.18.0 # Proposed @@ -7818,16 +7241,14 @@ class TextDocumentClientCapabilities: class NotebookDocumentClientCapabilities: """Capabilities specific to the notebook document support. - @since 3.17.0 - """ + @since 3.17.0""" # Since: 3.17.0 synchronization: "NotebookDocumentSyncClientCapabilities" = attrs.field() - """Capabilities specific to notebook document synchronization. - - @since 3.17.0 - """ + """Capabilities specific to notebook document synchronization + + @since 3.17.0""" # Since: 3.17.0 @@ -7837,34 +7258,31 @@ class WindowClientCapabilities: validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """It indicates whether the client supports server initiated progress using the - `window/workDoneProgress/create` request. - + """It indicates whether the client supports server initiated + progress using the `window/workDoneProgress/create` request. + The capability also controls Whether client supports handling of progress notifications. If set servers are allowed to report a `workDoneProgress` property in the request specific server capabilities. - - @since 3.15.0 - """ + + @since 3.15.0""" # Since: 3.15.0 show_message: Optional["ShowMessageRequestClientCapabilities"] = attrs.field( default=None ) """Capabilities specific to the showMessage request. - - @since 3.16.0 - """ + + @since 3.16.0""" # Since: 3.16.0 show_document: Optional["ShowDocumentClientCapabilities"] = attrs.field( default=None ) """Capabilities specific to the showDocument request. - - @since 3.16.0 - """ + + @since 3.16.0""" # Since: 3.16.0 @@ -7883,59 +7301,56 @@ class GeneralClientCapabilitiesStaleRequestSupportType: class GeneralClientCapabilities: """General client capabilities. - @since 3.16.0 - """ + @since 3.16.0""" # Since: 3.16.0 stale_request_support: Optional[ "GeneralClientCapabilitiesStaleRequestSupportType" ] = attrs.field(default=None) - """Client capability that signals how the client handles stale requests (e.g. a - request for which the client will not process the response anymore since the - information is outdated). - - @since 3.17.0 - """ + """Client capability that signals how the client + handles stale requests (e.g. a request + for which the client will not process the response + anymore since the information is outdated). + + @since 3.17.0""" # Since: 3.17.0 regular_expressions: Optional["RegularExpressionsClientCapabilities"] = attrs.field( default=None ) """Client capabilities specific to regular expressions. - - @since 3.16.0 - """ + + @since 3.16.0""" # Since: 3.16.0 markdown: Optional["MarkdownClientCapabilities"] = attrs.field(default=None) """Client capabilities specific to the client's markdown parser. - - @since 3.16.0 - """ + + @since 3.16.0""" # Since: 3.16.0 position_encodings: Optional[List[Union[PositionEncodingKind, str]]] = attrs.field( default=None ) - """The position encodings supported by the client. Client and server have to agree - on the same position encoding to ensure that offsets (e.g. character position in a - line) are interpreted the same on both sides. - + """The position encodings supported by the client. Client and server + have to agree on the same position encoding to ensure that offsets + (e.g. character position in a line) are interpreted the same on both + sides. + To keep the protocol backwards compatible the following applies: if the value 'utf-16' is missing from the array of position encodings servers can assume that the client supports UTF-16. UTF-16 is therefore a mandatory encoding. - + If omitted it defaults to ['utf-16']. - + Implementation considerations: since the conversion from one encoding into another requires the content of the file / line the conversion is best done where the file is read which is usually on the server side. - - @since 3.17.0 - """ + + @since 3.17.0""" # Since: 3.17.0 @@ -7950,8 +7365,8 @@ class RelativePattern: # Since: 3.17.0 base_uri: Union[WorkspaceFolder, str] = attrs.field() - """A workspace folder or a base URI to which this pattern will be matched against - relatively.""" + """A workspace folder or a base URI to which this pattern will be matched + against relatively.""" pattern: Pattern = attrs.field() """The actual glob pattern;""" @@ -7963,8 +7378,9 @@ class WorkspaceEditClientCapabilitiesChangeAnnotationSupportType: validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """Whether the client groups edits with equal labels into tree nodes, for instance - all edits labelled with "Changes in Strings" would be a tree node.""" + """Whether the client groups edits with equal labels into tree nodes, + for instance all edits labelled with "Changes in Strings" would + be a tree node.""" @attrs.define @@ -7978,18 +7394,17 @@ class WorkspaceEditClientCapabilities: resource_operations: Optional[List[ResourceOperationKind]] = attrs.field( default=None ) - """The resource operations the client supports. Clients should at least support - 'create', 'rename' and 'delete' files and folders. - - @since 3.13.0 - """ + """The resource operations the client supports. Clients should at least + support 'create', 'rename' and 'delete' files and folders. + + @since 3.13.0""" # Since: 3.13.0 failure_handling: Optional[FailureHandlingKind] = attrs.field(default=None) - """The failure handling strategy of a client if applying the workspace edit fails. - - @since 3.13.0 - """ + """The failure handling strategy of a client if applying the workspace edit + fails. + + @since 3.13.0""" # Since: 3.13.0 normalizes_line_endings: Optional[bool] = attrs.field( @@ -8008,11 +7423,10 @@ class WorkspaceEditClientCapabilities: change_annotation_support: Optional[ "WorkspaceEditClientCapabilitiesChangeAnnotationSupportType" ] = attrs.field(default=None) - """Whether the client in general supports change annotations on text edits, create - file, rename file and delete file changes. - - @since 3.16.0 - """ + """Whether the client in general supports change annotations on text edits, + create file, rename file and delete file changes. + + @since 3.16.0""" # Since: 3.16.0 @@ -8031,35 +7445,32 @@ class DidChangeWatchedFilesClientCapabilities: validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """Did change watched files notification supports dynamic registration. - - Please note that the current protocol doesn't support static configuration for file - changes from the server side. - """ + """Did change watched files notification supports dynamic registration. Please note + that the current protocol doesn't support static configuration for file changes + from the server side.""" relative_pattern_support: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """Whether the client has support for {@link RelativePattern relative pattern} or - not. - - @since 3.17.0 - """ + """Whether the client has support for {@link RelativePattern relative pattern} + or not. + + @since 3.17.0""" # Since: 3.17.0 @attrs.define class WorkspaceSymbolClientCapabilitiesSymbolKindType: value_set: Optional[List[SymbolKind]] = attrs.field(default=None) - """The symbol kind values the client supports. When this property exists the client - also guarantees that it will handle values outside its set gracefully and falls back + """The symbol kind values the client supports. When this + property exists the client also guarantees that it will + handle values outside its set gracefully and falls back to a default value when unknown. - + If this property is not present the client only supports the symbol kinds from `File` to `Array` as defined in - the initial version of the protocol. - """ + the initial version of the protocol.""" @attrs.define @@ -8071,11 +7482,8 @@ class WorkspaceSymbolClientCapabilitiesTagSupportType: @attrs.define class WorkspaceSymbolClientCapabilitiesResolveSupportType: properties: List[str] = attrs.field() - """The properties that a client can resolve lazily. - - Usually - `location.range` - """ + """The properties that a client can resolve lazily. Usually + `location.range`""" @attrs.define @@ -8105,11 +7513,11 @@ class WorkspaceSymbolClientCapabilities: resolve_support: Optional[ "WorkspaceSymbolClientCapabilitiesResolveSupportType" ] = attrs.field(default=None) - """The client support partial workspace symbols. The client will send the request - `workspaceSymbol/resolve` to the server to resolve additional properties. - - @since 3.17.0 - """ + """The client support partial workspace symbols. The client will send the + request `workspaceSymbol/resolve` to the server to resolve additional + properties. + + @since 3.17.0""" # Since: 3.17.0 @@ -8134,14 +7542,13 @@ class SemanticTokensWorkspaceClientCapabilities: validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """Whether the client implementation supports a refresh request sent from the server - to the client. - - Note that this event is global and will force the client to refresh all semantic - tokens currently shown. It should be used with absolute care and is useful for - situation where a server for example detects a project wide change that requires - such a calculation. - """ + """Whether the client implementation supports a refresh request sent from + the server to the client. + + Note that this event is global and will force the client to refresh all + semantic tokens currently shown. It should be used with absolute care + and is useful for situation where a server for example detects a project + wide change that requires such a calculation.""" @attrs.define @@ -8154,14 +7561,13 @@ class CodeLensWorkspaceClientCapabilities: validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """Whether the client implementation supports a refresh request sent from the server - to the client. - - Note that this event is global and will force the client to refresh all code lenses - currently shown. It should be used with absolute care and is useful for situation - where a server for example detect a project wide change that requires such a - calculation. - """ + """Whether the client implementation supports a refresh request sent from the + server to the client. + + Note that this event is global and will force the client to refresh all + code lenses currently shown. It should be used with absolute care and is + useful for situation where a server for example detect a project wide + change that requires such a calculation.""" @attrs.define @@ -8171,8 +7577,7 @@ class FileOperationClientCapabilities: These events do not come from the file system, they come from user operations like renaming a file in the UI. - @since 3.16.0 - """ + @since 3.16.0""" # Since: 3.16.0 @@ -8180,8 +7585,7 @@ class FileOperationClientCapabilities: validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """Whether the client supports dynamic registration for file - requests/notifications.""" + """Whether the client supports dynamic registration for file requests/notifications.""" did_create: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), @@ -8224,8 +7628,7 @@ class FileOperationClientCapabilities: class InlineValueWorkspaceClientCapabilities: """Client workspace capabilities specific to inline values. - @since 3.17.0 - """ + @since 3.17.0""" # Since: 3.17.0 @@ -8233,22 +7636,20 @@ class InlineValueWorkspaceClientCapabilities: validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """Whether the client implementation supports a refresh request sent from the server - to the client. - - Note that this event is global and will force the client to refresh all inline - values currently shown. It should be used with absolute care and is useful for - situation where a server for example detects a project wide change that requires - such a calculation. - """ + """Whether the client implementation supports a refresh request sent from the + server to the client. + + Note that this event is global and will force the client to refresh all + inline values currently shown. It should be used with absolute care and is + useful for situation where a server for example detects a project wide + change that requires such a calculation.""" @attrs.define class InlayHintWorkspaceClientCapabilities: """Client workspace capabilities specific to inlay hints. - @since 3.17.0 - """ + @since 3.17.0""" # Since: 3.17.0 @@ -8256,22 +7657,20 @@ class InlayHintWorkspaceClientCapabilities: validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """Whether the client implementation supports a refresh request sent from the server - to the client. - - Note that this event is global and will force the client to refresh all inlay hints - currently shown. It should be used with absolute care and is useful for situation - where a server for example detects a project wide change that requires such a - calculation. - """ + """Whether the client implementation supports a refresh request sent from + the server to the client. + + Note that this event is global and will force the client to refresh all + inlay hints currently shown. It should be used with absolute care and + is useful for situation where a server for example detects a project wide + change that requires such a calculation.""" @attrs.define class DiagnosticWorkspaceClientCapabilities: """Workspace client capabilities specific to diagnostic pull requests. - @since 3.17.0 - """ + @since 3.17.0""" # Since: 3.17.0 @@ -8279,14 +7678,13 @@ class DiagnosticWorkspaceClientCapabilities: validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """Whether the client implementation supports a refresh request sent from the server - to the client. - - Note that this event is global and will force the client to refresh all pulled - diagnostics currently shown. It should be used with absolute care and is useful for - situation where a server for example detects a project wide change that requires - such a calculation. - """ + """Whether the client implementation supports a refresh request sent from + the server to the client. + + Note that this event is global and will force the client to refresh all + pulled diagnostics currently shown. It should be used with absolute care and + is useful for situation where a server for example detects a project wide + change that requires such a calculation.""" @attrs.define @@ -8307,8 +7705,9 @@ class TextDocumentSyncClientCapabilities: validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """The client supports sending a will save request and waits for a response - providing text edits which will be applied to the document before it is saved.""" + """The client supports sending a will save request and + waits for a response providing text edits which will + be applied to the document before it is saved.""" did_save: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), @@ -8341,11 +7740,11 @@ class CompletionClientCapabilitiesCompletionItemType: default=None, ) """Client supports snippets as insert text. - - A snippet can define tab stops and placeholders with `$1`, `$2` and `${3:foo}`. `$0` - defines the final tab stop, it defaults to the end of the snippet. Placeholders with - equal identifiers are linked, that is typing in one will update others too. - """ + + A snippet can define tab stops and placeholders with `$1`, `$2` + and `${3:foo}`. `$0` defines the final tab stop, it defaults to + the end of the snippet. Placeholders with equal identifiers are linked, + that is typing in one will update others too.""" commit_characters_support: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), @@ -8354,10 +7753,8 @@ class CompletionClientCapabilitiesCompletionItemType: """Client supports commit characters on a completion item.""" documentation_format: Optional[List[MarkupKind]] = attrs.field(default=None) - """Client supports the following content formats for the documentation property. - - The order describes the preferred format of the client. - """ + """Client supports the following content formats for the documentation + property. The order describes the preferred format of the client.""" deprecated_support: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), @@ -8374,23 +7771,22 @@ class CompletionClientCapabilitiesCompletionItemType: tag_support: Optional[ "CompletionClientCapabilitiesCompletionItemTypeTagSupportType" ] = attrs.field(default=None) - """Client supports the tag property on a completion item. Clients supporting tags - have to handle unknown tags gracefully. Clients especially need to preserve unknown - tags when sending a completion item back to the server in a resolve call. - - @since 3.15.0 - """ + """Client supports the tag property on a completion item. Clients supporting + tags have to handle unknown tags gracefully. Clients especially need to + preserve unknown tags when sending a completion item back to the server in + a resolve call. + + @since 3.15.0""" # Since: 3.15.0 insert_replace_support: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """Client support insert replace edit to control different behavior if a completion - item is inserted in the text or should replace text. - - @since 3.16.0 - """ + """Client support insert replace edit to control different behavior if a + completion item is inserted in the text or should replace text. + + @since 3.16.0""" # Since: 3.16.0 resolve_support: Optional[ @@ -8427,33 +7823,33 @@ class CompletionClientCapabilitiesCompletionItemType: @attrs.define class CompletionClientCapabilitiesCompletionItemKindType: value_set: Optional[List[CompletionItemKind]] = attrs.field(default=None) - """The completion item kind values the client supports. When this property exists - the client also guarantees that it will handle values outside its set gracefully and - falls back to a default value when unknown. - + """The completion item kind values the client supports. When this + property exists the client also guarantees that it will + handle values outside its set gracefully and falls back + to a default value when unknown. + If this property is not present the client only supports the completion items kinds from `Text` to `Reference` as defined in - the initial version of the protocol. - """ + the initial version of the protocol.""" @attrs.define class CompletionClientCapabilitiesCompletionListType: item_defaults: Optional[List[str]] = attrs.field(default=None) - """The client supports the following itemDefaults on a completion list. - + """The client supports the following itemDefaults on + a completion list. + The value lists the supported property names of the `CompletionList.itemDefaults` object. If omitted no properties are supported. - - @since 3.17.0 - """ + + @since 3.17.0""" # Since: 3.17.0 @attrs.define class CompletionClientCapabilities: - """Completion client capabilities.""" + """Completion client capabilities""" dynamic_registration: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), @@ -8505,10 +7901,8 @@ class HoverClientCapabilities: """Whether hover supports dynamic registration.""" content_format: Optional[List[MarkupKind]] = attrs.field(default=None) - """Client supports the following content formats for the content property. - - The order describes the preferred format of the client. - """ + """Client supports the following content formats for the content + property. The order describes the preferred format of the client.""" @attrs.define @@ -8517,20 +7911,18 @@ class SignatureHelpClientCapabilitiesSignatureInformationTypeParameterInformatio validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """The client supports processing label offsets instead of a simple label string. - - @since 3.14.0 - """ + """The client supports processing label offsets instead of a + simple label string. + + @since 3.14.0""" # Since: 3.14.0 @attrs.define class SignatureHelpClientCapabilitiesSignatureInformationType: documentation_format: Optional[List[MarkupKind]] = attrs.field(default=None) - """Client supports the following content formats for the documentation property. - - The order describes the preferred format of the client. - """ + """Client supports the following content formats for the documentation + property. The order describes the preferred format of the client.""" parameter_information: Optional[ "SignatureHelpClientCapabilitiesSignatureInformationTypeParameterInformationType" @@ -8587,12 +7979,9 @@ class DeclarationClientCapabilities: validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """Whether declaration supports dynamic registration. - - If this is set to `true` + """Whether declaration supports dynamic registration. If this is set to `true` the client supports the new `DeclarationRegistrationOptions` return value - for the corresponding server capability as well. - """ + for the corresponding server capability as well.""" link_support: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), @@ -8616,35 +8005,30 @@ class DefinitionClientCapabilities: default=None, ) """The client supports additional metadata in the form of definition links. - - @since 3.14.0 - """ + + @since 3.14.0""" # Since: 3.14.0 @attrs.define class TypeDefinitionClientCapabilities: - """Since 3.6.0.""" + """Since 3.6.0""" dynamic_registration: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """Whether implementation supports dynamic registration. - - If this is set to `true` + """Whether implementation supports dynamic registration. If this is set to `true` the client supports the new `TypeDefinitionRegistrationOptions` return value - for the corresponding server capability as well. - """ + for the corresponding server capability as well.""" link_support: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) """The client supports additional metadata in the form of definition links. - - Since 3.14.0 - """ + + Since 3.14.0""" @attrs.define @@ -8657,21 +8041,17 @@ class ImplementationClientCapabilities: validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """Whether implementation supports dynamic registration. - - If this is set to `true` + """Whether implementation supports dynamic registration. If this is set to `true` the client supports the new `ImplementationRegistrationOptions` return value - for the corresponding server capability as well. - """ + for the corresponding server capability as well.""" link_support: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) """The client supports additional metadata in the form of definition links. - - @since 3.14.0 - """ + + @since 3.14.0""" # Since: 3.14.0 @@ -8700,14 +8080,14 @@ class DocumentHighlightClientCapabilities: @attrs.define class DocumentSymbolClientCapabilitiesSymbolKindType: value_set: Optional[List[SymbolKind]] = attrs.field(default=None) - """The symbol kind values the client supports. When this property exists the client - also guarantees that it will handle values outside its set gracefully and falls back + """The symbol kind values the client supports. When this + property exists the client also guarantees that it will + handle values outside its set gracefully and falls back to a default value when unknown. - + If this property is not present the client only supports the symbol kinds from `File` to `Array` as defined in - the initial version of the protocol. - """ + the initial version of the protocol.""" @attrs.define @@ -8752,22 +8132,20 @@ class DocumentSymbolClientCapabilities: validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """The client supports an additional label presented in the UI when registering a - document symbol provider. - - @since 3.16.0 - """ + """The client supports an additional label presented in the UI when + registering a document symbol provider. + + @since 3.16.0""" # Since: 3.16.0 @attrs.define class CodeActionClientCapabilitiesCodeActionLiteralSupportTypeCodeActionKindType: value_set: List[Union[CodeActionKind, str]] = attrs.field() - """The code action kind values the client supports. - - When this property exists the client also guarantees that it will handle values - outside its set gracefully and falls back to a default value when unknown. - """ + """The code action kind values the client supports. When this + property exists the client also guarantees that it will + handle values outside its set gracefully and falls back + to a default value when unknown.""" @attrs.define @@ -8775,7 +8153,8 @@ class CodeActionClientCapabilitiesCodeActionLiteralSupportType: code_action_kind: "CodeActionClientCapabilitiesCodeActionLiteralSupportTypeCodeActionKindType" = ( attrs.field() ) - """The code action kind is support with the following value set.""" + """The code action kind is support with the following value + set.""" @attrs.define @@ -8836,23 +8215,23 @@ class CodeActionClientCapabilities: resolve_support: Optional[ "CodeActionClientCapabilitiesResolveSupportType" ] = attrs.field(default=None) - """Whether the client supports resolving additional code action properties via a - separate `codeAction/resolve` request. - - @since 3.16.0 - """ + """Whether the client supports resolving additional code action + properties via a separate `codeAction/resolve` request. + + @since 3.16.0""" # Since: 3.16.0 honors_change_annotations: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """Whether the client honors the change annotations in text edits and resource - operations returned via the `CodeAction#edit` property by for example presenting the - workspace edit in the user interface and asking for confirmation. - - @since 3.16.0 - """ + """Whether the client honors the change annotations in + text edits and resource operations returned via the + `CodeAction#edit` property by for example presenting + the workspace edit in the user interface and asking + for confirmation. + + @since 3.16.0""" # Since: 3.16.0 @@ -8893,12 +8272,9 @@ class DocumentColorClientCapabilities: validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """Whether implementation supports dynamic registration. - - If this is set to `true` + """Whether implementation supports dynamic registration. If this is set to `true` the client supports the new `DocumentColorRegistrationOptions` return value - for the corresponding server capability as well. - """ + for the corresponding server capability as well.""" @attrs.define @@ -8922,6 +8298,17 @@ class DocumentRangeFormattingClientCapabilities: ) """Whether range formatting supports dynamic registration.""" + ranges_support: Optional[bool] = attrs.field( + validator=attrs.validators.optional(attrs.validators.instance_of(bool)), + default=None, + ) + """Whether the client supports formatting multiple ranges at once. + + @since 3.18.0 + @proposed""" + # Since: 3.18.0 + # Proposed + @attrs.define class DocumentOnTypeFormattingClientCapabilities: @@ -8946,45 +8333,44 @@ class RenameClientCapabilities: validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """Client supports testing for validity of rename operations before execution. - - @since 3.12.0 - """ + """Client supports testing for validity of rename operations + before execution. + + @since 3.12.0""" # Since: 3.12.0 prepare_support_default_behavior: Optional[ PrepareSupportDefaultBehavior ] = attrs.field(default=None) """Client supports the default behavior result. - + The value indicates the default behavior used by the client. - - @since 3.16.0 - """ + + @since 3.16.0""" # Since: 3.16.0 honors_change_annotations: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """Whether the client honors the change annotations in text edits and resource - operations returned via the rename request's workspace edit by for example - presenting the workspace edit in the user interface and asking for confirmation. - - @since 3.16.0 - """ + """Whether the client honors the change annotations in + text edits and resource operations returned via the + rename request's workspace edit by for example presenting + the workspace edit in the user interface and asking + for confirmation. + + @since 3.16.0""" # Since: 3.16.0 @attrs.define class FoldingRangeClientCapabilitiesFoldingRangeKindType: value_set: Optional[List[Union[FoldingRangeKind, str]]] = attrs.field(default=None) - """The folding range kind values the client supports. - - When this property exists the client also guarantees that it will handle values - outside its set gracefully and falls back to a default value when unknown. - """ + """The folding range kind values the client supports. When this + property exists the client also guarantees that it will + handle values outside its set gracefully and falls back + to a default value when unknown.""" @attrs.define @@ -8993,11 +8379,10 @@ class FoldingRangeClientCapabilitiesFoldingRangeType: validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """If set, the client signals that it supports setting collapsedText on folding - ranges to display custom labels instead of the default text. - - @since 3.17.0 - """ + """If set, the client signals that it supports setting collapsedText on + folding ranges to display custom labels instead of the default text. + + @since 3.17.0""" # Since: 3.17.0 @@ -9007,48 +8392,40 @@ class FoldingRangeClientCapabilities: validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """Whether implementation supports dynamic registration for folding range providers. - - If this is set to `true` the client supports the new + """Whether implementation supports dynamic registration for folding range + providers. If this is set to `true` the client supports the new `FoldingRangeRegistrationOptions` return value for the corresponding - server capability as well. - """ + server capability as well.""" range_limit: Optional[int] = attrs.field( validator=attrs.validators.optional(validators.uinteger_validator), default=None ) - """The maximum number of folding ranges that the client prefers to receive per - document. - - The value serves as a hint, servers are free to follow the limit. - """ + """The maximum number of folding ranges that the client prefers to receive + per document. The value serves as a hint, servers are free to follow the + limit.""" line_folding_only: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) """If set, the client signals that it only supports folding complete lines. - If set, client will ignore specified `startCharacter` and `endCharacter` - properties in a FoldingRange. - """ + properties in a FoldingRange.""" folding_range_kind: Optional[ "FoldingRangeClientCapabilitiesFoldingRangeKindType" ] = attrs.field(default=None) """Specific options for the folding range kind. - - @since 3.17.0 - """ + + @since 3.17.0""" # Since: 3.17.0 folding_range: Optional[ "FoldingRangeClientCapabilitiesFoldingRangeType" ] = attrs.field(default=None) """Specific options for the folding range. - - @since 3.17.0 - """ + + @since 3.17.0""" # Since: 3.17.0 @@ -9058,13 +8435,9 @@ class SelectionRangeClientCapabilities: validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """Whether implementation supports dynamic registration for selection range - providers. - - If this is set to `true` + """Whether implementation supports dynamic registration for selection range providers. If this is set to `true` the client supports the new `SelectionRangeRegistrationOptions` return value for the corresponding server - capability as well. - """ + capability as well.""" @attrs.define @@ -9086,11 +8459,10 @@ class PublishDiagnosticsClientCapabilities: tag_support: Optional[ "PublishDiagnosticsClientCapabilitiesTagSupportType" ] = attrs.field(default=None) - """Client supports the tag property to provide meta data about a diagnostic. Clients - supporting tags have to handle unknown tags gracefully. - - @since 3.15.0 - """ + """Client supports the tag property to provide meta data about a diagnostic. + Clients supporting tags have to handle unknown tags gracefully. + + @since 3.15.0""" # Since: 3.15.0 version_support: Optional[bool] = attrs.field( @@ -9099,19 +8471,17 @@ class PublishDiagnosticsClientCapabilities: ) """Whether the client interprets the version property of the `textDocument/publishDiagnostics` notification's parameter. - - @since 3.15.0 - """ + + @since 3.15.0""" # Since: 3.15.0 code_description_support: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """Client supports a codeDescription property. - - @since 3.16.0 - """ + """Client supports a codeDescription property + + @since 3.16.0""" # Since: 3.16.0 data_support: Optional[bool] = attrs.field( @@ -9136,12 +8506,9 @@ class CallHierarchyClientCapabilities: validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """Whether implementation supports dynamic registration. - - If this is set to `true` + """Whether implementation supports dynamic registration. If this is set to `true` the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` - return value for the corresponding server capability as well. - """ + return value for the corresponding server capability as well.""" @attrs.define @@ -9150,21 +8517,21 @@ class SemanticTokensClientCapabilitiesRequestsTypeFullType1: validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """The client will send the `textDocument/semanticTokens/full/delta` request if the - server provides a corresponding handler.""" + """The client will send the `textDocument/semanticTokens/full/delta` request if + the server provides a corresponding handler.""" @attrs.define class SemanticTokensClientCapabilitiesRequestsType: range: Optional[Union[bool, Any]] = attrs.field(default=None) - """The client will send the `textDocument/semanticTokens/range` request if the - server provides a corresponding handler.""" + """The client will send the `textDocument/semanticTokens/range` request if + the server provides a corresponding handler.""" full: Optional[ Union[bool, "SemanticTokensClientCapabilitiesRequestsTypeFullType1"] ] = attrs.field(default=None) - """The client will send the `textDocument/semanticTokens/full` request if the server - provides a corresponding handler.""" + """The client will send the `textDocument/semanticTokens/full` request if + the server provides a corresponding handler.""" @attrs.define @@ -9174,17 +8541,14 @@ class SemanticTokensClientCapabilities: # Since: 3.16.0 requests: "SemanticTokensClientCapabilitiesRequestsType" = attrs.field() - """Which requests the client supports and might send to the server depending on the - server's capability. - - Please note that clients might not + """Which requests the client supports and might send to the server + depending on the server's capability. Please note that clients might not show semantic tokens or degrade some of the user experience if a range or full request is advertised by the client but not provided by the server. If for example the client capability `requests.full` and `request.range` are both set to true but the server only provides a range provider the client might not render a minimap correctly or might - even decide to not show any semantic tokens at all. - """ + even decide to not show any semantic tokens at all.""" token_types: List[str] = attrs.field() """The token types that the client supports.""" @@ -9199,12 +8563,9 @@ class SemanticTokensClientCapabilities: validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """Whether implementation supports dynamic registration. - - If this is set to `true` + """Whether implementation supports dynamic registration. If this is set to `true` the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` - return value for the corresponding server capability as well. - """ + return value for the corresponding server capability as well.""" overlapping_token_support: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), @@ -9222,12 +8583,12 @@ class SemanticTokensClientCapabilities: validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """Whether the client allows the server to actively cancel a semantic token request, - e.g. supports returning LSPErrorCodes.ServerCancelled. If a server does the client + """Whether the client allows the server to actively cancel a + semantic token request, e.g. supports returning + LSPErrorCodes.ServerCancelled. If a server does the client needs to retrigger the request. - - @since 3.17.0 - """ + + @since 3.17.0""" # Since: 3.17.0 augments_syntax_tokens: Optional[bool] = attrs.field( @@ -9251,8 +8612,7 @@ class SemanticTokensClientCapabilities: class LinkedEditingRangeClientCapabilities: """Client capabilities for the linked editing range request. - @since 3.16.0 - """ + @since 3.16.0""" # Since: 3.16.0 @@ -9260,20 +8620,16 @@ class LinkedEditingRangeClientCapabilities: validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """Whether implementation supports dynamic registration. - - If this is set to `true` + """Whether implementation supports dynamic registration. If this is set to `true` the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` - return value for the corresponding server capability as well. - """ + return value for the corresponding server capability as well.""" @attrs.define class MonikerClientCapabilities: """Client capabilities specific to the moniker request. - @since 3.16.0 - """ + @since 3.16.0""" # Since: 3.16.0 @@ -9281,12 +8637,9 @@ class MonikerClientCapabilities: validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """Whether moniker supports dynamic registration. - - If this is set to `true` + """Whether moniker supports dynamic registration. If this is set to `true` the client supports the new `MonikerRegistrationOptions` return value - for the corresponding server capability as well. - """ + for the corresponding server capability as well.""" @attrs.define @@ -9299,20 +8652,16 @@ class TypeHierarchyClientCapabilities: validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """Whether implementation supports dynamic registration. - - If this is set to `true` + """Whether implementation supports dynamic registration. If this is set to `true` the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` - return value for the corresponding server capability as well. - """ + return value for the corresponding server capability as well.""" @attrs.define class InlineValueClientCapabilities: """Client capabilities specific to inline values. - @since 3.17.0 - """ + @since 3.17.0""" # Since: 3.17.0 @@ -9320,8 +8669,7 @@ class InlineValueClientCapabilities: validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """Whether implementation supports dynamic registration for inline value - providers.""" + """Whether implementation supports dynamic registration for inline value providers.""" @attrs.define @@ -9334,8 +8682,7 @@ class InlayHintClientCapabilitiesResolveSupportType: class InlayHintClientCapabilities: """Inlay hint client capabilities. - @since 3.17.0 - """ + @since 3.17.0""" # Since: 3.17.0 @@ -9348,15 +8695,15 @@ class InlayHintClientCapabilities: resolve_support: Optional[ "InlayHintClientCapabilitiesResolveSupportType" ] = attrs.field(default=None) - """Indicates which properties a client can resolve lazily on an inlay hint.""" + """Indicates which properties a client can resolve lazily on an inlay + hint.""" @attrs.define class DiagnosticClientCapabilities: """Client capabilities specific to diagnostic pull requests. - @since 3.17.0 - """ + @since 3.17.0""" # Since: 3.17.0 @@ -9364,12 +8711,9 @@ class DiagnosticClientCapabilities: validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """Whether implementation supports dynamic registration. - - If this is set to `true` + """Whether implementation supports dynamic registration. If this is set to `true` the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` - return value for the corresponding server capability as well. - """ + return value for the corresponding server capability as well.""" related_document_support: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), @@ -9383,8 +8727,7 @@ class InlineCompletionClientCapabilities: """Client capabilities specific to inline completions. @since 3.18.0 - @proposed - """ + @proposed""" # Since: 3.18.0 # Proposed @@ -9393,16 +8736,14 @@ class InlineCompletionClientCapabilities: validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """Whether implementation supports dynamic registration for inline completion - providers.""" + """Whether implementation supports dynamic registration for inline completion providers.""" @attrs.define class NotebookDocumentSyncClientCapabilities: """Notebook specific client capabilities. - @since 3.17.0 - """ + @since 3.17.0""" # Since: 3.17.0 @@ -9410,13 +8751,10 @@ class NotebookDocumentSyncClientCapabilities: validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """Whether implementation supports dynamic registration. - - If this is + """Whether implementation supports dynamic registration. If this is set to `true` the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` - return value for the corresponding server capability as well. - """ + return value for the corresponding server capability as well.""" execution_summary_support: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), @@ -9431,13 +8769,14 @@ class ShowMessageRequestClientCapabilitiesMessageActionItemType: validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """Whether the client supports additional attributes which are preserved and send - back to the server in the request's response.""" + """Whether the client supports additional attributes which + are preserved and send back to the server in the + request's response.""" @attrs.define class ShowMessageRequestClientCapabilities: - """Show message request client capabilities.""" + """Show message request client capabilities""" message_action_item: Optional[ "ShowMessageRequestClientCapabilitiesMessageActionItemType" @@ -9449,21 +8788,20 @@ class ShowMessageRequestClientCapabilities: class ShowDocumentClientCapabilities: """Client capabilities for the showDocument request. - @since 3.16.0 - """ + @since 3.16.0""" # Since: 3.16.0 support: bool = attrs.field(validator=attrs.validators.instance_of(bool)) - """The client has support for the showDocument request.""" + """The client has support for the showDocument + request.""" @attrs.define class RegularExpressionsClientCapabilities: """Client capabilities specific to regular expressions. - @since 3.16.0 - """ + @since 3.16.0""" # Since: 3.16.0 @@ -9481,8 +8819,7 @@ class RegularExpressionsClientCapabilities: class MarkdownClientCapabilities: """Client capabilities specific to the used markdown parser. - @since 3.16.0 - """ + @since 3.16.0""" # Since: 3.16.0 @@ -9496,10 +8833,10 @@ class MarkdownClientCapabilities: """The version of the parser.""" allowed_tags: Optional[List[str]] = attrs.field(default=None) - """A list of HTML tags that the client allows / supports in Markdown. - - @since 3.17.0 - """ + """A list of HTML tags that the client allows / supports in + Markdown. + + @since 3.17.0""" # Since: 3.17.0 @@ -9513,10 +8850,8 @@ class TextDocumentColorPresentationOptions: document_selector: Optional[Union[DocumentSelector, None]] = attrs.field( default=None ) - """A document selector to identify the scope of the registration. - - If set to null the document selector provided on the client side will be used. - """ + """A document selector to identify the scope of the registration. If set to null + the document selector provided on the client side will be used.""" @attrs.define @@ -9526,11 +8861,8 @@ class ResponseError: message: str = attrs.field(validator=attrs.validators.instance_of(str)) """A string providing a short description of the error.""" data: Optional[LSPAny] = attrs.field(default=None) - """A primitive or structured value that contains additional information about the - error. - - Can be omitted. - """ + """A primitive or structured value that contains additional information + about the error. Can be omitted.""" @attrs.define @@ -9545,12 +8877,9 @@ class ResponseErrorMessage: @attrs.define class TextDocumentImplementationRequest: """A request to resolve the implementation locations of a symbol at a given text - document position. - - The request's parameter is of type [TextDocumentPositionParams] + document position. The request's parameter is of type [TextDocumentPositionParams] (#TextDocumentPositionParams) the response is of type {@link Definition} or a - Thenable that resolves to such. - """ + Thenable that resolves to such.""" id: Union[int, str] = attrs.field() """The request id.""" @@ -9571,12 +8900,9 @@ class TextDocumentImplementationResponse: @attrs.define class TextDocumentTypeDefinitionRequest: """A request to resolve the type definition locations of a symbol at a given text - document position. - - The request's parameter is of type [TextDocumentPositionParams] + document position. The request's parameter is of type [TextDocumentPositionParams] (#TextDocumentPositionParams) the response is of type {@link Definition} or a - Thenable that resolves to such. - """ + Thenable that resolves to such.""" id: Union[int, str] = attrs.field() """The request id.""" @@ -9596,8 +8922,7 @@ class TextDocumentTypeDefinitionResponse: @attrs.define class WorkspaceWorkspaceFoldersRequest: - """The `workspace/workspaceFolders` is sent from the server to the client to fetch - the open workspace folders.""" + """The `workspace/workspaceFolders` is sent from the server to the client to fetch the open workspace folders.""" id: Union[int, str] = attrs.field() """The request id.""" @@ -9620,15 +8945,13 @@ class WorkspaceWorkspaceFoldersResponse: @attrs.define class WorkspaceConfigurationRequest: - """The 'workspace/configuration' request is sent from the server to the client to - fetch a certain configuration setting. - - This pull model replaces the old push model were the client signaled configuration - change via an event. If the server still needs to react to configuration changes - (since the server caches the result of `workspace/configuration` requests) the - server should register for an empty configuration change event and empty the cache - if such an event is received. - """ + """The 'workspace/configuration' request is sent from the server to the client to fetch a certain + configuration setting. + + This pull model replaces the old push model were the client signaled configuration change via an + event. If the server still needs to react to configuration changes (since the server caches the + result of `workspace/configuration` requests) the server should register for an empty configuration + change event and empty the cache if such an event is received.""" id: Union[int, str] = attrs.field() """The request id.""" @@ -9648,12 +8971,10 @@ class WorkspaceConfigurationResponse: @attrs.define class TextDocumentDocumentColorRequest: - """A request to list all color symbols found in a given text document. - - The request's parameter is of type {@link DocumentColorParams} the response is of - type {@link ColorInformation ColorInformation[]} or a Thenable that resolves to - such. - """ + """A request to list all color symbols found in a given text document. The request's + parameter is of type {@link DocumentColorParams} the + response is of type {@link ColorInformation ColorInformation[]} or a Thenable + that resolves to such.""" id: Union[int, str] = attrs.field() """The request id.""" @@ -9673,12 +8994,10 @@ class TextDocumentDocumentColorResponse: @attrs.define class TextDocumentColorPresentationRequest: - """A request to list all presentation for a color. - - The request's parameter is of type {@link ColorPresentationParams} the response is - of type {@link ColorInformation ColorInformation[]} or a Thenable that resolves to - such. - """ + """A request to list all presentation for a color. The request's + parameter is of type {@link ColorPresentationParams} the + response is of type {@link ColorInformation ColorInformation[]} or a Thenable + that resolves to such.""" id: Union[int, str] = attrs.field() """The request id.""" @@ -9698,11 +9017,10 @@ class TextDocumentColorPresentationResponse: @attrs.define class TextDocumentFoldingRangeRequest: - """A request to provide folding ranges in a document. - - The request's parameter is of type {@link FoldingRangeParams}, the response is of - type {@link FoldingRangeList} or a Thenable that resolves to such. - """ + """A request to provide folding ranges in a document. The request's + parameter is of type {@link FoldingRangeParams}, the + response is of type {@link FoldingRangeList} or a Thenable + that resolves to such.""" id: Union[int, str] = attrs.field() """The request id.""" @@ -9723,12 +9041,10 @@ class TextDocumentFoldingRangeResponse: @attrs.define class TextDocumentDeclarationRequest: """A request to resolve the type definition locations of a symbol at a given text - document position. - - The request's parameter is of type [TextDocumentPositionParams] - (#TextDocumentPositionParams) the response is of type {@link Declaration} or a typed - array of {@link DeclarationLink} or a Thenable that resolves to such. - """ + document position. The request's parameter is of type [TextDocumentPositionParams] + (#TextDocumentPositionParams) the response is of type {@link Declaration} + or a typed array of {@link DeclarationLink} or a Thenable that resolves + to such.""" id: Union[int, str] = attrs.field() """The request id.""" @@ -9748,11 +9064,10 @@ class TextDocumentDeclarationResponse: @attrs.define class TextDocumentSelectionRangeRequest: - """A request to provide selection ranges in a document. - - The request's parameter is of type {@link SelectionRangeParams}, the response is of - type {@link SelectionRange SelectionRange[]} or a Thenable that resolves to such. - """ + """A request to provide selection ranges in a document. The request's + parameter is of type {@link SelectionRangeParams}, the + response is of type {@link SelectionRange SelectionRange[]} or a Thenable + that resolves to such.""" id: Union[int, str] = attrs.field() """The request id.""" @@ -9772,8 +9087,8 @@ class TextDocumentSelectionRangeResponse: @attrs.define class WindowWorkDoneProgressCreateRequest: - """The `window/workDoneProgress/create` request is sent from the server to the - client to initiate progress reporting from the server.""" + """The `window/workDoneProgress/create` request is sent from the server to the client to initiate progress + reporting from the server.""" id: Union[int, str] = attrs.field() """The request id.""" @@ -9967,8 +9282,7 @@ class WindowShowDocumentResponse: class TextDocumentLinkedEditingRangeRequest: """A request to provide ranges that can be edited together. - @since 3.16.0 - """ + @since 3.16.0""" id: Union[int, str] = attrs.field() """The request id.""" @@ -9988,15 +9302,14 @@ class TextDocumentLinkedEditingRangeResponse: @attrs.define class WorkspaceWillCreateFilesRequest: - """The will create files request is sent from the client to the server before files - are actually created as long as the creation is triggered from within the client. + """The will create files request is sent from the client to the server before files are actually + created as long as the creation is triggered from within the client. The request can return a `WorkspaceEdit` which will be applied to workspace before the files are created. Hence the `WorkspaceEdit` can not manipulate the content of the file to be created. - @since 3.16.0 - """ + @since 3.16.0""" id: Union[int, str] = attrs.field() """The request id.""" @@ -10016,11 +9329,10 @@ class WorkspaceWillCreateFilesResponse: @attrs.define class WorkspaceWillRenameFilesRequest: - """The will rename files request is sent from the client to the server before files - are actually renamed as long as the rename is triggered from within the client. + """The will rename files request is sent from the client to the server before files are actually + renamed as long as the rename is triggered from within the client. - @since 3.16.0 - """ + @since 3.16.0""" id: Union[int, str] = attrs.field() """The request id.""" @@ -10043,8 +9355,7 @@ class WorkspaceWillDeleteFilesRequest: """The did delete files notification is sent from the client to the server when files were deleted from within the client. - @since 3.16.0 - """ + @since 3.16.0""" id: Union[int, str] = attrs.field() """The request id.""" @@ -10065,10 +9376,8 @@ class WorkspaceWillDeleteFilesResponse: @attrs.define class TextDocumentMonikerRequest: """A request to get the moniker of a symbol at a given text document position. - The request parameter is of type {@link TextDocumentPositionParams}. - The response is of type {@link Moniker Moniker[]} or `null`. - """ + The response is of type {@link Moniker Moniker[]} or `null`.""" id: Union[int, str] = attrs.field() """The request id.""" @@ -10156,11 +9465,10 @@ class TypeHierarchySubtypesResponse: @attrs.define class TextDocumentInlineValueRequest: """A request to provide inline values in a document. The request's parameter is of - type {@link InlineValueParams}, the response is of type {@link InlineValue - InlineValue[]} or a Thenable that resolves to such. + type {@link InlineValueParams}, the response is of type + {@link InlineValue InlineValue[]} or a Thenable that resolves to such. - @since 3.17.0 - """ + @since 3.17.0""" id: Union[int, str] = attrs.field() """The request id.""" @@ -10201,11 +9509,10 @@ class WorkspaceInlineValueRefreshResponse: @attrs.define class TextDocumentInlayHintRequest: """A request to provide inlay hints in a document. The request's parameter is of - type {@link InlayHintsParams}, the response is of type {@link InlayHint InlayHint[]} - or a Thenable that resolves to such. + type {@link InlayHintsParams}, the response is of type + {@link InlayHint InlayHint[]} or a Thenable that resolves to such. - @since 3.17.0 - """ + @since 3.17.0""" id: Union[int, str] = attrs.field() """The request id.""" @@ -10225,12 +9532,11 @@ class TextDocumentInlayHintResponse: @attrs.define class InlayHintResolveRequest: - """A request to resolve additional properties for an inlay hint. The request's - parameter is of type {@link InlayHint}, the response is of type {@link InlayHint} or - a Thenable that resolves to such. + """A request to resolve additional properties for an inlay hint. + The request's parameter is of type {@link InlayHint}, the response is + of type {@link InlayHint} or a Thenable that resolves to such. - @since 3.17.0 - """ + @since 3.17.0""" id: Union[int, str] = attrs.field() """The request id.""" @@ -10272,8 +9578,7 @@ class WorkspaceInlayHintRefreshResponse: class TextDocumentDiagnosticRequest: """The document diagnostic request definition. - @since 3.17.0 - """ + @since 3.17.0""" id: Union[int, str] = attrs.field() """The request id.""" @@ -10295,8 +9600,7 @@ class TextDocumentDiagnosticResponse: class WorkspaceDiagnosticRequest: """The workspace diagnostic request definition. - @since 3.17.0 - """ + @since 3.17.0""" id: Union[int, str] = attrs.field() """The request id.""" @@ -10318,8 +9622,7 @@ class WorkspaceDiagnosticResponse: class WorkspaceDiagnosticRefreshRequest: """The diagnostic refresh request definition. - @since 3.17.0 - """ + @since 3.17.0""" id: Union[int, str] = attrs.field() """The request id.""" @@ -10339,13 +9642,12 @@ class WorkspaceDiagnosticRefreshResponse: @attrs.define class TextDocumentInlineCompletionRequest: - """A request to provide inline completions in a document. The request's parameter is - of type {@link InlineCompletionParams}, the response is of type {@link - InlineCompletion InlineCompletion[]} or a Thenable that resolves to such. + """A request to provide inline completions in a document. The request's parameter is of + type {@link InlineCompletionParams}, the response is of type + {@link InlineCompletion InlineCompletion[]} or a Thenable that resolves to such. @since 3.18.0 - @proposed - """ + @proposed""" id: Union[int, str] = attrs.field() """The request id.""" @@ -10367,8 +9669,8 @@ class TextDocumentInlineCompletionResponse: @attrs.define class ClientRegisterCapabilityRequest: - """The `client/registerCapability` request is sent from the server to the client to - register a new capability handler on the client side.""" + """The `client/registerCapability` request is sent from the server to the client to register a new capability + handler on the client side.""" id: Union[int, str] = attrs.field() """The request id.""" @@ -10388,8 +9690,8 @@ class ClientRegisterCapabilityResponse: @attrs.define class ClientUnregisterCapabilityRequest: - """The `client/unregisterCapability` request is sent from the server to the client - to unregister a previously registered capability handler on the client side.""" + """The `client/unregisterCapability` request is sent from the server to the client to unregister a previously registered capability + handler on the client side.""" id: Union[int, str] = attrs.field() """The request id.""" @@ -10410,11 +9712,10 @@ class ClientUnregisterCapabilityResponse: @attrs.define class InitializeRequest: """The initialize request is sent from the client to the server. - - It is sent once as the request after starting up the server. The requests parameter - is of type {@link InitializeParams} the response if of type {@link InitializeResult} - of a Thenable that resolves to such. - """ + It is sent once as the request after starting up the server. + The requests parameter is of type {@link InitializeParams} + the response if of type {@link InitializeResult} of a Thenable that + resolves to such.""" id: Union[int, str] = attrs.field() """The request id.""" @@ -10435,10 +9736,9 @@ class InitializeResponse: @attrs.define class ShutdownRequest: """A shutdown request is sent from the client to the server. - - It is sent once when the client decides to shutdown the server. The only - notification that is sent after a shutdown request is the exit event. - """ + It is sent once when the client decides to shutdown the + server. The only notification that is sent after a shutdown request + is the exit event.""" id: Union[int, str] = attrs.field() """The request id.""" @@ -10479,14 +9779,12 @@ class WindowShowMessageRequestResponse: @attrs.define class TextDocumentWillSaveWaitUntilRequest: - """A document will save request is sent from the client to the server before the - document is actually saved. - - The request can return an array of TextEdits which will be applied to the text - document before it is saved. Please note that clients might drop results if - computing the text edits took too long or if a server constantly fails on this - request. This is done to keep the save fast and reliable. - """ + """A document will save request is sent from the client to the server before + the document is actually saved. The request can return an array of TextEdits + which will be applied to the text document before it is saved. Please note that + clients might drop results if computing the text edits took too long or if a + server constantly fails on this request. This is done to keep the save fast and + reliable.""" id: Union[int, str] = attrs.field() """The request id.""" @@ -10507,15 +9805,14 @@ class TextDocumentWillSaveWaitUntilResponse: @attrs.define class TextDocumentCompletionRequest: """Request to request completion at a given text document position. The request's - parameter is of type {@link TextDocumentPosition} the response is of type {@link - CompletionItem CompletionItem[]} or {@link CompletionList} or a Thenable that - resolves to such. + parameter is of type {@link TextDocumentPosition} the response + is of type {@link CompletionItem CompletionItem[]} or {@link CompletionList} + or a Thenable that resolves to such. The request can delay the computation of the {@link CompletionItem.detail `detail`} and {@link CompletionItem.documentation `documentation`} properties to the `completionItem/resolve` request. However, properties that are needed for the initial sorting and filtering, like `sortText`, - `filterText`, `insertText`, and `textEdit`, must not be changed during resolve. - """ + `filterText`, `insertText`, and `textEdit`, must not be changed during resolve.""" id: Union[int, str] = attrs.field() """The request id.""" @@ -10537,9 +9834,9 @@ class TextDocumentCompletionResponse: @attrs.define class CompletionItemResolveRequest: - """Request to resolve additional information for a given completion item.The - request's parameter is of type {@link CompletionItem} the response is of type {@link - CompletionItem} or a Thenable that resolves to such.""" + """Request to resolve additional information for a given completion item.The request's + parameter is of type {@link CompletionItem} the response + is of type {@link CompletionItem} or a Thenable that resolves to such.""" id: Union[int, str] = attrs.field() """The request id.""" @@ -10559,11 +9856,9 @@ class CompletionItemResolveResponse: @attrs.define class TextDocumentHoverRequest: - """Request to request hover information at a given text document position. - - The request's parameter is of type {@link TextDocumentPosition} the response is of - type {@link Hover} or a Thenable that resolves to such. - """ + """Request to request hover information at a given text document position. The request's + parameter is of type {@link TextDocumentPosition} the response is of + type {@link Hover} or a Thenable that resolves to such.""" id: Union[int, str] = attrs.field() """The request id.""" @@ -10601,13 +9896,11 @@ class TextDocumentSignatureHelpResponse: @attrs.define class TextDocumentDefinitionRequest: - """A request to resolve the definition location of a symbol at a given text document - position. - - The request's parameter is of type [TextDocumentPosition] (#TextDocumentPosition) - the response is of either type {@link Definition} or a typed array of {@link - DefinitionLink} or a Thenable that resolves to such. - """ + """A request to resolve the definition location of a symbol at a given text + document position. The request's parameter is of type [TextDocumentPosition] + (#TextDocumentPosition) the response is of either type {@link Definition} + or a typed array of {@link DefinitionLink} or a Thenable that resolves + to such.""" id: Union[int, str] = attrs.field() """The request id.""" @@ -10627,12 +9920,10 @@ class TextDocumentDefinitionResponse: @attrs.define class TextDocumentReferencesRequest: - """A request to resolve project-wide references for the symbol denoted by the given - text document position. - - The request's parameter is of type {@link ReferenceParams} the response is of type - {@link Location Location[]} or a Thenable that resolves to such. - """ + """A request to resolve project-wide references for the symbol denoted + by the given text document position. The request's parameter is of + type {@link ReferenceParams} the response is of type + {@link Location Location[]} or a Thenable that resolves to such.""" id: Union[int, str] = attrs.field() """The request id.""" @@ -10652,13 +9943,10 @@ class TextDocumentReferencesResponse: @attrs.define class TextDocumentDocumentHighlightRequest: - """Request to resolve a {@link DocumentHighlight} for a given text document - position. - - The request's parameter is of type [TextDocumentPosition] (#TextDocumentPosition) - the request response is of type [DocumentHighlight[]] (#DocumentHighlight) or a - Thenable that resolves to such. - """ + """Request to resolve a {@link DocumentHighlight} for a given + text document position. The request's parameter is of type [TextDocumentPosition] + (#TextDocumentPosition) the request response is of type [DocumentHighlight[]] + (#DocumentHighlight) or a Thenable that resolves to such.""" id: Union[int, str] = attrs.field() """The request id.""" @@ -10678,12 +9966,10 @@ class TextDocumentDocumentHighlightResponse: @attrs.define class TextDocumentDocumentSymbolRequest: - """A request to list all symbols found in a given text document. - - The request's parameter is of type {@link TextDocumentIdentifier} the response is of - type {@link SymbolInformation SymbolInformation[]} or a Thenable that resolves to - such. - """ + """A request to list all symbols found in a given text document. The request's + parameter is of type {@link TextDocumentIdentifier} the + response is of type {@link SymbolInformation SymbolInformation[]} or a Thenable + that resolves to such.""" id: Union[int, str] = attrs.field() """The request id.""" @@ -10726,8 +10012,8 @@ class TextDocumentCodeActionResponse: @attrs.define class CodeActionResolveRequest: """Request to resolve additional information for a given code action.The request's - parameter is of type {@link CodeAction} the response is of type {@link CodeAction} - or a Thenable that resolves to such.""" + parameter is of type {@link CodeAction} the response + is of type {@link CodeAction} or a Thenable that resolves to such.""" id: Union[int, str] = attrs.field() """The request id.""" @@ -10747,14 +10033,14 @@ class CodeActionResolveResponse: @attrs.define class WorkspaceSymbolRequest: - """A request to list project-wide symbols matching the query string given by the - {@link WorkspaceSymbolParams}. The response is of type {@link SymbolInformation - SymbolInformation[]} or a Thenable that resolves to such. + """A request to list project-wide symbols matching the query string given + by the {@link WorkspaceSymbolParams}. The response is + of type {@link SymbolInformation SymbolInformation[]} or a Thenable that + resolves to such. @since 3.17.0 - support for WorkspaceSymbol in the returned data. Clients need to advertise support for WorkspaceSymbols via the client capability - `workspace.symbol.resolveSupport`. - """ + `workspace.symbol.resolveSupport`.""" id: Union[int, str] = attrs.field() """The request id.""" @@ -10776,10 +10062,10 @@ class WorkspaceSymbolResponse: @attrs.define class WorkspaceSymbolResolveRequest: - """A request to resolve the range inside the workspace symbol's location. + """A request to resolve the range inside the workspace + symbol's location. - @since 3.17.0 - """ + @since 3.17.0""" id: Union[int, str] = attrs.field() """The request id.""" @@ -10839,10 +10125,9 @@ class CodeLensResolveResponse: @attrs.define class WorkspaceCodeLensRefreshRequest: - """A request to refresh all code actions. + """A request to refresh all code actions - @since 3.16.0 - """ + @since 3.16.0""" id: Union[int, str] = attrs.field() """The request id.""" @@ -10862,7 +10147,7 @@ class WorkspaceCodeLensRefreshResponse: @attrs.define class TextDocumentDocumentLinkRequest: - """A request to provide document links.""" + """A request to provide document links""" id: Union[int, str] = attrs.field() """The request id.""" @@ -10882,11 +10167,9 @@ class TextDocumentDocumentLinkResponse: @attrs.define class DocumentLinkResolveRequest: - """Request to resolve additional information for a given document link. - - The request's parameter is of type {@link DocumentLink} the response is of type - {@link DocumentLink} or a Thenable that resolves to such. - """ + """Request to resolve additional information for a given document link. The request's + parameter is of type {@link DocumentLink} the response + is of type {@link DocumentLink} or a Thenable that resolves to such.""" id: Union[int, str] = attrs.field() """The request id.""" @@ -10944,6 +10227,29 @@ class TextDocumentRangeFormattingResponse: jsonrpc: str = attrs.field(default="2.0") +@attrs.define +class TextDocumentRangesFormattingRequest: + """A request to format ranges in a document. + + @since 3.18.0 + @proposed""" + + id: Union[int, str] = attrs.field() + """The request id.""" + params: DocumentRangesFormattingParams = attrs.field() + method: str = "textDocument/rangesFormatting" + """The method to be invoked.""" + jsonrpc: str = attrs.field(default="2.0") + + +@attrs.define +class TextDocumentRangesFormattingResponse: + id: Optional[Union[int, str]] = attrs.field() + """The request id.""" + result: Union[List[TextEdit], None] = attrs.field(default=None) + jsonrpc: str = attrs.field(default="2.0") + + @attrs.define class TextDocumentOnTypeFormattingRequest: """A request to format a document on type.""" @@ -10988,8 +10294,7 @@ class TextDocumentRenameResponse: class TextDocumentPrepareRenameRequest: """A request to test and perform the setup necessary for a rename. - @since 3.16 - support for default behavior - """ + @since 3.16 - support for default behavior""" id: Union[int, str] = attrs.field() """The request id.""" @@ -11009,11 +10314,8 @@ class TextDocumentPrepareRenameResponse: @attrs.define class WorkspaceExecuteCommandRequest: - """A request send from the client to the server to execute a command. - - The request might return a workspace edit which the client will apply to the - workspace. - """ + """A request send from the client to the server to execute a command. The request might return + a workspace edit which the client will apply to the workspace.""" id: Union[int, str] = attrs.field() """The request id.""" @@ -11053,8 +10355,8 @@ class WorkspaceApplyEditResponse: @attrs.define class WorkspaceDidChangeWorkspaceFoldersNotification: - """The `workspace/didChangeWorkspaceFolders` notification is sent from the client to - the server when the workspace folder configuration changes.""" + """The `workspace/didChangeWorkspaceFolders` notification is sent from the client to the server when the workspace + folder configuration changes.""" params: DidChangeWorkspaceFoldersParams = attrs.field() method: str = attrs.field( @@ -11067,8 +10369,8 @@ class WorkspaceDidChangeWorkspaceFoldersNotification: @attrs.define class WindowWorkDoneProgressCancelNotification: - """The `window/workDoneProgress/cancel` notification is sent from the client to the - server to cancel a progress initiated on the server side.""" + """The `window/workDoneProgress/cancel` notification is sent from the client to the server to cancel a progress + initiated on the server side.""" params: WorkDoneProgressCancelParams = attrs.field() method: str = attrs.field( @@ -11084,8 +10386,7 @@ class WorkspaceDidCreateFilesNotification: """The did create files notification is sent from the client to the server when files were created from within the client. - @since 3.16.0 - """ + @since 3.16.0""" params: CreateFilesParams = attrs.field() method: str = attrs.field( @@ -11101,8 +10402,7 @@ class WorkspaceDidRenameFilesNotification: """The did rename files notification is sent from the client to the server when files were renamed from within the client. - @since 3.16.0 - """ + @since 3.16.0""" params: RenameFilesParams = attrs.field() method: str = attrs.field( @@ -11115,11 +10415,10 @@ class WorkspaceDidRenameFilesNotification: @attrs.define class WorkspaceDidDeleteFilesNotification: - """The will delete files request is sent from the client to the server before files - are actually deleted as long as the deletion is triggered from within the client. + """The will delete files request is sent from the client to the server before files are actually + deleted as long as the deletion is triggered from within the client. - @since 3.16.0 - """ + @since 3.16.0""" params: DeleteFilesParams = attrs.field() method: str = attrs.field( @@ -11134,8 +10433,7 @@ class WorkspaceDidDeleteFilesNotification: class NotebookDocumentDidOpenNotification: """A notification sent when a notebook opens. - @since 3.17.0 - """ + @since 3.17.0""" params: DidOpenNotebookDocumentParams = attrs.field() method: str = attrs.field( @@ -11161,8 +10459,7 @@ class NotebookDocumentDidChangeNotification: class NotebookDocumentDidSaveNotification: """A notification sent when a notebook document is saved. - @since 3.17.0 - """ + @since 3.17.0""" params: DidSaveNotebookDocumentParams = attrs.field() method: str = attrs.field( @@ -11177,8 +10474,7 @@ class NotebookDocumentDidSaveNotification: class NotebookDocumentDidCloseNotification: """A notification sent when a notebook closes. - @since 3.17.0 - """ + @since 3.17.0""" params: DidCloseNotebookDocumentParams = attrs.field() method: str = attrs.field( @@ -11191,9 +10487,9 @@ class NotebookDocumentDidCloseNotification: @attrs.define class InitializedNotification: - """The initialized notification is sent from the client to the server after the - client is fully initialized and the server is allowed to send requests from the - server to the client.""" + """The initialized notification is sent from the client to the + server after the client is fully initialized and the server + is allowed to send requests from the server to the client.""" params: InitializedParams = attrs.field() method: str = attrs.field( @@ -11206,8 +10502,8 @@ class InitializedNotification: @attrs.define class ExitNotification: - """The exit event is sent from the client to the server to ask the server to exit - its process.""" + """The exit event is sent from the client to the server to + ask the server to exit its process.""" params: Optional[None] = attrs.field(default=None) method: str = attrs.field( @@ -11220,12 +10516,9 @@ class ExitNotification: @attrs.define class WorkspaceDidChangeConfigurationNotification: - """The configuration change notification is sent from the client to the server when - the client's configuration has changed. - - The notification contains the changed configuration as defined by the language - client. - """ + """The configuration change notification is sent from the client to the server + when the client's configuration has changed. The notification contains + the changed configuration as defined by the language client.""" params: DidChangeConfigurationParams = attrs.field() method: str = attrs.field( @@ -11238,8 +10531,8 @@ class WorkspaceDidChangeConfigurationNotification: @attrs.define class WindowShowMessageNotification: - """The show message notification is sent from a server to a client to ask the client - to display a particular message in the user interface.""" + """The show message notification is sent from a server to a client to ask + the client to display a particular message in the user interface.""" params: ShowMessageParams = attrs.field() method: str = attrs.field( @@ -11252,8 +10545,8 @@ class WindowShowMessageNotification: @attrs.define class WindowLogMessageNotification: - """The log message notification is sent from the server to the client to ask the - client to log a particular message.""" + """The log message notification is sent from the server to the client to ask + the client to log a particular message.""" params: LogMessageParams = attrs.field() method: str = attrs.field( @@ -11266,8 +10559,8 @@ class WindowLogMessageNotification: @attrs.define class TelemetryEventNotification: - """The telemetry event notification is sent from the server to the client to ask the - client to log telemetry data.""" + """The telemetry event notification is sent from the server to the client to ask + the client to log telemetry data.""" params: LSPAny = attrs.field() method: str = attrs.field( @@ -11281,15 +10574,13 @@ class TelemetryEventNotification: @attrs.define class TextDocumentDidOpenNotification: """The document open notification is sent from the client to the server to signal - newly opened text documents. - - The document's truth is now managed by the client and the server must not try to - read the document's truth using the document's uri. Open in this sense means it is - managed by the client. It doesn't necessarily mean that its content is presented in - an editor. An open notification must not be sent more than once without a - corresponding close notification send before. This means open and close notification - must be balanced and the max open count is one. - """ + newly opened text documents. The document's truth is now managed by the client + and the server must not try to read the document's truth using the document's + uri. Open in this sense means it is managed by the client. It doesn't necessarily + mean that its content is presented in an editor. An open notification must not + be sent more than once without a corresponding close notification send before. + This means open and close notification must be balanced and the max open count + is one.""" params: DidOpenTextDocumentParams = attrs.field() method: str = attrs.field( @@ -11316,15 +10607,13 @@ class TextDocumentDidChangeNotification: @attrs.define class TextDocumentDidCloseNotification: - """The document close notification is sent from the client to the server when the - document got closed in the client. - - The document's truth now exists where the document's uri points to (e.g. if the - document's uri is a file uri the truth now exists on disk). As with the open - notification the close notification is about managing the document's content. - Receiving a close notification doesn't mean that the document was open in an editor - before. A close notification requires a previous open notification to be sent. - """ + """The document close notification is sent from the client to the server when + the document got closed in the client. The document's truth now exists where + the document's uri points to (e.g. if the document's uri is a file uri the + truth now exists on disk). As with the open notification the close notification + is about managing the document's content. Receiving a close notification + doesn't mean that the document was open in an editor before. A close + notification requires a previous open notification to be sent.""" params: DidCloseTextDocumentParams = attrs.field() method: str = attrs.field( @@ -11337,8 +10626,8 @@ class TextDocumentDidCloseNotification: @attrs.define class TextDocumentDidSaveNotification: - """The document save notification is sent from the client to the server when the - document got saved in the client.""" + """The document save notification is sent from the client to the server when + the document got saved in the client.""" params: DidSaveTextDocumentParams = attrs.field() method: str = attrs.field( @@ -11365,8 +10654,8 @@ class TextDocumentWillSaveNotification: @attrs.define class WorkspaceDidChangeWatchedFilesNotification: - """The watched files notification is sent from the client to the server when the - client detects changes to file watched by the language client.""" + """The watched files notification is sent from the client to the server when + the client detects changes to file watched by the language client.""" params: DidChangeWatchedFilesParams = attrs.field() method: str = attrs.field( @@ -11379,8 +10668,8 @@ class WorkspaceDidChangeWatchedFilesNotification: @attrs.define class TextDocumentPublishDiagnosticsNotification: - """Diagnostics notification are sent from the server to the client to signal results - of validation runs.""" + """Diagnostics notification are sent from the server to the client to signal + results of validation runs.""" params: PublishDiagnosticsParams = attrs.field() method: str = attrs.field( @@ -11493,6 +10782,7 @@ class MessageDirection(enum.Enum): TEXT_DOCUMENT_PREPARE_RENAME = "textDocument/prepareRename" TEXT_DOCUMENT_PREPARE_TYPE_HIERARCHY = "textDocument/prepareTypeHierarchy" TEXT_DOCUMENT_PUBLISH_DIAGNOSTICS = "textDocument/publishDiagnostics" +TEXT_DOCUMENT_RANGES_FORMATTING = "textDocument/rangesFormatting" TEXT_DOCUMENT_RANGE_FORMATTING = "textDocument/rangeFormatting" TEXT_DOCUMENT_REFERENCES = "textDocument/references" TEXT_DOCUMENT_RENAME = "textDocument/rename" @@ -11736,6 +11026,12 @@ class MessageDirection(enum.Enum): TypeHierarchyPrepareParams, TypeHierarchyRegistrationOptions, ), + TEXT_DOCUMENT_RANGES_FORMATTING: ( + TextDocumentRangesFormattingRequest, + TextDocumentRangesFormattingResponse, + DocumentRangesFormattingParams, + DocumentRangeFormattingRegistrationOptions, + ), TEXT_DOCUMENT_RANGE_FORMATTING: ( TextDocumentRangeFormattingRequest, TextDocumentRangeFormattingResponse, @@ -12066,6 +11362,7 @@ class MessageDirection(enum.Enum): TextDocumentPrepareRenameRequest, TextDocumentPrepareTypeHierarchyRequest, TextDocumentRangeFormattingRequest, + TextDocumentRangesFormattingRequest, TextDocumentReferencesRequest, TextDocumentRenameRequest, TextDocumentSelectionRangeRequest, @@ -12133,6 +11430,7 @@ class MessageDirection(enum.Enum): TextDocumentPrepareRenameResponse, TextDocumentPrepareTypeHierarchyResponse, TextDocumentRangeFormattingResponse, + TextDocumentRangesFormattingResponse, TextDocumentReferencesResponse, TextDocumentRenameResponse, TextDocumentSelectionRangeResponse, @@ -12329,6 +11627,8 @@ def is_keyword_class(cls: type) -> bool: TextDocumentPublishDiagnosticsNotification, TextDocumentRangeFormattingRequest, TextDocumentRangeFormattingResponse, + TextDocumentRangesFormattingRequest, + TextDocumentRangesFormattingResponse, TextDocumentReferencesRequest, TextDocumentReferencesResponse, TextDocumentRegistrationOptions, @@ -12637,6 +11937,10 @@ def is_special_class(cls: type) -> bool: "TextDocumentRangeFormattingRequest.method", "TextDocumentRangeFormattingResponse.jsonrpc", "TextDocumentRangeFormattingResponse.result", + "TextDocumentRangesFormattingRequest.jsonrpc", + "TextDocumentRangesFormattingRequest.method", + "TextDocumentRangesFormattingResponse.jsonrpc", + "TextDocumentRangesFormattingResponse.result", "TextDocumentReferencesRequest.jsonrpc", "TextDocumentReferencesRequest.method", "TextDocumentReferencesResponse.jsonrpc", @@ -12964,6 +12268,7 @@ def is_special_property(cls: type, property_name: str) -> bool: "DocumentRangeFormattingOptions": DocumentRangeFormattingOptions, "DocumentRangeFormattingParams": DocumentRangeFormattingParams, "DocumentRangeFormattingRegistrationOptions": DocumentRangeFormattingRegistrationOptions, + "DocumentRangesFormattingParams": DocumentRangesFormattingParams, "DocumentSelector": DocumentSelector, "DocumentSymbol": DocumentSymbol, "DocumentSymbolClientCapabilities": DocumentSymbolClientCapabilities, @@ -13279,6 +12584,8 @@ def is_special_property(cls: type, property_name: str) -> bool: "TextDocumentPublishDiagnosticsNotification": TextDocumentPublishDiagnosticsNotification, "TextDocumentRangeFormattingRequest": TextDocumentRangeFormattingRequest, "TextDocumentRangeFormattingResponse": TextDocumentRangeFormattingResponse, + "TextDocumentRangesFormattingRequest": TextDocumentRangesFormattingRequest, + "TextDocumentRangesFormattingResponse": TextDocumentRangesFormattingResponse, "TextDocumentReferencesRequest": TextDocumentReferencesRequest, "TextDocumentReferencesResponse": TextDocumentReferencesResponse, "TextDocumentRegistrationOptions": TextDocumentRegistrationOptions, @@ -13447,6 +12754,7 @@ def is_special_property(cls: type, property_name: str) -> bool: TEXT_DOCUMENT_PREPARE_CALL_HIERARCHY: "clientToServer", TEXT_DOCUMENT_PREPARE_RENAME: "clientToServer", TEXT_DOCUMENT_PREPARE_TYPE_HIERARCHY: "clientToServer", + TEXT_DOCUMENT_RANGES_FORMATTING: "clientToServer", TEXT_DOCUMENT_RANGE_FORMATTING: "clientToServer", TEXT_DOCUMENT_REFERENCES: "clientToServer", TEXT_DOCUMENT_RENAME: "clientToServer", diff --git a/packages/python/requirements.txt b/packages/python/requirements.txt index f42f429..89c92a8 100644 --- a/packages/python/requirements.txt +++ b/packages/python/requirements.txt @@ -2,7 +2,7 @@ # This file is autogenerated by pip-compile with Python 3.7 # by the following command: # -# pip-compile --generate-hashes ./packages/python/requirements.in +# pip-compile --generate-hashes --resolver=backtracking ./packages/python/requirements.in # attrs==23.1.0 \ --hash=sha256:1f28b4522cdc2fb4256ac1a020c78acf9cba2c6b461ccd2c126f3aa8e8335d04 \ @@ -10,21 +10,21 @@ attrs==23.1.0 \ # via # -r ./packages/python/requirements.in # cattrs -cattrs==22.2.0 \ - --hash=sha256:bc12b1f0d000b9f9bee83335887d532a1d3e99a833d1bf0882151c97d3e68c21 \ - --hash=sha256:f0eed5642399423cf656e7b66ce92cdc5b963ecafd041d1b24d136fdde7acf6d +cattrs==23.1.2 \ + --hash=sha256:b2bb14311ac17bed0d58785e5a60f022e5431aca3932e3fc5cc8ed8639de50a4 \ + --hash=sha256:db1c821b8c537382b2c7c66678c3790091ca0275ac486c76f3c8f3920e83c657 # via -r ./packages/python/requirements.in exceptiongroup==1.1.1 \ --hash=sha256:232c37c63e4f682982c8b6459f33a8981039e5fb8756b2074364e5055c498c9e \ --hash=sha256:d484c3090ba2889ae2928419117447a14daf3c1231d5e30d0aae34f354f01785 # via cattrs -importlib-metadata==6.6.0 \ - --hash=sha256:43dd286a2cd8995d5eaef7fee2066340423b818ed3fd70adf0bad5f1fac53fed \ - --hash=sha256:92501cdf9cc66ebd3e612f1b4f0c0765dfa42f0fa38ffb319b6bd84dd675d705 +importlib-metadata==6.7.0 \ + --hash=sha256:1aaf550d4f73e5d6783e7acb77aec43d49da8017410afae93822cc9cca98c4d4 \ + --hash=sha256:cb52082e659e97afc5dac71e79de97d8681de3aa07ff18578330904a9d18e5b5 # via attrs -typing-extensions==4.5.0 \ - --hash=sha256:5cb5f4a79139d699607b3ef622a1dedafa84e115ab0024e0d9c044a9479ca7cb \ - --hash=sha256:fb33085c39dd998ac16d1431ebc293a8b3eedd00fd4a32de0ff79002c19511b4 +typing-extensions==4.6.3 \ + --hash=sha256:88a4153d8505aabbb4e13aacb7c486c2b4a33ca3b3f807914a9b4c844c471c26 \ + --hash=sha256:d91d5919357fe7f681a9f2b5b4cb2a5f1ef0a1e9f59c4d8ff0d3491e05c0ffd5 # via # cattrs # importlib-metadata diff --git a/packages/rust/lsprotocol/src/lib.rs b/packages/rust/lsprotocol/src/lib.rs index 5ca4090..d88e64a 100644 --- a/packages/rust/lsprotocol/src/lib.rs +++ b/packages/rust/lsprotocol/src/lib.rs @@ -260,6 +260,8 @@ pub enum LSPRequestMethods { TextDocumentFormatting, #[serde(rename = "textDocument/rangeFormatting")] TextDocumentRangeFormatting, + #[serde(rename = "textDocument/rangesFormatting")] + TextDocumentRangesFormatting, #[serde(rename = "textDocument/onTypeFormatting")] TextDocumentOnTypeFormatting, #[serde(rename = "textDocument/rename")] @@ -330,12 +332,12 @@ pub enum LSPNotificationMethods { #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] pub enum MessageDirection { + #[serde(rename = "clientToServer")] + ClientToServer, #[serde(rename = "serverToClient")] ServerToClient, #[serde(rename = "both")] Both, - #[serde(rename = "clientToServer")] - ClientToServer, } /// A set of predefined token types. This set is not fixed @@ -3984,6 +3986,34 @@ pub struct DocumentRangeFormattingRegistrationOptions { /// the document selector provided on the client side will be used. #[serde(skip_serializing_if = "Option::is_none")] pub document_selector: Option, + + /// Whether the server supports formatting multiple ranges at once. + /// + /// @since 3.18.0 + /// @proposed + #[cfg(feature = "proposed", since = "3.18.0")] + pub ranges_support: Option, +} + +/// The parameters of a [DocumentRangesFormattingRequest]. +/// +/// @since 3.18.0 +/// @proposed +#[cfg(feature = "proposed", since = "3.18.0")] +#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[serde(rename_all = "camelCase")] +pub struct DocumentRangesFormattingParams { + /// The format options + pub options: FormattingOptions, + + /// The ranges to format + pub ranges: Vec, + + /// The document to format. + pub text_document: TextDocumentIdentifier, + + /// An optional token that a server can use to report work done progress. + pub work_done_token: Option, } /// The parameters of a [DocumentOnTypeFormattingRequest]. @@ -5779,6 +5809,13 @@ pub struct DocumentFormattingOptions { #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] #[serde(rename_all = "camelCase")] pub struct DocumentRangeFormattingOptions { + /// Whether the server supports formatting multiple ranges at once. + /// + /// @since 3.18.0 + /// @proposed + #[cfg(feature = "proposed", since = "3.18.0")] + pub ranges_support: Option, + pub work_done_progress: Option, } @@ -7292,6 +7329,13 @@ pub struct DocumentFormattingClientCapabilities { pub struct DocumentRangeFormattingClientCapabilities { /// Whether range formatting supports dynamic registration. pub dynamic_registration: Option, + + /// Whether the client supports formatting multiple ranges at once. + /// + /// @since 3.18.0 + /// @proposed + #[cfg(feature = "proposed", since = "3.18.0")] + pub ranges_support: Option, } /// Client capabilities of a [DocumentOnTypeFormattingRequest]. @@ -10162,6 +10206,43 @@ pub struct TextDocumentRangeFormattingResponse { pub result: Option>, } +/// A request to format ranges in a document. +/// +/// @since 3.18.0 +/// @proposed +#[cfg(feature = "proposed", since = "3.18.0")] +#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[serde(rename_all = "camelCase")] +pub struct TextDocumentRangesFormattingRequest { + /// The version of the JSON RPC protocol. + pub jsonrpc: String, + + /// The method to be invoked. + pub method: LSPRequestMethods, + + /// The request id. + pub id: LSPId, + + pub params: DocumentRangesFormattingParams, +} + +/// Response to the [TextDocumentRangesFormattingRequest]. +#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[serde(rename_all = "camelCase")] +pub struct TextDocumentRangesFormattingResponse { + /// The version of the JSON RPC protocol. + pub jsonrpc: String, + + /// The method to be invoked. + pub method: LSPRequestMethods, + + /// The request id. + pub id: LSPIdOptional, + + #[serde(skip_serializing_if = "Option::is_none")] + pub result: Option>, +} + /// A request to format a document on type. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] #[serde(rename_all = "camelCase")] diff --git a/requirements.txt b/requirements.txt index c5411f8..a268b9a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ # This file is autogenerated by pip-compile with Python 3.7 # by the following command: # -# pip-compile --generate-hashes ./requirements.in +# pip-compile --generate-hashes --resolver=backtracking ./requirements.in # attrs==23.1.0 \ --hash=sha256:1f28b4522cdc2fb4256ac1a020c78acf9cba2c6b461ccd2c126f3aa8e8335d04 \ @@ -11,9 +11,9 @@ attrs==23.1.0 \ # -r ./requirements.in # cattrs # jsonschema -cattrs==22.2.0 \ - --hash=sha256:bc12b1f0d000b9f9bee83335887d532a1d3e99a833d1bf0882151c97d3e68c21 \ - --hash=sha256:f0eed5642399423cf656e7b66ce92cdc5b963ecafd041d1b24d136fdde7acf6d +cattrs==23.1.2 \ + --hash=sha256:b2bb14311ac17bed0d58785e5a60f022e5431aca3932e3fc5cc8ed8639de50a4 \ + --hash=sha256:db1c821b8c537382b2c7c66678c3790091ca0275ac486c76f3c8f3920e83c657 # via -r ./requirements.in colorama==0.4.6 \ --hash=sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44 \ @@ -25,9 +25,9 @@ exceptiongroup==1.1.1 \ # via # cattrs # pytest -importlib-metadata==6.6.0 \ - --hash=sha256:43dd286a2cd8995d5eaef7fee2066340423b818ed3fd70adf0bad5f1fac53fed \ - --hash=sha256:92501cdf9cc66ebd3e612f1b4f0c0765dfa42f0fa38ffb319b6bd84dd675d705 +importlib-metadata==6.7.0 \ + --hash=sha256:1aaf550d4f73e5d6783e7acb77aec43d49da8017410afae93822cc9cca98c4d4 \ + --hash=sha256:cb52082e659e97afc5dac71e79de97d8681de3aa07ff18578330904a9d18e5b5 # via # attrs # jsonschema @@ -55,9 +55,9 @@ pkgutil-resolve-name==1.3.10 \ --hash=sha256:357d6c9e6a755653cfd78893817c0853af365dd51ec97f3d358a819373bbd174 \ --hash=sha256:ca27cc078d25c5ad71a9de0a7a330146c4e014c2462d9af19c6b828280649c5e # via jsonschema -pluggy==1.0.0 \ - --hash=sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159 \ - --hash=sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3 +pluggy==1.2.0 \ + --hash=sha256:c2fd55a7d7a3863cba1a013e4e2414658b1d07b6bc57b3919e0c63c9abb99849 \ + --hash=sha256:d12f0c4b579b15f5e054301bb226ee85eeeba08ffec228092f8defbaa3a4c4b3 # via pytest pyhamcrest==2.0.4 \ --hash=sha256:60a41d4783b9d56c9ec8586635d2301db5072b3ea8a51c32dd03c408ae2b0f79 \ @@ -92,17 +92,17 @@ pyrsistent==0.19.3 \ --hash=sha256:f0774bf48631f3a20471dd7c5989657b639fd2d285b861237ea9e82c36a415a9 \ --hash=sha256:f0e7c4b2f77593871e918be000b96c8107da48444d57005b6a6bc61fb4331b2c # via jsonschema -pytest==7.3.1 \ - --hash=sha256:3799fa815351fea3a5e96ac7e503a96fa51cc9942c3753cda7651b93c1cfa362 \ - --hash=sha256:434afafd78b1d78ed0addf160ad2b77a30d35d4bdf8af234fe621919d9ed15e3 +pytest==7.4.0 \ + --hash=sha256:78bf16451a2eb8c7a2ea98e32dc119fd2aa758f1d5d66dbf0a59d69a3969df32 \ + --hash=sha256:b4bf8c45bd59934ed84001ad51e11b4ee40d40a1229d2c79f9c592b0a3f6bd8a # via -r ./requirements.in tomli==2.0.1 \ --hash=sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc \ --hash=sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f # via pytest -typing-extensions==4.5.0 \ - --hash=sha256:5cb5f4a79139d699607b3ef622a1dedafa84e115ab0024e0d9c044a9479ca7cb \ - --hash=sha256:fb33085c39dd998ac16d1431ebc293a8b3eedd00fd4a32de0ff79002c19511b4 +typing-extensions==4.6.3 \ + --hash=sha256:88a4153d8505aabbb4e13aacb7c486c2b4a33ca3b3f807914a9b4c844c471c26 \ + --hash=sha256:d91d5919357fe7f681a9f2b5b4cb2a5f1ef0a1e9f59c4d8ff0d3491e05c0ffd5 # via # cattrs # importlib-metadata