mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 20:09:19 +00:00
scip: Populate SymbolInformation::display_name
This commit is contained in:
parent
426d2842c1
commit
375f1cca4f
2 changed files with 3 additions and 1 deletions
|
@ -46,6 +46,7 @@ pub struct TokenStaticData {
|
||||||
pub definition: Option<FileRange>,
|
pub definition: Option<FileRange>,
|
||||||
pub references: Vec<ReferenceData>,
|
pub references: Vec<ReferenceData>,
|
||||||
pub moniker: Option<MonikerResult>,
|
pub moniker: Option<MonikerResult>,
|
||||||
|
pub display_name: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||||
|
@ -172,6 +173,7 @@ impl StaticIndex<'_> {
|
||||||
}),
|
}),
|
||||||
references: vec![],
|
references: vec![],
|
||||||
moniker: current_crate.and_then(|cc| def_to_moniker(self.db, def, cc)),
|
moniker: current_crate.and_then(|cc| def_to_moniker(self.db, def, cc)),
|
||||||
|
display_name: def.name(self.db).map(|name| name.display(self.db).to_string()),
|
||||||
});
|
});
|
||||||
self.def_map.insert(def, it);
|
self.def_map.insert(def, it);
|
||||||
it
|
it
|
||||||
|
|
|
@ -134,7 +134,7 @@ impl flags::Scip {
|
||||||
relationships: Vec::new(),
|
relationships: Vec::new(),
|
||||||
special_fields: Default::default(),
|
special_fields: Default::default(),
|
||||||
kind: Default::default(),
|
kind: Default::default(),
|
||||||
display_name: String::new(),
|
display_name: token.display_name.clone().unwrap_or_default(),
|
||||||
signature_documentation: Default::default(),
|
signature_documentation: Default::default(),
|
||||||
enclosing_symbol: String::new(),
|
enclosing_symbol: String::new(),
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue