mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-25 20:43:21 +00:00
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 <kjeremy@gmail.com>
This commit is contained in:
commit
82dc4af5de
3 changed files with 20 additions and 14 deletions
20
Cargo.lock
generated
20
Cargo.lock
generated
|
@ -140,9 +140,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "cc"
|
||||
version = "1.0.59"
|
||||
version = "1.0.60"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "66120af515773fb005778dc07c261bd201ec8ce50bd6e7144c927753fe013381"
|
||||
checksum = "ef611cc68ff783f18535d77ddd080185275713d852c4f5cbb6122c462a7a825c"
|
||||
|
||||
[[package]]
|
||||
name = "cfg"
|
||||
|
@ -311,9 +311,9 @@ checksum = "9bda8e21c04aca2ae33ffc2fd8c23134f3cac46db123ba97bd9d3f3b8a4a85e1"
|
|||
|
||||
[[package]]
|
||||
name = "either"
|
||||
version = "1.6.0"
|
||||
version = "1.6.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cd56b59865bce947ac5958779cfa508f6c3b9497cc762b7e24a12d11ccde2c4f"
|
||||
checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457"
|
||||
|
||||
[[package]]
|
||||
name = "ena"
|
||||
|
@ -775,9 +775,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "lsp-types"
|
||||
version = "0.80.0"
|
||||
version = "0.81.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f4265e2715bdacbb4dad029fce525e420cd66dc0af24ff9cb996a8ab48ac92ef"
|
||||
checksum = "5e02724627e9ef8ba91f461ebc01d48aebbd13a4b7c9dc547a0a2890f53e2171"
|
||||
dependencies = [
|
||||
"base64",
|
||||
"bitflags",
|
||||
|
@ -1187,9 +1187,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "rayon-core"
|
||||
version = "1.8.0"
|
||||
version = "1.8.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "91739a34c4355b5434ce54c9086c5895604a9c278586d1f1aa95e04f66b525a0"
|
||||
checksum = "e8c4fec834fb6e6d2dd5eece3c7b432a52f0ba887cf40e595190c4107edc08bf"
|
||||
dependencies = [
|
||||
"crossbeam-channel",
|
||||
"crossbeam-deque",
|
||||
|
@ -1493,9 +1493,9 @@ version = "0.0.0"
|
|||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "1.0.40"
|
||||
version = "1.0.41"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "963f7d3cc59b59b9325165add223142bbf1df27655d07789f109896d353d8350"
|
||||
checksum = "6690e3e9f692504b941dc6c3b188fd28df054f7fb8469ab40680df52fdcc842b"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
|
|
@ -21,7 +21,7 @@ env_logger = { version = "0.7.1", default-features = false }
|
|||
itertools = "0.9.0"
|
||||
jod-thread = "0.1.0"
|
||||
log = "0.4.8"
|
||||
lsp-types = { version = "0.80.0", features = ["proposed"] }
|
||||
lsp-types = { version = "0.81.0", features = ["proposed"] }
|
||||
parking_lot = "0.11.0"
|
||||
pico-args = "0.3.1"
|
||||
oorandom = "11.1.2"
|
||||
|
|
|
@ -285,12 +285,18 @@ pub(crate) fn signature_help(
|
|||
})
|
||||
};
|
||||
|
||||
let signature =
|
||||
lsp_types::SignatureInformation { label, documentation, parameters: Some(parameters) };
|
||||
let active_parameter = call_info.active_parameter.map(|it| it as i64);
|
||||
|
||||
let signature = lsp_types::SignatureInformation {
|
||||
label,
|
||||
documentation,
|
||||
parameters: Some(parameters),
|
||||
active_parameter,
|
||||
};
|
||||
lsp_types::SignatureHelp {
|
||||
signatures: vec![signature],
|
||||
active_signature: None,
|
||||
active_parameter: call_info.active_parameter.map(|it| it as i64),
|
||||
active_parameter,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue