mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-24 19:10:24 +00:00
Register initial request handlers before launching server
This commit is contained in:
parent
8839b07a25
commit
e54f16f372
2 changed files with 6 additions and 6 deletions
|
@ -282,7 +282,7 @@ impl LanguageServer {
|
|||
stdout.read_exact(&mut buffer).await?;
|
||||
|
||||
if let Ok(message) = str::from_utf8(&buffer) {
|
||||
log::trace!("incoming message:{}", message);
|
||||
log::trace!("incoming message: {}", message);
|
||||
for handler in io_handlers.lock().values_mut() {
|
||||
handler(true, message);
|
||||
}
|
||||
|
|
|
@ -2748,10 +2748,8 @@ impl Project {
|
|||
) -> Result<Option<Arc<LanguageServer>>> {
|
||||
let workspace_config = cx.update(|cx| languages.workspace_configuration(cx)).await;
|
||||
let language_server = match pending_server.task.await? {
|
||||
Some(server) => server.initialize(initialization_options).await?,
|
||||
None => {
|
||||
return Ok(None);
|
||||
}
|
||||
Some(server) => server,
|
||||
None => return Ok(None),
|
||||
};
|
||||
|
||||
language_server
|
||||
|
@ -2909,7 +2907,9 @@ impl Project {
|
|||
)
|
||||
.ok();
|
||||
|
||||
Ok(Some(language_server))
|
||||
Ok(Some(
|
||||
language_server.initialize(initialization_options).await?,
|
||||
))
|
||||
}
|
||||
|
||||
fn insert_newly_running_language_server(
|
||||
|
|
Loading…
Reference in a new issue