Automatically subscribe for lsp logs of every server added
Avoid re-adding the server on new logs events.
This commit is contained in:
@@ -2789,18 +2789,6 @@ impl Project {
|
||||
None => return Ok(None),
|
||||
};
|
||||
|
||||
language_server
|
||||
.on_notification::<lsp::notification::LogMessage, _>({
|
||||
move |params, mut cx| {
|
||||
if let Some(this) = this.upgrade(&cx) {
|
||||
this.update(&mut cx, |_, cx| {
|
||||
cx.emit(Event::LanguageServerLog(server_id, params.message))
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
.detach();
|
||||
|
||||
language_server
|
||||
.on_notification::<lsp::notification::PublishDiagnostics, _>({
|
||||
let adapter = adapter.clone();
|
||||
|
||||
Reference in New Issue
Block a user