Skip to content

[ty] Implement workspace/didChangeConfiguration#24712

Open
pierrem964 wants to merge 10 commits intoastral-sh:mainfrom
pierrem964:pgm/workspace-did-change-configuration
Open

[ty] Implement workspace/didChangeConfiguration#24712
pierrem964 wants to merge 10 commits intoastral-sh:mainfrom
pierrem964:pgm/workspace-did-change-configuration

Conversation

@pierrem964
Copy link
Copy Markdown

Summary

Implements astral-sh/ty#953

Adds a notification handler for workspace/didConfigurationChange. Re initializes workspaces when this is received with the newly pulled settings.

Workspaces are just reinitialized with a new settings passed from the client.

Copied code from #20545, so credit to @Guillaume-Fgt for that.

Test Plan

I've added a unit test in configuration making sure this runs successfully. I am unsure if this is sufficient so please let me know how I can improve the testing implemented in this PR.

@astral-sh-bot astral-sh-bot Bot added the ty Multi-file analysis & type inference label Apr 19, 2026
Comment thread crates/ty_server/src/session.rs Outdated
@carljm carljm removed their request for review April 20, 2026 20:57
},
);

Ok(())
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should call publish_diagnostics_if_needed here for clients using the push diagnostics model.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to updates tests to cover this?

fn run(
session: &mut Session,
client: &Client,
_params: types::DidChangeConfigurationParams,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The params do contain the changed setting. Do you know if it includes all settings or do clients indeed only send the changed settings?

Comment thread crates/ty_project/src/lib.rs Outdated
@pierrem964 pierrem964 force-pushed the pgm/workspace-did-change-configuration branch from 0d5366f to 7ed12ec Compare April 28, 2026 07:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ty Multi-file analysis & type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants