project: Track manifest locations per unique manifest locator (#27194)
This pull request paves way for exposing manifest tracking to extensions. - Project tree was renamed to manifest tree to better reflect it's intent (and avoid confusion). - Language server adapters now provide a name of their *manifest locator*. If multiple language servers refer to the same locator, the locating code will run just once for a given path. Release Notes: - N/A *or* Added/Fixed/Improved ... --------- Co-authored-by: Anthony <anthony@zed.dev>
This commit is contained in:
parent
6bced3a834
commit
05aa8880a4
10 changed files with 241 additions and 154 deletions
|
@ -6,9 +6,9 @@ use crate::{
|
|||
buffer_store::{BufferStore, BufferStoreEvent},
|
||||
environment::ProjectEnvironment,
|
||||
lsp_command::{self, *},
|
||||
manifest_tree::{AdapterQuery, LanguageServerTree, LaunchDisposition, ManifestTree},
|
||||
prettier_store::{self, PrettierStore, PrettierStoreEvent},
|
||||
project_settings::{LspSettings, ProjectSettings},
|
||||
project_tree::{AdapterQuery, LanguageServerTree, LaunchDisposition, ProjectTree},
|
||||
relativize_path, resolve_path,
|
||||
toolchain_store::{EmptyToolchainStore, ToolchainStoreEvent},
|
||||
worktree_store::{WorktreeStore, WorktreeStoreEvent},
|
||||
|
@ -3349,7 +3349,7 @@ impl LspStore {
|
|||
sender,
|
||||
)
|
||||
};
|
||||
let project_tree = ProjectTree::new(worktree_store.clone(), cx);
|
||||
let manifest_tree = ManifestTree::new(worktree_store.clone(), cx);
|
||||
Self {
|
||||
mode: LspStoreMode::Local(LocalLspStore {
|
||||
weak: cx.weak_entity(),
|
||||
|
@ -3375,7 +3375,7 @@ impl LspStore {
|
|||
_subscription: cx.on_app_quit(|this, cx| {
|
||||
this.as_local_mut().unwrap().shutdown_language_servers(cx)
|
||||
}),
|
||||
lsp_tree: LanguageServerTree::new(project_tree, languages.clone(), cx),
|
||||
lsp_tree: LanguageServerTree::new(manifest_tree, languages.clone(), cx),
|
||||
registered_buffers: Default::default(),
|
||||
}),
|
||||
last_formatting_failure: None,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue