Automatically subscribe for lsp logs of every server added
Avoid re-adding the server on new logs events.
This commit is contained in:
parent
adf313bd33
commit
91fac2aa76
2 changed files with 31 additions and 21 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue