-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Item movers #8054
Item movers #8054
Conversation
changelog feature add "Move item up/down" commands (LSP extension) |
Demo with improved cursor movement and demoupd.mp4Adding similar movers should be trivial |
bors r+ This actually is very reasonable, sorry for not getting to review this earlier, this could have landed in today's release. |
What was the rationale for this being a custom message instead of code action? |
Is it possible to provide a direction in which we are moving an item via code action? |
Have one action for up and one for down? |
I don't think code action UI is right here: code actions should be available in narrow scope, while this is an always available thing. In IntelliJ, item movers are also a separate thing with dedicated shortcuts. Using code-actions API for this might be interesting (ie, the editor still doesn't show these in code action list, and binds them to dedicated shortcuts, but internally it issues code action requests), but I am not entirely sure if that would be a good move. Sticking to LSP's "one request for one UI concern" rule of thumb is more compatible with potential future extensions (multible cursors, left-right movers, etc). |
Closes #6823
moveitem.mp4
Implementation issues: