Remove "component" from the list of procMacro.ignored... for all code editors listed, since rust-analyzer support is now enabled inside #[component] macros in Leptos > v0.5.3.
Good LSP support for proc macros is hard, because proc macros depend on parsing a stream of input into a valid Rust syntax tree, but while typing you are constantly creating a stream of new, invalid trees. This release tweaks how the #[component] macro emits code in order to enable better rust-analyzer support within the body of components.
If you've disabled rust-analyzer inside #[component] for better DX, try toggling that off and see if this is a better experience than it was before!
Apologies for any regressions this causes. Please report any issues that arise.
There is still additional work to be done to support rust-analyzer in the view! macro. The hoped-for improvements here are solely inside the #[component]body.
Remove "component" from the list of
procMacro.ignored...
for all code editors listed, since rust-analyzer support is now enabled inside #[component] macros in Leptos > v0.5.3.For reference:
From Leptos v0.5.3 release notes: Release v0.5.3 · leptos-rs/leptos · GitHub """ Improved rust-analyzer support in
#[component]
macro bodyGood LSP support for proc macros is hard, because proc macros depend on parsing a stream of input into a valid Rust syntax tree, but while typing you are constantly creating a stream of new, invalid trees. This release tweaks how the
#[component]
macro emits code in order to enable better rust-analyzer support within the body of components.If you've disabled rust-analyzer inside
#[component]
for better DX, try toggling that off and see if this is a better experience than it was before!Apologies for any regressions this causes. Please report any issues that arise.
"""