Update docs for inlay hints (#8178)

Follow up of #7943. 
Updates the docs for inlay hints as they are incorrect (for Svelte).

Release Notes:

- N/A
This commit is contained in:
Robin Pfäffle
2024-02-22 11:40:49 +02:00
committed by GitHub
parent 6f36527bc6
commit 587788b9a0
2 changed files with 42 additions and 86 deletions
+36 -1
View File
@@ -3,7 +3,42 @@
- Tree Sitter: [tree-sitter-rust](https://github.com/tree-sitter/tree-sitter-rust)
- Language Server: [rust-analyzer](https://github.com/rust-lang/rust-analyzer)
### Target directory
## Inlay Hints
The following configuration can be used to enable inlay hints for rust:
```json
"inlayHints": {
"maxLength": null,
"lifetimeElisionHints": {
"useParameterNames": true,
"enable": "skip_trivial"
},
"closureReturnTypeHints": {
"enable": "always"
}
}
```
to make the language server send back inlay hints when Zed has them enabled in the settings.
Use
```json
"lsp": {
"$LANGUAGE_SERVER_NAME": {
"initialization_options": {
....
}
}
}
```
to override these settings.
See https://rust-analyzer.github.io/manual.html#inlay-hints for more information.
## Target directory
The `rust-analyzer` target directory can be set in `initialization_options`: