Skip to content

Commit

Permalink
Added Zed and sublime rust-analyzer settings to leptos_dx page (#88)
Browse files Browse the repository at this point in the history
SublimeText isn't as fashionable anymore as it used to be but some still use it and Zed is the shiny new thing :)
  • Loading branch information
dominikwilkowski authored Apr 2, 2024
1 parent 1a92be0 commit 5ebb369
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions src/getting_started/leptos_dx.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,40 @@ config = { procMacro = { ignored = { leptos_macro = [
] } } }
```

Zed, in `settings.json`:

```json
{
-- Other Settings ...
"lsp": {
"rust-analyzer": {
"procMacro": {
"ignored": [
// optional:
// "component",
"server"
]
}
}
}
}
```

SublimeText 3, under `LSP-rust-analyzer.sublime-settings` in `Goto Anything...` menu:

```json
// Settings in here override those in "LSP-rust-analyzer/LSP-rust-analyzer.sublime-settings"
{
"rust-analyzer.procMacro.ignored": {
"leptos_macro": [
// optional:
// "component",
"server"
],
},
}
```

## 3) Set up `leptosfmt` With Rust Analyzer (optional)

`leptosfmt` is a formatter for the Leptos `view!` macro (inside of which you'll typically write your UI code). Because the `view!` macro enables an 'RSX' (like JSX) style of writing your UI's, cargo-fmt has a harder time auto-formatting your code that's inside the `view!` macro. `leptosfmt` is a crate that solves your formatting issues and keeps your RSX-style UI code looking nice and tidy!
Expand Down

0 comments on commit 5ebb369

Please sign in to comment.