Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'src/hov.rs')
| -rw-r--r-- | src/hov.rs | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -496,12 +496,15 @@ pub fn to_snippet<'a: 'c, 'b: 'c, 'c>( ) -> annotate_snippets::Group<'c> { use annotate_snippets::*; match severity { - Some(DiagnosticSeverity::WARNING) => Level::WARNING, - Some(DiagnosticSeverity::INFORMATION) => Level::INFO, - Some(DiagnosticSeverity::HINT) => Level::HELP, + Some(DiagnosticSeverity::Warning) => Level::WARNING, + Some(DiagnosticSeverity::Information) => Level::INFO, + Some(DiagnosticSeverity::Hint) => Level::HELP, _ => Level::ERROR, } - .primary_title(message) + .primary_title(match message { + lsp_types::Message::String(x) => x, + lsp_types::Message::MarkupContent(_) => unimplemented!(), + }) .element(Snippet::source(t).annotation( AnnotationKind::Primary.span(t.l_range(*range).unwrap()), )) |