Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-view/src/handlers/lsp.rs')
-rw-r--r--helix-view/src/handlers/lsp.rs22
1 files changed, 11 insertions, 11 deletions
diff --git a/helix-view/src/handlers/lsp.rs b/helix-view/src/handlers/lsp.rs
index 96ab4626..b60be0c0 100644
--- a/helix-view/src/handlers/lsp.rs
+++ b/helix-view/src/handlers/lsp.rs
@@ -1,14 +1,12 @@
use std::collections::btree_map::Entry;
-use std::collections::HashSet;
use std::fmt::Display;
use crate::editor::Action;
use crate::events::{
DiagnosticsDidChange, DocumentDidChange, DocumentDidClose, LanguageServerInitialized,
};
-use crate::{DocumentId, Editor};
-use helix_core::diagnostic::DiagnosticProvider;
-use helix_core::Uri;
+use crate::{DocumentId, Editor, ViewId};
+use helix_core::{diagnostic::DiagnosticProvider, Uri};
use helix_event::register_hook;
use helix_lsp::util::generate_transaction_from_edits;
use helix_lsp::{lsp, LanguageServerId, OffsetEncoding};
@@ -31,12 +29,14 @@ pub enum SignatureHelpEvent {
RequestComplete { open: bool },
}
-pub struct PullDiagnosticsEvent {
- pub document_id: DocumentId,
-}
-
-pub struct PullAllDocumentsDiagnosticsEvent {
- pub language_servers: HashSet<LanguageServerId>,
+#[derive(Debug)]
+pub enum InlayHintEvent {
+ /// The contents of a document changed.
+ /// This event should request annotations after a long debounce.
+ DocumentChanged(DocumentId),
+ /// The viewport was scrolled and/or the selection changed.
+ /// This event should request annotations after a short debounce.
+ ViewportScrolled(ViewId),
}
#[derive(Debug)]
@@ -364,7 +364,7 @@ impl Editor {
&& diagnostic
.source
.as_ref()
- .is_none_or(|source| !unchanged_diag_sources.contains(source))
+ .map_or(true, |source| !unchanged_diag_sources.contains(source))
};
let diagnostics = Self::doc_diagnostics_with_filter(
&self.language_servers,