diff --git a/crates/ui/src/input/lsp/hover.rs b/crates/ui/src/input/lsp/hover.rs index a369fe43..04f63cef 100644 --- a/crates/ui/src/input/lsp/hover.rs +++ b/crates/ui/src/input/lsp/hover.rs @@ -48,10 +48,14 @@ impl InputState { let task = provider.hover(&self.text, offset, window, cx); let mut symbol_range = self.text.word_range(offset).unwrap_or(offset..offset); let editor = cx.entity(); + let should_delay = self.hover_popover.is_none(); self.lsp._hover_task = cx.spawn_in(window, async move |_, cx| { - cx.background_executor() - .timer(Duration::from_millis(150)) - .await; + if should_delay { + cx.background_executor() + .timer(Duration::from_millis(150)) + .await; + } + let result = task.await?; _ = editor.update(cx, |editor, cx| match result {