stevearc / dressing.nvim

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

Question: Can the `vim.ui.input` span across buffers? #31

Closed mehalter closed 2 years ago

mehalter commented 2 years ago

I'm wondering if it is possible to have the vim.ui.input popup span across buffers. I am running into an issue where the pop up is getting cut off in a small sidebar like split when there is plenty of room: 2022-03-29_13:14:24_screenshot

With larger width: 2022-03-29_13:15:06_screenshot

Other things like nui have this, but I'm not sure if that's because they are separate from the vim.ui.input. nui example:

2022-03-29_13:15:59_screenshot

mehalter commented 2 years ago

It would be nice if the dressing.nvim popup could notice that it has room to expand and overflow into another buffer to fit text

stevearc commented 2 years ago

There are a few ways that you can adjust this behavior. I'd recommend adjusting the min_width. The default value of min_width = { 20, 0.2 } means it will be the larger of 20 columns or 20% of the parent window. If you want it to be larger, set it to something like { 40, 0.2 }.

You could also try setting relative = 'editor'. That will cause the float to pop up in the center of the editor and all percentage-based calculations will be relative to the total editor width/height rather than the current window.