I’m writing my first IO- and UI-heavy plugin and bit confused on how to communicate between sync and async functions.
For example, I have following code:
local url = askUser() // this one is async, using vim.ui.input; variable just as an example
local req = cur.get(url) // also typically async
return pickers.new(opts, req) // this is always sync and final result must be of known type
In other languages I’d use something like Promise or IO monad and block and the last stage, but it seems there’s nothing like that in Neovim Lua community?