fix(fzf): make sure vim.ui.select works when fzf is not loaded yet

This commit is contained in:
Folke Lemaitre
2024-07-04 15:21:02 +02:00
parent d5f3d395f4
commit 9acadc7ec2

View File

@ -192,6 +192,14 @@ return {
require("fzf-lua").setup(opts)
require("fzf-lua").register_ui_select(opts.ui_select or nil)
end,
init = function()
LazyVim.on_very_lazy(function()
vim.ui.select = function(...)
require("fzf-lua")
return vim.ui.select(...)
end
end)
end,
keys = {
{ "<c-j>", "<c-j>", ft = "fzf", mode = "t", nowait = true },
{ "<c-k>", "<c-k>", ft = "fzf", mode = "t", nowait = true },