Skip to content
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

Support selecting edits #32

Open
jan-xyz opened this issue Feb 29, 2024 · 3 comments
Open

Support selecting edits #32

jan-xyz opened this issue Feb 29, 2024 · 3 comments

Comments

@jan-xyz
Copy link
Contributor

jan-xyz commented Feb 29, 2024

Is it possible to deselect and select the diffs? Like this list from VS Code to select and deselect which hunks should be applied.

image
@jan-xyz
Copy link
Contributor Author

jan-xyz commented Mar 5, 2024

I started hacking a bit on this, as I think it would be really nice to have. My idea is to basically have a regular vim.ui.select to pick the action to execute and on selection a Telescope window opens with the available edits in the picker which are all pre-selected and can be de-selected or with a shortcut also deselect all, on enter the code action gets executed but only with the selected edits.

@jan-xyz jan-xyz changed the title Support selecting diffs Support selecting edits Mar 5, 2024
@aznhe21
Copy link
Owner

aznhe21 commented Mar 9, 2024

Hmm, such an operation is not standard in vim and I don’t want it, so I won’t implement it. I understand the demand, so it might be a good idea to implement it as a separate plugin (which I won’t do) and connect it with this plugin.

Since you are implementing this feature, I will keep this issue open, but I won’t take any action.

@jan-xyz
Copy link
Contributor Author

jan-xyz commented Mar 27, 2024

I have a first version here. It is very heavily inspired by your work, and I would be totally up for donating this back to this repo and archiving mine. It is an almost complete rewrite. I am still trying to figure out a good way to select individual diffs, it is currently only able to select by file/uri. It also is implemented in a way that any change done via util.apply_workspace_edit can do this, so it also automatically implements renaming (#31 )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants