-
Notifications
You must be signed in to change notification settings - Fork 9
Closed
Description
Here are few things I would like to support in quickpick.vim.
-
on_change
handler so pickers can implement custom on the fly search useful for npm search and install package. - add
quickpick#exists()
to check if the quickpick with id is available so that we only modify the items if it exists. useful for async pickers. - add support for
user_data
for items instead of just string to allow pickers to add metadata. Example: User might want to show the description as picker item, but they want to refer by id when clicking accept. - allow the user to bind custom action. Ctrl-v for vertical split, Ctrl-T for new tab and so on.
- implement default action type, such as file so the
on_accept
handler is implement automatically and the pickers don't need to implement it all the time. Unlike filtering/search this doesn't have much impact on perf so it is ok to be in the core. It is opt in so pickers can decided if they want to re-implement. - add
on_selection_change
handler so pickers can implement custom preview. For example it may decide to show the file on preview buffer, change the colorscheme of vim as the selection changes. - add support for
on_cancel
so users can reset changes. Useful for colorscheme picker when we want users to go back to the original colorscheme after changing. - add support for multiple support. Ex: Useful when you want to delete multiple git branches.
- add flag to disable multiple selection
- add
set_busy
so that async pickers can show spinner to make it feel more responsive. - add
set_title
so the picker title can be customized on the fly - add
set_prompt
so the prompt can be customized on the fly - add
set_selected_items
so the items can be marked on the fly. - add
ignore_focus_out
so the picker doesn't close automatically when it focus out. - implement
<Plug>
mappings so user can custom bind keys. For now the keys are similar to CtrlP. - implement syntax highlighting for matches
- add events such
on_before_open
,on_after_open
. Provides hook to set title/busy indicator if it was hidden and reopened. - add
on_resize
event so the pickers can only send partial data that is required to render the items instead of sending thousands of items. this could be difficult to solve as we also need to track where we are. This is similar to virtualization of lists that we see very common on the web. - https://github.com/bvaughn/react-virtualized - add
append_items
api which allows the pickers to stream data to the picker so the picker doesn't need to keep sending data that it already sent before. Makes it less chatty if someone implements picker using jobs. - add
get_status
to check the status of the picker best of the id. Useful for async when you don't want to callset_items
if the picker is already closed.
Pickers to demonstrate proof of concept:
- npm install/yarn add
- file picker in python with threading so it doesn't block the UI with custom filtering and ranking algorithm optimized for path search with fallback to vimscript if the user doesn't have python installed.
- sample neovim remote plugin so all the heavy lifting is done in the remote plugin in different process.
If anyone has more suggestions feel to add comments here.
ambadyanands
Metadata
Metadata
Assignees
Labels
No labels