Repository: LazyVim/LazyVim
File: lua/lazyvim/plugins/extras/editor/fzf.lua (Lua)

Code before:
      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)
      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)
    end,
    keys = {
      { "<esc>", "<cmd>close<cr>", ft = "fzf", mode = "t", nowait = true },
      { "<c-j>", "<Down>", ft = "fzf", mode = "t", nowait = true },
      { "<c-k>", "<Up>", ft = "fzf", mode = "t", nowait = true },
      {
        "<leader>,",
        "<cmd>FzfLua buffers sort_mru=true sort_lastused=true<cr>",
        desc = "Switch Buffer",
      },
      { "<leader>/", LazyVim.pick("live_grep"), desc = "Grep (Root Dir)" },
      { "<leader>:", "<cmd>FzfLua command_history<cr>", desc = "Command History" },
      { "<leader><space>", LazyVim.pick("auto"), desc = "Find Files (Root Dir)" },
      -- find
      { "<leader>fb", "<cmd>FzfLua buffers sort_mru=true sort_lastused=true<cr>", desc = "Buffers" },
      { "<leader>fc", LazyVim.pick.config_files(), desc = "Find Config File" },
      { "<leader>ff", LazyVim.pick("auto"), desc = "Find Files (Root Dir)" },
      { "<leader>fF", LazyVim.pick("auto", { root = false }), desc = "Find Files (cwd)" },
      { "<leader>fg", "<cmd>FzfLua git_files<cr>", desc = "Find Files (git-files)" },
      { "<leader>fr", "<cmd>FzfLua oldfiles<cr>", desc = "Recent" },
      { "<leader>fR", LazyVim.pick("oldfiles", { root = false }), desc = "Recent (cwd)" },
      -- git
      { "<leader>gc", "<cmd>FzfLua git_commits<CR>", desc = "Commits" },
      { "<leader>gs", "<cmd>FzfLua git_status<CR>", desc = "Status" },
      -- search
      { '<leader>s"', "<cmd>FzfLua registers<cr>", desc = "Registers" },

Review comment (suggestion):
```suggestion
    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"

      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,
```
May I suggest the following? I could change a keymap in a `opts` function in personal configuration, but could not delete the keymap by setting its value to `nil` because it was being set up again in `config` function. I know you still probably have work to do and maybe you already intended to do that in the final form of this Extra, just thought I'd share my thoughts.

Code after:
      local config = require("fzf-lua.config")
      local actions = require("fzf-lua.actions")

      -- Quickfix
      config.defaults.keymap.fzf["ctrl-q"] = "select-all+accept"
      config.defaults.keymap.builtin["<c-f>"] = "preview-page-down"
      config.defaults.keymap.builtin["<c-b>"] = "preview-page-up"

      -- Trouble
      config.defaults.actions.files["ctrl-t"] = require("trouble.sources.fzf").actions.open

      -- Toggle root dir / cwd
      config.defaults.actions.files["ctrl-r"] = function(_, ctx)
        local o = vim.deepcopy(ctx.__call_opts)
        o.root = o.root == false
        o.cwd = nil
        o.buf = ctx.__CTX.bufnr
        LazyVim.pick.open(ctx.__INFO.cmd, o)
      end
      config.defaults.actions.files["alt-c"] = config.defaults.actions.files["ctrl-r"]

      -- use the same prompt for all
      local 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
          if type(v) == "table" then
            fix(v)
          end
        end
      end
      fix(defaults)

      vim.api.nvim_set_hl(0, "FzfLuaPath", { link = "Directory", default = true })

      return vim.tbl_deep_extend("force", opts, defaults, {
        fzf_colors = true,
        files = {
          cwd_prompt = false,
          actions = {
            ["alt-i"] = { actions.toggle_ignore },
            ["alt-h"] = { actions.toggle_hidden },
          },
        },
        grep = {
          formatter = "path.hl",
          actions = {
            ["alt-i"] = { actions.toggle_ignore },
            ["alt-h"] = { actions.toggle_hidden },
          },
        },