fix(fzf): make sure vim.ui.select
works when fzf is not loaded yet
This commit is contained in:
@ -192,6 +192,14 @@ return {
|
|||||||
require("fzf-lua").setup(opts)
|
require("fzf-lua").setup(opts)
|
||||||
require("fzf-lua").register_ui_select(opts.ui_select or nil)
|
require("fzf-lua").register_ui_select(opts.ui_select or nil)
|
||||||
end,
|
end,
|
||||||
|
init = function()
|
||||||
|
LazyVim.on_very_lazy(function()
|
||||||
|
vim.ui.select = function(...)
|
||||||
|
require("fzf-lua")
|
||||||
|
return vim.ui.select(...)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end,
|
||||||
keys = {
|
keys = {
|
||||||
{ "<c-j>", "<c-j>", ft = "fzf", mode = "t", nowait = true },
|
{ "<c-j>", "<c-j>", ft = "fzf", mode = "t", nowait = true },
|
||||||
{ "<c-k>", "<c-k>", ft = "fzf", mode = "t", nowait = true },
|
{ "<c-k>", "<c-k>", ft = "fzf", mode = "t", nowait = true },
|
||||||
|
Reference in New Issue
Block a user