Is your feature request related to a problem? Please describe.
Describe the solution you'd like
vim.ui.input was merged a few weeks ago and is user overridable to provide a nicer and customizable input interface.
it isn't trivial to switch as vim.ui.input uses a callback instead of blocking and returning the result.
However within a plenary async loop it becomes trivial again using require("plenary.async").wrap
This is enough to create a function that (within async context) acts similar to vim.fn.input
local async = require("plenary.async")
-- local input = vim.fn.input
local input = async.wrap(function(prompt, text, completion, callback)
vim.ui.input({
prompt = prompt,
default = text,
completion = completion,
}, callback)
end, 4)
Otherwise a little bit of refactoring probably lets use use vim.ui.input for any pickers that need it
Describe alternatives you've considered
Since the plan is to move the pickers out of telescope.nvim, I don't know if you want this PR now, but I'm happy to do the work. It should be confined to just that one file
Is your feature request related to a problem? Please describe.
Describe the solution you'd like
vim.ui.input
was merged a few weeks ago and is user overridable to provide a nicer and customizable input interface. it isn't trivial to switch asvim.ui.input
uses a callback instead of blocking and returning the result. However within a plenary async loop it becomes trivial again usingrequire("plenary.async").wrap
This is enough to create a function that (within async context) acts similar to
vim.fn.input
Otherwise a little bit of refactoring probably lets use use
vim.ui.input
for any pickers that need itDescribe alternatives you've considered Since the plan is to move the pickers out of telescope.nvim, I don't know if you want this PR now, but I'm happy to do the work. It should be confined to just that one file
Additional context
https://github.com/neovim/neovim/pull/15959