stevearc / dressing.nvim

Neovim plugin to improve the default vim.ui interfaces
MIT License
1.73k stars 32 forks source link

Open menu before loading buffer #34

Closed ChristianChiarulli closed 1 year ago

ChristianChiarulli commented 2 years ago

I am using a language server that I need to make a selection for before starting the server. Currently I can use the default way to select my option first and then the buffer loads. When using this plugin the buffer is not blocked from loading and I am unable to make the selection before the language server starts.

Is there anyway to expose an option to have the menu block loading a buffer until after the selection is made?

buffer is not loaded yet, there is time to make selection image

buffer already loaded, too late to make selection image

stevearc commented 2 years ago

Unfortunately, there's no way to block it in the same way that inputlist() would. When vim uses those built-in input commands, the whole editor more-or-less is paused while that resolves. Even if there were an API to do a similar pause, that would also block the rendering of the selection float.

That said, there are some other possibilities.