mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 11:59:49 +00:00
Merge #9730
9730: minor: drop impl-specific stuff from lsp docs r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
commit
956e205417
1 changed files with 9 additions and 9 deletions
|
@ -275,9 +275,9 @@ interface SsrParams {
|
||||||
parseOnly: bool,
|
parseOnly: bool,
|
||||||
/// The current text document. This and `position` will be used to determine in what scope
|
/// The current text document. This and `position` will be used to determine in what scope
|
||||||
/// paths in `query` should be resolved.
|
/// paths in `query` should be resolved.
|
||||||
textDocument: lc.TextDocumentIdentifier;
|
textDocument: TextDocumentIdentifier;
|
||||||
/// Position where SSR was invoked.
|
/// Position where SSR was invoked.
|
||||||
position: lc.Position;
|
position: Position;
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -664,15 +664,15 @@ interface TestInfo {
|
||||||
|
|
||||||
**Experimental Server Capability:** { "hoverRange": boolean }
|
**Experimental Server Capability:** { "hoverRange": boolean }
|
||||||
|
|
||||||
This request build upon the current `textDocument/hover` to show the type of the expression currently selected.
|
This extension allows passing a `Range` as a `position` field of `HoverParams`.
|
||||||
|
The primary use-case is to use the hover request to show the type of the expression currently selected.
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
interface HoverParams extends lc.WorkDoneProgressParams {
|
interface HoverParams extends WorkDoneProgressParams {
|
||||||
textDocument: lc.TextDocumentIdentifier;
|
textDocument: TextDocumentIdentifier;
|
||||||
position: lc.Range | lc.Position;
|
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.
|
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
|
### Example
|
||||||
|
@ -699,8 +699,8 @@ This request is sent from client to server to move item under cursor or selectio
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
export interface MoveItemParams {
|
export interface MoveItemParams {
|
||||||
textDocument: lc.TextDocumentIdentifier,
|
textDocument: TextDocumentIdentifier,
|
||||||
range: lc.Range,
|
range: Range,
|
||||||
direction: Direction
|
direction: Direction
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue