Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'docs/book/src/contributing/lsp-extensions.md')
-rw-r--r--docs/book/src/contributing/lsp-extensions.md26
1 files changed, 13 insertions, 13 deletions
diff --git a/docs/book/src/contributing/lsp-extensions.md b/docs/book/src/contributing/lsp-extensions.md
index 6902bce83e..a3189402a9 100644
--- a/docs/book/src/contributing/lsp-extensions.md
+++ b/docs/book/src/contributing/lsp-extensions.md
@@ -1,5 +1,5 @@
<!---
-lsp/ext.rs hash: ca646d2ad3d38ccd
+lsp/ext.rs hash: cec81c987f189e83
If you need to change the above hash to make the test pass, please check if you
need to adjust this doc as well and ping this issue:
@@ -31,10 +31,9 @@ At the same time some essential configuration parameters are needed early on, be
For this reason, we ask that `initializationOptions` contains the configuration, as if the server did make a `"workspace/configuration"` request.
If a language client does not know about `rust-analyzer`'s configuration options it can get sensible defaults by doing any of the following:
-
-* Not sending `initializationOptions`
-* Sending `"initializationOptions": null`
-* Sending `"initializationOptions": {}`
+ * Not sending `initializationOptions`
+ * Sending `"initializationOptions": null`
+ * Sending `"initializationOptions": {}`
## Snippet `TextEdit`
@@ -132,6 +131,7 @@ This request is sent from client to server to handle "Goto Parent Module" editor
**Response:** `Location | Location[] | LocationLink[] | null`
+
### Example
```rust
@@ -671,6 +671,7 @@ interface RunFlycheckParams {
Triggers the flycheck processes.
+
**Method:** `rust-analyzer/clearFlycheck`
**Notification:**
@@ -848,7 +849,6 @@ interface CommandLinkGroup {
```
Such actions on the client side are appended to a hover bottom as command links:
-
```
+-----------------------------+
| Hover content |
@@ -875,6 +875,7 @@ This request is sent from client to server to open the current project's Cargo.t
**Response:** `Location | null`
+
### Example
```rust
@@ -918,7 +919,6 @@ interface HoverParams extends WorkDoneProgressParams {
position: Range | Position;
}
```
-
Whenever the client sends a `Range`, it is understood as the current selection and any hover included in the range will show the type of the expression if possible.
### Example
@@ -965,6 +965,7 @@ export const enum Direction {
Extends the existing `workspace/symbol` request with ability to filter symbols by broad scope and kind of symbol.
If this capability is set, `workspace/symbol` parameter gains two new optional fields:
+
```typescript
interface WorkspaceSymbolParams {
/**
@@ -1001,6 +1002,7 @@ However, the server doesn't know which commands are available on the client.
This extensions allows the client to communicate this info.
+
```typescript
export interface ClientCommandOptions {
/**
@@ -1048,7 +1050,6 @@ export interface FetchDependencyListParams {}
```
**Response:**
-
```typescript
export interface FetchDependencyListResult {
crates: {
@@ -1058,7 +1059,6 @@ export interface FetchDependencyListResult {
}[];
}
```
-
Returns all crates from this workspace, so it can be used create a viewTree to help navigate the dependency tree.
## View Recursive Memory Layout
@@ -1100,8 +1100,8 @@ If `RecursiveMemoryLayout::nodes::length == 0` we could not find a suitable type
Generic Types do not give anything because they are incomplete. Fully specified generic types do not give anything if they are selected directly but do work when a child of other types [this is consistent with other behavior](https://github.com/rust-lang/rust-analyzer/issues/15010).
-### Unresolved questions
+### Unresolved questions:
-* How should enums/unions be represented? currently they do not produce any children because they have multiple distinct sets of children.
-* Should niches be represented? currently they are not reported.
-* A visual representation of the memory layout is not specified, see the provided implementation for an example, however it may not translate well to terminal based editors or other such things.
+- How should enums/unions be represented? currently they do not produce any children because they have multiple distinct sets of children.
+- Should niches be represented? currently they are not reported.
+- A visual representation of the memory layout is not specified, see the provided implementation for an example, however it may not translate well to terminal based editors or other such things.