-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Offer "Extract variable" assist for statements #15796
Comments
Try selecting it, like in my screenshot. |
I got it. It require manually select the code range, can't trigger when the cursor in the line end. May be we can refactor this? And, can it bind with a keyboard shorcut? It's much convenient. |
It might be a good idea to offer it when the statement is a single function/method call (and the return type is not I don't think you can bind a specific assist to a shortcut, but |
yeah, I'd try |
A curiosity @lnicola, please: |
|
There is a useful feature in Jetbrain IDEA, which is automatically bind a variable for an expression by a keyboard shotcut (ctrl + alt + v), showing below:
I think it would be wonderful if rust analyzer have a an feature (maybe impl via a assist💡), I'd like to make a PR if it's ok with rust analyzer team.
The text was updated successfully, but these errors were encountered: