From da476b67d0548dd31d6dee2a562a77ba3a03ae71 Mon Sep 17 00:00:00 2001 From: Karthik Nadig Date: Thu, 10 Aug 2023 11:30:51 -0700 Subject: [PATCH] Update packages to latest LSP model --- generator/lsp.json | 20 +++++++------- noxfile.py | 31 ++++++++++----------- packages/python/lsprotocol/types.py | 43 +++++++++++++---------------- packages/python/requirements.txt | 14 +++++----- packages/rust/lsprotocol/src/lib.rs | 35 ++++++++++------------- requirements.txt | 12 ++++---- 6 files changed, 72 insertions(+), 83 deletions(-) diff --git a/generator/lsp.json b/generator/lsp.json index 7b88937..18fd199 100644 --- a/generator/lsp.json +++ b/generator/lsp.json @@ -53,7 +53,7 @@ "kind": "reference", "name": "ImplementationRegistrationOptions" }, - "documentation": "A request to resolve the implementation locations of a symbol at a given text\ndocument position. The request's parameter is of type [TextDocumentPositionParams]\n(#TextDocumentPositionParams) the response is of type {@link Definition} or a\nThenable that resolves to such." + "documentation": "A request to resolve the implementation locations of a symbol at a given text\ndocument position. The request's parameter is of type {@link TextDocumentPositionParams}\nthe response is of type {@link Definition} or a Thenable that resolves to such." }, { "method": "textDocument/typeDefinition", @@ -105,7 +105,7 @@ "kind": "reference", "name": "TypeDefinitionRegistrationOptions" }, - "documentation": "A request to resolve the type definition locations of a symbol at a given text\ndocument position. The request's parameter is of type [TextDocumentPositionParams]\n(#TextDocumentPositionParams) the response is of type {@link Definition} or a\nThenable that resolves to such." + "documentation": "A request to resolve the type definition locations of a symbol at a given text\ndocument position. The request's parameter is of type {@link TextDocumentPositionParams}\nthe response is of type {@link Definition} or a Thenable that resolves to such." }, { "method": "workspace/workspaceFolders", @@ -293,7 +293,7 @@ "kind": "reference", "name": "DeclarationRegistrationOptions" }, - "documentation": "A request to resolve the type definition locations of a symbol at a given text\ndocument position. The request's parameter is of type [TextDocumentPositionParams]\n(#TextDocumentPositionParams) the response is of type {@link Declaration}\nor a typed array of {@link DeclarationLink} or a Thenable that resolves\nto such." + "documentation": "A request to resolve the type definition locations of a symbol at a given text\ndocument position. The request's parameter is of type {@link TextDocumentPositionParams}\nthe response is of type {@link Declaration} or a typed array of {@link DeclarationLink}\nor a Thenable that resolves to such." }, { "method": "textDocument/selectionRange", @@ -1274,7 +1274,7 @@ "kind": "reference", "name": "DefinitionRegistrationOptions" }, - "documentation": "A request to resolve the definition location of a symbol at a given text\ndocument position. The request's parameter is of type [TextDocumentPosition]\n(#TextDocumentPosition) the response is of either type {@link Definition}\nor a typed array of {@link DefinitionLink} or a Thenable that resolves\nto such." + "documentation": "A request to resolve the definition location of a symbol at a given text\ndocument position. The request's parameter is of type {@link TextDocumentPosition}\nthe response is of either type {@link Definition} or a typed array of\n{@link DefinitionLink} or a Thenable that resolves to such." }, { "method": "textDocument/references", @@ -1346,7 +1346,7 @@ "kind": "reference", "name": "DocumentHighlightRegistrationOptions" }, - "documentation": "Request to resolve a {@link DocumentHighlight} for a given\ntext document position. The request's parameter is of type [TextDocumentPosition]\n(#TextDocumentPosition) the request response is of type [DocumentHighlight[]]\n(#DocumentHighlight) or a Thenable that resolves to such." + "documentation": "Request to resolve a {@link DocumentHighlight} for a given\ntext document position. The request's parameter is of type {@link TextDocumentPosition}\nthe request response is an array of type {@link DocumentHighlight}\nor a Thenable that resolves to such." }, { "method": "textDocument/documentSymbol", @@ -5818,7 +5818,7 @@ "name": "LSPAny" }, "optional": true, - "documentation": "A data entry field that is preserved on a code lens item between\na {@link CodeLensRequest} and a [CodeLensResolveRequest]\n(#CodeLensResolveRequest)" + "documentation": "A data entry field that is preserved on a code lens item between\na {@link CodeLensRequest} and a {@link CodeLensResolveRequest}" } ], "documentation": "A code lens represents a {@link Command command} that should be shown along with\nsource text, like the number of references, a way to run tests, etc.\n\nA code lens is _unresolved_ when no command is associated to it. For performance\nreasons the creation of a code lens and resolving should be done in two stages." @@ -6754,7 +6754,7 @@ "documentation": "Character offset on a line in a document (zero-based).\n\nThe meaning of this offset is determined by the negotiated\n`PositionEncodingKind`.\n\nIf the character value is greater than the line length it defaults back to the\nline length." } ], - "documentation": "Position in a text document expressed as zero-based line and character\noffset. Prior to 3.17 the offsets were always based on a UTF-16 string\nrepresentation. So a string of the form `a𐐀b` the character offset of the\ncharacter `a` is 0, the character offset of `𐐀` is 1 and the character\noffset of b is 3 since `𐐀` is represented using two code units in UTF-16.\nSince 3.17 clients and servers can agree on a different string encoding\nrepresentation (e.g. UTF-8). The client announces it's supported encoding\nvia the client capability [`general.positionEncodings`](#clientCapabilities).\nThe value is an array of position encodings the client supports, with\ndecreasing preference (e.g. the encoding at index `0` is the most preferred\none). To stay backwards compatible the only mandatory encoding is UTF-16\nrepresented via the string `utf-16`. The server can pick one of the\nencodings offered by the client and signals that encoding back to the\nclient via the initialize result's property\n[`capabilities.positionEncoding`](#serverCapabilities). If the string value\n`utf-16` is missing from the client's capability `general.positionEncodings`\nservers can safely assume that the client supports UTF-16. If the server\nomits the position encoding in its initialize result the encoding defaults\nto the string value `utf-16`. Implementation considerations: since the\nconversion from one encoding into another requires the content of the\nfile / line the conversion is best done where the file is read which is\nusually on the server side.\n\nPositions are line end character agnostic. So you can not specify a position\nthat denotes `\\r|\\n` or `\\n|` where `|` represents the character offset.\n\n@since 3.17.0 - support for negotiated position encoding.", + "documentation": "Position in a text document expressed as zero-based line and character\noffset. Prior to 3.17 the offsets were always based on a UTF-16 string\nrepresentation. So a string of the form `a𐐀b` the character offset of the\ncharacter `a` is 0, the character offset of `𐐀` is 1 and the character\noffset of b is 3 since `𐐀` is represented using two code units in UTF-16.\nSince 3.17 clients and servers can agree on a different string encoding\nrepresentation (e.g. UTF-8). The client announces it's supported encoding\nvia the client capability [`general.positionEncodings`](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#clientCapabilities).\nThe value is an array of position encodings the client supports, with\ndecreasing preference (e.g. the encoding at index `0` is the most preferred\none). To stay backwards compatible the only mandatory encoding is UTF-16\nrepresented via the string `utf-16`. The server can pick one of the\nencodings offered by the client and signals that encoding back to the\nclient via the initialize result's property\n[`capabilities.positionEncoding`](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#serverCapabilities). If the string value\n`utf-16` is missing from the client's capability `general.positionEncodings`\nservers can safely assume that the client supports UTF-16. If the server\nomits the position encoding in its initialize result the encoding defaults\nto the string value `utf-16`. Implementation considerations: since the\nconversion from one encoding into another requires the content of the\nfile / line the conversion is best done where the file is read which is\nusually on the server side.\n\nPositions are line end character agnostic. So you can not specify a position\nthat denotes `\\r|\\n` or `\\n|` where `|` represents the character offset.\n\n@since 3.17.0 - support for negotiated position encoding.", "since": "3.17.0 - support for negotiated position encoding." }, { @@ -14590,7 +14590,7 @@ "name": "string" }, "optional": true, - "documentation": "A glob pattern, like `*.{ts,js}`." + "documentation": "A glob pattern, like **​/*.{ts,js}. See TextDocumentFilter for examples`." } ] } @@ -14623,7 +14623,7 @@ "name": "string" }, "optional": true, - "documentation": "A glob pattern, like `*.{ts,js}`." + "documentation": "A glob pattern, like **​/*.{ts,js}. See TextDocumentFilter for examples`." } ] } @@ -14656,7 +14656,7 @@ "kind": "base", "name": "string" }, - "documentation": "A glob pattern, like `*.{ts,js}`." + "documentation": "A glob pattern, like **​/*.{ts,js}. See TextDocumentFilter for examples`." } ] } diff --git a/noxfile.py b/noxfile.py index 6fb1117..4717e0d 100644 --- a/noxfile.py +++ b/noxfile.py @@ -26,16 +26,6 @@ def tests(session: nox.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): @@ -62,13 +52,22 @@ def format(session: nox.Session): def _format_code(session: nox.Session): session.install("isort", "black") - session.run("isort", "--profile", "black", ".") - session.run("black", ".") + session.run("isort", "--profile", "black", "noxfile.py") + session.run("black", "noxfile.py") + + session.run("isort", "--profile", "black", "generator") + session.run("black", "generator") + + session.run("isort", "--profile", "black", "tests/generator") + session.run("black", "tests/generator") + + session.run("isort", "--profile", "black", "tests/python") + session.run("black", "tests/python") # this is for the lsprotocol package only - 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)) + python_package_path = os.fspath(pathlib.Path("./packages/python/lsprotocol")) + session.run("isort", "--profile", "black", python_package_path) + session.run("black", python_package_path) @nox.session() @@ -92,7 +91,7 @@ def _get_content(uri) -> str: MODEL = "https://raw.githubusercontent.com/microsoft/vscode-languageserver-node/main/protocol/metaModel.json" -def _download_models(session: nox.session): +def _download_models(session: nox.Session): session.log("Downloading LSP model schema.") model_schema_text: str = _get_content(MODEL_SCHEMA) session.log("Downloading LSP model.") diff --git a/packages/python/lsprotocol/types.py b/packages/python/lsprotocol/types.py index c0b330d..93dc89c 100644 --- a/packages/python/lsprotocol/types.py +++ b/packages/python/lsprotocol/types.py @@ -865,7 +865,7 @@ class TextDocumentFilter_Type1: validator=attrs.validators.optional(attrs.validators.instance_of(str)), default=None, ) - """A glob pattern, like `*.{ts,js}`.""" + """A glob pattern, like **/*.{ts,js}. See TextDocumentFilter for examples`.""" @attrs.define @@ -883,13 +883,13 @@ class TextDocumentFilter_Type2: validator=attrs.validators.optional(attrs.validators.instance_of(str)), default=None, ) - """A glob pattern, like `*.{ts,js}`.""" + """A glob pattern, like **/*.{ts,js}. See TextDocumentFilter for examples`.""" @attrs.define class TextDocumentFilter_Type3: pattern: str = attrs.field(validator=attrs.validators.instance_of(str)) - """A glob pattern, like `*.{ts,js}`.""" + """A glob pattern, like **/*.{ts,js}. See TextDocumentFilter for examples`.""" language: Optional[str] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(str)), @@ -4408,8 +4408,7 @@ class CodeLens: 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 {@link CodeLensRequest} and a {@link CodeLensResolveRequest}""" @attrs.define @@ -5106,14 +5105,14 @@ class Position: offset of b is 3 since `𐐀` is represented using two code units in UTF-16. Since 3.17 clients and servers can agree on a different string encoding representation (e.g. UTF-8). The client announces it's supported encoding - via the client capability [`general.positionEncodings`](#clientCapabilities). + via the client capability [`general.positionEncodings`](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#clientCapabilities). The value is an array of position encodings the client supports, with decreasing preference (e.g. the encoding at index `0` is the most preferred one). To stay backwards compatible the only mandatory encoding is UTF-16 represented via the string `utf-16`. The server can pick one of the encodings offered by the client and signals that encoding back to the client via the initialize result's property - [`capabilities.positionEncoding`](#serverCapabilities). If the string value + [`capabilities.positionEncoding`](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#serverCapabilities). If the string value `utf-16` is missing from the client's capability `general.positionEncodings` servers can safely assume that the client supports UTF-16. If the server omits the position encoding in its initialize result the encoding defaults @@ -8877,9 +8876,8 @@ 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] - (#TextDocumentPositionParams) the response is of type {@link Definition} or a - Thenable that resolves to such.""" + document position. The request's parameter is of type {@link TextDocumentPositionParams} + the response is of type {@link Definition} or a Thenable that resolves to such.""" id: Union[int, str] = attrs.field() """The request id.""" @@ -8900,9 +8898,8 @@ 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] - (#TextDocumentPositionParams) the response is of type {@link Definition} or a - Thenable that resolves to such.""" + document position. The request's parameter is of type {@link TextDocumentPositionParams} + the response is of type {@link Definition} or a Thenable that resolves to such.""" id: Union[int, str] = attrs.field() """The request id.""" @@ -9041,10 +9038,9 @@ 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 {@link 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.""" @@ -9897,10 +9893,9 @@ 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.""" + document position. The request's parameter is of type {@link 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.""" @@ -9944,9 +9939,9 @@ 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.""" + text document position. The request's parameter is of type {@link TextDocumentPosition} + the request response is an array of type {@link DocumentHighlight} + or a Thenable that resolves to such.""" id: Union[int, str] = attrs.field() """The request id.""" diff --git a/packages/python/requirements.txt b/packages/python/requirements.txt index 89c92a8..4892dad 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 --resolver=backtracking ./packages/python/requirements.in +# pip-compile --config=pyproject.toml --generate-hashes --resolver=backtracking ./packages/python/requirements.in # attrs==23.1.0 \ --hash=sha256:1f28b4522cdc2fb4256ac1a020c78acf9cba2c6b461ccd2c126f3aa8e8335d04 \ @@ -14,17 +14,17 @@ 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 +exceptiongroup==1.1.2 \ + --hash=sha256:12c3e887d6485d16943a309616de20ae5582633e0a2eda17f4e10fd61c1e8af5 \ + --hash=sha256:e346e69d186172ca7cf029c8c1d16235aa0e04035e5750b4b95039e65204328f # via cattrs importlib-metadata==6.7.0 \ --hash=sha256:1aaf550d4f73e5d6783e7acb77aec43d49da8017410afae93822cc9cca98c4d4 \ --hash=sha256:cb52082e659e97afc5dac71e79de97d8681de3aa07ff18578330904a9d18e5b5 # via attrs -typing-extensions==4.6.3 \ - --hash=sha256:88a4153d8505aabbb4e13aacb7c486c2b4a33ca3b3f807914a9b4c844c471c26 \ - --hash=sha256:d91d5919357fe7f681a9f2b5b4cb2a5f1ef0a1e9f59c4d8ff0d3491e05c0ffd5 +typing-extensions==4.7.1 \ + --hash=sha256:440d5dd3af93b060174bf433bccd69b0babc3b15b1a8dca43789fd7f61514b36 \ + --hash=sha256:b75ddc264f0ba5615db7ba217daeb99701ad295353c45f9e95963337ceeeffb2 # via # cattrs # importlib-metadata diff --git a/packages/rust/lsprotocol/src/lib.rs b/packages/rust/lsprotocol/src/lib.rs index d88e64a..f7cd686 100644 --- a/packages/rust/lsprotocol/src/lib.rs +++ b/packages/rust/lsprotocol/src/lib.rs @@ -334,10 +334,10 @@ pub enum LSPNotificationMethods { pub enum MessageDirection { #[serde(rename = "clientToServer")] ClientToServer, - #[serde(rename = "serverToClient")] - ServerToClient, #[serde(rename = "both")] Both, + #[serde(rename = "serverToClient")] + ServerToClient, } /// A set of predefined token types. This set is not fixed @@ -1355,7 +1355,7 @@ pub struct StructTextDocumentFilter { /// A Uri [scheme][`Uri::scheme`], like `file` or `untitled`. pub scheme: Option, - /// A glob pattern, like `*.{ts,js}`. + /// A glob pattern, like **​/*.{ts,js}. See TextDocumentFilter for examples`. pub pattern: Option, } @@ -1368,7 +1368,7 @@ pub struct StructTextDocumentFilterScheme { /// A Uri [scheme][`Uri::scheme`], like `file` or `untitled`. pub scheme: String, - /// A glob pattern, like `*.{ts,js}`. + /// A glob pattern, like **​/*.{ts,js}. See TextDocumentFilter for examples`. pub pattern: Option, } @@ -1381,7 +1381,7 @@ pub struct StructTextDocumentFilterPattern { /// A Uri [scheme][`Uri::scheme`], like `file` or `untitled`. pub scheme: Option, - /// A glob pattern, like `*.{ts,js}`. + /// A glob pattern, like **​/*.{ts,js}. See TextDocumentFilter for examples`. pub pattern: String, } @@ -3864,7 +3864,6 @@ pub struct CodeLens { /// A data entry field that is preserved on a code lens item between /// a [CodeLensRequest] and a [CodeLensResolveRequest] - /// (#CodeLensResolveRequest) pub data: Option, /// The range in which this code lens is valid. Should only span a single line. @@ -4421,14 +4420,14 @@ pub struct DeclarationOptions { /// offset of b is 3 since `𐐀` is represented using two code units in UTF-16. /// Since 3.17 clients and servers can agree on a different string encoding /// representation (e.g. UTF-8). The client announces it's supported encoding -/// via the client capability [`general.positionEncodings`](#clientCapabilities). +/// via the client capability [`general.positionEncodings`](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#clientCapabilities). /// The value is an array of position encodings the client supports, with /// decreasing preference (e.g. the encoding at index `0` is the most preferred /// one). To stay backwards compatible the only mandatory encoding is UTF-16 /// represented via the string `utf-16`. The server can pick one of the /// encodings offered by the client and signals that encoding back to the /// client via the initialize result's property -/// [`capabilities.positionEncoding`](#serverCapabilities). If the string value +/// [`capabilities.positionEncoding`](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#serverCapabilities). If the string value /// `utf-16` is missing from the client's capability `general.positionEncodings` /// servers can safely assume that the client supports UTF-16. If the server /// omits the position encoding in its initialize result the encoding defaults @@ -8120,8 +8119,7 @@ pub enum LSPIdOptional { /// A request to resolve the implementation locations of a symbol at a given text /// document position. The request's parameter is of type [TextDocumentPositionParams] -/// (#TextDocumentPositionParams) the response is of type [Definition] or a -/// Thenable that resolves to such. +/// the response is of type [Definition] or a Thenable that resolves to such. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] #[serde(rename_all = "camelCase")] pub struct TextDocumentImplementationRequest { @@ -8156,8 +8154,7 @@ pub struct TextDocumentImplementationResponse { /// 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 [Definition] or a -/// Thenable that resolves to such. +/// the response is of type [Definition] or a Thenable that resolves to such. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] #[serde(rename_all = "camelCase")] pub struct TextDocumentTypeDefinitionRequest { @@ -8367,9 +8364,8 @@ pub struct TextDocumentFoldingRangeResponse { /// 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 [Declaration] -/// or a typed array of [DeclarationLink] or a Thenable that resolves -/// to such. +/// the response is of type [Declaration] or a typed array of [DeclarationLink] +/// or a Thenable that resolves to such. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] #[serde(rename_all = "camelCase")] pub struct TextDocumentDeclarationRequest { @@ -9691,9 +9687,8 @@ pub struct TextDocumentSignatureHelpResponse { /// 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 [Definition] -/// or a typed array of [DefinitionLink] or a Thenable that resolves -/// to such. +/// the response is of either type [Definition] or a typed array of +/// [DefinitionLink] or a Thenable that resolves to such. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] #[serde(rename_all = "camelCase")] pub struct TextDocumentDefinitionRequest { @@ -9764,8 +9759,8 @@ pub struct TextDocumentReferencesResponse { /// Request to resolve a [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. +/// the request response is an array of type [DocumentHighlight] +/// or a Thenable that resolves to such. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] #[serde(rename_all = "camelCase")] pub struct TextDocumentDocumentHighlightRequest { diff --git a/requirements.txt b/requirements.txt index a268b9a..5750da9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -19,9 +19,9 @@ colorama==0.4.6 \ --hash=sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44 \ --hash=sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6 # via pytest -exceptiongroup==1.1.1 \ - --hash=sha256:232c37c63e4f682982c8b6459f33a8981039e5fb8756b2074364e5055c498c9e \ - --hash=sha256:d484c3090ba2889ae2928419117447a14daf3c1231d5e30d0aae34f354f01785 +exceptiongroup==1.1.2 \ + --hash=sha256:12c3e887d6485d16943a309616de20ae5582633e0a2eda17f4e10fd61c1e8af5 \ + --hash=sha256:e346e69d186172ca7cf029c8c1d16235aa0e04035e5750b4b95039e65204328f # via # cattrs # pytest @@ -100,9 +100,9 @@ tomli==2.0.1 \ --hash=sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc \ --hash=sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f # via pytest -typing-extensions==4.6.3 \ - --hash=sha256:88a4153d8505aabbb4e13aacb7c486c2b4a33ca3b3f807914a9b4c844c471c26 \ - --hash=sha256:d91d5919357fe7f681a9f2b5b4cb2a5f1ef0a1e9f59c4d8ff0d3491e05c0ffd5 +typing-extensions==4.7.1 \ + --hash=sha256:440d5dd3af93b060174bf433bccd69b0babc3b15b1a8dca43789fd7f61514b36 \ + --hash=sha256:b75ddc264f0ba5615db7ba217daeb99701ad295353c45f9e95963337ceeeffb2 # via # cattrs # importlib-metadata