Move adapters to remote (#18359)

Release Notes:

- ssh remoting: run LSP Adapters on host

---------

Co-authored-by: Mikayla <mikayla@zed.dev>
This commit is contained in:
Conrad Irwin
2024-09-25 15:29:04 -07:00
committed by GitHub
co-authored by Mikayla
parent 40408e731e
commit 64532e94e4
10 changed files with 76 additions and 548 deletions
+5 -7
View File
@@ -44,6 +44,10 @@ impl HeadlessProject {
pub fn new(session: Arc<SshSession>, fs: Arc<dyn Fs>, cx: &mut ModelContext<Self>) -> Self {
let languages = Arc::new(LanguageRegistry::new(cx.background_executor().clone()));
let node_runtime = NodeRuntime::unavailable();
languages::init(languages.clone(), node_runtime.clone(), cx);
let worktree_store = cx.new_model(|cx| {
let mut store = WorktreeStore::local(true, fs.clone());
store.shared(SSH_PROJECT_ID, session.clone().into(), cx);
@@ -56,7 +60,7 @@ impl HeadlessProject {
});
let prettier_store = cx.new_model(|cx| {
PrettierStore::new(
NodeRuntime::unavailable(),
node_runtime,
fs.clone(),
languages.clone(),
worktree_store.clone(),
@@ -116,12 +120,6 @@ impl HeadlessProject {
client.add_model_request_handler(BufferStore::handle_update_buffer);
client.add_model_message_handler(BufferStore::handle_close_buffer);
client.add_model_request_handler(LspStore::handle_create_language_server);
client.add_model_request_handler(LspStore::handle_which_command);
client.add_model_request_handler(LspStore::handle_shell_env);
client.add_model_request_handler(LspStore::handle_try_exec);
client.add_model_request_handler(LspStore::handle_read_text_file);
BufferStore::init(&client);
WorktreeStore::init(&client);
SettingsObserver::init(&client);