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:
Nathan Sobo 2021-12-14 18:26:42 -07:00
parent e1a2897d53
commit 6c5b27af1d
13 changed files with 204 additions and 97 deletions

View file

@ -14,6 +14,13 @@ pub struct Anchor {
}
impl Anchor {
pub fn new(excerpt_id: ExcerptId, text_anchor: text::Anchor) -> Self {
Self {
excerpt_id,
text_anchor,
}
}
pub fn min() -> Self {
Self {
excerpt_id: ExcerptId::min(),