Hi. This issue is related to my PR #14 (introducing {input} placeholder)
The root cause is the same, but my solution from the PR resolves it only partially.
Problem
In my situation, Neovim's state-dependent placeholders are not resolved correctly when using multiple sends with the picker.
Example:
{
"<leader>awc",
function()
w.send({
{ label = "A", value = "{selection}"},
{ label = "B", value = "{selection}"},
})
end,
mode = { "n", "x" },
desc = "Foobar"
}
It's due to vim.ui.select() also being asynchronous, so there is the same problem that pushed me to implement #14.
When the picker window shows up, the selection is lost, and therefore the {selection} placeholder can't be expanded after choosing an item.
I'm using snacks.nvim's picker, which defaults to being an alternative implementation for vim.ui.select(). I don't have any explicit options that enable it as replacement for default vim.ui.select(), so it might be confusing for users with installed Snacks tools.
I'll investigate this problem more in my spare time :)
Hi. This issue is related to my PR #14 (introducing
{input}placeholder)The root cause is the same, but my solution from the PR resolves it only partially.
Problem
In my situation, Neovim's state-dependent placeholders are not resolved correctly when using multiple sends with the picker.
Example:
{ "<leader>awc", function() w.send({ { label = "A", value = "{selection}"}, { label = "B", value = "{selection}"}, }) end, mode = { "n", "x" }, desc = "Foobar" }It's due to
vim.ui.select()also being asynchronous, so there is the same problem that pushed me to implement #14.When the picker window shows up, the selection is lost, and therefore the
{selection}placeholder can't be expanded after choosing an item.I'm using snacks.nvim's picker, which defaults to being an alternative implementation for
vim.ui.select(). I don't have any explicit options that enable it as replacement for defaultvim.ui.select(), so it might be confusing for users with installed Snacks tools.I'll investigate this problem more in my spare time :)