diff options
| author | Michael Sloan <mgsloan@gmail.com> | 2024-12-26 01:50:12 -0700 |
|---|---|---|
| committer | Michael Sloan <mgsloan@gmail.com> | 2024-12-26 03:46:00 -0700 |
| commit | cd8522ef4ed240d489ef2c8c66400a6a2cc91837 (patch) | |
| tree | 2ac36895d4e62df968e742465c82db42c180ebd5 /src/tools | |
| parent | bbc6242b4cfe3a80633874e01d606d8e35b85f31 (diff) | |
| download | rust-cd8522ef4ed240d489ef2c8c66400a6a2cc91837.tar.gz rust-cd8522ef4ed240d489ef2c8c66400a6a2cc91837.zip | |
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.
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/rust-analyzer/crates/rust-analyzer/src/cli/scip.rs | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/tools/rust-analyzer/crates/rust-analyzer/src/cli/scip.rs b/src/tools/rust-analyzer/crates/rust-analyzer/src/cli/scip.rs index 6526fd965a9..e096f3f5180 100644 --- a/src/tools/rust-analyzer/crates/rust-analyzer/src/cli/scip.rs +++ b/src/tools/rust-analyzer/crates/rust-analyzer/src/cli/scip.rs @@ -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, |
