Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for workspace/configuration requests #106

Merged
merged 4 commits into from
Oct 23, 2023

Conversation

alcarney
Copy link
Member

  • Using the new client.set_configuration method, it's now possible to set configuration values at various scopes and configuration sections

    global_config = {"values": {"a": 42, "c": 4}}
    
    workspace_uri = "file://workspace/file.txt"
    workspace_config = {"a": 1, "c": 1}
    
    client.set_configuration(global_config)
    client.set_configuration(
        workspace_config, section="values", scope_uri=workspace_uri
    )

    If the server makes a workspace/configuration request during a test case the client will automatically respond accordingly

  • pytest_lsp will emit a warning if the capabilities used by the client do not indicate support for workspace/configuration requests.

Closes #90

The `LanguageClientProtocol` class is now also able to perform
complicance checks on incoming requests from the server under test.
The first check implemented is making sure that the client has support
for `workspace/configuration` requests.
@alcarney alcarney merged commit 96a4c7e into swyddfa:develop Oct 23, 2023
10 checks passed
@alcarney alcarney deleted the configuration branch October 23, 2023 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

workspace/configuration support
1 participant