-
-
Notifications
You must be signed in to change notification settings - Fork 154
InputList allow multi selection #771
Description
Hi,
I think it would be great to be able to select multiple items in a list in some cases.
For example, when we want to override a method we can only choose one.
On the contrary when we want to add a use statement we want to only select one item.
My idea here is to add a parameter to the ListInput' class which will tell if the list accepts multiple items to be selected. So in the OverrideMethodHandler`, for example, we could set it to true.
Then in the Vim plugin we can pass another argument to the list functions to let them know about it.
It will have no impact on the vim inputlist but with fzf we can allow multiple selection.
The way fzf works, it will call the sink function for each selected item.
So one RPC call for each item.
Which allow to reuse existing handlers since we wouldn't have to modify them to accept multiple results.
I already have a proposal for the implementation:
https://github.com/elythyr/phpactor/tree/list-multi-selection
https://github.com/elythyr/rpc-extension/tree/list-multi-selection