diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 7fdb047..db7a74a 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -11,10 +11,10 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Use Python 3.7 + - name: Use Python 3.8 uses: actions/setup-python@v4 with: - python-version: 3.7 + python-version: 3.8 - name: Pip cache uses: actions/cache@v3 @@ -28,8 +28,8 @@ jobs: run: python -m pip install nox shell: bash - - name: Build sdist and wheels - run: python -m nox --session build + - name: Build pypi package + run: python -m nox --session build_python_package shell: bash - name: Upload Python Packages to Artifacts @@ -96,7 +96,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, windows-latest] - python: ['3.7', '3.8', '3.9', '3.10', '3.11'] + python: ['3.8', '3.9', '3.10', '3.11', '3.12'] steps: - name: Checkout @@ -115,6 +115,37 @@ jobs: run: python -m nox --session tests shell: bash + rust-tests: + name: 'Rust Tests' + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest] + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install Python + uses: actions/setup-python@v4 + with: + python-version: '3.x' + + - name: Rust Tool Chain setup + uses: dtolnay/rust-toolchain@stable + + - name: Install Generator + run: python -m pip install -r ./requirements.txt + + - name: Generate Test Data + run: python -m generator --plugin testdata + + - name: Rust Run Tests + run: cargo test --manifest-path tests/rust/Cargo.toml + shell: bash + env: + LSP_TEST_DATA_PATH: ${{ github.workspace }}/packages/testdata + dotnet-tests: name: Dotnet Tests runs-on: ${{ matrix.os }} @@ -187,52 +218,52 @@ jobs: if-no-files-found: error retention-days: 7 - smoke-tests: - name: Smoke Tests (pygls) - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, windows-latest] - python: ['3.7', '3.8', '3.9', '3.10', '3.11'] - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Checkout Pygls - uses: actions/checkout@v4 - with: - repository: openlawlibrary/pygls - path: smoke_tests - - - name: Use Python ${{ matrix.python }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python }} - - - name: Update pip, install wheel - run: python -m pip install -U pip wheel - shell: bash - - - name: Install pip pygls dependencies - run: python -m pip install typeguard mock pytest pytest-asyncio - shell: bash - - - name: Install pip lsprotocol dependencies - run: python -m pip install -r ./packages/python/requirements.txt - shell: bash - - - name: Install pygls - run: python -m pip install --no-deps ./smoke_tests - shell: bash - - - name: Pip List - run: python -m pip list - shell: bash - - - name: Run Tests - run: python -m pytest smoke_tests/tests - env: - PYTHONPATH: ./packages/python - shell: bash + # smoke-tests: + # name: Smoke Tests (pygls) + # runs-on: ${{ matrix.os }} + # strategy: + # fail-fast: false + # matrix: + # os: [ubuntu-latest, windows-latest] + # python: ['3.8', '3.9', '3.10', '3.11', '3.12'] + + # steps: + # - name: Checkout + # uses: actions/checkout@v4 + + # - name: Checkout Pygls + # uses: actions/checkout@v4 + # with: + # repository: openlawlibrary/pygls + # path: smoke_tests + + # - name: Use Python ${{ matrix.python }} + # uses: actions/setup-python@v4 + # with: + # python-version: ${{ matrix.python }} + + # - name: Update pip, install wheel + # run: python -m pip install -U pip wheel + # shell: bash + + # - name: Install pip pygls dependencies + # run: python -m pip install typeguard mock pytest pytest-asyncio + # shell: bash + + # - name: Install pip lsprotocol dependencies + # run: python -m pip install -r ./packages/python/requirements.txt + # shell: bash + + # - name: Install pygls + # run: python -m pip install --no-deps ./smoke_tests + # shell: bash + + # - name: Pip List + # run: python -m pip list + # shell: bash + + # - name: Run Tests + # run: python -m pytest smoke_tests/tests + # env: + # PYTHONPATH: ./packages/python + # shell: bash diff --git a/.github/workflows/push-check.yml b/.github/workflows/push-check.yml index 091402e..d57d99b 100644 --- a/.github/workflows/push-check.yml +++ b/.github/workflows/push-check.yml @@ -16,10 +16,10 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Use Python 3.7 + - name: Use Python 3.8 uses: actions/setup-python@v4 with: - python-version: 3.7 + python-version: 3.8 - name: Pip cache uses: actions/cache@v3 @@ -34,7 +34,7 @@ jobs: shell: bash - name: Build sdist and wheels - run: python -m nox --session build + run: python -m nox --session build_python_package shell: bash - name: Upload Python Packages to Artifacts @@ -101,7 +101,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, windows-latest] - python: ['3.7', '3.8', '3.9', '3.10', '3.11'] + python: ['3.8', '3.9', '3.10', '3.11', '3.12'] steps: - name: Checkout @@ -120,6 +120,37 @@ jobs: run: python -m nox --session tests shell: bash + rust-tests: + name: 'Rust Tests' + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest] + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install Python + uses: actions/setup-python@v4 + with: + python-version: '3.x' + + - name: Rust Tool Chain setup + uses: dtolnay/rust-toolchain@stable + + - name: Install Generator + run: python -m pip install -r ./requirements.txt + + - name: Generate Test Data + run: python -m generator --plugin testdata + + - name: Rust Run Tests + run: cargo test --manifest-path tests/rust/Cargo.toml + shell: bash + env: + LSP_TEST_DATA_PATH: ${{ github.workspace }}/packages/testdata + dotnet-tests: name: Dotnet Tests runs-on: ${{ matrix.os }} diff --git a/.github/workflows/version_check.py b/.github/workflows/version_check.py index c9b3e54..4679933 100644 --- a/.github/workflows/version_check.py +++ b/.github/workflows/version_check.py @@ -20,8 +20,8 @@ version = line.split("=")[1].strip().strip('"') year, minor, micro = version.split(".") today = datetime.date.today() - if int(year) != today.year: - print(f"Version {version} year should be {today.year}") + if int(year) not in [today.year, today.year + 1]: + print(f"Version {version} year should be {today.year} or {today.year + 1}") sys.exit(1) print("Version check passed") diff --git a/.gitignore b/.gitignore index ff69d08..8098f32 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,5 @@ packages/rust/**/target/ packages/rust/**/Cargo.lock packages/dotnet/lsprotocol/bin/ packages/dotnet/lsprotocol/obj/ +tests/rust/**/target/ +tests/rust/**/Cargo.lock \ No newline at end of file diff --git a/.vscode/extensions.json b/.vscode/extensions.json index e6d1a11..2698453 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,9 +1,3 @@ { - "recommendations": [ - "esbenp.prettier-vscode", - "ms-python.python", - "ms-python.vscode-pylance", - "ms-python.black-formatter", - "ms-python.isort" - ] + "recommendations": ["esbenp.prettier-vscode", "ms-python.python", "ms-python.vscode-pylance", "charliermarsh.ruff"] } diff --git a/.vscode/settings.json b/.vscode/settings.json index 9df63e5..2d177c6 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -12,12 +12,15 @@ "source.organizeImports": true }, "[python]": { - "editor.defaultFormatter": "ms-python.black-formatter" + "editor.defaultFormatter": "charliermarsh.ruff", + "editor.formatOnSave": true, + "editor.codeActionsOnSave": { + "source.organizeImports.ruff": true + } }, - "isort.args": ["--profile", "black"], "python.testing.pytestArgs": ["tests"], "python.testing.unittestEnabled": false, "python.testing.pytestEnabled": true, "python.analysis.extraPaths": ["packages/python", "tests/python/common"], - "rust-analyzer.linkedProjects": ["packages/rust/lsprotocol/Cargo.toml"] + "rust-analyzer.linkedProjects": ["packages/rust/lsprotocol/Cargo.toml", "tests/rust/Cargo.toml"] } diff --git a/README.md b/README.md index 5bcdce0..7be6ff8 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ This repository contains code to generate Language Server Protocol types and cla You will need a python environment to run the generator. Here are the steps: -1. Create a python environment (min supported python 3.7): `python -m venv .venv` +1. Create a python environment (min supported python 3.8): `python -m venv .venv` 2. Get this tool: `python -m pip install git+https://github.com/microsoft/lsprotocol.git` 3. Run your plugin: `python -m generator --plugin dotnet --output-dir ./code` @@ -52,10 +52,10 @@ You can format code, run tests, and other tasks using `nox` as well. Follow these steps to generate boiler plate code for new plugin: -1. Create a virtual environment for python using python 3.7 and activate that environment. +1. Create a virtual environment for python using python 3.8 and activate that environment. 1. If you have python extension for VS Code installed then run `Python: Create Environment` command. Be sure to select all the `requirements.txt` files in the repo. This should, install all packages needed and select the environment for you. 1. Ensure `nox` is installed. - 1. Run `nox --list`, is nox is installed oyu should see a list of available sessions. Otherwise, run `python -m pip install nox` from the python 3.7 environment you created above. + 1. Run `nox --list`, is nox is installed oyu should see a list of available sessions. Otherwise, run `python -m pip install nox` from the python 3.8 environment you created above. 1. Run `nox --session create_plugin` and follow the prompts to create a new plugin. Example: diff --git a/azure-pipelines/release-pypi.yml b/azure-pipelines/release-pypi.yml index 37df592..e4ca40c 100644 --- a/azure-pipelines/release-pypi.yml +++ b/azure-pipelines/release-pypi.yml @@ -19,7 +19,7 @@ extends: template: azure-pipelines/pypi-package/pipeline.yml@templates parameters: publishPackage: ${{ parameters.publishPackage }} - pythonVersion: '3.7' + pythonVersion: '3.8' # We don't ship any built in packages. generateNotice: false pyProjectTomlPath: $(Build.SourcesDirectory)/packages/python/pyproject.toml @@ -27,9 +27,9 @@ extends: - script: python -m pip install nox displayName: Install nox - - script: python -m nox --session build + - script: python -m nox --session build_python_package displayName: Build package (sdist and wheels) - publish: $(Build.SourcesDirectory)/packages/python/dist artifact: dist - displayName: 🚛 Publish artifact + displayName: 🚛 Publish pypi artifact diff --git a/azure-pipelines/release.yml b/azure-pipelines/release.yml deleted file mode 100644 index 6c12d7d..0000000 --- a/azure-pipelines/release.yml +++ /dev/null @@ -1,36 +0,0 @@ -trigger: none -pr: none - -variables: - Codeql.Enabled: true - -parameters: - - name: publishPyPI - displayName: 🚀 Publish To PyPI - type: string - values: [Skip, Test, Real] - default: Test - -stages: - - stage: pre_build - displayName: Pre-build validation - jobs: - - template: template/static_analysis.yml - - - stage: build - displayName: Build sdist and wheels - dependsOn: pre_build - variables: - skipComponentGovernanceDetection: true # handled by pre_build - jobs: - - template: template/build_packages.yml - - - stage: publish - displayName: Publish - dependsOn: build - variables: - skipComponentGovernanceDetection: true # handled by pre_build - jobs: - - template: template/publish_pypi.yml - parameters: - publishPyPI: ${{parameters.publishPyPI}} diff --git a/azure-pipelines/template/build_packages.yml b/azure-pipelines/template/build_packages.yml deleted file mode 100644 index ca99144..0000000 --- a/azure-pipelines/template/build_packages.yml +++ /dev/null @@ -1,31 +0,0 @@ -jobs: - - job: BuildPkg - displayName: Build package - - pool: - vmImage: windows-latest - - steps: - - task: UsePythonVersion@0 - displayName: "Use Python 3.7" - inputs: - versionSpec: 3.7 - - - script: python -m pip install -U pip - displayName: Upgrade Pip - - # For faster/better builds of sdists. - - script: python -m pip install wheel - displayName: Install build pre-requisite - - - script: python -m pip install nox - displayName: Install nox - - - script: python -m nox --session build - displayName: Build sdist and wheels - - - task: PublishBuildArtifacts@1 - displayName: "Publish Artifact" - inputs: - pathToPublish: "$(Build.SourcesDirectory)/packages/python/dist" - artifactName: dist diff --git a/azure-pipelines/template/publish_pypi.yml b/azure-pipelines/template/publish_pypi.yml deleted file mode 100644 index 1f29e1b..0000000 --- a/azure-pipelines/template/publish_pypi.yml +++ /dev/null @@ -1,43 +0,0 @@ -parameters: - - name: publishPyPI - displayName: 🚀 Publish To PyPI - type: string - -jobs: - - job: PublishPkg - displayName: Publish Packages - - pool: - vmImage: windows-latest - - steps: - - task: DownloadPipelineArtifact@2 - displayName: "Download Pipeline Artifact" - inputs: - artifactName: dist - targetPath: "$(Build.SourcesDirectory)/dist" - - - task: UsePythonVersion@0 - displayName: "Use Python 3.7" - inputs: - versionSpec: 3.7 - - - script: python -m pip install -U pip - displayName: Upgrade Pip - - - script: python -m pip install twine - displayName: Install Twine - - - ${{ if eq(parameters.publishPyPI, 'Test') }}: - - script: python -m twine upload -r testpypi dist/* - displayName: Publish to Test PyPI - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: $(test_pypi_token) - - - ${{ if eq(parameters.publishPyPI, 'Real') }}: - - script: python -m twine upload dist/* - displayName: Publish to PyPI - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: $(real_pypi_token) diff --git a/conftest.py b/conftest.py index fada2fb..2c0f6a0 100644 --- a/conftest.py +++ b/conftest.py @@ -5,8 +5,6 @@ import pathlib import sys -import pytest - sys.path.append(os.fspath(pathlib.Path(__file__).parent / "packages" / "python")) sys.path.append( os.fspath(pathlib.Path(__file__).parent / "tests" / "python" / "common") diff --git a/generator/__main__.py b/generator/__main__.py index 2ebc7d3..5dc1bad 100644 --- a/generator/__main__.py +++ b/generator/__main__.py @@ -17,6 +17,7 @@ from . import model PACKAGES_ROOT = pathlib.Path(__file__).parent.parent / "packages" +TESTS_ROOT = pathlib.Path(__file__).parent.parent / "tests" LOGGER = logging.getLogger("generator") @@ -51,6 +52,12 @@ def get_parser() -> argparse.ArgumentParser: help="Path to a directory where the generated content is written.", type=str, ) + parser.add_argument( + "--test-dir", + "-t", + help="Path to a directory where the generated tests are written.", + type=str, + ) return parser @@ -80,6 +87,7 @@ def main(argv: Sequence[str]) -> None: LOGGER.info(f"Running plugin {plugin}.") output_dir = args.output_dir or os.fspath(PACKAGES_ROOT / plugin) + test_dir = args.test_dir or os.fspath(TESTS_ROOT / plugin) LOGGER.info(f"Writing output to {output_dir}") # load model and generate types for each plugin to avoid @@ -90,7 +98,7 @@ def main(argv: Sequence[str]) -> None: LOGGER.info(f"Loading plugin: {plugin}.") plugin_module = importlib.import_module(f"generator.plugins.{plugin}") LOGGER.info(f"Running plugin: {plugin}.") - plugin_module.generate(spec, output_dir) + plugin_module.generate(spec, output_dir, test_dir) LOGGER.info(f"Plugin {plugin} completed.") except Exception as e: LOGGER.error(f"Error running plugin {plugin}:", exc_info=e) diff --git a/generator/lsp.json b/generator/lsp.json index 29f33f6..c4e7adb 100644 --- a/generator/lsp.json +++ b/generator/lsp.json @@ -4299,28 +4299,8 @@ { "name": "serverInfo", "type": { - "kind": "literal", - "value": { - "properties": [ - { - "name": "name", - "type": { - "kind": "base", - "name": "string" - }, - "documentation": "The name of the server as defined by the server." - }, - { - "name": "version", - "type": { - "kind": "base", - "name": "string" - }, - "optional": true, - "documentation": "The server's version as defined by the server." - } - ] - } + "kind": "reference", + "name": "ServerInfo" }, "optional": true, "documentation": "Information about the server.\n\n@since 3.15.0", @@ -4954,90 +4934,8 @@ { "name": "itemDefaults", "type": { - "kind": "literal", - "value": { - "properties": [ - { - "name": "commitCharacters", - "type": { - "kind": "array", - "element": { - "kind": "base", - "name": "string" - } - }, - "optional": true, - "documentation": "A default commit character set.\n\n@since 3.17.0", - "since": "3.17.0" - }, - { - "name": "editRange", - "type": { - "kind": "or", - "items": [ - { - "kind": "reference", - "name": "Range" - }, - { - "kind": "literal", - "value": { - "properties": [ - { - "name": "insert", - "type": { - "kind": "reference", - "name": "Range" - } - }, - { - "name": "replace", - "type": { - "kind": "reference", - "name": "Range" - } - } - ] - } - } - ] - }, - "optional": true, - "documentation": "A default edit range.\n\n@since 3.17.0", - "since": "3.17.0" - }, - { - "name": "insertTextFormat", - "type": { - "kind": "reference", - "name": "InsertTextFormat" - }, - "optional": true, - "documentation": "A default insert text format.\n\n@since 3.17.0", - "since": "3.17.0" - }, - { - "name": "insertTextMode", - "type": { - "kind": "reference", - "name": "InsertTextMode" - }, - "optional": true, - "documentation": "A default insert text mode.\n\n@since 3.17.0", - "since": "3.17.0" - }, - { - "name": "data", - "type": { - "kind": "reference", - "name": "LSPAny" - }, - "optional": true, - "documentation": "A default data value.\n\n@since 3.17.0", - "since": "3.17.0" - } - ] - } + "kind": "reference", + "name": "CompletionItemDefaults" }, "optional": true, "documentation": "In many cases the items of an actual completion result share the same\nvalue for properties like `commitCharacters` or the range of a text\nedit. A completion list can therefore define item defaults which will\nbe used if a completion item itself doesn't specify the value.\n\nIf a completion list specifies a default value and a completion item\nalso specifies a corresponding value the one from the item is used.\n\nServers are only allowed to return default values if the client\nsignals support for this via the `completionList.itemDefaults`\ncapability.\n\n@since 3.17.0", @@ -5630,19 +5528,8 @@ { "name": "disabled", "type": { - "kind": "literal", - "value": { - "properties": [ - { - "name": "reason", - "type": { - "kind": "base", - "name": "string" - }, - "documentation": "Human readable description of why the code action is currently disabled.\n\nThis is displayed in the code actions UI." - } - ] - } + "kind": "reference", + "name": "CodeActionDisabled" }, "optional": true, "documentation": "Marks that the code action cannot currently be applied.\n\nClients should follow the following guidelines regarding disabled code actions:\n\n - Disabled code actions are not shown in automatic [lightbulbs](https://code.visualstudio.com/docs/editor/editingevolved#_code-action)\n code action menus.\n\n - Disabled actions are shown as faded out in the code action menu when the user requests a more specific type\n of code action, such as refactorings.\n\n - If the user has a [keybinding](https://code.visualstudio.com/docs/editor/refactoring#_keybindings-for-code-actions)\n that auto applies a code action and only disabled code actions are returned, the client should show the user an\n error message with `reason` in the editor.\n\n@since 3.16.0", @@ -5731,18 +5618,8 @@ "name": "Location" }, { - "kind": "literal", - "value": { - "properties": [ - { - "name": "uri", - "type": { - "kind": "base", - "name": "DocumentUri" - } - } - ] - } + "kind": "reference", + "name": "LocationUriOnly" } ] }, @@ -6831,20 +6708,8 @@ "name": "boolean" }, { - "kind": "literal", - "value": { - "properties": [ - { - "name": "delta", - "type": { - "kind": "base", - "name": "boolean" - }, - "optional": true, - "documentation": "The server supports deltas for full documents." - } - ] - } + "kind": "reference", + "name": "SemanticTokensFullDelta" } ] }, @@ -7725,99 +7590,8 @@ { "name": "cells", "type": { - "kind": "literal", - "value": { - "properties": [ - { - "name": "structure", - "type": { - "kind": "literal", - "value": { - "properties": [ - { - "name": "array", - "type": { - "kind": "reference", - "name": "NotebookCellArrayChange" - }, - "documentation": "The change to the cell array." - }, - { - "name": "didOpen", - "type": { - "kind": "array", - "element": { - "kind": "reference", - "name": "TextDocumentItem" - } - }, - "optional": true, - "documentation": "Additional opened cell text documents." - }, - { - "name": "didClose", - "type": { - "kind": "array", - "element": { - "kind": "reference", - "name": "TextDocumentIdentifier" - } - }, - "optional": true, - "documentation": "Additional closed cell text documents." - } - ] - } - }, - "optional": true, - "documentation": "Changes to the cell structure to add or\nremove cells." - }, - { - "name": "data", - "type": { - "kind": "array", - "element": { - "kind": "reference", - "name": "NotebookCell" - } - }, - "optional": true, - "documentation": "Changes to notebook cells properties like its\nkind, execution summary or metadata." - }, - { - "name": "textContent", - "type": { - "kind": "array", - "element": { - "kind": "literal", - "value": { - "properties": [ - { - "name": "document", - "type": { - "kind": "reference", - "name": "VersionedTextDocumentIdentifier" - } - }, - { - "name": "changes", - "type": { - "kind": "array", - "element": { - "kind": "reference", - "name": "TextDocumentContentChangeEvent" - } - } - } - ] - } - } - }, - "optional": true, - "documentation": "Changes to the text content of notebook cells." - } - ] - } + "kind": "reference", + "name": "NotebookDocumentCellChanges" }, "optional": true, "documentation": "Changes to cells" @@ -7979,28 +7753,8 @@ { "name": "clientInfo", "type": { - "kind": "literal", - "value": { - "properties": [ - { - "name": "name", - "type": { - "kind": "base", - "name": "string" - }, - "documentation": "The name of the client as defined by the client." - }, - { - "name": "version", - "type": { - "kind": "base", - "name": "string" - }, - "optional": true, - "documentation": "The client's version as defined by the client." - } - ] - } + "kind": "reference", + "name": "ClientInfo" }, "optional": true, "documentation": "Information about the client\n\n@since 3.15.0", @@ -8730,31 +8484,8 @@ { "name": "workspace", "type": { - "kind": "literal", - "value": { - "properties": [ - { - "name": "workspaceFolders", - "type": { - "kind": "reference", - "name": "WorkspaceFoldersServerCapabilities" - }, - "optional": true, - "documentation": "The server supports workspace folder.\n\n@since 3.6.0", - "since": "3.6.0" - }, - { - "name": "fileOperations", - "type": { - "kind": "reference", - "name": "FileOperationOptions" - }, - "optional": true, - "documentation": "The server is interested in notifications/requests for operations on files.\n\n@since 3.16.0", - "since": "3.16.0" - } - ] - } + "kind": "reference", + "name": "WorkspaceOptions" }, "optional": true, "documentation": "Workspace specific server capabilities." @@ -8771,6 +8502,31 @@ ], "documentation": "Defines the capabilities provided by a language\nserver." }, + { + "name": "ServerInfo", + "properties": [ + { + "name": "name", + "type": { + "kind": "base", + "name": "string" + }, + "documentation": "The name of the server as defined by the server." + }, + { + "name": "version", + "type": { + "kind": "base", + "name": "string" + }, + "optional": true, + "documentation": "The server's version as defined by the server." + } + ], + "documentation": "Information about the server\n\n@since 3.15.0\n@since 3.18.0 ServerInfo type name added.\n@proposed", + "since": "3.18.0 ServerInfo type name added.", + "proposed": true + }, { "name": "VersionedTextDocumentIdentifier", "properties": [ @@ -9033,6 +8789,75 @@ "documentation": "A special text edit to provide an insert and a replace operation.\n\n@since 3.16.0", "since": "3.16.0" }, + { + "name": "CompletionItemDefaults", + "properties": [ + { + "name": "commitCharacters", + "type": { + "kind": "array", + "element": { + "kind": "base", + "name": "string" + } + }, + "optional": true, + "documentation": "A default commit character set.\n\n@since 3.17.0", + "since": "3.17.0" + }, + { + "name": "editRange", + "type": { + "kind": "or", + "items": [ + { + "kind": "reference", + "name": "Range" + }, + { + "kind": "reference", + "name": "EditRangeWithInsertReplace" + } + ] + }, + "optional": true, + "documentation": "A default edit range.\n\n@since 3.17.0", + "since": "3.17.0" + }, + { + "name": "insertTextFormat", + "type": { + "kind": "reference", + "name": "InsertTextFormat" + }, + "optional": true, + "documentation": "A default insert text format.\n\n@since 3.17.0", + "since": "3.17.0" + }, + { + "name": "insertTextMode", + "type": { + "kind": "reference", + "name": "InsertTextMode" + }, + "optional": true, + "documentation": "A default insert text mode.\n\n@since 3.17.0", + "since": "3.17.0" + }, + { + "name": "data", + "type": { + "kind": "reference", + "name": "LSPAny" + }, + "optional": true, + "documentation": "A default data value.\n\n@since 3.17.0", + "since": "3.17.0" + } + ], + "documentation": "In many cases the items of an actual completion result share the same\nvalue for properties like `commitCharacters` or the range of a text\nedit. A completion list can therefore define item defaults which will\nbe used if a completion item itself doesn't specify the value.\n\nIf a completion list specifies a default value and a completion item\nalso specifies a corresponding value the one from the item is used.\n\nServers are only allowed to return default values if the client\nsignals support for this via the `completionList.itemDefaults`\ncapability.\n\n@since 3.17.0", + "since": "3.17.0" + }, { "name": "CompletionOptions", "properties": [ @@ -9073,21 +8898,8 @@ { "name": "completionItem", "type": { - "kind": "literal", - "value": { - "properties": [ - { - "name": "labelDetailsSupport", - "type": { - "kind": "base", - "name": "boolean" - }, - "optional": true, - "documentation": "The server has support for completion item label\ndetails (see also `CompletionItemLabelDetails`) when\nreceiving a completion item in a resolve call.\n\n@since 3.17.0", - "since": "3.17.0" - } - ] - } + "kind": "reference", + "name": "ServerCompletionItemOptions" }, "optional": true, "documentation": "The server supports the following `CompletionItem` specific\ncapabilities.\n\n@since 3.17.0", @@ -9397,6 +9209,22 @@ ], "documentation": "Contains additional diagnostic information about the context in which\na {@link CodeActionProvider.provideCodeActions code action} is run." }, + { + "name": "CodeActionDisabled", + "properties": [ + { + "name": "reason", + "type": { + "kind": "base", + "name": "string" + }, + "documentation": "Human readable description of why the code action is currently disabled.\n\nThis is displayed in the code actions UI." + } + ], + "documentation": "Captures why the code action is currently disabled.\n\n@since 3.18.0\n@proposed", + "since": "3.18.0", + "proposed": true + }, { "name": "CodeActionOptions", "properties": [ @@ -9431,6 +9259,21 @@ ], "documentation": "Provider options for a {@link CodeActionRequest}." }, + { + "name": "LocationUriOnly", + "properties": [ + { + "name": "uri", + "type": { + "kind": "base", + "name": "DocumentUri" + } + } + ], + "documentation": "Location with only uri and does not include range.\n\n@since 3.18.0\n@proposed", + "since": "3.18.0", + "proposed": true + }, { "name": "WorkspaceSymbolOptions", "properties": [ @@ -9629,6 +9472,43 @@ ], "documentation": "Provider options for a {@link RenameRequest}." }, + { + "name": "PrepareRenamePlaceholder", + "properties": [ + { + "name": "range", + "type": { + "kind": "reference", + "name": "Range" + } + }, + { + "name": "placeholder", + "type": { + "kind": "base", + "name": "string" + } + } + ], + "documentation": "@since 3.18.0\n@proposed", + "since": "3.18.0", + "proposed": true + }, + { + "name": "PrepareRenameDefaultBehavior", + "properties": [ + { + "name": "defaultBehavior", + "type": { + "kind": "base", + "name": "boolean" + } + } + ], + "documentation": "@since 3.18.0\n@proposed", + "since": "3.18.0", + "proposed": true + }, { "name": "ExecuteCommandOptions", "properties": [ @@ -9681,6 +9561,23 @@ "documentation": "@since 3.16.0", "since": "3.16.0" }, + { + "name": "SemanticTokensFullDelta", + "properties": [ + { + "name": "delta", + "type": { + "kind": "base", + "name": "boolean" + }, + "optional": true, + "documentation": "The server supports deltas for full documents." + } + ], + "documentation": "Semantic tokens options to support deltas for full documents\n\n@since 3.18.0\n@proposed", + "since": "3.18.0", + "proposed": true + }, { "name": "OptionalVersionedTextDocumentIdentifier", "properties": [ @@ -9978,26 +9875,19 @@ "since": "3.17.0" }, { - "name": "NotebookCellArrayChange", + "name": "NotebookDocumentCellChanges", "properties": [ { - "name": "start", + "name": "structure", "type": { - "kind": "base", - "name": "uinteger" + "kind": "reference", + "name": "NotebookDocumentCellChangeStructure" }, - "documentation": "The start oftest of the cell that changed." + "optional": true, + "documentation": "Changes to the cell structure to add or\nremove cells." }, { - "name": "deleteCount", - "type": { - "kind": "base", - "name": "uinteger" - }, - "documentation": "The deleted cells" - }, - { - "name": "cells", + "name": "data", "type": { "kind": "array", "element": { @@ -10006,11 +9896,24 @@ } }, "optional": true, - "documentation": "The new cells, if any" + "documentation": "Changes to notebook cells properties like its\nkind, execution summary or metadata." + }, + { + "name": "textContent", + "type": { + "kind": "array", + "element": { + "kind": "reference", + "name": "NotebookDocumentCellContentChanges" + } + }, + "optional": true, + "documentation": "Changes to the text content of notebook cells." } ], - "documentation": "A change describing how to move a `NotebookCell`\narray from state S to S'.\n\n@since 3.17.0", - "since": "3.17.0" + "documentation": "Cell changes to a notebook document.\n\n@since 3.18.0\n@proposed", + "since": "3.18.0", + "proposed": true }, { "name": "SelectedCompletionInfo", @@ -10036,6 +9939,31 @@ "since": "3.18.0", "proposed": true }, + { + "name": "ClientInfo", + "properties": [ + { + "name": "name", + "type": { + "kind": "base", + "name": "string" + }, + "documentation": "The name of the client as defined by the client." + }, + { + "name": "version", + "type": { + "kind": "base", + "name": "string" + }, + "optional": true, + "documentation": "The client's version as defined by the client." + } + ], + "documentation": "Information about the client\n\n@since 3.15.0\n@since 3.18.0 ClientInfo type name added.\n@proposed", + "since": "3.18.0 ClientInfo type name added.", + "proposed": true + }, { "name": "ClientCapabilities", "properties": [ @@ -10168,96 +10096,12 @@ "kind": "or", "items": [ { - "kind": "literal", - "value": { - "properties": [ - { - "name": "notebook", - "type": { - "kind": "or", - "items": [ - { - "kind": "base", - "name": "string" - }, - { - "kind": "reference", - "name": "NotebookDocumentFilter" - } - ] - }, - "documentation": "The notebook to be synced If a string\nvalue is provided it matches against the\nnotebook type. '*' matches every notebook." - }, - { - "name": "cells", - "type": { - "kind": "array", - "element": { - "kind": "literal", - "value": { - "properties": [ - { - "name": "language", - "type": { - "kind": "base", - "name": "string" - } - } - ] - } - } - }, - "optional": true, - "documentation": "The cells of the matching notebook to be synced." - } - ] - } + "kind": "reference", + "name": "NotebookDocumentFilterWithNotebook" }, { - "kind": "literal", - "value": { - "properties": [ - { - "name": "notebook", - "type": { - "kind": "or", - "items": [ - { - "kind": "base", - "name": "string" - }, - { - "kind": "reference", - "name": "NotebookDocumentFilter" - } - ] - }, - "optional": true, - "documentation": "The notebook to be synced If a string\nvalue is provided it matches against the\nnotebook type. '*' matches every notebook." - }, - { - "name": "cells", - "type": { - "kind": "array", - "element": { - "kind": "literal", - "value": { - "properties": [ - { - "name": "language", - "type": { - "kind": "base", - "name": "string" - } - } - ] - } - } - }, - "documentation": "The cells of the matching notebook to be synced." - } - ] - } + "kind": "reference", + "name": "NotebookDocumentFilterWithCells" } ] } @@ -10296,97 +10140,82 @@ "since": "3.17.0" }, { - "name": "WorkspaceFoldersServerCapabilities", + "name": "WorkspaceOptions", "properties": [ { - "name": "supported", + "name": "workspaceFolders", "type": { - "kind": "base", - "name": "boolean" + "kind": "reference", + "name": "WorkspaceFoldersServerCapabilities" }, "optional": true, - "documentation": "The server has support for workspace folders" + "documentation": "The server supports workspace folder.\n\n@since 3.6.0", + "since": "3.6.0" }, { - "name": "changeNotifications", + "name": "fileOperations", "type": { - "kind": "or", - "items": [ - { - "kind": "base", - "name": "string" - }, - { - "kind": "base", - "name": "boolean" - } - ] + "kind": "reference", + "name": "FileOperationOptions" }, "optional": true, - "documentation": "Whether the server wants to receive workspace folder\nchange notifications.\n\nIf a string is provided the string is treated as an ID\nunder which the notification is registered on the client\nside. The ID can be used to unregister for these events\nusing the `client/unregisterCapability` request." + "documentation": "The server is interested in notifications/requests for operations on files.\n\n@since 3.16.0", + "since": "3.16.0" } - ] + ], + "documentation": "Defines workspace specific capabilities of the server.\n\n@since 3.18.0\n@proposed", + "since": "3.18.0", + "proposed": true }, { - "name": "FileOperationOptions", + "name": "TextDocumentContentChangePartial", "properties": [ { - "name": "didCreate", - "type": { - "kind": "reference", - "name": "FileOperationRegistrationOptions" - }, - "optional": true, - "documentation": "The server is interested in receiving didCreateFiles notifications." - }, - { - "name": "willCreate", - "type": { - "kind": "reference", - "name": "FileOperationRegistrationOptions" - }, - "optional": true, - "documentation": "The server is interested in receiving willCreateFiles requests." - }, - { - "name": "didRename", + "name": "range", "type": { "kind": "reference", - "name": "FileOperationRegistrationOptions" + "name": "Range" }, - "optional": true, - "documentation": "The server is interested in receiving didRenameFiles notifications." + "documentation": "The range of the document that changed." }, { - "name": "willRename", + "name": "rangeLength", "type": { - "kind": "reference", - "name": "FileOperationRegistrationOptions" + "kind": "base", + "name": "uinteger" }, "optional": true, - "documentation": "The server is interested in receiving willRenameFiles requests." + "documentation": "The optional length of the range that got replaced.\n\n@deprecated use range instead.", + "deprecated": "use range instead." }, { - "name": "didDelete", + "name": "text", "type": { - "kind": "reference", - "name": "FileOperationRegistrationOptions" + "kind": "base", + "name": "string" }, - "optional": true, - "documentation": "The server is interested in receiving didDeleteFiles file notifications." - }, + "documentation": "The new text for the provided range." + } + ], + "documentation": "@since 3.18.0\n@proposed", + "since": "3.18.0", + "proposed": true + }, + { + "name": "TextDocumentContentChangeWholeDocument", + "properties": [ { - "name": "willDelete", + "name": "text", "type": { - "kind": "reference", - "name": "FileOperationRegistrationOptions" + "kind": "base", + "name": "string" }, - "optional": true, - "documentation": "The server is interested in receiving willDeleteFiles file requests." + "documentation": "The new text of the whole document." } ], - "documentation": "Options for notifications/requests for user operations on files.\n\n@since 3.16.0", - "since": "3.16.0" + "documentation": "@since 3.18.0\n@proposed", + "since": "3.18.0", + "proposed": true }, { "name": "CodeDescription", @@ -10425,6 +10254,69 @@ ], "documentation": "Represents a related message and source code location for a diagnostic. This should be\nused to point to code locations that cause or related to a diagnostics, e.g when duplicating\na symbol in a scope." }, + { + "name": "EditRangeWithInsertReplace", + "properties": [ + { + "name": "insert", + "type": { + "kind": "reference", + "name": "Range" + } + }, + { + "name": "replace", + "type": { + "kind": "reference", + "name": "Range" + } + } + ], + "documentation": "Edit range variant that includes ranges for insert and replace operations.\n\n@since 3.18.0\n@proposed", + "since": "3.18.0", + "proposed": true + }, + { + "name": "ServerCompletionItemOptions", + "properties": [ + { + "name": "labelDetailsSupport", + "type": { + "kind": "base", + "name": "boolean" + }, + "optional": true, + "documentation": "The server has support for completion item label\ndetails (see also `CompletionItemLabelDetails`) when\nreceiving a completion item in a resolve call.\n\n@since 3.17.0", + "since": "3.17.0" + } + ], + "documentation": "@since 3.18.0\n@proposed", + "since": "3.18.0", + "proposed": true + }, + { + "name": "MarkedStringWithLanguage", + "properties": [ + { + "name": "language", + "type": { + "kind": "base", + "name": "string" + } + }, + { + "name": "value", + "type": { + "kind": "base", + "name": "string" + } + } + ], + "documentation": "@since 3.18.0\n@proposed\n@deprecated use MarkupContent instead.", + "since": "3.18.0", + "deprecated": "use MarkupContent instead.", + "proposed": true + }, { "name": "ParameterInformation", "properties": [ @@ -10546,6 +10438,71 @@ } ] }, + { + "name": "NotebookDocumentCellChangeStructure", + "properties": [ + { + "name": "array", + "type": { + "kind": "reference", + "name": "NotebookCellArrayChange" + }, + "documentation": "The change to the cell array." + }, + { + "name": "didOpen", + "type": { + "kind": "array", + "element": { + "kind": "reference", + "name": "TextDocumentItem" + } + }, + "optional": true, + "documentation": "Additional opened cell text documents." + }, + { + "name": "didClose", + "type": { + "kind": "array", + "element": { + "kind": "reference", + "name": "TextDocumentIdentifier" + } + }, + "optional": true, + "documentation": "Additional closed cell text documents." + } + ], + "documentation": "Structural changes to cells in a notebook document.\n\n@since 3.18.0\n@proposed", + "since": "3.18.0", + "proposed": true + }, + { + "name": "NotebookDocumentCellContentChanges", + "properties": [ + { + "name": "document", + "type": { + "kind": "reference", + "name": "VersionedTextDocumentIdentifier" + } + }, + { + "name": "changes", + "type": { + "kind": "array", + "element": { + "kind": "reference", + "name": "TextDocumentContentChangeEvent" + } + } + } + ], + "documentation": "Content changes to a cell in a notebook document.\n\n@since 3.18.0\n@proposed", + "since": "3.18.0", + "proposed": true + }, { "name": "WorkspaceClientCapabilities", "properties": [ @@ -11054,30 +11011,8 @@ { "name": "staleRequestSupport", "type": { - "kind": "literal", - "value": { - "properties": [ - { - "name": "cancel", - "type": { - "kind": "base", - "name": "boolean" - }, - "documentation": "The client will actively cancel the request." - }, - { - "name": "retryOnContentModified", - "type": { - "kind": "array", - "element": { - "kind": "base", - "name": "string" - } - }, - "documentation": "The list of requests for which the client\nwill retry the request if it receives a\nresponse with error code `ContentModified`" - } - ] - } + "kind": "reference", + "name": "StaleRequestSupportOptions" }, "optional": true, "documentation": "Client capability that signals how the client\nhandles stale requests (e.g. a request\nfor which the client will not process the response\nanymore since the information is outdated).\n\n@since 3.17.0", @@ -11121,16 +11056,183 @@ "since": "3.16.0" }, { - "name": "RelativePattern", + "name": "NotebookDocumentFilterWithNotebook", "properties": [ { - "name": "baseUri", + "name": "notebook", "type": { "kind": "or", "items": [ { - "kind": "reference", - "name": "WorkspaceFolder" + "kind": "base", + "name": "string" + }, + { + "kind": "reference", + "name": "NotebookDocumentFilter" + } + ] + }, + "documentation": "The notebook to be synced If a string\nvalue is provided it matches against the\nnotebook type. '*' matches every notebook." + }, + { + "name": "cells", + "type": { + "kind": "array", + "element": { + "kind": "reference", + "name": "NotebookCellLanguage" + } + }, + "optional": true, + "documentation": "The cells of the matching notebook to be synced." + } + ], + "documentation": "@since 3.18.0\n@proposed", + "since": "3.18.0", + "proposed": true + }, + { + "name": "NotebookDocumentFilterWithCells", + "properties": [ + { + "name": "notebook", + "type": { + "kind": "or", + "items": [ + { + "kind": "base", + "name": "string" + }, + { + "kind": "reference", + "name": "NotebookDocumentFilter" + } + ] + }, + "optional": true, + "documentation": "The notebook to be synced If a string\nvalue is provided it matches against the\nnotebook type. '*' matches every notebook." + }, + { + "name": "cells", + "type": { + "kind": "array", + "element": { + "kind": "reference", + "name": "NotebookCellLanguage" + } + }, + "documentation": "The cells of the matching notebook to be synced." + } + ], + "documentation": "@since 3.18.0\n@proposed", + "since": "3.18.0", + "proposed": true + }, + { + "name": "WorkspaceFoldersServerCapabilities", + "properties": [ + { + "name": "supported", + "type": { + "kind": "base", + "name": "boolean" + }, + "optional": true, + "documentation": "The server has support for workspace folders" + }, + { + "name": "changeNotifications", + "type": { + "kind": "or", + "items": [ + { + "kind": "base", + "name": "string" + }, + { + "kind": "base", + "name": "boolean" + } + ] + }, + "optional": true, + "documentation": "Whether the server wants to receive workspace folder\nchange notifications.\n\nIf a string is provided the string is treated as an ID\nunder which the notification is registered on the client\nside. The ID can be used to unregister for these events\nusing the `client/unregisterCapability` request." + } + ] + }, + { + "name": "FileOperationOptions", + "properties": [ + { + "name": "didCreate", + "type": { + "kind": "reference", + "name": "FileOperationRegistrationOptions" + }, + "optional": true, + "documentation": "The server is interested in receiving didCreateFiles notifications." + }, + { + "name": "willCreate", + "type": { + "kind": "reference", + "name": "FileOperationRegistrationOptions" + }, + "optional": true, + "documentation": "The server is interested in receiving willCreateFiles requests." + }, + { + "name": "didRename", + "type": { + "kind": "reference", + "name": "FileOperationRegistrationOptions" + }, + "optional": true, + "documentation": "The server is interested in receiving didRenameFiles notifications." + }, + { + "name": "willRename", + "type": { + "kind": "reference", + "name": "FileOperationRegistrationOptions" + }, + "optional": true, + "documentation": "The server is interested in receiving willRenameFiles requests." + }, + { + "name": "didDelete", + "type": { + "kind": "reference", + "name": "FileOperationRegistrationOptions" + }, + "optional": true, + "documentation": "The server is interested in receiving didDeleteFiles file notifications." + }, + { + "name": "willDelete", + "type": { + "kind": "reference", + "name": "FileOperationRegistrationOptions" + }, + "optional": true, + "documentation": "The server is interested in receiving willDeleteFiles file requests." + } + ], + "documentation": "Options for notifications/requests for user operations on files.\n\n@since 3.16.0", + "since": "3.16.0" + }, + { + "name": "RelativePattern", + "properties": [ + { + "name": "baseUri", + "type": { + "kind": "or", + "items": [ + { + "kind": "reference", + "name": "WorkspaceFolder" }, { "kind": "base", @@ -11153,76 +11255,629 @@ "since": "3.17.0" }, { - "name": "WorkspaceEditClientCapabilities", + "name": "TextDocumentFilterLanguage", "properties": [ { - "name": "documentChanges", + "name": "language", "type": { "kind": "base", - "name": "boolean" + "name": "string" }, - "optional": true, - "documentation": "The client supports versioned document changes in `WorkspaceEdit`s" + "documentation": "A language id, like `typescript`." }, { - "name": "resourceOperations", + "name": "scheme", "type": { - "kind": "array", - "element": { - "kind": "reference", - "name": "ResourceOperationKind" - } + "kind": "base", + "name": "string" }, "optional": true, - "documentation": "The resource operations the client supports. Clients should at least\nsupport 'create', 'rename' and 'delete' files and folders.\n\n@since 3.13.0", - "since": "3.13.0" + "documentation": "A Uri {@link Uri.scheme scheme}, like `file` or `untitled`." }, { - "name": "failureHandling", + "name": "pattern", "type": { - "kind": "reference", - "name": "FailureHandlingKind" + "kind": "base", + "name": "string" }, "optional": true, - "documentation": "The failure handling strategy of a client if applying the workspace edit\nfails.\n\n@since 3.13.0", - "since": "3.13.0" + "documentation": "A glob pattern, like **​/*.{ts,js}. See TextDocumentFilter for examples." + } + ], + "documentation": "A document filter where `language` is required field.\n\n@since 3.18.0\n@proposed", + "since": "3.18.0", + "proposed": true + }, + { + "name": "TextDocumentFilterScheme", + "properties": [ + { + "name": "language", + "type": { + "kind": "base", + "name": "string" + }, + "optional": true, + "documentation": "A language id, like `typescript`." }, { - "name": "normalizesLineEndings", + "name": "scheme", "type": { "kind": "base", - "name": "boolean" + "name": "string" + }, + "documentation": "A Uri {@link Uri.scheme scheme}, like `file` or `untitled`." + }, + { + "name": "pattern", + "type": { + "kind": "base", + "name": "string" }, "optional": true, - "documentation": "Whether the client normalizes line endings to the client specific\nsetting.\nIf set to `true` the client will normalize line ending characters\nin a workspace edit to the client-specified new line\ncharacter.\n\n@since 3.16.0", - "since": "3.16.0" + "documentation": "A glob pattern, like **​/*.{ts,js}. See TextDocumentFilter for examples." + } + ], + "documentation": "A document filter where `scheme` is required field.\n\n@since 3.18.0\n@proposed", + "since": "3.18.0", + "proposed": true + }, + { + "name": "TextDocumentFilterPattern", + "properties": [ + { + "name": "language", + "type": { + "kind": "base", + "name": "string" + }, + "optional": true, + "documentation": "A language id, like `typescript`." }, { - "name": "changeAnnotationSupport", + "name": "scheme", "type": { - "kind": "literal", - "value": { - "properties": [ - { - "name": "groupsOnLabel", - "type": { - "kind": "base", - "name": "boolean" - }, - "optional": true, - "documentation": "Whether the client groups edits with equal labels into tree nodes,\nfor instance all edits labelled with \"Changes in Strings\" would\nbe a tree node." - } - ] - } + "kind": "base", + "name": "string" }, "optional": true, - "documentation": "Whether the client in general supports change annotations on text edits,\ncreate file, rename file and delete file changes.\n\n@since 3.16.0", - "since": "3.16.0" + "documentation": "A Uri {@link Uri.scheme scheme}, like `file` or `untitled`." + }, + { + "name": "pattern", + "type": { + "kind": "base", + "name": "string" + }, + "documentation": "A glob pattern, like **​/*.{ts,js}. See TextDocumentFilter for examples." + } + ], + "documentation": "A document filter where `pattern` is required field.\n\n@since 3.18.0\n@proposed", + "since": "3.18.0", + "proposed": true + }, + { + "name": "NotebookCellArrayChange", + "properties": [ + { + "name": "start", + "type": { + "kind": "base", + "name": "uinteger" + }, + "documentation": "The start oftest of the cell that changed." + }, + { + "name": "deleteCount", + "type": { + "kind": "base", + "name": "uinteger" + }, + "documentation": "The deleted cells" + }, + { + "name": "cells", + "type": { + "kind": "array", + "element": { + "kind": "reference", + "name": "NotebookCell" + } + }, + "optional": true, + "documentation": "The new cells, if any" + } + ], + "documentation": "A change describing how to move a `NotebookCell`\narray from state S to S'.\n\n@since 3.17.0", + "since": "3.17.0" + }, + { + "name": "WorkspaceEditClientCapabilities", + "properties": [ + { + "name": "documentChanges", + "type": { + "kind": "base", + "name": "boolean" + }, + "optional": true, + "documentation": "The client supports versioned document changes in `WorkspaceEdit`s" + }, + { + "name": "resourceOperations", + "type": { + "kind": "array", + "element": { + "kind": "reference", + "name": "ResourceOperationKind" + } + }, + "optional": true, + "documentation": "The resource operations the client supports. Clients should at least\nsupport 'create', 'rename' and 'delete' files and folders.\n\n@since 3.13.0", + "since": "3.13.0" + }, + { + "name": "failureHandling", + "type": { + "kind": "reference", + "name": "FailureHandlingKind" + }, + "optional": true, + "documentation": "The failure handling strategy of a client if applying the workspace edit\nfails.\n\n@since 3.13.0", + "since": "3.13.0" + }, + { + "name": "normalizesLineEndings", + "type": { + "kind": "base", + "name": "boolean" + }, + "optional": true, + "documentation": "Whether the client normalizes line endings to the client specific\nsetting.\nIf set to `true` the client will normalize line ending characters\nin a workspace edit to the client-specified new line\ncharacter.\n\n@since 3.16.0", + "since": "3.16.0" + }, + { + "name": "changeAnnotationSupport", + "type": { + "kind": "reference", + "name": "ChangeAnnotationsSupportOptions" + }, + "optional": true, + "documentation": "Whether the client in general supports change annotations on text edits,\ncreate file, rename file and delete file changes.\n\n@since 3.16.0", + "since": "3.16.0" + } + ] + }, + { + "name": "DidChangeConfigurationClientCapabilities", + "properties": [ + { + "name": "dynamicRegistration", + "type": { + "kind": "base", + "name": "boolean" + }, + "optional": true, + "documentation": "Did change configuration notification supports dynamic registration." + } + ] + }, + { + "name": "DidChangeWatchedFilesClientCapabilities", + "properties": [ + { + "name": "dynamicRegistration", + "type": { + "kind": "base", + "name": "boolean" + }, + "optional": true, + "documentation": "Did change watched files notification supports dynamic registration. Please note\nthat the current protocol doesn't support static configuration for file changes\nfrom the server side." + }, + { + "name": "relativePatternSupport", + "type": { + "kind": "base", + "name": "boolean" + }, + "optional": true, + "documentation": "Whether the client has support for {@link RelativePattern relative pattern}\nor not.\n\n@since 3.17.0", + "since": "3.17.0" + } + ] + }, + { + "name": "WorkspaceSymbolClientCapabilities", + "properties": [ + { + "name": "dynamicRegistration", + "type": { + "kind": "base", + "name": "boolean" + }, + "optional": true, + "documentation": "Symbol request supports dynamic registration." + }, + { + "name": "symbolKind", + "type": { + "kind": "reference", + "name": "ClientSymbolKindOptions" + }, + "optional": true, + "documentation": "Specific capabilities for the `SymbolKind` in the `workspace/symbol` request." + }, + { + "name": "tagSupport", + "type": { + "kind": "reference", + "name": "ClientSymbolTagOptions" + }, + "optional": true, + "documentation": "The client supports tags on `SymbolInformation`.\nClients supporting tags have to handle unknown tags gracefully.\n\n@since 3.16.0", + "since": "3.16.0" + }, + { + "name": "resolveSupport", + "type": { + "kind": "reference", + "name": "ClientSymbolResolveOptions" + }, + "optional": true, + "documentation": "The client support partial workspace symbols. The client will send the\nrequest `workspaceSymbol/resolve` to the server to resolve additional\nproperties.\n\n@since 3.17.0", + "since": "3.17.0" + } + ], + "documentation": "Client capabilities for a {@link WorkspaceSymbolRequest}." + }, + { + "name": "ExecuteCommandClientCapabilities", + "properties": [ + { + "name": "dynamicRegistration", + "type": { + "kind": "base", + "name": "boolean" + }, + "optional": true, + "documentation": "Execute command supports dynamic registration." + } + ], + "documentation": "The client capabilities of a {@link ExecuteCommandRequest}." + }, + { + "name": "SemanticTokensWorkspaceClientCapabilities", + "properties": [ + { + "name": "refreshSupport", + "type": { + "kind": "base", + "name": "boolean" + }, + "optional": true, + "documentation": "Whether the client implementation supports a refresh request sent from\nthe server to the client.\n\nNote that this event is global and will force the client to refresh all\nsemantic tokens currently shown. It should be used with absolute care\nand is useful for situation where a server for example detects a project\nwide change that requires such a calculation." + } + ], + "documentation": "@since 3.16.0", + "since": "3.16.0" + }, + { + "name": "CodeLensWorkspaceClientCapabilities", + "properties": [ + { + "name": "refreshSupport", + "type": { + "kind": "base", + "name": "boolean" + }, + "optional": true, + "documentation": "Whether the client implementation supports a refresh request sent from the\nserver to the client.\n\nNote that this event is global and will force the client to refresh all\ncode lenses currently shown. It should be used with absolute care and is\nuseful for situation where a server for example detect a project wide\nchange that requires such a calculation." + } + ], + "documentation": "@since 3.16.0", + "since": "3.16.0" + }, + { + "name": "FileOperationClientCapabilities", + "properties": [ + { + "name": "dynamicRegistration", + "type": { + "kind": "base", + "name": "boolean" + }, + "optional": true, + "documentation": "Whether the client supports dynamic registration for file requests/notifications." + }, + { + "name": "didCreate", + "type": { + "kind": "base", + "name": "boolean" + }, + "optional": true, + "documentation": "The client has support for sending didCreateFiles notifications." + }, + { + "name": "willCreate", + "type": { + "kind": "base", + "name": "boolean" + }, + "optional": true, + "documentation": "The client has support for sending willCreateFiles requests." + }, + { + "name": "didRename", + "type": { + "kind": "base", + "name": "boolean" + }, + "optional": true, + "documentation": "The client has support for sending didRenameFiles notifications." + }, + { + "name": "willRename", + "type": { + "kind": "base", + "name": "boolean" + }, + "optional": true, + "documentation": "The client has support for sending willRenameFiles requests." + }, + { + "name": "didDelete", + "type": { + "kind": "base", + "name": "boolean" + }, + "optional": true, + "documentation": "The client has support for sending didDeleteFiles notifications." + }, + { + "name": "willDelete", + "type": { + "kind": "base", + "name": "boolean" + }, + "optional": true, + "documentation": "The client has support for sending willDeleteFiles requests." + } + ], + "documentation": "Capabilities relating to events from file operations by the user in the client.\n\nThese events do not come from the file system, they come from user operations\nlike renaming a file in the UI.\n\n@since 3.16.0", + "since": "3.16.0" + }, + { + "name": "InlineValueWorkspaceClientCapabilities", + "properties": [ + { + "name": "refreshSupport", + "type": { + "kind": "base", + "name": "boolean" + }, + "optional": true, + "documentation": "Whether the client implementation supports a refresh request sent from the\nserver to the client.\n\nNote that this event is global and will force the client to refresh all\ninline values currently shown. It should be used with absolute care and is\nuseful for situation where a server for example detects a project wide\nchange that requires such a calculation." + } + ], + "documentation": "Client workspace capabilities specific to inline values.\n\n@since 3.17.0", + "since": "3.17.0" + }, + { + "name": "InlayHintWorkspaceClientCapabilities", + "properties": [ + { + "name": "refreshSupport", + "type": { + "kind": "base", + "name": "boolean" + }, + "optional": true, + "documentation": "Whether the client implementation supports a refresh request sent from\nthe server to the client.\n\nNote that this event is global and will force the client to refresh all\ninlay hints currently shown. It should be used with absolute care and\nis useful for situation where a server for example detects a project wide\nchange that requires such a calculation." + } + ], + "documentation": "Client workspace capabilities specific to inlay hints.\n\n@since 3.17.0", + "since": "3.17.0" + }, + { + "name": "DiagnosticWorkspaceClientCapabilities", + "properties": [ + { + "name": "refreshSupport", + "type": { + "kind": "base", + "name": "boolean" + }, + "optional": true, + "documentation": "Whether the client implementation supports a refresh request sent from\nthe server to the client.\n\nNote that this event is global and will force the client to refresh all\npulled diagnostics currently shown. It should be used with absolute care and\nis useful for situation where a server for example detects a project wide\nchange that requires such a calculation." + } + ], + "documentation": "Workspace client capabilities specific to diagnostic pull requests.\n\n@since 3.17.0", + "since": "3.17.0" + }, + { + "name": "FoldingRangeWorkspaceClientCapabilities", + "properties": [ + { + "name": "refreshSupport", + "type": { + "kind": "base", + "name": "boolean" + }, + "optional": true, + "documentation": "Whether the client implementation supports a refresh request sent from the\nserver to the client.\n\nNote that this event is global and will force the client to refresh all\nfolding ranges currently shown. It should be used with absolute care and is\nuseful for situation where a server for example detects a project wide\nchange that requires such a calculation.\n\n@since 3.18.0\n@proposed", + "since": "3.18.0", + "proposed": true + } + ], + "documentation": "Client workspace capabilities specific to folding ranges\n\n@since 3.18.0\n@proposed", + "since": "3.18.0", + "proposed": true + }, + { + "name": "TextDocumentSyncClientCapabilities", + "properties": [ + { + "name": "dynamicRegistration", + "type": { + "kind": "base", + "name": "boolean" + }, + "optional": true, + "documentation": "Whether text document synchronization supports dynamic registration." + }, + { + "name": "willSave", + "type": { + "kind": "base", + "name": "boolean" + }, + "optional": true, + "documentation": "The client supports sending will save notifications." + }, + { + "name": "willSaveWaitUntil", + "type": { + "kind": "base", + "name": "boolean" + }, + "optional": true, + "documentation": "The client supports sending a will save request and\nwaits for a response providing text edits which will\nbe applied to the document before it is saved." + }, + { + "name": "didSave", + "type": { + "kind": "base", + "name": "boolean" + }, + "optional": true, + "documentation": "The client supports did save notifications." + } + ] + }, + { + "name": "CompletionClientCapabilities", + "properties": [ + { + "name": "dynamicRegistration", + "type": { + "kind": "base", + "name": "boolean" + }, + "optional": true, + "documentation": "Whether completion supports dynamic registration." + }, + { + "name": "completionItem", + "type": { + "kind": "reference", + "name": "ClientCompletionItemOptions" + }, + "optional": true, + "documentation": "The client supports the following `CompletionItem` specific\ncapabilities." + }, + { + "name": "completionItemKind", + "type": { + "kind": "reference", + "name": "ClientCompletionItemOptionsKind" + }, + "optional": true + }, + { + "name": "insertTextMode", + "type": { + "kind": "reference", + "name": "InsertTextMode" + }, + "optional": true, + "documentation": "Defines how the client handles whitespace and indentation\nwhen accepting a completion item that uses multi line\ntext in either `insertText` or `textEdit`.\n\n@since 3.17.0", + "since": "3.17.0" + }, + { + "name": "contextSupport", + "type": { + "kind": "base", + "name": "boolean" + }, + "optional": true, + "documentation": "The client supports to send additional context information for a\n`textDocument/completion` request." + }, + { + "name": "completionList", + "type": { + "kind": "reference", + "name": "CompletionListCapabilities" + }, + "optional": true, + "documentation": "The client supports the following `CompletionList` specific\ncapabilities.\n\n@since 3.17.0", + "since": "3.17.0" + } + ], + "documentation": "Completion client capabilities" + }, + { + "name": "HoverClientCapabilities", + "properties": [ + { + "name": "dynamicRegistration", + "type": { + "kind": "base", + "name": "boolean" + }, + "optional": true, + "documentation": "Whether hover supports dynamic registration." + }, + { + "name": "contentFormat", + "type": { + "kind": "array", + "element": { + "kind": "reference", + "name": "MarkupKind" + } + }, + "optional": true, + "documentation": "Client supports the following content formats for the content\nproperty. The order describes the preferred format of the client." + } + ] + }, + { + "name": "SignatureHelpClientCapabilities", + "properties": [ + { + "name": "dynamicRegistration", + "type": { + "kind": "base", + "name": "boolean" + }, + "optional": true, + "documentation": "Whether signature help supports dynamic registration." + }, + { + "name": "signatureInformation", + "type": { + "kind": "reference", + "name": "ClientSignatureInformationOptions" + }, + "optional": true, + "documentation": "The client supports the following `SignatureInformation`\nspecific properties." + }, + { + "name": "contextSupport", + "type": { + "kind": "base", + "name": "boolean" + }, + "optional": true, + "documentation": "The client supports to send additional context information for a\n`textDocument/signatureHelp` request. A client that opts into\ncontextSupport will also support the `retriggerCharacters` on\n`SignatureHelpOptions`.\n\n@since 3.15.0", + "since": "3.15.0" } - ] + ], + "documentation": "Client Capabilities for a {@link SignatureHelpRequest}." }, { - "name": "DidChangeConfigurationClientCapabilities", + "name": "DeclarationClientCapabilities", "properties": [ { "name": "dynamicRegistration", @@ -11231,12 +11886,23 @@ "name": "boolean" }, "optional": true, - "documentation": "Did change configuration notification supports dynamic registration." + "documentation": "Whether declaration supports dynamic registration. If this is set to `true`\nthe client supports the new `DeclarationRegistrationOptions` return value\nfor the corresponding server capability as well." + }, + { + "name": "linkSupport", + "type": { + "kind": "base", + "name": "boolean" + }, + "optional": true, + "documentation": "The client supports additional metadata in the form of declaration links." } - ] + ], + "documentation": "@since 3.14.0", + "since": "3.14.0" }, { - "name": "DidChangeWatchedFilesClientCapabilities", + "name": "DefinitionClientCapabilities", "properties": [ { "name": "dynamicRegistration", @@ -11245,22 +11911,23 @@ "name": "boolean" }, "optional": true, - "documentation": "Did change watched files notification supports dynamic registration. Please note\nthat the current protocol doesn't support static configuration for file changes\nfrom the server side." + "documentation": "Whether definition supports dynamic registration." }, { - "name": "relativePatternSupport", + "name": "linkSupport", "type": { "kind": "base", "name": "boolean" }, "optional": true, - "documentation": "Whether the client has support for {@link RelativePattern relative pattern}\nor not.\n\n@since 3.17.0", - "since": "3.17.0" + "documentation": "The client supports additional metadata in the form of definition links.\n\n@since 3.14.0", + "since": "3.14.0" } - ] + ], + "documentation": "Client Capabilities for a {@link DefinitionRequest}." }, { - "name": "WorkspaceSymbolClientCapabilities", + "name": "TypeDefinitionClientCapabilities", "properties": [ { "name": "dynamicRegistration", @@ -11269,85 +11936,48 @@ "name": "boolean" }, "optional": true, - "documentation": "Symbol request supports dynamic registration." + "documentation": "Whether implementation supports dynamic registration. If this is set to `true`\nthe client supports the new `TypeDefinitionRegistrationOptions` return value\nfor the corresponding server capability as well." }, { - "name": "symbolKind", + "name": "linkSupport", "type": { - "kind": "literal", - "value": { - "properties": [ - { - "name": "valueSet", - "type": { - "kind": "array", - "element": { - "kind": "reference", - "name": "SymbolKind" - } - }, - "optional": true, - "documentation": "The symbol kind values the client supports. When this\nproperty exists the client also guarantees that it will\nhandle values outside its set gracefully and falls back\nto a default value when unknown.\n\nIf this property is not present the client only supports\nthe symbol kinds from `File` to `Array` as defined in\nthe initial version of the protocol." - } - ] - } + "kind": "base", + "name": "boolean" }, "optional": true, - "documentation": "Specific capabilities for the `SymbolKind` in the `workspace/symbol` request." - }, + "documentation": "The client supports additional metadata in the form of definition links.\n\nSince 3.14.0" + } + ], + "documentation": "Since 3.6.0" + }, + { + "name": "ImplementationClientCapabilities", + "properties": [ { - "name": "tagSupport", + "name": "dynamicRegistration", "type": { - "kind": "literal", - "value": { - "properties": [ - { - "name": "valueSet", - "type": { - "kind": "array", - "element": { - "kind": "reference", - "name": "SymbolTag" - } - }, - "documentation": "The tags supported by the client." - } - ] - } + "kind": "base", + "name": "boolean" }, "optional": true, - "documentation": "The client supports tags on `SymbolInformation`.\nClients supporting tags have to handle unknown tags gracefully.\n\n@since 3.16.0", - "since": "3.16.0" + "documentation": "Whether implementation supports dynamic registration. If this is set to `true`\nthe client supports the new `ImplementationRegistrationOptions` return value\nfor the corresponding server capability as well." }, { - "name": "resolveSupport", + "name": "linkSupport", "type": { - "kind": "literal", - "value": { - "properties": [ - { - "name": "properties", - "type": { - "kind": "array", - "element": { - "kind": "base", - "name": "string" - } - }, - "documentation": "The properties that a client can resolve lazily. Usually\n`location.range`" - } - ] - } + "kind": "base", + "name": "boolean" }, "optional": true, - "documentation": "The client support partial workspace symbols. The client will send the\nrequest `workspaceSymbol/resolve` to the server to resolve additional\nproperties.\n\n@since 3.17.0", - "since": "3.17.0" + "documentation": "The client supports additional metadata in the form of definition links.\n\n@since 3.14.0", + "since": "3.14.0" } ], - "documentation": "Client capabilities for a {@link WorkspaceSymbolRequest}." + "documentation": "@since 3.6.0", + "since": "3.6.0" }, { - "name": "ExecuteCommandClientCapabilities", + "name": "ReferenceClientCapabilities", "properties": [ { "name": "dynamicRegistration", @@ -11356,45 +11986,81 @@ "name": "boolean" }, "optional": true, - "documentation": "Execute command supports dynamic registration." + "documentation": "Whether references supports dynamic registration." } ], - "documentation": "The client capabilities of a {@link ExecuteCommandRequest}." + "documentation": "Client Capabilities for a {@link ReferencesRequest}." }, { - "name": "SemanticTokensWorkspaceClientCapabilities", + "name": "DocumentHighlightClientCapabilities", "properties": [ { - "name": "refreshSupport", + "name": "dynamicRegistration", "type": { "kind": "base", "name": "boolean" }, "optional": true, - "documentation": "Whether the client implementation supports a refresh request sent from\nthe server to the client.\n\nNote that this event is global and will force the client to refresh all\nsemantic tokens currently shown. It should be used with absolute care\nand is useful for situation where a server for example detects a project\nwide change that requires such a calculation." + "documentation": "Whether document highlight supports dynamic registration." } ], - "documentation": "@since 3.16.0", - "since": "3.16.0" + "documentation": "Client Capabilities for a {@link DocumentHighlightRequest}." }, { - "name": "CodeLensWorkspaceClientCapabilities", + "name": "DocumentSymbolClientCapabilities", "properties": [ { - "name": "refreshSupport", + "name": "dynamicRegistration", "type": { "kind": "base", "name": "boolean" }, "optional": true, - "documentation": "Whether the client implementation supports a refresh request sent from the\nserver to the client.\n\nNote that this event is global and will force the client to refresh all\ncode lenses currently shown. It should be used with absolute care and is\nuseful for situation where a server for example detect a project wide\nchange that requires such a calculation." + "documentation": "Whether document symbol supports dynamic registration." + }, + { + "name": "symbolKind", + "type": { + "kind": "reference", + "name": "ClientSymbolKindOptions" + }, + "optional": true, + "documentation": "Specific capabilities for the `SymbolKind` in the\n`textDocument/documentSymbol` request." + }, + { + "name": "hierarchicalDocumentSymbolSupport", + "type": { + "kind": "base", + "name": "boolean" + }, + "optional": true, + "documentation": "The client supports hierarchical document symbols." + }, + { + "name": "tagSupport", + "type": { + "kind": "reference", + "name": "ClientSymbolTagOptions" + }, + "optional": true, + "documentation": "The client supports tags on `SymbolInformation`. Tags are supported on\n`DocumentSymbol` if `hierarchicalDocumentSymbolSupport` is set to true.\nClients supporting tags have to handle unknown tags gracefully.\n\n@since 3.16.0", + "since": "3.16.0" + }, + { + "name": "labelSupport", + "type": { + "kind": "base", + "name": "boolean" + }, + "optional": true, + "documentation": "The client supports an additional label presented in the UI when\nregistering a document symbol provider.\n\n@since 3.16.0", + "since": "3.16.0" } ], - "documentation": "@since 3.16.0", - "since": "3.16.0" + "documentation": "Client Capabilities for a {@link DocumentSymbolRequest}." }, { - "name": "FileOperationClientCapabilities", + "name": "CodeActionClientCapabilities", "properties": [ { "name": "dynamicRegistration", @@ -11403,135 +12069,183 @@ "name": "boolean" }, "optional": true, - "documentation": "Whether the client supports dynamic registration for file requests/notifications." + "documentation": "Whether code action supports dynamic registration." }, { - "name": "didCreate", + "name": "codeActionLiteralSupport", + "type": { + "kind": "reference", + "name": "ClientCodeActionLiteralOptions" + }, + "optional": true, + "documentation": "The client support code action literals of type `CodeAction` as a valid\nresponse of the `textDocument/codeAction` request. If the property is not\nset the request can only return `Command` literals.\n\n@since 3.8.0", + "since": "3.8.0" + }, + { + "name": "isPreferredSupport", "type": { "kind": "base", "name": "boolean" }, "optional": true, - "documentation": "The client has support for sending didCreateFiles notifications." + "documentation": "Whether code action supports the `isPreferred` property.\n\n@since 3.15.0", + "since": "3.15.0" }, { - "name": "willCreate", + "name": "disabledSupport", "type": { "kind": "base", "name": "boolean" }, "optional": true, - "documentation": "The client has support for sending willCreateFiles requests." + "documentation": "Whether code action supports the `disabled` property.\n\n@since 3.16.0", + "since": "3.16.0" }, { - "name": "didRename", + "name": "dataSupport", "type": { "kind": "base", "name": "boolean" }, "optional": true, - "documentation": "The client has support for sending didRenameFiles notifications." + "documentation": "Whether code action supports the `data` property which is\npreserved between a `textDocument/codeAction` and a\n`codeAction/resolve` request.\n\n@since 3.16.0", + "since": "3.16.0" }, { - "name": "willRename", + "name": "resolveSupport", + "type": { + "kind": "reference", + "name": "ClientCodeActionResolveOptions" + }, + "optional": true, + "documentation": "Whether the client supports resolving additional code action\nproperties via a separate `codeAction/resolve` request.\n\n@since 3.16.0", + "since": "3.16.0" + }, + { + "name": "honorsChangeAnnotations", "type": { "kind": "base", "name": "boolean" }, "optional": true, - "documentation": "The client has support for sending willRenameFiles requests." - }, + "documentation": "Whether the client honors the change annotations in\ntext edits and resource operations returned via the\n`CodeAction#edit` property by for example presenting\nthe workspace edit in the user interface and asking\nfor confirmation.\n\n@since 3.16.0", + "since": "3.16.0" + } + ], + "documentation": "The Client Capabilities of a {@link CodeActionRequest}." + }, + { + "name": "CodeLensClientCapabilities", + "properties": [ { - "name": "didDelete", + "name": "dynamicRegistration", "type": { "kind": "base", "name": "boolean" }, "optional": true, - "documentation": "The client has support for sending didDeleteFiles notifications." + "documentation": "Whether code lens supports dynamic registration." + } + ], + "documentation": "The client capabilities of a {@link CodeLensRequest}." + }, + { + "name": "DocumentLinkClientCapabilities", + "properties": [ + { + "name": "dynamicRegistration", + "type": { + "kind": "base", + "name": "boolean" + }, + "optional": true, + "documentation": "Whether document link supports dynamic registration." }, { - "name": "willDelete", + "name": "tooltipSupport", "type": { "kind": "base", "name": "boolean" }, "optional": true, - "documentation": "The client has support for sending willDeleteFiles requests." + "documentation": "Whether the client supports the `tooltip` property on `DocumentLink`.\n\n@since 3.15.0", + "since": "3.15.0" } ], - "documentation": "Capabilities relating to events from file operations by the user in the client.\n\nThese events do not come from the file system, they come from user operations\nlike renaming a file in the UI.\n\n@since 3.16.0", - "since": "3.16.0" + "documentation": "The client capabilities of a {@link DocumentLinkRequest}." }, { - "name": "InlineValueWorkspaceClientCapabilities", + "name": "DocumentColorClientCapabilities", "properties": [ { - "name": "refreshSupport", + "name": "dynamicRegistration", "type": { "kind": "base", "name": "boolean" }, "optional": true, - "documentation": "Whether the client implementation supports a refresh request sent from the\nserver to the client.\n\nNote that this event is global and will force the client to refresh all\ninline values currently shown. It should be used with absolute care and is\nuseful for situation where a server for example detects a project wide\nchange that requires such a calculation." + "documentation": "Whether implementation supports dynamic registration. If this is set to `true`\nthe client supports the new `DocumentColorRegistrationOptions` return value\nfor the corresponding server capability as well." } - ], - "documentation": "Client workspace capabilities specific to inline values.\n\n@since 3.17.0", - "since": "3.17.0" + ] }, { - "name": "InlayHintWorkspaceClientCapabilities", + "name": "DocumentFormattingClientCapabilities", "properties": [ { - "name": "refreshSupport", + "name": "dynamicRegistration", "type": { "kind": "base", "name": "boolean" }, "optional": true, - "documentation": "Whether the client implementation supports a refresh request sent from\nthe server to the client.\n\nNote that this event is global and will force the client to refresh all\ninlay hints currently shown. It should be used with absolute care and\nis useful for situation where a server for example detects a project wide\nchange that requires such a calculation." + "documentation": "Whether formatting supports dynamic registration." } ], - "documentation": "Client workspace capabilities specific to inlay hints.\n\n@since 3.17.0", - "since": "3.17.0" + "documentation": "Client capabilities of a {@link DocumentFormattingRequest}." }, { - "name": "DiagnosticWorkspaceClientCapabilities", + "name": "DocumentRangeFormattingClientCapabilities", "properties": [ { - "name": "refreshSupport", + "name": "dynamicRegistration", + "type": { + "kind": "base", + "name": "boolean" + }, + "optional": true, + "documentation": "Whether range formatting supports dynamic registration." + }, + { + "name": "rangesSupport", "type": { "kind": "base", "name": "boolean" }, "optional": true, - "documentation": "Whether the client implementation supports a refresh request sent from\nthe server to the client.\n\nNote that this event is global and will force the client to refresh all\npulled diagnostics currently shown. It should be used with absolute care and\nis useful for situation where a server for example detects a project wide\nchange that requires such a calculation." + "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": "Workspace client capabilities specific to diagnostic pull requests.\n\n@since 3.17.0", - "since": "3.17.0" + "documentation": "Client capabilities of a {@link DocumentRangeFormattingRequest}." }, { - "name": "FoldingRangeWorkspaceClientCapabilities", + "name": "DocumentOnTypeFormattingClientCapabilities", "properties": [ { - "name": "refreshSupport", + "name": "dynamicRegistration", "type": { "kind": "base", "name": "boolean" }, "optional": true, - "documentation": "Whether the client implementation supports a refresh request sent from the\nserver to the client.\n\nNote that this event is global and will force the client to refresh all\nfolding ranges currently shown. It should be used with absolute care and is\nuseful for situation where a server for example detects a project wide\nchange that requires such a calculation.\n\n@since 3.18.0\n@proposed", - "since": "3.18.0", - "proposed": true + "documentation": "Whether on type formatting supports dynamic registration." } ], - "documentation": "Client workspace capabilities specific to folding ranges\n\n@since 3.18.0\n@proposed", - "since": "3.18.0", - "proposed": true + "documentation": "Client capabilities of a {@link DocumentOnTypeFormattingRequest}." }, { - "name": "TextDocumentSyncClientCapabilities", + "name": "RenameClientCapabilities", "properties": [ { "name": "dynamicRegistration", @@ -11540,39 +12254,42 @@ "name": "boolean" }, "optional": true, - "documentation": "Whether text document synchronization supports dynamic registration." + "documentation": "Whether rename supports dynamic registration." }, { - "name": "willSave", + "name": "prepareSupport", "type": { "kind": "base", "name": "boolean" }, "optional": true, - "documentation": "The client supports sending will save notifications." + "documentation": "Client supports testing for validity of rename operations\nbefore execution.\n\n@since 3.12.0", + "since": "3.12.0" }, { - "name": "willSaveWaitUntil", + "name": "prepareSupportDefaultBehavior", "type": { - "kind": "base", - "name": "boolean" + "kind": "reference", + "name": "PrepareSupportDefaultBehavior" }, "optional": true, - "documentation": "The client supports sending a will save request and\nwaits for a response providing text edits which will\nbe applied to the document before it is saved." + "documentation": "Client supports the default behavior result.\n\nThe value indicates the default behavior used by the\nclient.\n\n@since 3.16.0", + "since": "3.16.0" }, { - "name": "didSave", + "name": "honorsChangeAnnotations", "type": { "kind": "base", "name": "boolean" }, "optional": true, - "documentation": "The client supports did save notifications." + "documentation": "Whether the client honors the change annotations in\ntext edits and resource operations returned via the\nrename request's workspace edit by for example presenting\nthe workspace edit in the user interface and asking\nfor confirmation.\n\n@since 3.16.0", + "since": "3.16.0" } ] }, { - "name": "CompletionClientCapabilities", + "name": "FoldingRangeClientCapabilities", "properties": [ { "name": "dynamicRegistration", @@ -11581,339 +12298,119 @@ "name": "boolean" }, "optional": true, - "documentation": "Whether completion supports dynamic registration." + "documentation": "Whether implementation supports dynamic registration for folding range\nproviders. If this is set to `true` the client supports the new\n`FoldingRangeRegistrationOptions` return value for the corresponding\nserver capability as well." }, { - "name": "completionItem", + "name": "rangeLimit", "type": { - "kind": "literal", - "value": { - "properties": [ - { - "name": "snippetSupport", - "type": { - "kind": "base", - "name": "boolean" - }, - "optional": true, - "documentation": "Client supports snippets as insert text.\n\nA snippet can define tab stops and placeholders with `$1`, `$2`\nand `${3:foo}`. `$0` defines the final tab stop, it defaults to\nthe end of the snippet. Placeholders with equal identifiers are linked,\nthat is typing in one will update others too." - }, - { - "name": "commitCharactersSupport", - "type": { - "kind": "base", - "name": "boolean" - }, - "optional": true, - "documentation": "Client supports commit characters on a completion item." - }, - { - "name": "documentationFormat", - "type": { - "kind": "array", - "element": { - "kind": "reference", - "name": "MarkupKind" - } - }, - "optional": true, - "documentation": "Client supports the following content formats for the documentation\nproperty. The order describes the preferred format of the client." - }, - { - "name": "deprecatedSupport", - "type": { - "kind": "base", - "name": "boolean" - }, - "optional": true, - "documentation": "Client supports the deprecated property on a completion item." - }, - { - "name": "preselectSupport", - "type": { - "kind": "base", - "name": "boolean" - }, - "optional": true, - "documentation": "Client supports the preselect property on a completion item." - }, - { - "name": "tagSupport", - "type": { - "kind": "literal", - "value": { - "properties": [ - { - "name": "valueSet", - "type": { - "kind": "array", - "element": { - "kind": "reference", - "name": "CompletionItemTag" - } - }, - "documentation": "The tags supported by the client." - } - ] - } - }, - "optional": true, - "documentation": "Client supports the tag property on a completion item. Clients supporting\ntags have to handle unknown tags gracefully. Clients especially need to\npreserve unknown tags when sending a completion item back to the server in\na resolve call.\n\n@since 3.15.0", - "since": "3.15.0" - }, - { - "name": "insertReplaceSupport", - "type": { - "kind": "base", - "name": "boolean" - }, - "optional": true, - "documentation": "Client support insert replace edit to control different behavior if a\ncompletion item is inserted in the text or should replace text.\n\n@since 3.16.0", - "since": "3.16.0" - }, - { - "name": "resolveSupport", - "type": { - "kind": "literal", - "value": { - "properties": [ - { - "name": "properties", - "type": { - "kind": "array", - "element": { - "kind": "base", - "name": "string" - } - }, - "documentation": "The properties that a client can resolve lazily." - } - ] - } - }, - "optional": true, - "documentation": "Indicates which properties a client can resolve lazily on a completion\nitem. Before version 3.16.0 only the predefined properties `documentation`\nand `details` could be resolved lazily.\n\n@since 3.16.0", - "since": "3.16.0" - }, - { - "name": "insertTextModeSupport", - "type": { - "kind": "literal", - "value": { - "properties": [ - { - "name": "valueSet", - "type": { - "kind": "array", - "element": { - "kind": "reference", - "name": "InsertTextMode" - } - } - } - ] - } - }, - "optional": true, - "documentation": "The client supports the `insertTextMode` property on\na completion item to override the whitespace handling mode\nas defined by the client (see `insertTextMode`).\n\n@since 3.16.0", - "since": "3.16.0" - }, - { - "name": "labelDetailsSupport", - "type": { - "kind": "base", - "name": "boolean" - }, - "optional": true, - "documentation": "The client has support for completion item label\ndetails (see also `CompletionItemLabelDetails`).\n\n@since 3.17.0", - "since": "3.17.0" - } - ] - } + "kind": "base", + "name": "uinteger" }, "optional": true, - "documentation": "The client supports the following `CompletionItem` specific\ncapabilities." + "documentation": "The maximum number of folding ranges that the client prefers to receive\nper document. The value serves as a hint, servers are free to follow the\nlimit." }, { - "name": "completionItemKind", + "name": "lineFoldingOnly", "type": { - "kind": "literal", - "value": { - "properties": [ - { - "name": "valueSet", - "type": { - "kind": "array", - "element": { - "kind": "reference", - "name": "CompletionItemKind" - } - }, - "optional": true, - "documentation": "The completion item kind values the client supports. When this\nproperty exists the client also guarantees that it will\nhandle values outside its set gracefully and falls back\nto a default value when unknown.\n\nIf this property is not present the client only supports\nthe completion items kinds from `Text` to `Reference` as defined in\nthe initial version of the protocol." - } - ] - } + "kind": "base", + "name": "boolean" }, - "optional": true + "optional": true, + "documentation": "If set, the client signals that it only supports folding complete lines.\nIf set, client will ignore specified `startCharacter` and `endCharacter`\nproperties in a FoldingRange." }, { - "name": "insertTextMode", + "name": "foldingRangeKind", "type": { "kind": "reference", - "name": "InsertTextMode" + "name": "ClientFoldingRangeKindOptions" }, "optional": true, - "documentation": "Defines how the client handles whitespace and indentation\nwhen accepting a completion item that uses multi line\ntext in either `insertText` or `textEdit`.\n\n@since 3.17.0", + "documentation": "Specific options for the folding range kind.\n\n@since 3.17.0", "since": "3.17.0" }, { - "name": "contextSupport", + "name": "foldingRange", "type": { - "kind": "base", - "name": "boolean" + "kind": "reference", + "name": "ClientFoldingRangeOptions" }, "optional": true, - "documentation": "The client supports to send additional context information for a\n`textDocument/completion` request." - }, + "documentation": "Specific options for the folding range.\n\n@since 3.17.0", + "since": "3.17.0" + } + ] + }, + { + "name": "SelectionRangeClientCapabilities", + "properties": [ { - "name": "completionList", + "name": "dynamicRegistration", "type": { - "kind": "literal", - "value": { - "properties": [ - { - "name": "itemDefaults", - "type": { - "kind": "array", - "element": { - "kind": "base", - "name": "string" - } - }, - "optional": true, - "documentation": "The client supports the following itemDefaults on\na completion list.\n\nThe value lists the supported property names of the\n`CompletionList.itemDefaults` object. If omitted\nno properties are supported.\n\n@since 3.17.0", - "since": "3.17.0" - } - ] - } + "kind": "base", + "name": "boolean" }, "optional": true, - "documentation": "The client supports the following `CompletionList` specific\ncapabilities.\n\n@since 3.17.0", - "since": "3.17.0" + "documentation": "Whether implementation supports dynamic registration for selection range providers. If this is set to `true`\nthe client supports the new `SelectionRangeRegistrationOptions` return value for the corresponding server\ncapability as well." } - ], - "documentation": "Completion client capabilities" + ] }, { - "name": "HoverClientCapabilities", + "name": "PublishDiagnosticsClientCapabilities", "properties": [ { - "name": "dynamicRegistration", + "name": "relatedInformation", "type": { "kind": "base", "name": "boolean" }, "optional": true, - "documentation": "Whether hover supports dynamic registration." + "documentation": "Whether the clients accepts diagnostics with related information." }, { - "name": "contentFormat", + "name": "tagSupport", "type": { - "kind": "array", - "element": { - "kind": "reference", - "name": "MarkupKind" - } + "kind": "reference", + "name": "ClientDiagnosticsTagOptions" }, "optional": true, - "documentation": "Client supports the following content formats for the content\nproperty. The order describes the preferred format of the client." - } - ] - }, - { - "name": "SignatureHelpClientCapabilities", - "properties": [ + "documentation": "Client supports the tag property to provide meta data about a diagnostic.\nClients supporting tags have to handle unknown tags gracefully.\n\n@since 3.15.0", + "since": "3.15.0" + }, { - "name": "dynamicRegistration", + "name": "versionSupport", "type": { "kind": "base", "name": "boolean" }, "optional": true, - "documentation": "Whether signature help supports dynamic registration." + "documentation": "Whether the client interprets the version property of the\n`textDocument/publishDiagnostics` notification's parameter.\n\n@since 3.15.0", + "since": "3.15.0" }, { - "name": "signatureInformation", + "name": "codeDescriptionSupport", "type": { - "kind": "literal", - "value": { - "properties": [ - { - "name": "documentationFormat", - "type": { - "kind": "array", - "element": { - "kind": "reference", - "name": "MarkupKind" - } - }, - "optional": true, - "documentation": "Client supports the following content formats for the documentation\nproperty. The order describes the preferred format of the client." - }, - { - "name": "parameterInformation", - "type": { - "kind": "literal", - "value": { - "properties": [ - { - "name": "labelOffsetSupport", - "type": { - "kind": "base", - "name": "boolean" - }, - "optional": true, - "documentation": "The client supports processing label offsets instead of a\nsimple label string.\n\n@since 3.14.0", - "since": "3.14.0" - } - ] - } - }, - "optional": true, - "documentation": "Client capabilities specific to parameter information." - }, - { - "name": "activeParameterSupport", - "type": { - "kind": "base", - "name": "boolean" - }, - "optional": true, - "documentation": "The client supports the `activeParameter` property on `SignatureInformation`\nliteral.\n\n@since 3.16.0", - "since": "3.16.0" - } - ] - } + "kind": "base", + "name": "boolean" }, "optional": true, - "documentation": "The client supports the following `SignatureInformation`\nspecific properties." + "documentation": "Client supports a codeDescription property\n\n@since 3.16.0", + "since": "3.16.0" }, { - "name": "contextSupport", + "name": "dataSupport", "type": { "kind": "base", "name": "boolean" }, "optional": true, - "documentation": "The client supports to send additional context information for a\n`textDocument/signatureHelp` request. A client that opts into\ncontextSupport will also support the `retriggerCharacters` on\n`SignatureHelpOptions`.\n\n@since 3.15.0", - "since": "3.15.0" + "documentation": "Whether code action supports the `data` property which is\npreserved between a `textDocument/publishDiagnostics` and\n`textDocument/codeAction` request.\n\n@since 3.16.0", + "since": "3.16.0" } ], - "documentation": "Client Capabilities for a {@link SignatureHelpRequest}." + "documentation": "The publish diagnostic client capabilities." }, { - "name": "DeclarationClientCapabilities", + "name": "CallHierarchyClientCapabilities", "properties": [ { "name": "dynamicRegistration", @@ -11922,72 +12419,109 @@ "name": "boolean" }, "optional": true, - "documentation": "Whether declaration supports dynamic registration. If this is set to `true`\nthe client supports the new `DeclarationRegistrationOptions` return value\nfor the corresponding server capability as well." - }, + "documentation": "Whether implementation supports dynamic registration. If this is set to `true`\nthe client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`\nreturn value for the corresponding server capability as well." + } + ], + "documentation": "@since 3.16.0", + "since": "3.16.0" + }, + { + "name": "SemanticTokensClientCapabilities", + "properties": [ { - "name": "linkSupport", + "name": "dynamicRegistration", "type": { "kind": "base", "name": "boolean" }, "optional": true, - "documentation": "The client supports additional metadata in the form of declaration links." - } - ], - "documentation": "@since 3.14.0", - "since": "3.14.0" - }, - { - "name": "DefinitionClientCapabilities", - "properties": [ + "documentation": "Whether implementation supports dynamic registration. If this is set to `true`\nthe client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`\nreturn value for the corresponding server capability as well." + }, + { + "name": "requests", + "type": { + "kind": "reference", + "name": "ClientSemanticTokensRequestOptions" + }, + "documentation": "Which requests the client supports and might send to the server\ndepending on the server's capability. Please note that clients might not\nshow semantic tokens or degrade some of the user experience if a range\nor full request is advertised by the client but not provided by the\nserver. If for example the client capability `requests.full` and\n`request.range` are both set to true but the server only provides a\nrange provider the client might not render a minimap correctly or might\neven decide to not show any semantic tokens at all." + }, + { + "name": "tokenTypes", + "type": { + "kind": "array", + "element": { + "kind": "base", + "name": "string" + } + }, + "documentation": "The token types that the client supports." + }, + { + "name": "tokenModifiers", + "type": { + "kind": "array", + "element": { + "kind": "base", + "name": "string" + } + }, + "documentation": "The token modifiers that the client supports." + }, + { + "name": "formats", + "type": { + "kind": "array", + "element": { + "kind": "reference", + "name": "TokenFormat" + } + }, + "documentation": "The token formats the clients supports." + }, { - "name": "dynamicRegistration", + "name": "overlappingTokenSupport", "type": { "kind": "base", "name": "boolean" }, "optional": true, - "documentation": "Whether definition supports dynamic registration." + "documentation": "Whether the client supports tokens that can overlap each other." }, { - "name": "linkSupport", + "name": "multilineTokenSupport", "type": { "kind": "base", "name": "boolean" }, "optional": true, - "documentation": "The client supports additional metadata in the form of definition links.\n\n@since 3.14.0", - "since": "3.14.0" - } - ], - "documentation": "Client Capabilities for a {@link DefinitionRequest}." - }, - { - "name": "TypeDefinitionClientCapabilities", - "properties": [ + "documentation": "Whether the client supports tokens that can span multiple lines." + }, { - "name": "dynamicRegistration", + "name": "serverCancelSupport", "type": { "kind": "base", "name": "boolean" }, "optional": true, - "documentation": "Whether implementation supports dynamic registration. If this is set to `true`\nthe client supports the new `TypeDefinitionRegistrationOptions` return value\nfor the corresponding server capability as well." + "documentation": "Whether the client allows the server to actively cancel a\nsemantic token request, e.g. supports returning\nLSPErrorCodes.ServerCancelled. If a server does the client\nneeds to retrigger the request.\n\n@since 3.17.0", + "since": "3.17.0" }, { - "name": "linkSupport", + "name": "augmentsSyntaxTokens", "type": { "kind": "base", "name": "boolean" }, "optional": true, - "documentation": "The client supports additional metadata in the form of definition links.\n\nSince 3.14.0" + "documentation": "Whether the client uses semantic tokens to augment existing\nsyntax tokens. If set to `true` client side created syntax\ntokens and semantic tokens are both used for colorization. If\nset to `false` the client only uses the returned semantic tokens\nfor colorization.\n\nIf the value is `undefined` then the client behavior is not\nspecified.\n\n@since 3.17.0", + "since": "3.17.0" } ], - "documentation": "Since 3.6.0" + "documentation": "@since 3.16.0", + "since": "3.16.0" }, { - "name": "ImplementationClientCapabilities", + "name": "LinkedEditingRangeClientCapabilities", "properties": [ { "name": "dynamicRegistration", @@ -11996,24 +12530,30 @@ "name": "boolean" }, "optional": true, - "documentation": "Whether implementation supports dynamic registration. If this is set to `true`\nthe client supports the new `ImplementationRegistrationOptions` return value\nfor the corresponding server capability as well." - }, + "documentation": "Whether implementation supports dynamic registration. If this is set to `true`\nthe client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`\nreturn value for the corresponding server capability as well." + } + ], + "documentation": "Client capabilities for the linked editing range request.\n\n@since 3.16.0", + "since": "3.16.0" + }, + { + "name": "MonikerClientCapabilities", + "properties": [ { - "name": "linkSupport", + "name": "dynamicRegistration", "type": { "kind": "base", "name": "boolean" }, "optional": true, - "documentation": "The client supports additional metadata in the form of definition links.\n\n@since 3.14.0", - "since": "3.14.0" + "documentation": "Whether moniker supports dynamic registration. If this is set to `true`\nthe client supports the new `MonikerRegistrationOptions` return value\nfor the corresponding server capability as well." } ], - "documentation": "@since 3.6.0", - "since": "3.6.0" + "documentation": "Client capabilities specific to the moniker request.\n\n@since 3.16.0", + "since": "3.16.0" }, { - "name": "ReferenceClientCapabilities", + "name": "TypeHierarchyClientCapabilities", "properties": [ { "name": "dynamicRegistration", @@ -12022,13 +12562,14 @@ "name": "boolean" }, "optional": true, - "documentation": "Whether references supports dynamic registration." + "documentation": "Whether implementation supports dynamic registration. If this is set to `true`\nthe client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`\nreturn value for the corresponding server capability as well." } ], - "documentation": "Client Capabilities for a {@link ReferencesRequest}." + "documentation": "@since 3.17.0", + "since": "3.17.0" }, { - "name": "DocumentHighlightClientCapabilities", + "name": "InlineValueClientCapabilities", "properties": [ { "name": "dynamicRegistration", @@ -12037,13 +12578,14 @@ "name": "boolean" }, "optional": true, - "documentation": "Whether document highlight supports dynamic registration." + "documentation": "Whether implementation supports dynamic registration for inline value providers." } ], - "documentation": "Client Capabilities for a {@link DocumentHighlightRequest}." + "documentation": "Client capabilities specific to inline values.\n\n@since 3.17.0", + "since": "3.17.0" }, { - "name": "DocumentSymbolClientCapabilities", + "name": "InlayHintClientCapabilities", "properties": [ { "name": "dynamicRegistration", @@ -12052,80 +12594,48 @@ "name": "boolean" }, "optional": true, - "documentation": "Whether document symbol supports dynamic registration." + "documentation": "Whether inlay hints support dynamic registration." }, { - "name": "symbolKind", + "name": "resolveSupport", "type": { - "kind": "literal", - "value": { - "properties": [ - { - "name": "valueSet", - "type": { - "kind": "array", - "element": { - "kind": "reference", - "name": "SymbolKind" - } - }, - "optional": true, - "documentation": "The symbol kind values the client supports. When this\nproperty exists the client also guarantees that it will\nhandle values outside its set gracefully and falls back\nto a default value when unknown.\n\nIf this property is not present the client only supports\nthe symbol kinds from `File` to `Array` as defined in\nthe initial version of the protocol." - } - ] - } + "kind": "reference", + "name": "ClientInlayHintResolveOptions" }, "optional": true, - "documentation": "Specific capabilities for the `SymbolKind` in the\n`textDocument/documentSymbol` request." - }, + "documentation": "Indicates which properties a client can resolve lazily on an inlay\nhint." + } + ], + "documentation": "Inlay hint client capabilities.\n\n@since 3.17.0", + "since": "3.17.0" + }, + { + "name": "DiagnosticClientCapabilities", + "properties": [ { - "name": "hierarchicalDocumentSymbolSupport", + "name": "dynamicRegistration", "type": { "kind": "base", "name": "boolean" }, "optional": true, - "documentation": "The client supports hierarchical document symbols." - }, - { - "name": "tagSupport", - "type": { - "kind": "literal", - "value": { - "properties": [ - { - "name": "valueSet", - "type": { - "kind": "array", - "element": { - "kind": "reference", - "name": "SymbolTag" - } - }, - "documentation": "The tags supported by the client." - } - ] - } - }, - "optional": true, - "documentation": "The client supports tags on `SymbolInformation`. Tags are supported on\n`DocumentSymbol` if `hierarchicalDocumentSymbolSupport` is set to true.\nClients supporting tags have to handle unknown tags gracefully.\n\n@since 3.16.0", - "since": "3.16.0" + "documentation": "Whether implementation supports dynamic registration. If this is set to `true`\nthe client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`\nreturn value for the corresponding server capability as well." }, { - "name": "labelSupport", + "name": "relatedDocumentSupport", "type": { "kind": "base", "name": "boolean" }, "optional": true, - "documentation": "The client supports an additional label presented in the UI when\nregistering a document symbol provider.\n\n@since 3.16.0", - "since": "3.16.0" + "documentation": "Whether the clients supports related documents for document diagnostic pulls." } ], - "documentation": "Client Capabilities for a {@link DocumentSymbolRequest}." + "documentation": "Client capabilities specific to diagnostic pull requests.\n\n@since 3.17.0", + "since": "3.17.0" }, { - "name": "CodeActionClientCapabilities", + "name": "InlineCompletionClientCapabilities", "properties": [ { "name": "dynamicRegistration", @@ -12134,529 +12644,479 @@ "name": "boolean" }, "optional": true, - "documentation": "Whether code action supports dynamic registration." - }, - { - "name": "codeActionLiteralSupport", - "type": { - "kind": "literal", - "value": { - "properties": [ - { - "name": "codeActionKind", - "type": { - "kind": "literal", - "value": { - "properties": [ - { - "name": "valueSet", - "type": { - "kind": "array", - "element": { - "kind": "reference", - "name": "CodeActionKind" - } - }, - "documentation": "The code action kind values the client supports. When this\nproperty exists the client also guarantees that it will\nhandle values outside its set gracefully and falls back\nto a default value when unknown." - } - ] - } - }, - "documentation": "The code action kind is support with the following value\nset." - } - ] - } - }, - "optional": true, - "documentation": "The client support code action literals of type `CodeAction` as a valid\nresponse of the `textDocument/codeAction` request. If the property is not\nset the request can only return `Command` literals.\n\n@since 3.8.0", - "since": "3.8.0" - }, - { - "name": "isPreferredSupport", - "type": { - "kind": "base", - "name": "boolean" - }, - "optional": true, - "documentation": "Whether code action supports the `isPreferred` property.\n\n@since 3.15.0", - "since": "3.15.0" - }, + "documentation": "Whether implementation supports dynamic registration for inline completion providers." + } + ], + "documentation": "Client capabilities specific to inline completions.\n\n@since 3.18.0\n@proposed", + "since": "3.18.0", + "proposed": true + }, + { + "name": "NotebookDocumentSyncClientCapabilities", + "properties": [ { - "name": "disabledSupport", + "name": "dynamicRegistration", "type": { "kind": "base", "name": "boolean" }, "optional": true, - "documentation": "Whether code action supports the `disabled` property.\n\n@since 3.16.0", - "since": "3.16.0" + "documentation": "Whether implementation supports dynamic registration. If this is\nset to `true` the client supports the new\n`(TextDocumentRegistrationOptions & StaticRegistrationOptions)`\nreturn value for the corresponding server capability as well." }, { - "name": "dataSupport", + "name": "executionSummarySupport", "type": { "kind": "base", "name": "boolean" }, "optional": true, - "documentation": "Whether code action supports the `data` property which is\npreserved between a `textDocument/codeAction` and a\n`codeAction/resolve` request.\n\n@since 3.16.0", - "since": "3.16.0" - }, + "documentation": "The client supports sending execution summary data per cell." + } + ], + "documentation": "Notebook specific client capabilities.\n\n@since 3.17.0", + "since": "3.17.0" + }, + { + "name": "ShowMessageRequestClientCapabilities", + "properties": [ { - "name": "resolveSupport", + "name": "messageActionItem", "type": { - "kind": "literal", - "value": { - "properties": [ - { - "name": "properties", - "type": { - "kind": "array", - "element": { - "kind": "base", - "name": "string" - } - }, - "documentation": "The properties that a client can resolve lazily." - } - ] - } + "kind": "reference", + "name": "ClientShowMessageActionItemOptions" }, "optional": true, - "documentation": "Whether the client supports resolving additional code action\nproperties via a separate `codeAction/resolve` request.\n\n@since 3.16.0", - "since": "3.16.0" - }, + "documentation": "Capabilities specific to the `MessageActionItem` type." + } + ], + "documentation": "Show message request client capabilities" + }, + { + "name": "ShowDocumentClientCapabilities", + "properties": [ { - "name": "honorsChangeAnnotations", + "name": "support", "type": { "kind": "base", "name": "boolean" }, - "optional": true, - "documentation": "Whether the client honors the change annotations in\ntext edits and resource operations returned via the\n`CodeAction#edit` property by for example presenting\nthe workspace edit in the user interface and asking\nfor confirmation.\n\n@since 3.16.0", - "since": "3.16.0" + "documentation": "The client has support for the showDocument\nrequest." } ], - "documentation": "The Client Capabilities of a {@link CodeActionRequest}." + "documentation": "Client capabilities for the showDocument request.\n\n@since 3.16.0", + "since": "3.16.0" }, { - "name": "CodeLensClientCapabilities", + "name": "StaleRequestSupportOptions", "properties": [ { - "name": "dynamicRegistration", + "name": "cancel", "type": { "kind": "base", "name": "boolean" }, - "optional": true, - "documentation": "Whether code lens supports dynamic registration." + "documentation": "The client will actively cancel the request." + }, + { + "name": "retryOnContentModified", + "type": { + "kind": "array", + "element": { + "kind": "base", + "name": "string" + } + }, + "documentation": "The list of requests for which the client\nwill retry the request if it receives a\nresponse with error code `ContentModified`" } ], - "documentation": "The client capabilities of a {@link CodeLensRequest}." + "documentation": "@since 3.18.0\n@proposed", + "since": "3.18.0", + "proposed": true }, { - "name": "DocumentLinkClientCapabilities", + "name": "RegularExpressionsClientCapabilities", "properties": [ { - "name": "dynamicRegistration", + "name": "engine", "type": { "kind": "base", - "name": "boolean" + "name": "string" }, - "optional": true, - "documentation": "Whether document link supports dynamic registration." + "documentation": "The engine's name." }, { - "name": "tooltipSupport", + "name": "version", "type": { "kind": "base", - "name": "boolean" + "name": "string" }, "optional": true, - "documentation": "Whether the client supports the `tooltip` property on `DocumentLink`.\n\n@since 3.15.0", - "since": "3.15.0" + "documentation": "The engine's version." } ], - "documentation": "The client capabilities of a {@link DocumentLinkRequest}." + "documentation": "Client capabilities specific to regular expressions.\n\n@since 3.16.0", + "since": "3.16.0" }, { - "name": "DocumentColorClientCapabilities", + "name": "MarkdownClientCapabilities", "properties": [ { - "name": "dynamicRegistration", + "name": "parser", + "type": { + "kind": "base", + "name": "string" + }, + "documentation": "The name of the parser." + }, + { + "name": "version", "type": { "kind": "base", - "name": "boolean" + "name": "string" }, "optional": true, - "documentation": "Whether implementation supports dynamic registration. If this is set to `true`\nthe client supports the new `DocumentColorRegistrationOptions` return value\nfor the corresponding server capability as well." + "documentation": "The version of the parser." + }, + { + "name": "allowedTags", + "type": { + "kind": "array", + "element": { + "kind": "base", + "name": "string" + } + }, + "optional": true, + "documentation": "A list of HTML tags that the client allows / supports in\nMarkdown.\n\n@since 3.17.0", + "since": "3.17.0" } - ] + ], + "documentation": "Client capabilities specific to the used markdown parser.\n\n@since 3.16.0", + "since": "3.16.0" }, { - "name": "DocumentFormattingClientCapabilities", + "name": "NotebookCellLanguage", "properties": [ { - "name": "dynamicRegistration", + "name": "language", "type": { "kind": "base", - "name": "boolean" - }, - "optional": true, - "documentation": "Whether formatting supports dynamic registration." + "name": "string" + } } ], - "documentation": "Client capabilities of a {@link DocumentFormattingRequest}." + "documentation": "@since 3.18.0\n@proposed", + "since": "3.18.0", + "proposed": true }, { - "name": "DocumentRangeFormattingClientCapabilities", + "name": "NotebookDocumentFilterNotebookType", "properties": [ { - "name": "dynamicRegistration", + "name": "notebookType", "type": { "kind": "base", - "name": "boolean" + "name": "string" }, - "optional": true, - "documentation": "Whether range formatting supports dynamic registration." + "documentation": "The type of the enclosing notebook." }, { - "name": "rangesSupport", + "name": "scheme", "type": { "kind": "base", - "name": "boolean" + "name": "string" }, "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}." - }, - { - "name": "DocumentOnTypeFormattingClientCapabilities", - "properties": [ + "documentation": "A Uri {@link Uri.scheme scheme}, like `file` or `untitled`." + }, { - "name": "dynamicRegistration", + "name": "pattern", "type": { "kind": "base", - "name": "boolean" + "name": "string" }, "optional": true, - "documentation": "Whether on type formatting supports dynamic registration." + "documentation": "A glob pattern." } ], - "documentation": "Client capabilities of a {@link DocumentOnTypeFormattingRequest}." + "documentation": "A notebook document filter where `notebookType` is required field.\n\n@since 3.18.0\n@proposed", + "since": "3.18.0", + "proposed": true }, { - "name": "RenameClientCapabilities", + "name": "NotebookDocumentFilterScheme", "properties": [ { - "name": "dynamicRegistration", + "name": "notebookType", "type": { "kind": "base", - "name": "boolean" + "name": "string" }, "optional": true, - "documentation": "Whether rename supports dynamic registration." + "documentation": "The type of the enclosing notebook." }, { - "name": "prepareSupport", + "name": "scheme", "type": { "kind": "base", - "name": "boolean" - }, - "optional": true, - "documentation": "Client supports testing for validity of rename operations\nbefore execution.\n\n@since 3.12.0", - "since": "3.12.0" - }, - { - "name": "prepareSupportDefaultBehavior", - "type": { - "kind": "reference", - "name": "PrepareSupportDefaultBehavior" + "name": "string" }, - "optional": true, - "documentation": "Client supports the default behavior result.\n\nThe value indicates the default behavior used by the\nclient.\n\n@since 3.16.0", - "since": "3.16.0" + "documentation": "A Uri {@link Uri.scheme scheme}, like `file` or `untitled`." }, { - "name": "honorsChangeAnnotations", + "name": "pattern", "type": { "kind": "base", - "name": "boolean" + "name": "string" }, "optional": true, - "documentation": "Whether the client honors the change annotations in\ntext edits and resource operations returned via the\nrename request's workspace edit by for example presenting\nthe workspace edit in the user interface and asking\nfor confirmation.\n\n@since 3.16.0", - "since": "3.16.0" + "documentation": "A glob pattern." } - ] + ], + "documentation": "A notebook document filter where `scheme` is required field.\n\n@since 3.18.0\n@proposed", + "since": "3.18.0", + "proposed": true }, { - "name": "FoldingRangeClientCapabilities", + "name": "NotebookDocumentFilterPattern", "properties": [ { - "name": "dynamicRegistration", + "name": "notebookType", "type": { "kind": "base", - "name": "boolean" + "name": "string" }, "optional": true, - "documentation": "Whether implementation supports dynamic registration for folding range\nproviders. If this is set to `true` the client supports the new\n`FoldingRangeRegistrationOptions` return value for the corresponding\nserver capability as well." + "documentation": "The type of the enclosing notebook." }, { - "name": "rangeLimit", + "name": "scheme", "type": { "kind": "base", - "name": "uinteger" + "name": "string" }, "optional": true, - "documentation": "The maximum number of folding ranges that the client prefers to receive\nper document. The value serves as a hint, servers are free to follow the\nlimit." + "documentation": "A Uri {@link Uri.scheme scheme}, like `file` or `untitled`." }, { - "name": "lineFoldingOnly", + "name": "pattern", + "type": { + "kind": "base", + "name": "string" + }, + "documentation": "A glob pattern." + } + ], + "documentation": "A notebook document filter where `pattern` is required field.\n\n@since 3.18.0\n@proposed", + "since": "3.18.0", + "proposed": true + }, + { + "name": "ChangeAnnotationsSupportOptions", + "properties": [ + { + "name": "groupsOnLabel", "type": { "kind": "base", "name": "boolean" }, "optional": true, - "documentation": "If set, the client signals that it only supports folding complete lines.\nIf set, client will ignore specified `startCharacter` and `endCharacter`\nproperties in a FoldingRange." - }, + "documentation": "Whether the client groups edits with equal labels into tree nodes,\nfor instance all edits labelled with \"Changes in Strings\" would\nbe a tree node." + } + ], + "documentation": "@since 3.18.0\n@proposed", + "since": "3.18.0", + "proposed": true + }, + { + "name": "ClientSymbolKindOptions", + "properties": [ { - "name": "foldingRangeKind", + "name": "valueSet", "type": { - "kind": "literal", - "value": { - "properties": [ - { - "name": "valueSet", - "type": { - "kind": "array", - "element": { - "kind": "reference", - "name": "FoldingRangeKind" - } - }, - "optional": true, - "documentation": "The folding range kind values the client supports. When this\nproperty exists the client also guarantees that it will\nhandle values outside its set gracefully and falls back\nto a default value when unknown." - } - ] + "kind": "array", + "element": { + "kind": "reference", + "name": "SymbolKind" } }, "optional": true, - "documentation": "Specific options for the folding range kind.\n\n@since 3.17.0", - "since": "3.17.0" - }, + "documentation": "The symbol kind values the client supports. When this\nproperty exists the client also guarantees that it will\nhandle values outside its set gracefully and falls back\nto a default value when unknown.\n\nIf this property is not present the client only supports\nthe symbol kinds from `File` to `Array` as defined in\nthe initial version of the protocol." + } + ], + "documentation": "@since 3.18.0\n@proposed", + "since": "3.18.0", + "proposed": true + }, + { + "name": "ClientSymbolTagOptions", + "properties": [ { - "name": "foldingRange", + "name": "valueSet", "type": { - "kind": "literal", - "value": { - "properties": [ - { - "name": "collapsedText", - "type": { - "kind": "base", - "name": "boolean" - }, - "optional": true, - "documentation": "If set, the client signals that it supports setting collapsedText on\nfolding ranges to display custom labels instead of the default text.\n\n@since 3.17.0", - "since": "3.17.0" - } - ] + "kind": "array", + "element": { + "kind": "reference", + "name": "SymbolTag" } }, - "optional": true, - "documentation": "Specific options for the folding range.\n\n@since 3.17.0", - "since": "3.17.0" + "documentation": "The tags supported by the client." } - ] + ], + "documentation": "@since 3.18.0\n@proposed", + "since": "3.18.0", + "proposed": true }, { - "name": "SelectionRangeClientCapabilities", + "name": "ClientSymbolResolveOptions", "properties": [ { - "name": "dynamicRegistration", + "name": "properties", "type": { - "kind": "base", - "name": "boolean" + "kind": "array", + "element": { + "kind": "base", + "name": "string" + } }, - "optional": true, - "documentation": "Whether implementation supports dynamic registration for selection range providers. If this is set to `true`\nthe client supports the new `SelectionRangeRegistrationOptions` return value for the corresponding server\ncapability as well." + "documentation": "The properties that a client can resolve lazily. Usually\n`location.range`" } - ] + ], + "documentation": "@since 3.18.0\n@proposed", + "since": "3.18.0", + "proposed": true }, { - "name": "PublishDiagnosticsClientCapabilities", + "name": "ClientCompletionItemOptions", "properties": [ { - "name": "relatedInformation", + "name": "snippetSupport", "type": { "kind": "base", "name": "boolean" }, "optional": true, - "documentation": "Whether the clients accepts diagnostics with related information." + "documentation": "Client supports snippets as insert text.\n\nA snippet can define tab stops and placeholders with `$1`, `$2`\nand `${3:foo}`. `$0` defines the final tab stop, it defaults to\nthe end of the snippet. Placeholders with equal identifiers are linked,\nthat is typing in one will update others too." }, { - "name": "tagSupport", + "name": "commitCharactersSupport", "type": { - "kind": "literal", - "value": { - "properties": [ - { - "name": "valueSet", - "type": { - "kind": "array", - "element": { - "kind": "reference", - "name": "DiagnosticTag" - } - }, - "documentation": "The tags supported by the client." - } - ] + "kind": "base", + "name": "boolean" + }, + "optional": true, + "documentation": "Client supports commit characters on a completion item." + }, + { + "name": "documentationFormat", + "type": { + "kind": "array", + "element": { + "kind": "reference", + "name": "MarkupKind" } }, "optional": true, - "documentation": "Client supports the tag property to provide meta data about a diagnostic.\nClients supporting tags have to handle unknown tags gracefully.\n\n@since 3.15.0", - "since": "3.15.0" + "documentation": "Client supports the following content formats for the documentation\nproperty. The order describes the preferred format of the client." }, { - "name": "versionSupport", + "name": "deprecatedSupport", "type": { "kind": "base", "name": "boolean" }, "optional": true, - "documentation": "Whether the client interprets the version property of the\n`textDocument/publishDiagnostics` notification's parameter.\n\n@since 3.15.0", - "since": "3.15.0" + "documentation": "Client supports the deprecated property on a completion item." }, { - "name": "codeDescriptionSupport", + "name": "preselectSupport", "type": { "kind": "base", "name": "boolean" }, "optional": true, - "documentation": "Client supports a codeDescription property\n\n@since 3.16.0", - "since": "3.16.0" + "documentation": "Client supports the preselect property on a completion item." }, { - "name": "dataSupport", + "name": "tagSupport", + "type": { + "kind": "reference", + "name": "CompletionItemTagOptions" + }, + "optional": true, + "documentation": "Client supports the tag property on a completion item. Clients supporting\ntags have to handle unknown tags gracefully. Clients especially need to\npreserve unknown tags when sending a completion item back to the server in\na resolve call.\n\n@since 3.15.0", + "since": "3.15.0" + }, + { + "name": "insertReplaceSupport", "type": { "kind": "base", "name": "boolean" }, "optional": true, - "documentation": "Whether code action supports the `data` property which is\npreserved between a `textDocument/publishDiagnostics` and\n`textDocument/codeAction` request.\n\n@since 3.16.0", + "documentation": "Client support insert replace edit to control different behavior if a\ncompletion item is inserted in the text or should replace text.\n\n@since 3.16.0", "since": "3.16.0" - } - ], - "documentation": "The publish diagnostic client capabilities." - }, - { - "name": "CallHierarchyClientCapabilities", - "properties": [ + }, { - "name": "dynamicRegistration", + "name": "resolveSupport", "type": { - "kind": "base", - "name": "boolean" + "kind": "reference", + "name": "ClientCompletionItemResolveOptions" }, "optional": true, - "documentation": "Whether implementation supports dynamic registration. If this is set to `true`\nthe client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`\nreturn value for the corresponding server capability as well." - } - ], - "documentation": "@since 3.16.0", - "since": "3.16.0" - }, - { - "name": "SemanticTokensClientCapabilities", - "properties": [ + "documentation": "Indicates which properties a client can resolve lazily on a completion\nitem. Before version 3.16.0 only the predefined properties `documentation`\nand `details` could be resolved lazily.\n\n@since 3.16.0", + "since": "3.16.0" + }, { - "name": "dynamicRegistration", + "name": "insertTextModeSupport", "type": { - "kind": "base", - "name": "boolean" + "kind": "reference", + "name": "ClientCompletionItemInsertTextModeOptions" }, "optional": true, - "documentation": "Whether implementation supports dynamic registration. If this is set to `true`\nthe client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`\nreturn value for the corresponding server capability as well." + "documentation": "The client supports the `insertTextMode` property on\na completion item to override the whitespace handling mode\nas defined by the client (see `insertTextMode`).\n\n@since 3.16.0", + "since": "3.16.0" }, { - "name": "requests", + "name": "labelDetailsSupport", "type": { - "kind": "literal", - "value": { - "properties": [ - { - "name": "range", - "type": { - "kind": "or", - "items": [ - { - "kind": "base", - "name": "boolean" - }, - { - "kind": "literal", - "value": { - "properties": [] - } - } - ] - }, - "optional": true, - "documentation": "The client will send the `textDocument/semanticTokens/range` request if\nthe server provides a corresponding handler." - }, - { - "name": "full", - "type": { - "kind": "or", - "items": [ - { - "kind": "base", - "name": "boolean" - }, - { - "kind": "literal", - "value": { - "properties": [ - { - "name": "delta", - "type": { - "kind": "base", - "name": "boolean" - }, - "optional": true, - "documentation": "The client will send the `textDocument/semanticTokens/full/delta` request if\nthe server provides a corresponding handler." - } - ] - } - } - ] - }, - "optional": true, - "documentation": "The client will send the `textDocument/semanticTokens/full` request if\nthe server provides a corresponding handler." - } - ] - } + "kind": "base", + "name": "boolean" }, - "documentation": "Which requests the client supports and might send to the server\ndepending on the server's capability. Please note that clients might not\nshow semantic tokens or degrade some of the user experience if a range\nor full request is advertised by the client but not provided by the\nserver. If for example the client capability `requests.full` and\n`request.range` are both set to true but the server only provides a\nrange provider the client might not render a minimap correctly or might\neven decide to not show any semantic tokens at all." - }, + "optional": true, + "documentation": "The client has support for completion item label\ndetails (see also `CompletionItemLabelDetails`).\n\n@since 3.17.0", + "since": "3.17.0" + } + ], + "documentation": "@since 3.18.0\n@proposed", + "since": "3.18.0", + "proposed": true + }, + { + "name": "ClientCompletionItemOptionsKind", + "properties": [ { - "name": "tokenTypes", + "name": "valueSet", "type": { "kind": "array", "element": { - "kind": "base", - "name": "string" + "kind": "reference", + "name": "CompletionItemKind" } }, - "documentation": "The token types that the client supports." - }, + "optional": true, + "documentation": "The completion item kind values the client supports. When this\nproperty exists the client also guarantees that it will\nhandle values outside its set gracefully and falls back\nto a default value when unknown.\n\nIf this property is not present the client only supports\nthe completion items kinds from `Text` to `Reference` as defined in\nthe initial version of the protocol." + } + ], + "documentation": "@since 3.18.0\n@proposed", + "since": "3.18.0", + "proposed": true + }, + { + "name": "CompletionListCapabilities", + "properties": [ { - "name": "tokenModifiers", + "name": "itemDefaults", "type": { "kind": "array", "element": { @@ -12664,333 +13124,336 @@ "name": "string" } }, - "documentation": "The token modifiers that the client supports." - }, + "optional": true, + "documentation": "The client supports the following itemDefaults on\na completion list.\n\nThe value lists the supported property names of the\n`CompletionList.itemDefaults` object. If omitted\nno properties are supported.\n\n@since 3.17.0", + "since": "3.17.0" + } + ], + "documentation": "The client supports the following `CompletionList` specific\ncapabilities.\n\n@since 3.17.0", + "since": "3.17.0" + }, + { + "name": "ClientSignatureInformationOptions", + "properties": [ { - "name": "formats", + "name": "documentationFormat", "type": { "kind": "array", "element": { "kind": "reference", - "name": "TokenFormat" + "name": "MarkupKind" } }, - "documentation": "The token formats the clients supports." - }, - { - "name": "overlappingTokenSupport", - "type": { - "kind": "base", - "name": "boolean" - }, "optional": true, - "documentation": "Whether the client supports tokens that can overlap each other." + "documentation": "Client supports the following content formats for the documentation\nproperty. The order describes the preferred format of the client." }, { - "name": "multilineTokenSupport", + "name": "parameterInformation", "type": { - "kind": "base", - "name": "boolean" + "kind": "reference", + "name": "ClientSignatureParameterInformationOptions" }, "optional": true, - "documentation": "Whether the client supports tokens that can span multiple lines." + "documentation": "Client capabilities specific to parameter information." }, { - "name": "serverCancelSupport", + "name": "activeParameterSupport", "type": { "kind": "base", "name": "boolean" }, "optional": true, - "documentation": "Whether the client allows the server to actively cancel a\nsemantic token request, e.g. supports returning\nLSPErrorCodes.ServerCancelled. If a server does the client\nneeds to retrigger the request.\n\n@since 3.17.0", - "since": "3.17.0" - }, + "documentation": "The client supports the `activeParameter` property on `SignatureInformation`\nliteral.\n\n@since 3.16.0", + "since": "3.16.0" + } + ], + "documentation": "@since 3.18.0\n@proposed", + "since": "3.18.0", + "proposed": true + }, + { + "name": "ClientCodeActionLiteralOptions", + "properties": [ { - "name": "augmentsSyntaxTokens", + "name": "codeActionKind", "type": { - "kind": "base", - "name": "boolean" + "kind": "reference", + "name": "ClientCodeActionKindOptions" }, - "optional": true, - "documentation": "Whether the client uses semantic tokens to augment existing\nsyntax tokens. If set to `true` client side created syntax\ntokens and semantic tokens are both used for colorization. If\nset to `false` the client only uses the returned semantic tokens\nfor colorization.\n\nIf the value is `undefined` then the client behavior is not\nspecified.\n\n@since 3.17.0", - "since": "3.17.0" + "documentation": "The code action kind is support with the following value\nset." } ], - "documentation": "@since 3.16.0", - "since": "3.16.0" + "documentation": "@since 3.18.0\n@proposed", + "since": "3.18.0", + "proposed": true }, { - "name": "LinkedEditingRangeClientCapabilities", + "name": "ClientCodeActionResolveOptions", "properties": [ { - "name": "dynamicRegistration", + "name": "properties", "type": { - "kind": "base", - "name": "boolean" + "kind": "array", + "element": { + "kind": "base", + "name": "string" + } }, - "optional": true, - "documentation": "Whether implementation supports dynamic registration. If this is set to `true`\nthe client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`\nreturn value for the corresponding server capability as well." + "documentation": "The properties that a client can resolve lazily." } ], - "documentation": "Client capabilities for the linked editing range request.\n\n@since 3.16.0", - "since": "3.16.0" + "documentation": "@since 3.18.0\n@proposed", + "since": "3.18.0", + "proposed": true }, { - "name": "MonikerClientCapabilities", + "name": "ClientFoldingRangeKindOptions", "properties": [ { - "name": "dynamicRegistration", + "name": "valueSet", "type": { - "kind": "base", - "name": "boolean" + "kind": "array", + "element": { + "kind": "reference", + "name": "FoldingRangeKind" + } }, "optional": true, - "documentation": "Whether moniker supports dynamic registration. If this is set to `true`\nthe client supports the new `MonikerRegistrationOptions` return value\nfor the corresponding server capability as well." + "documentation": "The folding range kind values the client supports. When this\nproperty exists the client also guarantees that it will\nhandle values outside its set gracefully and falls back\nto a default value when unknown." } ], - "documentation": "Client capabilities specific to the moniker request.\n\n@since 3.16.0", - "since": "3.16.0" + "documentation": "@since 3.18.0\n@proposed", + "since": "3.18.0", + "proposed": true }, { - "name": "TypeHierarchyClientCapabilities", + "name": "ClientFoldingRangeOptions", "properties": [ { - "name": "dynamicRegistration", + "name": "collapsedText", "type": { "kind": "base", "name": "boolean" }, "optional": true, - "documentation": "Whether implementation supports dynamic registration. If this is set to `true`\nthe client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`\nreturn value for the corresponding server capability as well." + "documentation": "If set, the client signals that it supports setting collapsedText on\nfolding ranges to display custom labels instead of the default text.\n\n@since 3.17.0", + "since": "3.17.0" } ], - "documentation": "@since 3.17.0", - "since": "3.17.0" + "documentation": "@since 3.18.0\n@proposed", + "since": "3.18.0", + "proposed": true }, { - "name": "InlineValueClientCapabilities", + "name": "ClientDiagnosticsTagOptions", "properties": [ { - "name": "dynamicRegistration", + "name": "valueSet", "type": { - "kind": "base", - "name": "boolean" + "kind": "array", + "element": { + "kind": "reference", + "name": "DiagnosticTag" + } }, - "optional": true, - "documentation": "Whether implementation supports dynamic registration for inline value providers." + "documentation": "The tags supported by the client." } ], - "documentation": "Client capabilities specific to inline values.\n\n@since 3.17.0", - "since": "3.17.0" + "documentation": "@since 3.18.0\n@proposed", + "since": "3.18.0", + "proposed": true }, { - "name": "InlayHintClientCapabilities", + "name": "ClientSemanticTokensRequestOptions", "properties": [ { - "name": "dynamicRegistration", + "name": "range", "type": { - "kind": "base", - "name": "boolean" + "kind": "or", + "items": [ + { + "kind": "base", + "name": "boolean" + }, + { + "kind": "literal", + "value": { + "properties": [] + } + } + ] }, "optional": true, - "documentation": "Whether inlay hints support dynamic registration." + "documentation": "The client will send the `textDocument/semanticTokens/range` request if\nthe server provides a corresponding handler." }, { - "name": "resolveSupport", + "name": "full", "type": { - "kind": "literal", - "value": { - "properties": [ - { - "name": "properties", - "type": { - "kind": "array", - "element": { - "kind": "base", - "name": "string" - } - }, - "documentation": "The properties that a client can resolve lazily." - } - ] - } + "kind": "or", + "items": [ + { + "kind": "base", + "name": "boolean" + }, + { + "kind": "reference", + "name": "ClientSemanticTokensRequestFullDelta" + } + ] }, "optional": true, - "documentation": "Indicates which properties a client can resolve lazily on an inlay\nhint." + "documentation": "The client will send the `textDocument/semanticTokens/full` request if\nthe server provides a corresponding handler." } ], - "documentation": "Inlay hint client capabilities.\n\n@since 3.17.0", - "since": "3.17.0" + "documentation": "@since 3.18.0\n@proposed", + "since": "3.18.0", + "proposed": true }, { - "name": "DiagnosticClientCapabilities", + "name": "ClientInlayHintResolveOptions", "properties": [ { - "name": "dynamicRegistration", - "type": { - "kind": "base", - "name": "boolean" - }, - "optional": true, - "documentation": "Whether implementation supports dynamic registration. If this is set to `true`\nthe client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`\nreturn value for the corresponding server capability as well." - }, - { - "name": "relatedDocumentSupport", + "name": "properties", "type": { - "kind": "base", - "name": "boolean" + "kind": "array", + "element": { + "kind": "base", + "name": "string" + } }, - "optional": true, - "documentation": "Whether the clients supports related documents for document diagnostic pulls." + "documentation": "The properties that a client can resolve lazily." } ], - "documentation": "Client capabilities specific to diagnostic pull requests.\n\n@since 3.17.0", - "since": "3.17.0" + "documentation": "@since 3.18.0\n@proposed", + "since": "3.18.0", + "proposed": true }, { - "name": "InlineCompletionClientCapabilities", + "name": "ClientShowMessageActionItemOptions", "properties": [ { - "name": "dynamicRegistration", + "name": "additionalPropertiesSupport", "type": { "kind": "base", "name": "boolean" }, "optional": true, - "documentation": "Whether implementation supports dynamic registration for inline completion providers." + "documentation": "Whether the client supports additional attributes which\nare preserved and send back to the server in the\nrequest's response." } ], - "documentation": "Client capabilities specific to inline completions.\n\n@since 3.18.0\n@proposed", + "documentation": "@since 3.18.0\n@proposed", "since": "3.18.0", "proposed": true }, { - "name": "NotebookDocumentSyncClientCapabilities", + "name": "CompletionItemTagOptions", "properties": [ { - "name": "dynamicRegistration", + "name": "valueSet", "type": { - "kind": "base", - "name": "boolean" + "kind": "array", + "element": { + "kind": "reference", + "name": "CompletionItemTag" + } }, - "optional": true, - "documentation": "Whether implementation supports dynamic registration. If this is\nset to `true` the client supports the new\n`(TextDocumentRegistrationOptions & StaticRegistrationOptions)`\nreturn value for the corresponding server capability as well." - }, + "documentation": "The tags supported by the client." + } + ], + "documentation": "@since 3.18.0\n@proposed", + "since": "3.18.0", + "proposed": true + }, + { + "name": "ClientCompletionItemResolveOptions", + "properties": [ { - "name": "executionSummarySupport", + "name": "properties", "type": { - "kind": "base", - "name": "boolean" + "kind": "array", + "element": { + "kind": "base", + "name": "string" + } }, - "optional": true, - "documentation": "The client supports sending execution summary data per cell." + "documentation": "The properties that a client can resolve lazily." } ], - "documentation": "Notebook specific client capabilities.\n\n@since 3.17.0", - "since": "3.17.0" + "documentation": "@since 3.18.0\n@proposed", + "since": "3.18.0", + "proposed": true }, { - "name": "ShowMessageRequestClientCapabilities", + "name": "ClientCompletionItemInsertTextModeOptions", "properties": [ { - "name": "messageActionItem", + "name": "valueSet", "type": { - "kind": "literal", - "value": { - "properties": [ - { - "name": "additionalPropertiesSupport", - "type": { - "kind": "base", - "name": "boolean" - }, - "optional": true, - "documentation": "Whether the client supports additional attributes which\nare preserved and send back to the server in the\nrequest's response." - } - ] + "kind": "array", + "element": { + "kind": "reference", + "name": "InsertTextMode" } - }, - "optional": true, - "documentation": "Capabilities specific to the `MessageActionItem` type." + } } ], - "documentation": "Show message request client capabilities" + "documentation": "@since 3.18.0\n@proposed", + "since": "3.18.0", + "proposed": true }, { - "name": "ShowDocumentClientCapabilities", + "name": "ClientSignatureParameterInformationOptions", "properties": [ { - "name": "support", + "name": "labelOffsetSupport", "type": { "kind": "base", "name": "boolean" }, - "documentation": "The client has support for the showDocument\nrequest." + "optional": true, + "documentation": "The client supports processing label offsets instead of a\nsimple label string.\n\n@since 3.14.0", + "since": "3.14.0" } ], - "documentation": "Client capabilities for the showDocument request.\n\n@since 3.16.0", - "since": "3.16.0" + "documentation": "@since 3.18.0\n@proposed", + "since": "3.18.0", + "proposed": true }, { - "name": "RegularExpressionsClientCapabilities", + "name": "ClientCodeActionKindOptions", "properties": [ { - "name": "engine", - "type": { - "kind": "base", - "name": "string" - }, - "documentation": "The engine's name." - }, - { - "name": "version", + "name": "valueSet", "type": { - "kind": "base", - "name": "string" + "kind": "array", + "element": { + "kind": "reference", + "name": "CodeActionKind" + } }, - "optional": true, - "documentation": "The engine's version." + "documentation": "The code action kind values the client supports. When this\nproperty exists the client also guarantees that it will\nhandle values outside its set gracefully and falls back\nto a default value when unknown." } ], - "documentation": "Client capabilities specific to regular expressions.\n\n@since 3.16.0", - "since": "3.16.0" + "documentation": "@since 3.18.0\n@proposed", + "since": "3.18.0", + "proposed": true }, { - "name": "MarkdownClientCapabilities", + "name": "ClientSemanticTokensRequestFullDelta", "properties": [ { - "name": "parser", - "type": { - "kind": "base", - "name": "string" - }, - "documentation": "The name of the parser." - }, - { - "name": "version", + "name": "delta", "type": { "kind": "base", - "name": "string" - }, - "optional": true, - "documentation": "The version of the parser." - }, - { - "name": "allowedTags", - "type": { - "kind": "array", - "element": { - "kind": "base", - "name": "string" - } + "name": "boolean" }, "optional": true, - "documentation": "A list of HTML tags that the client allows / supports in\nMarkdown.\n\n@since 3.17.0", - "since": "3.17.0" + "documentation": "The client will send the `textDocument/semanticTokens/full/delta` request if\nthe server provides a corresponding handler." } ], - "documentation": "Client capabilities specific to the used markdown parser.\n\n@since 3.16.0", - "since": "3.16.0" + "documentation": "@since 3.18.0\n@proposed", + "since": "3.18.0", + "proposed": true } ], "enumerations": [ @@ -14370,39 +14833,12 @@ "name": "Range" }, { - "kind": "literal", - "value": { - "properties": [ - { - "name": "range", - "type": { - "kind": "reference", - "name": "Range" - } - }, - { - "name": "placeholder", - "type": { - "kind": "base", - "name": "string" - } - } - ] - } + "kind": "reference", + "name": "PrepareRenamePlaceholder" }, { - "kind": "literal", - "value": { - "properties": [ - { - "name": "defaultBehavior", - "type": { - "kind": "base", - "name": "boolean" - } - } - ] - } + "kind": "reference", + "name": "PrepareRenameDefaultBehavior" } ] } @@ -14467,51 +14903,12 @@ "kind": "or", "items": [ { - "kind": "literal", - "value": { - "properties": [ - { - "name": "range", - "type": { - "kind": "reference", - "name": "Range" - }, - "documentation": "The range of the document that changed." - }, - { - "name": "rangeLength", - "type": { - "kind": "base", - "name": "uinteger" - }, - "optional": true, - "documentation": "The optional length of the range that got replaced.\n\n@deprecated use range instead." - }, - { - "name": "text", - "type": { - "kind": "base", - "name": "string" - }, - "documentation": "The new text for the provided range." - } - ] - } + "kind": "reference", + "name": "TextDocumentContentChangePartial" }, { - "kind": "literal", - "value": { - "properties": [ - { - "name": "text", - "type": { - "kind": "base", - "name": "string" - }, - "documentation": "The new text of the whole document." - } - ] - } + "kind": "reference", + "name": "TextDocumentContentChangeWholeDocument" } ] }, @@ -14527,25 +14924,8 @@ "name": "string" }, { - "kind": "literal", - "value": { - "properties": [ - { - "name": "language", - "type": { - "kind": "base", - "name": "string" - } - }, - { - "name": "value", - "type": { - "kind": "base", - "name": "string" - } - } - ] - } + "kind": "reference", + "name": "MarkedStringWithLanguage" } ] }, @@ -14610,226 +14990,52 @@ "kind": "or", "items": [ { - "kind": "literal", - "value": { - "properties": [ - { - "name": "language", - "type": { - "kind": "base", - "name": "string" - }, - "documentation": "A language id, like `typescript`." - }, - { - "name": "scheme", - "type": { - "kind": "base", - "name": "string" - }, - "optional": true, - "documentation": "A Uri {@link Uri.scheme scheme}, like `file` or `untitled`." - }, - { - "name": "pattern", - "type": { - "kind": "base", - "name": "string" - }, - "optional": true, - "documentation": "A glob pattern, like **​/*.{ts,js}. See TextDocumentFilter for examples." - } - ] - } + "kind": "reference", + "name": "TextDocumentFilterLanguage" }, { - "kind": "literal", - "value": { - "properties": [ - { - "name": "language", - "type": { - "kind": "base", - "name": "string" - }, - "optional": true, - "documentation": "A language id, like `typescript`." - }, - { - "name": "scheme", - "type": { - "kind": "base", - "name": "string" - }, - "documentation": "A Uri {@link Uri.scheme scheme}, like `file` or `untitled`." - }, - { - "name": "pattern", - "type": { - "kind": "base", - "name": "string" - }, - "optional": true, - "documentation": "A glob pattern, like **​/*.{ts,js}. See TextDocumentFilter for examples." - } - ] - } + "kind": "reference", + "name": "TextDocumentFilterScheme" }, { - "kind": "literal", - "value": { - "properties": [ - { - "name": "language", - "type": { - "kind": "base", - "name": "string" - }, - "optional": true, - "documentation": "A language id, like `typescript`." - }, - { - "name": "scheme", - "type": { - "kind": "base", - "name": "string" - }, - "optional": true, - "documentation": "A Uri {@link Uri.scheme scheme}, like `file` or `untitled`." - }, - { - "name": "pattern", - "type": { - "kind": "base", - "name": "string" - }, - "documentation": "A glob pattern, like **​/*.{ts,js}. See TextDocumentFilter for examples." - } - ] - } + "kind": "reference", + "name": "TextDocumentFilterPattern" } ] }, "documentation": "A document filter denotes a document by different properties like\nthe {@link TextDocument.languageId language}, the {@link Uri.scheme scheme} of\nits resource, or a glob-pattern that is applied to the {@link TextDocument.fileName path}.\n\nGlob patterns can have the following syntax:\n- `*` to match one or more characters in a path segment\n- `?` to match on one character in a path segment\n- `**` to match any number of path segments, including none\n- `{}` to group sub patterns into an OR expression. (e.g. `**​/*.{ts,js}` matches all TypeScript and JavaScript files)\n- `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …)\n- `[!...]` 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`)\n\n@sample A language filter that applies to typescript files on disk: `{ language: 'typescript', scheme: 'file' }`\n@sample A language filter that applies to all package.json paths: `{ language: 'json', pattern: '**package.json' }`\n\n@since 3.17.0", "since": "3.17.0" }, + { + "name": "Pattern", + "type": { + "kind": "base", + "name": "string" + }, + "documentation": "The glob pattern to watch relative to the base path. Glob patterns can have the following syntax:\n- `*` to match one or more characters in a path segment\n- `?` to match on one character in a path segment\n- `**` to match any number of path segments, including none\n- `{}` to group conditions (e.g. `**​/*.{ts,js}` matches all TypeScript and JavaScript files)\n- `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …)\n- `[!...]` 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`)\n\n@since 3.17.0", + "since": "3.17.0" + }, { "name": "NotebookDocumentFilter", "type": { "kind": "or", "items": [ { - "kind": "literal", - "value": { - "properties": [ - { - "name": "notebookType", - "type": { - "kind": "base", - "name": "string" - }, - "documentation": "The type of the enclosing notebook." - }, - { - "name": "scheme", - "type": { - "kind": "base", - "name": "string" - }, - "optional": true, - "documentation": "A Uri {@link Uri.scheme scheme}, like `file` or `untitled`." - }, - { - "name": "pattern", - "type": { - "kind": "base", - "name": "string" - }, - "optional": true, - "documentation": "A glob pattern." - } - ] - } + "kind": "reference", + "name": "NotebookDocumentFilterNotebookType" }, { - "kind": "literal", - "value": { - "properties": [ - { - "name": "notebookType", - "type": { - "kind": "base", - "name": "string" - }, - "optional": true, - "documentation": "The type of the enclosing notebook." - }, - { - "name": "scheme", - "type": { - "kind": "base", - "name": "string" - }, - "documentation": "A Uri {@link Uri.scheme scheme}, like `file` or `untitled`." - }, - { - "name": "pattern", - "type": { - "kind": "base", - "name": "string" - }, - "optional": true, - "documentation": "A glob pattern." - } - ] - } + "kind": "reference", + "name": "NotebookDocumentFilterScheme" }, { - "kind": "literal", - "value": { - "properties": [ - { - "name": "notebookType", - "type": { - "kind": "base", - "name": "string" - }, - "optional": true, - "documentation": "The type of the enclosing notebook." - }, - { - "name": "scheme", - "type": { - "kind": "base", - "name": "string" - }, - "optional": true, - "documentation": "A Uri {@link Uri.scheme scheme}, like `file` or `untitled`." - }, - { - "name": "pattern", - "type": { - "kind": "base", - "name": "string" - }, - "documentation": "A glob pattern." - } - ] - } + "kind": "reference", + "name": "NotebookDocumentFilterPattern" } ] }, "documentation": "A notebook document filter denotes a notebook document by\ndifferent properties. The properties will be match\nagainst the notebook's URI (same as with documents)\n\n@since 3.17.0", "since": "3.17.0" - }, - { - "name": "Pattern", - "type": { - "kind": "base", - "name": "string" - }, - "documentation": "The glob pattern to watch relative to the base path. Glob patterns can have the following syntax:\n- `*` to match one or more characters in a path segment\n- `?` to match on one character in a path segment\n- `**` to match any number of path segments, including none\n- `{}` to group conditions (e.g. `**​/*.{ts,js}` matches all TypeScript and JavaScript files)\n- `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …)\n- `[!...]` 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`)\n\n@since 3.17.0", - "since": "3.17.0" } ] } diff --git a/generator/model.py b/generator/model.py index abac69d..6bc8a0b 100644 --- a/generator/model.py +++ b/generator/model.py @@ -4,7 +4,7 @@ from __future__ import annotations import uuid -from typing import Any, Dict, Iterable, List, Optional, Type, TypeVar, Union +from typing import Any, Dict, Iterable, List, Optional, Type, Union import attrs diff --git a/generator/plugins/dotnet/__init__.py b/generator/plugins/dotnet/__init__.py index 8c6065b..acf67ec 100644 --- a/generator/plugins/dotnet/__init__.py +++ b/generator/plugins/dotnet/__init__.py @@ -1,4 +1,4 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. -from .dotnet_utils import generate_from_spec as generate +from .dotnet_utils import generate_from_spec as generate # noqa: F401 diff --git a/generator/plugins/dotnet/dotnet_classes.py b/generator/plugins/dotnet/dotnet_classes.py index 0a705cd..7a2abac 100644 --- a/generator/plugins/dotnet/dotnet_classes.py +++ b/generator/plugins/dotnet/dotnet_classes.py @@ -101,9 +101,9 @@ def get_type_name( enum_def = _get_enum(type_def.name, spec) if enum_def and enum_def.supportsCustomValues: if _is_str_enum(enum_def): - name = f"string" + name = "string" elif _is_int_enum(enum_def): - name = f"int" + name = "int" else: name = get_special_case_class_name(type_def.name) elif type_def.kind == "array": @@ -506,7 +506,7 @@ def generate_type_alias_converter( "{", "reader = reader ?? throw new ArgumentNullException(nameof(reader));", "if (reader.TokenType == JsonToken.Null) { return null; }", - f"var o = _orType.ReadJson(reader, objectType, existingValue, serializer);", + "var o = _orType.ReadJson(reader, objectType, existingValue, serializer);", f"if (o is {or_type} orType)", "{", ] @@ -631,7 +631,7 @@ def generate_code_for_variant_struct( sig = ", ".join(constructor_args) types.add_ctor(struct.name, ctor_data) ctor = [ - f"[JsonConstructor]", + "[JsonConstructor]", f"public {struct.name}({sig})", "{", *indent_lines( @@ -640,7 +640,7 @@ def generate_code_for_variant_struct( "{", *indent_lines( [ - f'throw new ArgumentException("At least one of the arguments must be non-null");' + 'throw new ArgumentException("At least one of the arguments must be non-null");' ] ), "}", @@ -880,7 +880,7 @@ def get_response_template( {"kind": "base", "name": "integer"}, ], }, - "documentation": f"The Request id.", + "documentation": "The Request id.", }, ] if obj.result: @@ -888,7 +888,7 @@ def get_response_template( { "name": "result", "type": cattrs.unstructure(obj.result), - "documentation": f"Results for the request.", + "documentation": "Results for the request.", "optional": True, } ) @@ -897,7 +897,7 @@ def get_response_template( { "name": "result", "type": {"kind": "base", "name": "null"}, - "documentation": f"Results for the request.", + "documentation": "Results for the request.", "optional": True, } ) @@ -905,7 +905,7 @@ def get_response_template( { "name": "error", "type": {"kind": "reference", "name": "ResponseError"}, - "documentation": f"Error while handling the request.", + "documentation": "Error while handling the request.", "optional": True, } ) diff --git a/generator/plugins/dotnet/dotnet_enums.py b/generator/plugins/dotnet/dotnet_enums.py index c5e7a6c..82c9d4c 100644 --- a/generator/plugins/dotnet/dotnet_enums.py +++ b/generator/plugins/dotnet/dotnet_enums.py @@ -1,7 +1,7 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. -from typing import Dict, List, Union +from typing import List, Union from generator import model diff --git a/generator/plugins/dotnet/dotnet_helpers.py b/generator/plugins/dotnet/dotnet_helpers.py index 2eb357a..d6a2dbf 100644 --- a/generator/plugins/dotnet/dotnet_helpers.py +++ b/generator/plugins/dotnet/dotnet_helpers.py @@ -167,7 +167,7 @@ def generate_extras( model.Structure, model.Request, model.Notification, - ] + ], ) -> List[str]: deprecated = get_deprecated(type_def.documentation) extras = [] @@ -176,7 +176,7 @@ def generate_extras( elif deprecated: extras += [f'[Obsolete("{cleanup_str(deprecated)}")]'] if type_def.proposed: - extras += [f"[Proposed]"] + extras += ["[Proposed]"] if type_def.since: extras += [f'[Since("{cleanup_str(type_def.since)}")]'] diff --git a/generator/plugins/dotnet/dotnet_special_classes.py b/generator/plugins/dotnet/dotnet_special_classes.py index a656b6d..1b8e597 100644 --- a/generator/plugins/dotnet/dotnet_special_classes.py +++ b/generator/plugins/dotnet/dotnet_special_classes.py @@ -151,7 +151,7 @@ def generate_special_class( type_def, inner, "IEnumerable", - [f"[JsonConverter(typeof(DocumentSelectorConverter))]"], + ["[JsonConverter(typeof(DocumentSelectorConverter))]"], ), ) diff --git a/generator/plugins/dotnet/dotnet_utils.py b/generator/plugins/dotnet/dotnet_utils.py index 4510527..5353db0 100644 --- a/generator/plugins/dotnet/dotnet_utils.py +++ b/generator/plugins/dotnet/dotnet_utils.py @@ -2,10 +2,8 @@ # Licensed under the MIT License. import logging -import os import pathlib -import subprocess -from typing import Dict, List +from typing import Dict import generator.model as model @@ -19,7 +17,7 @@ LOGGER = logging.getLogger("dotnet") -def generate_from_spec(spec: model.LSPModel, output_dir: str) -> None: +def generate_from_spec(spec: model.LSPModel, output_dir: str, _test_dir: str) -> None: """Generate the code for the given spec.""" output_path = pathlib.Path(output_dir, PACKAGE_DIR_NAME) if not output_path.exists(): diff --git a/generator/plugins/python/__init__.py b/generator/plugins/python/__init__.py index c5de3ef..dde96d1 100644 --- a/generator/plugins/python/__init__.py +++ b/generator/plugins/python/__init__.py @@ -1,4 +1,4 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. -from .utils import generate_from_spec as generate +from .utils import generate_from_spec as generate # noqa: F401 diff --git a/generator/plugins/python/utils.py b/generator/plugins/python/utils.py index 525e9cb..d237039 100644 --- a/generator/plugins/python/utils.py +++ b/generator/plugins/python/utils.py @@ -19,7 +19,7 @@ custom_request_params_aliases = ["WorkspaceConfigurationParams"] -def generate_from_spec(spec: model.LSPModel, output_dir: str) -> None: +def generate_from_spec(spec: model.LSPModel, output_dir: str, test_dir: str) -> None: code = TypesCodeGenerator(spec).get_code() output_path = pathlib.Path(output_dir, PACKAGE_NAME) @@ -576,7 +576,7 @@ def _add_type_alias(self, type_alias: model.TypeAlias) -> None: if type_alias.type.kind == "reference" and not self._has_type( type_alias.type.name ): - # TODO: remove workaround for lack of TypeAlias in 3.7 + # TODO: remove workaround for lack of TypeAlias type_name = f"Union[{type_name}, {type_name}]" if type_name: @@ -588,7 +588,7 @@ def _add_type_alias(self, type_alias: model.TypeAlias) -> None: f"# Since: {_sanitize_comment(type_alias.since)}" if type_alias.since else "", - f"# Proposed" if type_alias.proposed else "", + "# Proposed" if type_alias.proposed else "", ] else: doc = _get_indented_documentation(type_alias.documentation, indent) @@ -686,7 +686,7 @@ def _add_structure( code_lines += [f"{indent}pass"] if methods: - code_lines += [f"{indent}{l}" for l in methods] + code_lines += [f"{indent}{method}" for method in methods] # Detect if the class has properties that might be keywords. self._add_type_code(class_name, code_lines) @@ -777,7 +777,7 @@ def _add_requests(self, lsp_mode: model.LSPModel) -> None: "ResponseError", [ "@attrs.define", - f"class ResponseError:", + "class ResponseError:", f"{indent}code: int = attrs.field(validator=validators.integer_validator)", f'{indent}"""A number indicating the error type that occurred."""', f"{indent}message: str = attrs.field(validator=attrs.validators.instance_of(str))", diff --git a/generator/plugins/rust/__init__.py b/generator/plugins/rust/__init__.py index cbc2c00..a07db09 100644 --- a/generator/plugins/rust/__init__.py +++ b/generator/plugins/rust/__init__.py @@ -1,4 +1,4 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. -from .rust_utils import generate_from_spec as generate +from .rust_utils import generate_from_spec as generate # noqa: F401 diff --git a/generator/plugins/rust/rust_commons.py b/generator/plugins/rust/rust_commons.py index 4022e27..d19f9cc 100644 --- a/generator/plugins/rust/rust_commons.py +++ b/generator/plugins/rust/rust_commons.py @@ -324,7 +324,9 @@ def generate_extra_types(spec: model.LSPModel, type_data: TypeData) -> None: ), ) - direction = set([m.messageDirection for m in (spec.requests + spec.notifications)]) + direction = sorted( + set([m.messageDirection for m in (spec.requests + spec.notifications)]) + ) type_data.add_type_info( model.ReferenceType(kind="reference", name="MessageDirection"), "MessageDirection", @@ -380,7 +382,8 @@ def get_extended_properties( if t.kind == "reference": s = get_from_name(t.name, spec) if s: - properties += [p for p in s.properties] + s_props = get_extended_properties(s, spec) + properties += [p for p in s_props] elif t.kind == "literal": properties += [p for p in t.value.properties] else: @@ -461,7 +464,6 @@ def get_type_name( f"OR type with more than out of range count of subtypes: {type_def}" ) optional = optional or is_special(type_def) - print(f"Option<{name}>" if optional else name) elif type_def.kind == "literal": name = generate_literal_struct_type(type_def, types, spec, name_context) elif type_def.kind == "stringLiteral": @@ -568,7 +570,7 @@ def generate_property( prop_def.type, types, spec, prop_def.optional, prop_def.name ) optional = ( - [f'#[serde(skip_serializing_if = "Option::is_none")]'] + ['#[serde(skip_serializing_if = "Option::is_none")]'] if is_special_property(prop_def) and not prop_def.optional else [] ) @@ -611,7 +613,7 @@ def struct_wrapper( + generate_extras(type_def) + [ "#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)]", - '#[serde(rename_all = "camelCase")]', + '#[serde(rename_all = "camelCase", deny_unknown_fields)]', f"pub struct {name}", "{", ] @@ -663,19 +665,11 @@ def generate_literal_struct_type( def generate_extras( type_def: Union[ model.Enum, model.EnumItem, model.Property, model.TypeAlias, model.Structure - ] + ], ) -> List[str]: extras = [] if type_def.deprecated: - extras = ["#[deprecated]"] - elif type_def.proposed: - if type_def.since: - extras = [f'#[cfg(feature = "proposed", since = "{type_def.since}")]'] - else: - extras = [f'#[cfg(feature = "proposed")]'] - # else: - # if type_def.since: - # extras = [f'#[cfg(feature = "stable", since = "{type_def.since}")]'] - # else: - # extras = [f'#[cfg(feature = "stable")]'] + extras += ["#[deprecated]"] + if type_def.proposed: + extras += ['#[cfg(feature = "proposed")]'] return extras diff --git a/generator/plugins/rust/rust_constants.py b/generator/plugins/rust/rust_constants.py deleted file mode 100644 index 5b7f7a9..0000000 --- a/generator/plugins/rust/rust_constants.py +++ /dev/null @@ -1,2 +0,0 @@ -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. diff --git a/generator/plugins/rust/rust_enum.py b/generator/plugins/rust/rust_enum.py index 5773d12..b1d60f2 100644 --- a/generator/plugins/rust/rust_enum.py +++ b/generator/plugins/rust/rust_enum.py @@ -14,17 +14,47 @@ def _get_enum_docs(enum: Union[model.Enum, model.EnumItem]) -> List[str]: return lines_to_doc_comments(doc) +def generate_serde(enum: model.Enum) -> List[str]: + ser = [ + f"impl Serialize for {enum.name} " "{", + "fn serialize(&self, serializer: S) -> Result where S: serde::Serializer,{", + "match self {", + ] + + de = [ + f"impl<'de> Deserialize<'de> for {enum.name} " "{", + f"fn deserialize(deserializer: D) -> Result<{enum.name}, D::Error> where D: serde::Deserializer<'de>," + "{", + "let value = i32::deserialize(deserializer)?;", + "match value {", + ] + for item in enum.values: + full_name = f"{enum.name}::{to_upper_camel_case(item.name)}" + ser += [f"{full_name} => serializer.serialize_i32({item.value}),"] + de += [f"{item.value} => Ok({full_name}),"] + ser += [ + "}", # match + "}", # fn + "}", # impl + ] + de += [ + '_ => Err(serde::de::Error::custom("Unexpected value"))', + "}", # match + "}", # fn + "}", # impl + ] + return ser + de + + def generate_enum(enum: model.Enum, types: TypeData) -> None: is_int = all(isinstance(item.value, int) for item in enum.values) - lines = ( - _get_enum_docs(enum) - + generate_extras(enum) - + [ - "#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)]", - f"pub enum {enum.name} " "{", - ] - ) + lines = _get_enum_docs(enum) + generate_extras(enum) + if is_int: + lines += ["#[derive(PartialEq, Debug, Eq, Clone)]"] + else: + lines += ["#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)]"] + lines += [f"pub enum {enum.name} " "{"] for item in enum.values: if is_int: @@ -43,6 +73,9 @@ def generate_enum(enum: model.Enum, types: TypeData) -> None: lines += ["}"] + if is_int: + lines += generate_serde(enum) + types.add_type_info(enum, enum.name, lines) diff --git a/generator/plugins/rust/rust_structs.py b/generator/plugins/rust/rust_structs.py index 571cd62..9a69c39 100644 --- a/generator/plugins/rust/rust_structs.py +++ b/generator/plugins/rust/rust_structs.py @@ -12,6 +12,7 @@ generate_literal_struct_name, generate_property, get_extended_properties, + get_from_name, get_message_type_name, get_type_name, struct_wrapper, @@ -213,7 +214,7 @@ def _generate_or_type_alias( for sub_type in alias_def.type.items: if sub_type.kind == "base" and sub_type.name == "null": - inner += [f"None,"] + inner += ["None,"] else: inner += [f"ValueType{index}({get_type_name(sub_type, types, spec)}),"] index += 1 @@ -308,10 +309,28 @@ def generate_notification( ) -> None: properties = required_rpc_properties("LSPNotificationMethods") if notification_def.params: + ptype = get_from_name(notification_def.params.name, spec) + if hasattr(ptype, "properties") and get_extended_properties(ptype, spec): + properties += [ + model.Property( + name="params", + type=notification_def.params, + ) + ] + else: + properties += [ + model.Property( + name="params", + type=model.ReferenceType(kind="reference", name="LSPAny"), + optional=True, + ) + ] + else: properties += [ model.Property( name="params", - type=notification_def.params, + type=model.ReferenceType(kind="reference", name="LSPNull"), + optional=True, ) ] @@ -381,10 +400,28 @@ def generate_request( ) ] if request_def.params: + ptype = get_from_name(request_def.params.name, spec) + if hasattr(ptype, "properties") and get_extended_properties(ptype, spec): + properties += [ + model.Property( + name="params", + type=request_def.params, + ) + ] + else: + properties += [ + model.Property( + name="params", + type=model.ReferenceType(kind="reference", name="LSPAny"), + optional=True, + ) + ] + else: properties += [ model.Property( name="params", - type=request_def.params, + type=model.ReferenceType(kind="reference", name="LSPNull"), + optional=True, ) ] diff --git a/generator/plugins/rust/rust_tests.py b/generator/plugins/rust/rust_tests.py new file mode 100644 index 0000000..df74e39 --- /dev/null +++ b/generator/plugins/rust/rust_tests.py @@ -0,0 +1,42 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + + +import pathlib + +import generator.model as model + +from .rust_commons import get_message_type_name + + +def generate_test_code(spec: model.LSPModel, test_path: pathlib.Path) -> str: + """Generate the code for the given spec.""" + lines = [] + for request in spec.requests: + request_name = get_message_type_name(request) + lines += [ + f'"{request_name}" =>' "{", + f"return validate_type::<{request_name}>(result_type, data)", + "}", + ] + for notification in spec.notifications: + notification_name = get_message_type_name(notification) + lines += [ + f'"{notification_name}" =>' "{", + f"return validate_type::<{notification_name}>(result_type, data)", + "}", + ] + + code = test_path.read_text(encoding="utf-8").splitlines() + start_marker = "GENERATED_TEST_CODE:start" + end_marker = "GENERATED_TEST_CODE:end" + + start_index = -1 + end_index = -1 + for i, line in enumerate(code): + if line.endswith(start_marker): + start_index = i + 1 + elif line.endswith(end_marker): + end_index = i + code[start_index:end_index] = lines + test_path.write_text("\n".join(code), encoding="utf-8") diff --git a/generator/plugins/rust/rust_utils.py b/generator/plugins/rust/rust_utils.py index d817070..b04363e 100644 --- a/generator/plugins/rust/rust_utils.py +++ b/generator/plugins/rust/rust_utils.py @@ -16,11 +16,12 @@ generate_structures, generate_type_aliases, ) +from .rust_tests import generate_test_code PACKAGE_DIR_NAME = "lsprotocol" -def generate_from_spec(spec: model.LSPModel, output_dir: str) -> None: +def generate_from_spec(spec: model.LSPModel, output_dir: str, test_dir: str) -> None: code = generate_package_code(spec) output_path = pathlib.Path(output_dir, PACKAGE_DIR_NAME) @@ -31,6 +32,11 @@ def generate_from_spec(spec: model.LSPModel, output_dir: str) -> None: for file_name in code: (output_path / file_name).write_text(code[file_name], encoding="utf-8") + # update tests if exists + test_path = pathlib.Path(test_dir) / "src" / "main.rs" + if test_path.exists(): + generate_test_code(spec, test_path) + def generate_package_code(spec: model.LSPModel) -> List[str]: return { diff --git a/generator/plugins/testdata/__init__.py b/generator/plugins/testdata/__init__.py index 35cc498..43283cc 100644 --- a/generator/plugins/testdata/__init__.py +++ b/generator/plugins/testdata/__init__.py @@ -1,4 +1,4 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. -from .testdata_utils import generate_from_spec as generate +from .testdata_utils import generate_from_spec as generate # noqa: F401 diff --git a/generator/plugins/testdata/testdata_generator.py b/generator/plugins/testdata/testdata_generator.py index 4d9b850..8eabadd 100644 --- a/generator/plugins/testdata/testdata_generator.py +++ b/generator/plugins/testdata/testdata_generator.py @@ -7,7 +7,7 @@ import logging import re from copy import deepcopy -from typing import Any, Dict, List, Optional, Tuple, Union +from typing import Any, List, Optional import generator.model as model @@ -17,11 +17,11 @@ LSP_MAX_UINT = 2**31 - 1 LSP_MIN_UINT = 0 -LSP_OVER_MAX_INT = LSP_MAX_INT + 1 -LSP_UNDER_MIN_INT = LSP_MIN_INT - 1 +LSP_OVER_MAX_INT = 2**31 +LSP_UNDER_MIN_INT = -(2**31) - 1 -LSP_OVER_MAX_UINT = LSP_MAX_UINT + 1 -LSP_UNDER_MIN_UINT = LSP_MIN_UINT - 1 +LSP_OVER_MAX_UINT = 2**32 + 1 +LSP_UNDER_MIN_UINT = -1 def get_hash_from(text: str) -> str: @@ -83,9 +83,9 @@ def extend(arr: List[Any], length: int) -> List[Any]: def extend_all(lists: List[List[Any]]) -> List[List[Any]]: - max_len = max(len(l) for l in lists) + max_len = max(len(part) for part in lists) max_len = min(1000, max_len) - return [extend(l, max_len) for l in lists] + return [extend(part, max_len) for part in lists] def has_null_base_type(items: List[model.LSP_TYPE_SPEC]) -> bool: diff --git a/generator/plugins/testdata/testdata_utils.py b/generator/plugins/testdata/testdata_utils.py index 879ce2f..7702e16 100644 --- a/generator/plugins/testdata/testdata_utils.py +++ b/generator/plugins/testdata/testdata_utils.py @@ -3,7 +3,7 @@ import logging import pathlib -from typing import Dict, List +from typing import Dict import generator.model as model @@ -12,13 +12,14 @@ logger = logging.getLogger("testdata") -def generate_from_spec(spec: model.LSPModel, output_dir: str) -> None: +def generate_from_spec(spec: model.LSPModel, output_dir: str, test_dir: str) -> None: """Generate the code for the given spec.""" output = pathlib.Path(output_dir) if not output.exists(): output.mkdir(parents=True, exist_ok=True) + logger.info("Cleaning up existing data") cleanup(output) # key is the relative path to the file, value is the content code: Dict[str, str] = generate(spec, logger) diff --git a/lsprotocol.sln b/lsprotocol.sln new file mode 100644 index 0000000..5c88de0 --- /dev/null +++ b/lsprotocol.sln @@ -0,0 +1,45 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.5.002.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "packages", "packages", "{F7A4C27E-590F-4449-8CEA-EB9B6476ADDD}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "dotnet", "dotnet", "{7713486B-C956-4D98-81E1-057F80FB323C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "lsprotocol", "packages\dotnet\lsprotocol\lsprotocol.csproj", "{E40E6342-0ABD-4E41-98B5-E34CB2DEA0C2}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{4E56DC3C-E33A-40F5-8082-778C0A1F6B2E}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "dotnet", "dotnet", "{D6F5BE34-11D4-4D75-ADCD-178D424AF26A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "lsprotocol_tests", "tests\dotnet\lsprotocol_tests\lsprotocol_tests.csproj", "{076D13A1-3EEA-4DD3-80C8-88E8D80E08C8}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E40E6342-0ABD-4E41-98B5-E34CB2DEA0C2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E40E6342-0ABD-4E41-98B5-E34CB2DEA0C2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E40E6342-0ABD-4E41-98B5-E34CB2DEA0C2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E40E6342-0ABD-4E41-98B5-E34CB2DEA0C2}.Release|Any CPU.Build.0 = Release|Any CPU + {076D13A1-3EEA-4DD3-80C8-88E8D80E08C8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {076D13A1-3EEA-4DD3-80C8-88E8D80E08C8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {076D13A1-3EEA-4DD3-80C8-88E8D80E08C8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {076D13A1-3EEA-4DD3-80C8-88E8D80E08C8}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {7713486B-C956-4D98-81E1-057F80FB323C} = {F7A4C27E-590F-4449-8CEA-EB9B6476ADDD} + {E40E6342-0ABD-4E41-98B5-E34CB2DEA0C2} = {7713486B-C956-4D98-81E1-057F80FB323C} + {D6F5BE34-11D4-4D75-ADCD-178D424AF26A} = {4E56DC3C-E33A-40F5-8082-778C0A1F6B2E} + {076D13A1-3EEA-4DD3-80C8-88E8D80E08C8} = {D6F5BE34-11D4-4D75-ADCD-178D424AF26A} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {78EC86C0-D400-4662-BE12-33A046D3F565} + EndGlobalSection +EndGlobal diff --git a/noxfile.py b/noxfile.py index 88cf122..01fbd4a 100644 --- a/noxfile.py +++ b/noxfile.py @@ -1,7 +1,6 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. import json -import os import pathlib import urllib.request as url_lib @@ -20,7 +19,7 @@ def _install_requirements(session: nox.Session): @nox.session() def tests(session: nox.Session): - """Run tests for generator and generated code in all languages.""" + """Run tests for generator and generated code in python.""" _install_requirements(session) session.log("Running test data generator.") @@ -36,9 +35,10 @@ def lint(session: nox.Session): _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.install("mypy", "ruff") + session.run("ruff", "check", ".") + session.run("ruff", "check", "--select=I001", ".") + session.run("ruff", "format", "--check", ".") session.run("mypy", "--strict", "--no-incremental", "./packages/python/lsprotocol") session.log("Linting: generated Rust code.") @@ -49,32 +49,20 @@ def lint(session: nox.Session): @nox.session() def format(session: nox.Session): """Format generator and lsprotocol package for PyPI.""" + _install_requirements(session) _format_code(session) def _format_code(session: nox.Session): - session.install("isort", "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.install("ruff") - session.run("isort", "--profile", "black", "tests/python") - session.run("black", "tests/python") - - # this is for the lsprotocol package only - python_package_path = os.fspath(pathlib.Path("./packages/python/lsprotocol")) - session.run("isort", "--profile", "black", python_package_path) - session.run("black", python_package_path) + session.run("ruff", "check", "--fix", "--select=I001", ".") + session.run("ruff", "format", ".") + session.run("ruff", "check", "--fix", ".") @nox.session() -def build(session: nox.Session): +def build_python_package(session: nox.Session): """Build lsprotocol (python) package for PyPI.""" session.install("flit") with session.chdir("./packages/python"): @@ -205,14 +193,14 @@ def create_plugin(session: nox.Session): package_root = pathlib.Path(__file__).parent / "packages" / name / "lsprotocol" package_root.mkdir(parents=True, exist_ok=True) package_root.joinpath("README.md").write_text( - f"# your generated code and other package files go under this directory.", + "# your generated code and other package files go under this directory.", encoding="utf-8", ) tests_root = pathlib.Path(__file__).parent / "tests" / name tests_root.mkdir(parents=True, exist_ok=True) tests_root.joinpath("README.md").write_text( - f"# your tests go under this directory.", encoding="utf-8" + "# your tests go under this directory.", encoding="utf-8" ) launch_json_path = pathlib.Path(__file__).parent / ".vscode" / "launch.json" @@ -253,5 +241,9 @@ def generate_rust(session: nox.Session): _install_requirements(session) session.run("python", "-m", "generator", "--plugin", "rust") + with session.chdir("./packages/rust/lsprotocol"): session.run("cargo", "fmt", external=True) + with session.chdir("./tests/rust"): + session.run("cargo", "fmt", external=True) + session.run("cargo", "build", external=True) diff --git a/packages/python/lsprotocol/_hooks.py b/packages/python/lsprotocol/_hooks.py index c90719f..a421439 100644 --- a/packages/python/lsprotocol/_hooks.py +++ b/packages/python/lsprotocol/_hooks.py @@ -1,7 +1,7 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. import sys -from typing import Any, List, Optional, Sequence, Tuple, Union +from typing import Any, Optional, Sequence, Tuple, Union import attrs import cattrs @@ -390,7 +390,7 @@ def _inlay_hint_provider_hook( def _inlay_hint_label_part_hook( object_: Any, _: type - ) -> Union[str, List[lsp_types.InlayHintLabelPart]]: + ) -> Union[str, Sequence[lsp_types.InlayHintLabelPart]]: if isinstance(object_, str): return object_ @@ -431,7 +431,7 @@ def _code_action_hook( def _completion_list_hook( object_: Any, _: type - ) -> Optional[Union[lsp_types.CompletionList, List[lsp_types.CompletionItem]]]: + ) -> Optional[Union[lsp_types.CompletionList, Sequence[lsp_types.CompletionItem]]]: if object_ is None: return None if isinstance(object_, list): @@ -446,15 +446,15 @@ def _location_hook( ) -> Optional[ Union[ lsp_types.Location, - List[lsp_types.Location], - List[lsp_types.LocationLink], + Sequence[lsp_types.Location], + Sequence[lsp_types.LocationLink], ] ]: if object_ is None: return None if isinstance(object_, list): if len(object_) == 0: - return [] # type: ignore[return-value] + return [] if "targetUri" in object_[0]: return [ converter.structure(item, lsp_types.LocationLink) @@ -470,13 +470,13 @@ def _location_hook( def _symbol_hook( object_: Any, _: type ) -> Optional[ - Union[List[lsp_types.DocumentSymbol], List[lsp_types.SymbolInformation]] + Union[Sequence[lsp_types.DocumentSymbol], Sequence[lsp_types.SymbolInformation]] ]: if object_ is None: return None if isinstance(object_, list): if len(object_) == 0: - return [] # type: ignore[return-value] + return [] if "location" in object_[0]: return [ converter.structure(item, lsp_types.SymbolInformation) @@ -496,8 +496,8 @@ def _markup_content_hook( Union[ OptionalPrimitive, lsp_types.MarkupContent, - lsp_types.MarkedString_Type1, - List[Union[OptionalPrimitive, lsp_types.MarkedString_Type1]], + lsp_types.MarkedStringWithLanguage, + Sequence[Union[OptionalPrimitive, lsp_types.MarkedStringWithLanguage]], ] ]: if object_ is None: @@ -509,14 +509,14 @@ def _markup_content_hook( ( item if isinstance(item, (bool, int, str, float)) - else converter.structure(item, lsp_types.MarkedString_Type1) + else converter.structure(item, lsp_types.MarkedStringWithLanguage) ) for item in object_ ] if "kind" in object_: return converter.structure(object_, lsp_types.MarkupContent) else: - return converter.structure(object_, lsp_types.MarkedString_Type1) + return converter.structure(object_, lsp_types.MarkedStringWithLanguage) def _document_edit_hook( object_: Any, _: type @@ -544,25 +544,25 @@ def _document_edit_hook( def _semantic_tokens_hook( object_: Any, _: type - ) -> Union[OptionalPrimitive, lsp_types.SemanticTokensOptionsFullType1]: + ) -> Union[OptionalPrimitive, lsp_types.SemanticTokensFullDelta]: if object_ is None: return None if isinstance(object_, (bool, int, str, float)): return object_ - return converter.structure(object_, lsp_types.SemanticTokensOptionsFullType1) + return converter.structure(object_, lsp_types.SemanticTokensFullDelta) def _semantic_tokens_capabilities_hook( object_: Any, _: type ) -> Union[ OptionalPrimitive, - lsp_types.SemanticTokensClientCapabilitiesRequestsTypeFullType1, + lsp_types.ClientSemanticTokensRequestFullDelta, ]: if object_ is None: return None if isinstance(object_, (bool, int, str, float)): return object_ return converter.structure( - object_, lsp_types.SemanticTokensClientCapabilitiesRequestsTypeFullType1 + object_, lsp_types.ClientSemanticTokensRequestFullDelta ) def _code_action_kind_hook( @@ -622,29 +622,29 @@ def _watch_kind_hook( def _notebook_sync_option_selector_hook( object_: Any, _: type ) -> Union[ - lsp_types.NotebookDocumentSyncOptionsNotebookSelectorType1, - lsp_types.NotebookDocumentSyncOptionsNotebookSelectorType2, + lsp_types.NotebookDocumentFilterWithNotebook, + lsp_types.NotebookDocumentFilterWithCells, ]: if "notebook" in object_: return converter.structure( - object_, lsp_types.NotebookDocumentSyncOptionsNotebookSelectorType1 + object_, lsp_types.NotebookDocumentFilterWithNotebook ) else: return converter.structure( - object_, lsp_types.NotebookDocumentSyncOptionsNotebookSelectorType2 + object_, lsp_types.NotebookDocumentFilterWithCells ) def _semantic_token_registration_options_hook( object_: Any, _: type ) -> Optional[ - Union[OptionalPrimitive, lsp_types.SemanticTokensRegistrationOptionsFullType1] + Union[OptionalPrimitive, lsp_types.ClientSemanticTokensRequestFullDelta] ]: if object_ is None: return None if isinstance(object_, (bool, int, str, float)): return object_ return converter.structure( - object_, lsp_types.SemanticTokensRegistrationOptionsFullType1 + object_, lsp_types.ClientSemanticTokensRequestFullDelta ) def _inline_completion_provider_hook( @@ -659,7 +659,7 @@ def _inline_completion_provider_hook( def _inline_completion_list_hook( object_: Any, _: type ) -> Optional[ - Union[lsp_types.InlineCompletionList, List[lsp_types.InlineCompletionItem]] + Union[lsp_types.InlineCompletionList, Sequence[lsp_types.InlineCompletionItem]] ]: if object_ is None: return None @@ -682,13 +682,15 @@ def _string_value_hook( def _symbol_list_hook( object_: Any, _: type ) -> Optional[ - Union[List[lsp_types.SymbolInformation], List[lsp_types.WorkspaceSymbol]] + Union[ + Sequence[lsp_types.SymbolInformation], Sequence[lsp_types.WorkspaceSymbol] + ] ]: if object_ is None: return None assert isinstance(object_, list) if len(object_) == 0: - return [] # type: ignore[return-value] + return [] if "location" in object_[0]: return [ converter.structure(item, lsp_types.SymbolInformation) @@ -702,18 +704,18 @@ def _symbol_list_hook( def _notebook_sync_registration_option_selector_hook( object_: Any, _: type ) -> Union[ - lsp_types.NotebookDocumentSyncRegistrationOptionsNotebookSelectorType1, - lsp_types.NotebookDocumentSyncRegistrationOptionsNotebookSelectorType2, + lsp_types.NotebookDocumentFilterWithNotebook, + lsp_types.NotebookDocumentFilterWithCells, ]: if "notebook" in object_: return converter.structure( object_, - lsp_types.NotebookDocumentSyncRegistrationOptionsNotebookSelectorType1, + lsp_types.NotebookDocumentFilterWithNotebook, ) else: return converter.structure( object_, - lsp_types.NotebookDocumentSyncRegistrationOptionsNotebookSelectorType2, + lsp_types.NotebookDocumentFilterWithCells, ) structure_hooks = [ @@ -936,8 +938,8 @@ def _notebook_sync_registration_option_selector_hook( Union[ lsp_types.MarkupContent, str, - lsp_types.MarkedString_Type1, - Sequence[Union[str, lsp_types.MarkedString_Type1]], + lsp_types.MarkedStringWithLanguage, + Sequence[Union[str, lsp_types.MarkedStringWithLanguage]], ], _markup_content_hook, ), @@ -951,14 +953,14 @@ def _notebook_sync_registration_option_selector_hook( _document_edit_hook, ), ( - Optional[Union[bool, lsp_types.SemanticTokensOptionsFullType1]], + Optional[Union[bool, lsp_types.SemanticTokensFullDelta]], _semantic_tokens_hook, ), ( Optional[ Union[ bool, - lsp_types.SemanticTokensClientCapabilitiesRequestsTypeFullType1, + lsp_types.ClientSemanticTokensRequestFullDelta, ] ], _semantic_tokens_capabilities_hook, @@ -1013,8 +1015,8 @@ def _notebook_sync_registration_option_selector_hook( ), ( Union[ - lsp_types.NotebookDocumentSyncOptionsNotebookSelectorType1, - lsp_types.NotebookDocumentSyncOptionsNotebookSelectorType2, + lsp_types.NotebookDocumentFilterWithNotebook, + lsp_types.NotebookDocumentFilterWithCells, ], _notebook_sync_option_selector_hook, ), @@ -1028,7 +1030,7 @@ def _notebook_sync_registration_option_selector_hook( _position_encoding_hook, ), ( - Optional[Union[bool, lsp_types.SemanticTokensRegistrationOptionsFullType1]], + Optional[Union[bool, lsp_types.ClientSemanticTokensRequestFullDelta]], _semantic_token_registration_options_hook, ), ( @@ -1057,13 +1059,6 @@ def _notebook_sync_registration_option_selector_hook( ], _symbol_list_hook, ), - ( - Union[ - lsp_types.NotebookDocumentSyncRegistrationOptionsNotebookSelectorType1, - lsp_types.NotebookDocumentSyncRegistrationOptionsNotebookSelectorType2, - ], - _notebook_sync_registration_option_selector_hook, - ), ] for type_, hook in structure_hooks: converter.register_structure_hook(type_, hook) @@ -1088,9 +1083,9 @@ def _text_document_filter_hook( object_: Any, _: type ) -> Union[ str, - lsp_types.TextDocumentFilter_Type1, - lsp_types.TextDocumentFilter_Type2, - lsp_types.TextDocumentFilter_Type3, + lsp_types.TextDocumentFilterLanguage, + lsp_types.TextDocumentFilterScheme, + lsp_types.TextDocumentFilterPattern, lsp_types.NotebookCellTextDocumentFilter, ]: if isinstance(object_, str): @@ -1100,30 +1095,31 @@ def _text_document_filter_hook( object_, lsp_types.NotebookCellTextDocumentFilter ) elif "language" in object_: - return converter.structure(object_, lsp_types.TextDocumentFilter_Type1) + return converter.structure(object_, lsp_types.TextDocumentFilterLanguage) elif "scheme" in object_: - return converter.structure(object_, lsp_types.TextDocumentFilter_Type2) + return converter.structure(object_, lsp_types.TextDocumentFilterScheme) else: - return converter.structure(object_, lsp_types.TextDocumentFilter_Type3) + return converter.structure(object_, lsp_types.TextDocumentFilterPattern) def _notebook_filter_hook( object_: Any, _: type ) -> Union[ str, - lsp_types.NotebookDocumentFilter_Type1, - lsp_types.NotebookDocumentFilter_Type2, - lsp_types.NotebookDocumentFilter_Type3, + lsp_types.NotebookDocumentFilterNotebookType, + lsp_types.NotebookDocumentFilterScheme, + lsp_types.NotebookDocumentFilterPattern, ]: if isinstance(object_, str): return str(object_) elif "notebookType" in object_: - return converter.structure(object_, lsp_types.NotebookDocumentFilter_Type1) + return converter.structure( + object_, lsp_types.NotebookDocumentFilterNotebookType + ) elif "scheme" in object_: - return converter.structure(object_, lsp_types.NotebookDocumentFilter_Type2) + return converter.structure(object_, lsp_types.NotebookDocumentFilterScheme) else: - return converter.structure(object_, lsp_types.NotebookDocumentFilter_Type3) + return converter.structure(object_, lsp_types.NotebookDocumentFilterPattern) - # TODO: Remove the ignore after this issue with attrs is addressed in either attrs or mypy NotebookSelectorItem = attrs.fields( lsp_types.NotebookCellTextDocumentFilter ).notebook.type @@ -1136,9 +1132,9 @@ def _notebook_filter_hook( (Optional[Union[bool, Any]], lambda object_, _type: object_), ( Union[ - lsp_types.TextDocumentFilter_Type1, - lsp_types.TextDocumentFilter_Type2, - lsp_types.TextDocumentFilter_Type3, + lsp_types.TextDocumentFilterLanguage, + lsp_types.TextDocumentFilterScheme, + lsp_types.TextDocumentFilterPattern, lsp_types.NotebookCellTextDocumentFilter, ], _text_document_filter_hook, @@ -1147,9 +1143,9 @@ def _notebook_filter_hook( ( Union[ str, - lsp_types.NotebookDocumentFilter_Type1, - lsp_types.NotebookDocumentFilter_Type2, - lsp_types.NotebookDocumentFilter_Type3, + lsp_types.NotebookDocumentFilterNotebookType, + lsp_types.NotebookDocumentFilterScheme, + lsp_types.NotebookDocumentFilterPattern, ], _notebook_filter_hook, ), diff --git a/packages/python/lsprotocol/types.py b/packages/python/lsprotocol/types.py index ffb923f..dfa0dec 100644 --- a/packages/python/lsprotocol/types.py +++ b/packages/python/lsprotocol/types.py @@ -746,20 +746,8 @@ class LSPObject: # Since: 3.17.0 -@attrs.define -class PrepareRenameResult_Type1: - range: "Range" = attrs.field() - - placeholder: str = attrs.field(validator=attrs.validators.instance_of(str)) - - -@attrs.define -class PrepareRenameResult_Type2: - default_behavior: bool = attrs.field(validator=attrs.validators.instance_of(bool)) - - PrepareRenameResult = Union[ - "Range", "PrepareRenameResult_Type1", "PrepareRenameResult_Type2" + "Range", "PrepareRenamePlaceholder", "PrepareRenameDefaultBehavior" ] @@ -789,43 +777,14 @@ class PrepareRenameResult_Type2: # Since: 3.17.0 -@attrs.define -class TextDocumentContentChangeEvent_Type1: - range: "Range" = attrs.field() - """The range of the document that changed.""" - - text: str = attrs.field(validator=attrs.validators.instance_of(str)) - """The new text for the provided range.""" - - range_length: Optional[int] = attrs.field( - validator=attrs.validators.optional(validators.uinteger_validator), default=None - ) - """The optional length of the range that got replaced. - - @deprecated use range instead.""" - - -@attrs.define -class TextDocumentContentChangeEvent_Type2: - text: str = attrs.field(validator=attrs.validators.instance_of(str)) - """The new text of the whole document.""" - - TextDocumentContentChangeEvent = Union[ - "TextDocumentContentChangeEvent_Type1", "TextDocumentContentChangeEvent_Type2" + "TextDocumentContentChangePartial", "TextDocumentContentChangeWholeDocument" ] """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 -class MarkedString_Type1: - language: str = attrs.field(validator=attrs.validators.instance_of(str)) - - value: str = attrs.field(validator=attrs.validators.instance_of(str)) - - -MarkedString = Union[str, "MarkedString_Type1"] +MarkedString = Union[str, "MarkedStringWithLanguage"] """MarkedString can be used to render human readable text. It is either a markdown string or a code-block that provides a language and a code snippet. The language identifier is semantically equal to the optional language identifier in fenced code blocks in GitHub @@ -855,62 +814,10 @@ class MarkedString_Type1: # Since: 3.17.0 -@attrs.define -class TextDocumentFilter_Type1: - language: str = attrs.field(validator=attrs.validators.instance_of(str)) - """A language id, like `typescript`.""" - - scheme: Optional[str] = attrs.field( - validator=attrs.validators.optional(attrs.validators.instance_of(str)), - default=None, - ) - """A Uri {@link Uri.scheme scheme}, like `file` or `untitled`.""" - - pattern: Optional[str] = attrs.field( - validator=attrs.validators.optional(attrs.validators.instance_of(str)), - default=None, - ) - """A glob pattern, like **/*.{ts,js}. See TextDocumentFilter for examples.""" - - -@attrs.define -class TextDocumentFilter_Type2: - scheme: str = attrs.field(validator=attrs.validators.instance_of(str)) - """A Uri {@link Uri.scheme scheme}, like `file` or `untitled`.""" - - language: Optional[str] = attrs.field( - validator=attrs.validators.optional(attrs.validators.instance_of(str)), - default=None, - ) - """A language id, like `typescript`.""" - - pattern: Optional[str] = attrs.field( - validator=attrs.validators.optional(attrs.validators.instance_of(str)), - default=None, - ) - """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}. See TextDocumentFilter for examples.""" - - language: Optional[str] = attrs.field( - validator=attrs.validators.optional(attrs.validators.instance_of(str)), - default=None, - ) - """A language id, like `typescript`.""" - - scheme: Optional[str] = attrs.field( - validator=attrs.validators.optional(attrs.validators.instance_of(str)), - default=None, - ) - """A Uri {@link Uri.scheme scheme}, like `file` or `untitled`.""" - - TextDocumentFilter = Union[ - "TextDocumentFilter_Type1", "TextDocumentFilter_Type2", "TextDocumentFilter_Type3" + "TextDocumentFilterLanguage", + "TextDocumentFilterScheme", + "TextDocumentFilterPattern", ] """A document filter denotes a document by different properties like the {@link TextDocument.languageId language}, the {@link Uri.scheme scheme} of @@ -931,73 +838,6 @@ class TextDocumentFilter_Type3: # Since: 3.17.0 -@attrs.define -class NotebookDocumentFilter_Type1: - notebook_type: str = attrs.field(validator=attrs.validators.instance_of(str)) - """The type of the enclosing notebook.""" - - scheme: Optional[str] = attrs.field( - validator=attrs.validators.optional(attrs.validators.instance_of(str)), - default=None, - ) - """A Uri {@link Uri.scheme scheme}, like `file` or `untitled`.""" - - pattern: Optional[str] = attrs.field( - validator=attrs.validators.optional(attrs.validators.instance_of(str)), - default=None, - ) - """A glob pattern.""" - - -@attrs.define -class NotebookDocumentFilter_Type2: - scheme: str = attrs.field(validator=attrs.validators.instance_of(str)) - """A Uri {@link Uri.scheme scheme}, like `file` or `untitled`.""" - - notebook_type: Optional[str] = attrs.field( - validator=attrs.validators.optional(attrs.validators.instance_of(str)), - default=None, - ) - """The type of the enclosing notebook.""" - - pattern: Optional[str] = attrs.field( - validator=attrs.validators.optional(attrs.validators.instance_of(str)), - default=None, - ) - """A glob pattern.""" - - -@attrs.define -class NotebookDocumentFilter_Type3: - pattern: str = attrs.field(validator=attrs.validators.instance_of(str)) - """A glob pattern.""" - - notebook_type: Optional[str] = attrs.field( - validator=attrs.validators.optional(attrs.validators.instance_of(str)), - default=None, - ) - """The type of the enclosing notebook.""" - - scheme: Optional[str] = attrs.field( - validator=attrs.validators.optional(attrs.validators.instance_of(str)), - default=None, - ) - """A Uri {@link Uri.scheme scheme}, like `file` or `untitled`.""" - - -NotebookDocumentFilter = Union[ - "NotebookDocumentFilter_Type1", - "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) - -@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: - `*` to match one or more characters in a path segment @@ -1011,6 +851,19 @@ class NotebookDocumentFilter_Type3: # Since: 3.17.0 +NotebookDocumentFilter = Union[ + "NotebookDocumentFilterNotebookType", + "NotebookDocumentFilterScheme", + "NotebookDocumentFilterPattern", +] +"""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 + + @attrs.define class TextDocumentPositionParams: """A parameter literal used in requests to pass a text document and a position inside that @@ -1709,15 +1562,6 @@ class SemanticTokensPartialResult: data: Sequence[int] = attrs.field() -@attrs.define -class SemanticTokensOptionsFullType1: - delta: Optional[bool] = attrs.field( - validator=attrs.validators.optional(attrs.validators.instance_of(bool)), - default=None, - ) - """The server supports deltas for full documents.""" - - @attrs.define class SemanticTokensOptions: """@since 3.16.0""" @@ -1731,9 +1575,7 @@ class SemanticTokensOptions: """Server supports providing semantic tokens for a specific range of a document.""" - full: Optional[Union[bool, "SemanticTokensOptionsFullType1"]] = attrs.field( - default=None - ) + full: Optional[Union[bool, "SemanticTokensFullDelta"]] = attrs.field(default=None) """Server supports providing semantic tokens for a full document.""" work_done_progress: Optional[bool] = attrs.field( @@ -1742,15 +1584,6 @@ class SemanticTokensOptions: ) -@attrs.define -class SemanticTokensRegistrationOptionsFullType1: - delta: Optional[bool] = attrs.field( - validator=attrs.validators.optional(attrs.validators.instance_of(bool)), - default=None, - ) - """The server supports deltas for full documents.""" - - @attrs.define class SemanticTokensRegistrationOptions: """@since 3.16.0""" @@ -1770,9 +1603,7 @@ class SemanticTokensRegistrationOptions: """Server supports providing semantic tokens for a specific range of a document.""" - full: Optional[ - Union[bool, "SemanticTokensRegistrationOptionsFullType1"] - ] = attrs.field(default=None) + full: Optional[Union[bool, "SemanticTokensFullDelta"]] = attrs.field(default=None) """Server supports providing semantic tokens for a full document.""" work_done_progress: Optional[bool] = attrs.field( @@ -2822,18 +2653,6 @@ class UnregistrationParams: unregisterations: Sequence["Unregistration"] = attrs.field() -@attrs.define -class InitializeParamsClientInfoType: - name: str = attrs.field(validator=attrs.validators.instance_of(str)) - """The name of the client as defined by the client.""" - - version: Optional[str] = attrs.field( - validator=attrs.validators.optional(attrs.validators.instance_of(str)), - default=None, - ) - """The client's version as defined by the client.""" - - @attrs.define class _InitializeParams: """The initialize parameters""" @@ -2848,7 +2667,7 @@ class _InitializeParams: Is `null` if the process has not been started by another process. If the parent process is not alive then the server should exit.""" - client_info: Optional["InitializeParamsClientInfoType"] = attrs.field(default=None) + client_info: Optional["ClientInfo"] = attrs.field(default=None) """Information about the client @since 3.15.0""" @@ -2918,7 +2737,7 @@ class InitializeParams: Is `null` if the process has not been started by another process. If the parent process is not alive then the server should exit.""" - client_info: Optional["InitializeParamsClientInfoType"] = attrs.field(default=None) + client_info: Optional["ClientInfo"] = attrs.field(default=None) """Information about the client @since 3.15.0""" @@ -2973,18 +2792,6 @@ class InitializeParams: # Since: 3.6.0 -@attrs.define -class InitializeResultServerInfoType: - name: str = attrs.field(validator=attrs.validators.instance_of(str)) - """The name of the server as defined by the server.""" - - version: Optional[str] = attrs.field( - validator=attrs.validators.optional(attrs.validators.instance_of(str)), - default=None, - ) - """The server's version as defined by the server.""" - - @attrs.define class InitializeResult: """The result returned from an initialize request.""" @@ -2992,7 +2799,7 @@ class InitializeResult: capabilities: "ServerCapabilities" = attrs.field() """The capabilities the language server provides.""" - server_info: Optional["InitializeResultServerInfoType"] = attrs.field(default=None) + server_info: Optional["ServerInfo"] = attrs.field(default=None) """Information about the server. @since 3.15.0""" @@ -3416,48 +3223,6 @@ class CompletionItem: {@link CompletionRequest} and a {@link CompletionResolveRequest}.""" -@attrs.define -class CompletionListItemDefaultsTypeEditRangeType1: - insert: "Range" = attrs.field() - - replace: "Range" = attrs.field() - - -@attrs.define -class CompletionListItemDefaultsType: - commit_characters: Optional[Sequence[str]] = attrs.field(default=None) - """A default commit character set. - - @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 - - insert_text_format: Optional[InsertTextFormat] = attrs.field(default=None) - """A default insert text format. - - @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 - - data: Optional[LSPAny] = attrs.field(default=None) - """A default data value. - - @since 3.17.0""" - # Since: 3.17.0 - - @attrs.define class CompletionList: """Represents a collection of {@link CompletionItem completion items} to be presented @@ -3472,9 +3237,7 @@ class CompletionList: items: Sequence[CompletionItem] = attrs.field() """The completion items.""" - item_defaults: Optional["CompletionListItemDefaultsType"] = attrs.field( - default=None - ) + item_defaults: Optional["CompletionItemDefaults"] = attrs.field(default=None) """In many cases the items of an actual completion result share the same value for properties like `commitCharacters` or the range of a text edit. A completion list can therefore define item defaults which will @@ -3491,20 +3254,6 @@ class CompletionList: # Since: 3.17.0 -@attrs.define -class CompletionOptionsCompletionItemType: - label_details_support: Optional[bool] = attrs.field( - validator=attrs.validators.optional(attrs.validators.instance_of(bool)), - default=None, - ) - """The server has support for completion item label - details (see also `CompletionItemLabelDetails`) when - receiving a completion item in a resolve call. - - @since 3.17.0""" - # Since: 3.17.0 - - @attrs.define class CompletionOptions: """Completion options.""" @@ -3537,9 +3286,7 @@ class CompletionOptions: """The server provides support to resolve additional information for a completion item.""" - completion_item: Optional["CompletionOptionsCompletionItemType"] = attrs.field( - default=None - ) + completion_item: Optional["ServerCompletionItemOptions"] = attrs.field(default=None) """The server supports the following `CompletionItem` specific capabilities. @@ -3552,20 +3299,6 @@ class CompletionOptions: ) -@attrs.define -class CompletionRegistrationOptionsCompletionItemType: - label_details_support: Optional[bool] = attrs.field( - validator=attrs.validators.optional(attrs.validators.instance_of(bool)), - default=None, - ) - """The server has support for completion item label - details (see also `CompletionItemLabelDetails`) when - receiving a completion item in a resolve call. - - @since 3.17.0""" - # Since: 3.17.0 - - @attrs.define class CompletionRegistrationOptions: """Registration options for a {@link CompletionRequest}.""" @@ -3604,9 +3337,7 @@ class CompletionRegistrationOptions: """The server provides support to resolve additional information for a completion item.""" - completion_item: Optional[ - "CompletionRegistrationOptionsCompletionItemType" - ] = attrs.field(default=None) + completion_item: Optional["ServerCompletionItemOptions"] = attrs.field(default=None) """The server supports the following `CompletionItem` specific capabilities. @@ -4144,14 +3875,6 @@ class Command: 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.""" - - @attrs.define class CodeAction: """A code action represents a change that can be performed in code, e.g. to fix a problem or @@ -4184,7 +3907,7 @@ class CodeAction: @since 3.15.0""" # Since: 3.15.0 - disabled: Optional["CodeActionDisabledType"] = attrs.field(default=None) + disabled: Optional["CodeActionDisabled"] = attrs.field(default=None) """Marks that the code action cannot currently be applied. Clients should follow the following guidelines regarding disabled code actions: @@ -4296,11 +4019,6 @@ class WorkspaceSymbolParams: the client.""" -@attrs.define -class WorkspaceSymbolLocationType1: - uri: str = attrs.field(validator=attrs.validators.instance_of(str)) - - @attrs.define class WorkspaceSymbol: """A special workspace symbol that supports locations without a range. @@ -4311,7 +4029,7 @@ class WorkspaceSymbol: # Since: 3.17.0 - location: Union[Location, "WorkspaceSymbolLocationType1"] = attrs.field() + location: Union[Location, "LocationUriOnly"] = attrs.field() """The location of the symbol. Whether a server is allowed to return a location without a range depends on the client capability `workspace.symbol.resolveSupport`. @@ -5707,43 +5425,6 @@ class VersionedNotebookDocumentIdentifier: """The notebook document's uri.""" -@attrs.define -class NotebookDocumentChangeEventCellsTypeStructureType: - array: "NotebookCellArrayChange" = attrs.field() - """The change to the cell array.""" - - did_open: Optional[Sequence[TextDocumentItem]] = attrs.field(default=None) - """Additional opened cell text documents.""" - - did_close: Optional[Sequence[TextDocumentIdentifier]] = attrs.field(default=None) - """Additional closed cell text documents.""" - - -@attrs.define -class NotebookDocumentChangeEventCellsTypeTextContentType: - document: "VersionedTextDocumentIdentifier" = attrs.field() - - changes: Sequence[TextDocumentContentChangeEvent] = attrs.field() - - -@attrs.define -class NotebookDocumentChangeEventCellsType: - structure: Optional[ - "NotebookDocumentChangeEventCellsTypeStructureType" - ] = attrs.field(default=None) - """Changes to the cell structure to add or - remove cells.""" - - data: Optional[Sequence["NotebookCell"]] = attrs.field(default=None) - """Changes to notebook cells properties like its - kind, execution summary or metadata.""" - - text_content: Optional[ - Sequence["NotebookDocumentChangeEventCellsTypeTextContentType"] - ] = attrs.field(default=None) - """Changes to the text content of notebook cells.""" - - @attrs.define class NotebookDocumentChangeEvent: """A change event for a notebook document. @@ -5757,7 +5438,7 @@ class NotebookDocumentChangeEvent: Note: should always be an object literal (e.g. LSPObject)""" - cells: Optional["NotebookDocumentChangeEventCellsType"] = attrs.field(default=None) + cells: Optional["NotebookDocumentCellChanges"] = attrs.field(default=None) """Changes to cells""" @@ -5844,23 +5525,6 @@ class Unregistration: """The method to unregister for.""" -@attrs.define -class ServerCapabilitiesWorkspaceType: - workspace_folders: Optional["WorkspaceFoldersServerCapabilities"] = attrs.field( - default=None - ) - """The server supports workspace folder. - - @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 - - @attrs.define class ServerCapabilities: """Defines the capabilities provided by a language @@ -6071,13 +5735,34 @@ class ServerCapabilities: # Since: 3.18.0 # Proposed - workspace: Optional["ServerCapabilitiesWorkspaceType"] = attrs.field(default=None) + workspace: Optional["WorkspaceOptions"] = attrs.field(default=None) """Workspace specific server capabilities.""" experimental: Optional[LSPAny] = attrs.field(default=None) """Experimental server capabilities.""" +@attrs.define +class ServerInfo: + """Information about the server + + @since 3.15.0 + @since 3.18.0 ServerInfo type name added. + @proposed""" + + # Since: 3.18.0 ServerInfo type name added. + # Proposed + + name: str = attrs.field(validator=attrs.validators.instance_of(str)) + """The name of the server as defined by the server.""" + + version: Optional[str] = attrs.field( + validator=attrs.validators.optional(attrs.validators.instance_of(str)), + default=None, + ) + """The server's version as defined by the server.""" + + @attrs.define class VersionedTextDocumentIdentifier: """A text document identifier to denote a specific version of a text document.""" @@ -6223,6 +5908,57 @@ class InsertReplaceEdit: """The range if the replace is requested.""" +@attrs.define +class CompletionItemDefaults: + """In many cases the items of an actual completion result share the same + value for properties like `commitCharacters` or the range of a text + edit. A completion list can therefore define item defaults which will + be used if a completion item itself doesn't specify the value. + + If a completion list specifies a default value and a completion item + also specifies a corresponding value the one from the item is used. + + Servers are only allowed to return default values if the client + signals support for this via the `completionList.itemDefaults` + capability. + + @since 3.17.0""" + + # Since: 3.17.0 + + commit_characters: Optional[Sequence[str]] = attrs.field(default=None) + """A default commit character set. + + @since 3.17.0""" + # Since: 3.17.0 + + edit_range: Optional[Union[Range, "EditRangeWithInsertReplace"]] = attrs.field( + default=None + ) + """A default edit range. + + @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 + + insert_text_mode: Optional[InsertTextMode] = attrs.field(default=None) + """A default insert text mode. + + @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 + + @attrs.define class SignatureHelpContext: """Additional information about the context in which a signature help request was triggered. @@ -6319,6 +6055,35 @@ class CodeActionContext: # Since: 3.17.0 +@attrs.define +class CodeActionDisabled: + """Captures why the code action is currently disabled. + + @since 3.18.0 + @proposed""" + + # Since: 3.18.0 + # Proposed + + 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.""" + + +@attrs.define +class LocationUriOnly: + """Location with only uri and does not include range. + + @since 3.18.0 + @proposed""" + + # Since: 3.18.0 + # Proposed + + uri: str = attrs.field(validator=attrs.validators.instance_of(str)) + + @attrs.define class FormattingOptions: """Value-object describing what options formatting should use.""" @@ -6357,6 +6122,30 @@ class FormattingOptions: # Since: 3.15.0 +@attrs.define +class PrepareRenamePlaceholder: + """@since 3.18.0 + @proposed""" + + # Since: 3.18.0 + # Proposed + + range: Range = attrs.field() + + placeholder: str = attrs.field(validator=attrs.validators.instance_of(str)) + + +@attrs.define +class PrepareRenameDefaultBehavior: + """@since 3.18.0 + @proposed""" + + # Since: 3.18.0 + # Proposed + + default_behavior: bool = attrs.field(validator=attrs.validators.instance_of(bool)) + + @attrs.define class SemanticTokensLegend: """@since 3.16.0""" @@ -6370,6 +6159,23 @@ class SemanticTokensLegend: """The token modifiers a server uses.""" +@attrs.define +class SemanticTokensFullDelta: + """Semantic tokens options to support deltas for full documents + + @since 3.18.0 + @proposed""" + + # Since: 3.18.0 + # Proposed + + delta: Optional[bool] = attrs.field( + validator=attrs.validators.optional(attrs.validators.instance_of(bool)), + default=None, + ) + """The server supports deltas for full documents.""" + + @attrs.define class OptionalVersionedTextDocumentIdentifier: """A text document identifier to optionally denote a specific version of a text document.""" @@ -6571,22 +6377,29 @@ class NotebookCell: @attrs.define -class NotebookCellArrayChange: - """A change describing how to move a `NotebookCell` - array from state S to S'. +class NotebookDocumentCellChanges: + """Cell changes to a notebook document. - @since 3.17.0""" + @since 3.18.0 + @proposed""" - # Since: 3.17.0 + # Since: 3.18.0 + # Proposed - start: int = attrs.field(validator=validators.uinteger_validator) - """The start oftest of the cell that changed.""" + structure: Optional["NotebookDocumentCellChangeStructure"] = attrs.field( + default=None + ) + """Changes to the cell structure to add or + remove cells.""" - delete_count: int = attrs.field(validator=validators.uinteger_validator) - """The deleted cells""" + data: Optional[Sequence[NotebookCell]] = attrs.field(default=None) + """Changes to notebook cells properties like its + kind, execution summary or metadata.""" - cells: Optional[Sequence[NotebookCell]] = attrs.field(default=None) - """The new cells, if any""" + text_content: Optional[ + Sequence["NotebookDocumentCellContentChanges"] + ] = attrs.field(default=None) + """Changes to the text content of notebook cells.""" @attrs.define @@ -6606,6 +6419,27 @@ class SelectedCompletionInfo: """The text the range will be replaced with if this completion is accepted.""" +@attrs.define +class ClientInfo: + """Information about the client + + @since 3.15.0 + @since 3.18.0 ClientInfo type name added. + @proposed""" + + # Since: 3.18.0 ClientInfo type name added. + # Proposed + + name: str = attrs.field(validator=attrs.validators.instance_of(str)) + """The name of the client as defined by the client.""" + + version: Optional[str] = attrs.field( + validator=attrs.validators.optional(attrs.validators.instance_of(str)), + default=None, + ) + """The client's version as defined by the client.""" + + @attrs.define class ClientCapabilities: """Defines the capabilities provided by the client.""" @@ -6672,64 +6506,25 @@ class TextDocumentSyncOptions: @attrs.define -class NotebookDocumentSyncOptionsNotebookSelectorType1CellsType: - language: str = attrs.field(validator=attrs.validators.instance_of(str)) +class NotebookDocumentSyncOptions: + """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 + matching notebook document will be synced. -@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.""" + If a selector provides no notebook document + filter but only a cell selector all notebook + document that contain at least one matching + cell will be synced. - cells: Optional[ - Sequence["NotebookDocumentSyncOptionsNotebookSelectorType1CellsType"] - ] = attrs.field(default=None) - """The cells of the matching notebook to be synced.""" + @since 3.17.0""" - -@attrs.define -class NotebookDocumentSyncOptionsNotebookSelectorType2CellsType: - language: str = attrs.field(validator=attrs.validators.instance_of(str)) - - -@attrs.define -class NotebookDocumentSyncOptionsNotebookSelectorType2: - cells: Sequence[ - "NotebookDocumentSyncOptionsNotebookSelectorType2CellsType" - ] = attrs.field() - """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.""" - - -@attrs.define -class NotebookDocumentSyncOptions: - """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 - matching notebook document will be synced. - - If a selector provides no notebook document - filter but only a cell selector all notebook - document that contain at least one matching - cell will be synced. - - @since 3.17.0""" - - # Since: 3.17.0 + # Since: 3.17.0 notebook_selector: Sequence[ - Union[ - "NotebookDocumentSyncOptionsNotebookSelectorType1", - "NotebookDocumentSyncOptionsNotebookSelectorType2", - ] + Union["NotebookDocumentFilterWithNotebook", "NotebookDocumentFilterWithCells"] ] = attrs.field() """The notebooks to be synced""" @@ -6741,44 +6536,6 @@ class NotebookDocumentSyncOptions: the server. Will only be honored if mode === `notebook`.""" -@attrs.define -class NotebookDocumentSyncRegistrationOptionsNotebookSelectorType1CellsType: - language: str = attrs.field(validator=attrs.validators.instance_of(str)) - - -@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.""" - - cells: Optional[ - Sequence[ - "NotebookDocumentSyncRegistrationOptionsNotebookSelectorType1CellsType" - ] - ] = attrs.field(default=None) - """The cells of the matching notebook to be synced.""" - - -@attrs.define -class NotebookDocumentSyncRegistrationOptionsNotebookSelectorType2CellsType: - language: str = attrs.field(validator=attrs.validators.instance_of(str)) - - -@attrs.define -class NotebookDocumentSyncRegistrationOptionsNotebookSelectorType2: - cells: Sequence[ - "NotebookDocumentSyncRegistrationOptionsNotebookSelectorType2CellsType" - ] = attrs.field() - """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.""" - - @attrs.define class NotebookDocumentSyncRegistrationOptions: """Registration options specific to a notebook. @@ -6788,10 +6545,7 @@ class NotebookDocumentSyncRegistrationOptions: # Since: 3.17.0 notebook_selector: Sequence[ - Union[ - "NotebookDocumentSyncRegistrationOptionsNotebookSelectorType1", - "NotebookDocumentSyncRegistrationOptionsNotebookSelectorType2", - ] + Union["NotebookDocumentFilterWithNotebook", "NotebookDocumentFilterWithCells"] ] = attrs.field() """The notebooks to be synced""" @@ -6811,48 +6565,62 @@ class NotebookDocumentSyncRegistrationOptions: @attrs.define -class WorkspaceFoldersServerCapabilities: - supported: Optional[bool] = attrs.field( - validator=attrs.validators.optional(attrs.validators.instance_of(bool)), - default=None, +class WorkspaceOptions: + """Defines workspace specific capabilities of the server. + + @since 3.18.0 + @proposed""" + + # Since: 3.18.0 + # Proposed + + workspace_folders: Optional["WorkspaceFoldersServerCapabilities"] = attrs.field( + default=None ) - """The server has support for workspace folders""" + """The server supports workspace folder. + + @since 3.6.0""" + # Since: 3.6.0 - change_notifications: Optional[Union[str, bool]] = attrs.field(default=None) - """Whether the server wants to receive workspace folder - change notifications. + file_operations: Optional["FileOperationOptions"] = attrs.field(default=None) + """The server is interested in notifications/requests for operations on files. - 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.""" + @since 3.16.0""" + # Since: 3.16.0 @attrs.define -class FileOperationOptions: - """Options for notifications/requests for user operations on files. +class TextDocumentContentChangePartial: + """@since 3.18.0 + @proposed""" - @since 3.16.0""" + # Since: 3.18.0 + # Proposed - # Since: 3.16.0 + range: Range = attrs.field() + """The range of the document that changed.""" - did_create: Optional[FileOperationRegistrationOptions] = attrs.field(default=None) - """The server is interested in receiving didCreateFiles notifications.""" + text: str = attrs.field(validator=attrs.validators.instance_of(str)) + """The new text for the provided range.""" - will_create: Optional[FileOperationRegistrationOptions] = attrs.field(default=None) - """The server is interested in receiving willCreateFiles requests.""" + range_length: Optional[int] = attrs.field( + validator=attrs.validators.optional(validators.uinteger_validator), default=None + ) + """The optional length of the range that got replaced. + + @deprecated use range instead.""" - did_rename: Optional[FileOperationRegistrationOptions] = attrs.field(default=None) - """The server is interested in receiving didRenameFiles notifications.""" - will_rename: Optional[FileOperationRegistrationOptions] = attrs.field(default=None) - """The server is interested in receiving willRenameFiles requests.""" +@attrs.define +class TextDocumentContentChangeWholeDocument: + """@since 3.18.0 + @proposed""" - did_delete: Optional[FileOperationRegistrationOptions] = attrs.field(default=None) - """The server is interested in receiving didDeleteFiles file notifications.""" + # Since: 3.18.0 + # Proposed - will_delete: Optional[FileOperationRegistrationOptions] = attrs.field(default=None) - """The server is interested in receiving willDeleteFiles file requests.""" + text: str = attrs.field(validator=attrs.validators.instance_of(str)) + """The new text of the whole document.""" @attrs.define @@ -6880,6 +6648,55 @@ class DiagnosticRelatedInformation: """The message of this related diagnostic information.""" +@attrs.define +class EditRangeWithInsertReplace: + """Edit range variant that includes ranges for insert and replace operations. + + @since 3.18.0 + @proposed""" + + # Since: 3.18.0 + # Proposed + + insert: Range = attrs.field() + + replace: Range = attrs.field() + + +@attrs.define +class ServerCompletionItemOptions: + """@since 3.18.0 + @proposed""" + + # Since: 3.18.0 + # Proposed + + label_details_support: Optional[bool] = attrs.field( + validator=attrs.validators.optional(attrs.validators.instance_of(bool)), + default=None, + ) + """The server has support for completion item label + details (see also `CompletionItemLabelDetails`) when + receiving a completion item in a resolve call. + + @since 3.17.0""" + # Since: 3.17.0 + + +@attrs.define +class MarkedStringWithLanguage: + """@since 3.18.0 + @proposed + @deprecated use MarkupContent instead.""" + + # Since: 3.18.0 + # Proposed + + language: str = attrs.field(validator=attrs.validators.instance_of(str)) + + value: str = attrs.field(validator=attrs.validators.instance_of(str)) + + @attrs.define class ParameterInformation: """Represents a parameter of a callable-signature. A parameter can @@ -6955,6 +6772,41 @@ class ExecutionSummary: not if known by the client.""" +@attrs.define +class NotebookDocumentCellChangeStructure: + """Structural changes to cells in a notebook document. + + @since 3.18.0 + @proposed""" + + # Since: 3.18.0 + # Proposed + + array: "NotebookCellArrayChange" = attrs.field() + """The change to the cell array.""" + + did_open: Optional[Sequence[TextDocumentItem]] = attrs.field(default=None) + """Additional opened cell text documents.""" + + did_close: Optional[Sequence[TextDocumentIdentifier]] = attrs.field(default=None) + """Additional closed cell text documents.""" + + +@attrs.define +class NotebookDocumentCellContentChanges: + """Content changes to a cell in a notebook document. + + @since 3.18.0 + @proposed""" + + # Since: 3.18.0 + # Proposed + + document: VersionedTextDocumentIdentifier = attrs.field() + + changes: Sequence[TextDocumentContentChangeEvent] = attrs.field() + + @attrs.define class WorkspaceClientCapabilities: """Workspace specific client capabilities.""" @@ -7304,17 +7156,6 @@ class WindowClientCapabilities: # Since: 3.16.0 -@attrs.define -class GeneralClientCapabilitiesStaleRequestSupportType: - cancel: bool = attrs.field(validator=attrs.validators.instance_of(bool)) - """The client will actively cancel the request.""" - - retry_on_content_modified: Sequence[str] = attrs.field() - """The list of requests for which the client - will retry the request if it receives a - response with error code `ContentModified`""" - - @attrs.define class GeneralClientCapabilities: """General client capabilities. @@ -7323,9 +7164,9 @@ class GeneralClientCapabilities: # Since: 3.16.0 - stale_request_support: Optional[ - "GeneralClientCapabilitiesStaleRequestSupportType" - ] = attrs.field(default=None) + stale_request_support: Optional["StaleRequestSupportOptions"] = 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 @@ -7373,35 +7214,200 @@ class GeneralClientCapabilities: @attrs.define -class RelativePattern: - """A relative pattern is a helper to construct glob patterns that are matched - relatively to a base URI. The common value for a `baseUri` is a workspace - folder root, but it can be another absolute URI as well. +class NotebookDocumentFilterWithNotebook: + """@since 3.18.0 + @proposed""" - @since 3.17.0""" + # Since: 3.18.0 + # Proposed - # Since: 3.17.0 + 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.""" - base_uri: Union[WorkspaceFolder, str] = attrs.field() - """A workspace folder or a base URI to which this pattern will be matched - against relatively.""" + cells: Optional[Sequence["NotebookCellLanguage"]] = attrs.field(default=None) + """The cells of the matching notebook to be synced.""" - pattern: Pattern = attrs.field() - """The actual glob pattern;""" + +@attrs.define +class NotebookDocumentFilterWithCells: + """@since 3.18.0 + @proposed""" + + # Since: 3.18.0 + # Proposed + + cells: Sequence["NotebookCellLanguage"] = attrs.field() + """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.""" @attrs.define -class WorkspaceEditClientCapabilitiesChangeAnnotationSupportType: - groups_on_label: Optional[bool] = attrs.field( +class WorkspaceFoldersServerCapabilities: + supported: Optional[bool] = attrs.field( 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.""" - + """The server has support for workspace folders""" -@attrs.define + 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.""" + + +@attrs.define +class FileOperationOptions: + """Options for notifications/requests for user operations on files. + + @since 3.16.0""" + + # Since: 3.16.0 + + did_create: Optional[FileOperationRegistrationOptions] = attrs.field(default=None) + """The server is interested in receiving didCreateFiles notifications.""" + + will_create: Optional[FileOperationRegistrationOptions] = attrs.field(default=None) + """The server is interested in receiving willCreateFiles requests.""" + + did_rename: Optional[FileOperationRegistrationOptions] = attrs.field(default=None) + """The server is interested in receiving didRenameFiles notifications.""" + + will_rename: Optional[FileOperationRegistrationOptions] = attrs.field(default=None) + """The server is interested in receiving willRenameFiles requests.""" + + did_delete: Optional[FileOperationRegistrationOptions] = attrs.field(default=None) + """The server is interested in receiving didDeleteFiles file notifications.""" + + will_delete: Optional[FileOperationRegistrationOptions] = attrs.field(default=None) + """The server is interested in receiving willDeleteFiles file requests.""" + + +@attrs.define +class RelativePattern: + """A relative pattern is a helper to construct glob patterns that are matched + relatively to a base URI. The common value for a `baseUri` is a workspace + folder root, but it can be another absolute URI as well. + + @since 3.17.0""" + + # 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.""" + + pattern: Pattern = attrs.field() + """The actual glob pattern;""" + + +@attrs.define +class TextDocumentFilterLanguage: + """A document filter where `language` is required field. + + @since 3.18.0 + @proposed""" + + # Since: 3.18.0 + # Proposed + + language: str = attrs.field(validator=attrs.validators.instance_of(str)) + """A language id, like `typescript`.""" + + scheme: Optional[str] = attrs.field( + validator=attrs.validators.optional(attrs.validators.instance_of(str)), + default=None, + ) + """A Uri {@link Uri.scheme scheme}, like `file` or `untitled`.""" + + pattern: Optional[str] = attrs.field( + validator=attrs.validators.optional(attrs.validators.instance_of(str)), + default=None, + ) + """A glob pattern, like **/*.{ts,js}. See TextDocumentFilter for examples.""" + + +@attrs.define +class TextDocumentFilterScheme: + """A document filter where `scheme` is required field. + + @since 3.18.0 + @proposed""" + + # Since: 3.18.0 + # Proposed + + scheme: str = attrs.field(validator=attrs.validators.instance_of(str)) + """A Uri {@link Uri.scheme scheme}, like `file` or `untitled`.""" + + language: Optional[str] = attrs.field( + validator=attrs.validators.optional(attrs.validators.instance_of(str)), + default=None, + ) + """A language id, like `typescript`.""" + + pattern: Optional[str] = attrs.field( + validator=attrs.validators.optional(attrs.validators.instance_of(str)), + default=None, + ) + """A glob pattern, like **/*.{ts,js}. See TextDocumentFilter for examples.""" + + +@attrs.define +class TextDocumentFilterPattern: + """A document filter where `pattern` is required field. + + @since 3.18.0 + @proposed""" + + # Since: 3.18.0 + # Proposed + + pattern: str = attrs.field(validator=attrs.validators.instance_of(str)) + """A glob pattern, like **/*.{ts,js}. See TextDocumentFilter for examples.""" + + language: Optional[str] = attrs.field( + validator=attrs.validators.optional(attrs.validators.instance_of(str)), + default=None, + ) + """A language id, like `typescript`.""" + + scheme: Optional[str] = attrs.field( + validator=attrs.validators.optional(attrs.validators.instance_of(str)), + default=None, + ) + """A Uri {@link Uri.scheme scheme}, like `file` or `untitled`.""" + + +@attrs.define +class NotebookCellArrayChange: + """A change describing how to move a `NotebookCell` + array from state S to S'. + + @since 3.17.0""" + + # Since: 3.17.0 + + start: int = attrs.field(validator=validators.uinteger_validator) + """The start oftest of the cell that changed.""" + + delete_count: int = attrs.field(validator=validators.uinteger_validator) + """The deleted cells""" + + cells: Optional[Sequence[NotebookCell]] = attrs.field(default=None) + """The new cells, if any""" + + +@attrs.define class WorkspaceEditClientCapabilities: document_changes: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), @@ -7439,7 +7445,7 @@ class WorkspaceEditClientCapabilities: # Since: 3.16.0 change_annotation_support: Optional[ - "WorkspaceEditClientCapabilitiesChangeAnnotationSupportType" + "ChangeAnnotationsSupportOptions" ] = attrs.field(default=None) """Whether the client in general supports change annotations on text edits, create file, rename file and delete file changes. @@ -7478,32 +7484,6 @@ class DidChangeWatchedFilesClientCapabilities: # Since: 3.17.0 -@attrs.define -class WorkspaceSymbolClientCapabilitiesSymbolKindType: - value_set: Optional[Sequence[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 - 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.""" - - -@attrs.define -class WorkspaceSymbolClientCapabilitiesTagSupportType: - value_set: Sequence[SymbolTag] = attrs.field() - """The tags supported by the client.""" - - -@attrs.define -class WorkspaceSymbolClientCapabilitiesResolveSupportType: - properties: Sequence[str] = attrs.field() - """The properties that a client can resolve lazily. Usually - `location.range`""" - - @attrs.define class WorkspaceSymbolClientCapabilities: """Client capabilities for a {@link WorkspaceSymbolRequest}.""" @@ -7514,23 +7494,17 @@ class WorkspaceSymbolClientCapabilities: ) """Symbol request supports dynamic registration.""" - symbol_kind: Optional[ - "WorkspaceSymbolClientCapabilitiesSymbolKindType" - ] = attrs.field(default=None) + symbol_kind: Optional["ClientSymbolKindOptions"] = attrs.field(default=None) """Specific capabilities for the `SymbolKind` in the `workspace/symbol` request.""" - tag_support: Optional[ - "WorkspaceSymbolClientCapabilitiesTagSupportType" - ] = attrs.field(default=None) + tag_support: Optional["ClientSymbolTagOptions"] = attrs.field(default=None) """The client supports tags on `SymbolInformation`. Clients supporting tags have to handle unknown tags gracefully. @since 3.16.0""" # Since: 3.16.0 - resolve_support: Optional[ - "WorkspaceSymbolClientCapabilitiesResolveSupportType" - ] = attrs.field(default=None) + resolve_support: Optional["ClientSymbolResolveOptions"] = 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. @@ -7763,253 +7737,83 @@ class TextDocumentSyncClientCapabilities: @attrs.define -class CompletionClientCapabilitiesCompletionItemTypeTagSupportType: - value_set: Sequence[CompletionItemTag] = attrs.field() - """The tags supported by the client.""" - +class CompletionClientCapabilities: + """Completion client capabilities""" -@attrs.define -class CompletionClientCapabilitiesCompletionItemTypeResolveSupportType: - properties: Sequence[str] = attrs.field() - """The properties that a client can resolve lazily.""" + dynamic_registration: Optional[bool] = attrs.field( + validator=attrs.validators.optional(attrs.validators.instance_of(bool)), + default=None, + ) + """Whether completion supports dynamic registration.""" + completion_item: Optional["ClientCompletionItemOptions"] = attrs.field(default=None) + """The client supports the following `CompletionItem` specific + capabilities.""" -@attrs.define -class CompletionClientCapabilitiesCompletionItemTypeInsertTextModeSupportType: - value_set: Sequence[InsertTextMode] = attrs.field() + completion_item_kind: Optional["ClientCompletionItemOptionsKind"] = attrs.field( + default=None + ) + insert_text_mode: Optional[InsertTextMode] = attrs.field(default=None) + """Defines how the client handles whitespace and indentation + when accepting a completion item that uses multi line + text in either `insertText` or `textEdit`. + + @since 3.17.0""" + # Since: 3.17.0 -@attrs.define -class CompletionClientCapabilitiesCompletionItemType: - snippet_support: Optional[bool] = attrs.field( + context_support: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """Client supports snippets as insert text. + """The client supports to send additional context information for a + `textDocument/completion` request.""" + + completion_list: Optional["CompletionListCapabilities"] = attrs.field(default=None) + """The client supports the following `CompletionList` specific + capabilities. - 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.""" + @since 3.17.0""" + # Since: 3.17.0 - commit_characters_support: Optional[bool] = attrs.field( + +@attrs.define +class HoverClientCapabilities: + dynamic_registration: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """Client supports commit characters on a completion item.""" + """Whether hover supports dynamic registration.""" - documentation_format: Optional[Sequence[MarkupKind]] = attrs.field(default=None) - """Client supports the following content formats for the documentation + content_format: Optional[Sequence[MarkupKind]] = attrs.field(default=None) + """Client supports the following content formats for the content property. The order describes the preferred format of the client.""" - deprecated_support: Optional[bool] = attrs.field( + +@attrs.define +class SignatureHelpClientCapabilities: + """Client Capabilities for a {@link SignatureHelpRequest}.""" + + dynamic_registration: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """Client supports the deprecated property on a completion item.""" + """Whether signature help supports dynamic registration.""" - preselect_support: Optional[bool] = attrs.field( + signature_information: Optional["ClientSignatureInformationOptions"] = attrs.field( + default=None + ) + """The client supports the following `SignatureInformation` + specific properties.""" + + context_support: Optional[bool] = attrs.field( validator=attrs.validators.optional(attrs.validators.instance_of(bool)), default=None, ) - """Client supports the preselect property on a completion item.""" - - 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""" - # 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""" - # Since: 3.16.0 - - resolve_support: Optional[ - "CompletionClientCapabilitiesCompletionItemTypeResolveSupportType" - ] = attrs.field(default=None) - """Indicates which properties a client can resolve lazily on a completion - item. Before version 3.16.0 only the predefined properties `documentation` - and `details` could be resolved lazily. - - @since 3.16.0""" - # Since: 3.16.0 - - insert_text_mode_support: Optional[ - "CompletionClientCapabilitiesCompletionItemTypeInsertTextModeSupportType" - ] = attrs.field(default=None) - """The client supports the `insertTextMode` property on - a completion item to override the whitespace handling mode - as defined by the client (see `insertTextMode`). - - @since 3.16.0""" - # Since: 3.16.0 - - label_details_support: Optional[bool] = attrs.field( - validator=attrs.validators.optional(attrs.validators.instance_of(bool)), - default=None, - ) - """The client has support for completion item label - details (see also `CompletionItemLabelDetails`). - - @since 3.17.0""" - # Since: 3.17.0 - - -@attrs.define -class CompletionClientCapabilitiesCompletionItemKindType: - value_set: Optional[Sequence[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. - - 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.""" - - -@attrs.define -class CompletionClientCapabilitiesCompletionListType: - item_defaults: Optional[Sequence[str]] = attrs.field(default=None) - """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 - - -@attrs.define -class CompletionClientCapabilities: - """Completion client capabilities""" - - dynamic_registration: Optional[bool] = attrs.field( - validator=attrs.validators.optional(attrs.validators.instance_of(bool)), - default=None, - ) - """Whether completion supports dynamic registration.""" - - completion_item: Optional[ - "CompletionClientCapabilitiesCompletionItemType" - ] = attrs.field(default=None) - """The client supports the following `CompletionItem` specific - capabilities.""" - - completion_item_kind: Optional[ - "CompletionClientCapabilitiesCompletionItemKindType" - ] = attrs.field(default=None) - - insert_text_mode: Optional[InsertTextMode] = attrs.field(default=None) - """Defines how the client handles whitespace and indentation - when accepting a completion item that uses multi line - text in either `insertText` or `textEdit`. - - @since 3.17.0""" - # Since: 3.17.0 - - context_support: Optional[bool] = attrs.field( - validator=attrs.validators.optional(attrs.validators.instance_of(bool)), - default=None, - ) - """The client supports to send additional context information for a - `textDocument/completion` request.""" - - completion_list: Optional[ - "CompletionClientCapabilitiesCompletionListType" - ] = attrs.field(default=None) - """The client supports the following `CompletionList` specific - capabilities. - - @since 3.17.0""" - # Since: 3.17.0 - - -@attrs.define -class HoverClientCapabilities: - dynamic_registration: Optional[bool] = attrs.field( - validator=attrs.validators.optional(attrs.validators.instance_of(bool)), - default=None, - ) - """Whether hover supports dynamic registration.""" - - content_format: Optional[Sequence[MarkupKind]] = attrs.field(default=None) - """Client supports the following content formats for the content - property. The order describes the preferred format of the client.""" - - -@attrs.define -class SignatureHelpClientCapabilitiesSignatureInformationTypeParameterInformationType: - label_offset_support: Optional[bool] = attrs.field( - 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""" - # Since: 3.14.0 - - -@attrs.define -class SignatureHelpClientCapabilitiesSignatureInformationType: - documentation_format: Optional[Sequence[MarkupKind]] = attrs.field(default=None) - """Client supports the following content formats for the documentation - property. The order describes the preferred format of the client.""" - - parameter_information: Optional[ - "SignatureHelpClientCapabilitiesSignatureInformationTypeParameterInformationType" - ] = attrs.field(default=None) - """Client capabilities specific to parameter information.""" - - active_parameter_support: Optional[bool] = attrs.field( - validator=attrs.validators.optional(attrs.validators.instance_of(bool)), - default=None, - ) - """The client supports the `activeParameter` property on `SignatureInformation` - literal. - - @since 3.16.0""" - # Since: 3.16.0 - - -@attrs.define -class SignatureHelpClientCapabilities: - """Client Capabilities for a {@link SignatureHelpRequest}.""" - - dynamic_registration: Optional[bool] = attrs.field( - validator=attrs.validators.optional(attrs.validators.instance_of(bool)), - default=None, - ) - """Whether signature help supports dynamic registration.""" - - signature_information: Optional[ - "SignatureHelpClientCapabilitiesSignatureInformationType" - ] = attrs.field(default=None) - """The client supports the following `SignatureInformation` - specific properties.""" - - context_support: Optional[bool] = attrs.field( - validator=attrs.validators.optional(attrs.validators.instance_of(bool)), - default=None, - ) - """The client supports to send additional context information for a - `textDocument/signatureHelp` request. A client that opts into - contextSupport will also support the `retriggerCharacters` on - `SignatureHelpOptions`. + """The client supports to send additional context information for a + `textDocument/signatureHelp` request. A client that opts into + contextSupport will also support the `retriggerCharacters` on + `SignatureHelpOptions`. @since 3.15.0""" # Since: 3.15.0 @@ -8123,25 +7927,6 @@ class DocumentHighlightClientCapabilities: """Whether document highlight supports dynamic registration.""" -@attrs.define -class DocumentSymbolClientCapabilitiesSymbolKindType: - value_set: Optional[Sequence[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 - 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.""" - - -@attrs.define -class DocumentSymbolClientCapabilitiesTagSupportType: - value_set: Sequence[SymbolTag] = attrs.field() - """The tags supported by the client.""" - - @attrs.define class DocumentSymbolClientCapabilities: """Client Capabilities for a {@link DocumentSymbolRequest}.""" @@ -8152,9 +7937,7 @@ class DocumentSymbolClientCapabilities: ) """Whether document symbol supports dynamic registration.""" - symbol_kind: Optional[ - "DocumentSymbolClientCapabilitiesSymbolKindType" - ] = attrs.field(default=None) + symbol_kind: Optional["ClientSymbolKindOptions"] = attrs.field(default=None) """Specific capabilities for the `SymbolKind` in the `textDocument/documentSymbol` request.""" @@ -8164,9 +7947,7 @@ class DocumentSymbolClientCapabilities: ) """The client supports hierarchical document symbols.""" - tag_support: Optional[ - "DocumentSymbolClientCapabilitiesTagSupportType" - ] = attrs.field(default=None) + tag_support: Optional["ClientSymbolTagOptions"] = attrs.field(default=None) """The client supports tags on `SymbolInformation`. Tags are supported on `DocumentSymbol` if `hierarchicalDocumentSymbolSupport` is set to true. Clients supporting tags have to handle unknown tags gracefully. @@ -8185,30 +7966,6 @@ class DocumentSymbolClientCapabilities: # Since: 3.16.0 -@attrs.define -class CodeActionClientCapabilitiesCodeActionLiteralSupportTypeCodeActionKindType: - value_set: Sequence[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.""" - - -@attrs.define -class CodeActionClientCapabilitiesCodeActionLiteralSupportType: - code_action_kind: "CodeActionClientCapabilitiesCodeActionLiteralSupportTypeCodeActionKindType" = ( - attrs.field() - ) - """The code action kind is support with the following value - set.""" - - -@attrs.define -class CodeActionClientCapabilitiesResolveSupportType: - properties: Sequence[str] = attrs.field() - """The properties that a client can resolve lazily.""" - - @attrs.define class CodeActionClientCapabilities: """The Client Capabilities of a {@link CodeActionRequest}.""" @@ -8220,7 +7977,7 @@ class CodeActionClientCapabilities: """Whether code action supports dynamic registration.""" code_action_literal_support: Optional[ - "CodeActionClientCapabilitiesCodeActionLiteralSupportType" + "ClientCodeActionLiteralOptions" ] = attrs.field(default=None) """The client support code action literals of type `CodeAction` as a valid response of the `textDocument/codeAction` request. If the property is not @@ -8258,9 +8015,9 @@ class CodeActionClientCapabilities: @since 3.16.0""" # Since: 3.16.0 - resolve_support: Optional[ - "CodeActionClientCapabilitiesResolveSupportType" - ] = attrs.field(default=None) + resolve_support: Optional["ClientCodeActionResolveOptions"] = attrs.field( + default=None + ) """Whether the client supports resolving additional code action properties via a separate `codeAction/resolve` request. @@ -8410,30 +8167,6 @@ class RenameClientCapabilities: # Since: 3.16.0 -@attrs.define -class FoldingRangeClientCapabilitiesFoldingRangeKindType: - value_set: Optional[Sequence[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.""" - - -@attrs.define -class FoldingRangeClientCapabilitiesFoldingRangeType: - collapsed_text: Optional[bool] = attrs.field( - 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""" - # Since: 3.17.0 - - @attrs.define class FoldingRangeClientCapabilities: dynamic_registration: Optional[bool] = attrs.field( @@ -8460,17 +8193,15 @@ class FoldingRangeClientCapabilities: If set, client will ignore specified `startCharacter` and `endCharacter` properties in a FoldingRange.""" - folding_range_kind: Optional[ - "FoldingRangeClientCapabilitiesFoldingRangeKindType" - ] = attrs.field(default=None) + folding_range_kind: Optional["ClientFoldingRangeKindOptions"] = attrs.field( + default=None + ) """Specific options for the folding range kind. @since 3.17.0""" # Since: 3.17.0 - folding_range: Optional[ - "FoldingRangeClientCapabilitiesFoldingRangeType" - ] = attrs.field(default=None) + folding_range: Optional["ClientFoldingRangeOptions"] = attrs.field(default=None) """Specific options for the folding range. @since 3.17.0""" @@ -8488,12 +8219,6 @@ class SelectionRangeClientCapabilities: capability as well.""" -@attrs.define -class PublishDiagnosticsClientCapabilitiesTagSupportType: - value_set: Sequence[DiagnosticTag] = attrs.field() - """The tags supported by the client.""" - - @attrs.define class PublishDiagnosticsClientCapabilities: """The publish diagnostic client capabilities.""" @@ -8504,9 +8229,7 @@ class PublishDiagnosticsClientCapabilities: ) """Whether the clients accepts diagnostics with related information.""" - tag_support: Optional[ - "PublishDiagnosticsClientCapabilitiesTagSupportType" - ] = attrs.field(default=None) + tag_support: Optional["ClientDiagnosticsTagOptions"] = 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. @@ -8560,35 +8283,12 @@ class CallHierarchyClientCapabilities: @attrs.define -class SemanticTokensClientCapabilitiesRequestsTypeFullType1: - delta: Optional[bool] = attrs.field( - 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.""" - +class SemanticTokensClientCapabilities: + """@since 3.16.0""" -@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.""" + # Since: 3.16.0 - 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.""" - - -@attrs.define -class SemanticTokensClientCapabilities: - """@since 3.16.0""" - - # Since: 3.16.0 - - requests: "SemanticTokensClientCapabilitiesRequestsType" = attrs.field() + requests: "ClientSemanticTokensRequestOptions" = 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 show semantic tokens or degrade some of the user experience if a range @@ -8720,12 +8420,6 @@ class InlineValueClientCapabilities: """Whether implementation supports dynamic registration for inline value providers.""" -@attrs.define -class InlayHintClientCapabilitiesResolveSupportType: - properties: Sequence[str] = attrs.field() - """The properties that a client can resolve lazily.""" - - @attrs.define class InlayHintClientCapabilities: """Inlay hint client capabilities. @@ -8740,9 +8434,9 @@ class InlayHintClientCapabilities: ) """Whether inlay hints support dynamic registration.""" - resolve_support: Optional[ - "InlayHintClientCapabilitiesResolveSupportType" - ] = attrs.field(default=None) + resolve_support: Optional["ClientInlayHintResolveOptions"] = attrs.field( + default=None + ) """Indicates which properties a client can resolve lazily on an inlay hint.""" @@ -8811,24 +8505,13 @@ class NotebookDocumentSyncClientCapabilities: """The client supports sending execution summary data per cell.""" -@attrs.define -class ShowMessageRequestClientCapabilitiesMessageActionItemType: - additional_properties_support: Optional[bool] = attrs.field( - 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.""" - - @attrs.define class ShowMessageRequestClientCapabilities: """Show message request client capabilities""" - message_action_item: Optional[ - "ShowMessageRequestClientCapabilitiesMessageActionItemType" - ] = attrs.field(default=None) + message_action_item: Optional["ClientShowMessageActionItemOptions"] = attrs.field( + default=None + ) """Capabilities specific to the `MessageActionItem` type.""" @@ -8845,6 +8528,23 @@ class ShowDocumentClientCapabilities: request.""" +@attrs.define +class StaleRequestSupportOptions: + """@since 3.18.0 + @proposed""" + + # Since: 3.18.0 + # Proposed + + cancel: bool = attrs.field(validator=attrs.validators.instance_of(bool)) + """The client will actively cancel the request.""" + + retry_on_content_modified: Sequence[str] = attrs.field() + """The list of requests for which the client + will retry the request if it receives a + response with error code `ContentModified`""" + + @attrs.define class RegularExpressionsClientCapabilities: """Client capabilities specific to regular expressions. @@ -8888,6 +8588,521 @@ class MarkdownClientCapabilities: # Since: 3.17.0 +@attrs.define +class NotebookCellLanguage: + """@since 3.18.0 + @proposed""" + + # Since: 3.18.0 + # Proposed + + language: str = attrs.field(validator=attrs.validators.instance_of(str)) + + +@attrs.define +class NotebookDocumentFilterNotebookType: + """A notebook document filter where `notebookType` is required field. + + @since 3.18.0 + @proposed""" + + # Since: 3.18.0 + # Proposed + + notebook_type: str = attrs.field(validator=attrs.validators.instance_of(str)) + """The type of the enclosing notebook.""" + + scheme: Optional[str] = attrs.field( + validator=attrs.validators.optional(attrs.validators.instance_of(str)), + default=None, + ) + """A Uri {@link Uri.scheme scheme}, like `file` or `untitled`.""" + + pattern: Optional[str] = attrs.field( + validator=attrs.validators.optional(attrs.validators.instance_of(str)), + default=None, + ) + """A glob pattern.""" + + +@attrs.define +class NotebookDocumentFilterScheme: + """A notebook document filter where `scheme` is required field. + + @since 3.18.0 + @proposed""" + + # Since: 3.18.0 + # Proposed + + scheme: str = attrs.field(validator=attrs.validators.instance_of(str)) + """A Uri {@link Uri.scheme scheme}, like `file` or `untitled`.""" + + notebook_type: Optional[str] = attrs.field( + validator=attrs.validators.optional(attrs.validators.instance_of(str)), + default=None, + ) + """The type of the enclosing notebook.""" + + pattern: Optional[str] = attrs.field( + validator=attrs.validators.optional(attrs.validators.instance_of(str)), + default=None, + ) + """A glob pattern.""" + + +@attrs.define +class NotebookDocumentFilterPattern: + """A notebook document filter where `pattern` is required field. + + @since 3.18.0 + @proposed""" + + # Since: 3.18.0 + # Proposed + + pattern: str = attrs.field(validator=attrs.validators.instance_of(str)) + """A glob pattern.""" + + notebook_type: Optional[str] = attrs.field( + validator=attrs.validators.optional(attrs.validators.instance_of(str)), + default=None, + ) + """The type of the enclosing notebook.""" + + scheme: Optional[str] = attrs.field( + validator=attrs.validators.optional(attrs.validators.instance_of(str)), + default=None, + ) + """A Uri {@link Uri.scheme scheme}, like `file` or `untitled`.""" + + +@attrs.define +class ChangeAnnotationsSupportOptions: + """@since 3.18.0 + @proposed""" + + # Since: 3.18.0 + # Proposed + + groups_on_label: Optional[bool] = attrs.field( + 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.""" + + +@attrs.define +class ClientSymbolKindOptions: + """@since 3.18.0 + @proposed""" + + # Since: 3.18.0 + # Proposed + + value_set: Optional[Sequence[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 + 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.""" + + +@attrs.define +class ClientSymbolTagOptions: + """@since 3.18.0 + @proposed""" + + # Since: 3.18.0 + # Proposed + + value_set: Sequence[SymbolTag] = attrs.field() + """The tags supported by the client.""" + + +@attrs.define +class ClientSymbolResolveOptions: + """@since 3.18.0 + @proposed""" + + # Since: 3.18.0 + # Proposed + + properties: Sequence[str] = attrs.field() + """The properties that a client can resolve lazily. Usually + `location.range`""" + + +@attrs.define +class ClientCompletionItemOptions: + """@since 3.18.0 + @proposed""" + + # Since: 3.18.0 + # Proposed + + snippet_support: Optional[bool] = attrs.field( + validator=attrs.validators.optional(attrs.validators.instance_of(bool)), + 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.""" + + commit_characters_support: Optional[bool] = attrs.field( + validator=attrs.validators.optional(attrs.validators.instance_of(bool)), + default=None, + ) + """Client supports commit characters on a completion item.""" + + documentation_format: Optional[Sequence[MarkupKind]] = attrs.field(default=None) + """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)), + default=None, + ) + """Client supports the deprecated property on a completion item.""" + + preselect_support: Optional[bool] = attrs.field( + validator=attrs.validators.optional(attrs.validators.instance_of(bool)), + default=None, + ) + """Client supports the preselect property on a completion item.""" + + tag_support: Optional["CompletionItemTagOptions"] = 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""" + # 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""" + # Since: 3.16.0 + + resolve_support: Optional["ClientCompletionItemResolveOptions"] = attrs.field( + default=None + ) + """Indicates which properties a client can resolve lazily on a completion + item. Before version 3.16.0 only the predefined properties `documentation` + and `details` could be resolved lazily. + + @since 3.16.0""" + # Since: 3.16.0 + + insert_text_mode_support: Optional[ + "ClientCompletionItemInsertTextModeOptions" + ] = attrs.field(default=None) + """The client supports the `insertTextMode` property on + a completion item to override the whitespace handling mode + as defined by the client (see `insertTextMode`). + + @since 3.16.0""" + # Since: 3.16.0 + + label_details_support: Optional[bool] = attrs.field( + validator=attrs.validators.optional(attrs.validators.instance_of(bool)), + default=None, + ) + """The client has support for completion item label + details (see also `CompletionItemLabelDetails`). + + @since 3.17.0""" + # Since: 3.17.0 + + +@attrs.define +class ClientCompletionItemOptionsKind: + """@since 3.18.0 + @proposed""" + + # Since: 3.18.0 + # Proposed + + value_set: Optional[Sequence[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. + + 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.""" + + +@attrs.define +class CompletionListCapabilities: + """The client supports the following `CompletionList` specific + capabilities. + + @since 3.17.0""" + + # Since: 3.17.0 + + item_defaults: Optional[Sequence[str]] = attrs.field(default=None) + """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 + + +@attrs.define +class ClientSignatureInformationOptions: + """@since 3.18.0 + @proposed""" + + # Since: 3.18.0 + # Proposed + + documentation_format: Optional[Sequence[MarkupKind]] = attrs.field(default=None) + """Client supports the following content formats for the documentation + property. The order describes the preferred format of the client.""" + + parameter_information: Optional[ + "ClientSignatureParameterInformationOptions" + ] = attrs.field(default=None) + """Client capabilities specific to parameter information.""" + + active_parameter_support: Optional[bool] = attrs.field( + validator=attrs.validators.optional(attrs.validators.instance_of(bool)), + default=None, + ) + """The client supports the `activeParameter` property on `SignatureInformation` + literal. + + @since 3.16.0""" + # Since: 3.16.0 + + +@attrs.define +class ClientCodeActionLiteralOptions: + """@since 3.18.0 + @proposed""" + + # Since: 3.18.0 + # Proposed + + code_action_kind: "ClientCodeActionKindOptions" = attrs.field() + """The code action kind is support with the following value + set.""" + + +@attrs.define +class ClientCodeActionResolveOptions: + """@since 3.18.0 + @proposed""" + + # Since: 3.18.0 + # Proposed + + properties: Sequence[str] = attrs.field() + """The properties that a client can resolve lazily.""" + + +@attrs.define +class ClientFoldingRangeKindOptions: + """@since 3.18.0 + @proposed""" + + # Since: 3.18.0 + # Proposed + + value_set: Optional[Sequence[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.""" + + +@attrs.define +class ClientFoldingRangeOptions: + """@since 3.18.0 + @proposed""" + + # Since: 3.18.0 + # Proposed + + collapsed_text: Optional[bool] = attrs.field( + 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""" + # Since: 3.17.0 + + +@attrs.define +class ClientDiagnosticsTagOptions: + """@since 3.18.0 + @proposed""" + + # Since: 3.18.0 + # Proposed + + value_set: Sequence[DiagnosticTag] = attrs.field() + """The tags supported by the client.""" + + +@attrs.define +class ClientSemanticTokensRequestOptions: + """@since 3.18.0 + @proposed""" + + # Since: 3.18.0 + # Proposed + + 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.""" + + full: Optional[Union[bool, "ClientSemanticTokensRequestFullDelta"]] = attrs.field( + default=None + ) + """The client will send the `textDocument/semanticTokens/full` request if + the server provides a corresponding handler.""" + + +@attrs.define +class ClientInlayHintResolveOptions: + """@since 3.18.0 + @proposed""" + + # Since: 3.18.0 + # Proposed + + properties: Sequence[str] = attrs.field() + """The properties that a client can resolve lazily.""" + + +@attrs.define +class ClientShowMessageActionItemOptions: + """@since 3.18.0 + @proposed""" + + # Since: 3.18.0 + # Proposed + + additional_properties_support: Optional[bool] = attrs.field( + 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.""" + + +@attrs.define +class CompletionItemTagOptions: + """@since 3.18.0 + @proposed""" + + # Since: 3.18.0 + # Proposed + + value_set: Sequence[CompletionItemTag] = attrs.field() + """The tags supported by the client.""" + + +@attrs.define +class ClientCompletionItemResolveOptions: + """@since 3.18.0 + @proposed""" + + # Since: 3.18.0 + # Proposed + + properties: Sequence[str] = attrs.field() + """The properties that a client can resolve lazily.""" + + +@attrs.define +class ClientCompletionItemInsertTextModeOptions: + """@since 3.18.0 + @proposed""" + + # Since: 3.18.0 + # Proposed + + value_set: Sequence[InsertTextMode] = attrs.field() + + +@attrs.define +class ClientSignatureParameterInformationOptions: + """@since 3.18.0 + @proposed""" + + # Since: 3.18.0 + # Proposed + + label_offset_support: Optional[bool] = attrs.field( + 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""" + # Since: 3.14.0 + + +@attrs.define +class ClientCodeActionKindOptions: + """@since 3.18.0 + @proposed""" + + # Since: 3.18.0 + # Proposed + + value_set: Sequence[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.""" + + +@attrs.define +class ClientSemanticTokensRequestFullDelta: + """@since 3.18.0 + @proposed""" + + # Since: 3.18.0 + # Proposed + + delta: Optional[bool] = attrs.field( + 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.""" + + @attrs.define class TextDocumentColorPresentationOptions: work_done_progress: Optional[bool] = attrs.field( @@ -12224,18 +12439,36 @@ def is_special_property(cls: type, property_name: str) -> bool: "CancelRequestNotification": CancelRequestNotification, "ChangeAnnotation": ChangeAnnotation, "ChangeAnnotationIdentifier": ChangeAnnotationIdentifier, + "ChangeAnnotationsSupportOptions": ChangeAnnotationsSupportOptions, "ClientCapabilities": ClientCapabilities, + "ClientCodeActionKindOptions": ClientCodeActionKindOptions, + "ClientCodeActionLiteralOptions": ClientCodeActionLiteralOptions, + "ClientCodeActionResolveOptions": ClientCodeActionResolveOptions, + "ClientCompletionItemInsertTextModeOptions": ClientCompletionItemInsertTextModeOptions, + "ClientCompletionItemOptions": ClientCompletionItemOptions, + "ClientCompletionItemOptionsKind": ClientCompletionItemOptionsKind, + "ClientCompletionItemResolveOptions": ClientCompletionItemResolveOptions, + "ClientDiagnosticsTagOptions": ClientDiagnosticsTagOptions, + "ClientFoldingRangeKindOptions": ClientFoldingRangeKindOptions, + "ClientFoldingRangeOptions": ClientFoldingRangeOptions, + "ClientInfo": ClientInfo, + "ClientInlayHintResolveOptions": ClientInlayHintResolveOptions, "ClientRegisterCapabilityRequest": ClientRegisterCapabilityRequest, "ClientRegisterCapabilityResponse": ClientRegisterCapabilityResponse, + "ClientSemanticTokensRequestFullDelta": ClientSemanticTokensRequestFullDelta, + "ClientSemanticTokensRequestOptions": ClientSemanticTokensRequestOptions, + "ClientShowMessageActionItemOptions": ClientShowMessageActionItemOptions, + "ClientSignatureInformationOptions": ClientSignatureInformationOptions, + "ClientSignatureParameterInformationOptions": ClientSignatureParameterInformationOptions, + "ClientSymbolKindOptions": ClientSymbolKindOptions, + "ClientSymbolResolveOptions": ClientSymbolResolveOptions, + "ClientSymbolTagOptions": ClientSymbolTagOptions, "ClientUnregisterCapabilityRequest": ClientUnregisterCapabilityRequest, "ClientUnregisterCapabilityResponse": ClientUnregisterCapabilityResponse, "CodeAction": CodeAction, "CodeActionClientCapabilities": CodeActionClientCapabilities, - "CodeActionClientCapabilitiesCodeActionLiteralSupportType": CodeActionClientCapabilitiesCodeActionLiteralSupportType, - "CodeActionClientCapabilitiesCodeActionLiteralSupportTypeCodeActionKindType": CodeActionClientCapabilitiesCodeActionLiteralSupportTypeCodeActionKindType, - "CodeActionClientCapabilitiesResolveSupportType": CodeActionClientCapabilitiesResolveSupportType, "CodeActionContext": CodeActionContext, - "CodeActionDisabledType": CodeActionDisabledType, + "CodeActionDisabled": CodeActionDisabled, "CodeActionKind": CodeActionKind, "CodeActionOptions": CodeActionOptions, "CodeActionParams": CodeActionParams, @@ -12258,27 +12491,20 @@ def is_special_property(cls: type, property_name: str) -> bool: "ColorPresentationParams": ColorPresentationParams, "Command": Command, "CompletionClientCapabilities": CompletionClientCapabilities, - "CompletionClientCapabilitiesCompletionItemKindType": CompletionClientCapabilitiesCompletionItemKindType, - "CompletionClientCapabilitiesCompletionItemType": CompletionClientCapabilitiesCompletionItemType, - "CompletionClientCapabilitiesCompletionItemTypeInsertTextModeSupportType": CompletionClientCapabilitiesCompletionItemTypeInsertTextModeSupportType, - "CompletionClientCapabilitiesCompletionItemTypeResolveSupportType": CompletionClientCapabilitiesCompletionItemTypeResolveSupportType, - "CompletionClientCapabilitiesCompletionItemTypeTagSupportType": CompletionClientCapabilitiesCompletionItemTypeTagSupportType, - "CompletionClientCapabilitiesCompletionListType": CompletionClientCapabilitiesCompletionListType, "CompletionContext": CompletionContext, "CompletionItem": CompletionItem, + "CompletionItemDefaults": CompletionItemDefaults, "CompletionItemKind": CompletionItemKind, "CompletionItemLabelDetails": CompletionItemLabelDetails, "CompletionItemResolveRequest": CompletionItemResolveRequest, "CompletionItemResolveResponse": CompletionItemResolveResponse, "CompletionItemTag": CompletionItemTag, + "CompletionItemTagOptions": CompletionItemTagOptions, "CompletionList": CompletionList, - "CompletionListItemDefaultsType": CompletionListItemDefaultsType, - "CompletionListItemDefaultsTypeEditRangeType1": CompletionListItemDefaultsTypeEditRangeType1, + "CompletionListCapabilities": CompletionListCapabilities, "CompletionOptions": CompletionOptions, - "CompletionOptionsCompletionItemType": CompletionOptionsCompletionItemType, "CompletionParams": CompletionParams, "CompletionRegistrationOptions": CompletionRegistrationOptions, - "CompletionRegistrationOptionsCompletionItemType": CompletionRegistrationOptionsCompletionItemType, "CompletionTriggerKind": CompletionTriggerKind, "ConfigurationItem": ConfigurationItem, "ConfigurationParams": ConfigurationParams, @@ -12362,11 +12588,10 @@ def is_special_property(cls: type, property_name: str) -> bool: "DocumentSelector": DocumentSelector, "DocumentSymbol": DocumentSymbol, "DocumentSymbolClientCapabilities": DocumentSymbolClientCapabilities, - "DocumentSymbolClientCapabilitiesSymbolKindType": DocumentSymbolClientCapabilitiesSymbolKindType, - "DocumentSymbolClientCapabilitiesTagSupportType": DocumentSymbolClientCapabilitiesTagSupportType, "DocumentSymbolOptions": DocumentSymbolOptions, "DocumentSymbolParams": DocumentSymbolParams, "DocumentSymbolRegistrationOptions": DocumentSymbolRegistrationOptions, + "EditRangeWithInsertReplace": EditRangeWithInsertReplace, "ErrorCodes": ErrorCodes, "ExecuteCommandClientCapabilities": ExecuteCommandClientCapabilities, "ExecuteCommandOptions": ExecuteCommandOptions, @@ -12390,8 +12615,6 @@ def is_special_property(cls: type, property_name: str) -> bool: "FileSystemWatcher": FileSystemWatcher, "FoldingRange": FoldingRange, "FoldingRangeClientCapabilities": FoldingRangeClientCapabilities, - "FoldingRangeClientCapabilitiesFoldingRangeKindType": FoldingRangeClientCapabilitiesFoldingRangeKindType, - "FoldingRangeClientCapabilitiesFoldingRangeType": FoldingRangeClientCapabilitiesFoldingRangeType, "FoldingRangeKind": FoldingRangeKind, "FoldingRangeOptions": FoldingRangeOptions, "FoldingRangeParams": FoldingRangeParams, @@ -12400,7 +12623,6 @@ def is_special_property(cls: type, property_name: str) -> bool: "FormattingOptions": FormattingOptions, "FullDocumentDiagnosticReport": FullDocumentDiagnosticReport, "GeneralClientCapabilities": GeneralClientCapabilities, - "GeneralClientCapabilitiesStaleRequestSupportType": GeneralClientCapabilitiesStaleRequestSupportType, "GlobPattern": GlobPattern, "Hover": Hover, "HoverClientCapabilities": HoverClientCapabilities, @@ -12413,16 +12635,13 @@ def is_special_property(cls: type, property_name: str) -> bool: "ImplementationRegistrationOptions": ImplementationRegistrationOptions, "InitializeError": InitializeError, "InitializeParams": InitializeParams, - "InitializeParamsClientInfoType": InitializeParamsClientInfoType, "InitializeRequest": InitializeRequest, "InitializeResponse": InitializeResponse, "InitializeResult": InitializeResult, - "InitializeResultServerInfoType": InitializeResultServerInfoType, "InitializedNotification": InitializedNotification, "InitializedParams": InitializedParams, "InlayHint": InlayHint, "InlayHintClientCapabilities": InlayHintClientCapabilities, - "InlayHintClientCapabilitiesResolveSupportType": InlayHintClientCapabilitiesResolveSupportType, "InlayHintKind": InlayHintKind, "InlayHintLabelPart": InlayHintLabelPart, "InlayHintOptions": InlayHintOptions, @@ -12463,12 +12682,13 @@ def is_special_property(cls: type, property_name: str) -> bool: "LinkedEditingRanges": LinkedEditingRanges, "Location": Location, "LocationLink": LocationLink, + "LocationUriOnly": LocationUriOnly, "LogMessageParams": LogMessageParams, "LogTraceNotification": LogTraceNotification, "LogTraceParams": LogTraceParams, "MarkdownClientCapabilities": MarkdownClientCapabilities, "MarkedString": MarkedString, - "MarkedString_Type1": MarkedString_Type1, + "MarkedStringWithLanguage": MarkedStringWithLanguage, "MarkupContent": MarkupContent, "MarkupKind": MarkupKind, "MessageActionItem": MessageActionItem, @@ -12483,50 +12703,44 @@ def is_special_property(cls: type, property_name: str) -> bool: "NotebookCell": NotebookCell, "NotebookCellArrayChange": NotebookCellArrayChange, "NotebookCellKind": NotebookCellKind, + "NotebookCellLanguage": NotebookCellLanguage, "NotebookCellTextDocumentFilter": NotebookCellTextDocumentFilter, "NotebookDocument": NotebookDocument, + "NotebookDocumentCellChangeStructure": NotebookDocumentCellChangeStructure, + "NotebookDocumentCellChanges": NotebookDocumentCellChanges, + "NotebookDocumentCellContentChanges": NotebookDocumentCellContentChanges, "NotebookDocumentChangeEvent": NotebookDocumentChangeEvent, - "NotebookDocumentChangeEventCellsType": NotebookDocumentChangeEventCellsType, - "NotebookDocumentChangeEventCellsTypeStructureType": NotebookDocumentChangeEventCellsTypeStructureType, - "NotebookDocumentChangeEventCellsTypeTextContentType": NotebookDocumentChangeEventCellsTypeTextContentType, "NotebookDocumentClientCapabilities": NotebookDocumentClientCapabilities, "NotebookDocumentDidChangeNotification": NotebookDocumentDidChangeNotification, "NotebookDocumentDidCloseNotification": NotebookDocumentDidCloseNotification, "NotebookDocumentDidOpenNotification": NotebookDocumentDidOpenNotification, "NotebookDocumentDidSaveNotification": NotebookDocumentDidSaveNotification, "NotebookDocumentFilter": NotebookDocumentFilter, - "NotebookDocumentFilter_Type1": NotebookDocumentFilter_Type1, - "NotebookDocumentFilter_Type2": NotebookDocumentFilter_Type2, - "NotebookDocumentFilter_Type3": NotebookDocumentFilter_Type3, + "NotebookDocumentFilterNotebookType": NotebookDocumentFilterNotebookType, + "NotebookDocumentFilterPattern": NotebookDocumentFilterPattern, + "NotebookDocumentFilterScheme": NotebookDocumentFilterScheme, + "NotebookDocumentFilterWithCells": NotebookDocumentFilterWithCells, + "NotebookDocumentFilterWithNotebook": NotebookDocumentFilterWithNotebook, "NotebookDocumentIdentifier": NotebookDocumentIdentifier, "NotebookDocumentSyncClientCapabilities": NotebookDocumentSyncClientCapabilities, "NotebookDocumentSyncOptions": NotebookDocumentSyncOptions, - "NotebookDocumentSyncOptionsNotebookSelectorType1": NotebookDocumentSyncOptionsNotebookSelectorType1, - "NotebookDocumentSyncOptionsNotebookSelectorType1CellsType": NotebookDocumentSyncOptionsNotebookSelectorType1CellsType, - "NotebookDocumentSyncOptionsNotebookSelectorType2": NotebookDocumentSyncOptionsNotebookSelectorType2, - "NotebookDocumentSyncOptionsNotebookSelectorType2CellsType": NotebookDocumentSyncOptionsNotebookSelectorType2CellsType, "NotebookDocumentSyncRegistrationOptions": NotebookDocumentSyncRegistrationOptions, - "NotebookDocumentSyncRegistrationOptionsNotebookSelectorType1": NotebookDocumentSyncRegistrationOptionsNotebookSelectorType1, - "NotebookDocumentSyncRegistrationOptionsNotebookSelectorType1CellsType": NotebookDocumentSyncRegistrationOptionsNotebookSelectorType1CellsType, - "NotebookDocumentSyncRegistrationOptionsNotebookSelectorType2": NotebookDocumentSyncRegistrationOptionsNotebookSelectorType2, - "NotebookDocumentSyncRegistrationOptionsNotebookSelectorType2CellsType": NotebookDocumentSyncRegistrationOptionsNotebookSelectorType2CellsType, "OptionalVersionedTextDocumentIdentifier": OptionalVersionedTextDocumentIdentifier, "ParameterInformation": ParameterInformation, "PartialResultParams": PartialResultParams, "Pattern": Pattern, "Position": Position, "PositionEncodingKind": PositionEncodingKind, + "PrepareRenameDefaultBehavior": PrepareRenameDefaultBehavior, "PrepareRenameParams": PrepareRenameParams, + "PrepareRenamePlaceholder": PrepareRenamePlaceholder, "PrepareRenameResult": PrepareRenameResult, - "PrepareRenameResult_Type1": PrepareRenameResult_Type1, - "PrepareRenameResult_Type2": PrepareRenameResult_Type2, "PrepareSupportDefaultBehavior": PrepareSupportDefaultBehavior, "PreviousResultId": PreviousResultId, "ProgressNotification": ProgressNotification, "ProgressParams": ProgressParams, "ProgressToken": ProgressToken, "PublishDiagnosticsClientCapabilities": PublishDiagnosticsClientCapabilities, - "PublishDiagnosticsClientCapabilitiesTagSupportType": PublishDiagnosticsClientCapabilitiesTagSupportType, "PublishDiagnosticsParams": PublishDiagnosticsParams, "Range": Range, "ReferenceClientCapabilities": ReferenceClientCapabilities, @@ -12562,23 +12776,21 @@ def is_special_property(cls: type, property_name: str) -> bool: "SemanticTokenTypes": SemanticTokenTypes, "SemanticTokens": SemanticTokens, "SemanticTokensClientCapabilities": SemanticTokensClientCapabilities, - "SemanticTokensClientCapabilitiesRequestsType": SemanticTokensClientCapabilitiesRequestsType, - "SemanticTokensClientCapabilitiesRequestsTypeFullType1": SemanticTokensClientCapabilitiesRequestsTypeFullType1, "SemanticTokensDelta": SemanticTokensDelta, "SemanticTokensDeltaParams": SemanticTokensDeltaParams, "SemanticTokensDeltaPartialResult": SemanticTokensDeltaPartialResult, "SemanticTokensEdit": SemanticTokensEdit, + "SemanticTokensFullDelta": SemanticTokensFullDelta, "SemanticTokensLegend": SemanticTokensLegend, "SemanticTokensOptions": SemanticTokensOptions, - "SemanticTokensOptionsFullType1": SemanticTokensOptionsFullType1, "SemanticTokensParams": SemanticTokensParams, "SemanticTokensPartialResult": SemanticTokensPartialResult, "SemanticTokensRangeParams": SemanticTokensRangeParams, "SemanticTokensRegistrationOptions": SemanticTokensRegistrationOptions, - "SemanticTokensRegistrationOptionsFullType1": SemanticTokensRegistrationOptionsFullType1, "SemanticTokensWorkspaceClientCapabilities": SemanticTokensWorkspaceClientCapabilities, "ServerCapabilities": ServerCapabilities, - "ServerCapabilitiesWorkspaceType": ServerCapabilitiesWorkspaceType, + "ServerCompletionItemOptions": ServerCompletionItemOptions, + "ServerInfo": ServerInfo, "SetTraceNotification": SetTraceNotification, "SetTraceParams": SetTraceParams, "ShowDocumentClientCapabilities": ShowDocumentClientCapabilities, @@ -12586,20 +12798,18 @@ def is_special_property(cls: type, property_name: str) -> bool: "ShowDocumentResult": ShowDocumentResult, "ShowMessageParams": ShowMessageParams, "ShowMessageRequestClientCapabilities": ShowMessageRequestClientCapabilities, - "ShowMessageRequestClientCapabilitiesMessageActionItemType": ShowMessageRequestClientCapabilitiesMessageActionItemType, "ShowMessageRequestParams": ShowMessageRequestParams, "ShutdownRequest": ShutdownRequest, "ShutdownResponse": ShutdownResponse, "SignatureHelp": SignatureHelp, "SignatureHelpClientCapabilities": SignatureHelpClientCapabilities, - "SignatureHelpClientCapabilitiesSignatureInformationType": SignatureHelpClientCapabilitiesSignatureInformationType, - "SignatureHelpClientCapabilitiesSignatureInformationTypeParameterInformationType": SignatureHelpClientCapabilitiesSignatureInformationTypeParameterInformationType, "SignatureHelpContext": SignatureHelpContext, "SignatureHelpOptions": SignatureHelpOptions, "SignatureHelpParams": SignatureHelpParams, "SignatureHelpRegistrationOptions": SignatureHelpRegistrationOptions, "SignatureHelpTriggerKind": SignatureHelpTriggerKind, "SignatureInformation": SignatureInformation, + "StaleRequestSupportOptions": StaleRequestSupportOptions, "StaticRegistrationOptions": StaticRegistrationOptions, "StringValue": StringValue, "SymbolInformation": SymbolInformation, @@ -12618,8 +12828,8 @@ def is_special_property(cls: type, property_name: str) -> bool: "TextDocumentCompletionRequest": TextDocumentCompletionRequest, "TextDocumentCompletionResponse": TextDocumentCompletionResponse, "TextDocumentContentChangeEvent": TextDocumentContentChangeEvent, - "TextDocumentContentChangeEvent_Type1": TextDocumentContentChangeEvent_Type1, - "TextDocumentContentChangeEvent_Type2": TextDocumentContentChangeEvent_Type2, + "TextDocumentContentChangePartial": TextDocumentContentChangePartial, + "TextDocumentContentChangeWholeDocument": TextDocumentContentChangeWholeDocument, "TextDocumentDeclarationRequest": TextDocumentDeclarationRequest, "TextDocumentDeclarationResponse": TextDocumentDeclarationResponse, "TextDocumentDefinitionRequest": TextDocumentDefinitionRequest, @@ -12640,9 +12850,9 @@ def is_special_property(cls: type, property_name: str) -> bool: "TextDocumentDocumentSymbolResponse": TextDocumentDocumentSymbolResponse, "TextDocumentEdit": TextDocumentEdit, "TextDocumentFilter": TextDocumentFilter, - "TextDocumentFilter_Type1": TextDocumentFilter_Type1, - "TextDocumentFilter_Type2": TextDocumentFilter_Type2, - "TextDocumentFilter_Type3": TextDocumentFilter_Type3, + "TextDocumentFilterLanguage": TextDocumentFilterLanguage, + "TextDocumentFilterPattern": TextDocumentFilterPattern, + "TextDocumentFilterScheme": TextDocumentFilterScheme, "TextDocumentFoldingRangeRequest": TextDocumentFoldingRangeRequest, "TextDocumentFoldingRangeResponse": TextDocumentFoldingRangeResponse, "TextDocumentFormattingRequest": TextDocumentFormattingRequest, @@ -12769,7 +12979,6 @@ def is_special_property(cls: type, property_name: str) -> bool: "WorkspaceDocumentDiagnosticReport": WorkspaceDocumentDiagnosticReport, "WorkspaceEdit": WorkspaceEdit, "WorkspaceEditClientCapabilities": WorkspaceEditClientCapabilities, - "WorkspaceEditClientCapabilitiesChangeAnnotationSupportType": WorkspaceEditClientCapabilitiesChangeAnnotationSupportType, "WorkspaceExecuteCommandRequest": WorkspaceExecuteCommandRequest, "WorkspaceExecuteCommandResponse": WorkspaceExecuteCommandResponse, "WorkspaceFolder": WorkspaceFolder, @@ -12783,14 +12992,11 @@ def is_special_property(cls: type, property_name: str) -> bool: "WorkspaceInlayHintRefreshResponse": WorkspaceInlayHintRefreshResponse, "WorkspaceInlineValueRefreshRequest": WorkspaceInlineValueRefreshRequest, "WorkspaceInlineValueRefreshResponse": WorkspaceInlineValueRefreshResponse, + "WorkspaceOptions": WorkspaceOptions, "WorkspaceSemanticTokensRefreshRequest": WorkspaceSemanticTokensRefreshRequest, "WorkspaceSemanticTokensRefreshResponse": WorkspaceSemanticTokensRefreshResponse, "WorkspaceSymbol": WorkspaceSymbol, "WorkspaceSymbolClientCapabilities": WorkspaceSymbolClientCapabilities, - "WorkspaceSymbolClientCapabilitiesResolveSupportType": WorkspaceSymbolClientCapabilitiesResolveSupportType, - "WorkspaceSymbolClientCapabilitiesSymbolKindType": WorkspaceSymbolClientCapabilitiesSymbolKindType, - "WorkspaceSymbolClientCapabilitiesTagSupportType": WorkspaceSymbolClientCapabilitiesTagSupportType, - "WorkspaceSymbolLocationType1": WorkspaceSymbolLocationType1, "WorkspaceSymbolOptions": WorkspaceSymbolOptions, "WorkspaceSymbolParams": WorkspaceSymbolParams, "WorkspaceSymbolRegistrationOptions": WorkspaceSymbolRegistrationOptions, diff --git a/packages/python/pyproject.toml b/packages/python/pyproject.toml index 999d175..dd6bc46 100644 --- a/packages/python/pyproject.toml +++ b/packages/python/pyproject.toml @@ -5,13 +5,13 @@ build-backend = "flit_core.buildapi" [project] name = "lsprotocol" description = 'Python implementation of the Language Server Protocol.' -version = "2023.0.0" +version = "2024.0.0a1" authors = [ { name = "Microsoft Corporation", email = "lsprotocol-help@microsoft.com" }, ] license = { file = "LICENSE" } readme = { "file" = "README.md", "content-type" = "text/markdown" } -requires-python = ">=3.7" +requires-python = ">=3.8" maintainers = [ { name = "Brett Cannon", email = "brett@python.org" }, { name = "Karthik Nadig", email = "kanadig@microsoft.com" }, @@ -20,7 +20,6 @@ classifiers = [ "Development Status :: 5 - Production/Stable", "License :: OSI Approved :: MIT License", "Programming Language :: Python", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", diff --git a/packages/python/requirements.txt b/packages/python/requirements.txt index 1475faa..f9d9405 100644 --- a/packages/python/requirements.txt +++ b/packages/python/requirements.txt @@ -1,8 +1,8 @@ # -# This file is autogenerated by pip-compile with Python 3.7 +# This file is autogenerated by pip-compile with Python 3.8 # by the following command: # -# pip-compile --config=pyproject.toml --generate-hashes --resolver=backtracking ./packages/python/requirements.in +# pip-compile --generate-hashes ./packages/python/requirements.in # attrs==23.1.0 \ --hash=sha256:1f28b4522cdc2fb4256ac1a020c78acf9cba2c6b461ccd2c126f3aa8e8335d04 \ @@ -18,17 +18,7 @@ exceptiongroup==1.1.3 \ --hash=sha256:097acd85d473d75af5bb98e41b61ff7fe35efe6675e4f9370ec6ec5126d160e9 \ --hash=sha256:343280667a4585d195ca1cf9cef84a4e178c4b6cf2274caef9859782b567d5e3 # via cattrs -importlib-metadata==6.7.0 \ - --hash=sha256:1aaf550d4f73e5d6783e7acb77aec43d49da8017410afae93822cc9cca98c4d4 \ - --hash=sha256:cb52082e659e97afc5dac71e79de97d8681de3aa07ff18578330904a9d18e5b5 - # via attrs -typing-extensions==4.7.1 \ - --hash=sha256:440d5dd3af93b060174bf433bccd69b0babc3b15b1a8dca43789fd7f61514b36 \ - --hash=sha256:b75ddc264f0ba5615db7ba217daeb99701ad295353c45f9e95963337ceeeffb2 - # via - # cattrs - # importlib-metadata -zipp==3.15.0 \ - --hash=sha256:112929ad649da941c23de50f356a2b5570c954b65150642bccdd66bf194d224b \ - --hash=sha256:48904fc76a60e542af151aded95726c1a5c34ed43ab4134b597665c86d7ad556 - # via importlib-metadata +typing-extensions==4.8.0 \ + --hash=sha256:8f92fc8806f9a6b641eaa5318da32b44d401efaac0f6678c9bc448ba3605faa0 \ + --hash=sha256:df8e4339e9cb77357558cbdbceca33c303714cf861d1eef15e1070055ae8b7ef + # via cattrs diff --git a/packages/rust/lsprotocol/Cargo.toml b/packages/rust/lsprotocol/Cargo.toml index 4d1ddc9..012d738 100644 --- a/packages/rust/lsprotocol/Cargo.toml +++ b/packages/rust/lsprotocol/Cargo.toml @@ -8,9 +8,15 @@ license = "MIT" repository = "https://github.com/microsoft/lsprotocol" readme = "README.md" +[features] +proposed=[] + [dependencies] serde = {version ="1.0.152", features = ["derive"]} serde_json = "1.0.93" serde_repr = "0.1.10" url = "2.3.1" rust_decimal = "1.29.1" + +[build] +rustflags = "--cfg proposed" \ No newline at end of file diff --git a/packages/rust/lsprotocol/src/lib.rs b/packages/rust/lsprotocol/src/lib.rs index d50af4b..8f81eed 100644 --- a/packages/rust/lsprotocol/src/lib.rs +++ b/packages/rust/lsprotocol/src/lib.rs @@ -334,10 +334,10 @@ pub enum LSPNotificationMethods { #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] pub enum MessageDirection { - #[serde(rename = "clientToServer")] - ClientToServer, #[serde(rename = "both")] Both, + #[serde(rename = "clientToServer")] + ClientToServer, #[serde(rename = "serverToClient")] ServerToClient, } @@ -477,7 +477,7 @@ pub enum DocumentDiagnosticReportKind { } /// Predefined error codes. -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[derive(PartialEq, Debug, Eq, Clone)] pub enum ErrorCodes { ParseError = -32700, @@ -495,8 +495,42 @@ pub enum ErrorCodes { UnknownErrorCode = -32001, } - -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +impl Serialize for ErrorCodes { + fn serialize(&self, serializer: S) -> Result + where + S: serde::Serializer, + { + match self { + ErrorCodes::ParseError => serializer.serialize_i32(-32700), + ErrorCodes::InvalidRequest => serializer.serialize_i32(-32600), + ErrorCodes::MethodNotFound => serializer.serialize_i32(-32601), + ErrorCodes::InvalidParams => serializer.serialize_i32(-32602), + ErrorCodes::InternalError => serializer.serialize_i32(-32603), + ErrorCodes::ServerNotInitialized => serializer.serialize_i32(-32002), + ErrorCodes::UnknownErrorCode => serializer.serialize_i32(-32001), + } + } +} +impl<'de> Deserialize<'de> for ErrorCodes { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + let value = i32::deserialize(deserializer)?; + match value { + -32700 => Ok(ErrorCodes::ParseError), + -32600 => Ok(ErrorCodes::InvalidRequest), + -32601 => Ok(ErrorCodes::MethodNotFound), + -32602 => Ok(ErrorCodes::InvalidParams), + -32603 => Ok(ErrorCodes::InternalError), + -32002 => Ok(ErrorCodes::ServerNotInitialized), + -32001 => Ok(ErrorCodes::UnknownErrorCode), + _ => Err(serde::de::Error::custom("Unexpected value")), + } + } +} + +#[derive(PartialEq, Debug, Eq, Clone)] pub enum LSPErrorCodes { /// A request failed but it was syntactically correct, e.g the /// method name was known and the parameters were valid. The error @@ -527,6 +561,34 @@ pub enum LSPErrorCodes { /// the cancel. RequestCancelled = -32800, } +impl Serialize for LSPErrorCodes { + fn serialize(&self, serializer: S) -> Result + where + S: serde::Serializer, + { + match self { + LSPErrorCodes::RequestFailed => serializer.serialize_i32(-32803), + LSPErrorCodes::ServerCancelled => serializer.serialize_i32(-32802), + LSPErrorCodes::ContentModified => serializer.serialize_i32(-32801), + LSPErrorCodes::RequestCancelled => serializer.serialize_i32(-32800), + } + } +} +impl<'de> Deserialize<'de> for LSPErrorCodes { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + let value = i32::deserialize(deserializer)?; + match value { + -32803 => Ok(LSPErrorCodes::RequestFailed), + -32802 => Ok(LSPErrorCodes::ServerCancelled), + -32801 => Ok(LSPErrorCodes::ContentModified), + -32800 => Ok(LSPErrorCodes::RequestCancelled), + _ => Err(serde::de::Error::custom("Unexpected value")), + } + } +} /// A set of predefined range kinds. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] @@ -545,7 +607,7 @@ pub enum FoldingRangeKind { } /// A symbol kind. -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[derive(PartialEq, Debug, Eq, Clone)] pub enum SymbolKind { File = 1, @@ -599,15 +661,109 @@ pub enum SymbolKind { TypeParameter = 26, } +impl Serialize for SymbolKind { + fn serialize(&self, serializer: S) -> Result + where + S: serde::Serializer, + { + match self { + SymbolKind::File => serializer.serialize_i32(1), + SymbolKind::Module => serializer.serialize_i32(2), + SymbolKind::Namespace => serializer.serialize_i32(3), + SymbolKind::Package => serializer.serialize_i32(4), + SymbolKind::Class => serializer.serialize_i32(5), + SymbolKind::Method => serializer.serialize_i32(6), + SymbolKind::Property => serializer.serialize_i32(7), + SymbolKind::Field => serializer.serialize_i32(8), + SymbolKind::Constructor => serializer.serialize_i32(9), + SymbolKind::Enum => serializer.serialize_i32(10), + SymbolKind::Interface => serializer.serialize_i32(11), + SymbolKind::Function => serializer.serialize_i32(12), + SymbolKind::Variable => serializer.serialize_i32(13), + SymbolKind::Constant => serializer.serialize_i32(14), + SymbolKind::String => serializer.serialize_i32(15), + SymbolKind::Number => serializer.serialize_i32(16), + SymbolKind::Boolean => serializer.serialize_i32(17), + SymbolKind::Array => serializer.serialize_i32(18), + SymbolKind::Object => serializer.serialize_i32(19), + SymbolKind::Key => serializer.serialize_i32(20), + SymbolKind::Null => serializer.serialize_i32(21), + SymbolKind::EnumMember => serializer.serialize_i32(22), + SymbolKind::Struct => serializer.serialize_i32(23), + SymbolKind::Event => serializer.serialize_i32(24), + SymbolKind::Operator => serializer.serialize_i32(25), + SymbolKind::TypeParameter => serializer.serialize_i32(26), + } + } +} +impl<'de> Deserialize<'de> for SymbolKind { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + let value = i32::deserialize(deserializer)?; + match value { + 1 => Ok(SymbolKind::File), + 2 => Ok(SymbolKind::Module), + 3 => Ok(SymbolKind::Namespace), + 4 => Ok(SymbolKind::Package), + 5 => Ok(SymbolKind::Class), + 6 => Ok(SymbolKind::Method), + 7 => Ok(SymbolKind::Property), + 8 => Ok(SymbolKind::Field), + 9 => Ok(SymbolKind::Constructor), + 10 => Ok(SymbolKind::Enum), + 11 => Ok(SymbolKind::Interface), + 12 => Ok(SymbolKind::Function), + 13 => Ok(SymbolKind::Variable), + 14 => Ok(SymbolKind::Constant), + 15 => Ok(SymbolKind::String), + 16 => Ok(SymbolKind::Number), + 17 => Ok(SymbolKind::Boolean), + 18 => Ok(SymbolKind::Array), + 19 => Ok(SymbolKind::Object), + 20 => Ok(SymbolKind::Key), + 21 => Ok(SymbolKind::Null), + 22 => Ok(SymbolKind::EnumMember), + 23 => Ok(SymbolKind::Struct), + 24 => Ok(SymbolKind::Event), + 25 => Ok(SymbolKind::Operator), + 26 => Ok(SymbolKind::TypeParameter), + _ => Err(serde::de::Error::custom("Unexpected value")), + } + } +} /// Symbol tags are extra annotations that tweak the rendering of a symbol. /// /// @since 3.16 -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[derive(PartialEq, Debug, Eq, Clone)] pub enum SymbolTag { /// Render a symbol as obsolete, usually using a strike-out. Deprecated = 1, } +impl Serialize for SymbolTag { + fn serialize(&self, serializer: S) -> Result + where + S: serde::Serializer, + { + match self { + SymbolTag::Deprecated => serializer.serialize_i32(1), + } + } +} +impl<'de> Deserialize<'de> for SymbolTag { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + let value = i32::deserialize(deserializer)?; + match value { + 1 => Ok(SymbolTag::Deprecated), + _ => Err(serde::de::Error::custom("Unexpected value")), + } + } +} /// Moniker uniqueness level to define scope of the moniker. /// @@ -657,7 +813,7 @@ pub enum MonikerKind { /// Inlay hint kinds. /// /// @since 3.17.0 -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[derive(PartialEq, Debug, Eq, Clone)] pub enum InlayHintKind { /// An inlay hint that for a type annotation. Type = 1, @@ -665,9 +821,33 @@ pub enum InlayHintKind { /// An inlay hint that is for a parameter. Parameter = 2, } +impl Serialize for InlayHintKind { + fn serialize(&self, serializer: S) -> Result + where + S: serde::Serializer, + { + match self { + InlayHintKind::Type => serializer.serialize_i32(1), + InlayHintKind::Parameter => serializer.serialize_i32(2), + } + } +} +impl<'de> Deserialize<'de> for InlayHintKind { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + let value = i32::deserialize(deserializer)?; + match value { + 1 => Ok(InlayHintKind::Type), + 2 => Ok(InlayHintKind::Parameter), + _ => Err(serde::de::Error::custom("Unexpected value")), + } + } +} /// The message type -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[derive(PartialEq, Debug, Eq, Clone)] pub enum MessageType { /// An error message. Error = 1, @@ -686,10 +866,40 @@ pub enum MessageType { /// @since 3.18.0 Debug = 5, } +impl Serialize for MessageType { + fn serialize(&self, serializer: S) -> Result + where + S: serde::Serializer, + { + match self { + MessageType::Error => serializer.serialize_i32(1), + MessageType::Warning => serializer.serialize_i32(2), + MessageType::Info => serializer.serialize_i32(3), + MessageType::Log => serializer.serialize_i32(4), + MessageType::Debug => serializer.serialize_i32(5), + } + } +} +impl<'de> Deserialize<'de> for MessageType { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + let value = i32::deserialize(deserializer)?; + match value { + 1 => Ok(MessageType::Error), + 2 => Ok(MessageType::Warning), + 3 => Ok(MessageType::Info), + 4 => Ok(MessageType::Log), + 5 => Ok(MessageType::Debug), + _ => Err(serde::de::Error::custom("Unexpected value")), + } + } +} /// Defines how the host (editor) should sync /// document changes to the language server. -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[derive(PartialEq, Debug, Eq, Clone)] pub enum TextDocumentSyncKind { /// Documents should not be synced at all. None = 0, @@ -703,9 +913,35 @@ pub enum TextDocumentSyncKind { /// send. Incremental = 2, } +impl Serialize for TextDocumentSyncKind { + fn serialize(&self, serializer: S) -> Result + where + S: serde::Serializer, + { + match self { + TextDocumentSyncKind::None => serializer.serialize_i32(0), + TextDocumentSyncKind::Full => serializer.serialize_i32(1), + TextDocumentSyncKind::Incremental => serializer.serialize_i32(2), + } + } +} +impl<'de> Deserialize<'de> for TextDocumentSyncKind { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + let value = i32::deserialize(deserializer)?; + match value { + 0 => Ok(TextDocumentSyncKind::None), + 1 => Ok(TextDocumentSyncKind::Full), + 2 => Ok(TextDocumentSyncKind::Incremental), + _ => Err(serde::de::Error::custom("Unexpected value")), + } + } +} /// Represents reasons why a text document is saved. -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[derive(PartialEq, Debug, Eq, Clone)] pub enum TextDocumentSaveReason { /// Manually triggered, e.g. by the user pressing save, by starting debugging, /// or by an API call. @@ -717,9 +953,35 @@ pub enum TextDocumentSaveReason { /// When the editor lost focus. FocusOut = 3, } +impl Serialize for TextDocumentSaveReason { + fn serialize(&self, serializer: S) -> Result + where + S: serde::Serializer, + { + match self { + TextDocumentSaveReason::Manual => serializer.serialize_i32(1), + TextDocumentSaveReason::AfterDelay => serializer.serialize_i32(2), + TextDocumentSaveReason::FocusOut => serializer.serialize_i32(3), + } + } +} +impl<'de> Deserialize<'de> for TextDocumentSaveReason { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + let value = i32::deserialize(deserializer)?; + match value { + 1 => Ok(TextDocumentSaveReason::Manual), + 2 => Ok(TextDocumentSaveReason::AfterDelay), + 3 => Ok(TextDocumentSaveReason::FocusOut), + _ => Err(serde::de::Error::custom("Unexpected value")), + } + } +} /// The kind of a completion entry. -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[derive(PartialEq, Debug, Eq, Clone)] pub enum CompletionItemKind { Text = 1, @@ -771,20 +1033,112 @@ pub enum CompletionItemKind { TypeParameter = 25, } +impl Serialize for CompletionItemKind { + fn serialize(&self, serializer: S) -> Result + where + S: serde::Serializer, + { + match self { + CompletionItemKind::Text => serializer.serialize_i32(1), + CompletionItemKind::Method => serializer.serialize_i32(2), + CompletionItemKind::Function => serializer.serialize_i32(3), + CompletionItemKind::Constructor => serializer.serialize_i32(4), + CompletionItemKind::Field => serializer.serialize_i32(5), + CompletionItemKind::Variable => serializer.serialize_i32(6), + CompletionItemKind::Class => serializer.serialize_i32(7), + CompletionItemKind::Interface => serializer.serialize_i32(8), + CompletionItemKind::Module => serializer.serialize_i32(9), + CompletionItemKind::Property => serializer.serialize_i32(10), + CompletionItemKind::Unit => serializer.serialize_i32(11), + CompletionItemKind::Value => serializer.serialize_i32(12), + CompletionItemKind::Enum => serializer.serialize_i32(13), + CompletionItemKind::Keyword => serializer.serialize_i32(14), + CompletionItemKind::Snippet => serializer.serialize_i32(15), + CompletionItemKind::Color => serializer.serialize_i32(16), + CompletionItemKind::File => serializer.serialize_i32(17), + CompletionItemKind::Reference => serializer.serialize_i32(18), + CompletionItemKind::Folder => serializer.serialize_i32(19), + CompletionItemKind::EnumMember => serializer.serialize_i32(20), + CompletionItemKind::Constant => serializer.serialize_i32(21), + CompletionItemKind::Struct => serializer.serialize_i32(22), + CompletionItemKind::Event => serializer.serialize_i32(23), + CompletionItemKind::Operator => serializer.serialize_i32(24), + CompletionItemKind::TypeParameter => serializer.serialize_i32(25), + } + } +} +impl<'de> Deserialize<'de> for CompletionItemKind { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + let value = i32::deserialize(deserializer)?; + match value { + 1 => Ok(CompletionItemKind::Text), + 2 => Ok(CompletionItemKind::Method), + 3 => Ok(CompletionItemKind::Function), + 4 => Ok(CompletionItemKind::Constructor), + 5 => Ok(CompletionItemKind::Field), + 6 => Ok(CompletionItemKind::Variable), + 7 => Ok(CompletionItemKind::Class), + 8 => Ok(CompletionItemKind::Interface), + 9 => Ok(CompletionItemKind::Module), + 10 => Ok(CompletionItemKind::Property), + 11 => Ok(CompletionItemKind::Unit), + 12 => Ok(CompletionItemKind::Value), + 13 => Ok(CompletionItemKind::Enum), + 14 => Ok(CompletionItemKind::Keyword), + 15 => Ok(CompletionItemKind::Snippet), + 16 => Ok(CompletionItemKind::Color), + 17 => Ok(CompletionItemKind::File), + 18 => Ok(CompletionItemKind::Reference), + 19 => Ok(CompletionItemKind::Folder), + 20 => Ok(CompletionItemKind::EnumMember), + 21 => Ok(CompletionItemKind::Constant), + 22 => Ok(CompletionItemKind::Struct), + 23 => Ok(CompletionItemKind::Event), + 24 => Ok(CompletionItemKind::Operator), + 25 => Ok(CompletionItemKind::TypeParameter), + _ => Err(serde::de::Error::custom("Unexpected value")), + } + } +} /// Completion item tags are extra annotations that tweak the rendering of a completion /// item. /// /// @since 3.15.0 -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[derive(PartialEq, Debug, Eq, Clone)] pub enum CompletionItemTag { /// Render a completion as obsolete, usually using a strike-out. Deprecated = 1, } +impl Serialize for CompletionItemTag { + fn serialize(&self, serializer: S) -> Result + where + S: serde::Serializer, + { + match self { + CompletionItemTag::Deprecated => serializer.serialize_i32(1), + } + } +} +impl<'de> Deserialize<'de> for CompletionItemTag { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + let value = i32::deserialize(deserializer)?; + match value { + 1 => Ok(CompletionItemTag::Deprecated), + _ => Err(serde::de::Error::custom("Unexpected value")), + } + } +} /// Defines whether the insert text in a completion item should be interpreted as /// plain text or a snippet. -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[derive(PartialEq, Debug, Eq, Clone)] pub enum InsertTextFormat { /// The primary text to be inserted is treated as a plain string. PlainText = 1, @@ -799,12 +1153,36 @@ pub enum InsertTextFormat { /// See also: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#snippet_syntax Snippet = 2, } +impl Serialize for InsertTextFormat { + fn serialize(&self, serializer: S) -> Result + where + S: serde::Serializer, + { + match self { + InsertTextFormat::PlainText => serializer.serialize_i32(1), + InsertTextFormat::Snippet => serializer.serialize_i32(2), + } + } +} +impl<'de> Deserialize<'de> for InsertTextFormat { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + let value = i32::deserialize(deserializer)?; + match value { + 1 => Ok(InsertTextFormat::PlainText), + 2 => Ok(InsertTextFormat::Snippet), + _ => Err(serde::de::Error::custom("Unexpected value")), + } + } +} /// How whitespace and indentation is handled during completion /// item insertion. /// /// @since 3.16.0 -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[derive(PartialEq, Debug, Eq, Clone)] pub enum InsertTextMode { /// The insertion or replace strings is taken as it is. If the /// value is multi line the lines below the cursor will be @@ -822,9 +1200,33 @@ pub enum InsertTextMode { /// following lines inserted will be indented using 2 tabs as well. AdjustIndentation = 2, } +impl Serialize for InsertTextMode { + fn serialize(&self, serializer: S) -> Result + where + S: serde::Serializer, + { + match self { + InsertTextMode::AsIs => serializer.serialize_i32(1), + InsertTextMode::AdjustIndentation => serializer.serialize_i32(2), + } + } +} +impl<'de> Deserialize<'de> for InsertTextMode { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + let value = i32::deserialize(deserializer)?; + match value { + 1 => Ok(InsertTextMode::AsIs), + 2 => Ok(InsertTextMode::AdjustIndentation), + _ => Err(serde::de::Error::custom("Unexpected value")), + } + } +} /// A document highlight kind. -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[derive(PartialEq, Debug, Eq, Clone)] pub enum DocumentHighlightKind { /// A textual occurrence. Text = 1, @@ -835,6 +1237,32 @@ pub enum DocumentHighlightKind { /// Write-access of a symbol, like writing to a variable. Write = 3, } +impl Serialize for DocumentHighlightKind { + fn serialize(&self, serializer: S) -> Result + where + S: serde::Serializer, + { + match self { + DocumentHighlightKind::Text => serializer.serialize_i32(1), + DocumentHighlightKind::Read => serializer.serialize_i32(2), + DocumentHighlightKind::Write => serializer.serialize_i32(3), + } + } +} +impl<'de> Deserialize<'de> for DocumentHighlightKind { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + let value = i32::deserialize(deserializer)?; + match value { + 1 => Ok(DocumentHighlightKind::Text), + 2 => Ok(DocumentHighlightKind::Read), + 3 => Ok(DocumentHighlightKind::Write), + _ => Err(serde::de::Error::custom("Unexpected value")), + } + } +} /// A set of predefined code action kinds #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] @@ -942,8 +1370,8 @@ pub enum MarkupKind { /// /// @since 3.18.0 /// @proposed -#[cfg(feature = "proposed", since = "3.18.0")] -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[cfg(feature = "proposed")] +#[derive(PartialEq, Debug, Eq, Clone)] pub enum InlineCompletionTriggerKind { /// Completion was triggered explicitly by a user gesture. Invoked = 0, @@ -951,6 +1379,30 @@ pub enum InlineCompletionTriggerKind { /// Completion was triggered automatically while editing. Automatic = 1, } +impl Serialize for InlineCompletionTriggerKind { + fn serialize(&self, serializer: S) -> Result + where + S: serde::Serializer, + { + match self { + InlineCompletionTriggerKind::Invoked => serializer.serialize_i32(0), + InlineCompletionTriggerKind::Automatic => serializer.serialize_i32(1), + } + } +} +impl<'de> Deserialize<'de> for InlineCompletionTriggerKind { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + let value = i32::deserialize(deserializer)?; + match value { + 0 => Ok(InlineCompletionTriggerKind::Invoked), + 1 => Ok(InlineCompletionTriggerKind::Automatic), + _ => Err(serde::de::Error::custom("Unexpected value")), + } + } +} /// A set of predefined position encoding kinds. /// @@ -978,7 +1430,7 @@ pub enum PositionEncodingKind { } /// The file event type -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[derive(PartialEq, Debug, Eq, Clone)] pub enum FileChangeType { /// The file got created. Created = 1, @@ -989,8 +1441,34 @@ pub enum FileChangeType { /// The file got deleted. Deleted = 3, } - -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +impl Serialize for FileChangeType { + fn serialize(&self, serializer: S) -> Result + where + S: serde::Serializer, + { + match self { + FileChangeType::Created => serializer.serialize_i32(1), + FileChangeType::Changed => serializer.serialize_i32(2), + FileChangeType::Deleted => serializer.serialize_i32(3), + } + } +} +impl<'de> Deserialize<'de> for FileChangeType { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + let value = i32::deserialize(deserializer)?; + match value { + 1 => Ok(FileChangeType::Created), + 2 => Ok(FileChangeType::Changed), + 3 => Ok(FileChangeType::Deleted), + _ => Err(serde::de::Error::custom("Unexpected value")), + } + } +} + +#[derive(PartialEq, Debug, Eq, Clone)] pub enum WatchKind { /// Interested in create events. Create = 1, @@ -1001,9 +1479,35 @@ pub enum WatchKind { /// Interested in delete events Delete = 4, } +impl Serialize for WatchKind { + fn serialize(&self, serializer: S) -> Result + where + S: serde::Serializer, + { + match self { + WatchKind::Create => serializer.serialize_i32(1), + WatchKind::Change => serializer.serialize_i32(2), + WatchKind::Delete => serializer.serialize_i32(4), + } + } +} +impl<'de> Deserialize<'de> for WatchKind { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + let value = i32::deserialize(deserializer)?; + match value { + 1 => Ok(WatchKind::Create), + 2 => Ok(WatchKind::Change), + 4 => Ok(WatchKind::Delete), + _ => Err(serde::de::Error::custom("Unexpected value")), + } + } +} /// The diagnostic's severity. -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[derive(PartialEq, Debug, Eq, Clone)] pub enum DiagnosticSeverity { /// Reports an error. Error = 1, @@ -1017,11 +1521,39 @@ pub enum DiagnosticSeverity { /// Reports a hint. Hint = 4, } +impl Serialize for DiagnosticSeverity { + fn serialize(&self, serializer: S) -> Result + where + S: serde::Serializer, + { + match self { + DiagnosticSeverity::Error => serializer.serialize_i32(1), + DiagnosticSeverity::Warning => serializer.serialize_i32(2), + DiagnosticSeverity::Information => serializer.serialize_i32(3), + DiagnosticSeverity::Hint => serializer.serialize_i32(4), + } + } +} +impl<'de> Deserialize<'de> for DiagnosticSeverity { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + let value = i32::deserialize(deserializer)?; + match value { + 1 => Ok(DiagnosticSeverity::Error), + 2 => Ok(DiagnosticSeverity::Warning), + 3 => Ok(DiagnosticSeverity::Information), + 4 => Ok(DiagnosticSeverity::Hint), + _ => Err(serde::de::Error::custom("Unexpected value")), + } + } +} /// The diagnostic tags. /// /// @since 3.15.0 -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[derive(PartialEq, Debug, Eq, Clone)] pub enum DiagnosticTag { /// Unused or unnecessary code. /// @@ -1034,9 +1566,33 @@ pub enum DiagnosticTag { /// Clients are allowed to rendered diagnostics with this tag strike through. Deprecated = 2, } +impl Serialize for DiagnosticTag { + fn serialize(&self, serializer: S) -> Result + where + S: serde::Serializer, + { + match self { + DiagnosticTag::Unnecessary => serializer.serialize_i32(1), + DiagnosticTag::Deprecated => serializer.serialize_i32(2), + } + } +} +impl<'de> Deserialize<'de> for DiagnosticTag { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + let value = i32::deserialize(deserializer)?; + match value { + 1 => Ok(DiagnosticTag::Unnecessary), + 2 => Ok(DiagnosticTag::Deprecated), + _ => Err(serde::de::Error::custom("Unexpected value")), + } + } +} /// How a completion was triggered -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[derive(PartialEq, Debug, Eq, Clone)] pub enum CompletionTriggerKind { /// Completion was triggered by typing an identifier (24x7 code /// complete), manual invocation (e.g Ctrl+Space) or via API. @@ -1049,11 +1605,37 @@ pub enum CompletionTriggerKind { /// Completion was re-triggered as current completion list is incomplete TriggerForIncompleteCompletions = 3, } +impl Serialize for CompletionTriggerKind { + fn serialize(&self, serializer: S) -> Result + where + S: serde::Serializer, + { + match self { + CompletionTriggerKind::Invoked => serializer.serialize_i32(1), + CompletionTriggerKind::TriggerCharacter => serializer.serialize_i32(2), + CompletionTriggerKind::TriggerForIncompleteCompletions => serializer.serialize_i32(3), + } + } +} +impl<'de> Deserialize<'de> for CompletionTriggerKind { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + let value = i32::deserialize(deserializer)?; + match value { + 1 => Ok(CompletionTriggerKind::Invoked), + 2 => Ok(CompletionTriggerKind::TriggerCharacter), + 3 => Ok(CompletionTriggerKind::TriggerForIncompleteCompletions), + _ => Err(serde::de::Error::custom("Unexpected value")), + } + } +} /// How a signature help was triggered. /// /// @since 3.15.0 -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[derive(PartialEq, Debug, Eq, Clone)] pub enum SignatureHelpTriggerKind { /// Signature help was invoked manually by the user or by a command. Invoked = 1, @@ -1064,11 +1646,37 @@ pub enum SignatureHelpTriggerKind { /// Signature help was triggered by the cursor moving or by the document content changing. ContentChange = 3, } +impl Serialize for SignatureHelpTriggerKind { + fn serialize(&self, serializer: S) -> Result + where + S: serde::Serializer, + { + match self { + SignatureHelpTriggerKind::Invoked => serializer.serialize_i32(1), + SignatureHelpTriggerKind::TriggerCharacter => serializer.serialize_i32(2), + SignatureHelpTriggerKind::ContentChange => serializer.serialize_i32(3), + } + } +} +impl<'de> Deserialize<'de> for SignatureHelpTriggerKind { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + let value = i32::deserialize(deserializer)?; + match value { + 1 => Ok(SignatureHelpTriggerKind::Invoked), + 2 => Ok(SignatureHelpTriggerKind::TriggerCharacter), + 3 => Ok(SignatureHelpTriggerKind::ContentChange), + _ => Err(serde::de::Error::custom("Unexpected value")), + } + } +} /// The reason why code actions were requested. /// /// @since 3.17.0 -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[derive(PartialEq, Debug, Eq, Clone)] pub enum CodeActionTriggerKind { /// Code actions were explicitly requested by the user or by an extension. Invoked = 1, @@ -1079,6 +1687,30 @@ pub enum CodeActionTriggerKind { /// also be triggered when file content changes. Automatic = 2, } +impl Serialize for CodeActionTriggerKind { + fn serialize(&self, serializer: S) -> Result + where + S: serde::Serializer, + { + match self { + CodeActionTriggerKind::Invoked => serializer.serialize_i32(1), + CodeActionTriggerKind::Automatic => serializer.serialize_i32(2), + } + } +} +impl<'de> Deserialize<'de> for CodeActionTriggerKind { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + let value = i32::deserialize(deserializer)?; + match value { + 1 => Ok(CodeActionTriggerKind::Invoked), + 2 => Ok(CodeActionTriggerKind::Automatic), + _ => Err(serde::de::Error::custom("Unexpected value")), + } + } +} /// A pattern kind describing if a glob pattern matches a file a folder or /// both. @@ -1098,7 +1730,7 @@ pub enum FileOperationPatternKind { /// A notebook cell kind. /// /// @since 3.17.0 -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[derive(PartialEq, Debug, Eq, Clone)] pub enum NotebookCellKind { /// A markup-cell is formatted source that is used for display. Markup = 1, @@ -1106,6 +1738,30 @@ pub enum NotebookCellKind { /// A code-cell is source code. Code = 2, } +impl Serialize for NotebookCellKind { + fn serialize(&self, serializer: S) -> Result + where + S: serde::Serializer, + { + match self { + NotebookCellKind::Markup => serializer.serialize_i32(1), + NotebookCellKind::Code => serializer.serialize_i32(2), + } + } +} +impl<'de> Deserialize<'de> for NotebookCellKind { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + let value = i32::deserialize(deserializer)?; + match value { + 1 => Ok(NotebookCellKind::Markup), + 2 => Ok(NotebookCellKind::Code), + _ => Err(serde::de::Error::custom("Unexpected value")), + } + } +} #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] pub enum ResourceOperationKind { @@ -1146,12 +1802,34 @@ pub enum FailureHandlingKind { Undo, } -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[derive(PartialEq, Debug, Eq, Clone)] pub enum PrepareSupportDefaultBehavior { /// The client's default behavior is to select the identifier /// according the to language's syntax rule. Identifier = 1, } +impl Serialize for PrepareSupportDefaultBehavior { + fn serialize(&self, serializer: S) -> Result + where + S: serde::Serializer, + { + match self { + PrepareSupportDefaultBehavior::Identifier => serializer.serialize_i32(1), + } + } +} +impl<'de> Deserialize<'de> for PrepareSupportDefaultBehavior { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + let value = i32::deserialize(deserializer)?; + match value { + 1 => Ok(PrepareSupportDefaultBehavior::Identifier), + _ => Err(serde::de::Error::custom("Unexpected value")), + } + } +} #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] pub enum TokenFormat { @@ -1224,26 +1902,12 @@ pub enum DocumentDiagnosticReport { Unchanged(RelatedUnchangedDocumentDiagnosticReport), } -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct StructPrepareRenameResult { - pub range: Range, - - pub placeholder: String, -} - -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct StructPrepareRenameResultDefault { - pub default_behavior: bool, -} - #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] #[serde(untagged)] pub enum PrepareRenameResult { Range(Range), - Placeholder(StructPrepareRenameResult), - Default(StructPrepareRenameResultDefault), + PrepareRenamePlaceholder(PrepareRenamePlaceholder), + DefaultBehavior(PrepareRenameDefaultBehavior), } /// A document selector is the combination of one or many document filters. @@ -1273,43 +1937,13 @@ pub enum WorkspaceDocumentDiagnosticReport { Unchanged(WorkspaceUnchangedDocumentDiagnosticReport), } -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct StructTextDocumentContentChangeEvent { - /// The range of the document that changed. - pub range: Range, - - /// The optional length of the range that got replaced. - /// - /// @deprecated use range instead. - pub range_length: Option, - - /// The new text for the provided range. - pub text: String, -} - -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct StructTextDocumentContentChangeEventText { - /// The new text of the whole document. - pub text: String, -} - /// 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. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] #[serde(untagged)] pub enum TextDocumentContentChangeEvent { - Range(StructTextDocumentContentChangeEvent), - Text(StructTextDocumentContentChangeEventText), -} - -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct StructMarkedString { - pub language: String, - - pub value: String, + Partial(TextDocumentContentChangePartial), + Whole(TextDocumentContentChangeWholeDocument), } /// MarkedString can be used to render human readable text. It is either a markdown string @@ -1329,7 +1963,7 @@ pub struct StructMarkedString { #[serde(untagged)] pub enum MarkedString { String(String), - MarkedString(StructMarkedString), + MarkedStringWithLanguage(MarkedStringWithLanguage), } /// A document filter describes a top level text document or @@ -1353,45 +1987,6 @@ pub enum GlobPattern { Relative(RelativePattern), } -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct StructTextDocumentFilter { - /// A language id, like `typescript`. - pub language: String, - - /// A Uri [scheme][`Uri::scheme`], like `file` or `untitled`. - pub scheme: Option, - - /// A glob pattern, like **​/*.{ts,js}. See TextDocumentFilter for examples. - pub pattern: Option, -} - -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct StructTextDocumentFilterScheme { - /// A language id, like `typescript`. - pub language: Option, - - /// A Uri [scheme][`Uri::scheme`], like `file` or `untitled`. - pub scheme: String, - - /// A glob pattern, like **​/*.{ts,js}. See TextDocumentFilter for examples. - pub pattern: Option, -} - -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct StructTextDocumentFilterPattern { - /// A language id, like `typescript`. - pub language: Option, - - /// A Uri [scheme][`Uri::scheme`], like `file` or `untitled`. - pub scheme: Option, - - /// A glob pattern, like **​/*.{ts,js}. See TextDocumentFilter for examples. - pub pattern: String, -} - /// A document filter denotes a document by different properties like /// the [language][`TextDocument::languageId`], the [scheme][`Uri::scheme`] of /// its resource, or a glob-pattern that is applied to the [path][`TextDocument::fileName`]. @@ -1411,61 +2006,9 @@ pub struct StructTextDocumentFilterPattern { #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] #[serde(untagged)] pub enum TextDocumentFilter { - Language(StructTextDocumentFilter), - Scheme(StructTextDocumentFilterScheme), - Pattern(StructTextDocumentFilterPattern), -} - -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct StructNotebookDocumentFilter { - /// The type of the enclosing notebook. - pub notebook_type: String, - - /// A Uri [scheme][`Uri::scheme`], like `file` or `untitled`. - pub scheme: Option, - - /// A glob pattern. - pub pattern: Option, -} - -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct StructNotebookDocumentFilterScheme { - /// The type of the enclosing notebook. - pub notebook_type: Option, - - /// A Uri [scheme][`Uri::scheme`], like `file` or `untitled`. - pub scheme: String, - - /// A glob pattern. - pub pattern: Option, -} - -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct StructNotebookDocumentFilterPattern { - /// The type of the enclosing notebook. - pub notebook_type: Option, - - /// A Uri [scheme][`Uri::scheme`], like `file` or `untitled`. - pub scheme: Option, - - /// A glob pattern. - pub pattern: String, -} - -/// 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 -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(untagged)] -pub enum NotebookDocumentFilter { - Type(StructNotebookDocumentFilter), - Scheme(StructNotebookDocumentFilterScheme), - Pattern(StructNotebookDocumentFilterPattern), + Language(TextDocumentFilterLanguage), + Scheme(TextDocumentFilterScheme), + Pattern(TextDocumentFilterPattern), } /// The glob pattern to watch relative to the base path. Glob patterns can have the following syntax: @@ -1479,8 +2022,21 @@ pub enum NotebookDocumentFilter { /// @since 3.17.0 pub type Pattern = String; +/// 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 +#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[serde(untagged)] +pub enum NotebookDocumentFilter { + Type(NotebookDocumentFilterNotebookType), + Scheme(NotebookDocumentFilterScheme), + Pattern(NotebookDocumentFilterPattern), +} + #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct ImplementationParams { /// An optional token that a server can use to report partial results (e.g. streaming) to /// the client. @@ -1499,7 +2055,7 @@ pub struct ImplementationParams { /// Represents a location inside a resource, such as a line /// inside a text file. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct Location { pub range: Range, @@ -1507,7 +2063,7 @@ pub struct Location { } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct ImplementationRegistrationOptions { /// 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. @@ -1517,10 +2073,12 @@ pub struct ImplementationRegistrationOptions { /// The id used to register the request. The id can be used to deregister /// the request again. See also Registration#id. pub id: Option, + + pub work_done_progress: Option, } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TypeDefinitionParams { /// An optional token that a server can use to report partial results (e.g. streaming) to /// the client. @@ -1537,7 +2095,7 @@ pub struct TypeDefinitionParams { } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TypeDefinitionRegistrationOptions { /// 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. @@ -1547,11 +2105,13 @@ pub struct TypeDefinitionRegistrationOptions { /// The id used to register the request. The id can be used to deregister /// the request again. See also Registration#id. pub id: Option, + + pub work_done_progress: Option, } /// A workspace folder inside a client. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WorkspaceFolder { /// The name of the workspace folder. Used to refer to this /// workspace folder in the user interface. @@ -1563,7 +2123,7 @@ pub struct WorkspaceFolder { /// The parameters of a `workspace/didChangeWorkspaceFolders` notification. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DidChangeWorkspaceFoldersParams { /// The actual workspace folder change event. pub event: WorkspaceFoldersChangeEvent, @@ -1571,14 +2131,14 @@ pub struct DidChangeWorkspaceFoldersParams { /// The parameters of a configuration request. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct ConfigurationParams { pub items: Vec, } /// Parameters for a [DocumentColorRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DocumentColorParams { /// An optional token that a server can use to report partial results (e.g. streaming) to /// the client. @@ -1593,7 +2153,7 @@ pub struct DocumentColorParams { /// Represents a color range from a document. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct ColorInformation { /// The actual color value for this color range. pub color: Color, @@ -1603,7 +2163,7 @@ pub struct ColorInformation { } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DocumentColorRegistrationOptions { /// 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. @@ -1613,11 +2173,13 @@ pub struct DocumentColorRegistrationOptions { /// The id used to register the request. The id can be used to deregister /// the request again. See also Registration#id. pub id: Option, + + pub work_done_progress: Option, } /// Parameters for a [ColorPresentationRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct ColorPresentationParams { /// The color to request presentations for. pub color: Color, @@ -1637,7 +2199,7 @@ pub struct ColorPresentationParams { } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct ColorPresentation { /// An optional array of additional [text edits][TextEdit] that are applied when /// selecting this color presentation. Edits must not overlap with the main [edit][`ColorPresentation::textEdit`] nor with themselves. @@ -1655,14 +2217,14 @@ pub struct ColorPresentation { } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WorkDoneProgressOptions { pub work_done_progress: Option, } /// General text document registration options. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentRegistrationOptions { /// 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. @@ -1672,7 +2234,7 @@ pub struct TextDocumentRegistrationOptions { /// Parameters for a [FoldingRangeRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct FoldingRangeParams { /// An optional token that a server can use to report partial results (e.g. streaming) to /// the client. @@ -1688,7 +2250,7 @@ pub struct FoldingRangeParams { /// 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. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct FoldingRange { /// The text that the client should show when the specified range is /// collapsed. If not defined or not supported by the client, a default @@ -1718,7 +2280,7 @@ pub struct FoldingRange { } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct FoldingRangeRegistrationOptions { /// 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. @@ -1728,10 +2290,12 @@ pub struct FoldingRangeRegistrationOptions { /// The id used to register the request. The id can be used to deregister /// the request again. See also Registration#id. pub id: Option, + + pub work_done_progress: Option, } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DeclarationParams { /// An optional token that a server can use to report partial results (e.g. streaming) to /// the client. @@ -1748,7 +2312,7 @@ pub struct DeclarationParams { } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DeclarationRegistrationOptions { /// 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. @@ -1758,11 +2322,13 @@ pub struct DeclarationRegistrationOptions { /// The id used to register the request. The id can be used to deregister /// the request again. See also Registration#id. pub id: Option, + + pub work_done_progress: Option, } /// A parameter literal used in selection range requests. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct SelectionRangeParams { /// An optional token that a server can use to report partial results (e.g. streaming) to /// the client. @@ -1779,7 +2345,7 @@ pub struct SelectionRangeParams { } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct SelectionRangeRegistrationOptions { /// 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. @@ -1789,17 +2355,19 @@ pub struct SelectionRangeRegistrationOptions { /// The id used to register the request. The id can be used to deregister /// the request again. See also Registration#id. pub id: Option, + + pub work_done_progress: Option, } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WorkDoneProgressCreateParams { /// The token to be used to report progress. pub token: ProgressToken, } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WorkDoneProgressCancelParams { /// The token to be used to report progress. pub token: ProgressToken, @@ -1809,7 +2377,7 @@ pub struct WorkDoneProgressCancelParams { /// /// @since 3.16.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct CallHierarchyPrepareParams { /// The position inside the text document. pub position: Position, @@ -1826,7 +2394,7 @@ pub struct CallHierarchyPrepareParams { /// /// @since 3.16.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct CallHierarchyItem { /// A data entry field that is preserved between a call hierarchy prepare and /// incoming calls or outgoing calls requests. @@ -1859,7 +2427,7 @@ pub struct CallHierarchyItem { /// /// @since 3.16.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct CallHierarchyRegistrationOptions { /// 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. @@ -1869,13 +2437,15 @@ pub struct CallHierarchyRegistrationOptions { /// The id used to register the request. The id can be used to deregister /// the request again. See also Registration#id. pub id: Option, + + pub work_done_progress: Option, } /// The parameter of a `callHierarchy/incomingCalls` request. /// /// @since 3.16.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct CallHierarchyIncomingCallsParams { pub item: CallHierarchyItem, @@ -1891,7 +2461,7 @@ pub struct CallHierarchyIncomingCallsParams { /// /// @since 3.16.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct CallHierarchyIncomingCall { /// The item that makes the call. pub from: CallHierarchyItem, @@ -1905,7 +2475,7 @@ pub struct CallHierarchyIncomingCall { /// /// @since 3.16.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct CallHierarchyOutgoingCallsParams { pub item: CallHierarchyItem, @@ -1921,7 +2491,7 @@ pub struct CallHierarchyOutgoingCallsParams { /// /// @since 3.16.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct CallHierarchyOutgoingCall { /// The range at which this item is called. This is the range relative to the caller, e.g the item /// passed to [`provideCallHierarchyOutgoingCalls`][`CallHierarchyItemProvider::provideCallHierarchyOutgoingCalls`] @@ -1934,7 +2504,7 @@ pub struct CallHierarchyOutgoingCall { /// @since 3.16.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct SemanticTokensParams { /// An optional token that a server can use to report partial results (e.g. streaming) to /// the client. @@ -1949,7 +2519,7 @@ pub struct SemanticTokensParams { /// @since 3.16.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct SemanticTokens { /// The actual tokens. pub data: Vec, @@ -1963,21 +2533,14 @@ pub struct SemanticTokens { /// @since 3.16.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct SemanticTokensPartialResult { pub data: Vec, } -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct StructOptions { - /// The server supports deltas for full documents. - pub delta: Option, -} - /// @since 3.16.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct SemanticTokensRegistrationOptions { /// 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. @@ -1985,7 +2548,7 @@ pub struct SemanticTokensRegistrationOptions { pub document_selector: Option, /// Server supports providing semantic tokens for a full document. - pub full: Option>, + pub full: Option>, /// The id used to register the request. The id can be used to deregister /// the request again. See also Registration#id. @@ -1997,11 +2560,13 @@ pub struct SemanticTokensRegistrationOptions { /// Server supports providing semantic tokens for a specific range /// of a document. pub range: Option>, + + pub work_done_progress: Option, } /// @since 3.16.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct SemanticTokensDeltaParams { /// An optional token that a server can use to report partial results (e.g. streaming) to /// the client. @@ -2020,7 +2585,7 @@ pub struct SemanticTokensDeltaParams { /// @since 3.16.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct SemanticTokensDelta { /// The semantic token edits to transform a previous result into a new result. pub edits: Vec, @@ -2030,14 +2595,14 @@ pub struct SemanticTokensDelta { /// @since 3.16.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct SemanticTokensDeltaPartialResult { pub edits: Vec, } /// @since 3.16.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct SemanticTokensRangeParams { /// An optional token that a server can use to report partial results (e.g. streaming) to /// the client. @@ -2057,7 +2622,7 @@ pub struct SemanticTokensRangeParams { /// /// @since 3.16.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct ShowDocumentParams { /// Indicates to show the resource in an external program. /// To show, for example, `https://code.visualstudio.com/` @@ -2084,14 +2649,14 @@ pub struct ShowDocumentParams { /// /// @since 3.16.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct ShowDocumentResult { /// A boolean indicating if the show was successful. pub success: bool, } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct LinkedEditingRangeParams { /// The position inside the text document. pub position: Position, @@ -2107,7 +2672,7 @@ pub struct LinkedEditingRangeParams { /// /// @since 3.16.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct LinkedEditingRanges { /// A list of ranges that can be edited together. The ranges must have /// identical length and contain identical text content. The ranges cannot overlap. @@ -2120,7 +2685,7 @@ pub struct LinkedEditingRanges { } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct LinkedEditingRangeRegistrationOptions { /// 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. @@ -2130,6 +2695,8 @@ pub struct LinkedEditingRangeRegistrationOptions { /// The id used to register the request. The id can be used to deregister /// the request again. See also Registration#id. pub id: Option, + + pub work_done_progress: Option, } /// The parameters sent in notifications/requests for user-initiated creation of @@ -2137,7 +2704,7 @@ pub struct LinkedEditingRangeRegistrationOptions { /// /// @since 3.16.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct CreateFilesParams { /// An array of all files/folders created in this operation. pub files: Vec, @@ -2156,7 +2723,7 @@ pub struct CreateFilesParams { /// cause failure of the operation. How the client recovers from the failure is described by /// the client capability: `workspace.workspaceEdit.failureHandling` #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WorkspaceEdit { /// A map of change annotations that can be referenced in `AnnotatedTextEdit`s or create, rename and /// delete file / folder operations. @@ -2186,7 +2753,7 @@ pub struct WorkspaceEdit { /// /// @since 3.16.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct FileOperationRegistrationOptions { /// The actual filters. pub filters: Vec, @@ -2197,7 +2764,7 @@ pub struct FileOperationRegistrationOptions { /// /// @since 3.16.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct RenameFilesParams { /// 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. @@ -2209,14 +2776,14 @@ pub struct RenameFilesParams { /// /// @since 3.16.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DeleteFilesParams { /// An array of all files/folders deleted in this operation. pub files: Vec, } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct MonikerParams { /// An optional token that a server can use to report partial results (e.g. streaming) to /// the client. @@ -2236,7 +2803,7 @@ pub struct MonikerParams { /// /// @since 3.16.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct Moniker { /// The identifier of the moniker. The value is opaque in LSIF however /// schema owners are allowed to define the structure if they want. @@ -2253,19 +2820,21 @@ pub struct Moniker { } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct MonikerRegistrationOptions { /// 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. #[serde(skip_serializing_if = "Option::is_none")] pub document_selector: Option, + + pub work_done_progress: Option, } /// The parameter of a `textDocument/prepareTypeHierarchy` request. /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TypeHierarchyPrepareParams { /// The position inside the text document. pub position: Position, @@ -2279,7 +2848,7 @@ pub struct TypeHierarchyPrepareParams { /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TypeHierarchyItem { /// 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 @@ -2316,7 +2885,7 @@ pub struct TypeHierarchyItem { /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TypeHierarchyRegistrationOptions { /// 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. @@ -2326,13 +2895,15 @@ pub struct TypeHierarchyRegistrationOptions { /// The id used to register the request. The id can be used to deregister /// the request again. See also Registration#id. pub id: Option, + + pub work_done_progress: Option, } /// The parameter of a `typeHierarchy/supertypes` request. /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TypeHierarchySupertypesParams { pub item: TypeHierarchyItem, @@ -2348,7 +2919,7 @@ pub struct TypeHierarchySupertypesParams { /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TypeHierarchySubtypesParams { pub item: TypeHierarchyItem, @@ -2364,7 +2935,7 @@ pub struct TypeHierarchySubtypesParams { /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct InlineValueParams { /// Additional information about the context in which inline values were /// requested. @@ -2384,7 +2955,7 @@ pub struct InlineValueParams { /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct InlineValueRegistrationOptions { /// 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. @@ -2394,13 +2965,15 @@ pub struct InlineValueRegistrationOptions { /// The id used to register the request. The id can be used to deregister /// the request again. See also Registration#id. pub id: Option, + + pub work_done_progress: Option, } /// A parameter literal used in inlay hint requests. /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct InlayHintParams { /// The document range for which inlay hints should be computed. pub range: Range, @@ -2416,7 +2989,7 @@ pub struct InlayHintParams { /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct InlayHint { /// A data entry field that is preserved on an inlay hint between /// a `textDocument/inlayHint` and a `inlayHint/resolve` request. @@ -2464,7 +3037,7 @@ pub struct InlayHint { /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct InlayHintRegistrationOptions { /// 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. @@ -2478,13 +3051,15 @@ pub struct InlayHintRegistrationOptions { /// The server provides support to resolve additional /// information for an inlay hint item. pub resolve_provider: Option, + + pub work_done_progress: Option, } /// Parameters of the document diagnostic request. /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DocumentDiagnosticParams { /// The additional identifier provided during registration. pub identifier: Option, @@ -2507,7 +3082,7 @@ pub struct DocumentDiagnosticParams { /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DocumentDiagnosticReportPartialResult { pub related_documents: HashMap>, @@ -2517,7 +3092,7 @@ pub struct DocumentDiagnosticReportPartialResult { /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DiagnosticServerCancellationData { pub retrigger_request: bool, } @@ -2526,7 +3101,7 @@ pub struct DiagnosticServerCancellationData { /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DiagnosticRegistrationOptions { /// 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. @@ -2547,6 +3122,8 @@ pub struct DiagnosticRegistrationOptions { /// most programming languages and typically uncommon for linters. pub inter_file_dependencies: bool, + pub work_done_progress: Option, + /// The server provides support for workspace diagnostics as well. pub workspace_diagnostics: bool, } @@ -2555,7 +3132,7 @@ pub struct DiagnosticRegistrationOptions { /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WorkspaceDiagnosticParams { /// The additional identifier provided during registration. pub identifier: Option, @@ -2576,7 +3153,7 @@ pub struct WorkspaceDiagnosticParams { /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WorkspaceDiagnosticReport { pub items: Vec, } @@ -2585,7 +3162,7 @@ pub struct WorkspaceDiagnosticReport { /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WorkspaceDiagnosticReportPartialResult { pub items: Vec, } @@ -2594,7 +3171,7 @@ pub struct WorkspaceDiagnosticReportPartialResult { /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DidOpenNotebookDocumentParams { /// The text documents that represent the content /// of a notebook cell. @@ -2608,7 +3185,7 @@ pub struct DidOpenNotebookDocumentParams { /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DidChangeNotebookDocumentParams { /// The actual changes to the notebook document. /// @@ -2636,7 +3213,7 @@ pub struct DidChangeNotebookDocumentParams { /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DidSaveNotebookDocumentParams { /// The notebook document that got saved. pub notebook_document: NotebookDocumentIdentifier, @@ -2646,7 +3223,7 @@ pub struct DidSaveNotebookDocumentParams { /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DidCloseNotebookDocumentParams { /// The text documents that represent the content /// of a notebook cell that got closed. @@ -2660,9 +3237,9 @@ pub struct DidCloseNotebookDocumentParams { /// /// @since 3.18.0 /// @proposed -#[cfg(feature = "proposed", since = "3.18.0")] +#[cfg(feature = "proposed")] #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct InlineCompletionParams { /// Additional information about the context in which inline completions were /// requested. @@ -2682,9 +3259,9 @@ pub struct InlineCompletionParams { /// /// @since 3.18.0 /// @proposed -#[cfg(feature = "proposed", since = "3.18.0")] +#[cfg(feature = "proposed")] #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct InlineCompletionList { /// The inline completion items pub items: Vec, @@ -2694,9 +3271,9 @@ pub struct InlineCompletionList { /// /// @since 3.18.0 /// @proposed -#[cfg(feature = "proposed", since = "3.18.0")] +#[cfg(feature = "proposed")] #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct InlineCompletionItem { /// An optional [Command] that is executed *after* inserting this completion. pub command: Option, @@ -2715,9 +3292,9 @@ pub struct InlineCompletionItem { /// /// @since 3.18.0 /// @proposed -#[cfg(feature = "proposed", since = "3.18.0")] +#[cfg(feature = "proposed")] #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct InlineCompletionRegistrationOptions { /// 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. @@ -2727,32 +3304,24 @@ pub struct InlineCompletionRegistrationOptions { /// The id used to register the request. The id can be used to deregister /// the request again. See also Registration#id. pub id: Option, + + pub work_done_progress: Option, } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct RegistrationParams { pub registrations: Vec, } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct UnregistrationParams { pub unregisterations: Vec, } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct StructClientInfo { - /// The name of the client as defined by the client. - pub name: String, - - /// The client's version as defined by the client. - pub version: Option, -} - -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct InitializeParams { /// The capabilities provided by the client (editor or tool) pub capabilities: ClientCapabilities, @@ -2760,7 +3329,7 @@ pub struct InitializeParams { /// Information about the client /// /// @since 3.15.0 - pub client_info: Option, + pub client_info: Option, /// User provided initialization options. pub initialization_options: Option, @@ -2802,6 +3371,9 @@ pub struct InitializeParams { /// The initial trace setting. If omitted trace is disabled ('off'). pub trace: Option, + /// An optional token that a server can use to report work done progress. + pub work_done_token: Option, + /// The workspace folders configured in the client when the server starts. /// /// This property is only available if the client supports workspace folders. @@ -2812,19 +3384,9 @@ pub struct InitializeParams { pub workspace_folders: Option>, } -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct StructServerInfo { - /// The name of the server as defined by the server. - pub name: String, - - /// The server's version as defined by the server. - pub version: Option, -} - /// The result returned from an initialize request. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct InitializeResult { /// The capabilities the language server provides. pub capabilities: ServerCapabilities, @@ -2832,13 +3394,13 @@ pub struct InitializeResult { /// Information about the server. /// /// @since 3.15.0 - pub server_info: Option, + pub server_info: Option, } /// The data type of the ResponseError if the /// initialize request fails. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct InitializeError { /// Indicates whether the client execute the following retry logic: /// (1) show the message provided by the ResponseError to the user @@ -2848,26 +3410,26 @@ pub struct InitializeError { } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct InitializedParams {} /// The parameters of a change configuration notification. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DidChangeConfigurationParams { /// The actual changed settings pub settings: LSPAny, } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DidChangeConfigurationRegistrationOptions { pub section: Option>>, } /// The parameters of a notification message. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct ShowMessageParams { /// The actual message. pub message: String, @@ -2878,7 +3440,7 @@ pub struct ShowMessageParams { } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct ShowMessageRequestParams { /// The message action items to present. pub actions: Option>, @@ -2892,7 +3454,7 @@ pub struct ShowMessageRequestParams { } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct MessageActionItem { /// A short title like 'Retry', 'Open Log' etc. pub title: String, @@ -2900,7 +3462,7 @@ pub struct MessageActionItem { /// The log message parameters. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct LogMessageParams { /// The actual message. pub message: String, @@ -2912,7 +3474,7 @@ pub struct LogMessageParams { /// The parameters sent in an open text document notification #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DidOpenTextDocumentParams { /// The document that was opened. pub text_document: TextDocumentItem, @@ -2920,7 +3482,7 @@ pub struct DidOpenTextDocumentParams { /// The change text document notification's parameters. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DidChangeTextDocumentParams { /// 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 @@ -2943,7 +3505,7 @@ pub struct DidChangeTextDocumentParams { /// Describe options to be used when registered for text document change events. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentChangeRegistrationOptions { /// 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. @@ -2956,7 +3518,7 @@ pub struct TextDocumentChangeRegistrationOptions { /// The parameters sent in a close text document notification #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DidCloseTextDocumentParams { /// The document that was closed. pub text_document: TextDocumentIdentifier, @@ -2964,7 +3526,7 @@ pub struct DidCloseTextDocumentParams { /// The parameters sent in a save text document notification #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DidSaveTextDocumentParams { /// Optional the content when saved. Depends on the includeText value /// when the save notification was requested. @@ -2976,7 +3538,7 @@ pub struct DidSaveTextDocumentParams { /// Save registration options. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentSaveRegistrationOptions { /// 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. @@ -2989,7 +3551,7 @@ pub struct TextDocumentSaveRegistrationOptions { /// The parameters sent in a will save text document notification. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WillSaveTextDocumentParams { /// The 'TextDocumentSaveReason'. pub reason: TextDocumentSaveReason, @@ -3000,7 +3562,7 @@ pub struct WillSaveTextDocumentParams { /// A text edit applicable to a text document. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextEdit { /// The string to be inserted. For delete operations use an /// empty string. @@ -3013,7 +3575,7 @@ pub struct TextEdit { /// The watched files change notification's parameters. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DidChangeWatchedFilesParams { /// The actual file events. pub changes: Vec, @@ -3021,7 +3583,7 @@ pub struct DidChangeWatchedFilesParams { /// Describe options to be used when registered for text document change events. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DidChangeWatchedFilesRegistrationOptions { /// The watchers to register. pub watchers: Vec, @@ -3029,7 +3591,7 @@ pub struct DidChangeWatchedFilesRegistrationOptions { /// The publish diagnostic notification's parameters. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct PublishDiagnosticsParams { /// An array of diagnostic information items. pub diagnostics: Vec, @@ -3045,7 +3607,7 @@ pub struct PublishDiagnosticsParams { /// Completion parameters #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct CompletionParams { /// The completion context. This is only available it the client specifies /// to send this using the client capability `textDocument.completion.contextSupport === true` @@ -3068,7 +3630,7 @@ pub struct CompletionParams { /// A completion item represents a text snippet that is /// proposed to complete text that is being typed. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct CompletionItem { /// An optional array of additional [text edits][TextEdit] that are applied when /// selecting this completion. Edits must not overlap (including the same insert position) @@ -3208,47 +3770,10 @@ pub struct CompletionItem { pub text_edit_text: Option, } -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct StructInsert { - pub insert: Range, - - pub replace: Range, -} - -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct StructItemDefaults { - /// A default commit character set. - /// - /// @since 3.17.0 - pub commit_characters: Option>, - - /// A default edit range. - /// - /// @since 3.17.0 - pub edit_range: Option>, - - /// A default insert text format. - /// - /// @since 3.17.0 - pub insert_text_format: Option, - - /// A default insert text mode. - /// - /// @since 3.17.0 - pub insert_text_mode: Option, - - /// A default data value. - /// - /// @since 3.17.0 - pub data: Option, -} - /// Represents a collection of [completion items][CompletionItem] to be presented /// in the editor. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct CompletionList { /// This list it not complete. Further typing results in recomputing this list. /// @@ -3269,26 +3794,15 @@ pub struct CompletionList { /// capability. /// /// @since 3.17.0 - pub item_defaults: Option, + pub item_defaults: Option, /// The completion items. pub items: Vec, } -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct StructCompletionItem { - /// The server has support for completion item label - /// details (see also `CompletionItemLabelDetails`) when - /// receiving a completion item in a resolve call. - /// - /// @since 3.17.0 - pub label_details_support: Option, -} - /// Registration options for a [CompletionRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct CompletionRegistrationOptions { /// The list of all possible characters that commit a completion. This field can be used /// if clients don't support individual commit characters per completion item. See @@ -3304,7 +3818,7 @@ pub struct CompletionRegistrationOptions { /// capabilities. /// /// @since 3.17.0 - pub completion_item: Option, + pub completion_item: Option, /// 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. @@ -3324,11 +3838,13 @@ pub struct CompletionRegistrationOptions { /// If code complete should automatically be trigger on characters not being valid inside /// an identifier (for example `.` in JavaScript) list them in `triggerCharacters`. pub trigger_characters: Option>, + + pub work_done_progress: Option, } /// Parameters for a [HoverRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct HoverParams { /// The position inside the text document. pub position: Position, @@ -3342,7 +3858,7 @@ pub struct HoverParams { /// The result of a hover request. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct Hover { /// The hover's content pub contents: OR3>, @@ -3354,17 +3870,19 @@ pub struct Hover { /// Registration options for a [HoverRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct HoverRegistrationOptions { /// 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. #[serde(skip_serializing_if = "Option::is_none")] pub document_selector: Option, + + pub work_done_progress: Option, } /// Parameters for a [SignatureHelpRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct SignatureHelpParams { /// The signature help context. This is only available if the client specifies /// to send this using the client capability `textDocument.signatureHelp.contextSupport === true` @@ -3386,7 +3904,7 @@ pub struct SignatureHelpParams { /// callable. There can be multiple signature but only one /// active and only one active parameter. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct SignatureHelp { /// The active parameter of the active signature. If omitted or the value /// lies outside the range of `signatures[activeSignature].parameters` @@ -3414,7 +3932,7 @@ pub struct SignatureHelp { /// Registration options for a [SignatureHelpRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct SignatureHelpRegistrationOptions { /// 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. @@ -3431,11 +3949,13 @@ pub struct SignatureHelpRegistrationOptions { /// List of characters that trigger signature help automatically. pub trigger_characters: Option>, + + pub work_done_progress: Option, } /// Parameters for a [DefinitionRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DefinitionParams { /// An optional token that a server can use to report partial results (e.g. streaming) to /// the client. @@ -3453,17 +3973,19 @@ pub struct DefinitionParams { /// Registration options for a [DefinitionRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DefinitionRegistrationOptions { /// 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. #[serde(skip_serializing_if = "Option::is_none")] pub document_selector: Option, + + pub work_done_progress: Option, } /// Parameters for a [ReferencesRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct ReferenceParams { pub context: ReferenceContext, @@ -3483,17 +4005,19 @@ pub struct ReferenceParams { /// Registration options for a [ReferencesRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct ReferenceRegistrationOptions { /// 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. #[serde(skip_serializing_if = "Option::is_none")] pub document_selector: Option, + + pub work_done_progress: Option, } /// Parameters for a [DocumentHighlightRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DocumentHighlightParams { /// An optional token that a server can use to report partial results (e.g. streaming) to /// the client. @@ -3513,7 +4037,7 @@ pub struct DocumentHighlightParams { /// special attention. Usually a document highlight is visualized by changing /// the background color of its range. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DocumentHighlight { /// The highlight kind, default is [text][`DocumentHighlightKind::Text`]. pub kind: Option, @@ -3524,17 +4048,19 @@ pub struct DocumentHighlight { /// Registration options for a [DocumentHighlightRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DocumentHighlightRegistrationOptions { /// 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. #[serde(skip_serializing_if = "Option::is_none")] pub document_selector: Option, + + pub work_done_progress: Option, } /// Parameters for a [DocumentSymbolRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DocumentSymbolParams { /// An optional token that a server can use to report partial results (e.g. streaming) to /// the client. @@ -3550,7 +4076,7 @@ pub struct DocumentSymbolParams { /// Represents information about programming constructs like variables, classes, /// interfaces etc. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct SymbolInformation { /// 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 @@ -3592,7 +4118,7 @@ pub struct SymbolInformation { /// have two ranges: one that encloses its definition and one that points to /// its most interesting range, e.g. the range of an identifier. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DocumentSymbol { /// Children of this symbol, e.g. properties of a class. pub children: Option>, @@ -3630,7 +4156,7 @@ pub struct DocumentSymbol { /// Registration options for a [DocumentSymbolRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DocumentSymbolRegistrationOptions { /// 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. @@ -3642,11 +4168,13 @@ pub struct DocumentSymbolRegistrationOptions { /// /// @since 3.16.0 pub label: Option, + + pub work_done_progress: Option, } /// The parameters of a [CodeActionRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct CodeActionParams { /// Context carrying additional information. pub context: CodeActionContext, @@ -3670,7 +4198,7 @@ pub struct CodeActionParams { /// an array of arguments which will be passed to the command handler /// function when invoked. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct Command { /// Arguments that the command handler should be /// invoked with. @@ -3683,21 +4211,12 @@ pub struct Command { pub title: String, } -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct StructDisabled { - /// Human readable description of why the code action is currently disabled. - /// - /// This is displayed in the code actions UI. - pub reason: String, -} - /// 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. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct CodeAction { /// A command this code action executes. If a code action /// provides an edit and a command, first the edit is @@ -3728,7 +4247,7 @@ pub struct CodeAction { /// error message with `reason` in the editor. /// /// @since 3.16.0 - pub disabled: Option, + pub disabled: Option, /// The workspace edit this code action performs. pub edit: Option, @@ -3753,7 +4272,7 @@ pub struct CodeAction { /// Registration options for a [CodeActionRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct CodeActionRegistrationOptions { /// CodeActionKinds that this server may return. /// @@ -3771,11 +4290,13 @@ pub struct CodeActionRegistrationOptions { /// /// @since 3.16.0 pub resolve_provider: Option, + + pub work_done_progress: Option, } /// The parameters of a [WorkspaceSymbolRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WorkspaceSymbolParams { /// An optional token that a server can use to report partial results (e.g. streaming) to /// the client. @@ -3789,19 +4310,13 @@ pub struct WorkspaceSymbolParams { pub work_done_token: Option, } -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct StructUri { - pub uri: String, -} - /// A special workspace symbol that supports locations without a range. /// /// See also SymbolInformation. /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WorkspaceSymbol { /// 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 @@ -3821,7 +4336,7 @@ pub struct WorkspaceSymbol { /// capability `workspace.symbol.resolveSupport`. /// /// See SymbolInformation#location for more details. - pub location: OR2, + pub location: OR2, /// The name of this symbol. pub name: String, @@ -3834,18 +4349,20 @@ pub struct WorkspaceSymbol { /// Registration options for a [WorkspaceSymbolRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WorkspaceSymbolRegistrationOptions { /// The server provides support to resolve additional /// information for a workspace symbol. /// /// @since 3.17.0 pub resolve_provider: Option, + + pub work_done_progress: Option, } /// The parameters of a [CodeLensRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct CodeLensParams { /// An optional token that a server can use to report partial results (e.g. streaming) to /// the client. @@ -3864,7 +4381,7 @@ pub struct CodeLensParams { /// 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. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct CodeLens { /// The command this code lens represents. pub command: Option, @@ -3879,7 +4396,7 @@ pub struct CodeLens { /// Registration options for a [CodeLensRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct CodeLensRegistrationOptions { /// 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. @@ -3888,11 +4405,13 @@ pub struct CodeLensRegistrationOptions { /// Code lens has a resolve provider as well. pub resolve_provider: Option, + + pub work_done_progress: Option, } /// The parameters of a [DocumentLinkRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DocumentLinkParams { /// An optional token that a server can use to report partial results (e.g. streaming) to /// the client. @@ -3908,7 +4427,7 @@ pub struct DocumentLinkParams { /// 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. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DocumentLink { /// A data entry field that is preserved on a document link between a /// DocumentLinkRequest and a DocumentLinkResolveRequest. @@ -3932,7 +4451,7 @@ pub struct DocumentLink { /// Registration options for a [DocumentLinkRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DocumentLinkRegistrationOptions { /// 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. @@ -3941,11 +4460,13 @@ pub struct DocumentLinkRegistrationOptions { /// Document links have a resolve provider as well. pub resolve_provider: Option, + + pub work_done_progress: Option, } /// The parameters of a [DocumentFormattingRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DocumentFormattingParams { /// The format options. pub options: FormattingOptions, @@ -3959,17 +4480,19 @@ pub struct DocumentFormattingParams { /// Registration options for a [DocumentFormattingRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DocumentFormattingRegistrationOptions { /// 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. #[serde(skip_serializing_if = "Option::is_none")] pub document_selector: Option, + + pub work_done_progress: Option, } /// The parameters of a [DocumentRangeFormattingRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DocumentRangeFormattingParams { /// The format options pub options: FormattingOptions, @@ -3986,7 +4509,7 @@ pub struct DocumentRangeFormattingParams { /// Registration options for a [DocumentRangeFormattingRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DocumentRangeFormattingRegistrationOptions { /// 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. @@ -3997,17 +4520,19 @@ pub struct DocumentRangeFormattingRegistrationOptions { /// /// @since 3.18.0 /// @proposed - #[cfg(feature = "proposed", since = "3.18.0")] + #[cfg(feature = "proposed")] pub ranges_support: Option, + + pub work_done_progress: Option, } /// The parameters of a [DocumentRangesFormattingRequest]. /// /// @since 3.18.0 /// @proposed -#[cfg(feature = "proposed", since = "3.18.0")] +#[cfg(feature = "proposed")] #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DocumentRangesFormattingParams { /// The format options pub options: FormattingOptions, @@ -4024,7 +4549,7 @@ pub struct DocumentRangesFormattingParams { /// The parameters of a [DocumentOnTypeFormattingRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DocumentOnTypeFormattingParams { /// The character that has been typed that triggered the formatting /// on type request. That is not necessarily the last character that @@ -4046,7 +4571,7 @@ pub struct DocumentOnTypeFormattingParams { /// Registration options for a [DocumentOnTypeFormattingRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DocumentOnTypeFormattingRegistrationOptions { /// 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. @@ -4062,7 +4587,7 @@ pub struct DocumentOnTypeFormattingRegistrationOptions { /// The parameters of a [RenameRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct RenameParams { /// The new name of the symbol. If the given name is not valid the /// request must return a [ResponseError] with an @@ -4081,7 +4606,7 @@ pub struct RenameParams { /// Registration options for a [RenameRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct RenameRegistrationOptions { /// 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. @@ -4092,10 +4617,12 @@ pub struct RenameRegistrationOptions { /// /// @since version 3.12.0 pub prepare_provider: Option, + + pub work_done_progress: Option, } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct PrepareRenameParams { /// The position inside the text document. pub position: Position, @@ -4109,7 +4636,7 @@ pub struct PrepareRenameParams { /// The parameters of a [ExecuteCommandRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct ExecuteCommandParams { /// Arguments that the command should be invoked with. pub arguments: Option>, @@ -4123,15 +4650,17 @@ pub struct ExecuteCommandParams { /// Registration options for a [ExecuteCommandRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct ExecuteCommandRegistrationOptions { /// The commands to be executed on the server pub commands: Vec, + + pub work_done_progress: Option, } /// The parameters passed via an apply workspace edit request. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct ApplyWorkspaceEditParams { /// The edits to apply. pub edit: WorkspaceEdit, @@ -4146,7 +4675,7 @@ pub struct ApplyWorkspaceEditParams { /// /// @since 3.17 renamed from ApplyWorkspaceEditResponse #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct ApplyWorkspaceEditResult { /// Indicates whether the edit was applied or not. pub applied: bool, @@ -4163,7 +4692,7 @@ pub struct ApplyWorkspaceEditResult { } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WorkDoneProgressBegin { /// 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 @@ -4195,7 +4724,7 @@ pub struct WorkDoneProgressBegin { } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WorkDoneProgressReport { /// Controls enablement state of a cancel button. /// @@ -4222,7 +4751,7 @@ pub struct WorkDoneProgressReport { } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WorkDoneProgressEnd { pub kind: String, @@ -4232,13 +4761,13 @@ pub struct WorkDoneProgressEnd { } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct SetTraceParams { pub value: TraceValues, } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct LogTraceParams { pub message: String, @@ -4246,14 +4775,14 @@ pub struct LogTraceParams { } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct CancelParams { /// The request id to cancel. pub id: OR2, } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct ProgressParams { /// The progress token provided by the client or server. pub token: ProgressToken, @@ -4265,7 +4794,7 @@ pub struct ProgressParams { /// A parameter literal used in requests to pass a text document and a position inside that /// document. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentPositionParams { /// The position inside the text document. pub position: Position, @@ -4275,14 +4804,14 @@ pub struct TextDocumentPositionParams { } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WorkDoneProgressParams { /// An optional token that a server can use to report work done progress. pub work_done_token: Option, } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct PartialResultParams { /// An optional token that a server can use to report partial results (e.g. streaming) to /// the client. @@ -4292,7 +4821,7 @@ pub struct PartialResultParams { /// Represents the connection of two locations. Provides additional metadata over normal [locations][Location], /// including an origin range. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct LocationLink { /// Span of the origin of this link. /// @@ -4325,7 +4854,7 @@ pub struct LocationLink { /// } /// ``` #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct Range { /// The range's end position. pub end: Position, @@ -4335,7 +4864,7 @@ pub struct Range { } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct ImplementationOptions { pub work_done_progress: Option, } @@ -4343,7 +4872,7 @@ pub struct ImplementationOptions { /// Static registration options to be returned in the initialize /// request. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct StaticRegistrationOptions { /// The id used to register the request. The id can be used to deregister /// the request again. See also Registration#id. @@ -4351,14 +4880,14 @@ pub struct StaticRegistrationOptions { } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TypeDefinitionOptions { pub work_done_progress: Option, } /// The workspace folder change event. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WorkspaceFoldersChangeEvent { /// The array of added workspace folders pub added: Vec, @@ -4368,7 +4897,7 @@ pub struct WorkspaceFoldersChangeEvent { } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct ConfigurationItem { /// The scope to get the configuration section for. pub scope_uri: Option, @@ -4379,7 +4908,7 @@ pub struct ConfigurationItem { /// A literal to identify a text document in the client. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentIdentifier { /// The text document's uri. pub uri: String, @@ -4387,7 +4916,7 @@ pub struct TextDocumentIdentifier { /// Represents a color in RGBA space. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct Color { /// The alpha component of this color in the range [0-1]. pub alpha: Decimal, @@ -4403,19 +4932,19 @@ pub struct Color { } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DocumentColorOptions { pub work_done_progress: Option, } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct FoldingRangeOptions { pub work_done_progress: Option, } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DeclarationOptions { pub work_done_progress: Option, } @@ -4448,7 +4977,7 @@ pub struct DeclarationOptions { /// /// @since 3.17.0 - support for negotiated position encoding. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct Position { /// Character offset on a line in a document (zero-based). /// @@ -4467,7 +4996,7 @@ pub struct Position { } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct SelectionRangeOptions { pub work_done_progress: Option, } @@ -4476,17 +5005,17 @@ pub struct SelectionRangeOptions { /// /// @since 3.16.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct CallHierarchyOptions { pub work_done_progress: Option, } /// @since 3.16.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct SemanticTokensOptions { /// Server supports providing semantic tokens for a full document. - pub full: Option>, + pub full: Option>, /// The legend used by the server pub legend: SemanticTokensLegend, @@ -4500,7 +5029,7 @@ pub struct SemanticTokensOptions { /// @since 3.16.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct SemanticTokensEdit { /// The elements to insert. pub data: Option>, @@ -4513,7 +5042,7 @@ pub struct SemanticTokensEdit { } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct LinkedEditingRangeOptions { pub work_done_progress: Option, } @@ -4522,7 +5051,7 @@ pub struct LinkedEditingRangeOptions { /// /// @since 3.16.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct FileCreate { /// A file:// URI for the location of the file/folder being created. pub uri: String, @@ -4533,7 +5062,7 @@ pub struct FileCreate { /// 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. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentEdit { /// The edits to be applied. /// @@ -4547,7 +5076,7 @@ pub struct TextDocumentEdit { /// Create file operation. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct CreateFile { /// An optional annotation identifier describing the operation. /// @@ -4566,7 +5095,7 @@ pub struct CreateFile { /// Rename file operation #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct RenameFile { /// An optional annotation identifier describing the operation. /// @@ -4588,7 +5117,7 @@ pub struct RenameFile { /// Delete file operation #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DeleteFile { /// An optional annotation identifier describing the operation. /// @@ -4609,7 +5138,7 @@ pub struct DeleteFile { /// /// @since 3.16.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct ChangeAnnotation { /// A human-readable string which is rendered less prominent in /// the user interface. @@ -4629,7 +5158,7 @@ pub struct ChangeAnnotation { /// /// @since 3.16.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct FileOperationFilter { /// The actual file operation pattern. pub pattern: FileOperationPattern, @@ -4642,7 +5171,7 @@ pub struct FileOperationFilter { /// /// @since 3.16.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct FileRename { /// A file:// URI for the new location of the file/folder being renamed. pub new_uri: String, @@ -4655,14 +5184,14 @@ pub struct FileRename { /// /// @since 3.16.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct FileDelete { /// A file:// URI for the location of the file/folder being deleted. pub uri: String, } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct MonikerOptions { pub work_done_progress: Option, } @@ -4671,14 +5200,14 @@ pub struct MonikerOptions { /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TypeHierarchyOptions { pub work_done_progress: Option, } /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct InlineValueContext { /// The stack frame (as a DAP Id) where the execution has stopped. pub frame_id: i32, @@ -4692,7 +5221,7 @@ pub struct InlineValueContext { /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct InlineValueText { /// The document range for which the inline value applies. pub range: Range, @@ -4707,7 +5236,7 @@ pub struct InlineValueText { /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct InlineValueVariableLookup { /// How to perform the lookup. pub case_sensitive_lookup: bool, @@ -4726,7 +5255,7 @@ pub struct InlineValueVariableLookup { /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct InlineValueEvaluatableExpression { /// If specified the expression overrides the extracted expression. pub expression: Option, @@ -4740,7 +5269,7 @@ pub struct InlineValueEvaluatableExpression { /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct InlineValueOptions { pub work_done_progress: Option, } @@ -4750,7 +5279,7 @@ pub struct InlineValueOptions { /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct InlayHintLabelPart { /// An optional command for this label part. /// @@ -4803,7 +5332,7 @@ pub struct InlayHintLabelPart { /// *Please Note* that clients might sanitize the return markdown. A client could decide to /// remove HTML from the markdown to avoid script execution. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct MarkupContent { /// The type of the Markup pub kind: MarkupKind, @@ -4816,7 +5345,7 @@ pub struct MarkupContent { /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct InlayHintOptions { /// The server provides support to resolve additional /// information for an inlay hint item. @@ -4829,7 +5358,7 @@ pub struct InlayHintOptions { /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct RelatedFullDocumentDiagnosticReport { /// The actual items. pub items: Vec, @@ -4858,7 +5387,7 @@ pub struct RelatedFullDocumentDiagnosticReport { /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct RelatedUnchangedDocumentDiagnosticReport { /// A document diagnostic report indicating /// no changes to the last result. A server can @@ -4886,7 +5415,7 @@ pub struct RelatedUnchangedDocumentDiagnosticReport { /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct FullDocumentDiagnosticReport { /// The actual items. pub items: Vec, @@ -4905,7 +5434,7 @@ pub struct FullDocumentDiagnosticReport { /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct UnchangedDocumentDiagnosticReport { /// A document diagnostic report indicating /// no changes to the last result. A server can @@ -4922,7 +5451,7 @@ pub struct UnchangedDocumentDiagnosticReport { /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DiagnosticOptions { /// An optional identifier under which the diagnostics are /// managed by the client. @@ -4944,7 +5473,7 @@ pub struct DiagnosticOptions { /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct PreviousResultId { /// The URI for which the client knowns a /// result id. @@ -4958,7 +5487,7 @@ pub struct PreviousResultId { /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct NotebookDocument { /// The cells of a notebook. pub cells: Vec, @@ -4983,7 +5512,7 @@ pub struct NotebookDocument { /// An item to transfer a text document from the client to the /// server. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentItem { /// The text document's language identifier. pub language_id: String, @@ -5003,7 +5532,7 @@ pub struct TextDocumentItem { /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct VersionedNotebookDocumentIdentifier { /// The notebook document's uri. pub uri: String, @@ -5012,50 +5541,14 @@ pub struct VersionedNotebookDocumentIdentifier { pub version: i32, } -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct StructStructure { - /// The change to the cell array. - pub array: NotebookCellArrayChange, - - /// Additional opened cell text documents. - pub did_open: Option>, - - /// Additional closed cell text documents. - pub did_close: Option>, -} - -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct StructDocument { - pub document: VersionedTextDocumentIdentifier, - - pub changes: Vec, -} - -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct StructCells { - /// Changes to the cell structure to add or - /// remove cells. - pub structure: Option, - - /// Changes to notebook cells properties like its - /// kind, execution summary or metadata. - pub data: Option>, - - /// Changes to the text content of notebook cells. - pub text_content: Option>, -} - /// A change event for a notebook document. /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct NotebookDocumentChangeEvent { /// Changes to cells - pub cells: Option, + pub cells: Option, /// The changed meta data if any. /// @@ -5067,7 +5560,7 @@ pub struct NotebookDocumentChangeEvent { /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct NotebookDocumentIdentifier { /// The notebook document's uri. pub uri: String, @@ -5077,9 +5570,9 @@ pub struct NotebookDocumentIdentifier { /// /// @since 3.18.0 /// @proposed -#[cfg(feature = "proposed", since = "3.18.0")] +#[cfg(feature = "proposed")] #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct InlineCompletionContext { /// Provides information about the currently selected item in the autocomplete widget if it is visible. pub selected_completion_info: Option, @@ -5098,9 +5591,9 @@ pub struct InlineCompletionContext { /// /// @since 3.18.0 /// @proposed -#[cfg(feature = "proposed", since = "3.18.0")] +#[cfg(feature = "proposed")] #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct StringValue { /// The kind of string value. pub kind: String, @@ -5113,16 +5606,16 @@ pub struct StringValue { /// /// @since 3.18.0 /// @proposed -#[cfg(feature = "proposed", since = "3.18.0")] +#[cfg(feature = "proposed")] #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct InlineCompletionOptions { pub work_done_progress: Option, } /// General parameters to register for a notification or to register a provider. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct Registration { /// The id used to register the request. The id can be used to deregister /// the request again. @@ -5137,7 +5630,7 @@ pub struct Registration { /// General parameters to unregister a request or notification. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct Unregistration { /// The id used to unregister the request or notification. Usually an id /// provided during the register request. @@ -5149,7 +5642,7 @@ pub struct Unregistration { /// The initialize parameters #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct _InitializeParams { /// The capabilities provided by the client (editor or tool) pub capabilities: ClientCapabilities, @@ -5157,7 +5650,7 @@ pub struct _InitializeParams { /// Information about the client /// /// @since 3.15.0 - pub client_info: Option, + pub client_info: Option, /// User provided initialization options. pub initialization_options: Option, @@ -5204,7 +5697,7 @@ pub struct _InitializeParams { } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WorkspaceFoldersInitializeParams { /// The workspace folders configured in the client when the server starts. /// @@ -5216,24 +5709,10 @@ pub struct WorkspaceFoldersInitializeParams { pub workspace_folders: Option>, } -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct StructWorkspace { - /// The server supports workspace folder. - /// - /// @since 3.6.0 - pub workspace_folders: Option, - - /// The server is interested in notifications/requests for operations on files. - /// - /// @since 3.16.0 - pub file_operations: Option, -} - /// Defines the capabilities provided by a language /// server. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct ServerCapabilities { /// The server provides call hierarchy support. /// @@ -5310,7 +5789,7 @@ pub struct ServerCapabilities { /// /// @since 3.18.0 /// @proposed - #[cfg(feature = "proposed", since = "3.18.0")] + #[cfg(feature = "proposed")] pub inline_completion_provider: Option>, /// The server provides inline values. @@ -5384,15 +5863,31 @@ pub struct ServerCapabilities { Option>, /// Workspace specific server capabilities. - pub workspace: Option, + pub workspace: Option, /// The server provides workspace symbol support. pub workspace_symbol_provider: Option>, } +/// Information about the server +/// +/// @since 3.15.0 +/// @since 3.18.0 ServerInfo type name added. +/// @proposed +#[cfg(feature = "proposed")] +#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct ServerInfo { + /// The name of the server as defined by the server. + pub name: String, + + /// The server's version as defined by the server. + pub version: Option, +} + /// A text document identifier to denote a specific version of a text document. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct VersionedTextDocumentIdentifier { /// The text document's uri. pub uri: String, @@ -5403,7 +5898,7 @@ pub struct VersionedTextDocumentIdentifier { /// Save options. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct SaveOptions { /// The client is supposed to include the content on save. pub include_text: Option, @@ -5411,7 +5906,7 @@ pub struct SaveOptions { /// An event describing a file change. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct FileEvent { /// The change type. #[serde(rename = "type")] @@ -5422,7 +5917,7 @@ pub struct FileEvent { } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct FileSystemWatcher { /// The glob pattern to watch. See [glob pattern][GlobPattern] for more detail. /// @@ -5438,7 +5933,7 @@ pub struct FileSystemWatcher { /// Represents a diagnostic, such as a compiler error or warning. Diagnostic objects /// are only valid in the scope of a resource. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct Diagnostic { /// The diagnostic's code, which usually appear in the user interface. pub code: Option>, @@ -5482,7 +5977,7 @@ pub struct Diagnostic { /// Contains additional information about the context in which a completion request is triggered. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct CompletionContext { /// The trigger character (a single character) that has trigger code complete. /// Is undefined if `triggerKind !== CompletionTriggerKind.TriggerCharacter` @@ -5496,7 +5991,7 @@ pub struct CompletionContext { /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct CompletionItemLabelDetails { /// An optional string which is rendered less prominently after [`CompletionItem::detail`]. Should be used /// for fully qualified names and file paths. @@ -5511,7 +6006,7 @@ pub struct CompletionItemLabelDetails { /// /// @since 3.16.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct InsertReplaceEdit { /// The range if the insert is requested pub insert: Range, @@ -5523,9 +6018,51 @@ pub struct InsertReplaceEdit { pub replace: Range, } +/// In many cases the items of an actual completion result share the same +/// value for properties like `commitCharacters` or the range of a text +/// edit. A completion list can therefore define item defaults which will +/// be used if a completion item itself doesn't specify the value. +/// +/// If a completion list specifies a default value and a completion item +/// also specifies a corresponding value the one from the item is used. +/// +/// Servers are only allowed to return default values if the client +/// signals support for this via the `completionList.itemDefaults` +/// capability. +/// +/// @since 3.17.0 +#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct CompletionItemDefaults { + /// A default commit character set. + /// + /// @since 3.17.0 + pub commit_characters: Option>, + + /// A default data value. + /// + /// @since 3.17.0 + pub data: Option, + + /// A default edit range. + /// + /// @since 3.17.0 + pub edit_range: Option>, + + /// A default insert text format. + /// + /// @since 3.17.0 + pub insert_text_format: Option, + + /// A default insert text mode. + /// + /// @since 3.17.0 + pub insert_text_mode: Option, +} + /// Completion options. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct CompletionOptions { /// The list of all possible characters that commit a completion. This field can be used /// if clients don't support individual commit characters per completion item. See @@ -5541,7 +6078,7 @@ pub struct CompletionOptions { /// capabilities. /// /// @since 3.17.0 - pub completion_item: Option, + pub completion_item: Option, /// The server provides support to resolve additional /// information for a completion item. @@ -5562,7 +6099,7 @@ pub struct CompletionOptions { /// Hover options. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct HoverOptions { pub work_done_progress: Option, } @@ -5571,7 +6108,7 @@ pub struct HoverOptions { /// /// @since 3.15.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct SignatureHelpContext { /// The currently active `SignatureHelp`. /// @@ -5598,7 +6135,7 @@ pub struct SignatureHelpContext { /// can have a label, like a function-name, a doc-comment, and /// a set of parameters. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct SignatureInformation { /// The index of the active parameter. /// @@ -5621,7 +6158,7 @@ pub struct SignatureInformation { /// Server Capabilities for a [SignatureHelpRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct SignatureHelpOptions { /// List of characters that re-trigger signature help. /// @@ -5639,7 +6176,7 @@ pub struct SignatureHelpOptions { /// Server Capabilities for a [DefinitionRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DefinitionOptions { pub work_done_progress: Option, } @@ -5647,7 +6184,7 @@ pub struct DefinitionOptions { /// Value-object that contains additional information when /// requesting references. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct ReferenceContext { /// Include the declaration of the current symbol. pub include_declaration: bool, @@ -5655,21 +6192,21 @@ pub struct ReferenceContext { /// Reference options. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct ReferenceOptions { pub work_done_progress: Option, } /// Provider options for a [DocumentHighlightRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DocumentHighlightOptions { pub work_done_progress: Option, } /// A base for all symbol information. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct BaseSymbolInformation { /// 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 @@ -5691,7 +6228,7 @@ pub struct BaseSymbolInformation { /// Provider options for a [DocumentSymbolRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DocumentSymbolOptions { /// A human-readable string that is shown when multiple outlines trees /// are shown for the same document. @@ -5705,7 +6242,7 @@ pub struct DocumentSymbolOptions { /// Contains additional diagnostic information about the context in which /// a [code action][`CodeActionProvider::provideCodeActions`] is run. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct CodeActionContext { /// 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 @@ -5726,9 +6263,23 @@ pub struct CodeActionContext { pub trigger_kind: Option, } +/// Captures why the code action is currently disabled. +/// +/// @since 3.18.0 +/// @proposed +#[cfg(feature = "proposed")] +#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct CodeActionDisabled { + /// Human readable description of why the code action is currently disabled. + /// + /// This is displayed in the code actions UI. + pub reason: String, +} + /// Provider options for a [CodeActionRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct CodeActionOptions { /// CodeActionKinds that this server may return. /// @@ -5745,9 +6296,20 @@ pub struct CodeActionOptions { pub work_done_progress: Option, } +/// Location with only uri and does not include range. +/// +/// @since 3.18.0 +/// @proposed +#[cfg(feature = "proposed")] +#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct LocationUriOnly { + pub uri: String, +} + /// Server capabilities for a [WorkspaceSymbolRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WorkspaceSymbolOptions { /// The server provides support to resolve additional /// information for a workspace symbol. @@ -5760,7 +6322,7 @@ pub struct WorkspaceSymbolOptions { /// Code Lens provider options of a [CodeLensRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct CodeLensOptions { /// Code lens has a resolve provider as well. pub resolve_provider: Option, @@ -5770,7 +6332,7 @@ pub struct CodeLensOptions { /// Provider options for a [DocumentLinkRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DocumentLinkOptions { /// Document links have a resolve provider as well. pub resolve_provider: Option, @@ -5780,7 +6342,7 @@ pub struct DocumentLinkOptions { /// Value-object describing what options formatting should use. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct FormattingOptions { /// Insert a newline character at the end of the file if one does not exist. /// @@ -5806,20 +6368,20 @@ pub struct FormattingOptions { /// Provider options for a [DocumentFormattingRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DocumentFormattingOptions { pub work_done_progress: Option, } /// Provider options for a [DocumentRangeFormattingRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DocumentRangeFormattingOptions { /// Whether the server supports formatting multiple ranges at once. /// /// @since 3.18.0 /// @proposed - #[cfg(feature = "proposed", since = "3.18.0")] + #[cfg(feature = "proposed")] pub ranges_support: Option, pub work_done_progress: Option, @@ -5827,7 +6389,7 @@ pub struct DocumentRangeFormattingOptions { /// Provider options for a [DocumentOnTypeFormattingRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DocumentOnTypeFormattingOptions { /// A character on which formatting should be triggered, like `{`. pub first_trigger_character: String, @@ -5838,7 +6400,7 @@ pub struct DocumentOnTypeFormattingOptions { /// Provider options for a [RenameRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct RenameOptions { /// Renames should be checked and tested before being executed. /// @@ -5848,9 +6410,29 @@ pub struct RenameOptions { pub work_done_progress: Option, } +/// @since 3.18.0 +/// @proposed +#[cfg(feature = "proposed")] +#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct PrepareRenamePlaceholder { + pub placeholder: String, + + pub range: Range, +} + +/// @since 3.18.0 +/// @proposed +#[cfg(feature = "proposed")] +#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct PrepareRenameDefaultBehavior { + pub default_behavior: bool, +} + /// The server capabilities of a [ExecuteCommandRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct ExecuteCommandOptions { /// The commands to be executed on the server pub commands: Vec, @@ -5860,7 +6442,7 @@ pub struct ExecuteCommandOptions { /// @since 3.16.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct SemanticTokensLegend { /// The token modifiers a server uses. pub token_modifiers: Vec, @@ -5869,9 +6451,21 @@ pub struct SemanticTokensLegend { pub token_types: Vec, } +/// Semantic tokens options to support deltas for full documents +/// +/// @since 3.18.0 +/// @proposed +#[cfg(feature = "proposed")] +#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct SemanticTokensFullDelta { + /// The server supports deltas for full documents. + pub delta: Option, +} + /// A text document identifier to optionally denote a specific version of a text document. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct OptionalVersionedTextDocumentIdentifier { /// The text document's uri. pub uri: String, @@ -5889,7 +6483,7 @@ pub struct OptionalVersionedTextDocumentIdentifier { /// /// @since 3.16.0. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct AnnotatedTextEdit { /// The actual identifier of the change annotation pub annotation_id: ChangeAnnotationIdentifier, @@ -5905,7 +6499,7 @@ pub struct AnnotatedTextEdit { /// A generic resource operation. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct ResourceOperation { /// An optional annotation identifier describing the operation. /// @@ -5918,7 +6512,7 @@ pub struct ResourceOperation { /// Options to create a file. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct CreateFileOptions { /// Ignore if exists. pub ignore_if_exists: Option, @@ -5929,7 +6523,7 @@ pub struct CreateFileOptions { /// Rename file options #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct RenameFileOptions { /// Ignores if target exists. pub ignore_if_exists: Option, @@ -5940,7 +6534,7 @@ pub struct RenameFileOptions { /// Delete file options #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DeleteFileOptions { /// Ignore the operation if the file doesn't exist. pub ignore_if_not_exists: Option, @@ -5954,7 +6548,7 @@ pub struct DeleteFileOptions { /// /// @since 3.16.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct FileOperationPattern { /// The glob pattern to match. Glob patterns can have the following syntax: /// - `*` to match one or more characters in a path segment @@ -5978,7 +6572,7 @@ pub struct FileOperationPattern { /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WorkspaceFullDocumentDiagnosticReport { /// The actual items. pub items: Vec, @@ -6004,7 +6598,7 @@ pub struct WorkspaceFullDocumentDiagnosticReport { /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WorkspaceUnchangedDocumentDiagnosticReport { /// A document diagnostic report indicating /// no changes to the last result. A server can @@ -6033,7 +6627,7 @@ pub struct WorkspaceUnchangedDocumentDiagnosticReport { /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct NotebookCell { /// The URI of the cell's text document /// content. @@ -6052,30 +6646,33 @@ pub struct NotebookCell { pub metadata: Option, } -/// A change describing how to move a `NotebookCell` -/// array from state S to S'. +/// Cell changes to a notebook document. /// -/// @since 3.17.0 +/// @since 3.18.0 +/// @proposed +#[cfg(feature = "proposed")] #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct NotebookCellArrayChange { - /// The new cells, if any - pub cells: Option>, +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct NotebookDocumentCellChanges { + /// Changes to notebook cells properties like its + /// kind, execution summary or metadata. + pub data: Option>, - /// The deleted cells - pub delete_count: u32, + /// Changes to the cell structure to add or + /// remove cells. + pub structure: Option, - /// The start oftest of the cell that changed. - pub start: u32, + /// Changes to the text content of notebook cells. + pub text_content: Option>, } /// Describes the currently selected completion item. /// /// @since 3.18.0 /// @proposed -#[cfg(feature = "proposed", since = "3.18.0")] +#[cfg(feature = "proposed")] #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct SelectedCompletionInfo { /// The range that will be replaced if this completion item is accepted. pub range: Range, @@ -6084,9 +6681,25 @@ pub struct SelectedCompletionInfo { pub text: String, } +/// Information about the client +/// +/// @since 3.15.0 +/// @since 3.18.0 ClientInfo type name added. +/// @proposed +#[cfg(feature = "proposed")] +#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct ClientInfo { + /// The name of the client as defined by the client. + pub name: String, + + /// The client's version as defined by the client. + pub version: Option, +} + /// Defines the capabilities provided by the client. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct ClientCapabilities { /// Experimental client capabilities. pub experimental: Option, @@ -6112,7 +6725,7 @@ pub struct ClientCapabilities { } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentSyncOptions { /// Change notifications are sent to the server. See TextDocumentSyncKind.None, TextDocumentSyncKind.Full /// and TextDocumentSyncKind.Incremental. If omitted it defaults to TextDocumentSyncKind.None. @@ -6135,42 +6748,6 @@ pub struct TextDocumentSyncOptions { pub will_save_wait_until: Option, } -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct StructLanguage { - pub language: String, -} - -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct StructNotebook { - /// The notebook to be synced If a string - /// value is provided it matches against the - /// notebook type. '*' matches every notebook. - pub notebook: OR2, - - /// The cells of the matching notebook to be synced. - pub cells: Option>, -} - -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct StructLanguage2 { - pub language: String, -} - -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct StructCells2 { - /// The notebook to be synced If a string - /// value is provided it matches against the - /// notebook type. '*' matches every notebook. - pub notebook: Option>, - - /// The cells of the matching notebook to be synced. - pub cells: Vec, -} - /// Options specific to a notebook plus its cells /// to be synced to the server. /// @@ -6185,10 +6762,11 @@ pub struct StructCells2 { /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct NotebookDocumentSyncOptions { /// The notebooks to be synced - pub notebook_selector: Vec>, + pub notebook_selector: + Vec>, /// Whether save notification should be forwarded to /// the server. Will only be honored if mode === `notebook`. @@ -6199,66 +6777,74 @@ pub struct NotebookDocumentSyncOptions { /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct NotebookDocumentSyncRegistrationOptions { /// The id used to register the request. The id can be used to deregister /// the request again. See also Registration#id. pub id: Option, /// The notebooks to be synced - pub notebook_selector: Vec>, + pub notebook_selector: + Vec>, /// Whether save notification should be forwarded to /// the server. Will only be honored if mode === `notebook`. pub save: Option, } +/// Defines workspace specific capabilities of the server. +/// +/// @since 3.18.0 +/// @proposed +#[cfg(feature = "proposed")] #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct WorkspaceFoldersServerCapabilities { - /// Whether the server wants to receive workspace folder - /// change notifications. +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct WorkspaceOptions { + /// The server is interested in notifications/requests for operations on files. /// - /// 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. - pub change_notifications: Option>, + /// @since 3.16.0 + pub file_operations: Option, - /// The server has support for workspace folders - pub supported: Option, + /// The server supports workspace folder. + /// + /// @since 3.6.0 + pub workspace_folders: Option, } -/// Options for notifications/requests for user operations on files. -/// -/// @since 3.16.0 +/// @since 3.18.0 +/// @proposed +#[cfg(feature = "proposed")] #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct FileOperationOptions { - /// The server is interested in receiving didCreateFiles notifications. - pub did_create: Option, +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct TextDocumentContentChangePartial { + /// The range of the document that changed. + pub range: Range, - /// The server is interested in receiving didDeleteFiles file notifications. - pub did_delete: Option, - - /// The server is interested in receiving didRenameFiles notifications. - pub did_rename: Option, - - /// The server is interested in receiving willCreateFiles requests. - pub will_create: Option, + /// The optional length of the range that got replaced. + /// + /// @deprecated use range instead. + #[deprecated] + pub range_length: Option, - /// The server is interested in receiving willDeleteFiles file requests. - pub will_delete: Option, + /// The new text for the provided range. + pub text: String, +} - /// The server is interested in receiving willRenameFiles requests. - pub will_rename: Option, +/// @since 3.18.0 +/// @proposed +#[cfg(feature = "proposed")] +#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct TextDocumentContentChangeWholeDocument { + /// The new text of the whole document. + pub text: String, } /// Structure to capture a description for an error code. /// /// @since 3.16.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct CodeDescription { /// An URI to open with more information about the diagnostic error. pub href: String, @@ -6268,7 +6854,7 @@ pub struct CodeDescription { /// used to point to code locations that cause or related to a diagnostics, e.g when duplicating /// a symbol in a scope. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DiagnosticRelatedInformation { /// The location of this related diagnostic information. pub location: Location, @@ -6277,10 +6863,50 @@ pub struct DiagnosticRelatedInformation { pub message: String, } +/// Edit range variant that includes ranges for insert and replace operations. +/// +/// @since 3.18.0 +/// @proposed +#[cfg(feature = "proposed")] +#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct EditRangeWithInsertReplace { + pub insert: Range, + + pub replace: Range, +} + +/// @since 3.18.0 +/// @proposed +#[cfg(feature = "proposed")] +#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct ServerCompletionItemOptions { + /// The server has support for completion item label + /// details (see also `CompletionItemLabelDetails`) when + /// receiving a completion item in a resolve call. + /// + /// @since 3.17.0 + pub label_details_support: Option, +} + +/// @since 3.18.0 +/// @proposed +/// @deprecated use MarkupContent instead. +#[deprecated] +#[cfg(feature = "proposed")] +#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct MarkedStringWithLanguage { + pub language: String, + + pub value: String, +} + /// Represents a parameter of a callable-signature. A parameter can /// have a label and a doc-comment. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct ParameterInformation { /// The human-readable doc-comment of this parameter. Will be shown /// in the UI but can be omitted. @@ -6302,7 +6928,7 @@ pub struct ParameterInformation { /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct NotebookCellTextDocumentFilter { /// A language id like `python`. /// @@ -6321,14 +6947,14 @@ pub struct NotebookCellTextDocumentFilter { /// /// @since 3.16.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct FileOperationPatternOptions { /// The pattern should be matched ignoring casing. pub ignore_case: Option, } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct ExecutionSummary { /// A strict monotonically increasing value /// indicating the execution order of a cell @@ -6340,9 +6966,40 @@ pub struct ExecutionSummary { pub success: Option, } +/// Structural changes to cells in a notebook document. +/// +/// @since 3.18.0 +/// @proposed +#[cfg(feature = "proposed")] +#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct NotebookDocumentCellChangeStructure { + /// The change to the cell array. + pub array: NotebookCellArrayChange, + + /// Additional closed cell text documents. + pub did_close: Option>, + + /// Additional opened cell text documents. + pub did_open: Option>, +} + +/// Content changes to a cell in a notebook document. +/// +/// @since 3.18.0 +/// @proposed +#[cfg(feature = "proposed")] +#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct NotebookDocumentCellContentChanges { + pub changes: Vec, + + pub document: VersionedTextDocumentIdentifier, +} + /// Workspace specific client capabilities. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WorkspaceClientCapabilities { /// The client supports applying batch edits /// to the workspace by supporting the request @@ -6384,7 +7041,7 @@ pub struct WorkspaceClientCapabilities { /// /// @since 3.18.0 /// @proposed - #[cfg(feature = "proposed", since = "3.18.0")] + #[cfg(feature = "proposed")] pub folding_range: Option, /// Capabilities specific to the inlay hint requests scoped to the @@ -6419,7 +7076,7 @@ pub struct WorkspaceClientCapabilities { /// Text document specific client capabilities. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentClientCapabilities { /// Capabilities specific to the various call hierarchy requests. /// @@ -6488,7 +7145,7 @@ pub struct TextDocumentClientCapabilities { /// /// @since 3.18.0 /// @proposed - #[cfg(feature = "proposed", since = "3.18.0")] + #[cfg(feature = "proposed")] pub inline_completion: Option, /// Capabilities specific to the `textDocument/inlineValue` request. @@ -6552,7 +7209,7 @@ pub struct TextDocumentClientCapabilities { /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct NotebookDocumentClientCapabilities { /// Capabilities specific to notebook document synchronization /// @@ -6561,7 +7218,7 @@ pub struct NotebookDocumentClientCapabilities { } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WindowClientCapabilities { /// Capabilities specific to the showDocument request. /// @@ -6585,23 +7242,11 @@ pub struct WindowClientCapabilities { pub work_done_progress: Option, } -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct StructStaleRequestSupport { - /// The client will actively cancel the request. - pub cancel: bool, - - /// The list of requests for which the client - /// will retry the request if it receives a - /// response with error code `ContentModified` - pub retry_on_content_modified: Vec, -} - /// General client capabilities. /// /// @since 3.16.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct GeneralClientCapabilities { /// Client capabilities specific to the client's markdown parser. /// @@ -6639,7 +7284,78 @@ pub struct GeneralClientCapabilities { /// anymore since the information is outdated). /// /// @since 3.17.0 - pub stale_request_support: Option, + pub stale_request_support: Option, +} + +/// @since 3.18.0 +/// @proposed +#[cfg(feature = "proposed")] +#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct NotebookDocumentFilterWithNotebook { + /// The cells of the matching notebook to be synced. + pub cells: Option>, + + /// The notebook to be synced If a string + /// value is provided it matches against the + /// notebook type. '*' matches every notebook. + pub notebook: OR2, +} + +/// @since 3.18.0 +/// @proposed +#[cfg(feature = "proposed")] +#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct NotebookDocumentFilterWithCells { + /// The cells of the matching notebook to be synced. + pub cells: Vec, + + /// The notebook to be synced If a string + /// value is provided it matches against the + /// notebook type. '*' matches every notebook. + pub notebook: Option>, +} + +#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct WorkspaceFoldersServerCapabilities { + /// 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. + pub change_notifications: Option>, + + /// The server has support for workspace folders + pub supported: Option, +} + +/// Options for notifications/requests for user operations on files. +/// +/// @since 3.16.0 +#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct FileOperationOptions { + /// The server is interested in receiving didCreateFiles notifications. + pub did_create: Option, + + /// The server is interested in receiving didDeleteFiles file notifications. + pub did_delete: Option, + + /// The server is interested in receiving didRenameFiles notifications. + pub did_rename: Option, + + /// The server is interested in receiving willCreateFiles requests. + pub will_create: Option, + + /// The server is interested in receiving willDeleteFiles file requests. + pub will_delete: Option, + + /// The server is interested in receiving willRenameFiles requests. + pub will_rename: Option, } /// A relative pattern is a helper to construct glob patterns that are matched @@ -6648,7 +7364,7 @@ pub struct GeneralClientCapabilities { /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct RelativePattern { /// A workspace folder or a base URI to which this pattern will be matched /// against relatively. @@ -6658,23 +7374,85 @@ pub struct RelativePattern { pub pattern: Pattern, } +/// A document filter where `language` is required field. +/// +/// @since 3.18.0 +/// @proposed +#[cfg(feature = "proposed")] #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct StructChangeAnnotationSupport { - /// 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. - pub groups_on_label: Option, +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct TextDocumentFilterLanguage { + /// A language id, like `typescript`. + pub language: String, + + /// A glob pattern, like **​/*.{ts,js}. See TextDocumentFilter for examples. + pub pattern: Option, + + /// A Uri [scheme][`Uri::scheme`], like `file` or `untitled`. + pub scheme: Option, +} + +/// A document filter where `scheme` is required field. +/// +/// @since 3.18.0 +/// @proposed +#[cfg(feature = "proposed")] +#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct TextDocumentFilterScheme { + /// A language id, like `typescript`. + pub language: Option, + + /// A glob pattern, like **​/*.{ts,js}. See TextDocumentFilter for examples. + pub pattern: Option, + + /// A Uri [scheme][`Uri::scheme`], like `file` or `untitled`. + pub scheme: String, +} + +/// A document filter where `pattern` is required field. +/// +/// @since 3.18.0 +/// @proposed +#[cfg(feature = "proposed")] +#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct TextDocumentFilterPattern { + /// A language id, like `typescript`. + pub language: Option, + + /// A glob pattern, like **​/*.{ts,js}. See TextDocumentFilter for examples. + pub pattern: String, + + /// A Uri [scheme][`Uri::scheme`], like `file` or `untitled`. + pub scheme: Option, +} + +/// A change describing how to move a `NotebookCell` +/// array from state S to S'. +/// +/// @since 3.17.0 +#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct NotebookCellArrayChange { + /// The new cells, if any + pub cells: Option>, + + /// The deleted cells + pub delete_count: u32, + + /// The start oftest of the cell that changed. + pub start: u32, } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WorkspaceEditClientCapabilities { /// Whether the client in general supports change annotations on text edits, /// create file, rename file and delete file changes. /// /// @since 3.16.0 - pub change_annotation_support: Option, + pub change_annotation_support: Option, /// The client supports versioned document changes in `WorkspaceEdit`s pub document_changes: Option, @@ -6702,14 +7480,14 @@ pub struct WorkspaceEditClientCapabilities { } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DidChangeConfigurationClientCapabilities { /// Did change configuration notification supports dynamic registration. pub dynamic_registration: Option, } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DidChangeWatchedFilesClientCapabilities { /// Did change watched files notification supports dynamic registration. Please note /// that the current protocol doesn't support static configuration for file changes @@ -6723,38 +7501,9 @@ pub struct DidChangeWatchedFilesClientCapabilities { pub relative_pattern_support: Option, } -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct StructResolveSupport { - /// The properties that a client can resolve lazily. Usually - /// `location.range` - pub properties: Vec, -} - -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct StructSymbolKind { - /// 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. - pub value_set: Option>, -} - -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct StructTagSupport { - /// The tags supported by the client. - pub value_set: Vec, -} - /// Client capabilities for a [WorkspaceSymbolRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WorkspaceSymbolClientCapabilities { /// Symbol request supports dynamic registration. pub dynamic_registration: Option, @@ -6764,21 +7513,21 @@ pub struct WorkspaceSymbolClientCapabilities { /// properties. /// /// @since 3.17.0 - pub resolve_support: Option, + pub resolve_support: Option, /// Specific capabilities for the `SymbolKind` in the `workspace/symbol` request. - pub symbol_kind: Option, + pub symbol_kind: Option, /// The client supports tags on `SymbolInformation`. /// Clients supporting tags have to handle unknown tags gracefully. /// /// @since 3.16.0 - pub tag_support: Option, + pub tag_support: Option, } /// The client capabilities of a [ExecuteCommandRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct ExecuteCommandClientCapabilities { /// Execute command supports dynamic registration. pub dynamic_registration: Option, @@ -6786,7 +7535,7 @@ pub struct ExecuteCommandClientCapabilities { /// @since 3.16.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct SemanticTokensWorkspaceClientCapabilities { /// Whether the client implementation supports a refresh request sent from /// the server to the client. @@ -6800,7 +7549,7 @@ pub struct SemanticTokensWorkspaceClientCapabilities { /// @since 3.16.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct CodeLensWorkspaceClientCapabilities { /// Whether the client implementation supports a refresh request sent from the /// server to the client. @@ -6819,7 +7568,7 @@ pub struct CodeLensWorkspaceClientCapabilities { /// /// @since 3.16.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct FileOperationClientCapabilities { /// The client has support for sending didCreateFiles notifications. pub did_create: Option, @@ -6847,7 +7596,7 @@ pub struct FileOperationClientCapabilities { /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct InlineValueWorkspaceClientCapabilities { /// Whether the client implementation supports a refresh request sent from the /// server to the client. @@ -6863,7 +7612,7 @@ pub struct InlineValueWorkspaceClientCapabilities { /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct InlayHintWorkspaceClientCapabilities { /// Whether the client implementation supports a refresh request sent from /// the server to the client. @@ -6879,7 +7628,7 @@ pub struct InlayHintWorkspaceClientCapabilities { /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DiagnosticWorkspaceClientCapabilities { /// Whether the client implementation supports a refresh request sent from /// the server to the client. @@ -6895,9 +7644,9 @@ pub struct DiagnosticWorkspaceClientCapabilities { /// /// @since 3.18.0 /// @proposed -#[cfg(feature = "proposed", since = "3.18.0")] +#[cfg(feature = "proposed")] #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct FoldingRangeWorkspaceClientCapabilities { /// Whether the client implementation supports a refresh request sent from the /// server to the client. @@ -6909,12 +7658,12 @@ pub struct FoldingRangeWorkspaceClientCapabilities { /// /// @since 3.18.0 /// @proposed - #[cfg(feature = "proposed", since = "3.18.0")] + #[cfg(feature = "proposed")] pub refresh_support: Option, } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentSyncClientCapabilities { /// The client supports did save notifications. pub did_save: Option, @@ -6931,128 +7680,21 @@ pub struct TextDocumentSyncClientCapabilities { pub will_save_wait_until: Option, } +/// Completion client capabilities #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct StructTagSupportValue { - /// The tags supported by the client. - pub value_set: Vec, -} - -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct StructResolveSupportProperties { - /// The properties that a client can resolve lazily. - pub properties: Vec, -} +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct CompletionClientCapabilities { + /// The client supports the following `CompletionItem` specific + /// capabilities. + pub completion_item: Option, -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct StructInsertTextModeSupport { - pub value_set: Vec, -} + pub completion_item_kind: Option, -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct StructCompletionItemOptions { - /// Client supports snippets as insert text. + /// The client supports the following `CompletionList` specific + /// capabilities. /// - /// 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. - pub snippet_support: Option, - - /// Client supports commit characters on a completion item. - pub commit_characters_support: Option, - - /// Client supports the following content formats for the documentation - /// property. The order describes the preferred format of the client. - pub documentation_format: Option>, - - /// Client supports the deprecated property on a completion item. - pub deprecated_support: Option, - - /// Client supports the preselect property on a completion item. - pub preselect_support: Option, - - /// 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 - pub tag_support: Option, - - /// 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 - pub insert_replace_support: Option, - - /// Indicates which properties a client can resolve lazily on a completion - /// item. Before version 3.16.0 only the predefined properties `documentation` - /// and `details` could be resolved lazily. - /// - /// @since 3.16.0 - pub resolve_support: Option, - - /// The client supports the `insertTextMode` property on - /// a completion item to override the whitespace handling mode - /// as defined by the client (see `insertTextMode`). - /// - /// @since 3.16.0 - pub insert_text_mode_support: Option, - - /// The client has support for completion item label - /// details (see also `CompletionItemLabelDetails`). - /// - /// @since 3.17.0 - pub label_details_support: Option, -} - -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct StructCompletionItemKind { - /// 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. - pub value_set: Option>, -} - -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct StructCompletionList { - /// 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 - pub item_defaults: Option>, -} - -/// Completion client capabilities -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct CompletionClientCapabilities { - /// The client supports the following `CompletionItem` specific - /// capabilities. - pub completion_item: Option, - - pub completion_item_kind: Option, - - /// The client supports the following `CompletionList` specific - /// capabilities. - /// - /// @since 3.17.0 - pub completion_list: Option, + /// @since 3.17.0 + pub completion_list: Option, /// The client supports to send additional context information for a /// `textDocument/completion` request. @@ -7070,7 +7712,7 @@ pub struct CompletionClientCapabilities { } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct HoverClientCapabilities { /// Client supports the following content formats for the content /// property. The order describes the preferred format of the client. @@ -7080,36 +7722,9 @@ pub struct HoverClientCapabilities { pub dynamic_registration: Option, } -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct StructParameterInformation { - /// The client supports processing label offsets instead of a - /// simple label string. - /// - /// @since 3.14.0 - pub label_offset_support: Option, -} - -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct StructSignatureInformation { - /// Client supports the following content formats for the documentation - /// property. The order describes the preferred format of the client. - pub documentation_format: Option>, - - /// Client capabilities specific to parameter information. - pub parameter_information: Option, - - /// The client supports the `activeParameter` property on `SignatureInformation` - /// literal. - /// - /// @since 3.16.0 - pub active_parameter_support: Option, -} - /// Client Capabilities for a [SignatureHelpRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct SignatureHelpClientCapabilities { /// The client supports to send additional context information for a /// `textDocument/signatureHelp` request. A client that opts into @@ -7124,12 +7739,12 @@ pub struct SignatureHelpClientCapabilities { /// The client supports the following `SignatureInformation` /// specific properties. - pub signature_information: Option, + pub signature_information: Option, } /// @since 3.14.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DeclarationClientCapabilities { /// Whether declaration supports dynamic registration. If this is set to `true` /// the client supports the new `DeclarationRegistrationOptions` return value @@ -7142,7 +7757,7 @@ pub struct DeclarationClientCapabilities { /// Client Capabilities for a [DefinitionRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DefinitionClientCapabilities { /// Whether definition supports dynamic registration. pub dynamic_registration: Option, @@ -7155,7 +7770,7 @@ pub struct DefinitionClientCapabilities { /// Since 3.6.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TypeDefinitionClientCapabilities { /// Whether implementation supports dynamic registration. If this is set to `true` /// the client supports the new `TypeDefinitionRegistrationOptions` return value @@ -7170,7 +7785,7 @@ pub struct TypeDefinitionClientCapabilities { /// @since 3.6.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct ImplementationClientCapabilities { /// Whether implementation supports dynamic registration. If this is set to `true` /// the client supports the new `ImplementationRegistrationOptions` return value @@ -7185,7 +7800,7 @@ pub struct ImplementationClientCapabilities { /// Client Capabilities for a [ReferencesRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct ReferenceClientCapabilities { /// Whether references supports dynamic registration. pub dynamic_registration: Option, @@ -7193,36 +7808,15 @@ pub struct ReferenceClientCapabilities { /// Client Capabilities for a [DocumentHighlightRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DocumentHighlightClientCapabilities { /// Whether document highlight supports dynamic registration. pub dynamic_registration: Option, } -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct StructSymbolKindOptions { - /// 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. - pub value_set: Option>, -} - -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct StructTagSupportValueSet { - /// The tags supported by the client. - pub value_set: Vec, -} - /// Client Capabilities for a [DocumentSymbolRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DocumentSymbolClientCapabilities { /// Whether document symbol supports dynamic registration. pub dynamic_registration: Option, @@ -7238,51 +7832,26 @@ pub struct DocumentSymbolClientCapabilities { /// Specific capabilities for the `SymbolKind` in the /// `textDocument/documentSymbol` request. - pub symbol_kind: Option, + pub symbol_kind: Option, /// The client supports tags on `SymbolInformation`. Tags are supported on /// `DocumentSymbol` if `hierarchicalDocumentSymbolSupport` is set to true. /// Clients supporting tags have to handle unknown tags gracefully. /// /// @since 3.16.0 - pub tag_support: Option, -} - -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct StructCodeActionKind { - /// 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. - pub value_set: Vec>, -} - -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct StructCodeActionLiteralSupport { - /// The code action kind is support with the following value - /// set. - pub code_action_kind: StructCodeActionKind, -} - -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct StructResolveSupportProperties2 { - /// The properties that a client can resolve lazily. - pub properties: Vec, + pub tag_support: Option, } /// The Client Capabilities of a [CodeActionRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct CodeActionClientCapabilities { /// The client support code action literals of type `CodeAction` as a valid /// response of the `textDocument/codeAction` request. If the property is not /// set the request can only return `Command` literals. /// /// @since 3.8.0 - pub code_action_literal_support: Option, + pub code_action_literal_support: Option, /// Whether code action supports the `data` property which is /// preserved between a `textDocument/codeAction` and a @@ -7317,12 +7886,12 @@ pub struct CodeActionClientCapabilities { /// properties via a separate `codeAction/resolve` request. /// /// @since 3.16.0 - pub resolve_support: Option, + pub resolve_support: Option, } /// The client capabilities of a [CodeLensRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct CodeLensClientCapabilities { /// Whether code lens supports dynamic registration. pub dynamic_registration: Option, @@ -7330,7 +7899,7 @@ pub struct CodeLensClientCapabilities { /// The client capabilities of a [DocumentLinkRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DocumentLinkClientCapabilities { /// Whether document link supports dynamic registration. pub dynamic_registration: Option, @@ -7342,7 +7911,7 @@ pub struct DocumentLinkClientCapabilities { } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DocumentColorClientCapabilities { /// Whether implementation supports dynamic registration. If this is set to `true` /// the client supports the new `DocumentColorRegistrationOptions` return value @@ -7352,7 +7921,7 @@ pub struct DocumentColorClientCapabilities { /// Client capabilities of a [DocumentFormattingRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DocumentFormattingClientCapabilities { /// Whether formatting supports dynamic registration. pub dynamic_registration: Option, @@ -7360,7 +7929,7 @@ pub struct DocumentFormattingClientCapabilities { /// Client capabilities of a [DocumentRangeFormattingRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DocumentRangeFormattingClientCapabilities { /// Whether range formatting supports dynamic registration. pub dynamic_registration: Option, @@ -7369,20 +7938,20 @@ pub struct DocumentRangeFormattingClientCapabilities { /// /// @since 3.18.0 /// @proposed - #[cfg(feature = "proposed", since = "3.18.0")] + #[cfg(feature = "proposed")] pub ranges_support: Option, } /// Client capabilities of a [DocumentOnTypeFormattingRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DocumentOnTypeFormattingClientCapabilities { /// Whether on type formatting supports dynamic registration. pub dynamic_registration: Option, } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct RenameClientCapabilities { /// Whether rename supports dynamic registration. pub dynamic_registration: Option, @@ -7412,27 +7981,7 @@ pub struct RenameClientCapabilities { } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct StructFoldingRange { - /// 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 - pub collapsed_text: Option, -} - -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct StructFoldingRangeKind { - /// 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. - pub value_set: Option>>, -} - -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct FoldingRangeClientCapabilities { /// Whether implementation supports dynamic registration for folding range /// providers. If this is set to `true` the client supports the new @@ -7443,12 +7992,12 @@ pub struct FoldingRangeClientCapabilities { /// Specific options for the folding range. /// /// @since 3.17.0 - pub folding_range: Option, + pub folding_range: Option, /// Specific options for the folding range kind. /// /// @since 3.17.0 - pub folding_range_kind: Option, + pub folding_range_kind: Option, /// If set, the client signals that it only supports folding complete lines. /// If set, client will ignore specified `startCharacter` and `endCharacter` @@ -7462,7 +8011,7 @@ pub struct FoldingRangeClientCapabilities { } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct SelectionRangeClientCapabilities { /// 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 @@ -7470,16 +8019,9 @@ pub struct SelectionRangeClientCapabilities { pub dynamic_registration: Option, } -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct StructTagSupportValueSet2 { - /// The tags supported by the client. - pub value_set: Vec, -} - /// The publish diagnostic client capabilities. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct PublishDiagnosticsClientCapabilities { /// Client supports a codeDescription property /// @@ -7500,7 +8042,7 @@ pub struct PublishDiagnosticsClientCapabilities { /// Clients supporting tags have to handle unknown tags gracefully. /// /// @since 3.15.0 - pub tag_support: Option, + pub tag_support: Option, /// Whether the client interprets the version property of the /// `textDocument/publishDiagnostics` notification's parameter. @@ -7511,7 +8053,7 @@ pub struct PublishDiagnosticsClientCapabilities { /// @since 3.16.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct CallHierarchyClientCapabilities { /// Whether implementation supports dynamic registration. If this is set to `true` /// the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` @@ -7519,29 +8061,9 @@ pub struct CallHierarchyClientCapabilities { pub dynamic_registration: Option, } -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct StructOptions2 { - /// The client will send the `textDocument/semanticTokens/full/delta` request if - /// the server provides a corresponding handler. - pub delta: Option, -} - -#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct StructRequests { - /// The client will send the `textDocument/semanticTokens/range` request if - /// the server provides a corresponding handler. - pub range: Option>, - - /// The client will send the `textDocument/semanticTokens/full` request if - /// the server provides a corresponding handler. - pub full: Option>, -} - /// @since 3.16.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct SemanticTokensClientCapabilities { /// Whether the client uses semantic tokens to augment existing /// syntax tokens. If set to `true` client side created syntax @@ -7569,203 +8091,592 @@ pub struct SemanticTokensClientCapabilities { /// Whether the client supports tokens that can overlap each other. pub overlapping_token_support: Option, - /// 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. - pub requests: StructRequests, + /// 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. + pub requests: ClientSemanticTokensRequestOptions, + + /// 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 + pub server_cancel_support: Option, + + /// The token modifiers that the client supports. + pub token_modifiers: Vec, + + /// The token types that the client supports. + pub token_types: Vec, +} + +/// Client capabilities for the linked editing range request. +/// +/// @since 3.16.0 +#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct LinkedEditingRangeClientCapabilities { + /// 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. + pub dynamic_registration: Option, +} + +/// Client capabilities specific to the moniker request. +/// +/// @since 3.16.0 +#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct MonikerClientCapabilities { + /// 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. + pub dynamic_registration: Option, +} + +/// @since 3.17.0 +#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct TypeHierarchyClientCapabilities { + /// 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. + pub dynamic_registration: Option, +} + +/// Client capabilities specific to inline values. +/// +/// @since 3.17.0 +#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct InlineValueClientCapabilities { + /// Whether implementation supports dynamic registration for inline value providers. + pub dynamic_registration: Option, +} + +/// Inlay hint client capabilities. +/// +/// @since 3.17.0 +#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct InlayHintClientCapabilities { + /// Whether inlay hints support dynamic registration. + pub dynamic_registration: Option, + + /// Indicates which properties a client can resolve lazily on an inlay + /// hint. + pub resolve_support: Option, +} + +/// Client capabilities specific to diagnostic pull requests. +/// +/// @since 3.17.0 +#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct DiagnosticClientCapabilities { + /// 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. + pub dynamic_registration: Option, + + /// Whether the clients supports related documents for document diagnostic pulls. + pub related_document_support: Option, +} + +/// Client capabilities specific to inline completions. +/// +/// @since 3.18.0 +/// @proposed +#[cfg(feature = "proposed")] +#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct InlineCompletionClientCapabilities { + /// Whether implementation supports dynamic registration for inline completion providers. + pub dynamic_registration: Option, +} + +/// Notebook specific client capabilities. +/// +/// @since 3.17.0 +#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct NotebookDocumentSyncClientCapabilities { + /// 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. + pub dynamic_registration: Option, + + /// The client supports sending execution summary data per cell. + pub execution_summary_support: Option, +} + +/// Show message request client capabilities +#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct ShowMessageRequestClientCapabilities { + /// Capabilities specific to the `MessageActionItem` type. + pub message_action_item: Option, +} + +/// Client capabilities for the showDocument request. +/// +/// @since 3.16.0 +#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct ShowDocumentClientCapabilities { + /// The client has support for the showDocument + /// request. + pub support: bool, +} + +/// @since 3.18.0 +/// @proposed +#[cfg(feature = "proposed")] +#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct StaleRequestSupportOptions { + /// The client will actively cancel the request. + pub cancel: bool, + + /// The list of requests for which the client + /// will retry the request if it receives a + /// response with error code `ContentModified` + pub retry_on_content_modified: Vec, +} + +/// Client capabilities specific to regular expressions. +/// +/// @since 3.16.0 +#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct RegularExpressionsClientCapabilities { + /// The engine's name. + pub engine: String, + + /// The engine's version. + pub version: Option, +} + +/// Client capabilities specific to the used markdown parser. +/// +/// @since 3.16.0 +#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct MarkdownClientCapabilities { + /// A list of HTML tags that the client allows / supports in + /// Markdown. + /// + /// @since 3.17.0 + pub allowed_tags: Option>, + + /// The name of the parser. + pub parser: String, + + /// The version of the parser. + pub version: Option, +} + +/// @since 3.18.0 +/// @proposed +#[cfg(feature = "proposed")] +#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct NotebookCellLanguage { + pub language: String, +} + +/// A notebook document filter where `notebookType` is required field. +/// +/// @since 3.18.0 +/// @proposed +#[cfg(feature = "proposed")] +#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct NotebookDocumentFilterNotebookType { + /// The type of the enclosing notebook. + pub notebook_type: String, + + /// A glob pattern. + pub pattern: Option, + + /// A Uri [scheme][`Uri::scheme`], like `file` or `untitled`. + pub scheme: Option, +} + +/// A notebook document filter where `scheme` is required field. +/// +/// @since 3.18.0 +/// @proposed +#[cfg(feature = "proposed")] +#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct NotebookDocumentFilterScheme { + /// The type of the enclosing notebook. + pub notebook_type: Option, + + /// A glob pattern. + pub pattern: Option, + + /// A Uri [scheme][`Uri::scheme`], like `file` or `untitled`. + pub scheme: String, +} + +/// A notebook document filter where `pattern` is required field. +/// +/// @since 3.18.0 +/// @proposed +#[cfg(feature = "proposed")] +#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct NotebookDocumentFilterPattern { + /// The type of the enclosing notebook. + pub notebook_type: Option, + + /// A glob pattern. + pub pattern: String, + + /// A Uri [scheme][`Uri::scheme`], like `file` or `untitled`. + pub scheme: Option, +} + +/// @since 3.18.0 +/// @proposed +#[cfg(feature = "proposed")] +#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct ChangeAnnotationsSupportOptions { + /// 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. + pub groups_on_label: Option, +} + +/// @since 3.18.0 +/// @proposed +#[cfg(feature = "proposed")] +#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct ClientSymbolKindOptions { + /// 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. + pub value_set: Option>, +} + +/// @since 3.18.0 +/// @proposed +#[cfg(feature = "proposed")] +#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct ClientSymbolTagOptions { + /// The tags supported by the client. + pub value_set: Vec, +} + +/// @since 3.18.0 +/// @proposed +#[cfg(feature = "proposed")] +#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct ClientSymbolResolveOptions { + /// The properties that a client can resolve lazily. Usually + /// `location.range` + pub properties: Vec, +} + +/// @since 3.18.0 +/// @proposed +#[cfg(feature = "proposed")] +#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct ClientCompletionItemOptions { + /// Client supports commit characters on a completion item. + pub commit_characters_support: Option, + + /// Client supports the deprecated property on a completion item. + pub deprecated_support: Option, + + /// Client supports the following content formats for the documentation + /// property. The order describes the preferred format of the client. + pub documentation_format: Option>, + + /// 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 + pub insert_replace_support: Option, + + /// The client supports the `insertTextMode` property on + /// a completion item to override the whitespace handling mode + /// as defined by the client (see `insertTextMode`). + /// + /// @since 3.16.0 + pub insert_text_mode_support: Option, - /// 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. + /// The client has support for completion item label + /// details (see also `CompletionItemLabelDetails`). /// /// @since 3.17.0 - pub server_cancel_support: Option, + pub label_details_support: Option, - /// The token modifiers that the client supports. - pub token_modifiers: Vec, + /// Client supports the preselect property on a completion item. + pub preselect_support: Option, - /// The token types that the client supports. - pub token_types: Vec, + /// Indicates which properties a client can resolve lazily on a completion + /// item. Before version 3.16.0 only the predefined properties `documentation` + /// and `details` could be resolved lazily. + /// + /// @since 3.16.0 + pub resolve_support: Option, + + /// 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. + pub snippet_support: Option, + + /// 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 + pub tag_support: Option, } -/// Client capabilities for the linked editing range request. -/// -/// @since 3.16.0 +/// @since 3.18.0 +/// @proposed +#[cfg(feature = "proposed")] #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct LinkedEditingRangeClientCapabilities { - /// 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. - pub dynamic_registration: Option, +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct ClientCompletionItemOptionsKind { + /// 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. + pub value_set: Option>, } -/// Client capabilities specific to the moniker request. +/// The client supports the following `CompletionList` specific +/// capabilities. /// -/// @since 3.16.0 +/// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct MonikerClientCapabilities { - /// 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. - pub dynamic_registration: Option, +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct CompletionListCapabilities { + /// 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 + pub item_defaults: Option>, } -/// @since 3.17.0 +/// @since 3.18.0 +/// @proposed +#[cfg(feature = "proposed")] #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct TypeHierarchyClientCapabilities { - /// 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. - pub dynamic_registration: Option, +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct ClientSignatureInformationOptions { + /// The client supports the `activeParameter` property on `SignatureInformation` + /// literal. + /// + /// @since 3.16.0 + pub active_parameter_support: Option, + + /// Client supports the following content formats for the documentation + /// property. The order describes the preferred format of the client. + pub documentation_format: Option>, + + /// Client capabilities specific to parameter information. + pub parameter_information: Option, } -/// Client capabilities specific to inline values. -/// -/// @since 3.17.0 +/// @since 3.18.0 +/// @proposed +#[cfg(feature = "proposed")] #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct InlineValueClientCapabilities { - /// Whether implementation supports dynamic registration for inline value providers. - pub dynamic_registration: Option, +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct ClientCodeActionLiteralOptions { + /// The code action kind is support with the following value + /// set. + pub code_action_kind: ClientCodeActionKindOptions, } +/// @since 3.18.0 +/// @proposed +#[cfg(feature = "proposed")] #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct StructResolveSupportProperties3 { +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct ClientCodeActionResolveOptions { /// The properties that a client can resolve lazily. pub properties: Vec, } -/// Inlay hint client capabilities. -/// -/// @since 3.17.0 +/// @since 3.18.0 +/// @proposed +#[cfg(feature = "proposed")] #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct InlayHintClientCapabilities { - /// Whether inlay hints support dynamic registration. - pub dynamic_registration: Option, - - /// Indicates which properties a client can resolve lazily on an inlay - /// hint. - pub resolve_support: Option, +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct ClientFoldingRangeKindOptions { + /// 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. + pub value_set: Option>>, } -/// Client capabilities specific to diagnostic pull requests. -/// -/// @since 3.17.0 +/// @since 3.18.0 +/// @proposed +#[cfg(feature = "proposed")] #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct DiagnosticClientCapabilities { - /// 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. - pub dynamic_registration: Option, - - /// Whether the clients supports related documents for document diagnostic pulls. - pub related_document_support: Option, +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct ClientFoldingRangeOptions { + /// 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 + pub collapsed_text: Option, } -/// Client capabilities specific to inline completions. -/// /// @since 3.18.0 /// @proposed -#[cfg(feature = "proposed", since = "3.18.0")] +#[cfg(feature = "proposed")] #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct InlineCompletionClientCapabilities { - /// Whether implementation supports dynamic registration for inline completion providers. - pub dynamic_registration: Option, +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct ClientDiagnosticsTagOptions { + /// The tags supported by the client. + pub value_set: Vec, } -/// Notebook specific client capabilities. -/// -/// @since 3.17.0 +/// @since 3.18.0 +/// @proposed +#[cfg(feature = "proposed")] #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct NotebookDocumentSyncClientCapabilities { - /// 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. - pub dynamic_registration: Option, +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct ClientSemanticTokensRequestOptions { + /// The client will send the `textDocument/semanticTokens/full` request if + /// the server provides a corresponding handler. + pub full: Option>, - /// The client supports sending execution summary data per cell. - pub execution_summary_support: Option, + /// The client will send the `textDocument/semanticTokens/range` request if + /// the server provides a corresponding handler. + pub range: Option>, +} + +/// @since 3.18.0 +/// @proposed +#[cfg(feature = "proposed")] +#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct ClientInlayHintResolveOptions { + /// The properties that a client can resolve lazily. + pub properties: Vec, } +/// @since 3.18.0 +/// @proposed +#[cfg(feature = "proposed")] #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct StructMessageActionItem { +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct ClientShowMessageActionItemOptions { /// Whether the client supports additional attributes which /// are preserved and send back to the server in the /// request's response. pub additional_properties_support: Option, } -/// Show message request client capabilities +/// @since 3.18.0 +/// @proposed +#[cfg(feature = "proposed")] #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct ShowMessageRequestClientCapabilities { - /// Capabilities specific to the `MessageActionItem` type. - pub message_action_item: Option, +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct CompletionItemTagOptions { + /// The tags supported by the client. + pub value_set: Vec, } -/// Client capabilities for the showDocument request. -/// -/// @since 3.16.0 +/// @since 3.18.0 +/// @proposed +#[cfg(feature = "proposed")] #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct ShowDocumentClientCapabilities { - /// The client has support for the showDocument - /// request. - pub support: bool, +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct ClientCompletionItemResolveOptions { + /// The properties that a client can resolve lazily. + pub properties: Vec, } -/// Client capabilities specific to regular expressions. -/// -/// @since 3.16.0 +/// @since 3.18.0 +/// @proposed +#[cfg(feature = "proposed")] #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct RegularExpressionsClientCapabilities { - /// The engine's name. - pub engine: String, - - /// The engine's version. - pub version: Option, +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct ClientCompletionItemInsertTextModeOptions { + pub value_set: Vec, } -/// Client capabilities specific to the used markdown parser. -/// -/// @since 3.16.0 +/// @since 3.18.0 +/// @proposed +#[cfg(feature = "proposed")] #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] -pub struct MarkdownClientCapabilities { - /// A list of HTML tags that the client allows / supports in - /// Markdown. +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct ClientSignatureParameterInformationOptions { + /// The client supports processing label offsets instead of a + /// simple label string. /// - /// @since 3.17.0 - pub allowed_tags: Option>, + /// @since 3.14.0 + pub label_offset_support: Option, +} - /// The name of the parser. - pub parser: String, +/// @since 3.18.0 +/// @proposed +#[cfg(feature = "proposed")] +#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct ClientCodeActionKindOptions { + /// 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. + pub value_set: Vec>, +} - /// The version of the parser. - pub version: Option, +/// @since 3.18.0 +/// @proposed +#[cfg(feature = "proposed")] +#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct ClientSemanticTokensRequestFullDelta { + /// The client will send the `textDocument/semanticTokens/full/delta` request if + /// the server provides a corresponding handler. + pub delta: Option, } /// The `workspace/didChangeWorkspaceFolders` notification is sent from the client to the server when the workspace /// folder configuration changes. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WorkspaceDidChangeWorkspaceFoldersNotification { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -7779,7 +8690,7 @@ pub struct WorkspaceDidChangeWorkspaceFoldersNotification { /// The `window/workDoneProgress/cancel` notification is sent from the client to the server to cancel a progress /// initiated on the server side. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WindowWorkDoneProgressCancelNotification { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -7795,7 +8706,7 @@ pub struct WindowWorkDoneProgressCancelNotification { /// /// @since 3.16.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WorkspaceDidCreateFilesNotification { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -7811,7 +8722,7 @@ pub struct WorkspaceDidCreateFilesNotification { /// /// @since 3.16.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WorkspaceDidRenameFilesNotification { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -7827,7 +8738,7 @@ pub struct WorkspaceDidRenameFilesNotification { /// /// @since 3.16.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WorkspaceDidDeleteFilesNotification { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -7842,7 +8753,7 @@ pub struct WorkspaceDidDeleteFilesNotification { /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct NotebookDocumentDidOpenNotification { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -7854,7 +8765,7 @@ pub struct NotebookDocumentDidOpenNotification { } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct NotebookDocumentDidChangeNotification { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -7869,7 +8780,7 @@ pub struct NotebookDocumentDidChangeNotification { /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct NotebookDocumentDidSaveNotification { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -7884,7 +8795,7 @@ pub struct NotebookDocumentDidSaveNotification { /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct NotebookDocumentDidCloseNotification { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -7899,7 +8810,7 @@ pub struct NotebookDocumentDidCloseNotification { /// server after the client is fully initialized and the server /// is allowed to send requests from the server to the client. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct InitializedNotification { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -7907,26 +8818,28 @@ pub struct InitializedNotification { /// The method to be invoked. pub method: LSPNotificationMethods, - pub params: InitializedParams, + pub params: Option, } /// The exit event is sent from the client to the server to /// ask the server to exit its process. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct ExitNotification { /// The version of the JSON RPC protocol. pub jsonrpc: String, /// The method to be invoked. pub method: LSPNotificationMethods, + + pub params: Option, } /// 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. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WorkspaceDidChangeConfigurationNotification { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -7940,7 +8853,7 @@ pub struct WorkspaceDidChangeConfigurationNotification { /// 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. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WindowShowMessageNotification { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -7954,7 +8867,7 @@ pub struct WindowShowMessageNotification { /// The log message notification is sent from the server to the client to ask /// the client to log a particular message. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WindowLogMessageNotification { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -7968,7 +8881,7 @@ pub struct WindowLogMessageNotification { /// The telemetry event notification is sent from the server to the client to ask /// the client to log telemetry data. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TelemetryEventNotification { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -7976,7 +8889,7 @@ pub struct TelemetryEventNotification { /// The method to be invoked. pub method: LSPNotificationMethods, - pub params: LSPAny, + pub params: Option, } /// The document open notification is sent from the client to the server to signal @@ -7988,7 +8901,7 @@ pub struct TelemetryEventNotification { /// This means open and close notification must be balanced and the max open count /// is one. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentDidOpenNotification { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -8002,7 +8915,7 @@ pub struct TextDocumentDidOpenNotification { /// The document change notification is sent from the client to the server to signal /// changes to a text document. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentDidChangeNotification { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -8021,7 +8934,7 @@ pub struct TextDocumentDidChangeNotification { /// doesn't mean that the document was open in an editor before. A close /// notification requires a previous open notification to be sent. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentDidCloseNotification { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -8035,7 +8948,7 @@ pub struct TextDocumentDidCloseNotification { /// The document save notification is sent from the client to the server when /// the document got saved in the client. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentDidSaveNotification { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -8049,7 +8962,7 @@ pub struct TextDocumentDidSaveNotification { /// A document will save notification is sent from the client to the server before /// the document is actually saved. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentWillSaveNotification { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -8063,7 +8976,7 @@ pub struct TextDocumentWillSaveNotification { /// The watched files notification is sent from the client to the server when /// the client detects changes to file watched by the language client. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WorkspaceDidChangeWatchedFilesNotification { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -8077,7 +8990,7 @@ pub struct WorkspaceDidChangeWatchedFilesNotification { /// Diagnostics notification are sent from the server to the client to signal /// results of validation runs. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentPublishDiagnosticsNotification { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -8089,7 +9002,7 @@ pub struct TextDocumentPublishDiagnosticsNotification { } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct SetTraceNotification { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -8101,7 +9014,7 @@ pub struct SetTraceNotification { } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct LogTraceNotification { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -8113,7 +9026,7 @@ pub struct LogTraceNotification { } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct CancelRequestNotification { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -8125,7 +9038,7 @@ pub struct CancelRequestNotification { } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct ProgressNotification { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -8157,7 +9070,7 @@ pub enum LSPIdOptional { /// document position. The request's parameter is of type [TextDocumentPositionParams] /// the response is of type [Definition] or a Thenable that resolves to such. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentImplementationRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -8173,7 +9086,7 @@ pub struct TextDocumentImplementationRequest { /// Response to the [TextDocumentImplementationRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentImplementationResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -8192,7 +9105,7 @@ pub struct TextDocumentImplementationResponse { /// document position. The request's parameter is of type [TextDocumentPositionParams] /// the response is of type [Definition] or a Thenable that resolves to such. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentTypeDefinitionRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -8208,7 +9121,7 @@ pub struct TextDocumentTypeDefinitionRequest { /// Response to the [TextDocumentTypeDefinitionRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentTypeDefinitionResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -8225,7 +9138,7 @@ pub struct TextDocumentTypeDefinitionResponse { /// The `workspace/workspaceFolders` is sent from the server to the client to fetch the open workspace folders. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WorkspaceWorkspaceFoldersRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -8235,11 +9148,13 @@ pub struct WorkspaceWorkspaceFoldersRequest { /// The request id. pub id: LSPId, + + pub params: Option, } /// Response to the [WorkspaceWorkspaceFoldersRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WorkspaceWorkspaceFoldersResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -8262,7 +9177,7 @@ pub struct WorkspaceWorkspaceFoldersResponse { /// 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. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WorkspaceConfigurationRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -8278,7 +9193,7 @@ pub struct WorkspaceConfigurationRequest { /// Response to the [WorkspaceConfigurationRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WorkspaceConfigurationResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -8297,7 +9212,7 @@ pub struct WorkspaceConfigurationResponse { /// response is of type {@link ColorInformation ColorInformation[]} or a Thenable /// that resolves to such. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentDocumentColorRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -8313,7 +9228,7 @@ pub struct TextDocumentDocumentColorRequest { /// Response to the [TextDocumentDocumentColorRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentDocumentColorResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -8332,7 +9247,7 @@ pub struct TextDocumentDocumentColorResponse { /// response is of type {@link ColorInformation ColorInformation[]} or a Thenable /// that resolves to such. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentColorPresentationRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -8348,7 +9263,7 @@ pub struct TextDocumentColorPresentationRequest { /// Response to the [TextDocumentColorPresentationRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentColorPresentationResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -8367,7 +9282,7 @@ pub struct TextDocumentColorPresentationResponse { /// response is of type [FoldingRangeList] or a Thenable /// that resolves to such. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentFoldingRangeRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -8383,7 +9298,7 @@ pub struct TextDocumentFoldingRangeRequest { /// Response to the [TextDocumentFoldingRangeRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentFoldingRangeResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -8400,9 +9315,9 @@ pub struct TextDocumentFoldingRangeResponse { /// @since 3.18.0 /// @proposed -#[cfg(feature = "proposed", since = "3.18.0")] +#[cfg(feature = "proposed")] #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WorkspaceFoldingRangeRefreshRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -8412,11 +9327,13 @@ pub struct WorkspaceFoldingRangeRefreshRequest { /// The request id. pub id: LSPId, + + pub params: Option, } /// Response to the [WorkspaceFoldingRangeRefreshRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WorkspaceFoldingRangeRefreshResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -8435,7 +9352,7 @@ pub struct WorkspaceFoldingRangeRefreshResponse { /// 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")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentDeclarationRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -8451,7 +9368,7 @@ pub struct TextDocumentDeclarationRequest { /// Response to the [TextDocumentDeclarationRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentDeclarationResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -8471,7 +9388,7 @@ pub struct TextDocumentDeclarationResponse { /// response is of type {@link SelectionRange SelectionRange[]} or a Thenable /// that resolves to such. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentSelectionRangeRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -8487,7 +9404,7 @@ pub struct TextDocumentSelectionRangeRequest { /// Response to the [TextDocumentSelectionRangeRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentSelectionRangeResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -8505,7 +9422,7 @@ pub struct TextDocumentSelectionRangeResponse { /// The `window/workDoneProgress/create` request is sent from the server to the client to initiate progress /// reporting from the server. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WindowWorkDoneProgressCreateRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -8521,7 +9438,7 @@ pub struct WindowWorkDoneProgressCreateRequest { /// Response to the [WindowWorkDoneProgressCreateRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WindowWorkDoneProgressCreateResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -8540,7 +9457,7 @@ pub struct WindowWorkDoneProgressCreateResponse { /// /// @since 3.16.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentPrepareCallHierarchyRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -8556,7 +9473,7 @@ pub struct TextDocumentPrepareCallHierarchyRequest { /// Response to the [TextDocumentPrepareCallHierarchyRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentPrepareCallHierarchyResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -8575,7 +9492,7 @@ pub struct TextDocumentPrepareCallHierarchyResponse { /// /// @since 3.16.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct CallHierarchyIncomingCallsRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -8591,7 +9508,7 @@ pub struct CallHierarchyIncomingCallsRequest { /// Response to the [CallHierarchyIncomingCallsRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct CallHierarchyIncomingCallsResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -8610,7 +9527,7 @@ pub struct CallHierarchyIncomingCallsResponse { /// /// @since 3.16.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct CallHierarchyOutgoingCallsRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -8626,7 +9543,7 @@ pub struct CallHierarchyOutgoingCallsRequest { /// Response to the [CallHierarchyOutgoingCallsRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct CallHierarchyOutgoingCallsResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -8643,7 +9560,7 @@ pub struct CallHierarchyOutgoingCallsResponse { /// @since 3.16.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentSemanticTokensFullRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -8659,7 +9576,7 @@ pub struct TextDocumentSemanticTokensFullRequest { /// Response to the [TextDocumentSemanticTokensFullRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentSemanticTokensFullResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -8676,7 +9593,7 @@ pub struct TextDocumentSemanticTokensFullResponse { /// @since 3.16.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentSemanticTokensFullDeltaRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -8692,7 +9609,7 @@ pub struct TextDocumentSemanticTokensFullDeltaRequest { /// Response to the [TextDocumentSemanticTokensFullDeltaRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentSemanticTokensFullDeltaResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -8709,7 +9626,7 @@ pub struct TextDocumentSemanticTokensFullDeltaResponse { /// @since 3.16.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentSemanticTokensRangeRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -8725,7 +9642,7 @@ pub struct TextDocumentSemanticTokensRangeRequest { /// Response to the [TextDocumentSemanticTokensRangeRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentSemanticTokensRangeResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -8742,7 +9659,7 @@ pub struct TextDocumentSemanticTokensRangeResponse { /// @since 3.16.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WorkspaceSemanticTokensRefreshRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -8752,11 +9669,13 @@ pub struct WorkspaceSemanticTokensRefreshRequest { /// The request id. pub id: LSPId, + + pub params: Option, } /// Response to the [WorkspaceSemanticTokensRefreshRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WorkspaceSemanticTokensRefreshResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -8777,7 +9696,7 @@ pub struct WorkspaceSemanticTokensRefreshResponse { /// /// @since 3.16.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WindowShowDocumentRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -8793,7 +9712,7 @@ pub struct WindowShowDocumentRequest { /// Response to the [WindowShowDocumentRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WindowShowDocumentResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -8811,7 +9730,7 @@ pub struct WindowShowDocumentResponse { /// /// @since 3.16.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentLinkedEditingRangeRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -8827,7 +9746,7 @@ pub struct TextDocumentLinkedEditingRangeRequest { /// Response to the [TextDocumentLinkedEditingRangeRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentLinkedEditingRangeResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -8851,7 +9770,7 @@ pub struct TextDocumentLinkedEditingRangeResponse { /// /// @since 3.16.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WorkspaceWillCreateFilesRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -8867,7 +9786,7 @@ pub struct WorkspaceWillCreateFilesRequest { /// Response to the [WorkspaceWillCreateFilesRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WorkspaceWillCreateFilesResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -8887,7 +9806,7 @@ pub struct WorkspaceWillCreateFilesResponse { /// /// @since 3.16.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WorkspaceWillRenameFilesRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -8903,7 +9822,7 @@ pub struct WorkspaceWillRenameFilesRequest { /// Response to the [WorkspaceWillRenameFilesRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WorkspaceWillRenameFilesResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -8923,7 +9842,7 @@ pub struct WorkspaceWillRenameFilesResponse { /// /// @since 3.16.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WorkspaceWillDeleteFilesRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -8939,7 +9858,7 @@ pub struct WorkspaceWillDeleteFilesRequest { /// Response to the [WorkspaceWillDeleteFilesRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WorkspaceWillDeleteFilesResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -8958,7 +9877,7 @@ pub struct WorkspaceWillDeleteFilesResponse { /// The request parameter is of type [TextDocumentPositionParams]. /// The response is of type {@link Moniker Moniker[]} or `null`. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentMonikerRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -8974,7 +9893,7 @@ pub struct TextDocumentMonikerRequest { /// Response to the [TextDocumentMonikerRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentMonikerResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -8994,7 +9913,7 @@ pub struct TextDocumentMonikerResponse { /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentPrepareTypeHierarchyRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -9010,7 +9929,7 @@ pub struct TextDocumentPrepareTypeHierarchyRequest { /// Response to the [TextDocumentPrepareTypeHierarchyRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentPrepareTypeHierarchyResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -9029,7 +9948,7 @@ pub struct TextDocumentPrepareTypeHierarchyResponse { /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TypeHierarchySupertypesRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -9045,7 +9964,7 @@ pub struct TypeHierarchySupertypesRequest { /// Response to the [TypeHierarchySupertypesRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TypeHierarchySupertypesResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -9064,7 +9983,7 @@ pub struct TypeHierarchySupertypesResponse { /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TypeHierarchySubtypesRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -9080,7 +9999,7 @@ pub struct TypeHierarchySubtypesRequest { /// Response to the [TypeHierarchySubtypesRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TypeHierarchySubtypesResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -9101,7 +10020,7 @@ pub struct TypeHierarchySubtypesResponse { /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentInlineValueRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -9117,7 +10036,7 @@ pub struct TextDocumentInlineValueRequest { /// Response to the [TextDocumentInlineValueRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentInlineValueResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -9134,7 +10053,7 @@ pub struct TextDocumentInlineValueResponse { /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WorkspaceInlineValueRefreshRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -9144,11 +10063,13 @@ pub struct WorkspaceInlineValueRefreshRequest { /// The request id. pub id: LSPId, + + pub params: Option, } /// Response to the [WorkspaceInlineValueRefreshRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WorkspaceInlineValueRefreshResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -9168,7 +10089,7 @@ pub struct WorkspaceInlineValueRefreshResponse { /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentInlayHintRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -9184,7 +10105,7 @@ pub struct TextDocumentInlayHintRequest { /// Response to the [TextDocumentInlayHintRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentInlayHintResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -9205,7 +10126,7 @@ pub struct TextDocumentInlayHintResponse { /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct InlayHintResolveRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -9221,7 +10142,7 @@ pub struct InlayHintResolveRequest { /// Response to the [InlayHintResolveRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct InlayHintResolveResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -9237,7 +10158,7 @@ pub struct InlayHintResolveResponse { /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WorkspaceInlayHintRefreshRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -9247,11 +10168,13 @@ pub struct WorkspaceInlayHintRefreshRequest { /// The request id. pub id: LSPId, + + pub params: Option, } /// Response to the [WorkspaceInlayHintRefreshRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WorkspaceInlayHintRefreshResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -9269,7 +10192,7 @@ pub struct WorkspaceInlayHintRefreshResponse { /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentDiagnosticRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -9285,7 +10208,7 @@ pub struct TextDocumentDiagnosticRequest { /// Response to the [TextDocumentDiagnosticRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentDiagnosticResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -9303,7 +10226,7 @@ pub struct TextDocumentDiagnosticResponse { /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WorkspaceDiagnosticRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -9319,7 +10242,7 @@ pub struct WorkspaceDiagnosticRequest { /// Response to the [WorkspaceDiagnosticRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WorkspaceDiagnosticResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -9337,7 +10260,7 @@ pub struct WorkspaceDiagnosticResponse { /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WorkspaceDiagnosticRefreshRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -9347,11 +10270,13 @@ pub struct WorkspaceDiagnosticRefreshRequest { /// The request id. pub id: LSPId, + + pub params: Option, } /// Response to the [WorkspaceDiagnosticRefreshRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WorkspaceDiagnosticRefreshResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -9371,9 +10296,9 @@ pub struct WorkspaceDiagnosticRefreshResponse { /// /// @since 3.18.0 /// @proposed -#[cfg(feature = "proposed", since = "3.18.0")] +#[cfg(feature = "proposed")] #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentInlineCompletionRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -9389,7 +10314,7 @@ pub struct TextDocumentInlineCompletionRequest { /// Response to the [TextDocumentInlineCompletionRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentInlineCompletionResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -9407,7 +10332,7 @@ pub struct TextDocumentInlineCompletionResponse { /// The `client/registerCapability` request is sent from the server to the client to register a new capability /// handler on the client side. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct ClientRegisterCapabilityRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -9423,7 +10348,7 @@ pub struct ClientRegisterCapabilityRequest { /// Response to the [ClientRegisterCapabilityRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct ClientRegisterCapabilityResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -9440,7 +10365,7 @@ pub struct ClientRegisterCapabilityResponse { /// The `client/unregisterCapability` request is sent from the server to the client to unregister a previously registered capability /// handler on the client side. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct ClientUnregisterCapabilityRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -9456,7 +10381,7 @@ pub struct ClientUnregisterCapabilityRequest { /// Response to the [ClientUnregisterCapabilityRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct ClientUnregisterCapabilityResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -9476,7 +10401,7 @@ pub struct ClientUnregisterCapabilityResponse { /// the response if of type [InitializeResult] of a Thenable that /// resolves to such. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct InitializeRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -9492,7 +10417,7 @@ pub struct InitializeRequest { /// Response to the [InitializeRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct InitializeResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -9511,7 +10436,7 @@ pub struct InitializeResponse { /// server. The only notification that is sent after a shutdown request /// is the exit event. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct ShutdownRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -9521,11 +10446,13 @@ pub struct ShutdownRequest { /// The request id. pub id: LSPId, + + pub params: Option, } /// Response to the [ShutdownRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct ShutdownResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -9542,7 +10469,7 @@ pub struct ShutdownResponse { /// The show message request is sent from the server to the client to show a message /// and a set of options actions to the user. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WindowShowMessageRequestRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -9558,7 +10485,7 @@ pub struct WindowShowMessageRequestRequest { /// Response to the [WindowShowMessageRequestRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WindowShowMessageRequestResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -9580,7 +10507,7 @@ pub struct WindowShowMessageRequestResponse { /// server constantly fails on this request. This is done to keep the save fast and /// reliable. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentWillSaveWaitUntilRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -9596,7 +10523,7 @@ pub struct TextDocumentWillSaveWaitUntilRequest { /// Response to the [TextDocumentWillSaveWaitUntilRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentWillSaveWaitUntilResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -9621,7 +10548,7 @@ pub struct TextDocumentWillSaveWaitUntilResponse { /// request. However, properties that are needed for the initial sorting and filtering, like `sortText`, /// `filterText`, `insertText`, and `textEdit`, must not be changed during resolve. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentCompletionRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -9637,7 +10564,7 @@ pub struct TextDocumentCompletionRequest { /// Response to the [TextDocumentCompletionRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentCompletionResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -9656,7 +10583,7 @@ pub struct TextDocumentCompletionResponse { /// parameter is of type [CompletionItem] the response /// is of type [CompletionItem] or a Thenable that resolves to such. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct CompletionItemResolveRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -9672,7 +10599,7 @@ pub struct CompletionItemResolveRequest { /// Response to the [CompletionItemResolveRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct CompletionItemResolveResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -9690,7 +10617,7 @@ pub struct CompletionItemResolveResponse { /// parameter is of type [TextDocumentPosition] the response is of /// type [Hover] or a Thenable that resolves to such. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentHoverRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -9706,7 +10633,7 @@ pub struct TextDocumentHoverRequest { /// Response to the [TextDocumentHoverRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentHoverResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -9722,7 +10649,7 @@ pub struct TextDocumentHoverResponse { } #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentSignatureHelpRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -9738,7 +10665,7 @@ pub struct TextDocumentSignatureHelpRequest { /// Response to the [TextDocumentSignatureHelpRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentSignatureHelpResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -9758,7 +10685,7 @@ pub struct TextDocumentSignatureHelpResponse { /// 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")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentDefinitionRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -9774,7 +10701,7 @@ pub struct TextDocumentDefinitionRequest { /// Response to the [TextDocumentDefinitionRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentDefinitionResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -9794,7 +10721,7 @@ pub struct TextDocumentDefinitionResponse { /// type [ReferenceParams] the response is of type /// {@link Location Location[]} or a Thenable that resolves to such. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentReferencesRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -9810,7 +10737,7 @@ pub struct TextDocumentReferencesRequest { /// Response to the [TextDocumentReferencesRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentReferencesResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -9830,7 +10757,7 @@ pub struct TextDocumentReferencesResponse { /// 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")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentDocumentHighlightRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -9846,7 +10773,7 @@ pub struct TextDocumentDocumentHighlightRequest { /// Response to the [TextDocumentDocumentHighlightRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentDocumentHighlightResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -9866,7 +10793,7 @@ pub struct TextDocumentDocumentHighlightResponse { /// response is of type {@link SymbolInformation SymbolInformation[]} or a Thenable /// that resolves to such. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentDocumentSymbolRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -9882,7 +10809,7 @@ pub struct TextDocumentDocumentSymbolRequest { /// Response to the [TextDocumentDocumentSymbolRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentDocumentSymbolResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -9899,7 +10826,7 @@ pub struct TextDocumentDocumentSymbolResponse { /// A request to provide commands for the given text document and range. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentCodeActionRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -9915,7 +10842,7 @@ pub struct TextDocumentCodeActionRequest { /// Response to the [TextDocumentCodeActionRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentCodeActionResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -9934,7 +10861,7 @@ pub struct TextDocumentCodeActionResponse { /// parameter is of type [CodeAction] the response /// is of type [CodeAction] or a Thenable that resolves to such. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct CodeActionResolveRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -9950,7 +10877,7 @@ pub struct CodeActionResolveRequest { /// Response to the [CodeActionResolveRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct CodeActionResolveResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -9973,7 +10900,7 @@ pub struct CodeActionResolveResponse { /// need to advertise support for WorkspaceSymbols via the client capability /// `workspace.symbol.resolveSupport`. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WorkspaceSymbolRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -9989,7 +10916,7 @@ pub struct WorkspaceSymbolRequest { /// Response to the [WorkspaceSymbolRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WorkspaceSymbolResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -10009,7 +10936,7 @@ pub struct WorkspaceSymbolResponse { /// /// @since 3.17.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WorkspaceSymbolResolveRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -10025,7 +10952,7 @@ pub struct WorkspaceSymbolResolveRequest { /// Response to the [WorkspaceSymbolResolveRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WorkspaceSymbolResolveResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -10041,7 +10968,7 @@ pub struct WorkspaceSymbolResolveResponse { /// A request to provide code lens for the given text document. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentCodeLensRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -10057,7 +10984,7 @@ pub struct TextDocumentCodeLensRequest { /// Response to the [TextDocumentCodeLensRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentCodeLensResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -10074,7 +11001,7 @@ pub struct TextDocumentCodeLensResponse { /// A request to resolve a command for a given code lens. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct CodeLensResolveRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -10090,7 +11017,7 @@ pub struct CodeLensResolveRequest { /// Response to the [CodeLensResolveRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct CodeLensResolveResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -10108,7 +11035,7 @@ pub struct CodeLensResolveResponse { /// /// @since 3.16.0 #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WorkspaceCodeLensRefreshRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -10118,11 +11045,13 @@ pub struct WorkspaceCodeLensRefreshRequest { /// The request id. pub id: LSPId, + + pub params: Option, } /// Response to the [WorkspaceCodeLensRefreshRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WorkspaceCodeLensRefreshResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -10138,7 +11067,7 @@ pub struct WorkspaceCodeLensRefreshResponse { /// A request to provide document links #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentDocumentLinkRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -10154,7 +11083,7 @@ pub struct TextDocumentDocumentLinkRequest { /// Response to the [TextDocumentDocumentLinkRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentDocumentLinkResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -10173,7 +11102,7 @@ pub struct TextDocumentDocumentLinkResponse { /// parameter is of type [DocumentLink] the response /// is of type [DocumentLink] or a Thenable that resolves to such. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DocumentLinkResolveRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -10189,7 +11118,7 @@ pub struct DocumentLinkResolveRequest { /// Response to the [DocumentLinkResolveRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct DocumentLinkResolveResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -10205,7 +11134,7 @@ pub struct DocumentLinkResolveResponse { /// A request to format a whole document. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentFormattingRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -10221,7 +11150,7 @@ pub struct TextDocumentFormattingRequest { /// Response to the [TextDocumentFormattingRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentFormattingResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -10238,7 +11167,7 @@ pub struct TextDocumentFormattingResponse { /// A request to format a range in a document. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentRangeFormattingRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -10254,7 +11183,7 @@ pub struct TextDocumentRangeFormattingRequest { /// Response to the [TextDocumentRangeFormattingRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentRangeFormattingResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -10273,9 +11202,9 @@ pub struct TextDocumentRangeFormattingResponse { /// /// @since 3.18.0 /// @proposed -#[cfg(feature = "proposed", since = "3.18.0")] +#[cfg(feature = "proposed")] #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentRangesFormattingRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -10291,7 +11220,7 @@ pub struct TextDocumentRangesFormattingRequest { /// Response to the [TextDocumentRangesFormattingRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentRangesFormattingResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -10308,7 +11237,7 @@ pub struct TextDocumentRangesFormattingResponse { /// A request to format a document on type. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentOnTypeFormattingRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -10324,7 +11253,7 @@ pub struct TextDocumentOnTypeFormattingRequest { /// Response to the [TextDocumentOnTypeFormattingRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentOnTypeFormattingResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -10341,7 +11270,7 @@ pub struct TextDocumentOnTypeFormattingResponse { /// A request to rename a symbol. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentRenameRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -10357,7 +11286,7 @@ pub struct TextDocumentRenameRequest { /// Response to the [TextDocumentRenameRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentRenameResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -10376,7 +11305,7 @@ pub struct TextDocumentRenameResponse { /// /// @since 3.16 - support for default behavior #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentPrepareRenameRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -10392,7 +11321,7 @@ pub struct TextDocumentPrepareRenameRequest { /// Response to the [TextDocumentPrepareRenameRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TextDocumentPrepareRenameResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -10410,7 +11339,7 @@ pub struct TextDocumentPrepareRenameResponse { /// 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. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WorkspaceExecuteCommandRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -10426,7 +11355,7 @@ pub struct WorkspaceExecuteCommandRequest { /// Response to the [WorkspaceExecuteCommandRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WorkspaceExecuteCommandResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -10443,7 +11372,7 @@ pub struct WorkspaceExecuteCommandResponse { /// A request sent from the server to the client to modified certain resources. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WorkspaceApplyEditRequest { /// The version of the JSON RPC protocol. pub jsonrpc: String, @@ -10459,7 +11388,7 @@ pub struct WorkspaceApplyEditRequest { /// Response to the [WorkspaceApplyEditRequest]. #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] -#[serde(rename_all = "camelCase")] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct WorkspaceApplyEditResponse { /// The version of the JSON RPC protocol. pub jsonrpc: String, diff --git a/requirements.txt b/requirements.txt index 2a988d3..9b38690 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,8 +1,8 @@ # -# This file is autogenerated by pip-compile with Python 3.7 +# This file is autogenerated by pip-compile with Python 3.8 # by the following command: # -# pip-compile --generate-hashes --resolver=backtracking ./requirements.in +# pip-compile --generate-hashes ./requirements.in # attrs==23.1.0 \ --hash=sha256:1f28b4522cdc2fb4256ac1a020c78acf9cba2c6b461ccd2c126f3aa8e8335d04 \ @@ -11,6 +11,7 @@ attrs==23.1.0 \ # -r ./requirements.in # cattrs # jsonschema + # referencing cattrs==23.1.2 \ --hash=sha256:b2bb14311ac17bed0d58785e5a60f022e5431aca3932e3fc5cc8ed8639de50a4 \ --hash=sha256:db1c821b8c537382b2c7c66678c3790091ca0275ac486c76f3c8f3920e83c657 @@ -25,91 +26,163 @@ exceptiongroup==1.1.3 \ # via # cattrs # pytest -importlib-metadata==6.7.0 \ - --hash=sha256:1aaf550d4f73e5d6783e7acb77aec43d49da8017410afae93822cc9cca98c4d4 \ - --hash=sha256:cb52082e659e97afc5dac71e79de97d8681de3aa07ff18578330904a9d18e5b5 - # via - # attrs - # jsonschema - # pluggy - # pytest -importlib-resources==5.12.0 \ - --hash=sha256:4be82589bf5c1d7999aedf2a45159d10cb3ca4f19b2271f8792bc8e6da7b22f6 \ - --hash=sha256:7b1deeebbf351c7578e09bf2f63fa2ce8b5ffec296e0d349139d43cca061a81a +importlib-resources==6.1.1 \ + --hash=sha256:3893a00122eafde6894c59914446a512f728a0c1a45f9bb9b63721b6bacf0b4a \ + --hash=sha256:e8bf90d8213b486f428c9c39714b920041cb02c184686a3dee24905aaa8105d6 # via # -r ./requirements.in # jsonschema + # jsonschema-specifications iniconfig==2.0.0 \ --hash=sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3 \ --hash=sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374 # via pytest -jsonschema==4.17.3 \ - --hash=sha256:0f864437ab8b6076ba6707453ef8f98a6a0d512a80e93f8abdb676f737ecb60d \ - --hash=sha256:a870ad254da1a8ca84b6a2905cac29d265f805acc57af304784962a2aa6508f6 +jsonschema==4.19.2 \ + --hash=sha256:c9ff4d7447eed9592c23a12ccee508baf0dd0d59650615e847feb6cdca74f392 \ + --hash=sha256:eee9e502c788e89cb166d4d37f43084e3b64ab405c795c03d343a4dbc2c810fc # via -r ./requirements.in -packaging==23.1 \ - --hash=sha256:994793af429502c4ea2ebf6bf664629d07c1a9fe974af92966e4b8d2df7edc61 \ - --hash=sha256:a392980d2b6cffa644431898be54b0045151319d1e7ec34f0cfed48767dd334f +jsonschema-specifications==2023.7.1 \ + --hash=sha256:05adf340b659828a004220a9613be00fa3f223f2b82002e273dee62fd50524b1 \ + --hash=sha256:c91a50404e88a1f6ba40636778e2ee08f6e24c5613fe4c53ac24578a5a7f72bb + # via jsonschema +packaging==23.2 \ + --hash=sha256:048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5 \ + --hash=sha256:8c491190033a9af7e1d931d0b5dacc2ef47509b34dd0de67ed209b5203fc88c7 # via pytest pkgutil-resolve-name==1.3.10 \ --hash=sha256:357d6c9e6a755653cfd78893817c0853af365dd51ec97f3d358a819373bbd174 \ --hash=sha256:ca27cc078d25c5ad71a9de0a7a330146c4e014c2462d9af19c6b828280649c5e # via jsonschema -pluggy==1.2.0 \ - --hash=sha256:c2fd55a7d7a3863cba1a013e4e2414658b1d07b6bc57b3919e0c63c9abb99849 \ - --hash=sha256:d12f0c4b579b15f5e054301bb226ee85eeeba08ffec228092f8defbaa3a4c4b3 +pluggy==1.3.0 \ + --hash=sha256:cf61ae8f126ac6f7c451172cf30e3e43d3ca77615509771b3a984a0730651e12 \ + --hash=sha256:d89c696a773f8bd377d18e5ecda92b7a3793cbe66c87060a6fb58c7b6e1061f7 # via pytest -pyhamcrest==2.0.4 \ - --hash=sha256:60a41d4783b9d56c9ec8586635d2301db5072b3ea8a51c32dd03c408ae2b0f79 \ - --hash=sha256:b5d9ce6b977696286cf232ce2adf8969b4d0b045975b0936ac9005e84e67e9c1 +pyhamcrest==2.1.0 \ + --hash=sha256:c6acbec0923d0cb7e72c22af1926f3e7c97b8e8d69fc7498eabacaf7c975bd9c \ + --hash=sha256:f6913d2f392e30e0375b3ecbd7aee79e5d1faa25d345c8f4ff597665dcac2587 # via -r ./requirements.in -pyrsistent==0.19.3 \ - --hash=sha256:016ad1afadf318eb7911baa24b049909f7f3bb2c5b1ed7b6a8f21db21ea3faa8 \ - --hash=sha256:1a2994773706bbb4995c31a97bc94f1418314923bd1048c6d964837040376440 \ - --hash=sha256:20460ac0ea439a3e79caa1dbd560344b64ed75e85d8703943e0b66c2a6150e4a \ - --hash=sha256:3311cb4237a341aa52ab8448c27e3a9931e2ee09561ad150ba94e4cfd3fc888c \ - --hash=sha256:3a8cb235fa6d3fd7aae6a4f1429bbb1fec1577d978098da1252f0489937786f3 \ - --hash=sha256:3ab2204234c0ecd8b9368dbd6a53e83c3d4f3cab10ecaf6d0e772f456c442393 \ - --hash=sha256:42ac0b2f44607eb92ae88609eda931a4f0dfa03038c44c772e07f43e738bcac9 \ - --hash=sha256:49c32f216c17148695ca0e02a5c521e28a4ee6c5089f97e34fe24163113722da \ - --hash=sha256:4b774f9288dda8d425adb6544e5903f1fb6c273ab3128a355c6b972b7df39dcf \ - --hash=sha256:4c18264cb84b5e68e7085a43723f9e4c1fd1d935ab240ce02c0324a8e01ccb64 \ - --hash=sha256:5a474fb80f5e0d6c9394d8db0fc19e90fa540b82ee52dba7d246a7791712f74a \ - --hash=sha256:64220c429e42a7150f4bfd280f6f4bb2850f95956bde93c6fda1b70507af6ef3 \ - --hash=sha256:878433581fc23e906d947a6814336eee031a00e6defba224234169ae3d3d6a98 \ - --hash=sha256:99abb85579e2165bd8522f0c0138864da97847875ecbd45f3e7e2af569bfc6f2 \ - --hash=sha256:a2471f3f8693101975b1ff85ffd19bb7ca7dd7c38f8a81701f67d6b4f97b87d8 \ - --hash=sha256:aeda827381f5e5d65cced3024126529ddc4289d944f75e090572c77ceb19adbf \ - --hash=sha256:b735e538f74ec31378f5a1e3886a26d2ca6351106b4dfde376a26fc32a044edc \ - --hash=sha256:c147257a92374fde8498491f53ffa8f4822cd70c0d85037e09028e478cababb7 \ - --hash=sha256:c4db1bd596fefd66b296a3d5d943c94f4fac5bcd13e99bffe2ba6a759d959a28 \ - --hash=sha256:c74bed51f9b41c48366a286395c67f4e894374306b197e62810e0fdaf2364da2 \ - --hash=sha256:c9bb60a40a0ab9aba40a59f68214eed5a29c6274c83b2cc206a359c4a89fa41b \ - --hash=sha256:cc5d149f31706762c1f8bda2e8c4f8fead6e80312e3692619a75301d3dbb819a \ - --hash=sha256:ccf0d6bd208f8111179f0c26fdf84ed7c3891982f2edaeae7422575f47e66b64 \ - --hash=sha256:e42296a09e83028b3476f7073fcb69ffebac0e66dbbfd1bd847d61f74db30f19 \ - --hash=sha256:e8f2b814a3dc6225964fa03d8582c6e0b6650d68a232df41e3cc1b66a5d2f8d1 \ - --hash=sha256:f0774bf48631f3a20471dd7c5989657b639fd2d285b861237ea9e82c36a415a9 \ - --hash=sha256:f0e7c4b2f77593871e918be000b96c8107da48444d57005b6a6bc61fb4331b2c - # via jsonschema -pytest==7.4.2 \ - --hash=sha256:1d881c6124e08ff0a1bb75ba3ec0bfd8b5354a01c194ddd5a0a870a48d99b002 \ - --hash=sha256:a766259cfab564a2ad52cb1aae1b881a75c3eb7e34ca3779697c23ed47c47069 +pytest==7.4.3 \ + --hash=sha256:0d009c083ea859a71b76adf7c1d502e4bc170b80a8ef002da5806527b9591fac \ + --hash=sha256:d989d136982de4e3b29dabcc838ad581c64e8ed52c11fbe86ddebd9da0818cd5 # via -r ./requirements.in +referencing==0.30.2 \ + --hash=sha256:449b6669b6121a9e96a7f9e410b245d471e8d48964c67113ce9afe50c8dd7bdf \ + --hash=sha256:794ad8003c65938edcdbc027f1933215e0d0ccc0291e3ce20a4d87432b59efc0 + # via + # jsonschema + # jsonschema-specifications +rpds-py==0.12.0 \ + --hash=sha256:0525847f83f506aa1e28eb2057b696fe38217e12931c8b1b02198cfe6975e142 \ + --hash=sha256:05942656cb2cb4989cd50ced52df16be94d344eae5097e8583966a1d27da73a5 \ + --hash=sha256:0831d3ecdea22e4559cc1793f22e77067c9d8c451d55ae6a75bf1d116a8e7f42 \ + --hash=sha256:0853da3d5e9bc6a07b2486054a410b7b03f34046c123c6561b535bb48cc509e1 \ + --hash=sha256:08e6e7ff286254016b945e1ab632ee843e43d45e40683b66dd12b73791366dd1 \ + --hash=sha256:0a38612d07a36138507d69646c470aedbfe2b75b43a4643f7bd8e51e52779624 \ + --hash=sha256:0bedd91ae1dd142a4dc15970ed2c729ff6c73f33a40fa84ed0cdbf55de87c777 \ + --hash=sha256:0c5441b7626c29dbd54a3f6f3713ec8e956b009f419ffdaaa3c80eaf98ddb523 \ + --hash=sha256:0e9e976e0dbed4f51c56db10831c9623d0fd67aac02853fe5476262e5a22acb7 \ + --hash=sha256:0fadfdda275c838cba5102c7f90a20f2abd7727bf8f4a2b654a5b617529c5c18 \ + --hash=sha256:1096ca0bf2d3426cbe79d4ccc91dc5aaa73629b08ea2d8467375fad8447ce11a \ + --hash=sha256:171d9a159f1b2f42a42a64a985e4ba46fc7268c78299272ceba970743a67ee50 \ + --hash=sha256:188912b22b6c8225f4c4ffa020a2baa6ad8fabb3c141a12dbe6edbb34e7f1425 \ + --hash=sha256:1b4cf9ab9a0ae0cb122685209806d3f1dcb63b9fccdf1424fb42a129dc8c2faa \ + --hash=sha256:1e04581c6117ad9479b6cfae313e212fe0dfa226ac727755f0d539cd54792963 \ + --hash=sha256:1fa73ed22c40a1bec98d7c93b5659cd35abcfa5a0a95ce876b91adbda170537c \ + --hash=sha256:2124f9e645a94ab7c853bc0a3644e0ca8ffbe5bb2d72db49aef8f9ec1c285733 \ + --hash=sha256:240687b5be0f91fbde4936a329c9b7589d9259742766f74de575e1b2046575e4 \ + --hash=sha256:25740fb56e8bd37692ed380e15ec734be44d7c71974d8993f452b4527814601e \ + --hash=sha256:27ccc93c7457ef890b0dd31564d2a05e1aca330623c942b7e818e9e7c2669ee4 \ + --hash=sha256:281c8b219d4f4b3581b918b816764098d04964915b2f272d1476654143801aa2 \ + --hash=sha256:2d34a5450a402b00d20aeb7632489ffa2556ca7b26f4a63c35f6fccae1977427 \ + --hash=sha256:301bd744a1adaa2f6a5e06c98f1ac2b6f8dc31a5c23b838f862d65e32fca0d4b \ + --hash=sha256:30e5ce9f501fb1f970e4a59098028cf20676dee64fc496d55c33e04bbbee097d \ + --hash=sha256:33ab498f9ac30598b6406e2be1b45fd231195b83d948ebd4bd77f337cb6a2bff \ + --hash=sha256:35585a8cb5917161f42c2104567bb83a1d96194095fc54a543113ed5df9fa436 \ + --hash=sha256:389c0e38358fdc4e38e9995e7291269a3aead7acfcf8942010ee7bc5baee091c \ + --hash=sha256:3acadbab8b59f63b87b518e09c4c64b142e7286b9ca7a208107d6f9f4c393c5c \ + --hash=sha256:3b7a64d43e2a1fa2dd46b678e00cabd9a49ebb123b339ce799204c44a593ae1c \ + --hash=sha256:3c8c0226c71bd0ce9892eaf6afa77ae8f43a3d9313124a03df0b389c01f832de \ + --hash=sha256:429349a510da82c85431f0f3e66212d83efe9fd2850f50f339341b6532c62fe4 \ + --hash=sha256:466030a42724780794dea71eb32db83cc51214d66ab3fb3156edd88b9c8f0d78 \ + --hash=sha256:47aeceb4363851d17f63069318ba5721ae695d9da55d599b4d6fb31508595278 \ + --hash=sha256:48aa98987d54a46e13e6954880056c204700c65616af4395d1f0639eba11764b \ + --hash=sha256:4b2416ed743ec5debcf61e1242e012652a4348de14ecc7df3512da072b074440 \ + --hash=sha256:4d0a675a7acbbc16179188d8c6d0afb8628604fc1241faf41007255957335a0b \ + --hash=sha256:4eb74d44776b0fb0782560ea84d986dffec8ddd94947f383eba2284b0f32e35e \ + --hash=sha256:4f8a1d990dc198a6c68ec3d9a637ba1ce489b38cbfb65440a27901afbc5df575 \ + --hash=sha256:513ccbf7420c30e283c25c82d5a8f439d625a838d3ba69e79a110c260c46813f \ + --hash=sha256:5210a0018c7e09c75fa788648617ebba861ae242944111d3079034e14498223f \ + --hash=sha256:54cdfcda59251b9c2f87a05d038c2ae02121219a04d4a1e6fc345794295bdc07 \ + --hash=sha256:56dd500411d03c5e9927a1eb55621e906837a83b02350a9dc401247d0353717c \ + --hash=sha256:57ec6baec231bb19bb5fd5fc7bae21231860a1605174b11585660236627e390e \ + --hash=sha256:5f1519b080d8ce0a814f17ad9fb49fb3a1d4d7ce5891f5c85fc38631ca3a8dc4 \ + --hash=sha256:6174d6ad6b58a6bcf67afbbf1723420a53d06c4b89f4c50763d6fa0a6ac9afd2 \ + --hash=sha256:68172622a5a57deb079a2c78511c40f91193548e8ab342c31e8cb0764d362459 \ + --hash=sha256:6915fc9fa6b3ec3569566832e1bb03bd801c12cea030200e68663b9a87974e76 \ + --hash=sha256:6b75b912a0baa033350367a8a07a8b2d44fd5b90c890bfbd063a8a5f945f644b \ + --hash=sha256:6f5dcb658d597410bb7c967c1d24eaf9377b0d621358cbe9d2ff804e5dd12e81 \ + --hash=sha256:6f8d7fe73d1816eeb5378409adc658f9525ecbfaf9e1ede1e2d67a338b0c7348 \ + --hash=sha256:7036316cc26b93e401cedd781a579be606dad174829e6ad9e9c5a0da6e036f80 \ + --hash=sha256:7188ddc1a8887194f984fa4110d5a3d5b9b5cd35f6bafdff1b649049cbc0ce29 \ + --hash=sha256:761531076df51309075133a6bc1db02d98ec7f66e22b064b1d513bc909f29743 \ + --hash=sha256:7979d90ee2190d000129598c2b0c82f13053dba432b94e45e68253b09bb1f0f6 \ + --hash=sha256:8015835494b21aa7abd3b43fdea0614ee35ef6b03db7ecba9beb58eadf01c24f \ + --hash=sha256:81c4d1a3a564775c44732b94135d06e33417e829ff25226c164664f4a1046213 \ + --hash=sha256:81cf9d306c04df1b45971c13167dc3bad625808aa01281d55f3cf852dde0e206 \ + --hash=sha256:88857060b690a57d2ea8569bca58758143c8faa4639fb17d745ce60ff84c867e \ + --hash=sha256:8c567c664fc2f44130a20edac73e0a867f8e012bf7370276f15c6adc3586c37c \ + --hash=sha256:91bd2b7cf0f4d252eec8b7046fa6a43cee17e8acdfc00eaa8b3dbf2f9a59d061 \ + --hash=sha256:9620650c364c01ed5b497dcae7c3d4b948daeae6e1883ae185fef1c927b6b534 \ + --hash=sha256:9b007c2444705a2dc4a525964fd4dd28c3320b19b3410da6517cab28716f27d3 \ + --hash=sha256:9bf9acce44e967a5103fcd820fc7580c7b0ab8583eec4e2051aec560f7b31a63 \ + --hash=sha256:a239303acb0315091d54c7ff36712dba24554993b9a93941cf301391d8a997ee \ + --hash=sha256:a2baa6be130e8a00b6cbb9f18a33611ec150b4537f8563bddadb54c1b74b8193 \ + --hash=sha256:a54917b7e9cd3a67e429a630e237a90b096e0ba18897bfb99ee8bd1068a5fea0 \ + --hash=sha256:a689e1ded7137552bea36305a7a16ad2b40be511740b80748d3140614993db98 \ + --hash=sha256:a952ae3eb460c6712388ac2ec706d24b0e651b9396d90c9a9e0a69eb27737fdc \ + --hash=sha256:aa32205358a76bf578854bf31698a86dc8b2cb591fd1d79a833283f4a403f04b \ + --hash=sha256:b2287c09482949e0ca0c0eb68b2aca6cf57f8af8c6dfd29dcd3bc45f17b57978 \ + --hash=sha256:b6b0e17d39d21698185097652c611f9cf30f7c56ccec189789920e3e7f1cee56 \ + --hash=sha256:b710bf7e7ae61957d5c4026b486be593ed3ec3dca3e5be15e0f6d8cf5d0a4990 \ + --hash=sha256:b8e11715178f3608874508f08e990d3771e0b8c66c73eb4e183038d600a9b274 \ + --hash=sha256:b92aafcfab3d41580d54aca35a8057341f1cfc7c9af9e8bdfc652f83a20ced31 \ + --hash=sha256:bec29b801b4adbf388314c0d050e851d53762ab424af22657021ce4b6eb41543 \ + --hash=sha256:c694bee70ece3b232df4678448fdda245fd3b1bb4ba481fb6cd20e13bb784c46 \ + --hash=sha256:c6b52b7028b547866c2413f614ee306c2d4eafdd444b1ff656bf3295bf1484aa \ + --hash=sha256:cb41ad20064e18a900dd427d7cf41cfaec83bcd1184001f3d91a1f76b3fcea4e \ + --hash=sha256:cd316dbcc74c76266ba94eb021b0cc090b97cca122f50bd7a845f587ff4bf03f \ + --hash=sha256:ced40cdbb6dd47a032725a038896cceae9ce267d340f59508b23537f05455431 \ + --hash=sha256:d1c562a9bb72244fa767d1c1ab55ca1d92dd5f7c4d77878fee5483a22ffac808 \ + --hash=sha256:d389ff1e95b6e46ebedccf7fd1fadd10559add595ac6a7c2ea730268325f832c \ + --hash=sha256:d56b1cd606ba4cedd64bb43479d56580e147c6ef3f5d1c5e64203a1adab784a2 \ + --hash=sha256:d72a4315514e5a0b9837a086cb433b004eea630afb0cc129de76d77654a9606f \ + --hash=sha256:d9e7f29c00577aff6b318681e730a519b235af292732a149337f6aaa4d1c5e31 \ + --hash=sha256:dbc25baa6abb205766fb8606f8263b02c3503a55957fcb4576a6bb0a59d37d10 \ + --hash=sha256:e57919c32ee295a2fca458bb73e4b20b05c115627f96f95a10f9f5acbd61172d \ + --hash=sha256:e5bbe011a2cea9060fef1bb3d668a2fd8432b8888e6d92e74c9c794d3c101595 \ + --hash=sha256:e6aea5c0eb5b0faf52c7b5c4a47c8bb64437173be97227c819ffa31801fa4e34 \ + --hash=sha256:e888be685fa42d8b8a3d3911d5604d14db87538aa7d0b29b1a7ea80d354c732d \ + --hash=sha256:eebaf8c76c39604d52852366249ab807fe6f7a3ffb0dd5484b9944917244cdbe \ + --hash=sha256:efbe0b5e0fd078ed7b005faa0170da4f72666360f66f0bb2d7f73526ecfd99f9 \ + --hash=sha256:efddca2d02254a52078c35cadad34762adbae3ff01c6b0c7787b59d038b63e0d \ + --hash=sha256:f05450fa1cd7c525c0b9d1a7916e595d3041ac0afbed2ff6926e5afb6a781b7f \ + --hash=sha256:f12d69d568f5647ec503b64932874dade5a20255736c89936bf690951a5e79f5 \ + --hash=sha256:f45321224144c25a62052035ce96cbcf264667bcb0d81823b1bbc22c4addd194 \ + --hash=sha256:f62581d7e884dd01ee1707b7c21148f61f2febb7de092ae2f108743fcbef5985 \ + --hash=sha256:f8832a4f83d4782a8f5a7b831c47e8ffe164e43c2c148c8160ed9a6d630bc02a \ + --hash=sha256:fa35ad36440aaf1ac8332b4a4a433d4acd28f1613f0d480995f5cfd3580e90b7 + # via + # jsonschema + # referencing tomli==2.0.1 \ --hash=sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc \ --hash=sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f # via pytest -typing-extensions==4.7.1 \ - --hash=sha256:440d5dd3af93b060174bf433bccd69b0babc3b15b1a8dca43789fd7f61514b36 \ - --hash=sha256:b75ddc264f0ba5615db7ba217daeb99701ad295353c45f9e95963337ceeeffb2 - # via - # cattrs - # importlib-metadata - # jsonschema -zipp==3.15.0 \ - --hash=sha256:112929ad649da941c23de50f356a2b5570c954b65150642bccdd66bf194d224b \ - --hash=sha256:48904fc76a60e542af151aded95726c1a5c34ed43ab4134b597665c86d7ad556 - # via - # importlib-metadata - # importlib-resources +typing-extensions==4.8.0 \ + --hash=sha256:8f92fc8806f9a6b641eaa5318da32b44d401efaac0f6678c9bc448ba3605faa0 \ + --hash=sha256:df8e4339e9cb77357558cbdbceca33c303714cf861d1eef15e1070055ae8b7ef + # via cattrs +zipp==3.17.0 \ + --hash=sha256:0e923e726174922dce09c53c59ad483ff7bbb8e572e00c7f7c46b88556409f31 \ + --hash=sha256:84e64a1c28cf7e91ed2078bb8cc8c259cb19b76942096c8d7b84947690cabaf0 + # via importlib-resources diff --git a/runtime.txt b/runtime.txt index ebf3e31..7739b5a 100644 --- a/runtime.txt +++ b/runtime.txt @@ -1 +1 @@ -python-3.7.16 \ No newline at end of file +python-3.8.18 \ No newline at end of file diff --git a/scripts/onCreateCommand.sh b/scripts/onCreateCommand.sh index f867da4..f42a4ff 100644 --- a/scripts/onCreateCommand.sh +++ b/scripts/onCreateCommand.sh @@ -15,10 +15,10 @@ curl https://sh.rustup.rs -sSf | bash -s -- -y echo 'source $HOME/.cargo/env' >> ~/.bashrc # Install Python via pyenv . -pyenv install 3.8:latest 3.9:latest 3.10:latest 3.11:latest +pyenv install 3.8:latest 3.9:latest 3.10:latest 3.11:latest 3.12:latest # Set default Python version to 3.8 . -pyenv global 3.8.18 +pyenv global 3.8:latest # Create Virutal environment. pyenv exec python3.8 -m venv .venv diff --git a/tests/generator/test_model.py b/tests/generator/test_model.py index 50f2b6e..e9b4e56 100644 --- a/tests/generator/test_model.py +++ b/tests/generator/test_model.py @@ -17,7 +17,6 @@ def test_model_loading(): def test_model_loading_failure(): - root = pathlib.Path(__file__).parent.parent / "generator" json_model = json.loads((lsp_json_path).read_text(encoding="utf-8")) del json_model["structures"][0]["name"] diff --git a/tests/python/common/jsonrpc.py b/tests/python/common/jsonrpc.py index 79de35f..17f3da7 100644 --- a/tests/python/common/jsonrpc.py +++ b/tests/python/common/jsonrpc.py @@ -21,7 +21,7 @@ def to_json( if hasattr(obj, "result"): if method is None: - raise ValueError(f"`method` must not be None for response type objects.") + raise ValueError("`method` must not be None for response type objects.") obj_type = types.METHOD_TO_TYPES[method][1] elif hasattr(obj, "error"): obj_type = types.ResponseErrorMessage @@ -43,7 +43,7 @@ def from_json(json_str: str, method: str = None, converter=None) -> types.MESSAG if "result" in obj: if method is None: - raise ValueError(f"`method` must not be None for response type objects.") + raise ValueError("`method` must not be None for response type objects.") obj_type = types.METHOD_TO_TYPES[method][1] elif "error" in obj: obj_type = types.ResponseErrorMessage diff --git a/tests/python/notifications/test_progress.py b/tests/python/notifications/test_progress.py index 3f7e918..b55e36d 100644 --- a/tests/python/notifications/test_progress.py +++ b/tests/python/notifications/test_progress.py @@ -6,7 +6,6 @@ import hamcrest import jsonrpc import pytest - from lsprotocol.types import ( ProgressNotification, ProgressParams, diff --git a/tests/python/requests/test_inlay_hint_resolve_request.py b/tests/python/requests/test_inlay_hint_resolve_request.py index 6dc9f42..5c3b486 100644 --- a/tests/python/requests/test_inlay_hint_resolve_request.py +++ b/tests/python/requests/test_inlay_hint_resolve_request.py @@ -7,7 +7,6 @@ import hamcrest import jsonrpc import pytest -from cattrs.errors import ClassValidationError ID = str(uuid.uuid4()) diff --git a/tests/python/test_cattrs_special_cases.py b/tests/python/test_cattrs_special_cases.py index c5e0e9c..cd4512c 100644 --- a/tests/python/test_cattrs_special_cases.py +++ b/tests/python/test_cattrs_special_cases.py @@ -7,7 +7,6 @@ import hamcrest import pytest from cattrs.errors import ClassValidationError - from lsprotocol import converters as cv from lsprotocol import types as lsp diff --git a/tests/python/test_custom_validators.py b/tests/python/test_custom_validators.py index c7fe1bd..b28333d 100644 --- a/tests/python/test_custom_validators.py +++ b/tests/python/test_custom_validators.py @@ -1,10 +1,9 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. -import pytest - import lsprotocol.types as lsp import lsprotocol.validators as v +import pytest @pytest.mark.parametrize( diff --git a/tests/python/test_enums.py b/tests/python/test_enums.py index 3db64c1..de97827 100644 --- a/tests/python/test_enums.py +++ b/tests/python/test_enums.py @@ -3,7 +3,6 @@ import hamcrest import pytest - from lsprotocol import types as lsp diff --git a/tests/python/test_generated_data.py b/tests/python/test_generated_data.py index 0ecee3c..46a3043 100644 --- a/tests/python/test_generated_data.py +++ b/tests/python/test_generated_data.py @@ -3,12 +3,11 @@ import json import pathlib -from typing import Generator, List, Union - -import pytest +from typing import List, Union import lsprotocol.converters as cv import lsprotocol.types as lsp +import pytest TEST_DATA_ROOT = pathlib.Path(__file__).parent.parent.parent / "packages" / "testdata" @@ -30,5 +29,5 @@ def test_generated_data(json_file: str) -> None: try: converter.structure(data, lsp_type) assert result_type == "True", "Expected error, but succeeded structuring" - except Exception as e: + except Exception: assert result_type == "False", "Expected success, but failed structuring" diff --git a/tests/python/test_location.py b/tests/python/test_location.py index 1a8cd8f..e65eb3e 100644 --- a/tests/python/test_location.py +++ b/tests/python/test_location.py @@ -3,7 +3,6 @@ import hamcrest import pytest - from lsprotocol import types as lsp diff --git a/tests/python/test_position.py b/tests/python/test_position.py index 67bff8b..c149579 100644 --- a/tests/python/test_position.py +++ b/tests/python/test_position.py @@ -3,7 +3,6 @@ import hamcrest import pytest - from lsprotocol import types as lsp diff --git a/tests/python/test_range.py b/tests/python/test_range.py index 9977e95..0a5801b 100644 --- a/tests/python/test_range.py +++ b/tests/python/test_range.py @@ -3,7 +3,6 @@ import hamcrest import pytest - from lsprotocol import types as lsp diff --git a/tests/rust/Cargo.toml b/tests/rust/Cargo.toml new file mode 100644 index 0000000..ca8a508 --- /dev/null +++ b/tests/rust/Cargo.toml @@ -0,0 +1,15 @@ +[package] +name = "lsprotocol-test" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +glob = "0.3.1" +serde = {version ="1.0.152", features = ["derive"]} +serde_json = "1.0.93" +serde_repr = "0.1.10" +url = "2.3.1" +rust_decimal = "1.29.1" +lsprotocol = { path = "../../packages/rust/lsprotocol", features = ["proposed"]} diff --git a/tests/rust/src/main.rs b/tests/rust/src/main.rs new file mode 100644 index 0000000..eefc6df --- /dev/null +++ b/tests/rust/src/main.rs @@ -0,0 +1,374 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#[cfg(test)] +mod tests { + use glob::glob; + use lsprotocol::*; + use serde::Deserialize; + use std::fs; + + fn get_all_json_files(root: &str) -> Vec { + let pattern = format!("{}/*.json", root); + glob(&pattern) + .expect("Failed to read glob pattern") + .filter_map(Result::ok) + .map(|path| path.to_str().unwrap().to_string()) + .collect() + } + + fn validate_type Deserialize<'de>>(result_type: &str, data: &str) { + match serde_json::from_str::(data) { + Ok(_) => assert_eq!( + result_type, "True", + "Expected error, but succeeded deserializing:\r\n{}", + data + ), + Err(e) => assert_eq!( + result_type, + "False", + "Expected success, but failed deserializing: {}\r\nJSON data:\r\n{}", + e.to_string(), + data + ), + } + } + + fn validate(lsp_type: &str, result_type: &str, data: &str) { + println!("Validating: {}", lsp_type); + match lsp_type { + // Sample Generated Code: + // "CallHierarchyIncomingCallsRequest" => { + // return validate_type::(result_type, data) + // } + // GENERATED_TEST_CODE:start + "TextDocumentImplementationRequest" => { + return validate_type::(result_type, data) + } + "TextDocumentTypeDefinitionRequest" => { + return validate_type::(result_type, data) + } + "WorkspaceWorkspaceFoldersRequest" => { + return validate_type::(result_type, data) + } + "WorkspaceConfigurationRequest" => { + return validate_type::(result_type, data) + } + "TextDocumentDocumentColorRequest" => { + return validate_type::(result_type, data) + } + "TextDocumentColorPresentationRequest" => { + return validate_type::(result_type, data) + } + "TextDocumentFoldingRangeRequest" => { + return validate_type::(result_type, data) + } + "WorkspaceFoldingRangeRefreshRequest" => { + return validate_type::(result_type, data) + } + "TextDocumentDeclarationRequest" => { + return validate_type::(result_type, data) + } + "TextDocumentSelectionRangeRequest" => { + return validate_type::(result_type, data) + } + "WindowWorkDoneProgressCreateRequest" => { + return validate_type::(result_type, data) + } + "TextDocumentPrepareCallHierarchyRequest" => { + return validate_type::(result_type, data) + } + "CallHierarchyIncomingCallsRequest" => { + return validate_type::(result_type, data) + } + "CallHierarchyOutgoingCallsRequest" => { + return validate_type::(result_type, data) + } + "TextDocumentSemanticTokensFullRequest" => { + return validate_type::(result_type, data) + } + "TextDocumentSemanticTokensFullDeltaRequest" => { + return validate_type::( + result_type, + data, + ) + } + "TextDocumentSemanticTokensRangeRequest" => { + return validate_type::(result_type, data) + } + "WorkspaceSemanticTokensRefreshRequest" => { + return validate_type::(result_type, data) + } + "WindowShowDocumentRequest" => { + return validate_type::(result_type, data) + } + "TextDocumentLinkedEditingRangeRequest" => { + return validate_type::(result_type, data) + } + "WorkspaceWillCreateFilesRequest" => { + return validate_type::(result_type, data) + } + "WorkspaceWillRenameFilesRequest" => { + return validate_type::(result_type, data) + } + "WorkspaceWillDeleteFilesRequest" => { + return validate_type::(result_type, data) + } + "TextDocumentMonikerRequest" => { + return validate_type::(result_type, data) + } + "TextDocumentPrepareTypeHierarchyRequest" => { + return validate_type::(result_type, data) + } + "TypeHierarchySupertypesRequest" => { + return validate_type::(result_type, data) + } + "TypeHierarchySubtypesRequest" => { + return validate_type::(result_type, data) + } + "TextDocumentInlineValueRequest" => { + return validate_type::(result_type, data) + } + "WorkspaceInlineValueRefreshRequest" => { + return validate_type::(result_type, data) + } + "TextDocumentInlayHintRequest" => { + return validate_type::(result_type, data) + } + "InlayHintResolveRequest" => { + return validate_type::(result_type, data) + } + "WorkspaceInlayHintRefreshRequest" => { + return validate_type::(result_type, data) + } + "TextDocumentDiagnosticRequest" => { + return validate_type::(result_type, data) + } + "WorkspaceDiagnosticRequest" => { + return validate_type::(result_type, data) + } + "WorkspaceDiagnosticRefreshRequest" => { + return validate_type::(result_type, data) + } + "TextDocumentInlineCompletionRequest" => { + return validate_type::(result_type, data) + } + "ClientRegisterCapabilityRequest" => { + return validate_type::(result_type, data) + } + "ClientUnregisterCapabilityRequest" => { + return validate_type::(result_type, data) + } + "InitializeRequest" => return validate_type::(result_type, data), + "ShutdownRequest" => return validate_type::(result_type, data), + "WindowShowMessageRequestRequest" => { + return validate_type::(result_type, data) + } + "TextDocumentWillSaveWaitUntilRequest" => { + return validate_type::(result_type, data) + } + "TextDocumentCompletionRequest" => { + return validate_type::(result_type, data) + } + "CompletionItemResolveRequest" => { + return validate_type::(result_type, data) + } + "TextDocumentHoverRequest" => { + return validate_type::(result_type, data) + } + "TextDocumentSignatureHelpRequest" => { + return validate_type::(result_type, data) + } + "TextDocumentDefinitionRequest" => { + return validate_type::(result_type, data) + } + "TextDocumentReferencesRequest" => { + return validate_type::(result_type, data) + } + "TextDocumentDocumentHighlightRequest" => { + return validate_type::(result_type, data) + } + "TextDocumentDocumentSymbolRequest" => { + return validate_type::(result_type, data) + } + "TextDocumentCodeActionRequest" => { + return validate_type::(result_type, data) + } + "CodeActionResolveRequest" => { + return validate_type::(result_type, data) + } + "WorkspaceSymbolRequest" => { + return validate_type::(result_type, data) + } + "WorkspaceSymbolResolveRequest" => { + return validate_type::(result_type, data) + } + "TextDocumentCodeLensRequest" => { + return validate_type::(result_type, data) + } + "CodeLensResolveRequest" => { + return validate_type::(result_type, data) + } + "WorkspaceCodeLensRefreshRequest" => { + return validate_type::(result_type, data) + } + "TextDocumentDocumentLinkRequest" => { + return validate_type::(result_type, data) + } + "DocumentLinkResolveRequest" => { + return validate_type::(result_type, data) + } + "TextDocumentFormattingRequest" => { + return validate_type::(result_type, data) + } + "TextDocumentRangeFormattingRequest" => { + return validate_type::(result_type, data) + } + "TextDocumentRangesFormattingRequest" => { + return validate_type::(result_type, data) + } + "TextDocumentOnTypeFormattingRequest" => { + return validate_type::(result_type, data) + } + "TextDocumentRenameRequest" => { + return validate_type::(result_type, data) + } + "TextDocumentPrepareRenameRequest" => { + return validate_type::(result_type, data) + } + "WorkspaceExecuteCommandRequest" => { + return validate_type::(result_type, data) + } + "WorkspaceApplyEditRequest" => { + return validate_type::(result_type, data) + } + "WorkspaceDidChangeWorkspaceFoldersNotification" => { + return validate_type::( + result_type, + data, + ) + } + "WindowWorkDoneProgressCancelNotification" => { + return validate_type::(result_type, data) + } + "WorkspaceDidCreateFilesNotification" => { + return validate_type::(result_type, data) + } + "WorkspaceDidRenameFilesNotification" => { + return validate_type::(result_type, data) + } + "WorkspaceDidDeleteFilesNotification" => { + return validate_type::(result_type, data) + } + "NotebookDocumentDidOpenNotification" => { + return validate_type::(result_type, data) + } + "NotebookDocumentDidChangeNotification" => { + return validate_type::(result_type, data) + } + "NotebookDocumentDidSaveNotification" => { + return validate_type::(result_type, data) + } + "NotebookDocumentDidCloseNotification" => { + return validate_type::(result_type, data) + } + "InitializedNotification" => { + return validate_type::(result_type, data) + } + "ExitNotification" => return validate_type::(result_type, data), + "WorkspaceDidChangeConfigurationNotification" => { + return validate_type::( + result_type, + data, + ) + } + "WindowShowMessageNotification" => { + return validate_type::(result_type, data) + } + "WindowLogMessageNotification" => { + return validate_type::(result_type, data) + } + "TelemetryEventNotification" => { + return validate_type::(result_type, data) + } + "TextDocumentDidOpenNotification" => { + return validate_type::(result_type, data) + } + "TextDocumentDidChangeNotification" => { + return validate_type::(result_type, data) + } + "TextDocumentDidCloseNotification" => { + return validate_type::(result_type, data) + } + "TextDocumentDidSaveNotification" => { + return validate_type::(result_type, data) + } + "TextDocumentWillSaveNotification" => { + return validate_type::(result_type, data) + } + "WorkspaceDidChangeWatchedFilesNotification" => { + return validate_type::( + result_type, + data, + ) + } + "TextDocumentPublishDiagnosticsNotification" => { + return validate_type::( + result_type, + data, + ) + } + "SetTraceNotification" => { + return validate_type::(result_type, data) + } + "LogTraceNotification" => { + return validate_type::(result_type, data) + } + "CancelRequestNotification" => { + return validate_type::(result_type, data) + } + "ProgressNotification" => { + return validate_type::(result_type, data) + } + // GENERATED_TEST_CODE:end + _ => (), + } + } + + fn validate_file(file_path: &str) { + let basename = std::path::Path::new(&file_path) + .file_name() + .unwrap() + .to_str() + .unwrap(); + let type_name_result_type: Vec<&str> = basename.split("-").collect(); + let lsp_type = type_name_result_type[0]; + let result_type = type_name_result_type[1]; + let data = &fs::read_to_string(file_path.clone()).unwrap(); + + validate(&lsp_type, &result_type, &data); + } + + #[test] + + fn test_generated_data() { + println!("Running generated data tests"); + let cwd = std::env::current_dir() + .unwrap() + .join("../../packages/testdata"); + let env_value = std::env::var("LSP_TEST_DATA_PATH") + .unwrap_or_else(|_| cwd.to_str().unwrap().to_string()); + println!("TEST_DATA_ROOT: {}", env_value); + for json_file in get_all_json_files(env_value.as_str()) { + validate_file(&json_file); + } + } +} + +fn main() { + // Use data from test error report here to debug + // let json_data = ""; + + // Update the type here to debug + // serde_json::from_str::(json_data).unwrap(); +}