python: Enable subroot detection for pylsp and pyright (#27364)
This is not going to fully fix the multi-root story, as we still need to weave venvs through. Hence, no release note just yet. Release Notes: - N/A
This commit is contained in:
parent
57ffd6d78d
commit
e661a0afd6
2 changed files with 41 additions and 2 deletions
|
@ -2,6 +2,7 @@ use anyhow::Context as _;
|
|||
use gpui::{App, UpdateGlobal};
|
||||
use json::json_task_context;
|
||||
use node_runtime::NodeRuntime;
|
||||
use python::PyprojectTomlManifestProvider;
|
||||
use rust::CargoManifestProvider;
|
||||
use rust_embed::RustEmbed;
|
||||
use settings::SettingsStore;
|
||||
|
@ -302,7 +303,13 @@ pub fn init(languages: Arc<LanguageRegistry>, node: NodeRuntime, cx: &mut App) {
|
|||
anyhow::Ok(())
|
||||
})
|
||||
.detach();
|
||||
project::ManifestProviders::global(cx).register(Arc::from(CargoManifestProvider));
|
||||
let manifest_providers: [Arc<dyn ManifestProvider>; 2] = [
|
||||
Arc::from(CargoManifestProvider),
|
||||
Arc::from(PyprojectTomlManifestProvider),
|
||||
];
|
||||
for provider in manifest_providers {
|
||||
project::ManifestProviders::global(cx).register(provider);
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue