Skip to content

Commit 82dc4af

Browse files
bors[bot]kjeremy
andauthored
Merge #6032
6032: Support active parameters at the per-signature level r=jonas-schievink a=kjeremy No functionality change. This also pulls in a few other protocol changes that we don't use and updates crates. Co-authored-by: kjeremy <[email protected]>
2 parents 5e1500e + c7243e4 commit 82dc4af

File tree

3 files changed

+20
-14
lines changed

3 files changed

+20
-14
lines changed

Cargo.lock

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/rust-analyzer/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ env_logger = { version = "0.7.1", default-features = false }
2121
itertools = "0.9.0"
2222
jod-thread = "0.1.0"
2323
log = "0.4.8"
24-
lsp-types = { version = "0.80.0", features = ["proposed"] }
24+
lsp-types = { version = "0.81.0", features = ["proposed"] }
2525
parking_lot = "0.11.0"
2626
pico-args = "0.3.1"
2727
oorandom = "11.1.2"

crates/rust-analyzer/src/to_proto.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -285,12 +285,18 @@ pub(crate) fn signature_help(
285285
})
286286
};
287287

288-
let signature =
289-
lsp_types::SignatureInformation { label, documentation, parameters: Some(parameters) };
288+
let active_parameter = call_info.active_parameter.map(|it| it as i64);
289+
290+
let signature = lsp_types::SignatureInformation {
291+
label,
292+
documentation,
293+
parameters: Some(parameters),
294+
active_parameter,
295+
};
290296
lsp_types::SignatureHelp {
291297
signatures: vec![signature],
292298
active_signature: None,
293-
active_parameter: call_info.active_parameter.map(|it| it as i64),
299+
active_parameter,
294300
}
295301
}
296302

0 commit comments

Comments
 (0)