Skip to content

Commit 375f1cc

Browse files
scip: Populate SymbolInformation::display_name
1 parent 426d284 commit 375f1cc

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

crates/ide/src/static_index.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ pub struct TokenStaticData {
4646
pub definition: Option<FileRange>,
4747
pub references: Vec<ReferenceData>,
4848
pub moniker: Option<MonikerResult>,
49+
pub display_name: Option<String>,
4950
}
5051

5152
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
@@ -172,6 +173,7 @@ impl StaticIndex<'_> {
172173
}),
173174
references: vec![],
174175
moniker: current_crate.and_then(|cc| def_to_moniker(self.db, def, cc)),
176+
display_name: def.name(self.db).map(|name| name.display(self.db).to_string()),
175177
});
176178
self.def_map.insert(def, it);
177179
it

crates/rust-analyzer/src/cli/scip.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ impl flags::Scip {
134134
relationships: Vec::new(),
135135
special_fields: Default::default(),
136136
kind: Default::default(),
137-
display_name: String::new(),
137+
display_name: token.display_name.clone().unwrap_or_default(),
138138
signature_documentation: Default::default(),
139139
enclosing_symbol: String::new(),
140140
};

0 commit comments

Comments
 (0)