Currently, the load_launchjs functionality resolves "promptString" evaluations with vim.fn.input to ask for the user input, which is a blocking statement. Instead, vim.ui.input could be used instead to create a coroutine that can asynchronously ask for user input so that other processes can continue, as well as provide an easier extensibility point for UI configurations.
Possible Solutions
Implement the prompts with vim.ui.input and coroutines instead. Example (from my override for prompting inputs in nvim-jdtls):
local function get_inp()
return coroutine.create(function(dap_run_co)
vim.ui.input({ prompt = 'Args: ' }, function(argstr)
coroutine.resume(dap_run_co, argstr)
end)
end)
end
Problem Statement
Currently, the
load_launchjs
functionality resolves"promptString"
evaluations withvim.fn.input
to ask for the user input, which is a blocking statement. Instead,vim.ui.input
could be used instead to create a coroutine that can asynchronously ask for user input so that other processes can continue, as well as provide an easier extensibility point for UI configurations.Possible Solutions
Implement the prompts with
vim.ui.input
and coroutines instead. Example (from my override for prompting inputs in nvim-jdtls):Considered Alternatives
No response