dioxus
dioxus copied to clipboard
Autocompletion problems inside closures when in rsx! macro
Problem
Whenever you want to add an event handler, you would often assign them inline like this:
fn app(cx: Scope) -> Element {
render! {
button {
onclick: move |_| {
// ... code here
},
}
}
}
rust-analyzer works fine to add autocompletion for a variable or function, but whenever you want to dig deeper into a struct or method, the autocompletion stops working.
Example of the autocompletion working for just a function:
Example of the autocompletion not working when trying to find methods:
This doesn't seem to be an issue with rust-analyzer itself, since Leptos doesn't have this issue:
Steps To Reproduce
Steps to reproduce the behavior:
- Download Rust-Analyzer for VSCode
- Setup a dioxus project using the latest git version
- Try the first code snippet and see if the autocompletion does work
Expected behavior
The autocompletion to work on methods and properties of structs
Environment:
- Dioxus version:
master
- Rust version:
1.77.0-nightly
- OS info:
macOS