@@ -34,7 +34,6 @@ use std::{
3434 io::{stdin, stdout},
3535 path::Path,
3636 sync::Arc,
37− time::{Duration, Instant},
3837};
3938
4039use anyhow::{Context, Error};
@@ -45,8 +44,6 @@ use {signal_hook::consts::signal, signal_hook_tokio::Signals};
4544#[cfg(windows)]
4645type Signals = futures_util::stream::Empty<()>;
4746
48−const LSP_DEADLINE: Duration = Duration::from_millis(16);
49−
5047#[cfg(not(feature = "integration"))]
5148use tui::backend::CrosstermBackend;
5249
@@ -76,7 +73,6 @@ pub struct Application {
7673 signals: Signals,
7774 jobs: Jobs,
7875 lsp_progress: LspProgressMap,
79− last_render: Instant,
8076}
8177
8278#[cfg(feature = "integration")]
@@ -253,7 +249,6 @@ impl Application {
253249 signals,
254250 jobs: Jobs::new(),
255251 lsp_progress: LspProgressMap::new(),
256− last_render: Instant::now(),
257252 };
258253
259254 Ok(app)
@@ -300,7 +295,6 @@ impl Application {
300295 S: Stream<Item = crossterm::Result<crossterm::event::Event>> + Unpin,
301296 {
302297 self.render().await;
303− self.last_render = Instant::now();
304298
305299 loop {
306300 if !self.event_loop_until_idle(input_stream).await {
@@ -609,12 +603,7 @@ impl Application {
609603 EditorEvent::LanguageServerMessage((id, call)) => {
610604 self.handle_language_server_message(call, id).await;
611605 // limit render calls for fast language server messages
612− let last = self.editor.language_servers.incoming.is_empty();
613−
614− if last || self.last_render.elapsed() > LSP_DEADLINE {
615− self.render().await;
616− self.last_render = Instant::now();
617− }
606+ self.editor.redraw_handle.0.notify_one();
618607 }
619608 EditorEvent::DebuggerEvent(payload) => {
620609 let needs_render = self.editor.handle_debugger_message(payload).await;