feat(file_selector): command for switching the file picker provider. (#958)

This commit is contained in:
Christopher Brewin
2024-12-17 21:29:28 +10:00
committed by GitHub
parent 9e0b5bf8f1
commit e612ad7566
3 changed files with 18 additions and 1 deletions

View File

@@ -116,6 +116,14 @@ cmd("SwitchProvider", function(opts) require("avante.api").switch_provider(vim.t
return vim.tbl_filter(function(key) return key:find(prefix, 1, true) == 1 end, Config.providers)
end,
})
cmd(
"SwitchFileSelectorProvider",
function(opts) require("avante.api").switch_file_selector_provider(vim.trim(opts.args or "")) end,
{
nargs = 1,
desc = "avante: switch file selector provider",
}
)
cmd("Clear", function(opts)
local arg = vim.trim(opts.args or "")
arg = arg == "" and "history" or arg