diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-03-22 13:08:45 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2021-03-22 13:08:45 +0000 |
commit | d4fa6721afacec78a750df1bb1f0e7e950eaf73c (patch) | |
tree | efabf84f708868484e0dac7893f77ddfba6d9c21 /docs/dev | |
parent | 3af1885bd2c4d3470d203a216488946ee8572970 (diff) | |
parent | d331155f8db056a0f7a406498c96f759f620d2c7 (diff) |
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 <[email protected]>
Diffstat (limited to 'docs/dev')
-rw-r--r-- | docs/dev/lsp-extensions.md | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/docs/dev/lsp-extensions.md b/docs/dev/lsp-extensions.md index 694fafcd5..8a6f9f06e 100644 --- a/docs/dev/lsp-extensions.md +++ b/docs/dev/lsp-extensions.md | |||
@@ -1,5 +1,5 @@ | |||
1 | <!--- | 1 | <!--- |
2 | lsp_ext.rs hash: 4dfa8d7035f4aee7 | 2 | lsp_ext.rs hash: e8a7502bd2b2c2f5 |
3 | 3 | ||
4 | If you need to change the above hash to make the test pass, please check if you | 4 | If you need to change the above hash to make the test pass, please check if you |
5 | need to adjust this doc as well and ping this issue: | 5 | need to adjust this doc as well and ping this issue: |
@@ -595,3 +595,29 @@ interface TestInfo { | |||
595 | runnable: Runnable; | 595 | runnable: Runnable; |
596 | } | 596 | } |
597 | ``` | 597 | ``` |
598 | |||
599 | ## Hover Actions | ||
600 | |||
601 | **Issue:** https://github.com/rust-analyzer/rust-analyzer/issues/6823 | ||
602 | |||
603 | This request is sent from client to server to move item under cursor or selection in some direction. | ||
604 | |||
605 | **Method:** `experimental/moveItemUp` | ||
606 | **Method:** `experimental/moveItemDown` | ||
607 | |||
608 | **Request:** `MoveItemParams` | ||
609 | |||
610 | **Response:** `TextDocumentEdit | null` | ||
611 | |||
612 | ```typescript | ||
613 | export interface MoveItemParams { | ||
614 | textDocument: lc.TextDocumentIdentifier, | ||
615 | range: lc.Range, | ||
616 | direction: Direction | ||
617 | } | ||
618 | |||
619 | export const enum Direction { | ||
620 | Up = "Up", | ||
621 | Down = "Down" | ||
622 | } | ||
623 | ``` | ||