Skip to content

Modern up the dx section 2.1 (RA supports #[server]?) #177

@fsktom

Description

@fsktom

Hi, I had been reading the book while learning leptos (using the 0.8 alpha branch if that matters). Overall, great experience, thanks! I noticed a few inconsistencies - things working differently nowadays, some broken links etc.

https://github.com/leptos-rs/book/blob/5b2c1abc65452e71539f612428d34d72cfa358b5/src/getting_started/leptos_dx.md#2-editor-autocompletion-inside-component-and-server

I don't know what, when (or even if?) something changed, but I removed server from the proc macro ignore list and the editor auto-complete works fine for me? (Visual Studio Code 1.98, rust-analyzer 0.3.2337, leptos-related crates @ leptos-rs/leptos@d0bf843)

Seems like the macro is expanded properly and gives great IDE support for ServerActions created with it

Image

Maybe we should add another note saying that #[server] macros should work with rust-analyzer and make the proc macro ignore list completely optional in the book?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions