diff --git a/docs/book/src/getting_started/leptos_dx.md b/docs/book/src/getting_started/leptos_dx.md index 34204993b6..53a6fedd5c 100644 --- a/docs/book/src/getting_started/leptos_dx.md +++ b/docs/book/src/getting_started/leptos_dx.md @@ -7,8 +7,10 @@ There are a couple of things you can do to improve your experience of developing Because of the nature of macros (they can expand from anything to anything, but only if the input is exactly correct at that instant) it can be hard for rust-analyzer to do proper autocompletion and other support. -But you can tell rust-analyzer to ignore certain proc macros. For `#[component]` and `#[server]` especially, which annotate function bodies but don't actually transform anything inside the body of your function, this can be really helpful. +If you run into issues using these macros in your editor, you can explicitly tell rust-analyzer to ignore certain proc macros. For the `#[server]` macro especially, which annotates function bodies but doesn't actually transform anything inside the body of your function, this can be really helpful. + +Starting in Leptos version 0.5.3, rust-analyzer support was added for the `#[component]` macro, but if you run into issues, you may want to add `#[component]` to the macro ignore list as well (see below). Note that this means that rust-analyzer doesn't know about your component props, which may generate its own set of errors or warnings in the IDE. VSCode `settings.json`: @@ -16,7 +18,8 @@ VSCode `settings.json`: ```json "rust-analyzer.procMacro.ignored": { "leptos_macro": [ - "component", + // optional: + // "component", "server" ], } @@ -33,7 +36,8 @@ require('lspconfig').rust_analyzer.setup { procMacro = { ignored = { leptos_macro = { - "component", + -- optional: -- + -- "component", "server", }, }, @@ -50,7 +54,15 @@ Helix, in `.helix/languages.toml`: name = "rust" [language-server.rust-analyzer] -config = { procMacro = { ignored = { leptos_macro = ["component", "server"] } } } +config = { procMacro = { ignored = + { leptos_macro = + [ + # Optional: + # "component", + "server" + ] + } +} } ``` ```admonish info diff --git a/docs/book/src/ssr/README.md b/docs/book/src/ssr/README.md index 516eca1b88..7fae30a5f7 100644 --- a/docs/book/src/ssr/README.md +++ b/docs/book/src/ssr/README.md @@ -1,12 +1,10 @@ # Part 2: Server Side Rendering -The second part of the book is all about how to turn your beautiful UI's into full-stack, "Universal" Rust + Leptos powered websites and applications. +The second part of the book is all about how to turn your beautiful UIs into full-stack Rust + Leptos powered websites and applications. -As you read in the last chapter, there are some limitations to using Client-Side Rendered Leptos apps - over the next few chapters, you'll see how we can overcome those limitations +As you read in the last chapter, there are some limitations to using client-side rendered Leptos apps - over the next few chapters, you'll see how we can overcome those limitations and get the best performance and SEO out of your Leptos apps. -Let's see how we can use the full power of Leptos and Rust on the server to make your next cutting-edge application! - ```admonish info