Group diagnostics by primary
Render primary message above the excerpt and supporting messages as block decorations with a `Below` disposition. This is still super rough. Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
This commit is contained in:
parent
e1a2897d53
commit
6c5b27af1d
13 changed files with 204 additions and 97 deletions
|
@ -1,4 +1,4 @@
|
|||
use crate::diagnostic_set::DiagnosticEntry;
|
||||
use crate::diagnostic_set::{DiagnosticEntry, DiagnosticGroup};
|
||||
pub use crate::{
|
||||
diagnostic_set::DiagnosticSet,
|
||||
highlight_map::{HighlightId, HighlightMap},
|
||||
|
@ -1728,6 +1728,13 @@ impl BufferSnapshot {
|
|||
self.diagnostics.range(search_range, self, true)
|
||||
}
|
||||
|
||||
pub fn diagnostic_groups<O>(&self) -> Vec<DiagnosticGroup<O>>
|
||||
where
|
||||
O: FromAnchor + Ord + Copy,
|
||||
{
|
||||
self.diagnostics.groups(self)
|
||||
}
|
||||
|
||||
pub fn diagnostic_group<'a, O>(
|
||||
&'a self,
|
||||
group_id: usize,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue