Add files to project diagnostics view in order
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
co-authored by
Nathan Sobo
parent
c7eb6a6a60
commit
747d9e8784
@@ -67,7 +67,7 @@ pub enum Event {
|
||||
DiagnosticsUpdated(ProjectPath),
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Eq, PartialEq, Hash)]
|
||||
#[derive(Clone, Debug, Eq, PartialEq, Hash, PartialOrd, Ord)]
|
||||
pub struct ProjectPath {
|
||||
pub worktree_id: WorktreeId,
|
||||
pub path: Arc<Path>,
|
||||
|
||||
@@ -57,7 +57,7 @@ enum ScanState {
|
||||
Err(Arc<anyhow::Error>),
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, PartialEq, Eq, Debug, Hash)]
|
||||
#[derive(Copy, Clone, PartialEq, Eq, Debug, Hash, PartialOrd, Ord)]
|
||||
pub struct WorktreeId(usize);
|
||||
|
||||
pub enum Worktree {
|
||||
@@ -711,7 +711,7 @@ impl Worktree {
|
||||
let mut primary_diagnostic_group_ids = HashMap::default();
|
||||
let mut sources_by_group_id = HashMap::default();
|
||||
let mut supporting_diagnostic_severities = HashMap::default();
|
||||
for diagnostic in ¶ms.diagnostics {
|
||||
for diagnostic in dbg!(¶ms.diagnostics) {
|
||||
let source = diagnostic.source.as_ref();
|
||||
let code = diagnostic.code.as_ref().map(|code| match code {
|
||||
lsp::NumberOrString::Number(code) => code.to_string(),
|
||||
|
||||
Reference in New Issue
Block a user