Refactor lsp store (#17435)

This PR moves the local, remote, and ssh components of the LSP store
into their own types.

Release Notes:

- N/A

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Co-authored-by: Conrad <conrad@zed.dev>
This commit is contained in:
Mikayla Maki 2024-09-05 11:51:49 -07:00 committed by GitHub
parent b887f8df8c
commit 8a1e8e37bb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 714 additions and 443 deletions

View file

@ -57,18 +57,17 @@ impl HeadlessProject {
});
let environment = project::ProjectEnvironment::new(&worktree_store, None, cx);
let lsp_store = cx.new_model(|cx| {
LspStore::new(
let mut lsp_store = LspStore::new_local(
buffer_store.clone(),
worktree_store.clone(),
Some(environment),
environment,
languages,
None,
fs.clone(),
Some(session.clone().into()),
None,
Some(0),
cx,
)
);
lsp_store.shared(SSH_PROJECT_ID, session.clone().into(), cx);
lsp_store
});
let client: AnyProtoClient = session.clone().into();