mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-11-25 21:37:39 +00:00
Merge #8054
8054: Item movers r=matklad a=ivan770 Closes #6823 https://user-images.githubusercontent.com/14003886/111331579-b4f43480-8679-11eb-9af0-e4dabacc4923.mp4 Implementation issues: - [ ] Most of items are non-movable, since _movability_ of any item has to be determined manually. Common ones are movable though - [x] Cursor should move with the item Co-authored-by: ivan770 <leshenko.ivan770@gmail.com>
This commit is contained in:
commit
d4fa6721af
11 changed files with 781 additions and 1 deletions
|
|
@ -1,5 +1,5 @@
|
|||
<!---
|
||||
lsp_ext.rs hash: 4dfa8d7035f4aee7
|
||||
lsp_ext.rs hash: e8a7502bd2b2c2f5
|
||||
|
||||
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:
|
||||
|
|
@ -595,3 +595,29 @@ interface TestInfo {
|
|||
runnable: Runnable;
|
||||
}
|
||||
```
|
||||
|
||||
## Hover Actions
|
||||
|
||||
**Issue:** https://github.com/rust-analyzer/rust-analyzer/issues/6823
|
||||
|
||||
This request is sent from client to server to move item under cursor or selection in some direction.
|
||||
|
||||
**Method:** `experimental/moveItemUp`
|
||||
**Method:** `experimental/moveItemDown`
|
||||
|
||||
**Request:** `MoveItemParams`
|
||||
|
||||
**Response:** `TextDocumentEdit | null`
|
||||
|
||||
```typescript
|
||||
export interface MoveItemParams {
|
||||
textDocument: lc.TextDocumentIdentifier,
|
||||
range: lc.Range,
|
||||
direction: Direction
|
||||
}
|
||||
|
||||
export const enum Direction {
|
||||
Up = "Up",
|
||||
Down = "Down"
|
||||
}
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue