mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-12 05:08:52 +00:00
Use empty SymbolInformation.signature_documentation.relative_path
I'm fairly sure this is more correct, and saves space(~90mb to 82mb for Zed's index). I'm checking in about this with SCIP folks in https://github.com/sourcegraph/scip/pull/299.
This commit is contained in:
parent
124c8318a4
commit
d650daa7d3
1 changed files with 2 additions and 9 deletions
|
@ -151,7 +151,6 @@ impl flags::Scip {
|
|||
text_range,
|
||||
);
|
||||
symbols.push(compute_symbol_info(
|
||||
relative_path.clone(),
|
||||
symbol.clone(),
|
||||
enclosing_symbol,
|
||||
token,
|
||||
|
@ -238,12 +237,7 @@ impl flags::Scip {
|
|||
&line_index,
|
||||
text_range,
|
||||
);
|
||||
external_symbols.push(compute_symbol_info(
|
||||
relative_path.clone(),
|
||||
symbol.clone(),
|
||||
enclosing_symbol,
|
||||
token,
|
||||
));
|
||||
external_symbols.push(compute_symbol_info(symbol.clone(), enclosing_symbol, token));
|
||||
}
|
||||
|
||||
let index = scip_types::Index {
|
||||
|
@ -289,7 +283,6 @@ Duplicate symbols encountered:
|
|||
";
|
||||
|
||||
fn compute_symbol_info(
|
||||
relative_path: String,
|
||||
symbol: String,
|
||||
enclosing_symbol: Option<String>,
|
||||
token: &TokenStaticData,
|
||||
|
@ -301,7 +294,7 @@ fn compute_symbol_info(
|
|||
|
||||
let position_encoding = scip_types::PositionEncoding::UTF8CodeUnitOffsetFromLineStart.into();
|
||||
let signature_documentation = token.signature.clone().map(|text| scip_types::Document {
|
||||
relative_path,
|
||||
relative_path: "".to_owned(),
|
||||
language: "rust".to_owned(),
|
||||
text,
|
||||
position_encoding,
|
||||
|
|
Loading…
Reference in a new issue