feat: allow custom input provider, removing dressing.nvim (#2173)

Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Co-authored-by: yetone <yetoneful@gmail.com>
This commit is contained in:
Avinash Thakur
2025-06-06 20:34:35 +05:30
committed by GitHub
parent a537945573
commit ec0f4f9ae0
15 changed files with 329 additions and 54 deletions

View File

@@ -0,0 +1,23 @@
local M = {}
---@param input avante.ui.Input
function M.show(input)
local opts = {
prompt = input.title,
default = input.default,
completion = input.completion,
}
-- Note: Native vim.ui.input doesn't support concealing
-- For password input, users should use dressing or snacks providers
if input.conceal then
vim.notify_once(
"Native input provider doesn't support concealed input. Consider using 'dressing' or 'snacks' provider for password input.",
vim.log.levels.WARN
)
end
vim.ui.input(opts, input.on_submit)
end
return M