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

feat(lsp): allow overriding the configuration path from LSP workspaces #5093

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

siketyan
Copy link
Contributor

Summary

As the first step of #5089, this pull request adds a new option experimental.configurationPath to the response of workspace/configuration request. It will affect when loading workspace configurations, preferred over the default biome.json in the workspace.

Test Plan

Existing tests should pass.

For the new option, I tested my modified build of biome-intellij with workspace/configuration support added. I could confirm that two projects work in parallel with different Biome configurations.

@github-actions github-actions bot added the A-LSP Area: language server protocol label Feb 11, 2025
@@ -492,6 +492,20 @@ impl Session {
if let Some(config_path) = &self.config_path {
let base_path = ConfigurationPathHint::FromUser(config_path.clone());
let status = self.load_biome_configuration_file(base_path).await;
self.set_configuration_status(status);
} else if let Some(config_path) = self
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We need to consider how to migrate users (LSP clients) smoothly for this change. For example, biome-intellij currently using --config-path for overriding the config path. To prefer this new option on the plugin, we need to check the Biome version is >= 2.0. This requires some additional work for plugin side and not a smooth path.

Maybe should we prefer this new option over the existing --config-path flag? If so, we can just put the config path to both the CLI flag and the LSP request to support Biome < 2 and >= 2.

@ematipico ematipico deleted the branch biomejs:main February 12, 2025 11:41
@ematipico ematipico closed this Feb 12, 2025
@ematipico ematipico reopened this Feb 12, 2025
@ematipico ematipico changed the base branch from next to main February 12, 2025 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-LSP Area: language server protocol
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants