|
|
@ -32,8 +32,7 @@ use crate::{
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
use std::{
|
|
|
|
use std::{
|
|
|
|
borrow::Cow, cmp::Ordering, collections::BTreeMap, fmt::Write, future::Future, path::PathBuf,
|
|
|
|
cmp::Ordering, collections::BTreeMap, fmt::Write, future::Future, path::PathBuf, sync::Arc,
|
|
|
|
sync::Arc,
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/// Gets the language server that is attached to a document, and
|
|
|
|
/// Gets the language server that is attached to a document, and
|
|
|
@ -138,15 +137,11 @@ impl ui::menu::Item for PickerDiagnostic {
|
|
|
|
// remove background as it is distracting in the picker list
|
|
|
|
// remove background as it is distracting in the picker list
|
|
|
|
style.bg = None;
|
|
|
|
style.bg = None;
|
|
|
|
|
|
|
|
|
|
|
|
let code: Cow<'_, str> = self
|
|
|
|
let code = match self.diag.code.as_ref() {
|
|
|
|
.diag
|
|
|
|
Some(NumberOrString::Number(n)) => format!(" ({n})"),
|
|
|
|
.code
|
|
|
|
Some(NumberOrString::String(s)) => format!(" ({s})"),
|
|
|
|
.as_ref()
|
|
|
|
None => String::new(),
|
|
|
|
.map(|c| match c {
|
|
|
|
};
|
|
|
|
NumberOrString::Number(n) => n.to_string().into(),
|
|
|
|
|
|
|
|
NumberOrString::String(s) => s.as_str().into(),
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
.unwrap_or_default();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let path = match format {
|
|
|
|
let path = match format {
|
|
|
|
DiagnosticsFormat::HideSourcePath => String::new(),
|
|
|
|
DiagnosticsFormat::HideSourcePath => String::new(),
|
|
|
|