diff options
author | Wojciech Kępka | 2021-06-06 09:59:32 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-06-07 00:11:52 +0000 |
commit | 16b1cfa3be2665e78bea6c876d3ced96dbfeb44f (patch) | |
tree | 08abe1f4a6a4c2b9286ce226498792e014ac050f /helix-view | |
parent | 2066e866c739fec210df85534b9fbc1de02c155b (diff) |
Add diagnostics keybindings
Diffstat (limited to 'helix-view')
-rw-r--r-- | helix-view/src/document.rs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/helix-view/src/document.rs b/helix-view/src/document.rs index 9093dbe8..783e1117 100644 --- a/helix-view/src/document.rs +++ b/helix-view/src/document.rs @@ -48,7 +48,7 @@ pub struct Document { last_saved_revision: usize, version: i32, // should be usize? - pub diagnostics: Vec<Diagnostic>, + diagnostics: Vec<Diagnostic>, language_server: Option<Arc<helix_lsp::Client>>, } @@ -519,6 +519,14 @@ impl Document { pub fn versioned_identifier(&self) -> lsp::VersionedTextDocumentIdentifier { lsp::VersionedTextDocumentIdentifier::new(self.url().unwrap(), self.version) } + + pub fn diagnostics(&self) -> &[Diagnostic] { + &self.diagnostics + } + + pub fn set_diagnostics(&mut self, diagnostics: Vec<Diagnostic>) { + self.diagnostics = diagnostics; + } } #[cfg(test)] |