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

@@ -129,6 +129,15 @@ cmd(
desc = "avante: switch selector provider",
}
)
cmd("SwitchInputProvider", function(opts) require("avante.api").switch_input_provider(vim.trim(opts.args or "")) end, {
nargs = 1,
desc = "avante: switch input provider",
complete = function(_, line, _)
local prefix = line:match("AvanteSwitchInputProvider%s*(.*)$") or ""
local providers = { "native", "dressing", "snacks" }
return vim.tbl_filter(function(key) return key:find(prefix, 1, true) == 1 end, providers)
end,
})
cmd("Clear", function(opts)
local arg = vim.trim(opts.args or "")
arg = arg == "" and "history" or arg