Fetch code actions on cursor movement instead of on-demand

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Antonio Scandurra 2022-02-11 14:41:19 +01:00
parent 763d57c94a
commit 2fcdcac080
9 changed files with 134 additions and 70 deletions

View file

@ -867,7 +867,7 @@ impl Project {
// Process all the LSP events.
cx.spawn_weak(|this, mut cx| async move {
while let Ok(message) = diagnostics_rx.recv().await {
let this = cx.read(|cx| this.upgrade(cx))?;
let this = this.upgrade(&cx)?;
match message {
LspEvent::DiagnosticsStart => {
this.update(&mut cx, |this, cx| {