-
-
Notifications
You must be signed in to change notification settings - Fork 2.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
feat: code actions - document edits #478
Conversation
Co-authored-by: Ivan Tham <pickfire@riseup.net>
There are still some features that are not implemented yet, just because I couldn't find any code that uses them, so I can't really test if it works. That's how it currently looks like code-actions-helix.mp4 |
The clippy errors need to be addressed, |
Looks great otherwise, though I'm not really familiar with this section of the codebase. Good job! |
Switch out todo! for editor.set_error so we don't panic anymore and I think this is good to merge! |
Done, I've forgot to commit & push the changes I made few hours ago. |
Great work! |
}) | ||
.collect(); | ||
let transaction = edits_to_transaction(doc.text(), &edits); | ||
doc.apply(&transaction, view.id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Undo doesn't work after applying a change:
doc.apply(&transaction, view.id); | |
doc.apply(&transaction, view.id); | |
doc.append_changes_to_history(view.id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It did work after pressing ESC, but with this change works even without it. I can't commit changes since the PR have been already merged. Maybe you could create a new PR with this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, ESC is bound to normal_mode
command (even inside normal mode) and it has an append_changes_to_history
call. I see you created a new PR 👍🏾
No description provided.