Bump scip

This commit is contained in:
Laurențiu Nicola 2024-01-30 08:41:43 +02:00
parent 7219414e81
commit 20c01672a8
3 changed files with 10 additions and 4 deletions

4
Cargo.lock generated
View File

@ -1661,9 +1661,9 @@ dependencies = [
[[package]] [[package]]
name = "scip" name = "scip"
version = "0.3.1" version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3e84d21062a3ba08d58870c8c36b0c005b2b2261c6ad1bf7042585427c781883" checksum = "e5dc1bd66649133af84ab62436ddd2856c2605182b02dec2cd197f684dfe15ef"
dependencies = [ dependencies = [
"protobuf", "protobuf",
] ]

View File

@ -23,7 +23,7 @@ anyhow.workspace = true
crossbeam-channel = "0.5.5" crossbeam-channel = "0.5.5"
dissimilar.workspace = true dissimilar.workspace = true
itertools.workspace = true itertools.workspace = true
scip = "0.3.1" scip = "0.3.3"
lsp-types = { version = "=0.95.0", features = ["proposed"] } lsp-types = { version = "=0.95.0", features = ["proposed"] }
parking_lot = "0.12.1" parking_lot = "0.12.1"
xflags = "0.3.0" xflags = "0.3.0"

View File

@ -143,11 +143,14 @@ pub fn run(self) -> anyhow::Result<()> {
.map(|hover| hover.markup.as_str()) .map(|hover| hover.markup.as_str())
.filter(|it| !it.is_empty()) .filter(|it| !it.is_empty())
.map(|it| vec![it.to_owned()]); .map(|it| vec![it.to_owned()]);
let position_encoding =
scip_types::PositionEncoding::UTF8CodeUnitOffsetFromLineStart.into();
let signature_documentation = let signature_documentation =
token.signature.clone().map(|text| scip_types::Document { token.signature.clone().map(|text| scip_types::Document {
relative_path: relative_path.clone(), relative_path: relative_path.clone(),
language: "rust".to_string(), language: "rust".to_string(),
text, text,
position_encoding,
..Default::default() ..Default::default()
}); });
let symbol_info = scip_types::SymbolInformation { let symbol_info = scip_types::SymbolInformation {
@ -181,13 +184,16 @@ pub fn run(self) -> anyhow::Result<()> {
continue; continue;
} }
let position_encoding =
scip_types::PositionEncoding::UTF8CodeUnitOffsetFromLineStart.into();
documents.push(scip_types::Document { documents.push(scip_types::Document {
relative_path, relative_path,
language: "rust".to_string(), language: "rust".to_string(),
occurrences, occurrences,
symbols, symbols,
special_fields: Default::default(),
text: String::new(), text: String::new(),
position_encoding,
special_fields: Default::default(),
}); });
} }