Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-view/src/document.rs')
| -rw-r--r-- | helix-view/src/document.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/helix-view/src/document.rs b/helix-view/src/document.rs index 1c2cbebc..28b8fa94 100644 --- a/helix-view/src/document.rs +++ b/helix-view/src/document.rs @@ -204,11 +204,14 @@ pub struct Document { pub readonly: bool, + pub previous_diagnostic_id: Option<String>, + /// Annotations for LSP document color swatches pub color_swatches: Option<DocumentColorSwatches>, // NOTE: ideally this would live on the handler for color swatches. This is blocked on a // large refactor that would make `&mut Editor` available on the `DocumentDidChange` event. pub color_swatch_controller: TaskController, + pub pull_diagnostic_controller: TaskController, // NOTE: this field should eventually go away - we should use the Editor's syn_loader instead // of storing a copy on every doc. Then we can remove the surrounding `Arc` and use the @@ -728,6 +731,8 @@ impl Document { color_swatches: None, color_swatch_controller: TaskController::new(), syn_loader, + previous_diagnostic_id: None, + pull_diagnostic_controller: TaskController::new(), } } @@ -2284,6 +2289,10 @@ impl Document { pub fn reset_all_inlay_hints(&mut self) { self.inlay_hints = Default::default(); } + + pub fn has_language_server_with_feature(&self, feature: LanguageServerFeature) -> bool { + self.language_servers_with_feature(feature).next().is_some() + } } #[derive(Debug, Default)] |