You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for working on this plugin, it's been great to see it become a central library for a lot of other plugins. I wanted to float the idea of a Nui menu feature to you. The idea is to add an API to allow users using a Nui menu (if opted in via the plugin etc.) to quickly select a menu item based on a letter or number (e.g. it's position). I worked briefly with @.windwp on a similar menu for codeactions in https://github.com/nvim-pack/lsp-fastaction.nvim (archived now) but I think the general feature was useful.
This would look something like
| 1. Item 1 |
| 2. Item 2 |
| 3. Item 3 |
and you could select 2 by pressing that number. Alternatively it could be letter based e.g.
| (W)ater |
| (A)pple |
| (F)ish |
And you'd select them using the letter.
I appreciate that probably a plugin author could get something like this working with some logic internal to their plugin (maybe), but I think the value of doing it at this level is that it could be done consistently and if the barrier to entry was low enough could be more easily used or could be something that the option could be passed down from the user themselves and done automatically for the user without the involvement of the plugin author using your library.
As to the exact API (that's of course largely up to you) but you could do the numbers simply by the items index in a the list and then just prefix the number as a visual indicator for the user and then have buffer local mapping for the numbers to select them straight away.
This could work similarly for the letter maybe choosing the first letter and mapping those locally in that buffer as well.
Anyway been mulling over a way to revive the pattern @.windwp came up with and this seems the nicest place for it where it could have the best reach.
The text was updated successfully, but these errors were encountered:
Hi 👋🏿,
Thanks for working on this plugin, it's been great to see it become a central library for a lot of other plugins. I wanted to float the idea of a Nui menu feature to you. The idea is to add an API to allow users using a Nui menu (if opted in via the plugin etc.) to quickly select a menu item based on a letter or number (e.g. it's position). I worked briefly with @.windwp on a similar menu for codeactions in https://github.com/nvim-pack/lsp-fastaction.nvim (archived now) but I think the general feature was useful.
This would look something like
and you could select 2 by pressing that number. Alternatively it could be letter based e.g.
And you'd select them using the letter.
I appreciate that probably a plugin author could get something like this working with some logic internal to their plugin (maybe), but I think the value of doing it at this level is that it could be done consistently and if the barrier to entry was low enough could be more easily used or could be something that the option could be passed down from the user themselves and done automatically for the user without the involvement of the plugin author using your library.
As to the exact API (that's of course largely up to you) but you could do the numbers simply by the items index in a the list and then just prefix the number as a visual indicator for the user and then have buffer local mapping for the numbers to select them straight away.
This could work similarly for the letter maybe choosing the first letter and mapping those locally in that buffer as well.
Anyway been mulling over a way to revive the pattern @.windwp came up with and this seems the nicest place for it where it could have the best reach.
The text was updated successfully, but these errors were encountered: