diff --git a/lua/lazyvim/plugins/extras/editor/fzf.lua b/lua/lazyvim/plugins/extras/editor/fzf.lua index ffc8649e..c70a6f14 100644 --- a/lua/lazyvim/plugins/extras/editor/fzf.lua +++ b/lua/lazyvim/plugins/extras/editor/fzf.lua @@ -178,12 +178,9 @@ return { } end, config = function(_, opts) - local defaults - if opts[1] == "default-title" then -- use the same prompt for all pickers for profile `default-title` and -- profiles that use `default-title` as base profile - defaults = require("fzf-lua.profiles.default-title") local function fix(t) t.prompt = t.prompt ~= nil and " " or nil for _, v in pairs(t) do @@ -191,12 +188,11 @@ return { fix(v) end end + return t end - fix(defaults) + opts = vim.tbl_deep_extend("force", fix(require("fzf-lua.profiles.default-title")), opts) + opts[1] = nil end - - opts = vim.tbl_deep_extend("force", defaults or {}, opts) - require("fzf-lua").setup(opts) end, init = function()