Minor fixes found during review
This commit is contained in:
parent
8931218dc6
commit
8c91c5c575
3 changed files with 15 additions and 8 deletions
|
@ -7,7 +7,6 @@ edition = "2021"
|
||||||
proc-macro = true
|
proc-macro = true
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
# TODO: remove "extra-traits"
|
|
||||||
syn = { version = "1.0", features = ["full", "extra-traits"] }
|
syn = { version = "1.0", features = ["full", "extra-traits"] }
|
||||||
quote = "1.0"
|
quote = "1.0"
|
||||||
proc-macro2 = "1.0"
|
proc-macro2 = "1.0"
|
||||||
|
|
|
@ -1722,7 +1722,7 @@ impl Project {
|
||||||
.await?;
|
.await?;
|
||||||
this.update(&mut cx, |this, cx| {
|
this.update(&mut cx, |this, cx| {
|
||||||
this.assign_language_to_buffer(&buffer, cx);
|
this.assign_language_to_buffer(&buffer, cx);
|
||||||
this.register_buffer_with_language_server(&buffer, cx)
|
this.register_buffer_with_language_server(&buffer, cx);
|
||||||
});
|
});
|
||||||
Ok(())
|
Ok(())
|
||||||
})
|
})
|
||||||
|
@ -2120,6 +2120,14 @@ impl Project {
|
||||||
let adapter = adapter.clone();
|
let adapter = adapter.clone();
|
||||||
move |params, mut cx| {
|
move |params, mut cx| {
|
||||||
if let Some(this) = this.upgrade(&cx) {
|
if let Some(this) = this.upgrade(&cx) {
|
||||||
|
// cx.spawn(|cx| {
|
||||||
|
// this.update(&mut cx, |this, cx| {
|
||||||
|
// this.on_lsp_diagnostics_published(
|
||||||
|
// server_id, params, adapter, cx,
|
||||||
|
// )
|
||||||
|
// })
|
||||||
|
// })
|
||||||
|
// .detach();
|
||||||
this.update(&mut cx, |this, cx| {
|
this.update(&mut cx, |this, cx| {
|
||||||
// TODO(isaac): remove block on
|
// TODO(isaac): remove block on
|
||||||
smol::block_on(this.on_lsp_diagnostics_published(
|
smol::block_on(this.on_lsp_diagnostics_published(
|
||||||
|
@ -3414,11 +3422,11 @@ impl Project {
|
||||||
}
|
}
|
||||||
new_symbols
|
new_symbols
|
||||||
});
|
});
|
||||||
for new_symbol in new_symbols {
|
symbols = futures::future::join_all(new_symbols.into_iter())
|
||||||
if let Some(new_symbol) = new_symbol.await.ok() {
|
.await
|
||||||
symbols.push(new_symbol);
|
.into_iter()
|
||||||
}
|
.filter_map(|symbol| symbol.ok())
|
||||||
}
|
.collect::<Vec<_>>();
|
||||||
}
|
}
|
||||||
Ok(symbols)
|
Ok(symbols)
|
||||||
})
|
})
|
||||||
|
|
|
@ -225,10 +225,10 @@ fn main() {
|
||||||
cx.spawn({
|
cx.spawn({
|
||||||
let languages = languages.clone();
|
let languages = languages.clone();
|
||||||
|cx| async move {
|
|cx| async move {
|
||||||
// init_languages.await;
|
|
||||||
cx.read(|cx| {
|
cx.read(|cx| {
|
||||||
languages.set_theme(cx.global::<Settings>().theme.editor.syntax.clone())
|
languages.set_theme(cx.global::<Settings>().theme.editor.syntax.clone())
|
||||||
});
|
});
|
||||||
|
init_languages.await;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.detach();
|
.detach();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue