-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Signature help shows wrong active parameter for methods with type params and empty param list. #19969
Comments
Rust-analyzer behavior for comparison, it shows an index higher than the maximum parameter index:
Where fn foo<T>(_x: i32) {
}
fn main() {
foo::<i32>(32, **CURSOR_HERE**);
println!("Hello, world!");
} And [workspace]
[package]
name = "hello" # the name of the package
version = "0.1.0" # the current version, obeying semver
authors = ["Alice <[email protected]>", "Bob <[email protected]>"]
[[bin]]
name = "hello" Screenshots: |
Fixes #19969 with @mbovel @rochala --------- Co-authored-by: Lucas Nouguier <[email protected]>
For context and for the record, we observed during the spree that the language server protocol currently does not provide a way to indicate that no parameter is active. Instead, the specification says that any parameter outside of the range will default to 0:
However, we observed that VSCode does not follow this and will actually not highlight any parameter if Tracking LSP issue: microsoft/language-server-protocol#1271. In the future, |
I've started tracking the upstream issue in language-server-protocol. If there is any update in the future, I'll make required changes / create a new ticket. |
Fixes #19969 with @mbovel @rochala --------- Co-authored-by: Lucas Nouguier <[email protected]> [Cherry-picked adf089b]
Compiler version
3.4.1
Minimized code
Output
Last parameter is selected as current argument.
Expectation
No element should be selected as active parameter.
The text was updated successfully, but these errors were encountered: