mirror of
https://github.com/leptos-rs/book.git
synced 2025-12-27 10:01:41 -05:00
Fix Neovim documentation (#231)
This commit is contained in:
committed by
GitHub
parent
6fa158dbbe
commit
7b4c0056db
@@ -56,26 +56,26 @@ VSCode with cargo-leptos `settings.json`:
|
|||||||
"rust-analyzer.cargo.features": ["ssr"]
|
"rust-analyzer.cargo.features": ["ssr"]
|
||||||
```
|
```
|
||||||
|
|
||||||
neovim with lspconfig:
|
Neovim:
|
||||||
|
|
||||||
```lua
|
```lua
|
||||||
require('lspconfig').rust_analyzer.setup {
|
vim.lsp.config('rust_analyzer', {
|
||||||
-- Other Configs ...
|
-- Other Configs ...
|
||||||
settings = {
|
settings = {
|
||||||
["rust-analyzer"] = {
|
["rust-analyzer"] = {
|
||||||
-- Other Settings ...
|
-- Other Settings ...
|
||||||
procMacro = {
|
procMacro = {
|
||||||
ignored = {
|
ignored = {
|
||||||
leptos_macro = {
|
leptos_macro = {
|
||||||
-- optional: --
|
-- optional: --
|
||||||
-- "component",
|
-- "component",
|
||||||
"server",
|
"server",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
Helix, in `.helix/languages.toml`:
|
Helix, in `.helix/languages.toml`:
|
||||||
@@ -137,18 +137,17 @@ VSCode, in `settings.json`:
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
neovim with lspconfig, in `init.lua` or `lspconfig.lua`:
|
Neovim, in `init.lua`:
|
||||||
```lua
|
```lua
|
||||||
require('lspconfig').rust_analyzer.setup {
|
vim.lsp.config('rust_analyzer', {
|
||||||
-- Enable all features for rust-analyzer.
|
|
||||||
settings = {
|
settings = {
|
||||||
["rust-analyzer"] = {
|
["rust-analyzer"] = {
|
||||||
cargo = {
|
cargo = {
|
||||||
allFeatures = true, -- Enable all features
|
features = "all", -- Enable all features
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
|
|
||||||
```
|
```
|
||||||
helix, in `.helix/languages.toml` or per project in `.helix/config.toml`:
|
helix, in `.helix/languages.toml` or per project in `.helix/config.toml`:
|
||||||
|
|||||||
Reference in New Issue
Block a user