Clear old diagnostics when restarting a language server

This commit is contained in:
Max Brunsfeld 2023-05-22 12:53:22 -07:00
parent e129ed2d91
commit 7689cdf3f9
5 changed files with 160 additions and 4 deletions

View file

@ -80,6 +80,10 @@ impl DiagnosticSet {
}
}
pub fn len(&self) -> usize {
self.diagnostics.summary().count
}
pub fn iter(&self) -> impl Iterator<Item = &DiagnosticEntry<Anchor>> {
self.diagnostics.iter()
}