diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-09-18 17:15:37 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-09-18 17:15:37 +0100 |
commit | 82dc4af5dec0d8b4418ee5fda637fa0576884b84 (patch) | |
tree | c96d093157793bc2189438eaa6f6146e3a00221d /crates | |
parent | 5e1500ec7493f2e82020eefd17a9f384a8a42f4b (diff) | |
parent | c7243e4a59ae5aa6c0ffdc9c4aa196071f1d3b6b (diff) |
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]>
Diffstat (limited to 'crates')
-rw-r--r-- | crates/rust-analyzer/Cargo.toml | 2 | ||||
-rw-r--r-- | crates/rust-analyzer/src/to_proto.rs | 12 |
2 files changed, 10 insertions, 4 deletions
diff --git a/crates/rust-analyzer/Cargo.toml b/crates/rust-analyzer/Cargo.toml index 8db0b0d72..0fbb9cb0d 100644 --- a/crates/rust-analyzer/Cargo.toml +++ b/crates/rust-analyzer/Cargo.toml | |||
@@ -21,7 +21,7 @@ env_logger = { version = "0.7.1", default-features = false } | |||
21 | itertools = "0.9.0" | 21 | itertools = "0.9.0" |
22 | jod-thread = "0.1.0" | 22 | jod-thread = "0.1.0" |
23 | log = "0.4.8" | 23 | log = "0.4.8" |
24 | lsp-types = { version = "0.80.0", features = ["proposed"] } | 24 | lsp-types = { version = "0.81.0", features = ["proposed"] } |
25 | parking_lot = "0.11.0" | 25 | parking_lot = "0.11.0" |
26 | pico-args = "0.3.1" | 26 | pico-args = "0.3.1" |
27 | oorandom = "11.1.2" | 27 | oorandom = "11.1.2" |
diff --git a/crates/rust-analyzer/src/to_proto.rs b/crates/rust-analyzer/src/to_proto.rs index dcbf837d6..59e780b7d 100644 --- a/crates/rust-analyzer/src/to_proto.rs +++ b/crates/rust-analyzer/src/to_proto.rs | |||
@@ -285,12 +285,18 @@ pub(crate) fn signature_help( | |||
285 | }) | 285 | }) |
286 | }; | 286 | }; |
287 | 287 | ||
288 | let signature = | 288 | let active_parameter = call_info.active_parameter.map(|it| it as i64); |
289 | lsp_types::SignatureInformation { label, documentation, parameters: Some(parameters) }; | 289 | |
290 | let signature = lsp_types::SignatureInformation { | ||
291 | label, | ||
292 | documentation, | ||
293 | parameters: Some(parameters), | ||
294 | active_parameter, | ||
295 | }; | ||
290 | lsp_types::SignatureHelp { | 296 | lsp_types::SignatureHelp { |
291 | signatures: vec![signature], | 297 | signatures: vec![signature], |
292 | active_signature: None, | 298 | active_signature: None, |
293 | active_parameter: call_info.active_parameter.map(|it| it as i64), | 299 | active_parameter, |
294 | } | 300 | } |
295 | } | 301 | } |
296 | 302 | ||