From 252197f65942c43f5cdce733253fc51c56d6cb3a Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 9 Jun 2024 23:27:22 +0200 Subject: [PATCH] Update lua/lazyvim/plugins/extras/editor/fzf.lua Co-authored-by: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com> --- lua/lazyvim/plugins/extras/editor/fzf.lua | 43 +++++++++++------------ 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/lua/lazyvim/plugins/extras/editor/fzf.lua b/lua/lazyvim/plugins/extras/editor/fzf.lua index d2af3749..265b4f57 100644 --- a/lua/lazyvim/plugins/extras/editor/fzf.lua +++ b/lua/lazyvim/plugins/extras/editor/fzf.lua @@ -27,33 +27,32 @@ return { { "ibhagwan/fzf-lua", event = "VeryLazy", - opts = { - [1] = "default-title", - fzf_colors = { - ["fg"] = { "fg", "FzfLuaNormal" }, - ["bg"] = { "bg", "FzfLuaNormal" }, - ["hl"] = { "fg", "Special" }, - ["fg+"] = { "fg", "Visual" }, - ["bg+"] = { "bg", "Visual" }, - ["hl+"] = { "fg", "Special" }, - ["info"] = { "fg", "NonText" }, - ["border"] = { "fg", "FzfLuaBorder" }, - ["gutter"] = { "bg", "FzfLuaNormal" }, - ["query"] = { "fg", "FzfLuaNormal" }, - ["prompt"] = { "fg", "FzfLuaNormal" }, - ["pointer"] = { "fg", "FzfLuaMarker" }, - ["marker"] = { "fg", "FzfLuaMarker" }, - ["header"] = { "fg", "FzfLuaNormal" }, - }, - }, - config = function(_, opts) + opts = function() local config = require("fzf-lua.config") local actions = require("trouble.sources.fzf").actions config.defaults.actions.files["ctrl-t"] = actions.open_all config.defaults.actions.files["alt-t"] = actions.open config.defaults.keymap.fzf["ctrl-q"] = "select-all+accept" - -- vim.env.FZF_DEFAULT_OPTS = "" - require("fzf-lua").setup(opts) + + return { + [1] = "default-title", + fzf_colors = { + ["fg"] = { "fg", "FzfLuaNormal" }, + ["bg"] = { "bg", "FzfLuaNormal" }, + ["hl"] = { "fg", "Special" }, + ["fg+"] = { "fg", "Visual" }, + ["bg+"] = { "bg", "Visual" }, + ["hl+"] = { "fg", "Special" }, + ["info"] = { "fg", "NonText" }, + ["border"] = { "fg", "FzfLuaBorder" }, + ["gutter"] = { "bg", "FzfLuaNormal" }, + ["query"] = { "fg", "FzfLuaNormal" }, + ["prompt"] = { "fg", "FzfLuaNormal" }, + ["pointer"] = { "fg", "FzfLuaMarker" }, + ["marker"] = { "fg", "FzfLuaMarker" }, + ["header"] = { "fg", "FzfLuaNormal" }, + }, + } end, keys = { { "", "close", ft = "fzf", mode = "t", nowait = true },