@@ -2,6 +2,7 @@ use arc_swap::{access::Map, ArcSwap};
2use futures_util::Stream;
2use futures_util::Stream;
3use helix_core::{
3use helix_core::{
4 config::{default_syntax_loader, user_syntax_loader},
4 config::{default_syntax_loader, user_syntax_loader},
5+ diagnostic::NumberOrString,
5 pos_at_coords, syntax, Selection,
6 pos_at_coords, syntax, Selection,
7use helix_lsp::{lsp, util::lsp_pos_to_pos, LspProgressMap};
8use helix_lsp::{lsp, util::lsp_pos_to_pos, LspProgressMap};
@@ -556,12 +557,24 @@ impl Application {
560+ let code = match diagnostic.code.clone() {
561+ Some(x) => match x {
562+ lsp::NumberOrString::Number(x) => {
563+ Some(NumberOrString::Number(x))
565+ lsp::NumberOrString::String(x) => {
566+ Some(NumberOrString::String(x))
559 Some(Diagnostic {
572 Some(Diagnostic {
560 range: Range { start, end },
573 range: Range { start, end },
561 line: diagnostic.range.start.line as usize,
574 line: diagnostic.range.start.line as usize,
562 message: diagnostic.message.clone(),
575 message: diagnostic.message.clone(),
563 severity,
576 severity,
565 // source
578 // source