return { "ibhagwan/fzf-lua", dependencies = { "echasnovski/mini.icons" }, cmd = "FzfLua", opts = { fzf_colors = true, fzf_opts = { ["--no-scrollbar"] = true, }, defaults = { formatter = "path.dirname_first", }, winopts = { width = 0.8, height = 0.8, row = 0.5, col = 0.5, preview = { scrollchars = { "┃", "" }, }, }, files = { cwd_prompt = false, -- actions = { -- ["alt-i"] = { actions.toggle_ignore }, -- ["alt-h"] = { actions.toggle_hidden }, -- }, }, -- grep = { -- actions = { -- ["alt-i"] = { actions.toggle_ignore }, -- ["alt-h"] = { actions.toggle_hidden }, -- }, -- }, lsp = { symbols = { symbol_hl = function(s) return "TroubleIcon" .. s end, symbol_fmt = function(s) return s:lower() .. "\t" end, child_prefix = false, }, code_actions = { previewer = vim.fn.executable("delta") == 1 and "codeaction_native" or nil, }, }, }, keys = { { "", "", ft = "fzf", mode = "t", nowait = true }, { "", "", ft = "fzf", mode = "t", nowait = true }, -- goto { "gd", "FzfLua lsp_definitions jump_to_single_result=true ignore_current_line=true", desc = "Goto Definition" }, { "gr", "FzfLua lsp_references jump_to_single_result=true ignore_current_line=true", desc = "References", nowait = true }, { "gI", "FzfLua lsp_implementations jump_to_single_result=true ignore_current_line=true", desc = "Goto Implementation" }, { "gy", "FzfLua lsp_typedefs jump_to_single_result=true ignore_current_line=true", desc = "Goto T[y]pe Definition" }, -- shortcuts { ",", "FzfLua buffers sort_mru=true sort_lastused=true", desc = "Switch Buffer", }, { ":", "FzfLua command_history", desc = "Command History" }, { "", "FzfLua files", desc = "Find Files" }, -- find files { "fb", "FzfLua buffers sort_mru=true sort_lastused=true", desc = "Buffers" }, -- { "fc", LazyVim.pick.config_files(), desc = "Find Config File" }, { "ff", "FzfLua files", desc = "Find Files" }, { "fg", "FzfLua git_files", desc = "Find Files (git-files)" }, -- git { "gc", "FzfLua git_commits", desc = "Commits" }, { "gs", "FzfLua git_status", desc = "Status" }, -- search { 's"', "FzfLua registers", desc = "Registers" }, { "sa", "FzfLua autocmds", desc = "Auto Commands" }, { "sb", "FzfLua grep_curbuf", desc = "Buffer" }, { "sc", "FzfLua command_history", desc = "Command History" }, { "sC", "FzfLua commands", desc = "Commands" }, { "sd", "FzfLua diagnostics_document", desc = "Document Diagnostics" }, { "sD", "FzfLua diagnostics_workspace", desc = "Workspace Diagnostics" }, { "sg", "FzfLua live_grep", desc = "Grep (Root Dir)" }, { "sG", "FzfLua live_grep root=false", desc = "Grep (cwd)" }, { "sh", "FzfLua help_tags", desc = "Help Pages" }, { "sH", "FzfLua highlights", desc = "Search Highlight Groups" }, { "sj", "FzfLua jumps", desc = "Jumplist" }, { "sk", "FzfLua keymaps", desc = "Key Maps" }, { "sl", "FzfLua loclist", desc = "Location List" }, { "sM", "FzfLua man_pages", desc = "Man Pages" }, { "sm", "FzfLua marks", desc = "Jump to Mark" }, { "sR", "FzfLua resume", desc = "Resume" }, { "sq", "FzfLua quickfix", desc = "Quickfix List" }, -- { -- "ss", -- function() -- require("fzf-lua").lsp_document_symbols({ -- regex_filter = symbols_filter, -- }) -- end, -- desc = "Goto Symbol", -- }, -- { -- "sS", -- function() -- require("fzf-lua").lsp_live_workspace_symbols({ -- regex_filter = symbols_filter, -- }) -- end, -- desc = "Goto Symbol (Workspace)", -- }, }, }